diff --git a/.github/actionlint.yml b/.github/actionlint.yml new file mode 100644 index 0000000..e70bf18 --- /dev/null +++ b/.github/actionlint.yml @@ -0,0 +1,5 @@ +paths: + '**/*.yml': + ignore: + # https://github.com/rhysd/actionlint/issues/559 + - 'invalid runner name "node24"' diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index ea89f27..f4aaca0 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: 'actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683' # ratchet:actions/checkout@v4 - - uses: 'google-github-actions/auth@v2' # ratchet:exclude + - uses: 'google-github-actions/auth@v3' # ratchet:exclude with: workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}' service_account: '${{ vars.SERVICE_ACCOUNT_EMAIL }}' diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 188fade..a3206ba 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -32,7 +32,7 @@ jobs: - name: 'npm build' run: 'npm ci && npm run build' - - uses: 'google-github-actions/auth@v2' # ratchet:exclude + - uses: 'google-github-actions/auth@v3' # ratchet:exclude with: project_id: '${{ vars.PROJECT_ID }}' workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}' @@ -62,7 +62,7 @@ jobs: - name: 'npm build' run: 'npm ci && npm run build' - - uses: 'google-github-actions/auth@v2' # ratchet:exclude + - uses: 'google-github-actions/auth@v3' # ratchet:exclude with: project_id: '${{ vars.PROJECT_ID }}' workload_identity_provider: '${{ vars.WIF_PROVIDER_NAME }}' diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 57193b3..fba3e12 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -45,7 +45,7 @@ jobs: run: 'npm ci && npm run build' - id: 'auth' - uses: 'google-github-actions/auth@v2' # ratchet:exclude + uses: 'google-github-actions/auth@v3' # ratchet:exclude if: |- ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name && github.actor != 'dependabot[bot]' }} with: diff --git a/README.md b/README.md index efd2fea..07fe535 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,6 @@ This action deploys your function source code to [Cloud Functions][cloud-functions] and makes the URL available to later build steps via outputs. -> [!CAUTION] -> -> **This README corresponds to the "v3" GitHub Action**, which is currently in -> beta. If you are using "v2", see the [documentation for -> google-github-actions/deploy-cloud-functions@v2](https://github.com/google-github-actions/deploy-cloud-functions/tree/release/v2). - **This is not an officially supported Google product, and it is not covered by a Google Cloud support contract. To report bugs or request features in a Google Cloud product, please contact [Google Cloud @@ -21,9 +15,10 @@ support](https://cloud.google.com/support).** the secrets being requested. See [Authorization](#authorization) for more information. -- This action runs using Node 20. If you are using self-hosted GitHub Actions - runners, you must use a version of the GitHub Actions runner that supports - Node 20 or higher. +- This action runs using Node 24. If you are using self-hosted GitHub Actions + runners, you must use a [runner + version](https://github.com/actions/virtual-environments) that supports this + version or later. ## Usage @@ -40,13 +35,13 @@ jobs: - uses: 'actions/checkout@v4' - id: 'auth' - uses: 'google-github-actions/auth@v2' + uses: 'google-github-actions/auth@v3' with: project_id: 'my-project' workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' - id: 'deploy' - uses: 'google-github-actions/deploy-cloud-functions@v3' + uses: 'google-github-actions/deploy-cloud-functions@v4' timeout-minutes: 10 with: name: 'my-function' @@ -130,7 +125,9 @@ jobs: - runtime: _(Required)_ Runtime for the function, such as "nodejs20". For a list of all available runtimes, run: - $ gcloud functions runtimes list + ```sh + $ gcloud functions runtimes list + ``` The available runtimes change over time. @@ -160,10 +157,10 @@ jobs: - build_worker_pool: _(Optional)_ Name of the Cloud Build Custom Worker Pool that should be used to build the function. The format of this field is: - projects//locations//workerPools/ + projects/[PROJECT]/locations/[REGION]/workerPools/[WORKER_POOL] - where `` and `` are the project id and region - respectively where the worker pool is defined and `` is the + where `[PROJECT]` and `[REGION]` are the project id and region + respectively where the worker pool is defined and `[WORKER_POOL]` is the short name of the worker pool. If the project ID is not the same as the function, then the Cloud @@ -177,7 +174,7 @@ jobs: The value must match the pattern: - projects//locations//repositories/. + projects/[PROJECT]/locations/[LOCATION]/repositories/[REPOSITORY]. Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'. @@ -240,7 +237,6 @@ jobs: volumes. Keys starting with a forward slash '/' are mount paths. All other keys correspond to environment variables: - ```yaml with: secrets: |- @@ -283,11 +279,15 @@ jobs: - event_trigger_type: _(Optional)_ Specifies which action should trigger the function. For a list of acceptable values, run: - $ gcloud functions event-types list + ```sh + $ gcloud functions event-types list + ``` This usually requires the eventarc API to be enabled: - $ gcloud services enable eventarc.googleapis.com + ```sh + $ gcloud services enable eventarc.googleapis.com + ``` The available trigger types may change over time. @@ -319,7 +319,7 @@ jobs: will trigger function execution with message contents passed as input data of the format: - projects//topics/ + projects/[PROJECT]/topics/[TOPIC] The service account must have permissions on this topic. @@ -331,7 +331,7 @@ jobs: - event_trigger_channel: _(Optional)_ The name of the channel associated with the trigger in the format: - projects//locations//channels/ + projects/[PROJECT]/locations/[LOCATION]/channels/ You must provide a channel to receive events from Eventarc SaaS partners. @@ -355,7 +355,7 @@ service](https://cloud.google.com/functions/docs/securing/managing-access-iam). - name: Full resource name of the Cloud Function, of the format: - projects//locations//functions/ + projects/[PROJECT]/locations/[LOCATION]/functions/ - url: The URL of your Cloud Function. @@ -397,13 +397,13 @@ jobs: - uses: 'actions/checkout@v4' - id: 'auth' - uses: 'google-github-actions/auth@v2' + uses: 'google-github-actions/auth@v3' with: project_id: 'my-project' workload_identity_provider: 'projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider' - id: 'deploy' - uses: 'google-github-actions/deploy-cloud-functions@v3' + uses: 'google-github-actions/deploy-cloud-functions@v4' timeout-minutes: 10 with: name: 'my-function' @@ -424,7 +424,7 @@ jobs: - uses: 'actions/checkout@v4' - id: 'deploy' - uses: 'google-github-actions/deploy-cloud-functions@v3' + uses: 'google-github-actions/deploy-cloud-functions@v4' timeout-minutes: 10 with: name: 'my-function' diff --git a/action.yml b/action.yml index c4f5de0..12d5c8c 100644 --- a/action.yml +++ b/action.yml @@ -124,7 +124,9 @@ inputs: Runtime for the function, such as "nodejs20". For a list of all available runtimes, run: - $ gcloud functions runtimes list + ```sh + $ gcloud functions runtimes list + ``` The available runtimes change over time. required: true @@ -163,10 +165,10 @@ inputs: Name of the Cloud Build Custom Worker Pool that should be used to build the function. The format of this field is: - projects//locations//workerPools/ + projects/[PROJECT]/locations/[REGION]/workerPools/[WORKER_POOL] - where `` and `` are the project id and region - respectively where the worker pool is defined and `` is the + where `[PROJECT]` and `[REGION]` are the project id and region + respectively where the worker pool is defined and `[WORKER_POOL]` is the short name of the worker pool. If the project ID is not the same as the function, then the Cloud @@ -183,7 +185,7 @@ inputs: The value must match the pattern: - projects//locations//repositories/. + projects/[PROJECT]/locations/[LOCATION]/repositories/[REPOSITORY]. Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'. @@ -281,7 +283,6 @@ inputs: volumes. Keys starting with a forward slash '/' are mount paths. All other keys correspond to environment variables: - ```yaml with: secrets: |- @@ -347,11 +348,15 @@ inputs: Specifies which action should trigger the function. For a list of acceptable values, run: - $ gcloud functions event-types list + ```sh + $ gcloud functions event-types list + ``` This usually requires the eventarc API to be enabled: - $ gcloud services enable eventarc.googleapis.com + ```sh + $ gcloud services enable eventarc.googleapis.com + ``` The available trigger types may change over time. required: false @@ -388,7 +393,7 @@ inputs: will trigger function execution with message contents passed as input data of the format: - projects//topics/ + projects/[PROJECT]/topics/[TOPIC] The service account must have permissions on this topic. required: false @@ -410,7 +415,7 @@ inputs: description: |- The name of the channel associated with the trigger in the format: - projects//locations//channels/ + projects/[PROJECT]/locations/[LOCATION]/channels/ You must provide a channel to receive events from Eventarc SaaS partners. required: false @@ -421,7 +426,7 @@ outputs: description: |- Full resource name of the Cloud Function, of the format: - projects//locations//functions/ + projects/[PROJECT]/locations/[LOCATION]/functions/ url: description: |- @@ -433,5 +438,5 @@ branding: color: 'blue' runs: - using: 'node20' - main: 'dist/index.js' + using: 'node24' + main: 'dist/main/index.js' diff --git a/bin/runTests.sh b/bin/runTests.sh deleted file mode 100644 index c47d2f8..0000000 --- a/bin/runTests.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -set -eEuo pipefail - -# -# As of Node 20, the --test parameter does not support globbing, and it does not -# support variable Windows paths. We also cannot invoke the test runner -# directly, because while it has an API, there's no way to force it to transpile -# the Typescript into JavaScript before passing it to the runner. -# -# So we're left with this solution, which shells out to Node to list all files -# that end in *.test.ts (excluding node_modules/), and then execs out to that -# process. We have to exec so the stderr/stdout and exit code is appropriately -# fed to the caller. -# - -FILES="$(node -e "process.stdout.write(require('node:fs').readdirSync('./', { recursive: true }).filter((e) => {return e.endsWith('.test.ts') && !e.startsWith('node_modules');}).sort().join(' '));")" - -set -x - -# shellcheck disable=SC2086 -exec node --require ts-node/register --test-reporter spec --test ${FILES} diff --git a/dist/101.index.js b/dist/main/101.index.js similarity index 100% rename from dist/101.index.js rename to dist/main/101.index.js diff --git a/dist/669.index.js b/dist/main/669.index.js similarity index 100% rename from dist/669.index.js rename to dist/main/669.index.js diff --git a/dist/816.index.js b/dist/main/816.index.js similarity index 100% rename from dist/816.index.js rename to dist/main/816.index.js diff --git a/dist/index.js b/dist/main/index.js similarity index 88% rename from dist/index.js rename to dist/main/index.js index 1031ffb..7f49af1 100644 --- a/dist/index.js +++ b/dist/main/index.js @@ -1,4 +1,4 @@ -(()=>{var __webpack_modules__={4914:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const a=A(r(857));const c=r(302);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+a.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const l="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=l+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${l}${escapeData(this.message)}`;return e}}function escapeData(e){return(0,c.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(0,c.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},7484:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.platform=t.toPlatformPath=t.toWin32Path=t.toPosixPath=t.markdownSummary=t.summary=t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const c=r(4914);const l=r(4753);const u=r(302);const h=A(r(857));const g=A(r(6928));const p=r(5306);var C;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(C||(t.ExitCode=C={}));function exportVariable(e,t){const r=(0,u.toCommandValue)(t);process.env[e]=r;const n=process.env["GITHUB_ENV"]||"";if(n){return(0,l.issueFileCommand)("ENV",(0,l.prepareKeyValueMessage)(e,t))}(0,c.issueCommand)("set-env",{name:e},r)}t.exportVariable=exportVariable;function setSecret(e){(0,c.issueCommand)("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){(0,l.issueFileCommand)("PATH",e)}else{(0,c.issueCommand)("add-path",{},e)}process.env["PATH"]=`${e}${g.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return r}return r.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const n=["false","False","FALSE"];const s=getInput(e,t);if(r.includes(s))return true;if(n.includes(s))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const r=process.env["GITHUB_OUTPUT"]||"";if(r){return(0,l.issueFileCommand)("OUTPUT",(0,l.prepareKeyValueMessage)(e,t))}process.stdout.write(h.EOL);(0,c.issueCommand)("set-output",{name:e},(0,u.toCommandValue)(t))}t.setOutput=setOutput;function setCommandEcho(e){(0,c.issue)("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=C.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){(0,c.issueCommand)("debug",{},e)}t.debug=debug;function error(e,t={}){(0,c.issueCommand)("error",(0,u.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){(0,c.issueCommand)("warning",(0,u.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){(0,c.issueCommand)("notice",(0,u.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+h.EOL)}t.info=info;function startGroup(e){(0,c.issue)("group",e)}t.startGroup=startGroup;function endGroup(){(0,c.issue)("endgroup")}t.endGroup=endGroup;function group(e,t){return a(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){const r=process.env["GITHUB_STATE"]||"";if(r){return(0,l.issueFileCommand)("STATE",(0,l.prepareKeyValueMessage)(e,t))}(0,c.issueCommand)("save-state",{name:e},(0,u.toCommandValue)(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return a(this,void 0,void 0,(function*(){return yield p.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var y=r(1847);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return y.summary}});var I=r(1847);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return I.markdownSummary}});var B=r(1976);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return B.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return B.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return B.toPlatformPath}});t.platform=A(r(8968))},4753:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const a=A(r(6982));const c=A(r(9896));const l=A(r(857));const u=r(302);function issueFileCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!c.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}c.appendFileSync(r,`${(0,u.toCommandValue)(t)}${l.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const r=`ghadelimiter_${a.randomUUID()}`;const n=(0,u.toCommandValue)(t);if(e.includes(r)){throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`)}if(n.includes(r)){throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`)}return`${e}<<${r}${l.EOL}${n}${l.EOL}${r}`}t.prepareKeyValueMessage=prepareKeyValueMessage},5306:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const s=r(4844);const A=r(4552);const a=r(7484);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new s.HttpClient("actions/oidc-client",[new A.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return n(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const n=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const s=(t=n.result)===null||t===void 0?void 0:t.value;if(!s){throw new Error("Response json body do not have ID Token field")}return s}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}(0,a.debug)(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);(0,a.setSecret)(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},1976:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const a=A(r(6928));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,a.sep)}t.toPlatformPath=toPlatformPath},8968:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getDetails=t.isLinux=t.isMacOS=t.isWindows=t.arch=t.platform=void 0;const l=c(r(857));const u=A(r(5236));const getWindowsInfo=()=>a(void 0,void 0,void 0,(function*(){const{stdout:e}=yield u.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',undefined,{silent:true});const{stdout:t}=yield u.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',undefined,{silent:true});return{name:t.trim(),version:e.trim()}}));const getMacOsInfo=()=>a(void 0,void 0,void 0,(function*(){var e,t,r,n;const{stdout:s}=yield u.getExecOutput("sw_vers",undefined,{silent:true});const A=(t=(e=s.match(/ProductVersion:\s*(.+)/))===null||e===void 0?void 0:e[1])!==null&&t!==void 0?t:"";const a=(n=(r=s.match(/ProductName:\s*(.+)/))===null||r===void 0?void 0:r[1])!==null&&n!==void 0?n:"";return{name:a,version:A}}));const getLinuxInfo=()=>a(void 0,void 0,void 0,(function*(){const{stdout:e}=yield u.getExecOutput("lsb_release",["-i","-r","-s"],{silent:true});const[t,r]=e.trim().split("\n");return{name:t,version:r}}));t.platform=l.default.platform();t.arch=l.default.arch();t.isWindows=t.platform==="win32";t.isMacOS=t.platform==="darwin";t.isLinux=t.platform==="linux";function getDetails(){return a(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield t.isWindows?getWindowsInfo():t.isMacOS?getMacOsInfo():getLinuxInfo()),{platform:t.platform,arch:t.arch,isWindows:t.isWindows,isMacOS:t.isMacOS,isLinux:t.isLinux})}))}t.getDetails=getDetails},1847:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const s=r(857);const A=r(9896);const{access:a,appendFile:c,writeFile:l}=A.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return n(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield a(e,A.constants.R_OK|A.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,r={}){const n=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${n}>`}return`<${e}${n}>${t}`}write(e){return n(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const r=yield this.filePath();const n=t?l:c;yield n(r,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return n(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(s.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(n).addEOL()}addList(e,t=false){const r=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const s=this.wrap(r,n);return this.addRaw(s).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:r,colspan:n,rowspan:s}=e;const A=t?"th":"td";const a=Object.assign(Object.assign({},n&&{colspan:n}),s&&{rowspan:s});return this.wrap(A,r,a)})).join("");return this.wrap("tr",t)})).join("");const r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){const r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){const{width:n,height:s}=r||{};const A=Object.assign(Object.assign({},n&&{width:n}),s&&{height:s});const a=this.wrap("img",null,Object.assign({src:e,alt:t},A));return this.addRaw(a).addEOL()}addHeading(e,t){const r=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1";const s=this.wrap(n,e);return this.addRaw(s).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const r=Object.assign({},t&&{cite:t});const n=this.wrap("blockquote",e,r);return this.addRaw(n).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}}const u=new Summary;t.markdownSummary=u;t.summary=u},302:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},5236:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getExecOutput=t.exec=void 0;const c=r(3193);const l=A(r(6665));function exec(e,t,r){return a(this,void 0,void 0,(function*(){const n=l.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const s=n[0];t=n.slice(1).concat(t||[]);const A=new l.ToolRunner(s,t,r);return A.exec()}))}t.exec=exec;function getExecOutput(e,t,r){var n,s;return a(this,void 0,void 0,(function*(){let A="";let a="";const l=new c.StringDecoder("utf8");const u=new c.StringDecoder("utf8");const h=(n=r===null||r===void 0?void 0:r.listeners)===null||n===void 0?void 0:n.stdout;const g=(s=r===null||r===void 0?void 0:r.listeners)===null||s===void 0?void 0:s.stderr;const stdErrListener=e=>{a+=u.write(e);if(g){g(e)}};const stdOutListener=e=>{A+=l.write(e);if(h){h(e)}};const p=Object.assign(Object.assign({},r===null||r===void 0?void 0:r.listeners),{stdout:stdOutListener,stderr:stdErrListener});const C=yield exec(e,t,Object.assign(Object.assign({},r),{listeners:p}));A+=l.end();a+=u.end();return{exitCode:C,stdout:A,stderr:a}}))}t.getExecOutput=getExecOutput},6665:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.argStringToArray=t.ToolRunner=void 0;const c=A(r(857));const l=A(r(4434));const u=A(r(5317));const h=A(r(6928));const g=A(r(4994));const p=A(r(5207));const C=r(3557);const y=process.platform==="win32";class ToolRunner extends l.EventEmitter{constructor(e,t,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const r=this._getSpawnFileName();const n=this._getSpawnArgs(e);let s=t?"":"[command]";if(y){if(this._isCmdFile()){s+=r;for(const e of n){s+=` ${e}`}}else if(e.windowsVerbatimArguments){s+=`"${r}"`;for(const e of n){s+=` ${e}`}}else{s+=this._windowsQuoteCmdArg(r);for(const e of n){s+=` ${this._windowsQuoteCmdArg(e)}`}}}else{s+=r;for(const e of n){s+=` ${e}`}}return s}_processLineBuffer(e,t,r){try{let n=t+e.toString();let s=n.indexOf(c.EOL);while(s>-1){const e=n.substring(0,s);r(e);n=n.substring(s+c.EOL.length);s=n.indexOf(c.EOL)}return n}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(y){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(y){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){t+=" ";t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const n of e){if(t.some((e=>e===n))){r=true;break}}if(!r){return e}let n='"';let s=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(s&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){s=true;n+='"'}else{s=false}}n+='"';return n.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let t='"';let r=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(r&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){r=true;t+="\\"}else{r=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${t}"`}return r}exec(){return a(this,void 0,void 0,(function*(){if(!p.isRooted(this.toolPath)&&(this.toolPath.includes("/")||y&&this.toolPath.includes("\\"))){this.toolPath=h.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield g.which(this.toolPath,true);return new Promise(((e,t)=>a(this,void 0,void 0,(function*(){this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+c.EOL)}const n=new ExecState(r,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield p.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const s=this._getSpawnFileName();const A=u.spawn(s,this._getSpawnArgs(r),this._getSpawnOptions(this.options,s));let a="";if(A.stdout){A.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}a=this._processLineBuffer(e,a,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let l="";if(A.stderr){A.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const t=r.failOnStdErr?r.errStream:r.outStream;t.write(e)}l=this._processLineBuffer(e,l,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}A.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));A.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));A.on("close",(e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()}));n.on("done",((r,n)=>{if(a.length>0){this.emit("stdline",a)}if(l.length>0){this.emit("errline",l)}A.removeAllListeners();if(r){t(r)}else{e(n)}}));if(this.options.input){if(!A.stdin){throw new Error("child process missing stdin")}A.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let r=false;let n=false;let s="";function append(e){if(n&&e!=='"'){s+="\\"}s+=e;n=false}for(let A=0;A0){t.push(s);s=""}continue}append(a)}if(s.length>0){t.push(s.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends l.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=C.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}},4552:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},4844:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const c=A(r(8611));const l=A(r(5692));const u=A(r(4988));const h=A(r(770));const g=r(6752);var p;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(p||(t.HttpCodes=p={}));var C;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(C||(t.Headers=C={}));var y;(function(e){e["ApplicationJson"]="application/json"})(y||(t.MediaTypes=y={}));function getProxyUrl(e){const t=u.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const I=[p.MovedPermanently,p.ResourceMoved,p.SeeOther,p.TemporaryRedirect,p.PermanentRedirect];const B=[p.BadGateway,p.ServiceUnavailable,p.GatewayTimeout];const Q=["OPTIONS","GET","DELETE","HEAD"];const b=10;const w=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return a(this,void 0,void 0,(function*(){return new Promise((e=>a(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}readBodyBuffer(){return a(this,void 0,void 0,(function*(){return new Promise((e=>a(this,void 0,void 0,(function*(){const t=[];this.message.on("data",(e=>{t.push(e)}));this.message.on("end",(()=>{e(Buffer.concat(t))}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return a(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return a(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return a(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,r){return a(this,void 0,void 0,(function*(){return this.request("POST",e,t,r||{})}))}patch(e,t,r){return a(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,r||{})}))}put(e,t,r){return a(this,void 0,void 0,(function*(){return this.request("PUT",e,t,r||{})}))}head(e,t){return a(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,r,n){return a(this,void 0,void 0,(function*(){return this.request(e,t,r,n)}))}getJson(e,t={}){return a(this,void 0,void 0,(function*(){t[C.Accept]=this._getExistingOrDefaultHeader(t,C.Accept,y.ApplicationJson);const r=yield this.get(e,t);return this._processResponse(r,this.requestOptions)}))}postJson(e,t,r={}){return a(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[C.Accept]=this._getExistingOrDefaultHeader(r,C.Accept,y.ApplicationJson);r[C.ContentType]=this._getExistingOrDefaultHeader(r,C.ContentType,y.ApplicationJson);const s=yield this.post(e,n,r);return this._processResponse(s,this.requestOptions)}))}putJson(e,t,r={}){return a(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[C.Accept]=this._getExistingOrDefaultHeader(r,C.Accept,y.ApplicationJson);r[C.ContentType]=this._getExistingOrDefaultHeader(r,C.ContentType,y.ApplicationJson);const s=yield this.put(e,n,r);return this._processResponse(s,this.requestOptions)}))}patchJson(e,t,r={}){return a(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[C.Accept]=this._getExistingOrDefaultHeader(r,C.Accept,y.ApplicationJson);r[C.ContentType]=this._getExistingOrDefaultHeader(r,C.ContentType,y.ApplicationJson);const s=yield this.patch(e,n,r);return this._processResponse(s,this.requestOptions)}))}request(e,t,r,n){return a(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const s=new URL(t);let A=this._prepareRequest(e,s,n);const a=this._allowRetries&&Q.includes(e)?this._maxRetries+1:1;let c=0;let l;do{l=yield this.requestRaw(A,r);if(l&&l.message&&l.message.statusCode===p.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(l)){e=t;break}}if(e){return e.handleAuthentication(this,A,r)}else{return l}}let t=this._maxRedirects;while(l.message.statusCode&&I.includes(l.message.statusCode)&&this._allowRedirects&&t>0){const a=l.message.headers["location"];if(!a){break}const c=new URL(a);if(s.protocol==="https:"&&s.protocol!==c.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield l.readBody();if(c.hostname!==s.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}A=this._prepareRequest(e,c,n);l=yield this.requestRaw(A,r);t--}if(!l.message.statusCode||!B.includes(l.message.statusCode)){return l}c+=1;if(c{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(new Error("Unknown error"))}else{r(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,r){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let n=false;function handleResult(e,t){if(!n){n=true;r(e,t)}}const s=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let A;s.on("socket",(e=>{A=e}));s.setTimeout(this._socketTimeout||3*6e4,(()=>{if(A){A.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));s.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){s.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){s.end()}));t.pipe(s)}else{s.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){const t=new URL(e);const r=u.getProxyUrl(t);const n=r&&r.hostname;if(!n){return}return this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const s=n.parsedUrl.protocol==="https:";n.httpModule=s?l:c;const A=s?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):A;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(n.options)}}return n}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||r}_getAgent(e){let t;const r=u.getProxyUrl(e);const n=r&&r.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(!n){t=this._agent}if(t){return t}const s=e.protocol==="https:";let A=100;if(this.requestOptions){A=this.requestOptions.maxSockets||c.globalAgent.maxSockets}if(r&&r.hostname){const e={maxSockets:A,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`}),{host:r.hostname,port:r.port})};let n;const a=r.protocol==="https:";if(s){n=a?h.httpsOverHttps:h.httpsOverHttp}else{n=a?h.httpOverHttps:h.httpOverHttp}t=n(e);this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:A};t=s?new l.Agent(e):new c.Agent(e);this._agent=t}if(s&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_getProxyAgentDispatcher(e,t){let r;if(this._keepAlive){r=this._proxyAgentDispatcher}if(r){return r}const n=e.protocol==="https:";r=new g.ProxyAgent(Object.assign({uri:t.href,pipelining:!this._keepAlive?0:1},(t.username||t.password)&&{token:`Basic ${Buffer.from(`${t.username}:${t.password}`).toString("base64")}`}));this._proxyAgentDispatcher=r;if(n&&this._ignoreSslError){r.options=Object.assign(r.options.requestTls||{},{rejectUnauthorized:false})}return r}_performExponentialBackoff(e){return a(this,void 0,void 0,(function*(){e=Math.min(b,e);const t=w*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return a(this,void 0,void 0,(function*(){return new Promise(((r,n)=>a(this,void 0,void 0,(function*(){const s=e.message.statusCode||0;const A={statusCode:s,result:null,headers:{}};if(s===p.NotFound){r(A)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let a;let c;try{c=yield e.readBody();if(c&&c.length>0){if(t&&t.deserializeDates){a=JSON.parse(c,dateTimeDeserializer)}else{a=JSON.parse(c)}A.result=a}A.headers=e.message.headers}catch(e){}if(s>299){let e;if(a&&a.message){e=a.message}else if(c&&c.length>0){e=c}else{e=`Failed request: (${s})`}const t=new HttpClientError(e,s);t.result=A.result;n(t)}else{r(A)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})},4988:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const r=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(r){try{return new DecodedURL(r)}catch(e){if(!r.startsWith("http://")&&!r.startsWith("https://"))return new DecodedURL(`http://${r}`)}}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const r=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!r){return false}let n;if(e.port){n=Number(e.port)}else if(e.protocol==="http:"){n=80}else if(e.protocol==="https:"){n=443}const s=[e.hostname.toUpperCase()];if(typeof n==="number"){s.push(`${s[0]}:${n}`)}for(const e of r.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||s.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}t.checkBypass=checkBypass;function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}class DecodedURL extends URL{constructor(e,t){super(e,t);this._decodedUsername=decodeURIComponent(super.username);this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}},5207:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var c;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.READONLY=t.UV_FS_O_EXLOCK=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rm=t.rename=t.readlink=t.readdir=t.open=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const l=A(r(9896));const u=A(r(6928));c=l.promises,t.chmod=c.chmod,t.copyFile=c.copyFile,t.lstat=c.lstat,t.mkdir=c.mkdir,t.open=c.open,t.readdir=c.readdir,t.readlink=c.readlink,t.rename=c.rename,t.rm=c.rm,t.rmdir=c.rmdir,t.stat=c.stat,t.symlink=c.symlink,t.unlink=c.unlink;t.IS_WINDOWS=process.platform==="win32";t.UV_FS_O_EXLOCK=268435456;t.READONLY=l.constants.O_RDONLY;function exists(e){return a(this,void 0,void 0,(function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}t.exists=exists;function isDirectory(e,r=false){return a(this,void 0,void 0,(function*(){const n=r?yield t.stat(e):yield t.lstat(e);return n.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,r){return a(this,void 0,void 0,(function*(){let n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){const t=u.extname(e).toUpperCase();if(r.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const s=e;for(const A of r){e=s+A;n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){try{const r=u.dirname(e);const n=u.basename(e).toUpperCase();for(const s of yield t.readdir(r)){if(n===s.toUpperCase()){e=u.join(r,s);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""}))}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}t.getCmdPath=getCmdPath},4994:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const c=r(2613);const l=A(r(6928));const u=A(r(5207));function cp(e,t,r={}){return a(this,void 0,void 0,(function*(){const{force:n,recursive:s,copySourceDirectory:A}=readCopyOptions(r);const a=(yield u.exists(t))?yield u.stat(t):null;if(a&&a.isFile()&&!n){return}const c=a&&a.isDirectory()&&A?l.join(t,l.basename(e)):t;if(!(yield u.exists(e))){throw new Error(`no such file or directory: ${e}`)}const h=yield u.stat(e);if(h.isDirectory()){if(!s){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,c,0,n)}}else{if(l.relative(e,c)===""){throw new Error(`'${c}' and '${e}' are the same file`)}yield copyFile(e,c,n)}}))}t.cp=cp;function mv(e,t,r={}){return a(this,void 0,void 0,(function*(){if(yield u.exists(t)){let n=true;if(yield u.isDirectory(t)){t=l.join(t,l.basename(e));n=yield u.exists(t)}if(n){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(l.dirname(t));yield u.rename(e,t)}))}t.mv=mv;function rmRF(e){return a(this,void 0,void 0,(function*(){if(u.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield u.rm(e,{force:true,maxRetries:3,recursive:true,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}}))}t.rmRF=rmRF;function mkdirP(e){return a(this,void 0,void 0,(function*(){c.ok(e,"a path argument must be provided");yield u.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return a(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(u.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}return t}const r=yield findInPath(e);if(r&&r.length>0){return r[0]}return""}))}t.which=which;function findInPath(e){return a(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(u.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(l.delimiter)){if(e){t.push(e)}}}if(u.isRooted(e)){const r=yield u.tryGetExecutablePath(e,t);if(r){return[r]}return[]}if(e.includes(l.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(l.delimiter)){if(e){r.push(e)}}}const n=[];for(const s of r){const r=yield u.tryGetExecutablePath(l.join(s,e),t);if(r){n.push(r)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:r,copySourceDirectory:n}}function cpDirRecursive(e,t,r,n){return a(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(t);const s=yield u.readdir(e);for(const A of s){const s=`${e}/${A}`;const a=`${t}/${A}`;const c=yield u.lstat(s);if(c.isDirectory()){yield cpDirRecursive(s,a,r,n)}else{yield copyFile(s,a,n)}}yield u.chmod(t,(yield u.stat(e)).mode)}))}function copyFile(e,t,r){return a(this,void 0,void 0,(function*(){if((yield u.lstat(e)).isSymbolicLink()){try{yield u.lstat(t);yield u.unlink(t)}catch(e){if(e.code==="EPERM"){yield u.chmod(t,"0666");yield u.unlink(t)}}const r=yield u.readlink(e);yield u.symlink(r,t,u.IS_WINDOWS?"junction":null)}else if(!(yield u.exists(t))||r){yield u.copyFile(e,t)}}))}},6160:(e,t,r)=>{(()=>{"use strict";var t={7258:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;Ae.trim()===""?"":` ${e}`)).join("\n").trim();if(n===""){throw new Error(`Input "${e}" is missing a description`)}const s=t.default?`, default: \`${t.default}\``:"";A.push(`- ${e}: _(${r}${s})_ ${n}\n`)}const l=t.indexOf("\x3c!-- BEGIN_AUTOGEN_INPUTS --\x3e");const u=t.indexOf("\x3c!-- END_AUTOGEN_INPUTS --\x3e");t.splice(l+1,u-l-1,"",...A,"");const h=Object.entries(n.outputs||{});if(h.length===0)console.warn(`action.yml outputs are empty`);const g=[];for(const[e,t]of h){const r=(t?.description||"").split("\n").map((e=>e.trim()===""?"":` ${e}`)).join("\n").trim();if(r===""){throw new Error(`Output "${e}" is missing a description`)}g.push(`- ${e}: ${r}\n`)}const p=t.indexOf("\x3c!-- BEGIN_AUTOGEN_OUTPUTS --\x3e");const C=t.indexOf("\x3c!-- END_AUTOGEN_OUTPUTS --\x3e");t.splice(p+1,C-p-1,"",...g,"");await(0,a.writeFile)("README.md",t.join("\n"),"utf8")}},9081:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.parseCredential=parseCredential;t.isServiceAccountKey=isServiceAccountKey;t.isExternalAccount=isExternalAccount;const n=r(3916);const s=r(6266);function parseCredential(e){e=(e||"").trim();if(!e){throw new Error(`Missing service account key JSON (got empty value)`)}if(!e.startsWith("{")){e=(0,s.fromBase64)(e)}try{const t=JSON.parse(e);return t}catch(e){const t=(0,n.errorMessage)(e);throw new SyntaxError(`Failed to parse service account key JSON credentials: ${t}`)}}function isServiceAccountKey(e){return e.type==="service_account"}function isExternalAccount(e){return e.type!=="external_account"}t["default"]={parseCredential:parseCredential,isServiceAccountKey:isServiceAccountKey,isExternalAccount:isExternalAccount}},3214:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A{Object.defineProperty(t,"__esModule",{value:true});t.parseCSV=parseCSV;t.parseMultilineCSV=parseMultilineCSV;function parseCSV(e){e=(e||"").trim();if(!e){return[]}const t=e.split(/(?{Object.defineProperty(t,"__esModule",{value:true});t.toBase64=toBase64;t.fromBase64=fromBase64;function toBase64(e){return Buffer.from(e).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function fromBase64(e,t){if(!t){t="utf8"}let r=e.replace(/-/g,"+").replace(/_/g,"/");while(r.length%4)r+="=";return Buffer.from(r,"base64").toString(t)}},3466:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.toEnum=toEnum;function toEnum(e,t){const r=(t||"").toUpperCase();const n=r.replace(/[\s-]+/g,"_");if(r in e){return e[r]}else if(n in e){return e[n]}else{const r=Object.keys(e);throw new Error(`Invalid value ${t}, valid values are ${JSON.stringify(r)}`)}}},8204:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.stubEnv=stubEnv;function stubEnv(e,t=process.env){const r={};for(const n in e){r[n]=t[n];if(e[n]!==undefined){t[n]=e[n]}else{delete t[n]}}return()=>{for(const e in r){if(r[e]!==undefined){t[e]=r[e]}else{delete t[e]}}}}},3916:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.errorMessage=errorMessage;t.isNotFoundError=isNotFoundError;function errorMessage(e){let t;if(e===null){t="null"}else if(e===undefined||typeof e==="undefined"){t="undefined"}else if(typeof e==="bigint"||e instanceof BigInt){t=e.toString()}else if(typeof e==="boolean"||e instanceof Boolean){t=e.toString()}else if(e instanceof Error){t=e.message}else if(typeof e==="function"||e instanceof Function){t=errorMessage(e())}else if(typeof e==="number"||e instanceof Number){t=e.toString()}else if(typeof e==="string"||e instanceof String){t=e.toString()}else if(typeof e==="symbol"||e instanceof Symbol){t=e.toString()}else if(typeof e==="object"||e instanceof Object){t=JSON.stringify(e)}else{t=String(`[${typeof e}] ${e}`)}const r=t.trim().replace("Error: ","").trim();if(!r)return"";if(r.length>1&&isUpper(r[0])&&!isUpper(r[1])){return r[0].toLowerCase()+r.slice(1)}return r}function isNotFoundError(e){const t=errorMessage(e);return t.toUpperCase().includes("ENOENT")}function isUpper(e){return e===e.toUpperCase()}},6148:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.parseFlags=parseFlags;t.readUntil=readUntil;function parseFlags(e){const t=[];let r="";let n=false;for(let s=0;s{Object.defineProperty(t,"__esModule",{value:true});t.forceRemove=forceRemove;t.isEmptyDir=isEmptyDir;t.writeSecureFile=writeSecureFile;t.removeFile=removeFile;const n=r(9896);const s=r(3916);async function forceRemove(e){try{await n.promises.rm(e,{force:true,recursive:true})}catch(t){if(!(0,s.isNotFoundError)(t)){const r=(0,s.errorMessage)(t);throw new Error(`Failed to remove "${e}": ${r}`)}}}async function isEmptyDir(e){try{const t=await n.promises.readdir(e);return t.length<=0}catch{return true}}async function writeSecureFile(e,t,r){const s=Object.assign({},{mode:416,flag:"wx",flush:true},r);await n.promises.writeFile(e,t,s);return e}async function removeFile(e){try{await n.promises.unlink(e);return true}catch(t){if((0,s.isNotFoundError)(t)){return false}const r=(0,s.errorMessage)(t);throw new Error(`Failed to remove "${e}": ${r}`)}}},7237:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.parseGcloudIgnore=parseGcloudIgnore;const n=r(9896);const s=r(6928);const A=r(3916);async function parseGcloudIgnore(e){const t=(0,s.dirname)(e);let r=[];try{r=(await n.promises.readFile(e,{encoding:"utf8"})).toString().split(/\r?\n/).filter(shouldKeepIgnoreLine).map((e=>e.trim()))}catch(e){if(!(0,A.isNotFoundError)(e)){throw e}}for(let e=0;ee.trim()));r.splice(e,1,...l);e+=l.length}}return r}function shouldKeepIgnoreLine(e){const t=(e||"").trim();if(t===""){return false}if(t.startsWith("#")&&!t.startsWith("#!")){return false}return true}},9407:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(7258),t);s(r(9081),t);s(r(3214),t);s(r(731),t);s(r(6266),t);s(r(3466),t);s(r(8204),t);s(r(3916),t);s(r(6148),t);s(r(4772),t);s(r(7237),t);s(r(3599),t);s(r(4958),t);s(r(3716),t);s(r(7384),t);s(r(436),t);s(r(9809),t);s(r(8935),t);s(r(9834),t);s(r(6244),t);s(r(5215),t);s(r(286),t)},3599:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.parseBoolean=parseBoolean;const r={1:true,t:true,T:true,true:true,True:true,TRUE:true,0:false,f:false,F:false,false:false,False:false,FALSE:false};function parseBoolean(e,t=false){const n=(e||"").trim();if(n===""){return t}if(!(n in r)){throw new Error(`invalid boolean value "${n}"`)}return r[n]}},4958:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.joinKVString=joinKVString;t.joinKVStringForGCloud=joinKVStringForGCloud;t.parseKVString=parseKVString;t.parseKVFile=parseKVFile;t.parseKVJSON=parseKVJSON;t.parseKVYAML=parseKVYAML;t.parseKVStringAndFile=parseKVStringAndFile;const s=n(r(8815));const A=r(9896);const a=r(3916);const c=r(5215);function joinKVString(e,t=","){return Object.entries(e).map((([e,t])=>`${e}=${t}`)).join(t)}function joinKVStringForGCloud(e,t=",.!@#$%&*()_=+~`[]{}|:;<>?🚀🍪🐼​"){const r=joinKVString(e,"");if(r===""){return""}const n={};for(let e=0;er+=e;const setValue=e=>n+=e;let A=setKey;for(let a=0;a=0){A(c);s=-1}else if(c==="\\"){s=a}else if(c==="="){if(r===""){throw new Error(`Invalid start sequence for value (no preceeding key before "=") at ${a}`)}if(A===setValue){A(c)}A=setValue}else if(c==="\n"||c==="\r"||c==="\u2028"||c==="\u2029"||c===","){if(r!==""){t[r.trim()]=n.trim()}r="";n="";A=setKey}else{A(c)}}if(s>=0){throw new Error(`Unterminated escape character at ${s}`)}if(r!==""){t[r.trim()]=n.trim()}return t}function parseKVFile(e){try{const t=(0,c.presence)((0,A.readFileSync)(e,"utf8"));if(!t||t.length<1){return undefined}if(t[0]==="{"||t[0]==="["){return parseKVJSON(t)}if(t.match(/^.+=.+/gi)){return parseKVString(t)}return parseKVYAML(t)}catch(t){const r=(0,a.errorMessage)(t);throw new Error(`Failed to read file '${e}': ${r}`)}}function parseKVJSON(e){e=(e||"").trim();if(!e){return undefined}if(e==="{}"){return{}}try{const t=JSON.parse(e);const r={};for(const[e,n]of Object.entries(t)){if(typeof e!=="string"){throw new SyntaxError(`Failed to parse key "${e}", expected string, got ${typeof e}`)}if(e.trim()===""){throw new SyntaxError(`Failed to parse key "${e}", expected at least one character`)}if(typeof n!=="string"){const t=JSON.stringify(n);throw new SyntaxError(`Failed to parse value "${t}" for "${e}", expected string, got ${typeof n}`)}if(n.trim()===""){throw new SyntaxError(`Value for key "${e}" cannot be empty (got "${n}")`)}r[e]=n}return r}catch(e){const t=(0,a.errorMessage)(e);throw new Error(`Failed to parse KV pairs as JSON: ${t}`)}}function parseKVYAML(e){const t=(e||"").trim();if(!t){return undefined}if(t==="{}"){return{}}const r=s.default.parse(e);const n={};for(const[e,t]of Object.entries(r)){if(typeof e!=="string"||typeof t!=="string"){throw new SyntaxError(`env_vars_file must contain only KEY: VALUE strings. Error parsing key ${e} of type ${typeof e} with value ${t} of type ${typeof t}`)}n[e.trim()]=t.trim()}return n}function parseKVStringAndFile(e,t){e=(e||"").trim();t=(t||"").trim();const r=t?parseKVFile(t):undefined;const n=e?parseKVString(e):undefined;if(r===undefined&&n===undefined){return undefined}return Object.assign({},r,n)}},3716:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.inParallel=inParallel;const n=r(857);const s=r(3916);async function inParallel(e,t){t=Math.min(t||(0,n.cpus)().length-1);if(t<1){throw new Error(`concurrency must be at least 1`)}const r=[];const A=[];const runTasks=async e=>{for await(const[t,n]of e){try{r[t]=await n()}catch(e){A.push((0,s.errorMessage)(e))}}};const a=new Array(t).fill(e.entries()).map(runTasks);await Promise.allSettled(a);if(A.length>0){throw new Error(A.join("\n"))}return r}},7384:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.toPosixPath=toPosixPath;t.toWin32Path=toWin32Path;t.toPlatformPath=toPlatformPath;const n=r(6928);function toPosixPath(e){return e.replace(/[\\]/g,"/")}function toWin32Path(e){return e.replace(/[/]/g,"\\")}function toPlatformPath(e){return e.replace(/[/\\]/g,n.sep)}},436:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.randomFilename=randomFilename;t.randomFilepath=randomFilepath;const n=r(6928);const s=r(6982);const A=r(857);function randomFilename(e=12){return(0,s.randomBytes)(e).toString("hex")}function randomFilepath(e=(0,A.tmpdir)(),t=12){return(0,n.join)(e,randomFilename(t))}t["default"]={randomFilename:randomFilename,randomFilepath:randomFilepath}},9809:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.withRetries=withRetries;const n=r(3916);const s=r(9834);const A=100;function withRetries(e,t){const r=t.retries;const a=typeof t?.backoffLimit!=="undefined"?Math.max(t.backoffLimit,0):undefined;let c=t.backoff??A;if(typeof a!=="undefined"){c=Math.min(c,a)}return async function(){let A=r+1;let l=c;const u=a;let h=0;let g="unknown";do{try{return await e()}catch(e){g=(0,n.errorMessage)(e);--A;if(A>0){await(0,s.sleep)(l);let e=h+l;if(typeof u!=="undefined"){e=Math.min(e,Number(u))}h=l;l=e}}}while(A>0);const p=t.retries+1;const C=p===1?`1 attempt`:`${p} attempts`;throw new Error(`retry function failed after ${C}: ${g}`)}}},8935:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.setInput=setInput;t.setInputs=setInputs;t.clearInputs=clearInputs;t.clearEnv=clearEnv;t.skipIfMissingEnv=skipIfMissingEnv;t.assertMembers=assertMembers;const s=n(r(4589));function setInput(e,t){const r=`INPUT_${e.replace(/ /g,"_").toUpperCase()}`;process.env[r]=t}function setInputs(e){Object.entries(e).forEach((([e,t])=>setInput(e,t)))}function clearInputs(){clearEnv((e=>e.startsWith(`INPUT_`)))}function clearEnv(e){Object.keys(process.env).forEach((t=>{if(e(t,process.env[t])){delete process.env[t]}}))}function skipIfMissingEnv(...e){for(const t of e){if(!(t in process.env)){return`missing $${t}`}}return false}function assertMembers(e,t){for(let r=0;r<=e.length-t.length;r++){let n=true;for(let s=0;s{Object.defineProperty(t,"__esModule",{value:true});t.parseDuration=parseDuration;t.sleep=sleep;function parseDuration(e){e=(e||"").trim();if(!e){return 0}let t=0;let r="";for(let n=0;nsetTimeout(t,e)))}},6244:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.expandUniverseEndpoints=expandUniverseEndpoints;function expandUniverseEndpoints(e,t="googleapis.com"){const r=Object.assign({});for(const n in e){const s=`GHA_ENDPOINT_OVERRIDE_${n}`;const A=process.env[s];if(A&&A!==""){r[n]=A.replace(/\/+$/,"")}else{r[n]=e[n].replace(/{universe}/g,t).replace(/\/+$/,"")}}return r}},5215:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.presence=presence;t.exactlyOneOf=exactlyOneOf;t.allOf=allOf;function presence(e){return(e||"").trim()||undefined}function exactlyOneOf(...e){e=e||[];let t=false;for(let r=0;r{Object.defineProperty(t,"__esModule",{value:true});t.isPinnedToHead=isPinnedToHead;t.pinnedToHeadWarning=pinnedToHeadWarning;function isPinnedToHead(){const e=process.env.GITHUB_ACTION_REF;return e==="master"||e==="main"}function pinnedToHeadWarning(e){const t=process.env.GITHUB_ACTION_REF;const r=process.env.GITHUB_ACTION_REPOSITORY;return`${r} is pinned at "${t}". We strongly advise against `+`pinning to "@${t}" as it may be unstable. Please update your `+`GitHub Action YAML from:\n`+`\n`+` uses: '${r}@${t}'\n`+`\n`+`to:\n`+`\n`+` uses: '${r}@${e}'\n`+`\n`+`Alternatively, you can pin to any git tag or git SHA in the repository.`}},181:e=>{e.exports=r(181)},6982:e=>{e.exports=r(6982)},9896:e=>{e.exports=r(9896)},1943:e=>{e.exports=r(1943)},4589:e=>{e.exports=r(4589)},857:e=>{e.exports=r(857)},6928:e=>{e.exports=r(6928)},932:e=>{e.exports=r(932)},1493:e=>{e.exports=r(1493)},7349:(e,t,r)=>{var n=r(1127);var s=r(3301);var A=r(4454);var a=r(2223);var c=r(7103);var l=r(334);var u=r(3142);function resolveCollection(e,t,r,n,s,A){const a=r.type==="block-map"?c.resolveBlockMap(e,t,r,n,A):r.type==="block-seq"?l.resolveBlockSeq(e,t,r,n,A):u.resolveFlowCollection(e,t,r,n,A);const h=a.constructor;if(s==="!"||s===h.tagName){a.tag=h.tagName;return a}if(s)a.tag=s;return a}function composeCollection(e,t,r,c,l){const u=c.tag;const h=!u?null:t.directives.tagName(u.source,(e=>l(u,"TAG_RESOLVE_FAILED",e)));if(r.type==="block-seq"){const{anchor:e,newlineAfterProp:t}=c;const r=e&&u?e.offset>u.offset?e:u:e??u;if(r&&(!t||t.offsete.tag===h&&e.collection===g));if(!p){const n=t.schema.knownTags[h];if(n&&n.collection===g){t.schema.tags.push(Object.assign({},n,{default:false}));p=n}else{if(n){l(u,"BAD_COLLECTION_TYPE",`${n.tag} used for ${g} collection, but expects ${n.collection??"scalar"}`,true)}else{l(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${h}`,true)}return resolveCollection(e,t,r,l,h)}}const C=resolveCollection(e,t,r,l,h,p);const y=p.resolve?.(C,(e=>l(u,"TAG_RESOLVE_FAILED",e)),t.options)??C;const I=n.isNode(y)?y:new s.Scalar(y);I.range=C.range;I.tag=h;if(p?.format)I.format=p.format;return I}t.composeCollection=composeCollection},3683:(e,t,r)=>{var n=r(3021);var s=r(5937);var A=r(7788);var a=r(4631);function composeDoc(e,t,{offset:r,start:c,value:l,end:u},h){const g=Object.assign({_directives:t},e);const p=new n.Document(undefined,g);const C={atKey:false,atRoot:true,directives:p.directives,options:p.options,schema:p.schema};const y=a.resolveProps(c,{indicator:"doc-start",next:l??u?.[0],offset:r,onError:h,parentIndent:0,startOnNewline:true});if(y.found){p.directives.docStart=true;if(l&&(l.type==="block-map"||l.type==="block-seq")&&!y.hasNewline)h(y.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}p.contents=l?s.composeNode(C,l,y,h):s.composeEmptyNode(C,y.end,c,null,y,h);const I=p.contents.range[2];const B=A.resolveEnd(u,I,false,h);if(B.comment)p.comment=B.comment;p.range=[r,I,B.offset];return p}t.composeDoc=composeDoc},5937:(e,t,r)=>{var n=r(4065);var s=r(1127);var A=r(7349);var a=r(5413);var c=r(7788);var l=r(2599);const u={composeNode:composeNode,composeEmptyNode:composeEmptyNode};function composeNode(e,t,r,n){const c=e.atKey;const{spaceBefore:l,comment:h,anchor:g,tag:p}=r;let C;let y=true;switch(t.type){case"alias":C=composeAlias(e,t,n);if(g||p)n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":C=a.composeScalar(e,t,p,n);if(g)C.anchor=g.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":C=A.composeCollection(u,e,t,r,n);if(g)C.anchor=g.source.substring(1);break;default:{const s=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;n(t,"UNEXPECTED_TOKEN",s);C=composeEmptyNode(e,t.offset,undefined,null,r,n);y=false}}if(g&&C.anchor==="")n(g,"BAD_ALIAS","Anchor cannot be an empty string");if(c&&e.options.stringKeys&&(!s.isScalar(C)||typeof C.value!=="string"||C.tag&&C.tag!=="tag:yaml.org,2002:str")){const e="With stringKeys, all keys must be strings";n(p??t,"NON_STRING_KEY",e)}if(l)C.spaceBefore=true;if(h){if(t.type==="scalar"&&t.source==="")C.comment=h;else C.commentBefore=h}if(e.options.keepSourceTokens&&y)C.srcToken=t;return C}function composeEmptyNode(e,t,r,n,{spaceBefore:s,comment:A,anchor:c,tag:u,end:h},g){const p={type:"scalar",offset:l.emptyScalarPosition(t,r,n),indent:-1,source:""};const C=a.composeScalar(e,p,u,g);if(c){C.anchor=c.source.substring(1);if(C.anchor==="")g(c,"BAD_ALIAS","Anchor cannot be an empty string")}if(s)C.spaceBefore=true;if(A){C.comment=A;C.range[2]=h}return C}function composeAlias({options:e},{offset:t,source:r,end:s},A){const a=new n.Alias(r.substring(1));if(a.source==="")A(t,"BAD_ALIAS","Alias cannot be an empty string");if(a.source.endsWith(":"))A(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",true);const l=t+r.length;const u=c.resolveEnd(s,l,e.strict,A);a.range=[t,l,u.offset];if(u.comment)a.comment=u.comment;return a}t.composeEmptyNode=composeEmptyNode;t.composeNode=composeNode},5413:(e,t,r)=>{var n=r(1127);var s=r(3301);var A=r(8913);var a=r(6842);function composeScalar(e,t,r,c){const{value:l,type:u,comment:h,range:g}=t.type==="block-scalar"?A.resolveBlockScalar(e,t,c):a.resolveFlowScalar(t,e.options.strict,c);const p=r?e.directives.tagName(r.source,(e=>c(r,"TAG_RESOLVE_FAILED",e))):null;let C;if(e.options.stringKeys&&e.atKey){C=e.schema[n.SCALAR]}else if(p)C=findScalarTagByName(e.schema,l,p,r,c);else if(t.type==="scalar")C=findScalarTagByTest(e,l,t,c);else C=e.schema[n.SCALAR];let y;try{const A=C.resolve(l,(e=>c(r??t,"TAG_RESOLVE_FAILED",e)),e.options);y=n.isScalar(A)?A:new s.Scalar(A)}catch(e){const n=e instanceof Error?e.message:String(e);c(r??t,"TAG_RESOLVE_FAILED",n);y=new s.Scalar(l)}y.range=g;y.source=l;if(u)y.type=u;if(p)y.tag=p;if(C.format)y.format=C.format;if(h)y.comment=h;return y}function findScalarTagByName(e,t,r,s,A){if(r==="!")return e[n.SCALAR];const a=[];for(const t of e.tags){if(!t.collection&&t.tag===r){if(t.default&&t.test)a.push(t);else return t}}for(const e of a)if(e.test?.test(t))return e;const c=e.knownTags[r];if(c&&!c.collection){e.tags.push(Object.assign({},c,{default:false,test:undefined}));return c}A(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str");return e[n.SCALAR]}function findScalarTagByTest({atKey:e,directives:t,schema:r},s,A,a){const c=r.tags.find((t=>(t.default===true||e&&t.default==="key")&&t.test?.test(s)))||r[n.SCALAR];if(r.compat){const e=r.compat.find((e=>e.default&&e.test?.test(s)))??r[n.SCALAR];if(c.tag!==e.tag){const r=t.tagString(c.tag);const n=t.tagString(e.tag);const s=`Value may be parsed as either ${r} or ${n}`;a(A,"TAG_RESOLVE_FAILED",s,true)}}return c}t.composeScalar=composeScalar},9984:(e,t,r)=>{var n=r(932);var s=r(1342);var A=r(3021);var a=r(1464);var c=r(1127);var l=r(3683);var u=r(7788);function getErrorPos(e){if(typeof e==="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:r}=e;return[t,t+(typeof r==="string"?r.length:1)]}function parsePrelude(e){let t="";let r=false;let n=false;for(let s=0;s{const s=getErrorPos(e);if(n)this.warnings.push(new a.YAMLWarning(s,t,r));else this.errors.push(new a.YAMLParseError(s,t,r))};this.directives=new s.Directives({version:e.version||"1.2"});this.options=e}decorate(e,t){const{comment:r,afterEmptyLine:n}=parsePrelude(this.prelude);if(r){const s=e.contents;if(t){e.comment=e.comment?`${e.comment}\n${r}`:r}else if(n||e.directives.docStart||!s){e.commentBefore=r}else if(c.isCollection(s)&&!s.flow&&s.items.length>0){let e=s.items[0];if(c.isPair(e))e=e.key;const t=e.commentBefore;e.commentBefore=t?`${r}\n${t}`:r}else{const e=s.commentBefore;s.commentBefore=e?`${r}\n${e}`:r}}if(t){Array.prototype.push.apply(e.errors,this.errors);Array.prototype.push.apply(e.warnings,this.warnings)}else{e.errors=this.errors;e.warnings=this.warnings}this.prelude=[];this.errors=[];this.warnings=[]}streamInfo(){return{comment:parsePrelude(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=false,r=-1){for(const t of e)yield*this.next(t);yield*this.end(t,r)}*next(e){if(n.env.LOG_STREAM)console.dir(e,{depth:null});switch(e.type){case"directive":this.directives.add(e.source,((t,r,n)=>{const s=getErrorPos(e);s[0]+=t;this.onError(s,"BAD_DIRECTIVE",r,n)}));this.prelude.push(e.source);this.atDirectives=true;break;case"document":{const t=l.composeDoc(this.options,this.directives,e,this.onError);if(this.atDirectives&&!t.directives.docStart)this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line");this.decorate(t,false);if(this.doc)yield this.doc;this.doc=t;this.atDirectives=false;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message;const r=new a.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",t);if(this.atDirectives||!this.doc)this.errors.push(r);else this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new a.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=true;const t=u.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);this.decorate(this.doc,true);if(t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new a.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=false,t=-1){if(this.doc){this.decorate(this.doc,true);yield this.doc;this.doc=null}else if(e){const e=Object.assign({_directives:this.directives},this.options);const r=new A.Document(undefined,e);if(this.atDirectives)this.onError(t,"MISSING_CHAR","Missing directives-end indicator line");r.range=[0,t,t];this.decorate(r,false);yield r}}}t.Composer=Composer},7103:(e,t,r)=>{var n=r(7165);var s=r(4454);var A=r(4631);var a=r(9499);var c=r(4051);var l=r(1187);const u="All mapping items must start at the same column";function resolveBlockMap({composeNode:e,composeEmptyNode:t},r,h,g,p){const C=p?.nodeClass??s.YAMLMap;const y=new C(r.schema);if(r.atRoot)r.atRoot=false;let I=h.offset;let B=null;for(const s of h.items){const{start:p,key:C,sep:Q,value:b}=s;const w=A.resolveProps(p,{indicator:"explicit-key-ind",next:C??Q?.[0],offset:I,onError:g,parentIndent:h.indent,startOnNewline:true});const S=!w.found;if(S){if(C){if(C.type==="block-seq")g(I,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in C&&C.indent!==h.indent)g(I,"BAD_INDENT",u)}if(!w.anchor&&!w.tag&&!Q){B=w.end;if(w.comment){if(y.comment)y.comment+="\n"+w.comment;else y.comment=w.comment}continue}if(w.newlineAfterProp||a.containsNewline(C)){g(C??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}}else if(w.found?.indent!==h.indent){g(I,"BAD_INDENT",u)}r.atKey=true;const k=w.end;const v=C?e(r,C,w,g):t(r,k,p,null,w,g);if(r.schema.compat)c.flowIndentCheck(h.indent,C,g);r.atKey=false;if(l.mapIncludes(r,y.items,v))g(k,"DUPLICATE_KEY","Map keys must be unique");const R=A.resolveProps(Q??[],{indicator:"map-value-ind",next:b,offset:v.range[2],onError:g,parentIndent:h.indent,startOnNewline:!C||C.type==="block-scalar"});I=R.end;if(R.found){if(S){if(b?.type==="block-map"&&!R.hasNewline)g(I,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(r.options.strict&&w.start{var n=r(3301);function resolveBlockScalar(e,t,r){const s=t.offset;const A=parseBlockScalarHeader(t,e.options.strict,r);if(!A)return{value:"",type:null,comment:"",range:[s,s,s]};const a=A.mode===">"?n.Scalar.BLOCK_FOLDED:n.Scalar.BLOCK_LITERAL;const c=t.source?splitLines(t.source):[];let l=c.length;for(let e=c.length-1;e>=0;--e){const t=c[e][1];if(t===""||t==="\r")l=e;else break}if(l===0){const e=A.chomp==="+"&&c.length>0?"\n".repeat(Math.max(1,c.length-1)):"";let r=s+A.length;if(t.source)r+=t.source.length;return{value:e,type:a,comment:A.comment,range:[s,r,r]}}let u=t.indent+A.indent;let h=t.offset+A.length;let g=0;for(let t=0;tu)u=n.length}else{if(n.length=l;--e){if(c[e][0].length>u)l=e+1}let p="";let C="";let y=false;for(let e=0;eu||s[0]==="\t"){if(C===" ")C="\n";else if(!y&&C==="\n")C="\n\n";p+=C+t.slice(u)+s;C="\n";y=true}else if(s===""){if(C==="\n")p+="\n";else C="\n"}else{p+=C+s;C=" ";y=false}}switch(A.chomp){case"-":break;case"+":for(let e=l;e{var n=r(2223);var s=r(4631);var A=r(4051);function resolveBlockSeq({composeNode:e,composeEmptyNode:t},r,a,c,l){const u=l?.nodeClass??n.YAMLSeq;const h=new u(r.schema);if(r.atRoot)r.atRoot=false;if(r.atKey)r.atKey=false;let g=a.offset;let p=null;for(const{start:n,value:l}of a.items){const u=s.resolveProps(n,{indicator:"seq-item-ind",next:l,offset:g,onError:c,parentIndent:a.indent,startOnNewline:true});if(!u.found){if(u.anchor||u.tag||l){if(l&&l.type==="block-seq")c(u.end,"BAD_INDENT","All sequence items must start at the same column");else c(g,"MISSING_CHAR","Sequence item without - indicator")}else{p=u.end;if(u.comment)h.comment=u.comment;continue}}const C=l?e(r,l,u,c):t(r,u.end,n,null,u,c);if(r.schema.compat)A.flowIndentCheck(a.indent,l,c);g=C.range[2];h.items.push(C)}h.range=[a.offset,g,p??g];return h}t.resolveBlockSeq=resolveBlockSeq},7788:(e,t)=>{function resolveEnd(e,t,r,n){let s="";if(e){let A=false;let a="";for(const c of e){const{source:e,type:l}=c;switch(l){case"space":A=true;break;case"comment":{if(r&&!A)n(c,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";if(!s)s=t;else s+=a+t;a="";break}case"newline":if(s)a+=e;A=true;break;default:n(c,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:s,offset:t}}t.resolveEnd=resolveEnd},3142:(e,t,r)=>{var n=r(1127);var s=r(7165);var A=r(4454);var a=r(2223);var c=r(7788);var l=r(4631);var u=r(9499);var h=r(1187);const g="Block collections are not allowed within flow collections";const isBlock=e=>e&&(e.type==="block-map"||e.type==="block-seq");function resolveFlowCollection({composeNode:e,composeEmptyNode:t},r,p,C,y){const I=p.start.source==="{";const B=I?"flow map":"flow sequence";const Q=y?.nodeClass??(I?A.YAMLMap:a.YAMLSeq);const b=new Q(r.schema);b.flow=true;const w=r.atRoot;if(w)r.atRoot=false;if(r.atKey)r.atKey=false;let S=p.offset+p.start.source.length;for(let a=0;a0){const e=c.resolveEnd(R,D,r.options.strict,C);if(e.comment){if(b.comment)b.comment+="\n"+e.comment;else b.comment=e.comment}b.range=[p.offset,D,e.offset]}else{b.range=[p.offset,D,D]}return b}t.resolveFlowCollection=resolveFlowCollection},6842:(e,t,r)=>{var n=r(3301);var s=r(7788);function resolveFlowScalar(e,t,r){const{offset:A,type:a,source:c,end:l}=e;let u;let h;const _onError=(e,t,n)=>r(A+e,t,n);switch(a){case"scalar":u=n.Scalar.PLAIN;h=plainValue(c,_onError);break;case"single-quoted-scalar":u=n.Scalar.QUOTE_SINGLE;h=singleQuotedValue(c,_onError);break;case"double-quoted-scalar":u=n.Scalar.QUOTE_DOUBLE;h=doubleQuotedValue(c,_onError);break;default:r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`);return{value:"",type:null,comment:"",range:[A,A+c.length,A+c.length]}}const g=A+c.length;const p=s.resolveEnd(l,g,t,r);return{value:h,type:u,comment:p.comment,range:[A,g,p.offset]}}function plainValue(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${e[0]}`;break}case"@":case"`":{r=`reserved character ${e[0]}`;break}}if(r)t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`);return foldLines(e)}function singleQuotedValue(e,t){if(e[e.length-1]!=="'"||e.length===1)t(e.length,"MISSING_CHAR","Missing closing 'quote");return foldLines(e.slice(1,-1)).replace(/''/g,"'")}function foldLines(e){let t,r;try{t=new RegExp("(.*?)(?t?e.slice(t,n+1):s}else{r+=s}}if(e[e.length-1]!=='"'||e.length===1)t(e.length,"MISSING_CHAR",'Missing closing "quote');return r}function foldNewline(e,t){let r="";let n=e[t+1];while(n===" "||n==="\t"||n==="\n"||n==="\r"){if(n==="\r"&&e[t+2]!=="\n")break;if(n==="\n")r+="\n";t+=1;n=e[t+1]}if(!r)r=" ";return{fold:r,offset:t}}const A={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function parseCharCode(e,t,r,n){const s=e.substr(t,r);const A=s.length===r&&/^[0-9a-fA-F]+$/.test(s);const a=A?parseInt(s,16):NaN;if(isNaN(a)){const s=e.substr(t-2,r+2);n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`);return s}return String.fromCodePoint(a)}t.resolveFlowScalar=resolveFlowScalar},4631:(e,t)=>{function resolveProps(e,{flow:t,indicator:r,next:n,offset:s,onError:A,parentIndent:a,startOnNewline:c}){let l=false;let u=c;let h=c;let g="";let p="";let C=false;let y=false;let I=null;let B=null;let Q=null;let b=null;let w=null;let S=null;let k=null;for(const s of e){if(y){if(s.type!=="space"&&s.type!=="newline"&&s.type!=="comma")A(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");y=false}if(I){if(u&&s.type!=="comment"&&s.type!=="newline"){A(I,"TAB_AS_INDENT","Tabs are not allowed as indentation")}I=null}switch(s.type){case"space":if(!t&&(r!=="doc-start"||n?.type!=="flow-collection")&&s.source.includes("\t")){I=s}h=true;break;case"comment":{if(!h)A(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=s.source.substring(1)||" ";if(!g)g=e;else g+=p+e;p="";u=false;break}case"newline":if(u){if(g)g+=s.source;else if(!S||r!=="seq-item-ind")l=true}else p+=s.source;u=true;C=true;if(B||Q)b=s;h=true;break;case"anchor":if(B)A(s,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(s.source.endsWith(":"))A(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",true);B=s;k??(k=s.offset);u=false;h=false;y=true;break;case"tag":{if(Q)A(s,"MULTIPLE_TAGS","A node can have at most one tag");Q=s;k??(k=s.offset);u=false;h=false;y=true;break}case r:if(B||Q)A(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`);if(S)A(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${t??"collection"}`);S=s;u=r==="seq-item-ind"||r==="explicit-key-ind";h=false;break;case"comma":if(t){if(w)A(s,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`);w=s;u=false;h=false;break}default:A(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`);u=false;h=false}}const v=e[e.length-1];const R=v?v.offset+v.source.length:s;if(y&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")){A(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space")}if(I&&(u&&I.indent<=a||n?.type==="block-map"||n?.type==="block-seq"))A(I,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:w,found:S,spaceBefore:l,comment:g,hasNewline:C,anchor:B,tag:Q,newlineAfterProp:b,end:R,start:k??R}}t.resolveProps=resolveProps},9499:(e,t)=>{function containsNewline(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return true;if(e.end)for(const t of e.end)if(t.type==="newline")return true;return false;case"flow-collection":for(const t of e.items){for(const e of t.start)if(e.type==="newline")return true;if(t.sep)for(const e of t.sep)if(e.type==="newline")return true;if(containsNewline(t.key)||containsNewline(t.value))return true}return false;default:return true}}t.containsNewline=containsNewline},2599:(e,t)=>{function emptyScalarPosition(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let r=t[n];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}r=t[++n];while(r?.type==="space"){e+=r.source.length;r=t[++n]}break}}return e}t.emptyScalarPosition=emptyScalarPosition},4051:(e,t,r)=>{var n=r(9499);function flowIndentCheck(e,t,r){if(t?.type==="flow-collection"){const s=t.end[0];if(s.indent===e&&(s.source==="]"||s.source==="}")&&n.containsNewline(t)){const e="Flow end indicator should be more indented than parent";r(s,"BAD_INDENT",e,true)}}}t.flowIndentCheck=flowIndentCheck},1187:(e,t,r)=>{var n=r(1127);function mapIncludes(e,t,r){const{uniqueKeys:s}=e.options;if(s===false)return false;const A=typeof s==="function"?s:(e,t)=>e===t||n.isScalar(e)&&n.isScalar(t)&&e.value===t.value;return t.some((e=>A(e.key,r)))}t.mapIncludes=mapIncludes},3021:(e,t,r)=>{var n=r(4065);var s=r(101);var A=r(1127);var a=r(7165);var c=r(4043);var l=r(5840);var u=r(6829);var h=r(1596);var g=r(3661);var p=r(2404);var C=r(1342);class Document{constructor(e,t,r){this.commentBefore=null;this.comment=null;this.errors=[];this.warnings=[];Object.defineProperty(this,A.NODE_TYPE,{value:A.DOC});let n=null;if(typeof t==="function"||Array.isArray(t)){n=t}else if(r===undefined&&t){r=t;t=undefined}const s=Object.assign({intAsBigInt:false,keepSourceTokens:false,logLevel:"warn",prettyErrors:true,strict:true,stringKeys:false,uniqueKeys:true,version:"1.2"},r);this.options=s;let{version:a}=s;if(r?._directives){this.directives=r._directives.atDocument();if(this.directives.yaml.explicit)a=this.directives.yaml.version}else this.directives=new C.Directives({version:a});this.setSchema(a,r);this.contents=e===undefined?null:this.createNode(e,n,r)}clone(){const e=Object.create(Document.prototype,{[A.NODE_TYPE]:{value:A.DOC}});e.commentBefore=this.commentBefore;e.comment=this.comment;e.errors=this.errors.slice();e.warnings=this.warnings.slice();e.options=Object.assign({},this.options);if(this.directives)e.directives=this.directives.clone();e.schema=this.schema.clone();e.contents=A.isNode(this.contents)?this.contents.clone(e.schema):this.contents;if(this.range)e.range=this.range.slice();return e}add(e){if(assertCollection(this.contents))this.contents.add(e)}addIn(e,t){if(assertCollection(this.contents))this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const r=h.anchorNames(this);e.anchor=!t||r.has(t)?h.findNewAnchor(t||"a",r):t}return new n.Alias(e.anchor)}createNode(e,t,r){let n=undefined;if(typeof t==="function"){e=t.call({"":e},"",e);n=t}else if(Array.isArray(t)){const keyToStr=e=>typeof e==="number"||e instanceof String||e instanceof Number;const e=t.filter(keyToStr).map(String);if(e.length>0)t=t.concat(e);n=t}else if(r===undefined&&t){r=t;t=undefined}const{aliasDuplicateObjects:s,anchorPrefix:a,flow:c,keepUndefined:l,onTagObj:u,tag:g}=r??{};const{onAnchor:C,setAnchors:y,sourceObjects:I}=h.createNodeAnchors(this,a||"a");const B={aliasDuplicateObjects:s??true,keepUndefined:l??false,onAnchor:C,onTagObj:u,replacer:n,schema:this.schema,sourceObjects:I};const Q=p.createNode(e,g,B);if(c&&A.isCollection(Q))Q.flow=true;y();return Q}createPair(e,t,r={}){const n=this.createNode(e,null,r);const s=this.createNode(t,null,r);return new a.Pair(n,s)}delete(e){return assertCollection(this.contents)?this.contents.delete(e):false}deleteIn(e){if(s.isEmptyPath(e)){if(this.contents==null)return false;this.contents=null;return true}return assertCollection(this.contents)?this.contents.deleteIn(e):false}get(e,t){return A.isCollection(this.contents)?this.contents.get(e,t):undefined}getIn(e,t){if(s.isEmptyPath(e))return!t&&A.isScalar(this.contents)?this.contents.value:this.contents;return A.isCollection(this.contents)?this.contents.getIn(e,t):undefined}has(e){return A.isCollection(this.contents)?this.contents.has(e):false}hasIn(e){if(s.isEmptyPath(e))return this.contents!==undefined;return A.isCollection(this.contents)?this.contents.hasIn(e):false}set(e,t){if(this.contents==null){this.contents=s.collectionFromPath(this.schema,[e],t)}else if(assertCollection(this.contents)){this.contents.set(e,t)}}setIn(e,t){if(s.isEmptyPath(e)){this.contents=t}else if(this.contents==null){this.contents=s.collectionFromPath(this.schema,Array.from(e),t)}else if(assertCollection(this.contents)){this.contents.setIn(e,t)}}setSchema(e,t={}){if(typeof e==="number")e=String(e);let r;switch(e){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new C.Directives({version:"1.1"});r={resolveKnownTags:false,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=e;else this.directives=new C.Directives({version:e});r={resolveKnownTags:true,schema:"core"};break;case null:if(this.directives)delete this.directives;r=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(r)this.schema=new l.Schema(Object.assign(r,t));else throw new Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:s,reviver:A}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===true,mapKeyWarned:false,maxAliasCount:typeof n==="number"?n:100};const l=c.toJS(this.contents,t??"",a);if(typeof s==="function")for(const{count:e,res:t}of a.anchors.values())s(t,e);return typeof A==="function"?g.applyReviver(A,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:true,jsonArg:e,mapAsMap:false,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return u.stringifyDocument(this,e)}}function assertCollection(e){if(A.isCollection(e))return true;throw new Error("Expected a YAML collection as document contents")}t.Document=Document},1596:(e,t,r)=>{var n=r(1127);var s=r(204);function anchorIsValid(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);const r=`Anchor must not contain whitespace or control characters: ${t}`;throw new Error(r)}return true}function anchorNames(e){const t=new Set;s.visit(e,{Value(e,r){if(r.anchor)t.add(r.anchor)}});return t}function findNewAnchor(e,t){for(let r=1;true;++r){const n=`${e}${r}`;if(!t.has(n))return n}}function createNodeAnchors(e,t){const r=[];const s=new Map;let A=null;return{onAnchor:n=>{r.push(n);A??(A=anchorNames(e));const s=findNewAnchor(t,A);A.add(s);return s},setAnchors:()=>{for(const e of r){const t=s.get(e);if(typeof t==="object"&&t.anchor&&(n.isScalar(t.node)||n.isCollection(t.node))){t.node.anchor=t.anchor}else{const t=new Error("Failed to resolve repeated object (this should not happen)");t.source=e;throw t}}},sourceObjects:s}}t.anchorIsValid=anchorIsValid;t.anchorNames=anchorNames;t.createNodeAnchors=createNodeAnchors;t.findNewAnchor=findNewAnchor},3661:(e,t)=>{function applyReviver(e,t,r,n){if(n&&typeof n==="object"){if(Array.isArray(n)){for(let t=0,r=n.length;t{var n=r(4065);var s=r(1127);var A=r(3301);const a="tag:yaml.org,2002:";function findTagObject(e,t,r){if(t){const e=r.filter((e=>e.tag===t));const n=e.find((e=>!e.format))??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find((t=>t.identify?.(e)&&!t.format))}function createNode(e,t,r){if(s.isDocument(e))e=e.contents;if(s.isNode(e))return e;if(s.isPair(e)){const t=r.schema[s.MAP].createNode?.(r.schema,null,r);t.items.push(e);return t}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt!=="undefined"&&e instanceof BigInt){e=e.valueOf()}const{aliasDuplicateObjects:c,onAnchor:l,onTagObj:u,schema:h,sourceObjects:g}=r;let p=undefined;if(c&&e&&typeof e==="object"){p=g.get(e);if(p){p.anchor??(p.anchor=l(e));return new n.Alias(p.anchor)}else{p={anchor:null,node:null};g.set(e,p)}}if(t?.startsWith("!!"))t=a+t.slice(2);let C=findTagObject(e,t,h.tags);if(!C){if(e&&typeof e.toJSON==="function"){e=e.toJSON()}if(!e||typeof e!=="object"){const t=new A.Scalar(e);if(p)p.node=t;return t}C=e instanceof Map?h[s.MAP]:Symbol.iterator in Object(e)?h[s.SEQ]:h[s.MAP]}if(u){u(C);delete r.onTagObj}const y=C?.createNode?C.createNode(r.schema,e,r):typeof C?.nodeClass?.from==="function"?C.nodeClass.from(r.schema,e,r):new A.Scalar(e);if(t)y.tag=t;else if(!C.default)y.tag=C.tag;if(p)p.node=y;return y}t.createNode=createNode},1342:(e,t,r)=>{var n=r(1127);var s=r(204);const A={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};const escapeTagName=e=>e.replace(/[!,[\]{}]/g,(e=>A[e]));class Directives{constructor(e,t){this.docStart=null;this.docEnd=false;this.yaml=Object.assign({},Directives.defaultYaml,e);this.tags=Object.assign({},Directives.defaultTags,t)}clone(){const e=new Directives(this.yaml,this.tags);e.docStart=this.docStart;return e}atDocument(){const e=new Directives(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false;this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.2"};this.tags=Object.assign({},Directives.defaultTags);break}return e}add(e,t){if(this.atNextDocument){this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.1"};this.tags=Object.assign({},Directives.defaultTags);this.atNextDocument=false}const r=e.trim().split(/[ \t]+/);const n=r.shift();switch(n){case"%TAG":{if(r.length!==2){t(0,"%TAG directive should contain exactly two parts");if(r.length<2)return false}const[e,n]=r;this.tags[e]=n;return true}case"%YAML":{this.yaml.explicit=true;if(r.length!==1){t(0,"%YAML directive should contain exactly one part");return false}const[e]=r;if(e==="1.1"||e==="1.2"){this.yaml.version=e;return true}else{const r=/^\d+\.\d+$/.test(e);t(6,`Unsupported YAML version ${e}`,r);return false}}default:t(0,`Unknown directive ${n}`,true);return false}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!"){t(`Not a valid tag: ${e}`);return null}if(e[1]==="<"){const r=e.slice(2,-1);if(r==="!"||r==="!!"){t(`Verbatim tags aren't resolved, so ${e} is invalid.`);return null}if(e[e.length-1]!==">")t("Verbatim tags must end with a >");return r}const[,r,n]=e.match(/^(.*!)([^!]*)$/s);if(!n)t(`The ${e} tag has no suffix`);const s=this.tags[r];if(s){try{return s+decodeURIComponent(n)}catch(e){t(String(e));return null}}if(r==="!")return e;t(`Could not resolve tag: ${e}`);return null}tagString(e){for(const[t,r]of Object.entries(this.tags)){if(e.startsWith(r))return t+escapeTagName(e.substring(r.length))}return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[];const r=Object.entries(this.tags);let A;if(e&&r.length>0&&n.isNode(e.contents)){const t={};s.visit(e.contents,((e,r)=>{if(n.isNode(r)&&r.tag)t[r.tag]=true}));A=Object.keys(t)}else A=[];for(const[n,s]of r){if(n==="!!"&&s==="tag:yaml.org,2002:")continue;if(!e||A.some((e=>e.startsWith(s))))t.push(`%TAG ${n} ${s}`)}return t.join("\n")}}Directives.defaultYaml={explicit:false,version:"1.2"};Directives.defaultTags={"!!":"tag:yaml.org,2002:"};t.Directives=Directives},1464:(e,t)=>{class YAMLError extends Error{constructor(e,t,r,n){super();this.name=e;this.code=r;this.message=n;this.pos=t}}class YAMLParseError extends YAMLError{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class YAMLWarning extends YAMLError{constructor(e,t,r){super("YAMLWarning",e,t,r)}}const prettifyError=(e,t)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map((e=>t.linePos(e)));const{line:n,col:s}=r.linePos[0];r.message+=` at line ${n}, column ${s}`;let A=s-1;let a=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(A>=60&&a.length>80){const e=Math.min(A-39,a.length-79);a="…"+a.substring(e);A-=e-1}if(a.length>80)a=a.substring(0,79)+"…";if(n>1&&/^ *$/.test(a.substring(0,A))){let r=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);if(r.length>80)r=r.substring(0,79)+"…\n";a=r+a}if(/[^ ]/.test(a)){let e=1;const t=r.linePos[1];if(t&&t.line===n&&t.col>s){e=Math.max(1,Math.min(t.col-s,80-A))}const c=" ".repeat(A)+"^".repeat(e);r.message+=`:\n\n${a}\n${c}\n`}};t.YAMLError=YAMLError;t.YAMLParseError=YAMLParseError;t.YAMLWarning=YAMLWarning;t.prettifyError=prettifyError},8815:(e,t,r)=>{var n=r(9984);var s=r(3021);var A=r(5840);var a=r(1464);var c=r(4065);var l=r(1127);var u=r(7165);var h=r(3301);var g=r(4454);var p=r(2223);var C=r(3461);var y=r(361);var I=r(6628);var B=r(3456);var Q=r(4047);var b=r(204);t.Composer=n.Composer;t.Document=s.Document;t.Schema=A.Schema;t.YAMLError=a.YAMLError;t.YAMLParseError=a.YAMLParseError;t.YAMLWarning=a.YAMLWarning;t.Alias=c.Alias;t.isAlias=l.isAlias;t.isCollection=l.isCollection;t.isDocument=l.isDocument;t.isMap=l.isMap;t.isNode=l.isNode;t.isPair=l.isPair;t.isScalar=l.isScalar;t.isSeq=l.isSeq;t.Pair=u.Pair;t.Scalar=h.Scalar;t.YAMLMap=g.YAMLMap;t.YAMLSeq=p.YAMLSeq;t.CST=C;t.Lexer=y.Lexer;t.LineCounter=I.LineCounter;t.Parser=B.Parser;t.parse=Q.parse;t.parseAllDocuments=Q.parseAllDocuments;t.parseDocument=Q.parseDocument;t.stringify=Q.stringify;t.visit=b.visit;t.visitAsync=b.visitAsync},7249:(e,t,r)=>{var n=r(932);function debug(e,...t){if(e==="debug")console.log(...t)}function warn(e,t){if(e==="debug"||e==="warn"){if(typeof n.emitWarning==="function")n.emitWarning(t);else console.warn(t)}}t.debug=debug;t.warn=warn},4065:(e,t,r)=>{var n=r(1596);var s=r(204);var A=r(1127);var a=r(6673);var c=r(4043);class Alias extends a.NodeBase{constructor(e){super(A.ALIAS);this.source=e;Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let r;if(t?.aliasResolveCache){r=t.aliasResolveCache}else{r=[];s.visit(e,{Node:(e,t)=>{if(A.isAlias(t)||A.hasAnchor(t))r.push(t)}});if(t)t.aliasResolveCache=r}let n=undefined;for(const e of r){if(e===this)break;if(e.anchor===this.source)n=e}return n}toJSON(e,t){if(!t)return{source:this.source};const{anchors:r,doc:n,maxAliasCount:s}=t;const A=this.resolve(n,t);if(!A){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let a=r.get(A);if(!a){c.toJS(A,null,t);a=r.get(A)}if(!a||a.res===undefined){const e="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(e)}if(s>=0){a.count+=1;if(a.aliasCount===0)a.aliasCount=getAliasCount(n,A,r);if(a.count*a.aliasCount>s){const e="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(e)}}return a.res}toString(e,t,r){const s=`*${this.source}`;if(e){n.anchorIsValid(this.source);if(e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${s} `}return s}}function getAliasCount(e,t,r){if(A.isAlias(t)){const n=t.resolve(e);const s=r&&n&&r.get(n);return s?s.count*s.aliasCount:0}else if(A.isCollection(t)){let n=0;for(const s of t.items){const t=getAliasCount(e,s,r);if(t>n)n=t}return n}else if(A.isPair(t)){const n=getAliasCount(e,t.key,r);const s=getAliasCount(e,t.value,r);return Math.max(n,s)}return 1}t.Alias=Alias},101:(e,t,r)=>{var n=r(2404);var s=r(1127);var A=r(6673);function collectionFromPath(e,t,r){let s=r;for(let e=t.length-1;e>=0;--e){const r=t[e];if(typeof r==="number"&&Number.isInteger(r)&&r>=0){const e=[];e[r]=s;s=e}else{s=new Map([[r,s]])}}return n.createNode(s,undefined,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const isEmptyPath=e=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done;class Collection extends A.NodeBase{constructor(e,t){super(e);Object.defineProperty(this,"schema",{value:t,configurable:true,enumerable:false,writable:true})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)t.schema=e;t.items=t.items.map((t=>s.isNode(t)||s.isPair(t)?t.clone(e):t));if(this.range)t.range=this.range.slice();return t}addIn(e,t){if(isEmptyPath(e))this.add(t);else{const[r,...n]=e;const A=this.get(r,true);if(s.isCollection(A))A.addIn(n,t);else if(A===undefined&&this.schema)this.set(r,collectionFromPath(this.schema,n,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}deleteIn(e){const[t,...r]=e;if(r.length===0)return this.delete(t);const n=this.get(t,true);if(s.isCollection(n))return n.deleteIn(r);else throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...n]=e;const A=this.get(r,true);if(n.length===0)return!t&&s.isScalar(A)?A.value:A;else return s.isCollection(A)?A.getIn(n,t):undefined}hasAllNullValues(e){return this.items.every((t=>{if(!s.isPair(t))return false;const r=t.value;return r==null||e&&s.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag}))}hasIn(e){const[t,...r]=e;if(r.length===0)return this.has(t);const n=this.get(t,true);return s.isCollection(n)?n.hasIn(r):false}setIn(e,t){const[r,...n]=e;if(n.length===0){this.set(r,t)}else{const e=this.get(r,true);if(s.isCollection(e))e.setIn(n,t);else if(e===undefined&&this.schema)this.set(r,collectionFromPath(this.schema,n,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}}t.Collection=Collection;t.collectionFromPath=collectionFromPath;t.isEmptyPath=isEmptyPath},6673:(e,t,r)=>{var n=r(3661);var s=r(1127);var A=r(4043);class NodeBase{constructor(e){Object.defineProperty(this,s.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:a,reviver:c}={}){if(!s.isDocument(e))throw new TypeError("A document argument is required");const l={anchors:new Map,doc:e,keep:true,mapAsMap:t===true,mapKeyWarned:false,maxAliasCount:typeof r==="number"?r:100};const u=A.toJS(this,"",l);if(typeof a==="function")for(const{count:e,res:t}of l.anchors.values())a(t,e);return typeof c==="function"?n.applyReviver(c,{"":u},"",u):u}}t.NodeBase=NodeBase},7165:(e,t,r)=>{var n=r(2404);var s=r(9748);var A=r(7104);var a=r(1127);function createPair(e,t,r){const s=n.createNode(e,undefined,r);const A=n.createNode(t,undefined,r);return new Pair(s,A)}class Pair{constructor(e,t=null){Object.defineProperty(this,a.NODE_TYPE,{value:a.PAIR});this.key=e;this.value=t}clone(e){let{key:t,value:r}=this;if(a.isNode(t))t=t.clone(e);if(a.isNode(r))r=r.clone(e);return new Pair(t,r)}toJSON(e,t){const r=t?.mapAsMap?new Map:{};return A.addPairToJSMap(t,r,this)}toString(e,t,r){return e?.doc?s.stringifyPair(this,e,t,r):JSON.stringify(this)}}t.Pair=Pair;t.createPair=createPair},3301:(e,t,r)=>{var n=r(1127);var s=r(6673);var A=r(4043);const isScalarValue=e=>!e||typeof e!=="function"&&typeof e!=="object";class Scalar extends s.NodeBase{constructor(e){super(n.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:A.toJS(this.value,e,t)}toString(){return String(this.value)}}Scalar.BLOCK_FOLDED="BLOCK_FOLDED";Scalar.BLOCK_LITERAL="BLOCK_LITERAL";Scalar.PLAIN="PLAIN";Scalar.QUOTE_DOUBLE="QUOTE_DOUBLE";Scalar.QUOTE_SINGLE="QUOTE_SINGLE";t.Scalar=Scalar;t.isScalarValue=isScalarValue},4454:(e,t,r)=>{var n=r(1212);var s=r(7104);var A=r(101);var a=r(1127);var c=r(7165);var l=r(3301);function findPair(e,t){const r=a.isScalar(t)?t.value:t;for(const n of e){if(a.isPair(n)){if(n.key===t||n.key===r)return n;if(a.isScalar(n.key)&&n.key.value===r)return n}}return undefined}class YAMLMap extends A.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(a.MAP,e);this.items=[]}static from(e,t,r){const{keepUndefined:n,replacer:s}=r;const A=new this(e);const add=(e,a)=>{if(typeof s==="function")a=s.call(t,e,a);else if(Array.isArray(s)&&!s.includes(e))return;if(a!==undefined||n)A.items.push(c.createPair(e,a,r))};if(t instanceof Map){for(const[e,r]of t)add(e,r)}else if(t&&typeof t==="object"){for(const e of Object.keys(t))add(e,t[e])}if(typeof e.sortMapEntries==="function"){A.items.sort(e.sortMapEntries)}return A}add(e,t){let r;if(a.isPair(e))r=e;else if(!e||typeof e!=="object"||!("key"in e)){r=new c.Pair(e,e?.value)}else r=new c.Pair(e.key,e.value);const n=findPair(this.items,r.key);const s=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${r.key} already set`);if(a.isScalar(n.value)&&l.isScalarValue(r.value))n.value.value=r.value;else n.value=r.value}else if(s){const e=this.items.findIndex((e=>s(r,e)<0));if(e===-1)this.items.push(r);else this.items.splice(e,0,r)}else{this.items.push(r)}}delete(e){const t=findPair(this.items,e);if(!t)return false;const r=this.items.splice(this.items.indexOf(t),1);return r.length>0}get(e,t){const r=findPair(this.items,e);const n=r?.value;return(!t&&a.isScalar(n)?n.value:n)??undefined}has(e){return!!findPair(this.items,e)}set(e,t){this.add(new c.Pair(e,t),true)}toJSON(e,t,r){const n=r?new r:t?.mapAsMap?new Map:{};if(t?.onCreate)t.onCreate(n);for(const e of this.items)s.addPairToJSMap(t,n,e);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const e of this.items){if(!a.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`)}if(!e.allNullValues&&this.hasAllNullValues(false))e=Object.assign({},e,{allNullValues:true});return n.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}t.YAMLMap=YAMLMap;t.findPair=findPair},2223:(e,t,r)=>{var n=r(2404);var s=r(1212);var A=r(101);var a=r(1127);var c=r(3301);var l=r(4043);class YAMLSeq extends A.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(a.SEQ,e);this.items=[]}add(e){this.items.push(e)}delete(e){const t=asItemIndex(e);if(typeof t!=="number")return false;const r=this.items.splice(t,1);return r.length>0}get(e,t){const r=asItemIndex(e);if(typeof r!=="number")return undefined;const n=this.items[r];return!t&&a.isScalar(n)?n.value:n}has(e){const t=asItemIndex(e);return typeof t==="number"&&t=0?t:null}t.YAMLSeq=YAMLSeq},7104:(e,t,r)=>{var n=r(7249);var s=r(452);var A=r(2148);var a=r(1127);var c=r(4043);function addPairToJSMap(e,t,{key:r,value:n}){if(a.isNode(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(s.isMergeKey(e,r))s.addMergeToJSMap(e,t,n);else{const s=c.toJS(r,"",e);if(t instanceof Map){t.set(s,c.toJS(n,s,e))}else if(t instanceof Set){t.add(s)}else{const A=stringifyKey(r,s,e);const a=c.toJS(n,A,e);if(A in t)Object.defineProperty(t,A,{value:a,writable:true,enumerable:true,configurable:true});else t[A]=a}}return t}function stringifyKey(e,t,r){if(t===null)return"";if(typeof t!=="object")return String(t);if(a.isNode(e)&&r?.doc){const t=A.createStringifyContext(r.doc,{});t.anchors=new Set;for(const e of r.anchors.keys())t.anchors.add(e.anchor);t.inFlow=true;t.inStringifyKey=true;const s=e.toString(t);if(!r.mapKeyWarned){let e=JSON.stringify(s);if(e.length>40)e=e.substring(0,36)+'..."';n.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`);r.mapKeyWarned=true}return s}return JSON.stringify(t)}t.addPairToJSMap=addPairToJSMap},1127:(e,t)=>{const r=Symbol.for("yaml.alias");const n=Symbol.for("yaml.document");const s=Symbol.for("yaml.map");const A=Symbol.for("yaml.pair");const a=Symbol.for("yaml.scalar");const c=Symbol.for("yaml.seq");const l=Symbol.for("yaml.node.type");const isAlias=e=>!!e&&typeof e==="object"&&e[l]===r;const isDocument=e=>!!e&&typeof e==="object"&&e[l]===n;const isMap=e=>!!e&&typeof e==="object"&&e[l]===s;const isPair=e=>!!e&&typeof e==="object"&&e[l]===A;const isScalar=e=>!!e&&typeof e==="object"&&e[l]===a;const isSeq=e=>!!e&&typeof e==="object"&&e[l]===c;function isCollection(e){if(e&&typeof e==="object")switch(e[l]){case s:case c:return true}return false}function isNode(e){if(e&&typeof e==="object")switch(e[l]){case r:case s:case a:case c:return true}return false}const hasAnchor=e=>(isScalar(e)||isCollection(e))&&!!e.anchor;t.ALIAS=r;t.DOC=n;t.MAP=s;t.NODE_TYPE=l;t.PAIR=A;t.SCALAR=a;t.SEQ=c;t.hasAnchor=hasAnchor;t.isAlias=isAlias;t.isCollection=isCollection;t.isDocument=isDocument;t.isMap=isMap;t.isNode=isNode;t.isPair=isPair;t.isScalar=isScalar;t.isSeq=isSeq},4043:(e,t,r)=>{var n=r(1127);function toJS(e,t,r){if(Array.isArray(e))return e.map(((e,t)=>toJS(e,String(t),r)));if(e&&typeof e.toJSON==="function"){if(!r||!n.hasAnchor(e))return e.toJSON(t,r);const s={aliasCount:0,count:1,res:undefined};r.anchors.set(e,s);r.onCreate=e=>{s.res=e;delete r.onCreate};const A=e.toJSON(t,r);if(r.onCreate)r.onCreate(A);return A}if(typeof e==="bigint"&&!r?.keep)return Number(e);return e}t.toJS=toJS},110:(e,t,r)=>{var n=r(8913);var s=r(6842);var A=r(1464);var a=r(3069);function resolveAsScalar(e,t=true,r){if(e){const _onError=(e,t,n)=>{const s=typeof e==="number"?e:Array.isArray(e)?e[0]:e.offset;if(r)r(s,t,n);else throw new A.YAMLParseError([s,s+1],t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return s.resolveFlowScalar(e,t,_onError);case"block-scalar":return n.resolveBlockScalar({options:{strict:t}},e,_onError)}}return null}function createScalarToken(e,t){const{implicitKey:r=false,indent:n,inFlow:s=false,offset:A=-1,type:c="PLAIN"}=t;const l=a.stringifyString({type:c,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:s,options:{blockQuote:true,lineWidth:-1}});const u=t.end??[{type:"newline",offset:-1,indent:n,source:"\n"}];switch(l[0]){case"|":case">":{const e=l.indexOf("\n");const t=l.substring(0,e);const r=l.substring(e+1)+"\n";const s=[{type:"block-scalar-header",offset:A,indent:n,source:t}];if(!addEndtoBlockProps(s,u))s.push({type:"newline",offset:-1,indent:n,source:"\n"});return{type:"block-scalar",offset:A,indent:n,props:s,source:r}}case'"':return{type:"double-quoted-scalar",offset:A,indent:n,source:l,end:u};case"'":return{type:"single-quoted-scalar",offset:A,indent:n,source:l,end:u};default:return{type:"scalar",offset:A,indent:n,source:l,end:u}}}function setScalarValue(e,t,r={}){let{afterKey:n=false,implicitKey:s=false,inFlow:A=false,type:c}=r;let l="indent"in e?e.indent:null;if(n&&typeof l==="number")l+=2;if(!c)switch(e.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if(t.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=t.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const u=a.stringifyString({type:c,value:t},{implicitKey:s||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:A,options:{blockQuote:true,lineWidth:-1}});switch(u[0]){case"|":case">":setBlockScalarValue(e,u);break;case'"':setFlowScalarValue(e,u,"double-quoted-scalar");break;case"'":setFlowScalarValue(e,u,"single-quoted-scalar");break;default:setFlowScalarValue(e,u,"scalar")}}function setBlockScalarValue(e,t){const r=t.indexOf("\n");const n=t.substring(0,r);const s=t.substring(r+1)+"\n";if(e.type==="block-scalar"){const t=e.props[0];if(t.type!=="block-scalar-header")throw new Error("Invalid block scalar header");t.source=n;e.source=s}else{const{offset:t}=e;const r="indent"in e?e.indent:-1;const A=[{type:"block-scalar-header",offset:t,indent:r,source:n}];if(!addEndtoBlockProps(A,"end"in e?e.end:undefined))A.push({type:"newline",offset:-1,indent:r,source:"\n"});for(const t of Object.keys(e))if(t!=="type"&&t!=="offset")delete e[t];Object.assign(e,{type:"block-scalar",indent:r,props:A,source:s})}}function addEndtoBlockProps(e,t){if(t)for(const r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":e.push(r);return true}return false}function setFlowScalarValue(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r;e.source=t;break;case"block-scalar":{const n=e.props.slice(1);let s=t.length;if(e.props[0].type==="block-scalar-header")s-=e.props[0].source.length;for(const e of n)e.offset+=s;delete e.props;Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{const n=e.offset+t.length;const s={type:"newline",offset:n,indent:e.indent,source:"\n"};delete e.items;Object.assign(e,{type:r,source:t,end:[s]});break}default:{const n="indent"in e?e.indent:-1;const s="end"in e&&Array.isArray(e.end)?e.end.filter((e=>e.type==="space"||e.type==="comment"||e.type==="newline")):[];for(const t of Object.keys(e))if(t!=="type"&&t!=="offset")delete e[t];Object.assign(e,{type:r,indent:n,source:t,end:s})}}}t.createScalarToken=createScalarToken;t.resolveAsScalar=resolveAsScalar;t.setScalarValue=setScalarValue},1733:(e,t)=>{const stringify=e=>"type"in e?stringifyToken(e):stringifyItem(e);function stringifyToken(e){switch(e.type){case"block-scalar":{let t="";for(const r of e.props)t+=stringifyToken(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(const r of e.items)t+=stringifyItem(r);return t}case"flow-collection":{let t=e.start.source;for(const r of e.items)t+=stringifyItem(r);for(const r of e.end)t+=r.source;return t}case"document":{let t=stringifyItem(e);if(e.end)for(const r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const r of e.end)t+=r.source;return t}}}function stringifyItem({start:e,key:t,sep:r,value:n}){let s="";for(const t of e)s+=t.source;if(t)s+=stringifyToken(t);if(r)for(const e of r)s+=e.source;if(n)s+=stringifyToken(n);return s}t.stringify=stringify},7715:(e,t)=>{const r=Symbol("break visit");const n=Symbol("skip children");const s=Symbol("remove item");function visit(e,t){if("type"in e&&e.type==="document")e={start:e.start,value:e.value};_visit(Object.freeze([]),e,t)}visit.BREAK=r;visit.SKIP=n;visit.REMOVE=s;visit.itemAtPath=(e,t)=>{let r=e;for(const[e,n]of t){const t=r?.[e];if(t&&"items"in t){r=t.items[n]}else return undefined}return r};visit.parentCollection=(e,t)=>{const r=visit.itemAtPath(e,t.slice(0,-1));const n=t[t.length-1][0];const s=r?.[n];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function _visit(e,t,n){let A=n(t,e);if(typeof A==="symbol")return A;for(const a of["key","value"]){const c=t[a];if(c&&"items"in c){for(let t=0;t{var n=r(110);var s=r(1733);var A=r(7715);const a="\ufeff";const c="";const l="";const u="";const isCollection=e=>!!e&&"items"in e;const isScalar=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function prettyToken(e){switch(e){case a:return"";case c:return"";case l:return"";case u:return"";default:return JSON.stringify(e)}}function tokenType(e){switch(e){case a:return"byte-order-mark";case c:return"doc-mode";case l:return"flow-error-end";case u:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}t.createScalarToken=n.createScalarToken;t.resolveAsScalar=n.resolveAsScalar;t.setScalarValue=n.setScalarValue;t.stringify=s.stringify;t.visit=A.visit;t.BOM=a;t.DOCUMENT=c;t.FLOW_END=l;t.SCALAR=u;t.isCollection=isCollection;t.isScalar=isScalar;t.prettyToken=prettyToken;t.tokenType=tokenType},361:(e,t,r)=>{var n=r(3461);function isEmpty(e){switch(e){case undefined:case" ":case"\n":case"\r":case"\t":return true;default:return false}}const s=new Set("0123456789ABCDEFabcdef");const A=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");const a=new Set(",[]{}");const c=new Set(" ,[]{}\n\r\t");const isNotAnchorChar=e=>!e||c.has(e);class Lexer{constructor(){this.atEnd=false;this.blockScalarIndent=-1;this.blockScalarKeep=false;this.buffer="";this.flowKey=false;this.flowLevel=0;this.indentNext=0;this.indentValue=0;this.lineEndPos=null;this.next=null;this.pos=0}*lex(e,t=false){if(e){if(typeof e!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e;this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";while(r&&(t||this.hasChars(1)))r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos;let t=this.buffer[e];while(t===" "||t==="\t")t=this.buffer[++e];if(!t||t==="#"||t==="\n")return true;if(t==="\r")return this.buffer[e+1]==="\n";return false}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;while(t===" ")t=this.buffer[++r+e];if(t==="\r"){const t=this.buffer[r+e+1];if(t==="\n"||!t&&!this.atEnd)return e+r+1}return t==="\n"||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){const t=this.buffer.substr(e,3);if((t==="---"||t==="...")&&isEmpty(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;if(typeof e!=="number"||e!==-1&&ethis.indentValue&&!isEmpty(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&isEmpty(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(true));this.indentNext=this.indentValue+1;this.indentValue+=e;return yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(true);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case undefined:yield*this.pushNewline();return yield*this.parseLineStart();case"{":case"[":yield*this.pushCount(1);this.flowKey=false;this.flowLevel=1;return"flow";case"}":case"]":yield*this.pushCount(1);return"doc";case"*":yield*this.pushUntil(isNotAnchorChar);return"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":t+=(yield*this.parseBlockScalarHeader());t+=(yield*this.pushSpaces(true));yield*this.pushCount(e.length-t);yield*this.pushNewline();return yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t;let r=-1;do{e=yield*this.pushNewline();if(e>0){t=yield*this.pushSpaces(false);this.indentValue=r=t}else{t=0}t+=(yield*this.pushSpaces(true))}while(e+t>0);const s=this.getLine();if(s===null)return this.setNext("flow");if(r!==-1&&r"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil((e=>isEmpty(e)||e==="#"))}*parseBlockScalar(){let e=this.pos-1;let t=0;let r;e:for(let n=this.pos;r=this.buffer[n];++n){switch(r){case" ":t+=1;break;case"\n":e=n;t=0;break;case"\r":{const e=this.buffer[n+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if(e==="\n")break}default:break e}}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=t;else{this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext)}do{const t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf("\n",t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let s=e+1;r=this.buffer[s];while(r===" ")r=this.buffer[++s];if(r==="\t"){while(r==="\t"||r===" "||r==="\r"||r==="\n")r=this.buffer[++s];e=s-1}else if(!this.blockScalarKeep){do{let r=e-1;let n=this.buffer[r];if(n==="\r")n=this.buffer[--r];const s=r;while(n===" ")n=this.buffer[--r];if(n==="\n"&&r>=this.pos&&r+1+t>s)e=r;else break}while(true)}yield n.SCALAR;yield*this.pushToIndex(e+1,true);return yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1;let r=this.pos-1;let s;while(s=this.buffer[++r]){if(s===":"){const n=this.buffer[r+1];if(isEmpty(n)||e&&a.has(n))break;t=r}else if(isEmpty(s)){let n=this.buffer[r+1];if(s==="\r"){if(n==="\n"){r+=1;s="\n";n=this.buffer[r+1]}else t=r}if(n==="#"||e&&a.has(n))break;if(s==="\n"){const e=this.continueScalar(r+1);if(e===-1)break;r=Math.max(r,e-2)}}else{if(e&&a.has(s))break;t=r}}if(!s&&!this.atEnd)return this.setNext("plain-scalar");yield n.SCALAR;yield*this.pushToIndex(t+1,true);return e?"flow":"doc"}*pushCount(e){if(e>0){yield this.buffer.substr(this.pos,e);this.pos+=e;return e}return 0}*pushToIndex(e,t){const r=this.buffer.slice(this.pos,e);if(r){yield r;this.pos+=r.length;return r.length}else if(t)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(true))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(isNotAnchorChar))+(yield*this.pushSpaces(true))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0;const t=this.charAt(1);if(isEmpty(t)||e&&a.has(t)){if(!e)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=false;return(yield*this.pushCount(1))+(yield*this.pushSpaces(true))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2;let t=this.buffer[e];while(!isEmpty(t)&&t!==">")t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,false)}else{let e=this.pos+1;let t=this.buffer[e];while(t){if(A.has(t))t=this.buffer[++e];else if(t==="%"&&s.has(this.buffer[e+1])&&s.has(this.buffer[e+2])){t=this.buffer[e+=3]}else break}return yield*this.pushToIndex(e,false)}}*pushNewline(){const e=this.buffer[this.pos];if(e==="\n")return yield*this.pushCount(1);else if(e==="\r"&&this.charAt(1)==="\n")return yield*this.pushCount(2);else return 0}*pushSpaces(e){let t=this.pos-1;let r;do{r=this.buffer[++t]}while(r===" "||e&&r==="\t");const n=t-this.pos;if(n>0){yield this.buffer.substr(this.pos,n);this.pos=t}return n}*pushUntil(e){let t=this.pos;let r=this.buffer[t];while(!e(r))r=this.buffer[++t];return yield*this.pushToIndex(t,false)}}t.Lexer=Lexer},6628:(e,t)=>{class LineCounter{constructor(){this.lineStarts=[];this.addNewLine=e=>this.lineStarts.push(e);this.linePos=e=>{let t=0;let r=this.lineStarts.length;while(t>1;if(this.lineStarts[n]{var n=r(932);var s=r(3461);var A=r(361);function includesToken(e,t){for(let r=0;r=0){switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}}while(e[++t]?.type==="space"){}return e.splice(t,e.length)}function fixFlowSeqItems(e){if(e.start.type==="flow-seq-start"){for(const t of e.items){if(t.sep&&!t.value&&!includesToken(t.start,"explicit-key-ind")&&!includesToken(t.sep,"map-value-ind")){if(t.key)t.value=t.key;delete t.key;if(isFlowToken(t.value)){if(t.value.end)Array.prototype.push.apply(t.value.end,t.sep);else t.value.end=t.sep}else Array.prototype.push.apply(t.start,t.sep);delete t.sep}}}}class Parser{constructor(e){this.atNewLine=true;this.atScalar=false;this.indent=0;this.offset=0;this.onKeyLine=false;this.stack=[];this.source="";this.type="";this.lexer=new A.Lexer;this.onNewLine=e}*parse(e,t=false){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(const r of this.lexer.lex(e,t))yield*this.next(r);if(!t)yield*this.end()}*next(e){this.source=e;if(n.env.LOG_TOKENS)console.log("|",s.prettyToken(e));if(this.atScalar){this.atScalar=false;yield*this.step();this.offset+=e.length;return}const t=s.tokenType(e);if(!t){const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e});this.offset+=e.length}else if(t==="scalar"){this.atNewLine=false;this.atScalar=true;this.type="scalar"}else{this.type=t;yield*this.step();switch(t){case"newline":this.atNewLine=true;this.indent=0;if(this.onNewLine)this.onNewLine(this.offset+e.length);break;case"space":if(this.atNewLine&&e[0]===" ")this.indent+=e.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=e.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=false}this.offset+=e.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){const e={type:this.type,offset:this.offset,indent:this.indent,source:this.source};return e}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t){const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}else if(this.stack.length===0){yield t}else{const e=this.peek(1);if(t.type==="block-scalar"){t.indent="indent"in e?e.indent:0}else if(t.type==="flow-collection"&&e.type==="document"){t.indent=0}if(t.type==="flow-collection")fixFlowSeqItems(t);switch(e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const r=e.items[e.items.length-1];if(r.value){e.items.push({start:[],key:t,sep:[]});this.onKeyLine=true;return}else if(r.sep){r.value=t}else{Object.assign(r,{key:t,sep:[]});this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{const r=e.items[e.items.length-1];if(r.value)e.items.push({start:[],value:t});else r.value=t;break}case"flow-collection":{const r=e.items[e.items.length-1];if(!r||r.value)e.items.push({start:[],key:t,sep:[]});else if(r.sep)r.value=t;else Object.assign(r,{key:t,sep:[]});return}default:yield*this.pop();yield*this.pop(t)}if((e.type==="document"||e.type==="block-map"||e.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const r=t.items[t.items.length-1];if(r&&!r.sep&&!r.value&&r.start.length>0&&findNonEmptyIndex(r.start)===-1&&(t.indent===0||r.start.every((e=>e.type!=="comment"||e.indent=e.indent){const r=!this.onKeyLine&&this.indent===e.indent;const n=r&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let s=[];if(n&&t.sep&&!t.value){const r=[];for(let n=0;ne.indent)r.length=0;break;default:r.length=0}}if(r.length>=2)s=t.sep.splice(r[1])}switch(this.type){case"anchor":case"tag":if(n||t.value){s.push(this.sourceToken);e.items.push({start:s});this.onKeyLine=true}else if(t.sep){t.sep.push(this.sourceToken)}else{t.start.push(this.sourceToken)}return;case"explicit-key-ind":if(!t.sep&&!t.explicitKey){t.start.push(this.sourceToken);t.explicitKey=true}else if(n||t.value){s.push(this.sourceToken);e.items.push({start:s,explicitKey:true})}else{this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:true}]})}this.onKeyLine=true;return;case"map-value-ind":if(t.explicitKey){if(!t.sep){if(includesToken(t.start,"newline")){Object.assign(t,{key:null,sep:[this.sourceToken]})}else{const e=getFirstKeyStartProps(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value){e.items.push({start:[],key:null,sep:[this.sourceToken]})}else if(includesToken(t.sep,"map-value-ind")){this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else if(isFlowToken(t.key)&&!includesToken(t.sep,"newline")){const e=getFirstKeyStartProps(t.start);const r=t.key;const n=t.sep;n.push(this.sourceToken);delete t.key;delete t.sep;this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:r,sep:n}]})}else if(s.length>0){t.sep=t.sep.concat(s,this.sourceToken)}else{t.sep.push(this.sourceToken)}}else{if(!t.sep){Object.assign(t,{key:null,sep:[this.sourceToken]})}else if(t.value||n){e.items.push({start:s,key:null,sep:[this.sourceToken]})}else if(includesToken(t.sep,"map-value-ind")){this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]})}else{t.sep.push(this.sourceToken)}}this.onKeyLine=true;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);if(n||t.value){e.items.push({start:s,key:r,sep:[]});this.onKeyLine=true}else if(t.sep){this.stack.push(r)}else{Object.assign(t,{key:r,sep:[]});this.onKeyLine=true}return}default:{const n=this.startBlockValue(e);if(n){if(n.type==="block-seq"){if(!t.explicitKey&&t.sep&&!includesToken(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(r){e.items.push({start:s})}this.stack.push(n);return}}}}yield*this.pop();yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const r="end"in t.value?t.value.end:undefined;const n=Array.isArray(r)?r[r.length-1]:undefined;if(n?.type==="comment")r?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2];const n=r?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start);n.push(this.sourceToken);e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;if(t.value||includesToken(t.start,"seq-item-ind"))e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop();yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let e;do{yield*this.pop();e=this.peek(1)}while(e&&e.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!t||t.sep)e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return;case"map-value-ind":if(!t||t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!t||t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);if(!t||t.value)e.items.push({start:[],key:r,sep:[]});else if(t.sep)this.stack.push(r);else Object.assign(t,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const r=this.startBlockValue(e);if(r)this.stack.push(r);else{yield*this.pop();yield*this.step()}}else{const t=this.peek(2);if(t.type==="block-map"&&(this.type==="map-value-ind"&&t.indent===e.indent||this.type==="newline"&&!t.items[t.items.length-1].sep)){yield*this.pop();yield*this.step()}else if(this.type==="map-value-ind"&&t.type!=="flow-collection"){const r=getPrevProps(t);const n=getFirstKeyStartProps(r);fixFlowSeqItems(e);const s=e.end.splice(1,e.end.length);s.push(this.sourceToken);const A={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:s}]};this.onKeyLine=true;this.stack[this.stack.length-1]=A}else{yield*this.lineEnd(e)}}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;while(e!==0){this.onNewLine(this.offset+e);e=this.source.indexOf("\n",e)+1}}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=true;const t=getPrevProps(e);const r=getFirstKeyStartProps(t);r.push(this.sourceToken);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:true}]}}case"map-value-ind":{this.onKeyLine=true;const t=getPrevProps(e);const r=getFirstKeyStartProps(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){if(this.type!=="comment")return false;if(this.indent<=t)return false;return e.every((e=>e.type==="newline"||e.type==="space"))}*documentEnd(e){if(this.type!=="doc-mode"){if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop();yield*this.step();break;case"newline":this.onKeyLine=false;case"space":case"comment":default:if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}t.Parser=Parser},4047:(e,t,r)=>{var n=r(9984);var s=r(3021);var A=r(1464);var a=r(7249);var c=r(1127);var l=r(6628);var u=r(3456);function parseOptions(e){const t=e.prettyErrors!==false;const r=e.lineCounter||t&&new l.LineCounter||null;return{lineCounter:r,prettyErrors:t}}function parseAllDocuments(e,t={}){const{lineCounter:r,prettyErrors:s}=parseOptions(t);const a=new u.Parser(r?.addNewLine);const c=new n.Composer(t);const l=Array.from(c.compose(a.parse(e)));if(s&&r)for(const t of l){t.errors.forEach(A.prettifyError(e,r));t.warnings.forEach(A.prettifyError(e,r))}if(l.length>0)return l;return Object.assign([],{empty:true},c.streamInfo())}function parseDocument(e,t={}){const{lineCounter:r,prettyErrors:s}=parseOptions(t);const a=new u.Parser(r?.addNewLine);const c=new n.Composer(t);let l=null;for(const t of c.compose(a.parse(e),true,e.length)){if(!l)l=t;else if(l.options.logLevel!=="silent"){l.errors.push(new A.YAMLParseError(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}if(s&&r){l.errors.forEach(A.prettifyError(e,r));l.warnings.forEach(A.prettifyError(e,r))}return l}function parse(e,t,r){let n=undefined;if(typeof t==="function"){n=t}else if(r===undefined&&t&&typeof t==="object"){r=t}const s=parseDocument(e,r);if(!s)return null;s.warnings.forEach((e=>a.warn(s.options.logLevel,e)));if(s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];else s.errors=[]}return s.toJS(Object.assign({reviver:n},r))}function stringify(e,t,r){let n=null;if(typeof t==="function"||Array.isArray(t)){n=t}else if(r===undefined&&t){r=t}if(typeof r==="string")r=r.length;if(typeof r==="number"){const e=Math.round(r);r=e<1?undefined:e>8?{indent:8}:{indent:e}}if(e===undefined){const{keepUndefined:e}=r??t??{};if(!e)return undefined}if(c.isDocument(e)&&!n)return e.toString(r);return new s.Document(e,n,r).toString(r)}t.parse=parse;t.parseAllDocuments=parseAllDocuments;t.parseDocument=parseDocument;t.stringify=stringify},5840:(e,t,r)=>{var n=r(1127);var s=r(7451);var A=r(1706);var a=r(6464);var c=r(18);const sortMapEntriesByKey=(e,t)=>e.keyt.key?1:0;class Schema{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:l,schema:u,sortMapEntries:h,toStringDefaults:g}){this.compat=Array.isArray(e)?c.getTags(e,"compat"):e?c.getTags(null,e):null;this.name=typeof u==="string"&&u||"core";this.knownTags=l?c.coreKnownTags:{};this.tags=c.getTags(t,this.name,r);this.toStringOptions=g??null;Object.defineProperty(this,n.MAP,{value:s.map});Object.defineProperty(this,n.SCALAR,{value:a.string});Object.defineProperty(this,n.SEQ,{value:A.seq});this.sortMapEntries=typeof h==="function"?h:h===true?sortMapEntriesByKey:null}clone(){const e=Object.create(Schema.prototype,Object.getOwnPropertyDescriptors(this));e.tags=this.tags.slice();return e}}t.Schema=Schema},7451:(e,t,r)=>{var n=r(1127);var s=r(4454);const A={collection:"map",default:true,nodeClass:s.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){if(!n.isMap(e))t("Expected a mapping for this tag");return e},createNode:(e,t,r)=>s.YAMLMap.from(e,t,r)};t.map=A},3632:(e,t,r)=>{var n=r(3301);const s={identify:e=>e==null,createNode:()=>new n.Scalar(null),default:true,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new n.Scalar(null),stringify:({source:e},t)=>typeof e==="string"&&s.test.test(e)?e:t.options.nullStr};t.nullTag=s},1706:(e,t,r)=>{var n=r(1127);var s=r(2223);const A={collection:"seq",default:true,nodeClass:s.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){if(!n.isSeq(e))t("Expected a sequence for this tag");return e},createNode:(e,t,r)=>s.YAMLSeq.from(e,t,r)};t.seq=A},6464:(e,t,r)=>{var n=r(3069);const s={identify:e=>typeof e==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,r,s){t=Object.assign({actualString:true},t);return n.stringifyString(e,t,r,s)}};t.string=s},3959:(e,t,r)=>{var n=r(3301);const s={identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new n.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&s.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?r.options.trueStr:r.options.falseStr}};t.boolTag=s},8405:(e,t,r)=>{var n=r(3301);var s=r(8689);const A={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber};const a={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():s.stringifyNumber(e)}};const c={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new n.Scalar(parseFloat(e));const r=e.indexOf(".");if(r!==-1&&e[e.length-1]==="0")t.minFractionDigits=e.length-r-1;return t},stringify:s.stringifyNumber};t.float=c;t.floatExp=a;t.floatNaN=A},9874:(e,t,r)=>{var n=r(8689);const intIdentify=e=>typeof e==="bigint"||Number.isInteger(e);const intResolve=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function intStringify(e,t,r){const{value:s}=e;if(intIdentify(s)&&s>=0)return r+s.toString(t);return n.stringifyNumber(e)}const s={identify:e=>intIdentify(e)&&e>=0,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>intResolve(e,2,8,r),stringify:e=>intStringify(e,8,"0o")};const A={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>intResolve(e,0,10,r),stringify:n.stringifyNumber};const a={identify:e=>intIdentify(e)&&e>=0,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>intResolve(e,2,16,r),stringify:e=>intStringify(e,16,"0x")};t.int=A;t.intHex=a;t.intOct=s},896:(e,t,r)=>{var n=r(7451);var s=r(3632);var A=r(1706);var a=r(6464);var c=r(3959);var l=r(8405);var u=r(9874);const h=[n.map,A.seq,a.string,s.nullTag,c.boolTag,u.intOct,u.int,u.intHex,l.floatNaN,l.floatExp,l.float];t.schema=h},3559:(e,t,r)=>{var n=r(3301);var s=r(7451);var A=r(1706);function intIdentify(e){return typeof e==="bigint"||Number.isInteger(e)}const stringifyJSON=({value:e})=>JSON.stringify(e);const a=[{identify:e=>typeof e==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:stringifyJSON},{identify:e=>e==null,createNode:()=>new n.Scalar(null),default:true,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:stringifyJSON},{identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:stringifyJSON},{identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>intIdentify(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:stringifyJSON}];const c={default:true,tag:"",test:/^/,resolve(e,t){t(`Unresolved plain scalar ${JSON.stringify(e)}`);return e}};const l=[s.map,A.seq].concat(a,c);t.schema=l},18:(e,t,r)=>{var n=r(7451);var s=r(3632);var A=r(1706);var a=r(6464);var c=r(3959);var l=r(8405);var u=r(9874);var h=r(896);var g=r(3559);var p=r(6083);var C=r(452);var y=r(303);var I=r(8385);var B=r(5913);var Q=r(1528);var b=r(6752);const w=new Map([["core",h.schema],["failsafe",[n.map,A.seq,a.string]],["json",g.schema],["yaml11",B.schema],["yaml-1.1",B.schema]]);const S={binary:p.binary,bool:c.boolTag,float:l.float,floatExp:l.floatExp,floatNaN:l.floatNaN,floatTime:b.floatTime,int:u.int,intHex:u.intHex,intOct:u.intOct,intTime:b.intTime,map:n.map,merge:C.merge,null:s.nullTag,omap:y.omap,pairs:I.pairs,seq:A.seq,set:Q.set,timestamp:b.timestamp};const k={"tag:yaml.org,2002:binary":p.binary,"tag:yaml.org,2002:merge":C.merge,"tag:yaml.org,2002:omap":y.omap,"tag:yaml.org,2002:pairs":I.pairs,"tag:yaml.org,2002:set":Q.set,"tag:yaml.org,2002:timestamp":b.timestamp};function getTags(e,t,r){const n=w.get(t);if(n&&!e){return r&&!n.includes(C.merge)?n.concat(C.merge):n.slice()}let s=n;if(!s){if(Array.isArray(e))s=[];else{const e=Array.from(w.keys()).filter((e=>e!=="yaml11")).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e)){for(const t of e)s=s.concat(t)}else if(typeof e==="function"){s=e(s.slice())}if(r)s=s.concat(C.merge);return s.reduce(((e,t)=>{const r=typeof t==="string"?S[t]:t;if(!r){const e=JSON.stringify(t);const r=Object.keys(S).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${r}`)}if(!e.includes(r))e.push(r);return e}),[])}t.coreKnownTags=k;t.getTags=getTags},6083:(e,t,r)=>{var n=r(181);var s=r(3301);var A=r(3069);const a={identify:e=>e instanceof Uint8Array,default:false,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof n.Buffer==="function"){return n.Buffer.from(e,"base64")}else if(typeof atob==="function"){const t=atob(e.replace(/[\n\r]/g,""));const r=new Uint8Array(t.length);for(let e=0;e{var n=r(3301);function boolStringify({value:e,source:t},r){const n=e?s:A;if(t&&n.test.test(t))return t;return e?r.options.trueStr:r.options.falseStr}const s={identify:e=>e===true,default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new n.Scalar(true),stringify:boolStringify};const A={identify:e=>e===false,default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new n.Scalar(false),stringify:boolStringify};t.falseTag=A;t.trueTag=s},5782:(e,t,r)=>{var n=r(3301);var s=r(8689);const A={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber};const a={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():s.stringifyNumber(e)}};const c={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new n.Scalar(parseFloat(e.replace(/_/g,"")));const r=e.indexOf(".");if(r!==-1){const n=e.substring(r+1).replace(/_/g,"");if(n[n.length-1]==="0")t.minFractionDigits=n.length}return t},stringify:s.stringifyNumber};t.float=c;t.floatExp=a;t.floatNaN=A},873:(e,t,r)=>{var n=r(8689);const intIdentify=e=>typeof e==="bigint"||Number.isInteger(e);function intResolve(e,t,r,{intAsBigInt:n}){const s=e[0];if(s==="-"||s==="+")t+=1;e=e.substring(t).replace(/_/g,"");if(n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const t=BigInt(e);return s==="-"?BigInt(-1)*t:t}const A=parseInt(e,r);return s==="-"?-1*A:A}function intStringify(e,t,r){const{value:s}=e;if(intIdentify(s)){const e=s.toString(t);return s<0?"-"+r+e.substr(1):r+e}return n.stringifyNumber(e)}const s={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>intResolve(e,2,2,r),stringify:e=>intStringify(e,2,"0b")};const A={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>intResolve(e,1,8,r),stringify:e=>intStringify(e,8,"0")};const a={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>intResolve(e,0,10,r),stringify:n.stringifyNumber};const c={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>intResolve(e,2,16,r),stringify:e=>intStringify(e,16,"0x")};t.int=a;t.intBin=s;t.intHex=c;t.intOct=A},452:(e,t,r)=>{var n=r(1127);var s=r(3301);const A="<<";const a={identify:e=>e===A||typeof e==="symbol"&&e.description===A,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new s.Scalar(Symbol(A)),{addToJSMap:addMergeToJSMap}),stringify:()=>A};const isMergeKey=(e,t)=>(a.identify(t)||n.isScalar(t)&&(!t.type||t.type===s.Scalar.PLAIN)&&a.identify(t.value))&&e?.doc.schema.tags.some((e=>e.tag===a.tag&&e.default));function addMergeToJSMap(e,t,r){r=e&&n.isAlias(r)?r.resolve(e.doc):r;if(n.isSeq(r))for(const n of r.items)mergeValue(e,t,n);else if(Array.isArray(r))for(const n of r)mergeValue(e,t,n);else mergeValue(e,t,r)}function mergeValue(e,t,r){const s=e&&n.isAlias(r)?r.resolve(e.doc):r;if(!n.isMap(s))throw new Error("Merge sources must be maps or map aliases");const A=s.toJSON(null,e,Map);for(const[e,r]of A){if(t instanceof Map){if(!t.has(e))t.set(e,r)}else if(t instanceof Set){t.add(e)}else if(!Object.prototype.hasOwnProperty.call(t,e)){Object.defineProperty(t,e,{value:r,writable:true,enumerable:true,configurable:true})}}return t}t.addMergeToJSMap=addMergeToJSMap;t.isMergeKey=isMergeKey;t.merge=a},303:(e,t,r)=>{var n=r(1127);var s=r(4043);var A=r(4454);var a=r(2223);var c=r(8385);class YAMLOMap extends a.YAMLSeq{constructor(){super();this.add=A.YAMLMap.prototype.add.bind(this);this.delete=A.YAMLMap.prototype.delete.bind(this);this.get=A.YAMLMap.prototype.get.bind(this);this.has=A.YAMLMap.prototype.has.bind(this);this.set=A.YAMLMap.prototype.set.bind(this);this.tag=YAMLOMap.tag}toJSON(e,t){if(!t)return super.toJSON(e);const r=new Map;if(t?.onCreate)t.onCreate(r);for(const e of this.items){let A,a;if(n.isPair(e)){A=s.toJS(e.key,"",t);a=s.toJS(e.value,A,t)}else{A=s.toJS(e,"",t)}if(r.has(A))throw new Error("Ordered maps must not include duplicate keys");r.set(A,a)}return r}static from(e,t,r){const n=c.createPairs(e,t,r);const s=new this;s.items=n.items;return s}}YAMLOMap.tag="tag:yaml.org,2002:omap";const l={collection:"seq",identify:e=>e instanceof Map,nodeClass:YAMLOMap,default:false,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=c.resolvePairs(e,t);const s=[];for(const{key:e}of r.items){if(n.isScalar(e)){if(s.includes(e.value)){t(`Ordered maps must not include duplicate keys: ${e.value}`)}else{s.push(e.value)}}}return Object.assign(new YAMLOMap,r)},createNode:(e,t,r)=>YAMLOMap.from(e,t,r)};t.YAMLOMap=YAMLOMap;t.omap=l},8385:(e,t,r)=>{var n=r(1127);var s=r(7165);var A=r(3301);var a=r(2223);function resolvePairs(e,t){if(n.isSeq(e)){for(let r=0;r1)t("Each pair must have its own sequence indicator");const e=a.items[0]||new s.Pair(new A.Scalar(null));if(a.commentBefore)e.key.commentBefore=e.key.commentBefore?`${a.commentBefore}\n${e.key.commentBefore}`:a.commentBefore;if(a.comment){const t=e.value??e.key;t.comment=t.comment?`${a.comment}\n${t.comment}`:a.comment}a=e}e.items[r]=n.isPair(a)?a:new s.Pair(a)}}else t("Expected a sequence for this tag");return e}function createPairs(e,t,r){const{replacer:n}=r;const A=new a.YAMLSeq(e);A.tag="tag:yaml.org,2002:pairs";let c=0;if(t&&Symbol.iterator in Object(t))for(let e of t){if(typeof n==="function")e=n.call(t,String(c++),e);let a,l;if(Array.isArray(e)){if(e.length===2){a=e[0];l=e[1]}else throw new TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){const t=Object.keys(e);if(t.length===1){a=t[0];l=e[a]}else{throw new TypeError(`Expected tuple with one key, not ${t.length} keys`)}}else{a=e}A.items.push(s.createPair(a,l,r))}return A}const c={collection:"seq",default:false,tag:"tag:yaml.org,2002:pairs",resolve:resolvePairs,createNode:createPairs};t.createPairs=createPairs;t.pairs=c;t.resolvePairs=resolvePairs},5913:(e,t,r)=>{var n=r(7451);var s=r(3632);var A=r(1706);var a=r(6464);var c=r(6083);var l=r(8398);var u=r(5782);var h=r(873);var g=r(452);var p=r(303);var C=r(8385);var y=r(1528);var I=r(6752);const B=[n.map,A.seq,a.string,s.nullTag,l.trueTag,l.falseTag,h.intBin,h.intOct,h.int,h.intHex,u.floatNaN,u.floatExp,u.float,c.binary,g.merge,p.omap,C.pairs,y.set,I.intTime,I.floatTime,I.timestamp];t.schema=B},1528:(e,t,r)=>{var n=r(1127);var s=r(7165);var A=r(4454);class YAMLSet extends A.YAMLMap{constructor(e){super(e);this.tag=YAMLSet.tag}add(e){let t;if(n.isPair(e))t=e;else if(e&&typeof e==="object"&&"key"in e&&"value"in e&&e.value===null)t=new s.Pair(e.key,null);else t=new s.Pair(e,null);const r=A.findPair(this.items,t.key);if(!r)this.items.push(t)}get(e,t){const r=A.findPair(this.items,e);return!t&&n.isPair(r)?n.isScalar(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!=="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const r=A.findPair(this.items,e);if(r&&!t){this.items.splice(this.items.indexOf(r),1)}else if(!r&&t){this.items.push(new s.Pair(e))}}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(true))return super.toString(Object.assign({},e,{allNullValues:true}),t,r);else throw new Error("Set items must all have null values")}static from(e,t,r){const{replacer:n}=r;const A=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t){if(typeof n==="function")e=n.call(t,e,e);A.items.push(s.createPair(e,null,r))}return A}}YAMLSet.tag="tag:yaml.org,2002:set";const a={collection:"map",identify:e=>e instanceof Set,nodeClass:YAMLSet,default:false,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>YAMLSet.from(e,t,r),resolve(e,t){if(n.isMap(e)){if(e.hasAllNullValues(true))return Object.assign(new YAMLSet,e);else t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};t.YAMLSet=YAMLSet;t.set=a},6752:(e,t,r)=>{var n=r(8689);function parseSexagesimal(e,t){const r=e[0];const n=r==="-"||r==="+"?e.substring(1):e;const num=e=>t?BigInt(e):Number(e);const s=n.replace(/_/g,"").split(":").reduce(((e,t)=>e*num(60)+num(t)),num(0));return r==="-"?num(-1)*s:s}function stringifySexagesimal(e){let{value:t}=e;let num=e=>e;if(typeof t==="bigint")num=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return n.stringifyNumber(e);let r="";if(t<0){r="-";t*=num(-1)}const s=num(60);const A=[t%s];if(t<60){A.unshift(0)}else{t=(t-A[0])/s;A.unshift(t%s);if(t>=60){t=(t-A[0])/s;A.unshift(t)}}return r+A.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const s={identify:e=>typeof e==="bigint"||Number.isInteger(e),default:true,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>parseSexagesimal(e,r),stringify:stringifySexagesimal};const A={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>parseSexagesimal(e,false),stringify:stringifySexagesimal};const a={identify:e=>e instanceof Date,default:true,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})"+"(?:"+"(?:t|T|[ \\t]+)"+"([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)"+"(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?"+")?$"),resolve(e){const t=e.match(a.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,s,A,c,l]=t.map(Number);const u=t[7]?Number((t[7]+"00").substr(1,3)):0;let h=Date.UTC(r,n-1,s,A||0,c||0,l||0,u);const g=t[8];if(g&&g!=="Z"){let e=parseSexagesimal(g,false);if(Math.abs(e)<30)e*=60;h-=6e4*e}return new Date(h)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};t.floatTime=A;t.intTime=s;t.timestamp=a},4475:(e,t)=>{const r="flow";const n="block";const s="quoted";function foldFlowLines(e,t,r="flow",{indentAtStart:A,lineWidth:a=80,minContentWidth:c=20,onFold:l,onOverflow:u}={}){if(!a||a<0)return e;if(aa-Math.max(2,c))g.push(0);else C=a-A}let y=undefined;let I=undefined;let B=false;let Q=-1;let b=-1;let w=-1;if(r===n){Q=consumeMoreIndentedLines(e,Q,t.length);if(Q!==-1)C=Q+h}for(let A;A=e[Q+=1];){if(r===s&&A==="\\"){b=Q;switch(e[Q+1]){case"x":Q+=3;break;case"u":Q+=5;break;case"U":Q+=9;break;default:Q+=1}w=Q}if(A==="\n"){if(r===n)Q=consumeMoreIndentedLines(e,Q,t.length);C=Q+t.length+h;y=undefined}else{if(A===" "&&I&&I!==" "&&I!=="\n"&&I!=="\t"){const t=e[Q+1];if(t&&t!==" "&&t!=="\n"&&t!=="\t")y=Q}if(Q>=C){if(y){g.push(y);C=y+h;y=undefined}else if(r===s){while(I===" "||I==="\t"){I=A;A=e[Q+=1];B=true}const t=Q>w+1?Q-2:b-1;if(p[t])return e;g.push(t);p[t]=true;C=t+h;y=undefined}else{B=true}}}I=A}if(B&&u)u();if(g.length===0)return e;if(l)l();let S=e.slice(0,g[0]);for(let n=0;n{var n=r(1596);var s=r(1127);var A=r(9799);var a=r(3069);function createStringifyContext(e,t){const r=Object.assign({blockQuote:true,commentString:A.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:false,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:true,indentSeq:true,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:false,singleQuote:null,trueStr:"true",verifyAliasOrder:true},e.schema.toStringOptions,t);let n;switch(r.collectionStyle){case"block":n=false;break;case"flow":n=true;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent==="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function getTagObject(e,t){if(t.tag){const r=e.filter((e=>e.tag===t.tag));if(r.length>0)return r.find((e=>e.format===t.format))??r[0]}let r=undefined;let n;if(s.isScalar(t)){n=t.value;let s=e.filter((e=>e.identify?.(n)));if(s.length>1){const e=s.filter((e=>e.test));if(e.length>0)s=e}r=s.find((e=>e.format===t.format))??s.find((e=>!e.format))}else{n=t;r=e.find((e=>e.nodeClass&&n instanceof e.nodeClass))}if(!r){const e=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${e} value`)}return r}function stringifyProps(e,t,{anchors:r,doc:A}){if(!A.directives)return"";const a=[];const c=(s.isScalar(e)||s.isCollection(e))&&e.anchor;if(c&&n.anchorIsValid(c)){r.add(c);a.push(`&${c}`)}const l=e.tag??(t.default?null:t.tag);if(l)a.push(A.directives.tagString(l));return a.join(" ")}function stringify(e,t,r,n){if(s.isPair(e))return e.toString(t,r,n);if(s.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e)){throw new TypeError(`Cannot stringify circular structure without alias nodes`)}else{if(t.resolvedAliases)t.resolvedAliases.add(e);else t.resolvedAliases=new Set([e]);e=e.resolve(t.doc)}}let A=undefined;const c=s.isNode(e)?e:t.doc.createNode(e,{onTagObj:e=>A=e});A??(A=getTagObject(t.doc.schema.tags,c));const l=stringifyProps(c,A,t);if(l.length>0)t.indentAtStart=(t.indentAtStart??0)+l.length+1;const u=typeof A.stringify==="function"?A.stringify(c,t,r,n):s.isScalar(c)?a.stringifyString(c,t,r,n):c.toString(t,r,n);if(!l)return u;return s.isScalar(c)||u[0]==="{"||u[0]==="["?`${l} ${u}`:`${l}\n${t.indent}${u}`}t.createStringifyContext=createStringifyContext;t.stringify=stringify},1212:(e,t,r)=>{var n=r(1127);var s=r(2148);var A=r(9799);function stringifyCollection(e,t,r){const n=t.inFlow??e.flow;const s=n?stringifyFlowCollection:stringifyBlockCollection;return s(e,t,r)}function stringifyBlockCollection({comment:e,items:t},r,{blockItemPrefix:a,flowChars:c,itemIndent:l,onChompKeep:u,onComment:h}){const{indent:g,options:{commentString:p}}=r;const C=Object.assign({},r,{indent:l,type:null});let y=false;const I=[];for(let e=0;eu=null),(()=>y=true));if(u)h+=A.lineComment(h,l,p(u));if(y&&u)y=false;I.push(a+h)}let B;if(I.length===0){B=c.start+c.end}else{B=I[0];for(let e=1;el=null));if(rC||u.includes("\n")))p=true;y.push(u);C=y.length}const{start:I,end:B}=r;if(y.length===0){return I+B}else{if(!p){const e=y.reduce(((e,t)=>e+t.length+2),2);p=t.options.lineWidth>0&&e>t.options.lineWidth}if(p){let e=I;for(const t of y)e+=t?`\n${l}${c}${t}`:"\n";return`${e}\n${c}${B}`}else{return`${I}${u}${y.join(" ")}${u}${B}`}}}function addCommentBefore({indent:e,options:{commentString:t}},r,n,s){if(n&&s)n=n.replace(/^\n+/,"");if(n){const s=A.indentComment(t(n),e);r.push(s.trimStart())}}t.stringifyCollection=stringifyCollection},9799:(e,t)=>{const stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function indentComment(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}const lineComment=(e,t,r)=>e.endsWith("\n")?indentComment(r,t):r.includes("\n")?"\n"+indentComment(r,t):(e.endsWith(" ")?"":" ")+r;t.indentComment=indentComment;t.lineComment=lineComment;t.stringifyComment=stringifyComment},6829:(e,t,r)=>{var n=r(1127);var s=r(2148);var A=r(9799);function stringifyDocument(e,t){const r=[];let a=t.directives===true;if(t.directives!==false&&e.directives){const t=e.directives.toString(e);if(t){r.push(t);a=true}else if(e.directives.docStart)a=true}if(a)r.push("---");const c=s.createStringifyContext(e,t);const{commentString:l}=c.options;if(e.commentBefore){if(r.length!==1)r.unshift("");const t=l(e.commentBefore);r.unshift(A.indentComment(t,""))}let u=false;let h=null;if(e.contents){if(n.isNode(e.contents)){if(e.contents.spaceBefore&&a)r.push("");if(e.contents.commentBefore){const t=l(e.contents.commentBefore);r.push(A.indentComment(t,""))}c.forceBlockIndent=!!e.comment;h=e.contents.comment}const t=h?undefined:()=>u=true;let g=s.stringify(e.contents,c,(()=>h=null),t);if(h)g+=A.lineComment(g,"",l(h));if((g[0]==="|"||g[0]===">")&&r[r.length-1]==="---"){r[r.length-1]=`--- ${g}`}else r.push(g)}else{r.push(s.stringify(e.contents,c))}if(e.directives?.docEnd){if(e.comment){const t=l(e.comment);if(t.includes("\n")){r.push("...");r.push(A.indentComment(t,""))}else{r.push(`... ${t}`)}}else{r.push("...")}}else{let t=e.comment;if(t&&u)t=t.replace(/^\n+/,"");if(t){if((!u||h)&&r[r.length-1]!=="")r.push("");r.push(A.indentComment(l(t),""))}}return r.join("\n")+"\n"}t.stringifyDocument=stringifyDocument},8689:(e,t)=>{function stringifyNumber({format:e,minFractionDigits:t,tag:r,value:n}){if(typeof n==="bigint")return String(n);const s=typeof n==="number"?n:Number(n);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let A=JSON.stringify(n);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(A)){let e=A.indexOf(".");if(e<0){e=A.length;A+="."}let r=t-(A.length-e-1);while(r-- >0)A+="0"}return A}t.stringifyNumber=stringifyNumber},9748:(e,t,r)=>{var n=r(1127);var s=r(3301);var A=r(2148);var a=r(9799);function stringifyPair({key:e,value:t},r,c,l){const{allNullValues:u,doc:h,indent:g,indentStep:p,options:{commentString:C,indentSeq:y,simpleKeys:I}}=r;let B=n.isNode(e)&&e.comment||null;if(I){if(B){throw new Error("With simple keys, key nodes cannot have comments")}if(n.isCollection(e)||!n.isNode(e)&&typeof e==="object"){const e="With simple keys, collection cannot be used as a key value";throw new Error(e)}}let Q=!I&&(!e||B&&t==null&&!r.inFlow||n.isCollection(e)||(n.isScalar(e)?e.type===s.Scalar.BLOCK_FOLDED||e.type===s.Scalar.BLOCK_LITERAL:typeof e==="object"));r=Object.assign({},r,{allNullValues:false,implicitKey:!Q&&(I||!u),indent:g+p});let b=false;let w=false;let S=A.stringify(e,r,(()=>b=true),(()=>w=true));if(!Q&&!r.inFlow&&S.length>1024){if(I)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");Q=true}if(r.inFlow){if(u||t==null){if(b&&c)c();return S===""?"?":Q?`? ${S}`:S}}else if(u&&!I||t==null&&Q){S=`? ${S}`;if(B&&!b){S+=a.lineComment(S,r.indent,C(B))}else if(w&&l)l();return S}if(b)B=null;if(Q){if(B)S+=a.lineComment(S,r.indent,C(B));S=`? ${S}\n${g}:`}else{S=`${S}:`;if(B)S+=a.lineComment(S,r.indent,C(B))}let k,v,R;if(n.isNode(t)){k=!!t.spaceBefore;v=t.commentBefore;R=t.comment}else{k=false;v=null;R=null;if(t&&typeof t==="object")t=h.createNode(t)}r.implicitKey=false;if(!Q&&!B&&n.isScalar(t))r.indentAtStart=S.length+1;w=false;if(!y&&p.length>=2&&!r.inFlow&&!Q&&n.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor){r.indent=r.indent.substring(2)}let D=false;const _=A.stringify(t,r,(()=>D=true),(()=>w=true));let N=" ";if(B||k||v){N=k?"\n":"";if(v){const e=C(v);N+=`\n${a.indentComment(e,r.indent)}`}if(_===""&&!r.inFlow){if(N==="\n")N="\n\n"}else{N+=`\n${r.indent}`}}else if(!Q&&n.isCollection(t)){const e=_[0];const n=_.indexOf("\n");const s=n!==-1;const A=r.inFlow??t.flow??t.items.length===0;if(s||!A){let t=false;if(s&&(e==="&"||e==="!")){let r=_.indexOf(" ");if(e==="&"&&r!==-1&&r{var n=r(3301);var s=r(4475);const getFoldOptions=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth});const containsDocumentMarker=e=>/^(%|---|\.\.\.)/m.test(e);function lineLengthOverLimit(e,t,r){if(!t||t<0)return false;const n=t-r;const s=e.length;if(s<=n)return false;for(let t=0,r=0;tn)return true;r=t+1;if(s-r<=n)return false}}return true}function doubleQuotedString(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=t;const A=t.options.doubleQuotedMinMultiLineLength;const a=t.indent||(containsDocumentMarker(e)?" ":"");let c="";let l=0;for(let e=0,t=r[e];t;t=r[++e]){if(t===" "&&r[e+1]==="\\"&&r[e+2]==="n"){c+=r.slice(l,e)+"\\ ";e+=1;l=e;t="\\"}if(t==="\\")switch(r[e+1]){case"u":{c+=r.slice(l,e);const t=r.substr(e+2,4);switch(t){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:if(t.substr(0,2)==="00")c+="\\x"+t.substr(2);else c+=r.substr(e,6)}e+=5;l=e+1}break;case"n":if(n||r[e+2]==='"'||r.length\n";let y;let I;for(I=r.length;I>0;--I){const e=r[I-1];if(e!=="\n"&&e!=="\t"&&e!==" ")break}let B=r.substring(I);const Q=B.indexOf("\n");if(Q===-1){y="-"}else if(r===B||Q!==B.length-1){y="+";if(l)l()}else{y=""}if(B){r=r.slice(0,-B.length);if(B[B.length-1]==="\n")B=B.slice(0,-1);B=B.replace(A,`$&${p}`)}let b=false;let w;let S=-1;for(w=0;w{A=true}}const l=s.foldFlowLines(`${k}${e}${B}`,p,s.FOLD_BLOCK,c);if(!A)return`>${R}\n${p}${l}`}r=r.replace(/\n+/g,`$&${p}`);return`|${R}\n${p}${k}${r}${B}`}function plainString(e,t,r,A){const{type:a,value:c}=e;const{actualString:l,implicitKey:u,indent:h,indentStep:g,inFlow:p}=t;if(u&&c.includes("\n")||p&&/[[\]{},]/.test(c)){return quotedString(c,t)}if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(c)){return u||p||!c.includes("\n")?quotedString(c,t):blockString(e,t,r,A)}if(!u&&!p&&a!==n.Scalar.PLAIN&&c.includes("\n")){return blockString(e,t,r,A)}if(containsDocumentMarker(c)){if(h===""){t.forceBlockIndent=true;return blockString(e,t,r,A)}else if(u&&h===g){return quotedString(c,t)}}const C=c.replace(/\n+/g,`$&\n${h}`);if(l){const test=e=>e.default&&e.tag!=="tag:yaml.org,2002:str"&&e.test?.test(C);const{compat:e,tags:r}=t.doc.schema;if(r.some(test)||e?.some(test))return quotedString(c,t)}return u?C:s.foldFlowLines(C,h,s.FOLD_FLOW,getFoldOptions(t,false))}function stringifyString(e,t,r,s){const{implicitKey:A,inFlow:a}=t;const c=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)});let{type:l}=e;if(l!==n.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value))l=n.Scalar.QUOTE_DOUBLE}const _stringify=e=>{switch(e){case n.Scalar.BLOCK_FOLDED:case n.Scalar.BLOCK_LITERAL:return A||a?quotedString(c.value,t):blockString(c,t,r,s);case n.Scalar.QUOTE_DOUBLE:return doubleQuotedString(c.value,t);case n.Scalar.QUOTE_SINGLE:return singleQuotedString(c.value,t);case n.Scalar.PLAIN:return plainString(c,t,r,s);default:return null}};let u=_stringify(l);if(u===null){const{defaultKeyType:e,defaultStringType:r}=t.options;const n=A&&e||r;u=_stringify(n);if(u===null)throw new Error(`Unsupported default string type ${n}`)}return u}t.stringifyString=stringifyString},204:(e,t,r)=>{var n=r(1127);const s=Symbol("break visit");const A=Symbol("skip children");const a=Symbol("remove node");function visit(e,t){const r=initVisitor(t);if(n.isDocument(e)){const t=visit_(null,e.contents,r,Object.freeze([e]));if(t===a)e.contents=null}else visit_(null,e,r,Object.freeze([]))}visit.BREAK=s;visit.SKIP=A;visit.REMOVE=a;function visit_(e,t,r,A){const c=callVisitor(e,t,r,A);if(n.isNode(c)||n.isPair(c)){replaceNode(e,A,c);return visit_(e,c,r,A)}if(typeof c!=="symbol"){if(n.isCollection(t)){A=Object.freeze(A.concat(t));for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});var n=r(6577);class AbortSignal extends n.EventTarget{constructor(){super();throw new TypeError("AbortSignal cannot be constructed directly")}get aborted(){const e=s.get(this);if(typeof e!=="boolean"){throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`)}return e}}n.defineEventAttribute(AbortSignal.prototype,"abort");function createAbortSignal(){const e=Object.create(AbortSignal.prototype);n.EventTarget.call(e);s.set(e,false);return e}function abortSignal(e){if(s.get(e)!==false){return}s.set(e,true);e.dispatchEvent({type:"abort"})}const s=new WeakMap;Object.defineProperties(AbortSignal.prototype,{aborted:{enumerable:true}});if(typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol"){Object.defineProperty(AbortSignal.prototype,Symbol.toStringTag,{configurable:true,value:"AbortSignal"})}class AbortController{constructor(){A.set(this,createAbortSignal())}get signal(){return getSignal(this)}abort(){abortSignal(getSignal(this))}}const A=new WeakMap;function getSignal(e){const t=A.get(e);if(t==null){throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${e===null?"null":typeof e}`)}return t}Object.defineProperties(AbortController.prototype,{signal:{enumerable:true},abort:{enumerable:true}});if(typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol"){Object.defineProperty(AbortController.prototype,Symbol.toStringTag,{configurable:true,value:"AbortController"})}t.AbortController=AbortController;t.AbortSignal=AbortSignal;t["default"]=AbortController;e.exports=AbortController;e.exports.AbortController=e.exports["default"]=AbortController;e.exports.AbortSignal=AbortSignal},8816:(e,t,r)=>{var n=r(5744);var s=r(6928);var A=r(7047);var a=r(7294);var c=r(3270);var l=r(6542);var u=r(1363);var h=e.exports={};var g=/[\/\\]/g;var processPatterns=function(e,t){var r=[];A(e).forEach((function(e){var n=e.indexOf("!")===0;if(n){e=e.slice(1)}var s=t(e);if(n){r=a(r,s)}else{r=c(r,s)}}));return r};h.exists=function(){var e=s.join.apply(s,arguments);return n.existsSync(e)};h.expand=function(...e){var t=l(e[0])?e.shift():{};var r=Array.isArray(e[0])?e[0]:e;if(r.length===0){return[]}var A=processPatterns(r,(function(e){return u.sync(e,t)}));if(t.filter){A=A.filter((function(e){e=s.join(t.cwd||"",e);try{if(typeof t.filter==="function"){return t.filter(e)}else{return n.statSync(e)[t.filter]()}}catch(e){return false}}))}return A};h.expandMapping=function(e,t,r){r=Object.assign({rename:function(e,t){return s.join(e||"",t)}},r);var n=[];var A={};h.expand(r,e).forEach((function(e){var a=e;if(r.flatten){a=s.basename(a)}if(r.ext){a=a.replace(/(\.[^\/]*)?$/,r.ext)}var c=r.rename(t,a,r);if(r.cwd){e=s.join(r.cwd,e)}c=c.replace(g,"/");e=e.replace(g,"/");if(A[c]){A[c].src.push(e)}else{n.push({src:[e],dest:c});A[c]=n[n.length-1]}}));return n};h.normalizeFilesArray=function(e){var t=[];e.forEach((function(e){var r;if("src"in e||"dest"in e){t.push(e)}}));if(t.length===0){return[]}t=_(t).chain().forEach((function(e){if(!("src"in e)||!e.src){return}if(Array.isArray(e.src)){e.src=A(e.src)}else{e.src=[e.src]}})).map((function(e){var t=Object.assign({},e);delete t.src;delete t.dest;if(e.expand){return h.expandMapping(e.src,e.dest,t).map((function(t){var r=Object.assign({},e);r.orig=Object.assign({},e);r.src=t.src;r.dest=t.dest;["expand","cwd","flatten","rename","ext"].forEach((function(e){delete r[e]}));return r}))}var r=Object.assign({},e);r.orig=Object.assign({},e);if("src"in r){Object.defineProperty(r,"src",{enumerable:true,get:function fn(){var r;if(!("result"in fn)){r=e.src;r=Array.isArray(r)?A(r):[r];fn.result=h.expand(t,r)}return fn.result}})}if("dest"in r){r.dest=e.dest}return r})).flatten().value();return t}},3296:(e,t,r)=>{var n=r(5744);var s=r(6928);var A=r(6543);var a=r(2126);var c=r(6133);var l=r(7511);var u=r(2203).Stream;var h=r(9963).PassThrough;var g=e.exports={};g.file=r(8816);g.collectStream=function(e,t){var r=[];var n=0;e.on("error",t);e.on("data",(function(e){r.push(e);n+=e.length}));e.on("end",(function(){var e=Buffer.alloc(n);var s=0;r.forEach((function(t){t.copy(e,s);s+=t.length}));t(null,e)}))};g.dateify=function(e){e=e||new Date;if(e instanceof Date){e=e}else if(typeof e==="string"){e=new Date(e)}else{e=new Date}return e};g.defaults=function(e,t,r){var n=arguments;n[0]=n[0]||{};return l(...n)};g.isStream=function(e){return A(e)};g.lazyReadStream=function(e){return new a.Readable((function(){return n.createReadStream(e)}))};g.normalizeInputSource=function(e){if(e===null){return Buffer.alloc(0)}else if(typeof e==="string"){return Buffer.from(e)}else if(g.isStream(e)){return e.pipe(new h)}return e};g.sanitizePath=function(e){return c(e,false).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")};g.trailingSlashIt=function(e){return e.slice(-1)!=="/"?e+"/":e};g.unixifyPath=function(e){return c(e,false).replace(/^\w+:/,"")};g.walkdir=function(e,t,r){var A=[];if(typeof t==="function"){r=t;t=e}n.readdir(e,(function(a,c){var l=0;var u;var h;if(a){return r(a)}(function next(){u=c[l++];if(!u){return r(null,A)}h=s.join(e,u);n.stat(h,(function(e,n){A.push({path:h,relative:s.relative(t,h).replace(/\\/g,"/"),stats:n});if(n&&n.isDirectory()){g.walkdir(h,t,(function(e,t){if(e){return r(e)}t.forEach((function(e){A.push(e)}));next()}))}else{next()}}))})()}))}},9392:(e,t,r)=>{ +(()=>{var __webpack_modules__={4914:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const a=A(r(857));const c=r(302);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+a.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const l="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=l+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${l}${escapeData(this.message)}`;return e}}function escapeData(e){return(0,c.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(0,c.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},7484:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.platform=t.toPlatformPath=t.toWin32Path=t.toPosixPath=t.markdownSummary=t.summary=t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const c=r(4914);const l=r(4753);const u=r(302);const h=A(r(857));const g=A(r(6928));const p=r(5306);var C;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(C||(t.ExitCode=C={}));function exportVariable(e,t){const r=(0,u.toCommandValue)(t);process.env[e]=r;const n=process.env["GITHUB_ENV"]||"";if(n){return(0,l.issueFileCommand)("ENV",(0,l.prepareKeyValueMessage)(e,t))}(0,c.issueCommand)("set-env",{name:e},r)}t.exportVariable=exportVariable;function setSecret(e){(0,c.issueCommand)("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){(0,l.issueFileCommand)("PATH",e)}else{(0,c.issueCommand)("add-path",{},e)}process.env["PATH"]=`${e}${g.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));if(t&&t.trimWhitespace===false){return r}return r.map((e=>e.trim()))}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const n=["false","False","FALSE"];const s=getInput(e,t);if(r.includes(s))return true;if(n.includes(s))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){const r=process.env["GITHUB_OUTPUT"]||"";if(r){return(0,l.issueFileCommand)("OUTPUT",(0,l.prepareKeyValueMessage)(e,t))}process.stdout.write(h.EOL);(0,c.issueCommand)("set-output",{name:e},(0,u.toCommandValue)(t))}t.setOutput=setOutput;function setCommandEcho(e){(0,c.issue)("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=C.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){(0,c.issueCommand)("debug",{},e)}t.debug=debug;function error(e,t={}){(0,c.issueCommand)("error",(0,u.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){(0,c.issueCommand)("warning",(0,u.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){(0,c.issueCommand)("notice",(0,u.toCommandProperties)(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+h.EOL)}t.info=info;function startGroup(e){(0,c.issue)("group",e)}t.startGroup=startGroup;function endGroup(){(0,c.issue)("endgroup")}t.endGroup=endGroup;function group(e,t){return a(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){const r=process.env["GITHUB_STATE"]||"";if(r){return(0,l.issueFileCommand)("STATE",(0,l.prepareKeyValueMessage)(e,t))}(0,c.issueCommand)("save-state",{name:e},(0,u.toCommandValue)(t))}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return a(this,void 0,void 0,(function*(){return yield p.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken;var y=r(1847);Object.defineProperty(t,"summary",{enumerable:true,get:function(){return y.summary}});var I=r(1847);Object.defineProperty(t,"markdownSummary",{enumerable:true,get:function(){return I.markdownSummary}});var B=r(1976);Object.defineProperty(t,"toPosixPath",{enumerable:true,get:function(){return B.toPosixPath}});Object.defineProperty(t,"toWin32Path",{enumerable:true,get:function(){return B.toWin32Path}});Object.defineProperty(t,"toPlatformPath",{enumerable:true,get:function(){return B.toPlatformPath}});t.platform=A(r(8968))},4753:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.prepareKeyValueMessage=t.issueFileCommand=void 0;const a=A(r(6982));const c=A(r(9896));const l=A(r(857));const u=r(302);function issueFileCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!c.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}c.appendFileSync(r,`${(0,u.toCommandValue)(t)}${l.EOL}`,{encoding:"utf8"})}t.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(e,t){const r=`ghadelimiter_${a.randomUUID()}`;const n=(0,u.toCommandValue)(t);if(e.includes(r)){throw new Error(`Unexpected input: name should not contain the delimiter "${r}"`)}if(n.includes(r)){throw new Error(`Unexpected input: value should not contain the delimiter "${r}"`)}return`${e}<<${r}${l.EOL}${n}${l.EOL}${r}`}t.prepareKeyValueMessage=prepareKeyValueMessage},5306:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.OidcClient=void 0;const s=r(4844);const A=r(4552);const a=r(7484);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new s.HttpClient("actions/oidc-client",[new A.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return n(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const n=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.message}`)}));const s=(t=n.result)===null||t===void 0?void 0:t.value;if(!s){throw new Error("Response json body do not have ID Token field")}return s}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}(0,a.debug)(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);(0,a.setSecret)(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},1976:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.toPlatformPath=t.toWin32Path=t.toPosixPath=void 0;const a=A(r(6928));function toPosixPath(e){return e.replace(/[\\]/g,"/")}t.toPosixPath=toPosixPath;function toWin32Path(e){return e.replace(/[/]/g,"\\")}t.toWin32Path=toWin32Path;function toPlatformPath(e){return e.replace(/[/\\]/g,a.sep)}t.toPlatformPath=toPlatformPath},8968:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getDetails=t.isLinux=t.isMacOS=t.isWindows=t.arch=t.platform=void 0;const l=c(r(857));const u=A(r(5236));const getWindowsInfo=()=>a(void 0,void 0,void 0,(function*(){const{stdout:e}=yield u.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',undefined,{silent:true});const{stdout:t}=yield u.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',undefined,{silent:true});return{name:t.trim(),version:e.trim()}}));const getMacOsInfo=()=>a(void 0,void 0,void 0,(function*(){var e,t,r,n;const{stdout:s}=yield u.getExecOutput("sw_vers",undefined,{silent:true});const A=(t=(e=s.match(/ProductVersion:\s*(.+)/))===null||e===void 0?void 0:e[1])!==null&&t!==void 0?t:"";const a=(n=(r=s.match(/ProductName:\s*(.+)/))===null||r===void 0?void 0:r[1])!==null&&n!==void 0?n:"";return{name:a,version:A}}));const getLinuxInfo=()=>a(void 0,void 0,void 0,(function*(){const{stdout:e}=yield u.getExecOutput("lsb_release",["-i","-r","-s"],{silent:true});const[t,r]=e.trim().split("\n");return{name:t,version:r}}));t.platform=l.default.platform();t.arch=l.default.arch();t.isWindows=t.platform==="win32";t.isMacOS=t.platform==="darwin";t.isLinux=t.platform==="linux";function getDetails(){return a(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield t.isWindows?getWindowsInfo():t.isMacOS?getMacOsInfo():getLinuxInfo()),{platform:t.platform,arch:t.arch,isWindows:t.isWindows,isMacOS:t.isMacOS,isLinux:t.isLinux})}))}t.getDetails=getDetails},1847:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.summary=t.markdownSummary=t.SUMMARY_DOCS_URL=t.SUMMARY_ENV_VAR=void 0;const s=r(857);const A=r(9896);const{access:a,appendFile:c,writeFile:l}=A.promises;t.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";t.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";class Summary{constructor(){this._buffer=""}filePath(){return n(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const e=process.env[t.SUMMARY_ENV_VAR];if(!e){throw new Error(`Unable to find environment variable for $${t.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield a(e,A.constants.R_OK|A.constants.W_OK)}catch(t){throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}this._filePath=e;return this._filePath}))}wrap(e,t,r={}){const n=Object.entries(r).map((([e,t])=>` ${e}="${t}"`)).join("");if(!t){return`<${e}${n}>`}return`<${e}${n}>${t}`}write(e){return n(this,void 0,void 0,(function*(){const t=!!(e===null||e===void 0?void 0:e.overwrite);const r=yield this.filePath();const n=t?l:c;yield n(r,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return n(this,void 0,void 0,(function*(){return this.emptyBuffer().write({overwrite:true})}))}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){this._buffer="";return this}addRaw(e,t=false){this._buffer+=e;return t?this.addEOL():this}addEOL(){return this.addRaw(s.EOL)}addCodeBlock(e,t){const r=Object.assign({},t&&{lang:t});const n=this.wrap("pre",this.wrap("code",e),r);return this.addRaw(n).addEOL()}addList(e,t=false){const r=t?"ol":"ul";const n=e.map((e=>this.wrap("li",e))).join("");const s=this.wrap(r,n);return this.addRaw(s).addEOL()}addTable(e){const t=e.map((e=>{const t=e.map((e=>{if(typeof e==="string"){return this.wrap("td",e)}const{header:t,data:r,colspan:n,rowspan:s}=e;const A=t?"th":"td";const a=Object.assign(Object.assign({},n&&{colspan:n}),s&&{rowspan:s});return this.wrap(A,r,a)})).join("");return this.wrap("tr",t)})).join("");const r=this.wrap("table",t);return this.addRaw(r).addEOL()}addDetails(e,t){const r=this.wrap("details",this.wrap("summary",e)+t);return this.addRaw(r).addEOL()}addImage(e,t,r){const{width:n,height:s}=r||{};const A=Object.assign(Object.assign({},n&&{width:n}),s&&{height:s});const a=this.wrap("img",null,Object.assign({src:e,alt:t},A));return this.addRaw(a).addEOL()}addHeading(e,t){const r=`h${t}`;const n=["h1","h2","h3","h4","h5","h6"].includes(r)?r:"h1";const s=this.wrap(n,e);return this.addRaw(s).addEOL()}addSeparator(){const e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){const e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,t){const r=Object.assign({},t&&{cite:t});const n=this.wrap("blockquote",e,r);return this.addRaw(n).addEOL()}addLink(e,t){const r=this.wrap("a",e,{href:t});return this.addRaw(r).addEOL()}}const u=new Summary;t.markdownSummary=u;t.summary=u},302:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},5236:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getExecOutput=t.exec=void 0;const c=r(3193);const l=A(r(6665));function exec(e,t,r){return a(this,void 0,void 0,(function*(){const n=l.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const s=n[0];t=n.slice(1).concat(t||[]);const A=new l.ToolRunner(s,t,r);return A.exec()}))}t.exec=exec;function getExecOutput(e,t,r){var n,s;return a(this,void 0,void 0,(function*(){let A="";let a="";const l=new c.StringDecoder("utf8");const u=new c.StringDecoder("utf8");const h=(n=r===null||r===void 0?void 0:r.listeners)===null||n===void 0?void 0:n.stdout;const g=(s=r===null||r===void 0?void 0:r.listeners)===null||s===void 0?void 0:s.stderr;const stdErrListener=e=>{a+=u.write(e);if(g){g(e)}};const stdOutListener=e=>{A+=l.write(e);if(h){h(e)}};const p=Object.assign(Object.assign({},r===null||r===void 0?void 0:r.listeners),{stdout:stdOutListener,stderr:stdErrListener});const C=yield exec(e,t,Object.assign(Object.assign({},r),{listeners:p}));A+=l.end();a+=u.end();return{exitCode:C,stdout:A,stderr:a}}))}t.getExecOutput=getExecOutput},6665:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.argStringToArray=t.ToolRunner=void 0;const c=A(r(857));const l=A(r(4434));const u=A(r(5317));const h=A(r(6928));const g=A(r(4994));const p=A(r(5207));const C=r(3557);const y=process.platform==="win32";class ToolRunner extends l.EventEmitter{constructor(e,t,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const r=this._getSpawnFileName();const n=this._getSpawnArgs(e);let s=t?"":"[command]";if(y){if(this._isCmdFile()){s+=r;for(const e of n){s+=` ${e}`}}else if(e.windowsVerbatimArguments){s+=`"${r}"`;for(const e of n){s+=` ${e}`}}else{s+=this._windowsQuoteCmdArg(r);for(const e of n){s+=` ${this._windowsQuoteCmdArg(e)}`}}}else{s+=r;for(const e of n){s+=` ${e}`}}return s}_processLineBuffer(e,t,r){try{let n=t+e.toString();let s=n.indexOf(c.EOL);while(s>-1){const e=n.substring(0,s);r(e);n=n.substring(s+c.EOL.length);s=n.indexOf(c.EOL)}return n}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(y){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(y){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){t+=" ";t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const n of e){if(t.some((e=>e===n))){r=true;break}}if(!r){return e}let n='"';let s=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(s&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){s=true;n+='"'}else{s=false}}n+='"';return n.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let t='"';let r=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(r&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){r=true;t+="\\"}else{r=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${t}"`}return r}exec(){return a(this,void 0,void 0,(function*(){if(!p.isRooted(this.toolPath)&&(this.toolPath.includes("/")||y&&this.toolPath.includes("\\"))){this.toolPath=h.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield g.which(this.toolPath,true);return new Promise(((e,t)=>a(this,void 0,void 0,(function*(){this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+c.EOL)}const n=new ExecState(r,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield p.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const s=this._getSpawnFileName();const A=u.spawn(s,this._getSpawnArgs(r),this._getSpawnOptions(this.options,s));let a="";if(A.stdout){A.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}a=this._processLineBuffer(e,a,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let l="";if(A.stderr){A.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const t=r.failOnStdErr?r.errStream:r.outStream;t.write(e)}l=this._processLineBuffer(e,l,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}A.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));A.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));A.on("close",(e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()}));n.on("done",((r,n)=>{if(a.length>0){this.emit("stdline",a)}if(l.length>0){this.emit("errline",l)}A.removeAllListeners();if(r){t(r)}else{e(n)}}));if(this.options.input){if(!A.stdin){throw new Error("child process missing stdin")}A.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let r=false;let n=false;let s="";function append(e){if(n&&e!=='"'){s+="\\"}s+=e;n=false}for(let A=0;A0){t.push(s);s=""}continue}append(a)}if(s.length>0){t.push(s.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends l.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=C.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}},4552:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.PersonalAccessTokenCredentialHandler=t.BearerCredentialHandler=t.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){if(!e.headers){throw Error("The request has no headers")}e.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return r(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},4844:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.HttpClient=t.isHttps=t.HttpClientResponse=t.HttpClientError=t.getProxyUrl=t.MediaTypes=t.Headers=t.HttpCodes=void 0;const c=A(r(8611));const l=A(r(5692));const u=A(r(4988));const h=A(r(770));const g=r(6752);var p;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(p||(t.HttpCodes=p={}));var C;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(C||(t.Headers=C={}));var y;(function(e){e["ApplicationJson"]="application/json"})(y||(t.MediaTypes=y={}));function getProxyUrl(e){const t=u.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const I=[p.MovedPermanently,p.ResourceMoved,p.SeeOther,p.TemporaryRedirect,p.PermanentRedirect];const B=[p.BadGateway,p.ServiceUnavailable,p.GatewayTimeout];const Q=["OPTIONS","GET","DELETE","HEAD"];const b=10;const w=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return a(this,void 0,void 0,(function*(){return new Promise((e=>a(this,void 0,void 0,(function*(){let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])}));this.message.on("end",(()=>{e(t.toString())}))}))))}))}readBodyBuffer(){return a(this,void 0,void 0,(function*(){return new Promise((e=>a(this,void 0,void 0,(function*(){const t=[];this.message.on("data",(e=>{t.push(e)}));this.message.on("end",(()=>{e(Buffer.concat(t))}))}))))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){const t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return a(this,void 0,void 0,(function*(){return this.request("OPTIONS",e,null,t||{})}))}get(e,t){return a(this,void 0,void 0,(function*(){return this.request("GET",e,null,t||{})}))}del(e,t){return a(this,void 0,void 0,(function*(){return this.request("DELETE",e,null,t||{})}))}post(e,t,r){return a(this,void 0,void 0,(function*(){return this.request("POST",e,t,r||{})}))}patch(e,t,r){return a(this,void 0,void 0,(function*(){return this.request("PATCH",e,t,r||{})}))}put(e,t,r){return a(this,void 0,void 0,(function*(){return this.request("PUT",e,t,r||{})}))}head(e,t){return a(this,void 0,void 0,(function*(){return this.request("HEAD",e,null,t||{})}))}sendStream(e,t,r,n){return a(this,void 0,void 0,(function*(){return this.request(e,t,r,n)}))}getJson(e,t={}){return a(this,void 0,void 0,(function*(){t[C.Accept]=this._getExistingOrDefaultHeader(t,C.Accept,y.ApplicationJson);const r=yield this.get(e,t);return this._processResponse(r,this.requestOptions)}))}postJson(e,t,r={}){return a(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[C.Accept]=this._getExistingOrDefaultHeader(r,C.Accept,y.ApplicationJson);r[C.ContentType]=this._getExistingOrDefaultHeader(r,C.ContentType,y.ApplicationJson);const s=yield this.post(e,n,r);return this._processResponse(s,this.requestOptions)}))}putJson(e,t,r={}){return a(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[C.Accept]=this._getExistingOrDefaultHeader(r,C.Accept,y.ApplicationJson);r[C.ContentType]=this._getExistingOrDefaultHeader(r,C.ContentType,y.ApplicationJson);const s=yield this.put(e,n,r);return this._processResponse(s,this.requestOptions)}))}patchJson(e,t,r={}){return a(this,void 0,void 0,(function*(){const n=JSON.stringify(t,null,2);r[C.Accept]=this._getExistingOrDefaultHeader(r,C.Accept,y.ApplicationJson);r[C.ContentType]=this._getExistingOrDefaultHeader(r,C.ContentType,y.ApplicationJson);const s=yield this.patch(e,n,r);return this._processResponse(s,this.requestOptions)}))}request(e,t,r,n){return a(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const s=new URL(t);let A=this._prepareRequest(e,s,n);const a=this._allowRetries&&Q.includes(e)?this._maxRetries+1:1;let c=0;let l;do{l=yield this.requestRaw(A,r);if(l&&l.message&&l.message.statusCode===p.Unauthorized){let e;for(const t of this.handlers){if(t.canHandleAuthentication(l)){e=t;break}}if(e){return e.handleAuthentication(this,A,r)}else{return l}}let t=this._maxRedirects;while(l.message.statusCode&&I.includes(l.message.statusCode)&&this._allowRedirects&&t>0){const a=l.message.headers["location"];if(!a){break}const c=new URL(a);if(s.protocol==="https:"&&s.protocol!==c.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}yield l.readBody();if(c.hostname!==s.hostname){for(const e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}A=this._prepareRequest(e,c,n);l=yield this.requestRaw(A,r);t--}if(!l.message.statusCode||!B.includes(l.message.statusCode)){return l}c+=1;if(c{function callbackForResult(e,t){if(e){n(e)}else if(!t){n(new Error("Unknown error"))}else{r(t)}}this.requestRawWithCallback(e,t,callbackForResult)}))}))}requestRawWithCallback(e,t,r){if(typeof t==="string"){if(!e.options.headers){e.options.headers={}}e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let n=false;function handleResult(e,t){if(!n){n=true;r(e,t)}}const s=e.httpModule.request(e.options,(e=>{const t=new HttpClientResponse(e);handleResult(undefined,t)}));let A;s.on("socket",(e=>{A=e}));s.setTimeout(this._socketTimeout||3*6e4,(()=>{if(A){A.end()}handleResult(new Error(`Request timeout: ${e.options.path}`))}));s.on("error",(function(e){handleResult(e)}));if(t&&typeof t==="string"){s.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){s.end()}));t.pipe(s)}else{s.end()}}getAgent(e){const t=new URL(e);return this._getAgent(t)}getAgentDispatcher(e){const t=new URL(e);const r=u.getProxyUrl(t);const n=r&&r.hostname;if(!n){return}return this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const s=n.parsedUrl.protocol==="https:";n.httpModule=s?l:c;const A=s?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):A;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers){for(const e of this.handlers){e.prepareRequest(n.options)}}return n}_mergeHeaders(e){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e||{}))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||r}_getAgent(e){let t;const r=u.getProxyUrl(e);const n=r&&r.hostname;if(this._keepAlive&&n){t=this._proxyAgent}if(!n){t=this._agent}if(t){return t}const s=e.protocol==="https:";let A=100;if(this.requestOptions){A=this.requestOptions.maxSockets||c.globalAgent.maxSockets}if(r&&r.hostname){const e={maxSockets:A,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`}),{host:r.hostname,port:r.port})};let n;const a=r.protocol==="https:";if(s){n=a?h.httpsOverHttps:h.httpsOverHttp}else{n=a?h.httpOverHttps:h.httpOverHttp}t=n(e);this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:A};t=s?new l.Agent(e):new c.Agent(e);this._agent=t}if(s&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_getProxyAgentDispatcher(e,t){let r;if(this._keepAlive){r=this._proxyAgentDispatcher}if(r){return r}const n=e.protocol==="https:";r=new g.ProxyAgent(Object.assign({uri:t.href,pipelining:!this._keepAlive?0:1},(t.username||t.password)&&{token:`Basic ${Buffer.from(`${t.username}:${t.password}`).toString("base64")}`}));this._proxyAgentDispatcher=r;if(n&&this._ignoreSslError){r.options=Object.assign(r.options.requestTls||{},{rejectUnauthorized:false})}return r}_performExponentialBackoff(e){return a(this,void 0,void 0,(function*(){e=Math.min(b,e);const t=w*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}))}_processResponse(e,t){return a(this,void 0,void 0,(function*(){return new Promise(((r,n)=>a(this,void 0,void 0,(function*(){const s=e.message.statusCode||0;const A={statusCode:s,result:null,headers:{}};if(s===p.NotFound){r(A)}function dateTimeDeserializer(e,t){if(typeof t==="string"){const e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}let a;let c;try{c=yield e.readBody();if(c&&c.length>0){if(t&&t.deserializeDates){a=JSON.parse(c,dateTimeDeserializer)}else{a=JSON.parse(c)}A.result=a}A.headers=e.message.headers}catch(e){}if(s>299){let e;if(a&&a.message){e=a.message}else if(c&&c.length>0){e=c}else{e=`Failed request: (${s})`}const t=new HttpClientError(e,s);t.result=A.result;n(t)}else{r(A)}}))))}))}}t.HttpClient=HttpClient;const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{})},4988:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.checkBypass=t.getProxyUrl=void 0;function getProxyUrl(e){const t=e.protocol==="https:";if(checkBypass(e)){return undefined}const r=(()=>{if(t){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(r){try{return new DecodedURL(r)}catch(e){if(!r.startsWith("http://")&&!r.startsWith("https://"))return new DecodedURL(`http://${r}`)}}else{return undefined}}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}const t=e.hostname;if(isLoopbackAddress(t)){return true}const r=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!r){return false}let n;if(e.port){n=Number(e.port)}else if(e.protocol==="http:"){n=80}else if(e.protocol==="https:"){n=443}const s=[e.hostname.toUpperCase()];if(typeof n==="number"){s.push(`${s[0]}:${n}`)}for(const e of r.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(e==="*"||s.some((t=>t===e||t.endsWith(`.${e}`)||e.startsWith(".")&&t.endsWith(`${e}`)))){return true}}return false}t.checkBypass=checkBypass;function isLoopbackAddress(e){const t=e.toLowerCase();return t==="localhost"||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}class DecodedURL extends URL{constructor(e,t){super(e,t);this._decodedUsername=decodeURIComponent(super.username);this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}},5207:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};var c;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.READONLY=t.UV_FS_O_EXLOCK=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rm=t.rename=t.readlink=t.readdir=t.open=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const l=A(r(9896));const u=A(r(6928));c=l.promises,t.chmod=c.chmod,t.copyFile=c.copyFile,t.lstat=c.lstat,t.mkdir=c.mkdir,t.open=c.open,t.readdir=c.readdir,t.readlink=c.readlink,t.rename=c.rename,t.rm=c.rm,t.rmdir=c.rmdir,t.stat=c.stat,t.symlink=c.symlink,t.unlink=c.unlink;t.IS_WINDOWS=process.platform==="win32";t.UV_FS_O_EXLOCK=268435456;t.READONLY=l.constants.O_RDONLY;function exists(e){return a(this,void 0,void 0,(function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}t.exists=exists;function isDirectory(e,r=false){return a(this,void 0,void 0,(function*(){const n=r?yield t.stat(e):yield t.lstat(e);return n.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,r){return a(this,void 0,void 0,(function*(){let n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){const t=u.extname(e).toUpperCase();if(r.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const s=e;for(const A of r){e=s+A;n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){try{const r=u.dirname(e);const n=u.basename(e).toUpperCase();for(const s of yield t.readdir(r)){if(n===s.toUpperCase()){e=u.join(r,s);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""}))}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}t.getCmdPath=getCmdPath},4994:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const c=r(2613);const l=A(r(6928));const u=A(r(5207));function cp(e,t,r={}){return a(this,void 0,void 0,(function*(){const{force:n,recursive:s,copySourceDirectory:A}=readCopyOptions(r);const a=(yield u.exists(t))?yield u.stat(t):null;if(a&&a.isFile()&&!n){return}const c=a&&a.isDirectory()&&A?l.join(t,l.basename(e)):t;if(!(yield u.exists(e))){throw new Error(`no such file or directory: ${e}`)}const h=yield u.stat(e);if(h.isDirectory()){if(!s){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,c,0,n)}}else{if(l.relative(e,c)===""){throw new Error(`'${c}' and '${e}' are the same file`)}yield copyFile(e,c,n)}}))}t.cp=cp;function mv(e,t,r={}){return a(this,void 0,void 0,(function*(){if(yield u.exists(t)){let n=true;if(yield u.isDirectory(t)){t=l.join(t,l.basename(e));n=yield u.exists(t)}if(n){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(l.dirname(t));yield u.rename(e,t)}))}t.mv=mv;function rmRF(e){return a(this,void 0,void 0,(function*(){if(u.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield u.rm(e,{force:true,maxRetries:3,recursive:true,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}}))}t.rmRF=rmRF;function mkdirP(e){return a(this,void 0,void 0,(function*(){c.ok(e,"a path argument must be provided");yield u.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return a(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(u.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}return t}const r=yield findInPath(e);if(r&&r.length>0){return r[0]}return""}))}t.which=which;function findInPath(e){return a(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(u.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(l.delimiter)){if(e){t.push(e)}}}if(u.isRooted(e)){const r=yield u.tryGetExecutablePath(e,t);if(r){return[r]}return[]}if(e.includes(l.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(l.delimiter)){if(e){r.push(e)}}}const n=[];for(const s of r){const r=yield u.tryGetExecutablePath(l.join(s,e),t);if(r){n.push(r)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:r,copySourceDirectory:n}}function cpDirRecursive(e,t,r,n){return a(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(t);const s=yield u.readdir(e);for(const A of s){const s=`${e}/${A}`;const a=`${t}/${A}`;const c=yield u.lstat(s);if(c.isDirectory()){yield cpDirRecursive(s,a,r,n)}else{yield copyFile(s,a,n)}}yield u.chmod(t,(yield u.stat(e)).mode)}))}function copyFile(e,t,r){return a(this,void 0,void 0,(function*(){if((yield u.lstat(e)).isSymbolicLink()){try{yield u.lstat(t);yield u.unlink(t)}catch(e){if(e.code==="EPERM"){yield u.chmod(t,"0666");yield u.unlink(t)}}const r=yield u.readlink(e);yield u.symlink(r,t,u.IS_WINDOWS?"junction":null)}else if(!(yield u.exists(t))||r){yield u.copyFile(e,t)}}))}},6160:(e,t,r)=>{(()=>{"use strict";var t={7258:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;Ae.trim()===""?"":` ${e}`)).join("\n").trim();if(n===""){throw new Error(`Input "${e}" is missing a description`)}const s=t.default?`, default: \`${t.default}\``:"";A.push(`- ${e}: _(${r}${s})_ ${n}\n`)}const l=t.indexOf("\x3c!-- BEGIN_AUTOGEN_INPUTS --\x3e");const u=t.indexOf("\x3c!-- END_AUTOGEN_INPUTS --\x3e");t.splice(l+1,u-l-1,"",...A,"");const h=Object.entries(n.outputs||{});if(h.length===0)console.warn(`action.yml outputs are empty`);const g=[];for(const[e,t]of h){const r=(t?.description||"").split("\n").map((e=>e.trim()===""?"":` ${e}`)).join("\n").trim();if(r===""){throw new Error(`Output "${e}" is missing a description`)}g.push(`- ${e}: ${r}\n`)}const p=t.indexOf("\x3c!-- BEGIN_AUTOGEN_OUTPUTS --\x3e");const C=t.indexOf("\x3c!-- END_AUTOGEN_OUTPUTS --\x3e");t.splice(p+1,C-p-1,"",...g,"");await(0,a.writeFile)("README.md",t.join("\n"),"utf8")}},9081:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.parseCredential=parseCredential;t.isServiceAccountKey=isServiceAccountKey;t.isExternalAccount=isExternalAccount;const n=r(3916);const s=r(6266);function parseCredential(e){e=(e||"").trim();if(!e){throw new Error(`Missing service account key JSON (got empty value)`)}if(!e.startsWith("{")){e=(0,s.fromBase64)(e)}try{const t=JSON.parse(e);return t}catch(e){const t=(0,n.errorMessage)(e);throw new SyntaxError(`Failed to parse service account key JSON credentials: ${t}`)}}function isServiceAccountKey(e){return e.type==="service_account"}function isExternalAccount(e){return e.type!=="external_account"}t["default"]={parseCredential:parseCredential,isServiceAccountKey:isServiceAccountKey,isExternalAccount:isExternalAccount}},3214:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A{Object.defineProperty(t,"__esModule",{value:true});t.parseCSV=parseCSV;t.parseMultilineCSV=parseMultilineCSV;function parseCSV(e){e=(e||"").trim();if(!e){return[]}const t=e.split(/(?{Object.defineProperty(t,"__esModule",{value:true});t.toBase64=toBase64;t.fromBase64=fromBase64;function toBase64(e){return Buffer.from(e).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function fromBase64(e,t){if(!t){t="utf8"}let r=e.replace(/-/g,"+").replace(/_/g,"/");while(r.length%4)r+="=";return Buffer.from(r,"base64").toString(t)}},3466:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.toEnum=toEnum;function toEnum(e,t){const r=(t||"").toUpperCase();const n=r.replace(/[\s-]+/g,"_");if(r in e){return e[r]}else if(n in e){return e[n]}else{const r=Object.keys(e);throw new Error(`Invalid value ${t}, valid values are ${JSON.stringify(r)}`)}}},8204:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.stubEnv=stubEnv;function stubEnv(e,t=process.env){const r={};for(const n in e){r[n]=t[n];if(e[n]!==undefined){t[n]=e[n]}else{delete t[n]}}return()=>{for(const e in r){if(r[e]!==undefined){t[e]=r[e]}else{delete t[e]}}}}},3916:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.errorMessage=errorMessage;t.isNotFoundError=isNotFoundError;function errorMessage(e){let t;if(e===null){t="null"}else if(e===undefined||typeof e==="undefined"){t="undefined"}else if(typeof e==="bigint"||e instanceof BigInt){t=e.toString()}else if(typeof e==="boolean"||e instanceof Boolean){t=e.toString()}else if(e instanceof Error){t=e.message}else if(typeof e==="function"||e instanceof Function){t=errorMessage(e())}else if(typeof e==="number"||e instanceof Number){t=e.toString()}else if(typeof e==="string"||e instanceof String){t=e.toString()}else if(typeof e==="symbol"||e instanceof Symbol){t=e.toString()}else if(typeof e==="object"||e instanceof Object){t=JSON.stringify(e)}else{t=String(`[${typeof e}] ${e}`)}const r=t.trim().replace("Error: ","").trim();if(!r)return"";if(r.length>1&&isUpper(r[0])&&!isUpper(r[1])){return r[0].toLowerCase()+r.slice(1)}return r}function isNotFoundError(e){const t=errorMessage(e);return t.toUpperCase().includes("ENOENT")}function isUpper(e){return e===e.toUpperCase()}},6148:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.parseFlags=parseFlags;t.readUntil=readUntil;function parseFlags(e){const t=[];let r="";let n=false;for(let s=0;s{Object.defineProperty(t,"__esModule",{value:true});t.forceRemove=forceRemove;t.isEmptyDir=isEmptyDir;t.writeSecureFile=writeSecureFile;const n=r(9896);const s=r(3916);async function forceRemove(e){try{await n.promises.rm(e,{force:true,recursive:true})}catch(t){if(!(0,s.isNotFoundError)(t)){const r=(0,s.errorMessage)(t);throw new Error(`Failed to remove "${e}": ${r}`)}}}async function isEmptyDir(e){try{const t=await n.promises.readdir(e);return t.length<=0}catch{return true}}async function writeSecureFile(e,t,r){const s=Object.assign({},{mode:416,flag:"wx",flush:true},r);await n.promises.writeFile(e,t,s);return e}},7237:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.parseGcloudIgnore=parseGcloudIgnore;const n=r(9896);const s=r(6928);const A=r(3916);async function parseGcloudIgnore(e){const t=(0,s.dirname)(e);let r=[];try{r=(await n.promises.readFile(e,{encoding:"utf8"})).toString().split(/\r?\n/).filter(shouldKeepIgnoreLine).map((e=>e.trim()))}catch(e){if(!(0,A.isNotFoundError)(e)){throw e}}for(let e=0;ee.trim()));r.splice(e,1,...l);e+=l.length}}return r}function shouldKeepIgnoreLine(e){const t=(e||"").trim();if(t===""){return false}if(t.startsWith("#")&&!t.startsWith("#!")){return false}return true}},9407:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(7258),t);s(r(9081),t);s(r(3214),t);s(r(731),t);s(r(6266),t);s(r(3466),t);s(r(8204),t);s(r(3916),t);s(r(6148),t);s(r(4772),t);s(r(7237),t);s(r(3599),t);s(r(4958),t);s(r(3716),t);s(r(7384),t);s(r(436),t);s(r(9809),t);s(r(8935),t);s(r(9834),t);s(r(6244),t);s(r(5215),t);s(r(286),t)},3599:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.parseBoolean=parseBoolean;const r={1:true,t:true,T:true,true:true,True:true,TRUE:true,0:false,f:false,F:false,false:false,False:false,FALSE:false};function parseBoolean(e,t=false){const n=(e||"").trim();if(n===""){return t}if(!(n in r)){throw new Error(`invalid boolean value "${n}"`)}return r[n]}},4958:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.joinKVString=joinKVString;t.joinKVStringForGCloud=joinKVStringForGCloud;t.parseKVString=parseKVString;t.parseKVFile=parseKVFile;t.parseKVJSON=parseKVJSON;t.parseKVYAML=parseKVYAML;t.parseKVStringAndFile=parseKVStringAndFile;const s=n(r(8815));const A=r(9896);const a=r(3916);const c=r(5215);function joinKVString(e,t=","){return Object.entries(e).map((([e,t])=>`${e}=${t}`)).join(t)}function joinKVStringForGCloud(e,t=",.!@#$%&*()_=+~`[]{}|:;<>?🚀🍪🐼​"){const r=joinKVString(e,"");if(r===""){return""}const n={};for(let e=0;er+=e;const setValue=e=>n+=e;let A=setKey;for(let a=0;a=0){A(c);s=-1}else if(c==="\\"){s=a}else if(c==="="){if(r===""){throw new Error(`Invalid start sequence for value (no preceeding key before "=") at ${a}`)}if(A===setValue){A(c)}A=setValue}else if(c==="\n"||c==="\r"||c==="\u2028"||c==="\u2029"||c===","){if(r!==""){t[r.trim()]=n.trim()}r="";n="";A=setKey}else{A(c)}}if(s>=0){throw new Error(`Unterminated escape character at ${s}`)}if(r!==""){t[r.trim()]=n.trim()}return t}function parseKVFile(e){try{const t=(0,c.presence)((0,A.readFileSync)(e,"utf8"));if(!t||t.length<1){return undefined}if(t[0]==="{"||t[0]==="["){return parseKVJSON(t)}if(t.match(/^.+=.+/gi)){return parseKVString(t)}return parseKVYAML(t)}catch(t){const r=(0,a.errorMessage)(t);throw new Error(`Failed to read file '${e}': ${r}`)}}function parseKVJSON(e){e=(e||"").trim();if(!e){return undefined}if(e==="{}"){return{}}try{const t=JSON.parse(e);const r={};for(const[e,n]of Object.entries(t)){if(typeof e!=="string"){throw new SyntaxError(`Failed to parse key "${e}", expected string, got ${typeof e}`)}if(e.trim()===""){throw new SyntaxError(`Failed to parse key "${e}", expected at least one character`)}if(typeof n!=="string"){const t=JSON.stringify(n);throw new SyntaxError(`Failed to parse value "${t}" for "${e}", expected string, got ${typeof n}`)}if(n.trim()===""){throw new SyntaxError(`Value for key "${e}" cannot be empty (got "${n}")`)}r[e]=n}return r}catch(e){const t=(0,a.errorMessage)(e);throw new Error(`Failed to parse KV pairs as JSON: ${t}`)}}function parseKVYAML(e){const t=(e||"").trim();if(!t){return undefined}if(t==="{}"){return{}}const r=s.default.parse(e);const n={};for(const[e,t]of Object.entries(r)){if(typeof e!=="string"||typeof t!=="string"){throw new SyntaxError(`env_vars_file must contain only KEY: VALUE strings. Error parsing key ${e} of type ${typeof e} with value ${t} of type ${typeof t}`)}n[e.trim()]=t.trim()}return n}function parseKVStringAndFile(e,t){e=(e||"").trim();t=(t||"").trim();const r=t?parseKVFile(t):undefined;const n=e?parseKVString(e):undefined;if(r===undefined&&n===undefined){return undefined}return Object.assign({},r,n)}},3716:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.inParallel=inParallel;const n=r(857);const s=r(3916);async function inParallel(e,t){t=Math.min(t||(0,n.cpus)().length-1);if(t<1){throw new Error(`concurrency must be at least 1`)}const r=[];const A=[];const runTasks=async e=>{for await(const[t,n]of e){try{r[t]=await n()}catch(e){A.push((0,s.errorMessage)(e))}}};const a=new Array(t).fill(e.entries()).map(runTasks);await Promise.allSettled(a);if(A.length>0){throw new Error(A.join("\n"))}return r}},7384:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.toPosixPath=toPosixPath;t.toWin32Path=toWin32Path;t.toPlatformPath=toPlatformPath;const n=r(6928);function toPosixPath(e){return e.replace(/[\\]/g,"/")}function toWin32Path(e){return e.replace(/[/]/g,"\\")}function toPlatformPath(e){return e.replace(/[/\\]/g,n.sep)}},436:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.randomFilename=randomFilename;t.randomFilepath=randomFilepath;const n=r(6928);const s=r(6982);const A=r(857);function randomFilename(e=12){return(0,s.randomBytes)(e).toString("hex")}function randomFilepath(e=(0,A.tmpdir)(),t=12){return(0,n.join)(e,randomFilename(t))}t["default"]={randomFilename:randomFilename,randomFilepath:randomFilepath}},9809:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.withRetries=withRetries;const n=r(3916);const s=r(9834);const A=100;function withRetries(e,t){const r=t.retries;const a=typeof t?.backoffLimit!=="undefined"?Math.max(t.backoffLimit,0):undefined;let c=t.backoff??A;if(typeof a!=="undefined"){c=Math.min(c,a)}return async function(){let A=r+1;let l=c;const u=a;let h=0;let g="unknown";do{try{return await e()}catch(e){g=(0,n.errorMessage)(e);--A;if(A>0){await(0,s.sleep)(l);let e=h+l;if(typeof u!=="undefined"){e=Math.min(e,Number(u))}h=l;l=e}}}while(A>0);const p=t.retries+1;const C=p===1?`1 attempt`:`${p} attempts`;throw new Error(`retry function failed after ${C}: ${g}`)}}},8935:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.setInput=setInput;t.setInputs=setInputs;t.clearInputs=clearInputs;t.clearEnv=clearEnv;t.skipIfMissingEnv=skipIfMissingEnv;t.assertMembers=assertMembers;const s=n(r(4589));function setInput(e,t){const r=`INPUT_${e.replace(/ /g,"_").toUpperCase()}`;process.env[r]=t}function setInputs(e){Object.entries(e).forEach((([e,t])=>setInput(e,t)))}function clearInputs(){clearEnv((e=>e.startsWith(`INPUT_`)))}function clearEnv(e){Object.keys(process.env).forEach((t=>{if(e(t,process.env[t])){delete process.env[t]}}))}function skipIfMissingEnv(...e){for(const t of e){if(!(t in process.env)){return`missing $${t}`}}return false}function assertMembers(e,t){for(let r=0;r<=e.length-t.length;r++){let n=true;for(let s=0;s{Object.defineProperty(t,"__esModule",{value:true});t.parseDuration=parseDuration;t.sleep=sleep;function parseDuration(e){e=(e||"").trim();if(!e){return 0}let t=0;let r="";for(let n=0;nsetTimeout(t,e)))}},6244:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.expandUniverseEndpoints=expandUniverseEndpoints;function expandUniverseEndpoints(e,t="googleapis.com"){const r=Object.assign({});for(const n in e){const s=`GHA_ENDPOINT_OVERRIDE_${n}`;const A=process.env[s];if(A&&A!==""){r[n]=A.replace(/\/+$/,"")}else{r[n]=e[n].replace(/{universe}/g,t).replace(/\/+$/,"")}}return r}},5215:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.presence=presence;t.exactlyOneOf=exactlyOneOf;t.allOf=allOf;function presence(e){return(e||"").trim()||undefined}function exactlyOneOf(...e){e=e||[];let t=false;for(let r=0;r{Object.defineProperty(t,"__esModule",{value:true});t.isPinnedToHead=isPinnedToHead;t.pinnedToHeadWarning=pinnedToHeadWarning;function isPinnedToHead(){const e=process.env.GITHUB_ACTION_REF;return e==="master"||e==="main"}function pinnedToHeadWarning(e){const t=process.env.GITHUB_ACTION_REF;const r=process.env.GITHUB_ACTION_REPOSITORY;return`${r} is pinned at "${t}". We strongly advise against `+`pinning to "@${t}" as it may be unstable. Please update your `+`GitHub Action YAML from:\n`+`\n`+` uses: '${r}@${t}'\n`+`\n`+`to:\n`+`\n`+` uses: '${r}@${e}'\n`+`\n`+`Alternatively, you can pin to any git tag or git SHA in the repository.`}},181:e=>{e.exports=r(181)},6982:e=>{e.exports=r(6982)},9896:e=>{e.exports=r(9896)},1943:e=>{e.exports=r(1943)},4589:e=>{e.exports=r(4589)},857:e=>{e.exports=r(857)},6928:e=>{e.exports=r(6928)},932:e=>{e.exports=r(932)},1493:e=>{e.exports=r(1493)},7349:(e,t,r)=>{var n=r(1127);var s=r(3301);var A=r(4454);var a=r(2223);var c=r(7103);var l=r(334);var u=r(3142);function resolveCollection(e,t,r,n,s,A){const a=r.type==="block-map"?c.resolveBlockMap(e,t,r,n,A):r.type==="block-seq"?l.resolveBlockSeq(e,t,r,n,A):u.resolveFlowCollection(e,t,r,n,A);const h=a.constructor;if(s==="!"||s===h.tagName){a.tag=h.tagName;return a}if(s)a.tag=s;return a}function composeCollection(e,t,r,c,l){const u=c.tag;const h=!u?null:t.directives.tagName(u.source,(e=>l(u,"TAG_RESOLVE_FAILED",e)));if(r.type==="block-seq"){const{anchor:e,newlineAfterProp:t}=c;const r=e&&u?e.offset>u.offset?e:u:e??u;if(r&&(!t||t.offsete.tag===h&&e.collection===g));if(!p){const n=t.schema.knownTags[h];if(n&&n.collection===g){t.schema.tags.push(Object.assign({},n,{default:false}));p=n}else{if(n){l(u,"BAD_COLLECTION_TYPE",`${n.tag} used for ${g} collection, but expects ${n.collection??"scalar"}`,true)}else{l(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${h}`,true)}return resolveCollection(e,t,r,l,h)}}const C=resolveCollection(e,t,r,l,h,p);const y=p.resolve?.(C,(e=>l(u,"TAG_RESOLVE_FAILED",e)),t.options)??C;const I=n.isNode(y)?y:new s.Scalar(y);I.range=C.range;I.tag=h;if(p?.format)I.format=p.format;return I}t.composeCollection=composeCollection},3683:(e,t,r)=>{var n=r(3021);var s=r(5937);var A=r(7788);var a=r(4631);function composeDoc(e,t,{offset:r,start:c,value:l,end:u},h){const g=Object.assign({_directives:t},e);const p=new n.Document(undefined,g);const C={atKey:false,atRoot:true,directives:p.directives,options:p.options,schema:p.schema};const y=a.resolveProps(c,{indicator:"doc-start",next:l??u?.[0],offset:r,onError:h,parentIndent:0,startOnNewline:true});if(y.found){p.directives.docStart=true;if(l&&(l.type==="block-map"||l.type==="block-seq")&&!y.hasNewline)h(y.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}p.contents=l?s.composeNode(C,l,y,h):s.composeEmptyNode(C,y.end,c,null,y,h);const I=p.contents.range[2];const B=A.resolveEnd(u,I,false,h);if(B.comment)p.comment=B.comment;p.range=[r,I,B.offset];return p}t.composeDoc=composeDoc},5937:(e,t,r)=>{var n=r(4065);var s=r(1127);var A=r(7349);var a=r(5413);var c=r(7788);var l=r(2599);const u={composeNode:composeNode,composeEmptyNode:composeEmptyNode};function composeNode(e,t,r,n){const c=e.atKey;const{spaceBefore:l,comment:h,anchor:g,tag:p}=r;let C;let y=true;switch(t.type){case"alias":C=composeAlias(e,t,n);if(g||p)n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":C=a.composeScalar(e,t,p,n);if(g)C.anchor=g.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":C=A.composeCollection(u,e,t,r,n);if(g)C.anchor=g.source.substring(1);break;default:{const s=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;n(t,"UNEXPECTED_TOKEN",s);C=composeEmptyNode(e,t.offset,undefined,null,r,n);y=false}}if(g&&C.anchor==="")n(g,"BAD_ALIAS","Anchor cannot be an empty string");if(c&&e.options.stringKeys&&(!s.isScalar(C)||typeof C.value!=="string"||C.tag&&C.tag!=="tag:yaml.org,2002:str")){const e="With stringKeys, all keys must be strings";n(p??t,"NON_STRING_KEY",e)}if(l)C.spaceBefore=true;if(h){if(t.type==="scalar"&&t.source==="")C.comment=h;else C.commentBefore=h}if(e.options.keepSourceTokens&&y)C.srcToken=t;return C}function composeEmptyNode(e,t,r,n,{spaceBefore:s,comment:A,anchor:c,tag:u,end:h},g){const p={type:"scalar",offset:l.emptyScalarPosition(t,r,n),indent:-1,source:""};const C=a.composeScalar(e,p,u,g);if(c){C.anchor=c.source.substring(1);if(C.anchor==="")g(c,"BAD_ALIAS","Anchor cannot be an empty string")}if(s)C.spaceBefore=true;if(A){C.comment=A;C.range[2]=h}return C}function composeAlias({options:e},{offset:t,source:r,end:s},A){const a=new n.Alias(r.substring(1));if(a.source==="")A(t,"BAD_ALIAS","Alias cannot be an empty string");if(a.source.endsWith(":"))A(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",true);const l=t+r.length;const u=c.resolveEnd(s,l,e.strict,A);a.range=[t,l,u.offset];if(u.comment)a.comment=u.comment;return a}t.composeEmptyNode=composeEmptyNode;t.composeNode=composeNode},5413:(e,t,r)=>{var n=r(1127);var s=r(3301);var A=r(8913);var a=r(6842);function composeScalar(e,t,r,c){const{value:l,type:u,comment:h,range:g}=t.type==="block-scalar"?A.resolveBlockScalar(e,t,c):a.resolveFlowScalar(t,e.options.strict,c);const p=r?e.directives.tagName(r.source,(e=>c(r,"TAG_RESOLVE_FAILED",e))):null;let C;if(e.options.stringKeys&&e.atKey){C=e.schema[n.SCALAR]}else if(p)C=findScalarTagByName(e.schema,l,p,r,c);else if(t.type==="scalar")C=findScalarTagByTest(e,l,t,c);else C=e.schema[n.SCALAR];let y;try{const A=C.resolve(l,(e=>c(r??t,"TAG_RESOLVE_FAILED",e)),e.options);y=n.isScalar(A)?A:new s.Scalar(A)}catch(e){const n=e instanceof Error?e.message:String(e);c(r??t,"TAG_RESOLVE_FAILED",n);y=new s.Scalar(l)}y.range=g;y.source=l;if(u)y.type=u;if(p)y.tag=p;if(C.format)y.format=C.format;if(h)y.comment=h;return y}function findScalarTagByName(e,t,r,s,A){if(r==="!")return e[n.SCALAR];const a=[];for(const t of e.tags){if(!t.collection&&t.tag===r){if(t.default&&t.test)a.push(t);else return t}}for(const e of a)if(e.test?.test(t))return e;const c=e.knownTags[r];if(c&&!c.collection){e.tags.push(Object.assign({},c,{default:false,test:undefined}));return c}A(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str");return e[n.SCALAR]}function findScalarTagByTest({atKey:e,directives:t,schema:r},s,A,a){const c=r.tags.find((t=>(t.default===true||e&&t.default==="key")&&t.test?.test(s)))||r[n.SCALAR];if(r.compat){const e=r.compat.find((e=>e.default&&e.test?.test(s)))??r[n.SCALAR];if(c.tag!==e.tag){const r=t.tagString(c.tag);const n=t.tagString(e.tag);const s=`Value may be parsed as either ${r} or ${n}`;a(A,"TAG_RESOLVE_FAILED",s,true)}}return c}t.composeScalar=composeScalar},9984:(e,t,r)=>{var n=r(932);var s=r(1342);var A=r(3021);var a=r(1464);var c=r(1127);var l=r(3683);var u=r(7788);function getErrorPos(e){if(typeof e==="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:r}=e;return[t,t+(typeof r==="string"?r.length:1)]}function parsePrelude(e){let t="";let r=false;let n=false;for(let s=0;s{const s=getErrorPos(e);if(n)this.warnings.push(new a.YAMLWarning(s,t,r));else this.errors.push(new a.YAMLParseError(s,t,r))};this.directives=new s.Directives({version:e.version||"1.2"});this.options=e}decorate(e,t){const{comment:r,afterEmptyLine:n}=parsePrelude(this.prelude);if(r){const s=e.contents;if(t){e.comment=e.comment?`${e.comment}\n${r}`:r}else if(n||e.directives.docStart||!s){e.commentBefore=r}else if(c.isCollection(s)&&!s.flow&&s.items.length>0){let e=s.items[0];if(c.isPair(e))e=e.key;const t=e.commentBefore;e.commentBefore=t?`${r}\n${t}`:r}else{const e=s.commentBefore;s.commentBefore=e?`${r}\n${e}`:r}}if(t){Array.prototype.push.apply(e.errors,this.errors);Array.prototype.push.apply(e.warnings,this.warnings)}else{e.errors=this.errors;e.warnings=this.warnings}this.prelude=[];this.errors=[];this.warnings=[]}streamInfo(){return{comment:parsePrelude(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=false,r=-1){for(const t of e)yield*this.next(t);yield*this.end(t,r)}*next(e){if(n.env.LOG_STREAM)console.dir(e,{depth:null});switch(e.type){case"directive":this.directives.add(e.source,((t,r,n)=>{const s=getErrorPos(e);s[0]+=t;this.onError(s,"BAD_DIRECTIVE",r,n)}));this.prelude.push(e.source);this.atDirectives=true;break;case"document":{const t=l.composeDoc(this.options,this.directives,e,this.onError);if(this.atDirectives&&!t.directives.docStart)this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line");this.decorate(t,false);if(this.doc)yield this.doc;this.doc=t;this.atDirectives=false;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message;const r=new a.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",t);if(this.atDirectives||!this.doc)this.errors.push(r);else this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new a.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=true;const t=u.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);this.decorate(this.doc,true);if(t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new a.YAMLParseError(getErrorPos(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=false,t=-1){if(this.doc){this.decorate(this.doc,true);yield this.doc;this.doc=null}else if(e){const e=Object.assign({_directives:this.directives},this.options);const r=new A.Document(undefined,e);if(this.atDirectives)this.onError(t,"MISSING_CHAR","Missing directives-end indicator line");r.range=[0,t,t];this.decorate(r,false);yield r}}}t.Composer=Composer},7103:(e,t,r)=>{var n=r(7165);var s=r(4454);var A=r(4631);var a=r(9499);var c=r(4051);var l=r(1187);const u="All mapping items must start at the same column";function resolveBlockMap({composeNode:e,composeEmptyNode:t},r,h,g,p){const C=p?.nodeClass??s.YAMLMap;const y=new C(r.schema);if(r.atRoot)r.atRoot=false;let I=h.offset;let B=null;for(const s of h.items){const{start:p,key:C,sep:Q,value:b}=s;const w=A.resolveProps(p,{indicator:"explicit-key-ind",next:C??Q?.[0],offset:I,onError:g,parentIndent:h.indent,startOnNewline:true});const S=!w.found;if(S){if(C){if(C.type==="block-seq")g(I,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in C&&C.indent!==h.indent)g(I,"BAD_INDENT",u)}if(!w.anchor&&!w.tag&&!Q){B=w.end;if(w.comment){if(y.comment)y.comment+="\n"+w.comment;else y.comment=w.comment}continue}if(w.newlineAfterProp||a.containsNewline(C)){g(C??p[p.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}}else if(w.found?.indent!==h.indent){g(I,"BAD_INDENT",u)}r.atKey=true;const k=w.end;const v=C?e(r,C,w,g):t(r,k,p,null,w,g);if(r.schema.compat)c.flowIndentCheck(h.indent,C,g);r.atKey=false;if(l.mapIncludes(r,y.items,v))g(k,"DUPLICATE_KEY","Map keys must be unique");const R=A.resolveProps(Q??[],{indicator:"map-value-ind",next:b,offset:v.range[2],onError:g,parentIndent:h.indent,startOnNewline:!C||C.type==="block-scalar"});I=R.end;if(R.found){if(S){if(b?.type==="block-map"&&!R.hasNewline)g(I,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(r.options.strict&&w.start{var n=r(3301);function resolveBlockScalar(e,t,r){const s=t.offset;const A=parseBlockScalarHeader(t,e.options.strict,r);if(!A)return{value:"",type:null,comment:"",range:[s,s,s]};const a=A.mode===">"?n.Scalar.BLOCK_FOLDED:n.Scalar.BLOCK_LITERAL;const c=t.source?splitLines(t.source):[];let l=c.length;for(let e=c.length-1;e>=0;--e){const t=c[e][1];if(t===""||t==="\r")l=e;else break}if(l===0){const e=A.chomp==="+"&&c.length>0?"\n".repeat(Math.max(1,c.length-1)):"";let r=s+A.length;if(t.source)r+=t.source.length;return{value:e,type:a,comment:A.comment,range:[s,r,r]}}let u=t.indent+A.indent;let h=t.offset+A.length;let g=0;for(let t=0;tu)u=n.length}else{if(n.length=l;--e){if(c[e][0].length>u)l=e+1}let p="";let C="";let y=false;for(let e=0;eu||s[0]==="\t"){if(C===" ")C="\n";else if(!y&&C==="\n")C="\n\n";p+=C+t.slice(u)+s;C="\n";y=true}else if(s===""){if(C==="\n")p+="\n";else C="\n"}else{p+=C+s;C=" ";y=false}}switch(A.chomp){case"-":break;case"+":for(let e=l;e{var n=r(2223);var s=r(4631);var A=r(4051);function resolveBlockSeq({composeNode:e,composeEmptyNode:t},r,a,c,l){const u=l?.nodeClass??n.YAMLSeq;const h=new u(r.schema);if(r.atRoot)r.atRoot=false;if(r.atKey)r.atKey=false;let g=a.offset;let p=null;for(const{start:n,value:l}of a.items){const u=s.resolveProps(n,{indicator:"seq-item-ind",next:l,offset:g,onError:c,parentIndent:a.indent,startOnNewline:true});if(!u.found){if(u.anchor||u.tag||l){if(l&&l.type==="block-seq")c(u.end,"BAD_INDENT","All sequence items must start at the same column");else c(g,"MISSING_CHAR","Sequence item without - indicator")}else{p=u.end;if(u.comment)h.comment=u.comment;continue}}const C=l?e(r,l,u,c):t(r,u.end,n,null,u,c);if(r.schema.compat)A.flowIndentCheck(a.indent,l,c);g=C.range[2];h.items.push(C)}h.range=[a.offset,g,p??g];return h}t.resolveBlockSeq=resolveBlockSeq},7788:(e,t)=>{function resolveEnd(e,t,r,n){let s="";if(e){let A=false;let a="";for(const c of e){const{source:e,type:l}=c;switch(l){case"space":A=true;break;case"comment":{if(r&&!A)n(c,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";if(!s)s=t;else s+=a+t;a="";break}case"newline":if(s)a+=e;A=true;break;default:n(c,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:s,offset:t}}t.resolveEnd=resolveEnd},3142:(e,t,r)=>{var n=r(1127);var s=r(7165);var A=r(4454);var a=r(2223);var c=r(7788);var l=r(4631);var u=r(9499);var h=r(1187);const g="Block collections are not allowed within flow collections";const isBlock=e=>e&&(e.type==="block-map"||e.type==="block-seq");function resolveFlowCollection({composeNode:e,composeEmptyNode:t},r,p,C,y){const I=p.start.source==="{";const B=I?"flow map":"flow sequence";const Q=y?.nodeClass??(I?A.YAMLMap:a.YAMLSeq);const b=new Q(r.schema);b.flow=true;const w=r.atRoot;if(w)r.atRoot=false;if(r.atKey)r.atKey=false;let S=p.offset+p.start.source.length;for(let a=0;a0){const e=c.resolveEnd(R,D,r.options.strict,C);if(e.comment){if(b.comment)b.comment+="\n"+e.comment;else b.comment=e.comment}b.range=[p.offset,D,e.offset]}else{b.range=[p.offset,D,D]}return b}t.resolveFlowCollection=resolveFlowCollection},6842:(e,t,r)=>{var n=r(3301);var s=r(7788);function resolveFlowScalar(e,t,r){const{offset:A,type:a,source:c,end:l}=e;let u;let h;const _onError=(e,t,n)=>r(A+e,t,n);switch(a){case"scalar":u=n.Scalar.PLAIN;h=plainValue(c,_onError);break;case"single-quoted-scalar":u=n.Scalar.QUOTE_SINGLE;h=singleQuotedValue(c,_onError);break;case"double-quoted-scalar":u=n.Scalar.QUOTE_DOUBLE;h=doubleQuotedValue(c,_onError);break;default:r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`);return{value:"",type:null,comment:"",range:[A,A+c.length,A+c.length]}}const g=A+c.length;const p=s.resolveEnd(l,g,t,r);return{value:h,type:u,comment:p.comment,range:[A,g,p.offset]}}function plainValue(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${e[0]}`;break}case"@":case"`":{r=`reserved character ${e[0]}`;break}}if(r)t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`);return foldLines(e)}function singleQuotedValue(e,t){if(e[e.length-1]!=="'"||e.length===1)t(e.length,"MISSING_CHAR","Missing closing 'quote");return foldLines(e.slice(1,-1)).replace(/''/g,"'")}function foldLines(e){let t,r;try{t=new RegExp("(.*?)(?t?e.slice(t,n+1):s}else{r+=s}}if(e[e.length-1]!=='"'||e.length===1)t(e.length,"MISSING_CHAR",'Missing closing "quote');return r}function foldNewline(e,t){let r="";let n=e[t+1];while(n===" "||n==="\t"||n==="\n"||n==="\r"){if(n==="\r"&&e[t+2]!=="\n")break;if(n==="\n")r+="\n";t+=1;n=e[t+1]}if(!r)r=" ";return{fold:r,offset:t}}const A={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function parseCharCode(e,t,r,n){const s=e.substr(t,r);const A=s.length===r&&/^[0-9a-fA-F]+$/.test(s);const a=A?parseInt(s,16):NaN;if(isNaN(a)){const s=e.substr(t-2,r+2);n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`);return s}return String.fromCodePoint(a)}t.resolveFlowScalar=resolveFlowScalar},4631:(e,t)=>{function resolveProps(e,{flow:t,indicator:r,next:n,offset:s,onError:A,parentIndent:a,startOnNewline:c}){let l=false;let u=c;let h=c;let g="";let p="";let C=false;let y=false;let I=null;let B=null;let Q=null;let b=null;let w=null;let S=null;let k=null;for(const s of e){if(y){if(s.type!=="space"&&s.type!=="newline"&&s.type!=="comma")A(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");y=false}if(I){if(u&&s.type!=="comment"&&s.type!=="newline"){A(I,"TAB_AS_INDENT","Tabs are not allowed as indentation")}I=null}switch(s.type){case"space":if(!t&&(r!=="doc-start"||n?.type!=="flow-collection")&&s.source.includes("\t")){I=s}h=true;break;case"comment":{if(!h)A(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=s.source.substring(1)||" ";if(!g)g=e;else g+=p+e;p="";u=false;break}case"newline":if(u){if(g)g+=s.source;else if(!S||r!=="seq-item-ind")l=true}else p+=s.source;u=true;C=true;if(B||Q)b=s;h=true;break;case"anchor":if(B)A(s,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(s.source.endsWith(":"))A(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",true);B=s;k??(k=s.offset);u=false;h=false;y=true;break;case"tag":{if(Q)A(s,"MULTIPLE_TAGS","A node can have at most one tag");Q=s;k??(k=s.offset);u=false;h=false;y=true;break}case r:if(B||Q)A(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`);if(S)A(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${t??"collection"}`);S=s;u=r==="seq-item-ind"||r==="explicit-key-ind";h=false;break;case"comma":if(t){if(w)A(s,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`);w=s;u=false;h=false;break}default:A(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`);u=false;h=false}}const v=e[e.length-1];const R=v?v.offset+v.source.length:s;if(y&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")){A(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space")}if(I&&(u&&I.indent<=a||n?.type==="block-map"||n?.type==="block-seq"))A(I,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:w,found:S,spaceBefore:l,comment:g,hasNewline:C,anchor:B,tag:Q,newlineAfterProp:b,end:R,start:k??R}}t.resolveProps=resolveProps},9499:(e,t)=>{function containsNewline(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return true;if(e.end)for(const t of e.end)if(t.type==="newline")return true;return false;case"flow-collection":for(const t of e.items){for(const e of t.start)if(e.type==="newline")return true;if(t.sep)for(const e of t.sep)if(e.type==="newline")return true;if(containsNewline(t.key)||containsNewline(t.value))return true}return false;default:return true}}t.containsNewline=containsNewline},2599:(e,t)=>{function emptyScalarPosition(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let r=t[n];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}r=t[++n];while(r?.type==="space"){e+=r.source.length;r=t[++n]}break}}return e}t.emptyScalarPosition=emptyScalarPosition},4051:(e,t,r)=>{var n=r(9499);function flowIndentCheck(e,t,r){if(t?.type==="flow-collection"){const s=t.end[0];if(s.indent===e&&(s.source==="]"||s.source==="}")&&n.containsNewline(t)){const e="Flow end indicator should be more indented than parent";r(s,"BAD_INDENT",e,true)}}}t.flowIndentCheck=flowIndentCheck},1187:(e,t,r)=>{var n=r(1127);function mapIncludes(e,t,r){const{uniqueKeys:s}=e.options;if(s===false)return false;const A=typeof s==="function"?s:(e,t)=>e===t||n.isScalar(e)&&n.isScalar(t)&&e.value===t.value;return t.some((e=>A(e.key,r)))}t.mapIncludes=mapIncludes},3021:(e,t,r)=>{var n=r(4065);var s=r(101);var A=r(1127);var a=r(7165);var c=r(4043);var l=r(5840);var u=r(6829);var h=r(1596);var g=r(3661);var p=r(2404);var C=r(1342);class Document{constructor(e,t,r){this.commentBefore=null;this.comment=null;this.errors=[];this.warnings=[];Object.defineProperty(this,A.NODE_TYPE,{value:A.DOC});let n=null;if(typeof t==="function"||Array.isArray(t)){n=t}else if(r===undefined&&t){r=t;t=undefined}const s=Object.assign({intAsBigInt:false,keepSourceTokens:false,logLevel:"warn",prettyErrors:true,strict:true,stringKeys:false,uniqueKeys:true,version:"1.2"},r);this.options=s;let{version:a}=s;if(r?._directives){this.directives=r._directives.atDocument();if(this.directives.yaml.explicit)a=this.directives.yaml.version}else this.directives=new C.Directives({version:a});this.setSchema(a,r);this.contents=e===undefined?null:this.createNode(e,n,r)}clone(){const e=Object.create(Document.prototype,{[A.NODE_TYPE]:{value:A.DOC}});e.commentBefore=this.commentBefore;e.comment=this.comment;e.errors=this.errors.slice();e.warnings=this.warnings.slice();e.options=Object.assign({},this.options);if(this.directives)e.directives=this.directives.clone();e.schema=this.schema.clone();e.contents=A.isNode(this.contents)?this.contents.clone(e.schema):this.contents;if(this.range)e.range=this.range.slice();return e}add(e){if(assertCollection(this.contents))this.contents.add(e)}addIn(e,t){if(assertCollection(this.contents))this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const r=h.anchorNames(this);e.anchor=!t||r.has(t)?h.findNewAnchor(t||"a",r):t}return new n.Alias(e.anchor)}createNode(e,t,r){let n=undefined;if(typeof t==="function"){e=t.call({"":e},"",e);n=t}else if(Array.isArray(t)){const keyToStr=e=>typeof e==="number"||e instanceof String||e instanceof Number;const e=t.filter(keyToStr).map(String);if(e.length>0)t=t.concat(e);n=t}else if(r===undefined&&t){r=t;t=undefined}const{aliasDuplicateObjects:s,anchorPrefix:a,flow:c,keepUndefined:l,onTagObj:u,tag:g}=r??{};const{onAnchor:C,setAnchors:y,sourceObjects:I}=h.createNodeAnchors(this,a||"a");const B={aliasDuplicateObjects:s??true,keepUndefined:l??false,onAnchor:C,onTagObj:u,replacer:n,schema:this.schema,sourceObjects:I};const Q=p.createNode(e,g,B);if(c&&A.isCollection(Q))Q.flow=true;y();return Q}createPair(e,t,r={}){const n=this.createNode(e,null,r);const s=this.createNode(t,null,r);return new a.Pair(n,s)}delete(e){return assertCollection(this.contents)?this.contents.delete(e):false}deleteIn(e){if(s.isEmptyPath(e)){if(this.contents==null)return false;this.contents=null;return true}return assertCollection(this.contents)?this.contents.deleteIn(e):false}get(e,t){return A.isCollection(this.contents)?this.contents.get(e,t):undefined}getIn(e,t){if(s.isEmptyPath(e))return!t&&A.isScalar(this.contents)?this.contents.value:this.contents;return A.isCollection(this.contents)?this.contents.getIn(e,t):undefined}has(e){return A.isCollection(this.contents)?this.contents.has(e):false}hasIn(e){if(s.isEmptyPath(e))return this.contents!==undefined;return A.isCollection(this.contents)?this.contents.hasIn(e):false}set(e,t){if(this.contents==null){this.contents=s.collectionFromPath(this.schema,[e],t)}else if(assertCollection(this.contents)){this.contents.set(e,t)}}setIn(e,t){if(s.isEmptyPath(e)){this.contents=t}else if(this.contents==null){this.contents=s.collectionFromPath(this.schema,Array.from(e),t)}else if(assertCollection(this.contents)){this.contents.setIn(e,t)}}setSchema(e,t={}){if(typeof e==="number")e=String(e);let r;switch(e){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new C.Directives({version:"1.1"});r={resolveKnownTags:false,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=e;else this.directives=new C.Directives({version:e});r={resolveKnownTags:true,schema:"core"};break;case null:if(this.directives)delete this.directives;r=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(r)this.schema=new l.Schema(Object.assign(r,t));else throw new Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:s,reviver:A}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:r===true,mapKeyWarned:false,maxAliasCount:typeof n==="number"?n:100};const l=c.toJS(this.contents,t??"",a);if(typeof s==="function")for(const{count:e,res:t}of a.anchors.values())s(t,e);return typeof A==="function"?g.applyReviver(A,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:true,jsonArg:e,mapAsMap:false,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return u.stringifyDocument(this,e)}}function assertCollection(e){if(A.isCollection(e))return true;throw new Error("Expected a YAML collection as document contents")}t.Document=Document},1596:(e,t,r)=>{var n=r(1127);var s=r(204);function anchorIsValid(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);const r=`Anchor must not contain whitespace or control characters: ${t}`;throw new Error(r)}return true}function anchorNames(e){const t=new Set;s.visit(e,{Value(e,r){if(r.anchor)t.add(r.anchor)}});return t}function findNewAnchor(e,t){for(let r=1;true;++r){const n=`${e}${r}`;if(!t.has(n))return n}}function createNodeAnchors(e,t){const r=[];const s=new Map;let A=null;return{onAnchor:n=>{r.push(n);A??(A=anchorNames(e));const s=findNewAnchor(t,A);A.add(s);return s},setAnchors:()=>{for(const e of r){const t=s.get(e);if(typeof t==="object"&&t.anchor&&(n.isScalar(t.node)||n.isCollection(t.node))){t.node.anchor=t.anchor}else{const t=new Error("Failed to resolve repeated object (this should not happen)");t.source=e;throw t}}},sourceObjects:s}}t.anchorIsValid=anchorIsValid;t.anchorNames=anchorNames;t.createNodeAnchors=createNodeAnchors;t.findNewAnchor=findNewAnchor},3661:(e,t)=>{function applyReviver(e,t,r,n){if(n&&typeof n==="object"){if(Array.isArray(n)){for(let t=0,r=n.length;t{var n=r(4065);var s=r(1127);var A=r(3301);const a="tag:yaml.org,2002:";function findTagObject(e,t,r){if(t){const e=r.filter((e=>e.tag===t));const n=e.find((e=>!e.format))??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find((t=>t.identify?.(e)&&!t.format))}function createNode(e,t,r){if(s.isDocument(e))e=e.contents;if(s.isNode(e))return e;if(s.isPair(e)){const t=r.schema[s.MAP].createNode?.(r.schema,null,r);t.items.push(e);return t}if(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt!=="undefined"&&e instanceof BigInt){e=e.valueOf()}const{aliasDuplicateObjects:c,onAnchor:l,onTagObj:u,schema:h,sourceObjects:g}=r;let p=undefined;if(c&&e&&typeof e==="object"){p=g.get(e);if(p){p.anchor??(p.anchor=l(e));return new n.Alias(p.anchor)}else{p={anchor:null,node:null};g.set(e,p)}}if(t?.startsWith("!!"))t=a+t.slice(2);let C=findTagObject(e,t,h.tags);if(!C){if(e&&typeof e.toJSON==="function"){e=e.toJSON()}if(!e||typeof e!=="object"){const t=new A.Scalar(e);if(p)p.node=t;return t}C=e instanceof Map?h[s.MAP]:Symbol.iterator in Object(e)?h[s.SEQ]:h[s.MAP]}if(u){u(C);delete r.onTagObj}const y=C?.createNode?C.createNode(r.schema,e,r):typeof C?.nodeClass?.from==="function"?C.nodeClass.from(r.schema,e,r):new A.Scalar(e);if(t)y.tag=t;else if(!C.default)y.tag=C.tag;if(p)p.node=y;return y}t.createNode=createNode},1342:(e,t,r)=>{var n=r(1127);var s=r(204);const A={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};const escapeTagName=e=>e.replace(/[!,[\]{}]/g,(e=>A[e]));class Directives{constructor(e,t){this.docStart=null;this.docEnd=false;this.yaml=Object.assign({},Directives.defaultYaml,e);this.tags=Object.assign({},Directives.defaultTags,t)}clone(){const e=new Directives(this.yaml,this.tags);e.docStart=this.docStart;return e}atDocument(){const e=new Directives(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false;this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.2"};this.tags=Object.assign({},Directives.defaultTags);break}return e}add(e,t){if(this.atNextDocument){this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.1"};this.tags=Object.assign({},Directives.defaultTags);this.atNextDocument=false}const r=e.trim().split(/[ \t]+/);const n=r.shift();switch(n){case"%TAG":{if(r.length!==2){t(0,"%TAG directive should contain exactly two parts");if(r.length<2)return false}const[e,n]=r;this.tags[e]=n;return true}case"%YAML":{this.yaml.explicit=true;if(r.length!==1){t(0,"%YAML directive should contain exactly one part");return false}const[e]=r;if(e==="1.1"||e==="1.2"){this.yaml.version=e;return true}else{const r=/^\d+\.\d+$/.test(e);t(6,`Unsupported YAML version ${e}`,r);return false}}default:t(0,`Unknown directive ${n}`,true);return false}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!"){t(`Not a valid tag: ${e}`);return null}if(e[1]==="<"){const r=e.slice(2,-1);if(r==="!"||r==="!!"){t(`Verbatim tags aren't resolved, so ${e} is invalid.`);return null}if(e[e.length-1]!==">")t("Verbatim tags must end with a >");return r}const[,r,n]=e.match(/^(.*!)([^!]*)$/s);if(!n)t(`The ${e} tag has no suffix`);const s=this.tags[r];if(s){try{return s+decodeURIComponent(n)}catch(e){t(String(e));return null}}if(r==="!")return e;t(`Could not resolve tag: ${e}`);return null}tagString(e){for(const[t,r]of Object.entries(this.tags)){if(e.startsWith(r))return t+escapeTagName(e.substring(r.length))}return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[];const r=Object.entries(this.tags);let A;if(e&&r.length>0&&n.isNode(e.contents)){const t={};s.visit(e.contents,((e,r)=>{if(n.isNode(r)&&r.tag)t[r.tag]=true}));A=Object.keys(t)}else A=[];for(const[n,s]of r){if(n==="!!"&&s==="tag:yaml.org,2002:")continue;if(!e||A.some((e=>e.startsWith(s))))t.push(`%TAG ${n} ${s}`)}return t.join("\n")}}Directives.defaultYaml={explicit:false,version:"1.2"};Directives.defaultTags={"!!":"tag:yaml.org,2002:"};t.Directives=Directives},1464:(e,t)=>{class YAMLError extends Error{constructor(e,t,r,n){super();this.name=e;this.code=r;this.message=n;this.pos=t}}class YAMLParseError extends YAMLError{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class YAMLWarning extends YAMLError{constructor(e,t,r){super("YAMLWarning",e,t,r)}}const prettifyError=(e,t)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map((e=>t.linePos(e)));const{line:n,col:s}=r.linePos[0];r.message+=` at line ${n}, column ${s}`;let A=s-1;let a=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(A>=60&&a.length>80){const e=Math.min(A-39,a.length-79);a="…"+a.substring(e);A-=e-1}if(a.length>80)a=a.substring(0,79)+"…";if(n>1&&/^ *$/.test(a.substring(0,A))){let r=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);if(r.length>80)r=r.substring(0,79)+"…\n";a=r+a}if(/[^ ]/.test(a)){let e=1;const t=r.linePos[1];if(t&&t.line===n&&t.col>s){e=Math.max(1,Math.min(t.col-s,80-A))}const c=" ".repeat(A)+"^".repeat(e);r.message+=`:\n\n${a}\n${c}\n`}};t.YAMLError=YAMLError;t.YAMLParseError=YAMLParseError;t.YAMLWarning=YAMLWarning;t.prettifyError=prettifyError},8815:(e,t,r)=>{var n=r(9984);var s=r(3021);var A=r(5840);var a=r(1464);var c=r(4065);var l=r(1127);var u=r(7165);var h=r(3301);var g=r(4454);var p=r(2223);var C=r(3461);var y=r(361);var I=r(6628);var B=r(3456);var Q=r(4047);var b=r(204);t.Composer=n.Composer;t.Document=s.Document;t.Schema=A.Schema;t.YAMLError=a.YAMLError;t.YAMLParseError=a.YAMLParseError;t.YAMLWarning=a.YAMLWarning;t.Alias=c.Alias;t.isAlias=l.isAlias;t.isCollection=l.isCollection;t.isDocument=l.isDocument;t.isMap=l.isMap;t.isNode=l.isNode;t.isPair=l.isPair;t.isScalar=l.isScalar;t.isSeq=l.isSeq;t.Pair=u.Pair;t.Scalar=h.Scalar;t.YAMLMap=g.YAMLMap;t.YAMLSeq=p.YAMLSeq;t.CST=C;t.Lexer=y.Lexer;t.LineCounter=I.LineCounter;t.Parser=B.Parser;t.parse=Q.parse;t.parseAllDocuments=Q.parseAllDocuments;t.parseDocument=Q.parseDocument;t.stringify=Q.stringify;t.visit=b.visit;t.visitAsync=b.visitAsync},7249:(e,t,r)=>{var n=r(932);function debug(e,...t){if(e==="debug")console.log(...t)}function warn(e,t){if(e==="debug"||e==="warn"){if(typeof n.emitWarning==="function")n.emitWarning(t);else console.warn(t)}}t.debug=debug;t.warn=warn},4065:(e,t,r)=>{var n=r(1596);var s=r(204);var A=r(1127);var a=r(6673);var c=r(4043);class Alias extends a.NodeBase{constructor(e){super(A.ALIAS);this.source=e;Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){let r;if(t?.aliasResolveCache){r=t.aliasResolveCache}else{r=[];s.visit(e,{Node:(e,t)=>{if(A.isAlias(t)||A.hasAnchor(t))r.push(t)}});if(t)t.aliasResolveCache=r}let n=undefined;for(const e of r){if(e===this)break;if(e.anchor===this.source)n=e}return n}toJSON(e,t){if(!t)return{source:this.source};const{anchors:r,doc:n,maxAliasCount:s}=t;const A=this.resolve(n,t);if(!A){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let a=r.get(A);if(!a){c.toJS(A,null,t);a=r.get(A)}if(!a||a.res===undefined){const e="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(e)}if(s>=0){a.count+=1;if(a.aliasCount===0)a.aliasCount=getAliasCount(n,A,r);if(a.count*a.aliasCount>s){const e="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(e)}}return a.res}toString(e,t,r){const s=`*${this.source}`;if(e){n.anchorIsValid(this.source);if(e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${s} `}return s}}function getAliasCount(e,t,r){if(A.isAlias(t)){const n=t.resolve(e);const s=r&&n&&r.get(n);return s?s.count*s.aliasCount:0}else if(A.isCollection(t)){let n=0;for(const s of t.items){const t=getAliasCount(e,s,r);if(t>n)n=t}return n}else if(A.isPair(t)){const n=getAliasCount(e,t.key,r);const s=getAliasCount(e,t.value,r);return Math.max(n,s)}return 1}t.Alias=Alias},101:(e,t,r)=>{var n=r(2404);var s=r(1127);var A=r(6673);function collectionFromPath(e,t,r){let s=r;for(let e=t.length-1;e>=0;--e){const r=t[e];if(typeof r==="number"&&Number.isInteger(r)&&r>=0){const e=[];e[r]=s;s=e}else{s=new Map([[r,s]])}}return n.createNode(s,undefined,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const isEmptyPath=e=>e==null||typeof e==="object"&&!!e[Symbol.iterator]().next().done;class Collection extends A.NodeBase{constructor(e,t){super(e);Object.defineProperty(this,"schema",{value:t,configurable:true,enumerable:false,writable:true})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(e)t.schema=e;t.items=t.items.map((t=>s.isNode(t)||s.isPair(t)?t.clone(e):t));if(this.range)t.range=this.range.slice();return t}addIn(e,t){if(isEmptyPath(e))this.add(t);else{const[r,...n]=e;const A=this.get(r,true);if(s.isCollection(A))A.addIn(n,t);else if(A===undefined&&this.schema)this.set(r,collectionFromPath(this.schema,n,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}deleteIn(e){const[t,...r]=e;if(r.length===0)return this.delete(t);const n=this.get(t,true);if(s.isCollection(n))return n.deleteIn(r);else throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...n]=e;const A=this.get(r,true);if(n.length===0)return!t&&s.isScalar(A)?A.value:A;else return s.isCollection(A)?A.getIn(n,t):undefined}hasAllNullValues(e){return this.items.every((t=>{if(!s.isPair(t))return false;const r=t.value;return r==null||e&&s.isScalar(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag}))}hasIn(e){const[t,...r]=e;if(r.length===0)return this.has(t);const n=this.get(t,true);return s.isCollection(n)?n.hasIn(r):false}setIn(e,t){const[r,...n]=e;if(n.length===0){this.set(r,t)}else{const e=this.get(r,true);if(s.isCollection(e))e.setIn(n,t);else if(e===undefined&&this.schema)this.set(r,collectionFromPath(this.schema,n,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}}}t.Collection=Collection;t.collectionFromPath=collectionFromPath;t.isEmptyPath=isEmptyPath},6673:(e,t,r)=>{var n=r(3661);var s=r(1127);var A=r(4043);class NodeBase{constructor(e){Object.defineProperty(this,s.NODE_TYPE,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)e.range=this.range.slice();return e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:a,reviver:c}={}){if(!s.isDocument(e))throw new TypeError("A document argument is required");const l={anchors:new Map,doc:e,keep:true,mapAsMap:t===true,mapKeyWarned:false,maxAliasCount:typeof r==="number"?r:100};const u=A.toJS(this,"",l);if(typeof a==="function")for(const{count:e,res:t}of l.anchors.values())a(t,e);return typeof c==="function"?n.applyReviver(c,{"":u},"",u):u}}t.NodeBase=NodeBase},7165:(e,t,r)=>{var n=r(2404);var s=r(9748);var A=r(7104);var a=r(1127);function createPair(e,t,r){const s=n.createNode(e,undefined,r);const A=n.createNode(t,undefined,r);return new Pair(s,A)}class Pair{constructor(e,t=null){Object.defineProperty(this,a.NODE_TYPE,{value:a.PAIR});this.key=e;this.value=t}clone(e){let{key:t,value:r}=this;if(a.isNode(t))t=t.clone(e);if(a.isNode(r))r=r.clone(e);return new Pair(t,r)}toJSON(e,t){const r=t?.mapAsMap?new Map:{};return A.addPairToJSMap(t,r,this)}toString(e,t,r){return e?.doc?s.stringifyPair(this,e,t,r):JSON.stringify(this)}}t.Pair=Pair;t.createPair=createPair},3301:(e,t,r)=>{var n=r(1127);var s=r(6673);var A=r(4043);const isScalarValue=e=>!e||typeof e!=="function"&&typeof e!=="object";class Scalar extends s.NodeBase{constructor(e){super(n.SCALAR);this.value=e}toJSON(e,t){return t?.keep?this.value:A.toJS(this.value,e,t)}toString(){return String(this.value)}}Scalar.BLOCK_FOLDED="BLOCK_FOLDED";Scalar.BLOCK_LITERAL="BLOCK_LITERAL";Scalar.PLAIN="PLAIN";Scalar.QUOTE_DOUBLE="QUOTE_DOUBLE";Scalar.QUOTE_SINGLE="QUOTE_SINGLE";t.Scalar=Scalar;t.isScalarValue=isScalarValue},4454:(e,t,r)=>{var n=r(1212);var s=r(7104);var A=r(101);var a=r(1127);var c=r(7165);var l=r(3301);function findPair(e,t){const r=a.isScalar(t)?t.value:t;for(const n of e){if(a.isPair(n)){if(n.key===t||n.key===r)return n;if(a.isScalar(n.key)&&n.key.value===r)return n}}return undefined}class YAMLMap extends A.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(a.MAP,e);this.items=[]}static from(e,t,r){const{keepUndefined:n,replacer:s}=r;const A=new this(e);const add=(e,a)=>{if(typeof s==="function")a=s.call(t,e,a);else if(Array.isArray(s)&&!s.includes(e))return;if(a!==undefined||n)A.items.push(c.createPair(e,a,r))};if(t instanceof Map){for(const[e,r]of t)add(e,r)}else if(t&&typeof t==="object"){for(const e of Object.keys(t))add(e,t[e])}if(typeof e.sortMapEntries==="function"){A.items.sort(e.sortMapEntries)}return A}add(e,t){let r;if(a.isPair(e))r=e;else if(!e||typeof e!=="object"||!("key"in e)){r=new c.Pair(e,e?.value)}else r=new c.Pair(e.key,e.value);const n=findPair(this.items,r.key);const s=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${r.key} already set`);if(a.isScalar(n.value)&&l.isScalarValue(r.value))n.value.value=r.value;else n.value=r.value}else if(s){const e=this.items.findIndex((e=>s(r,e)<0));if(e===-1)this.items.push(r);else this.items.splice(e,0,r)}else{this.items.push(r)}}delete(e){const t=findPair(this.items,e);if(!t)return false;const r=this.items.splice(this.items.indexOf(t),1);return r.length>0}get(e,t){const r=findPair(this.items,e);const n=r?.value;return(!t&&a.isScalar(n)?n.value:n)??undefined}has(e){return!!findPair(this.items,e)}set(e,t){this.add(new c.Pair(e,t),true)}toJSON(e,t,r){const n=r?new r:t?.mapAsMap?new Map:{};if(t?.onCreate)t.onCreate(n);for(const e of this.items)s.addPairToJSMap(t,n,e);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const e of this.items){if(!a.isPair(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`)}if(!e.allNullValues&&this.hasAllNullValues(false))e=Object.assign({},e,{allNullValues:true});return n.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}t.YAMLMap=YAMLMap;t.findPair=findPair},2223:(e,t,r)=>{var n=r(2404);var s=r(1212);var A=r(101);var a=r(1127);var c=r(3301);var l=r(4043);class YAMLSeq extends A.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(a.SEQ,e);this.items=[]}add(e){this.items.push(e)}delete(e){const t=asItemIndex(e);if(typeof t!=="number")return false;const r=this.items.splice(t,1);return r.length>0}get(e,t){const r=asItemIndex(e);if(typeof r!=="number")return undefined;const n=this.items[r];return!t&&a.isScalar(n)?n.value:n}has(e){const t=asItemIndex(e);return typeof t==="number"&&t=0?t:null}t.YAMLSeq=YAMLSeq},7104:(e,t,r)=>{var n=r(7249);var s=r(452);var A=r(2148);var a=r(1127);var c=r(4043);function addPairToJSMap(e,t,{key:r,value:n}){if(a.isNode(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(s.isMergeKey(e,r))s.addMergeToJSMap(e,t,n);else{const s=c.toJS(r,"",e);if(t instanceof Map){t.set(s,c.toJS(n,s,e))}else if(t instanceof Set){t.add(s)}else{const A=stringifyKey(r,s,e);const a=c.toJS(n,A,e);if(A in t)Object.defineProperty(t,A,{value:a,writable:true,enumerable:true,configurable:true});else t[A]=a}}return t}function stringifyKey(e,t,r){if(t===null)return"";if(typeof t!=="object")return String(t);if(a.isNode(e)&&r?.doc){const t=A.createStringifyContext(r.doc,{});t.anchors=new Set;for(const e of r.anchors.keys())t.anchors.add(e.anchor);t.inFlow=true;t.inStringifyKey=true;const s=e.toString(t);if(!r.mapKeyWarned){let e=JSON.stringify(s);if(e.length>40)e=e.substring(0,36)+'..."';n.warn(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`);r.mapKeyWarned=true}return s}return JSON.stringify(t)}t.addPairToJSMap=addPairToJSMap},1127:(e,t)=>{const r=Symbol.for("yaml.alias");const n=Symbol.for("yaml.document");const s=Symbol.for("yaml.map");const A=Symbol.for("yaml.pair");const a=Symbol.for("yaml.scalar");const c=Symbol.for("yaml.seq");const l=Symbol.for("yaml.node.type");const isAlias=e=>!!e&&typeof e==="object"&&e[l]===r;const isDocument=e=>!!e&&typeof e==="object"&&e[l]===n;const isMap=e=>!!e&&typeof e==="object"&&e[l]===s;const isPair=e=>!!e&&typeof e==="object"&&e[l]===A;const isScalar=e=>!!e&&typeof e==="object"&&e[l]===a;const isSeq=e=>!!e&&typeof e==="object"&&e[l]===c;function isCollection(e){if(e&&typeof e==="object")switch(e[l]){case s:case c:return true}return false}function isNode(e){if(e&&typeof e==="object")switch(e[l]){case r:case s:case a:case c:return true}return false}const hasAnchor=e=>(isScalar(e)||isCollection(e))&&!!e.anchor;t.ALIAS=r;t.DOC=n;t.MAP=s;t.NODE_TYPE=l;t.PAIR=A;t.SCALAR=a;t.SEQ=c;t.hasAnchor=hasAnchor;t.isAlias=isAlias;t.isCollection=isCollection;t.isDocument=isDocument;t.isMap=isMap;t.isNode=isNode;t.isPair=isPair;t.isScalar=isScalar;t.isSeq=isSeq},4043:(e,t,r)=>{var n=r(1127);function toJS(e,t,r){if(Array.isArray(e))return e.map(((e,t)=>toJS(e,String(t),r)));if(e&&typeof e.toJSON==="function"){if(!r||!n.hasAnchor(e))return e.toJSON(t,r);const s={aliasCount:0,count:1,res:undefined};r.anchors.set(e,s);r.onCreate=e=>{s.res=e;delete r.onCreate};const A=e.toJSON(t,r);if(r.onCreate)r.onCreate(A);return A}if(typeof e==="bigint"&&!r?.keep)return Number(e);return e}t.toJS=toJS},110:(e,t,r)=>{var n=r(8913);var s=r(6842);var A=r(1464);var a=r(3069);function resolveAsScalar(e,t=true,r){if(e){const _onError=(e,t,n)=>{const s=typeof e==="number"?e:Array.isArray(e)?e[0]:e.offset;if(r)r(s,t,n);else throw new A.YAMLParseError([s,s+1],t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return s.resolveFlowScalar(e,t,_onError);case"block-scalar":return n.resolveBlockScalar({options:{strict:t}},e,_onError)}}return null}function createScalarToken(e,t){const{implicitKey:r=false,indent:n,inFlow:s=false,offset:A=-1,type:c="PLAIN"}=t;const l=a.stringifyString({type:c,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:s,options:{blockQuote:true,lineWidth:-1}});const u=t.end??[{type:"newline",offset:-1,indent:n,source:"\n"}];switch(l[0]){case"|":case">":{const e=l.indexOf("\n");const t=l.substring(0,e);const r=l.substring(e+1)+"\n";const s=[{type:"block-scalar-header",offset:A,indent:n,source:t}];if(!addEndtoBlockProps(s,u))s.push({type:"newline",offset:-1,indent:n,source:"\n"});return{type:"block-scalar",offset:A,indent:n,props:s,source:r}}case'"':return{type:"double-quoted-scalar",offset:A,indent:n,source:l,end:u};case"'":return{type:"single-quoted-scalar",offset:A,indent:n,source:l,end:u};default:return{type:"scalar",offset:A,indent:n,source:l,end:u}}}function setScalarValue(e,t,r={}){let{afterKey:n=false,implicitKey:s=false,inFlow:A=false,type:c}=r;let l="indent"in e?e.indent:null;if(n&&typeof l==="number")l+=2;if(!c)switch(e.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if(t.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=t.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const u=a.stringifyString({type:c,value:t},{implicitKey:s||l===null,indent:l!==null&&l>0?" ".repeat(l):"",inFlow:A,options:{blockQuote:true,lineWidth:-1}});switch(u[0]){case"|":case">":setBlockScalarValue(e,u);break;case'"':setFlowScalarValue(e,u,"double-quoted-scalar");break;case"'":setFlowScalarValue(e,u,"single-quoted-scalar");break;default:setFlowScalarValue(e,u,"scalar")}}function setBlockScalarValue(e,t){const r=t.indexOf("\n");const n=t.substring(0,r);const s=t.substring(r+1)+"\n";if(e.type==="block-scalar"){const t=e.props[0];if(t.type!=="block-scalar-header")throw new Error("Invalid block scalar header");t.source=n;e.source=s}else{const{offset:t}=e;const r="indent"in e?e.indent:-1;const A=[{type:"block-scalar-header",offset:t,indent:r,source:n}];if(!addEndtoBlockProps(A,"end"in e?e.end:undefined))A.push({type:"newline",offset:-1,indent:r,source:"\n"});for(const t of Object.keys(e))if(t!=="type"&&t!=="offset")delete e[t];Object.assign(e,{type:"block-scalar",indent:r,props:A,source:s})}}function addEndtoBlockProps(e,t){if(t)for(const r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":e.push(r);return true}return false}function setFlowScalarValue(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r;e.source=t;break;case"block-scalar":{const n=e.props.slice(1);let s=t.length;if(e.props[0].type==="block-scalar-header")s-=e.props[0].source.length;for(const e of n)e.offset+=s;delete e.props;Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{const n=e.offset+t.length;const s={type:"newline",offset:n,indent:e.indent,source:"\n"};delete e.items;Object.assign(e,{type:r,source:t,end:[s]});break}default:{const n="indent"in e?e.indent:-1;const s="end"in e&&Array.isArray(e.end)?e.end.filter((e=>e.type==="space"||e.type==="comment"||e.type==="newline")):[];for(const t of Object.keys(e))if(t!=="type"&&t!=="offset")delete e[t];Object.assign(e,{type:r,indent:n,source:t,end:s})}}}t.createScalarToken=createScalarToken;t.resolveAsScalar=resolveAsScalar;t.setScalarValue=setScalarValue},1733:(e,t)=>{const stringify=e=>"type"in e?stringifyToken(e):stringifyItem(e);function stringifyToken(e){switch(e.type){case"block-scalar":{let t="";for(const r of e.props)t+=stringifyToken(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(const r of e.items)t+=stringifyItem(r);return t}case"flow-collection":{let t=e.start.source;for(const r of e.items)t+=stringifyItem(r);for(const r of e.end)t+=r.source;return t}case"document":{let t=stringifyItem(e);if(e.end)for(const r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const r of e.end)t+=r.source;return t}}}function stringifyItem({start:e,key:t,sep:r,value:n}){let s="";for(const t of e)s+=t.source;if(t)s+=stringifyToken(t);if(r)for(const e of r)s+=e.source;if(n)s+=stringifyToken(n);return s}t.stringify=stringify},7715:(e,t)=>{const r=Symbol("break visit");const n=Symbol("skip children");const s=Symbol("remove item");function visit(e,t){if("type"in e&&e.type==="document")e={start:e.start,value:e.value};_visit(Object.freeze([]),e,t)}visit.BREAK=r;visit.SKIP=n;visit.REMOVE=s;visit.itemAtPath=(e,t)=>{let r=e;for(const[e,n]of t){const t=r?.[e];if(t&&"items"in t){r=t.items[n]}else return undefined}return r};visit.parentCollection=(e,t)=>{const r=visit.itemAtPath(e,t.slice(0,-1));const n=t[t.length-1][0];const s=r?.[n];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function _visit(e,t,n){let A=n(t,e);if(typeof A==="symbol")return A;for(const a of["key","value"]){const c=t[a];if(c&&"items"in c){for(let t=0;t{var n=r(110);var s=r(1733);var A=r(7715);const a="\ufeff";const c="";const l="";const u="";const isCollection=e=>!!e&&"items"in e;const isScalar=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function prettyToken(e){switch(e){case a:return"";case c:return"";case l:return"";case u:return"";default:return JSON.stringify(e)}}function tokenType(e){switch(e){case a:return"byte-order-mark";case c:return"doc-mode";case l:return"flow-error-end";case u:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}t.createScalarToken=n.createScalarToken;t.resolveAsScalar=n.resolveAsScalar;t.setScalarValue=n.setScalarValue;t.stringify=s.stringify;t.visit=A.visit;t.BOM=a;t.DOCUMENT=c;t.FLOW_END=l;t.SCALAR=u;t.isCollection=isCollection;t.isScalar=isScalar;t.prettyToken=prettyToken;t.tokenType=tokenType},361:(e,t,r)=>{var n=r(3461);function isEmpty(e){switch(e){case undefined:case" ":case"\n":case"\r":case"\t":return true;default:return false}}const s=new Set("0123456789ABCDEFabcdef");const A=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");const a=new Set(",[]{}");const c=new Set(" ,[]{}\n\r\t");const isNotAnchorChar=e=>!e||c.has(e);class Lexer{constructor(){this.atEnd=false;this.blockScalarIndent=-1;this.blockScalarKeep=false;this.buffer="";this.flowKey=false;this.flowLevel=0;this.indentNext=0;this.indentValue=0;this.lineEndPos=null;this.next=null;this.pos=0}*lex(e,t=false){if(e){if(typeof e!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e;this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";while(r&&(t||this.hasChars(1)))r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos;let t=this.buffer[e];while(t===" "||t==="\t")t=this.buffer[++e];if(!t||t==="#"||t==="\n")return true;if(t==="\r")return this.buffer[e+1]==="\n";return false}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;while(t===" ")t=this.buffer[++r+e];if(t==="\r"){const t=this.buffer[r+e+1];if(t==="\n"||!t&&!this.atEnd)return e+r+1}return t==="\n"||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if(t==="-"||t==="."){const t=this.buffer.substr(e,3);if((t==="---"||t==="...")&&isEmpty(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;if(typeof e!=="number"||e!==-1&&ethis.indentValue&&!isEmpty(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&isEmpty(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(true));this.indentNext=this.indentValue+1;this.indentValue+=e;return yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(true);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case undefined:yield*this.pushNewline();return yield*this.parseLineStart();case"{":case"[":yield*this.pushCount(1);this.flowKey=false;this.flowLevel=1;return"flow";case"}":case"]":yield*this.pushCount(1);return"doc";case"*":yield*this.pushUntil(isNotAnchorChar);return"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":t+=(yield*this.parseBlockScalarHeader());t+=(yield*this.pushSpaces(true));yield*this.pushCount(e.length-t);yield*this.pushNewline();return yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t;let r=-1;do{e=yield*this.pushNewline();if(e>0){t=yield*this.pushSpaces(false);this.indentValue=r=t}else{t=0}t+=(yield*this.pushSpaces(true))}while(e+t>0);const s=this.getLine();if(s===null)return this.setNext("flow");if(r!==-1&&r"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil((e=>isEmpty(e)||e==="#"))}*parseBlockScalar(){let e=this.pos-1;let t=0;let r;e:for(let n=this.pos;r=this.buffer[n];++n){switch(r){case" ":t+=1;break;case"\n":e=n;t=0;break;case"\r":{const e=this.buffer[n+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if(e==="\n")break}default:break e}}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=t;else{this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext)}do{const t=this.continueScalar(e+1);if(t===-1)break;e=this.buffer.indexOf("\n",t)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let s=e+1;r=this.buffer[s];while(r===" ")r=this.buffer[++s];if(r==="\t"){while(r==="\t"||r===" "||r==="\r"||r==="\n")r=this.buffer[++s];e=s-1}else if(!this.blockScalarKeep){do{let r=e-1;let n=this.buffer[r];if(n==="\r")n=this.buffer[--r];const s=r;while(n===" ")n=this.buffer[--r];if(n==="\n"&&r>=this.pos&&r+1+t>s)e=r;else break}while(true)}yield n.SCALAR;yield*this.pushToIndex(e+1,true);return yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1;let r=this.pos-1;let s;while(s=this.buffer[++r]){if(s===":"){const n=this.buffer[r+1];if(isEmpty(n)||e&&a.has(n))break;t=r}else if(isEmpty(s)){let n=this.buffer[r+1];if(s==="\r"){if(n==="\n"){r+=1;s="\n";n=this.buffer[r+1]}else t=r}if(n==="#"||e&&a.has(n))break;if(s==="\n"){const e=this.continueScalar(r+1);if(e===-1)break;r=Math.max(r,e-2)}}else{if(e&&a.has(s))break;t=r}}if(!s&&!this.atEnd)return this.setNext("plain-scalar");yield n.SCALAR;yield*this.pushToIndex(t+1,true);return e?"flow":"doc"}*pushCount(e){if(e>0){yield this.buffer.substr(this.pos,e);this.pos+=e;return e}return 0}*pushToIndex(e,t){const r=this.buffer.slice(this.pos,e);if(r){yield r;this.pos+=r.length;return r.length}else if(t)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(true))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(isNotAnchorChar))+(yield*this.pushSpaces(true))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0;const t=this.charAt(1);if(isEmpty(t)||e&&a.has(t)){if(!e)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=false;return(yield*this.pushCount(1))+(yield*this.pushSpaces(true))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2;let t=this.buffer[e];while(!isEmpty(t)&&t!==">")t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,false)}else{let e=this.pos+1;let t=this.buffer[e];while(t){if(A.has(t))t=this.buffer[++e];else if(t==="%"&&s.has(this.buffer[e+1])&&s.has(this.buffer[e+2])){t=this.buffer[e+=3]}else break}return yield*this.pushToIndex(e,false)}}*pushNewline(){const e=this.buffer[this.pos];if(e==="\n")return yield*this.pushCount(1);else if(e==="\r"&&this.charAt(1)==="\n")return yield*this.pushCount(2);else return 0}*pushSpaces(e){let t=this.pos-1;let r;do{r=this.buffer[++t]}while(r===" "||e&&r==="\t");const n=t-this.pos;if(n>0){yield this.buffer.substr(this.pos,n);this.pos=t}return n}*pushUntil(e){let t=this.pos;let r=this.buffer[t];while(!e(r))r=this.buffer[++t];return yield*this.pushToIndex(t,false)}}t.Lexer=Lexer},6628:(e,t)=>{class LineCounter{constructor(){this.lineStarts=[];this.addNewLine=e=>this.lineStarts.push(e);this.linePos=e=>{let t=0;let r=this.lineStarts.length;while(t>1;if(this.lineStarts[n]{var n=r(932);var s=r(3461);var A=r(361);function includesToken(e,t){for(let r=0;r=0){switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}}while(e[++t]?.type==="space"){}return e.splice(t,e.length)}function fixFlowSeqItems(e){if(e.start.type==="flow-seq-start"){for(const t of e.items){if(t.sep&&!t.value&&!includesToken(t.start,"explicit-key-ind")&&!includesToken(t.sep,"map-value-ind")){if(t.key)t.value=t.key;delete t.key;if(isFlowToken(t.value)){if(t.value.end)Array.prototype.push.apply(t.value.end,t.sep);else t.value.end=t.sep}else Array.prototype.push.apply(t.start,t.sep);delete t.sep}}}}class Parser{constructor(e){this.atNewLine=true;this.atScalar=false;this.indent=0;this.offset=0;this.onKeyLine=false;this.stack=[];this.source="";this.type="";this.lexer=new A.Lexer;this.onNewLine=e}*parse(e,t=false){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(const r of this.lexer.lex(e,t))yield*this.next(r);if(!t)yield*this.end()}*next(e){this.source=e;if(n.env.LOG_TOKENS)console.log("|",s.prettyToken(e));if(this.atScalar){this.atScalar=false;yield*this.step();this.offset+=e.length;return}const t=s.tokenType(e);if(!t){const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e});this.offset+=e.length}else if(t==="scalar"){this.atNewLine=false;this.atScalar=true;this.type="scalar"}else{this.type=t;yield*this.step();switch(t){case"newline":this.atNewLine=true;this.indent=0;if(this.onNewLine)this.onNewLine(this.offset+e.length);break;case"space":if(this.atNewLine&&e[0]===" ")this.indent+=e.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=e.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=false}this.offset+=e.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){const e={type:this.type,offset:this.offset,indent:this.indent,source:this.source};return e}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t){const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}else if(this.stack.length===0){yield t}else{const e=this.peek(1);if(t.type==="block-scalar"){t.indent="indent"in e?e.indent:0}else if(t.type==="flow-collection"&&e.type==="document"){t.indent=0}if(t.type==="flow-collection")fixFlowSeqItems(t);switch(e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const r=e.items[e.items.length-1];if(r.value){e.items.push({start:[],key:t,sep:[]});this.onKeyLine=true;return}else if(r.sep){r.value=t}else{Object.assign(r,{key:t,sep:[]});this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{const r=e.items[e.items.length-1];if(r.value)e.items.push({start:[],value:t});else r.value=t;break}case"flow-collection":{const r=e.items[e.items.length-1];if(!r||r.value)e.items.push({start:[],key:t,sep:[]});else if(r.sep)r.value=t;else Object.assign(r,{key:t,sep:[]});return}default:yield*this.pop();yield*this.pop(t)}if((e.type==="document"||e.type==="block-map"||e.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const r=t.items[t.items.length-1];if(r&&!r.sep&&!r.value&&r.start.length>0&&findNonEmptyIndex(r.start)===-1&&(t.indent===0||r.start.every((e=>e.type!=="comment"||e.indent=e.indent){const r=!this.onKeyLine&&this.indent===e.indent;const n=r&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let s=[];if(n&&t.sep&&!t.value){const r=[];for(let n=0;ne.indent)r.length=0;break;default:r.length=0}}if(r.length>=2)s=t.sep.splice(r[1])}switch(this.type){case"anchor":case"tag":if(n||t.value){s.push(this.sourceToken);e.items.push({start:s});this.onKeyLine=true}else if(t.sep){t.sep.push(this.sourceToken)}else{t.start.push(this.sourceToken)}return;case"explicit-key-ind":if(!t.sep&&!t.explicitKey){t.start.push(this.sourceToken);t.explicitKey=true}else if(n||t.value){s.push(this.sourceToken);e.items.push({start:s,explicitKey:true})}else{this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:true}]})}this.onKeyLine=true;return;case"map-value-ind":if(t.explicitKey){if(!t.sep){if(includesToken(t.start,"newline")){Object.assign(t,{key:null,sep:[this.sourceToken]})}else{const e=getFirstKeyStartProps(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}}else if(t.value){e.items.push({start:[],key:null,sep:[this.sourceToken]})}else if(includesToken(t.sep,"map-value-ind")){this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else if(isFlowToken(t.key)&&!includesToken(t.sep,"newline")){const e=getFirstKeyStartProps(t.start);const r=t.key;const n=t.sep;n.push(this.sourceToken);delete t.key;delete t.sep;this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:r,sep:n}]})}else if(s.length>0){t.sep=t.sep.concat(s,this.sourceToken)}else{t.sep.push(this.sourceToken)}}else{if(!t.sep){Object.assign(t,{key:null,sep:[this.sourceToken]})}else if(t.value||n){e.items.push({start:s,key:null,sep:[this.sourceToken]})}else if(includesToken(t.sep,"map-value-ind")){this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]})}else{t.sep.push(this.sourceToken)}}this.onKeyLine=true;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);if(n||t.value){e.items.push({start:s,key:r,sep:[]});this.onKeyLine=true}else if(t.sep){this.stack.push(r)}else{Object.assign(t,{key:r,sep:[]});this.onKeyLine=true}return}default:{const n=this.startBlockValue(e);if(n){if(n.type==="block-seq"){if(!t.explicitKey&&t.sep&&!includesToken(t.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(r){e.items.push({start:s})}this.stack.push(n);return}}}}yield*this.pop();yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const r="end"in t.value?t.value.end:undefined;const n=Array.isArray(r)?r[r.length-1]:undefined;if(n?.type==="comment")r?.push(this.sourceToken);else e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2];const n=r?.value?.end;if(Array.isArray(n)){Array.prototype.push.apply(n,t.start);n.push(this.sourceToken);e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;if(t.value||includesToken(t.start,"seq-item-ind"))e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop();yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let e;do{yield*this.pop();e=this.peek(1)}while(e&&e.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!t||t.sep)e.items.push({start:[this.sourceToken]});else t.start.push(this.sourceToken);return;case"map-value-ind":if(!t||t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!t||t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);if(!t||t.value)e.items.push({start:[],key:r,sep:[]});else if(t.sep)this.stack.push(r);else Object.assign(t,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const r=this.startBlockValue(e);if(r)this.stack.push(r);else{yield*this.pop();yield*this.step()}}else{const t=this.peek(2);if(t.type==="block-map"&&(this.type==="map-value-ind"&&t.indent===e.indent||this.type==="newline"&&!t.items[t.items.length-1].sep)){yield*this.pop();yield*this.step()}else if(this.type==="map-value-ind"&&t.type!=="flow-collection"){const r=getPrevProps(t);const n=getFirstKeyStartProps(r);fixFlowSeqItems(e);const s=e.end.splice(1,e.end.length);s.push(this.sourceToken);const A={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:s}]};this.onKeyLine=true;this.stack[this.stack.length-1]=A}else{yield*this.lineEnd(e)}}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;while(e!==0){this.onNewLine(this.offset+e);e=this.source.indexOf("\n",e)+1}}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=true;const t=getPrevProps(e);const r=getFirstKeyStartProps(t);r.push(this.sourceToken);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:true}]}}case"map-value-ind":{this.onKeyLine=true;const t=getPrevProps(e);const r=getFirstKeyStartProps(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){if(this.type!=="comment")return false;if(this.indent<=t)return false;return e.every((e=>e.type==="newline"||e.type==="space"))}*documentEnd(e){if(this.type!=="doc-mode"){if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop();yield*this.step();break;case"newline":this.onKeyLine=false;case"space":case"comment":default:if(e.end)e.end.push(this.sourceToken);else e.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}t.Parser=Parser},4047:(e,t,r)=>{var n=r(9984);var s=r(3021);var A=r(1464);var a=r(7249);var c=r(1127);var l=r(6628);var u=r(3456);function parseOptions(e){const t=e.prettyErrors!==false;const r=e.lineCounter||t&&new l.LineCounter||null;return{lineCounter:r,prettyErrors:t}}function parseAllDocuments(e,t={}){const{lineCounter:r,prettyErrors:s}=parseOptions(t);const a=new u.Parser(r?.addNewLine);const c=new n.Composer(t);const l=Array.from(c.compose(a.parse(e)));if(s&&r)for(const t of l){t.errors.forEach(A.prettifyError(e,r));t.warnings.forEach(A.prettifyError(e,r))}if(l.length>0)return l;return Object.assign([],{empty:true},c.streamInfo())}function parseDocument(e,t={}){const{lineCounter:r,prettyErrors:s}=parseOptions(t);const a=new u.Parser(r?.addNewLine);const c=new n.Composer(t);let l=null;for(const t of c.compose(a.parse(e),true,e.length)){if(!l)l=t;else if(l.options.logLevel!=="silent"){l.errors.push(new A.YAMLParseError(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}if(s&&r){l.errors.forEach(A.prettifyError(e,r));l.warnings.forEach(A.prettifyError(e,r))}return l}function parse(e,t,r){let n=undefined;if(typeof t==="function"){n=t}else if(r===undefined&&t&&typeof t==="object"){r=t}const s=parseDocument(e,r);if(!s)return null;s.warnings.forEach((e=>a.warn(s.options.logLevel,e)));if(s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];else s.errors=[]}return s.toJS(Object.assign({reviver:n},r))}function stringify(e,t,r){let n=null;if(typeof t==="function"||Array.isArray(t)){n=t}else if(r===undefined&&t){r=t}if(typeof r==="string")r=r.length;if(typeof r==="number"){const e=Math.round(r);r=e<1?undefined:e>8?{indent:8}:{indent:e}}if(e===undefined){const{keepUndefined:e}=r??t??{};if(!e)return undefined}if(c.isDocument(e)&&!n)return e.toString(r);return new s.Document(e,n,r).toString(r)}t.parse=parse;t.parseAllDocuments=parseAllDocuments;t.parseDocument=parseDocument;t.stringify=stringify},5840:(e,t,r)=>{var n=r(1127);var s=r(7451);var A=r(1706);var a=r(6464);var c=r(18);const sortMapEntriesByKey=(e,t)=>e.keyt.key?1:0;class Schema{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:l,schema:u,sortMapEntries:h,toStringDefaults:g}){this.compat=Array.isArray(e)?c.getTags(e,"compat"):e?c.getTags(null,e):null;this.name=typeof u==="string"&&u||"core";this.knownTags=l?c.coreKnownTags:{};this.tags=c.getTags(t,this.name,r);this.toStringOptions=g??null;Object.defineProperty(this,n.MAP,{value:s.map});Object.defineProperty(this,n.SCALAR,{value:a.string});Object.defineProperty(this,n.SEQ,{value:A.seq});this.sortMapEntries=typeof h==="function"?h:h===true?sortMapEntriesByKey:null}clone(){const e=Object.create(Schema.prototype,Object.getOwnPropertyDescriptors(this));e.tags=this.tags.slice();return e}}t.Schema=Schema},7451:(e,t,r)=>{var n=r(1127);var s=r(4454);const A={collection:"map",default:true,nodeClass:s.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){if(!n.isMap(e))t("Expected a mapping for this tag");return e},createNode:(e,t,r)=>s.YAMLMap.from(e,t,r)};t.map=A},3632:(e,t,r)=>{var n=r(3301);const s={identify:e=>e==null,createNode:()=>new n.Scalar(null),default:true,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new n.Scalar(null),stringify:({source:e},t)=>typeof e==="string"&&s.test.test(e)?e:t.options.nullStr};t.nullTag=s},1706:(e,t,r)=>{var n=r(1127);var s=r(2223);const A={collection:"seq",default:true,nodeClass:s.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){if(!n.isSeq(e))t("Expected a sequence for this tag");return e},createNode:(e,t,r)=>s.YAMLSeq.from(e,t,r)};t.seq=A},6464:(e,t,r)=>{var n=r(3069);const s={identify:e=>typeof e==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,r,s){t=Object.assign({actualString:true},t);return n.stringifyString(e,t,r,s)}};t.string=s},3959:(e,t,r)=>{var n=r(3301);const s={identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new n.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},r){if(e&&s.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(t===r)return e}return t?r.options.trueStr:r.options.falseStr}};t.boolTag=s},8405:(e,t,r)=>{var n=r(3301);var s=r(8689);const A={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber};const a={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():s.stringifyNumber(e)}};const c={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new n.Scalar(parseFloat(e));const r=e.indexOf(".");if(r!==-1&&e[e.length-1]==="0")t.minFractionDigits=e.length-r-1;return t},stringify:s.stringifyNumber};t.float=c;t.floatExp=a;t.floatNaN=A},9874:(e,t,r)=>{var n=r(8689);const intIdentify=e=>typeof e==="bigint"||Number.isInteger(e);const intResolve=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function intStringify(e,t,r){const{value:s}=e;if(intIdentify(s)&&s>=0)return r+s.toString(t);return n.stringifyNumber(e)}const s={identify:e=>intIdentify(e)&&e>=0,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>intResolve(e,2,8,r),stringify:e=>intStringify(e,8,"0o")};const A={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>intResolve(e,0,10,r),stringify:n.stringifyNumber};const a={identify:e=>intIdentify(e)&&e>=0,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>intResolve(e,2,16,r),stringify:e=>intStringify(e,16,"0x")};t.int=A;t.intHex=a;t.intOct=s},896:(e,t,r)=>{var n=r(7451);var s=r(3632);var A=r(1706);var a=r(6464);var c=r(3959);var l=r(8405);var u=r(9874);const h=[n.map,A.seq,a.string,s.nullTag,c.boolTag,u.intOct,u.int,u.intHex,l.floatNaN,l.floatExp,l.float];t.schema=h},3559:(e,t,r)=>{var n=r(3301);var s=r(7451);var A=r(1706);function intIdentify(e){return typeof e==="bigint"||Number.isInteger(e)}const stringifyJSON=({value:e})=>JSON.stringify(e);const a=[{identify:e=>typeof e==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:stringifyJSON},{identify:e=>e==null,createNode:()=>new n.Scalar(null),default:true,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:stringifyJSON},{identify:e=>typeof e==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:stringifyJSON},{identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>intIdentify(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:stringifyJSON}];const c={default:true,tag:"",test:/^/,resolve(e,t){t(`Unresolved plain scalar ${JSON.stringify(e)}`);return e}};const l=[s.map,A.seq].concat(a,c);t.schema=l},18:(e,t,r)=>{var n=r(7451);var s=r(3632);var A=r(1706);var a=r(6464);var c=r(3959);var l=r(8405);var u=r(9874);var h=r(896);var g=r(3559);var p=r(6083);var C=r(452);var y=r(303);var I=r(8385);var B=r(5913);var Q=r(1528);var b=r(6752);const w=new Map([["core",h.schema],["failsafe",[n.map,A.seq,a.string]],["json",g.schema],["yaml11",B.schema],["yaml-1.1",B.schema]]);const S={binary:p.binary,bool:c.boolTag,float:l.float,floatExp:l.floatExp,floatNaN:l.floatNaN,floatTime:b.floatTime,int:u.int,intHex:u.intHex,intOct:u.intOct,intTime:b.intTime,map:n.map,merge:C.merge,null:s.nullTag,omap:y.omap,pairs:I.pairs,seq:A.seq,set:Q.set,timestamp:b.timestamp};const k={"tag:yaml.org,2002:binary":p.binary,"tag:yaml.org,2002:merge":C.merge,"tag:yaml.org,2002:omap":y.omap,"tag:yaml.org,2002:pairs":I.pairs,"tag:yaml.org,2002:set":Q.set,"tag:yaml.org,2002:timestamp":b.timestamp};function getTags(e,t,r){const n=w.get(t);if(n&&!e){return r&&!n.includes(C.merge)?n.concat(C.merge):n.slice()}let s=n;if(!s){if(Array.isArray(e))s=[];else{const e=Array.from(w.keys()).filter((e=>e!=="yaml11")).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}}if(Array.isArray(e)){for(const t of e)s=s.concat(t)}else if(typeof e==="function"){s=e(s.slice())}if(r)s=s.concat(C.merge);return s.reduce(((e,t)=>{const r=typeof t==="string"?S[t]:t;if(!r){const e=JSON.stringify(t);const r=Object.keys(S).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${r}`)}if(!e.includes(r))e.push(r);return e}),[])}t.coreKnownTags=k;t.getTags=getTags},6083:(e,t,r)=>{var n=r(181);var s=r(3301);var A=r(3069);const a={identify:e=>e instanceof Uint8Array,default:false,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof n.Buffer==="function"){return n.Buffer.from(e,"base64")}else if(typeof atob==="function"){const t=atob(e.replace(/[\n\r]/g,""));const r=new Uint8Array(t.length);for(let e=0;e{var n=r(3301);function boolStringify({value:e,source:t},r){const n=e?s:A;if(t&&n.test.test(t))return t;return e?r.options.trueStr:r.options.falseStr}const s={identify:e=>e===true,default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new n.Scalar(true),stringify:boolStringify};const A={identify:e=>e===false,default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new n.Scalar(false),stringify:boolStringify};t.falseTag=A;t.trueTag=s},5782:(e,t,r)=>{var n=r(3301);var s=r(8689);const A={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:s.stringifyNumber};const a={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():s.stringifyNumber(e)}};const c={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new n.Scalar(parseFloat(e.replace(/_/g,"")));const r=e.indexOf(".");if(r!==-1){const n=e.substring(r+1).replace(/_/g,"");if(n[n.length-1]==="0")t.minFractionDigits=n.length}return t},stringify:s.stringifyNumber};t.float=c;t.floatExp=a;t.floatNaN=A},873:(e,t,r)=>{var n=r(8689);const intIdentify=e=>typeof e==="bigint"||Number.isInteger(e);function intResolve(e,t,r,{intAsBigInt:n}){const s=e[0];if(s==="-"||s==="+")t+=1;e=e.substring(t).replace(/_/g,"");if(n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const t=BigInt(e);return s==="-"?BigInt(-1)*t:t}const A=parseInt(e,r);return s==="-"?-1*A:A}function intStringify(e,t,r){const{value:s}=e;if(intIdentify(s)){const e=s.toString(t);return s<0?"-"+r+e.substr(1):r+e}return n.stringifyNumber(e)}const s={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>intResolve(e,2,2,r),stringify:e=>intStringify(e,2,"0b")};const A={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>intResolve(e,1,8,r),stringify:e=>intStringify(e,8,"0")};const a={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>intResolve(e,0,10,r),stringify:n.stringifyNumber};const c={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>intResolve(e,2,16,r),stringify:e=>intStringify(e,16,"0x")};t.int=a;t.intBin=s;t.intHex=c;t.intOct=A},452:(e,t,r)=>{var n=r(1127);var s=r(3301);const A="<<";const a={identify:e=>e===A||typeof e==="symbol"&&e.description===A,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new s.Scalar(Symbol(A)),{addToJSMap:addMergeToJSMap}),stringify:()=>A};const isMergeKey=(e,t)=>(a.identify(t)||n.isScalar(t)&&(!t.type||t.type===s.Scalar.PLAIN)&&a.identify(t.value))&&e?.doc.schema.tags.some((e=>e.tag===a.tag&&e.default));function addMergeToJSMap(e,t,r){r=e&&n.isAlias(r)?r.resolve(e.doc):r;if(n.isSeq(r))for(const n of r.items)mergeValue(e,t,n);else if(Array.isArray(r))for(const n of r)mergeValue(e,t,n);else mergeValue(e,t,r)}function mergeValue(e,t,r){const s=e&&n.isAlias(r)?r.resolve(e.doc):r;if(!n.isMap(s))throw new Error("Merge sources must be maps or map aliases");const A=s.toJSON(null,e,Map);for(const[e,r]of A){if(t instanceof Map){if(!t.has(e))t.set(e,r)}else if(t instanceof Set){t.add(e)}else if(!Object.prototype.hasOwnProperty.call(t,e)){Object.defineProperty(t,e,{value:r,writable:true,enumerable:true,configurable:true})}}return t}t.addMergeToJSMap=addMergeToJSMap;t.isMergeKey=isMergeKey;t.merge=a},303:(e,t,r)=>{var n=r(1127);var s=r(4043);var A=r(4454);var a=r(2223);var c=r(8385);class YAMLOMap extends a.YAMLSeq{constructor(){super();this.add=A.YAMLMap.prototype.add.bind(this);this.delete=A.YAMLMap.prototype.delete.bind(this);this.get=A.YAMLMap.prototype.get.bind(this);this.has=A.YAMLMap.prototype.has.bind(this);this.set=A.YAMLMap.prototype.set.bind(this);this.tag=YAMLOMap.tag}toJSON(e,t){if(!t)return super.toJSON(e);const r=new Map;if(t?.onCreate)t.onCreate(r);for(const e of this.items){let A,a;if(n.isPair(e)){A=s.toJS(e.key,"",t);a=s.toJS(e.value,A,t)}else{A=s.toJS(e,"",t)}if(r.has(A))throw new Error("Ordered maps must not include duplicate keys");r.set(A,a)}return r}static from(e,t,r){const n=c.createPairs(e,t,r);const s=new this;s.items=n.items;return s}}YAMLOMap.tag="tag:yaml.org,2002:omap";const l={collection:"seq",identify:e=>e instanceof Map,nodeClass:YAMLOMap,default:false,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=c.resolvePairs(e,t);const s=[];for(const{key:e}of r.items){if(n.isScalar(e)){if(s.includes(e.value)){t(`Ordered maps must not include duplicate keys: ${e.value}`)}else{s.push(e.value)}}}return Object.assign(new YAMLOMap,r)},createNode:(e,t,r)=>YAMLOMap.from(e,t,r)};t.YAMLOMap=YAMLOMap;t.omap=l},8385:(e,t,r)=>{var n=r(1127);var s=r(7165);var A=r(3301);var a=r(2223);function resolvePairs(e,t){if(n.isSeq(e)){for(let r=0;r1)t("Each pair must have its own sequence indicator");const e=a.items[0]||new s.Pair(new A.Scalar(null));if(a.commentBefore)e.key.commentBefore=e.key.commentBefore?`${a.commentBefore}\n${e.key.commentBefore}`:a.commentBefore;if(a.comment){const t=e.value??e.key;t.comment=t.comment?`${a.comment}\n${t.comment}`:a.comment}a=e}e.items[r]=n.isPair(a)?a:new s.Pair(a)}}else t("Expected a sequence for this tag");return e}function createPairs(e,t,r){const{replacer:n}=r;const A=new a.YAMLSeq(e);A.tag="tag:yaml.org,2002:pairs";let c=0;if(t&&Symbol.iterator in Object(t))for(let e of t){if(typeof n==="function")e=n.call(t,String(c++),e);let a,l;if(Array.isArray(e)){if(e.length===2){a=e[0];l=e[1]}else throw new TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){const t=Object.keys(e);if(t.length===1){a=t[0];l=e[a]}else{throw new TypeError(`Expected tuple with one key, not ${t.length} keys`)}}else{a=e}A.items.push(s.createPair(a,l,r))}return A}const c={collection:"seq",default:false,tag:"tag:yaml.org,2002:pairs",resolve:resolvePairs,createNode:createPairs};t.createPairs=createPairs;t.pairs=c;t.resolvePairs=resolvePairs},5913:(e,t,r)=>{var n=r(7451);var s=r(3632);var A=r(1706);var a=r(6464);var c=r(6083);var l=r(8398);var u=r(5782);var h=r(873);var g=r(452);var p=r(303);var C=r(8385);var y=r(1528);var I=r(6752);const B=[n.map,A.seq,a.string,s.nullTag,l.trueTag,l.falseTag,h.intBin,h.intOct,h.int,h.intHex,u.floatNaN,u.floatExp,u.float,c.binary,g.merge,p.omap,C.pairs,y.set,I.intTime,I.floatTime,I.timestamp];t.schema=B},1528:(e,t,r)=>{var n=r(1127);var s=r(7165);var A=r(4454);class YAMLSet extends A.YAMLMap{constructor(e){super(e);this.tag=YAMLSet.tag}add(e){let t;if(n.isPair(e))t=e;else if(e&&typeof e==="object"&&"key"in e&&"value"in e&&e.value===null)t=new s.Pair(e.key,null);else t=new s.Pair(e,null);const r=A.findPair(this.items,t.key);if(!r)this.items.push(t)}get(e,t){const r=A.findPair(this.items,e);return!t&&n.isPair(r)?n.isScalar(r.key)?r.key.value:r.key:r}set(e,t){if(typeof t!=="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const r=A.findPair(this.items,e);if(r&&!t){this.items.splice(this.items.indexOf(r),1)}else if(!r&&t){this.items.push(new s.Pair(e))}}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(true))return super.toString(Object.assign({},e,{allNullValues:true}),t,r);else throw new Error("Set items must all have null values")}static from(e,t,r){const{replacer:n}=r;const A=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t){if(typeof n==="function")e=n.call(t,e,e);A.items.push(s.createPair(e,null,r))}return A}}YAMLSet.tag="tag:yaml.org,2002:set";const a={collection:"map",identify:e=>e instanceof Set,nodeClass:YAMLSet,default:false,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>YAMLSet.from(e,t,r),resolve(e,t){if(n.isMap(e)){if(e.hasAllNullValues(true))return Object.assign(new YAMLSet,e);else t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};t.YAMLSet=YAMLSet;t.set=a},6752:(e,t,r)=>{var n=r(8689);function parseSexagesimal(e,t){const r=e[0];const n=r==="-"||r==="+"?e.substring(1):e;const num=e=>t?BigInt(e):Number(e);const s=n.replace(/_/g,"").split(":").reduce(((e,t)=>e*num(60)+num(t)),num(0));return r==="-"?num(-1)*s:s}function stringifySexagesimal(e){let{value:t}=e;let num=e=>e;if(typeof t==="bigint")num=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return n.stringifyNumber(e);let r="";if(t<0){r="-";t*=num(-1)}const s=num(60);const A=[t%s];if(t<60){A.unshift(0)}else{t=(t-A[0])/s;A.unshift(t%s);if(t>=60){t=(t-A[0])/s;A.unshift(t)}}return r+A.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const s={identify:e=>typeof e==="bigint"||Number.isInteger(e),default:true,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>parseSexagesimal(e,r),stringify:stringifySexagesimal};const A={identify:e=>typeof e==="number",default:true,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>parseSexagesimal(e,false),stringify:stringifySexagesimal};const a={identify:e=>e instanceof Date,default:true,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})"+"(?:"+"(?:t|T|[ \\t]+)"+"([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)"+"(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?"+")?$"),resolve(e){const t=e.match(a.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,s,A,c,l]=t.map(Number);const u=t[7]?Number((t[7]+"00").substr(1,3)):0;let h=Date.UTC(r,n-1,s,A||0,c||0,l||0,u);const g=t[8];if(g&&g!=="Z"){let e=parseSexagesimal(g,false);if(Math.abs(e)<30)e*=60;h-=6e4*e}return new Date(h)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};t.floatTime=A;t.intTime=s;t.timestamp=a},4475:(e,t)=>{const r="flow";const n="block";const s="quoted";function foldFlowLines(e,t,r="flow",{indentAtStart:A,lineWidth:a=80,minContentWidth:c=20,onFold:l,onOverflow:u}={}){if(!a||a<0)return e;if(aa-Math.max(2,c))g.push(0);else C=a-A}let y=undefined;let I=undefined;let B=false;let Q=-1;let b=-1;let w=-1;if(r===n){Q=consumeMoreIndentedLines(e,Q,t.length);if(Q!==-1)C=Q+h}for(let A;A=e[Q+=1];){if(r===s&&A==="\\"){b=Q;switch(e[Q+1]){case"x":Q+=3;break;case"u":Q+=5;break;case"U":Q+=9;break;default:Q+=1}w=Q}if(A==="\n"){if(r===n)Q=consumeMoreIndentedLines(e,Q,t.length);C=Q+t.length+h;y=undefined}else{if(A===" "&&I&&I!==" "&&I!=="\n"&&I!=="\t"){const t=e[Q+1];if(t&&t!==" "&&t!=="\n"&&t!=="\t")y=Q}if(Q>=C){if(y){g.push(y);C=y+h;y=undefined}else if(r===s){while(I===" "||I==="\t"){I=A;A=e[Q+=1];B=true}const t=Q>w+1?Q-2:b-1;if(p[t])return e;g.push(t);p[t]=true;C=t+h;y=undefined}else{B=true}}}I=A}if(B&&u)u();if(g.length===0)return e;if(l)l();let S=e.slice(0,g[0]);for(let n=0;n{var n=r(1596);var s=r(1127);var A=r(9799);var a=r(3069);function createStringifyContext(e,t){const r=Object.assign({blockQuote:true,commentString:A.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:false,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:true,indentSeq:true,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:false,singleQuote:null,trueStr:"true",verifyAliasOrder:true},e.schema.toStringOptions,t);let n;switch(r.collectionStyle){case"block":n=false;break;case"flow":n=true;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent==="number"?" ".repeat(r.indent):" ",inFlow:n,options:r}}function getTagObject(e,t){if(t.tag){const r=e.filter((e=>e.tag===t.tag));if(r.length>0)return r.find((e=>e.format===t.format))??r[0]}let r=undefined;let n;if(s.isScalar(t)){n=t.value;let s=e.filter((e=>e.identify?.(n)));if(s.length>1){const e=s.filter((e=>e.test));if(e.length>0)s=e}r=s.find((e=>e.format===t.format))??s.find((e=>!e.format))}else{n=t;r=e.find((e=>e.nodeClass&&n instanceof e.nodeClass))}if(!r){const e=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${e} value`)}return r}function stringifyProps(e,t,{anchors:r,doc:A}){if(!A.directives)return"";const a=[];const c=(s.isScalar(e)||s.isCollection(e))&&e.anchor;if(c&&n.anchorIsValid(c)){r.add(c);a.push(`&${c}`)}const l=e.tag??(t.default?null:t.tag);if(l)a.push(A.directives.tagString(l));return a.join(" ")}function stringify(e,t,r,n){if(s.isPair(e))return e.toString(t,r,n);if(s.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e)){throw new TypeError(`Cannot stringify circular structure without alias nodes`)}else{if(t.resolvedAliases)t.resolvedAliases.add(e);else t.resolvedAliases=new Set([e]);e=e.resolve(t.doc)}}let A=undefined;const c=s.isNode(e)?e:t.doc.createNode(e,{onTagObj:e=>A=e});A??(A=getTagObject(t.doc.schema.tags,c));const l=stringifyProps(c,A,t);if(l.length>0)t.indentAtStart=(t.indentAtStart??0)+l.length+1;const u=typeof A.stringify==="function"?A.stringify(c,t,r,n):s.isScalar(c)?a.stringifyString(c,t,r,n):c.toString(t,r,n);if(!l)return u;return s.isScalar(c)||u[0]==="{"||u[0]==="["?`${l} ${u}`:`${l}\n${t.indent}${u}`}t.createStringifyContext=createStringifyContext;t.stringify=stringify},1212:(e,t,r)=>{var n=r(1127);var s=r(2148);var A=r(9799);function stringifyCollection(e,t,r){const n=t.inFlow??e.flow;const s=n?stringifyFlowCollection:stringifyBlockCollection;return s(e,t,r)}function stringifyBlockCollection({comment:e,items:t},r,{blockItemPrefix:a,flowChars:c,itemIndent:l,onChompKeep:u,onComment:h}){const{indent:g,options:{commentString:p}}=r;const C=Object.assign({},r,{indent:l,type:null});let y=false;const I=[];for(let e=0;eu=null),(()=>y=true));if(u)h+=A.lineComment(h,l,p(u));if(y&&u)y=false;I.push(a+h)}let B;if(I.length===0){B=c.start+c.end}else{B=I[0];for(let e=1;el=null));if(rC||u.includes("\n")))p=true;y.push(u);C=y.length}const{start:I,end:B}=r;if(y.length===0){return I+B}else{if(!p){const e=y.reduce(((e,t)=>e+t.length+2),2);p=t.options.lineWidth>0&&e>t.options.lineWidth}if(p){let e=I;for(const t of y)e+=t?`\n${l}${c}${t}`:"\n";return`${e}\n${c}${B}`}else{return`${I}${u}${y.join(" ")}${u}${B}`}}}function addCommentBefore({indent:e,options:{commentString:t}},r,n,s){if(n&&s)n=n.replace(/^\n+/,"");if(n){const s=A.indentComment(t(n),e);r.push(s.trimStart())}}t.stringifyCollection=stringifyCollection},9799:(e,t)=>{const stringifyComment=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function indentComment(e,t){if(/^\n+$/.test(e))return e.substring(1);return t?e.replace(/^(?! *$)/gm,t):e}const lineComment=(e,t,r)=>e.endsWith("\n")?indentComment(r,t):r.includes("\n")?"\n"+indentComment(r,t):(e.endsWith(" ")?"":" ")+r;t.indentComment=indentComment;t.lineComment=lineComment;t.stringifyComment=stringifyComment},6829:(e,t,r)=>{var n=r(1127);var s=r(2148);var A=r(9799);function stringifyDocument(e,t){const r=[];let a=t.directives===true;if(t.directives!==false&&e.directives){const t=e.directives.toString(e);if(t){r.push(t);a=true}else if(e.directives.docStart)a=true}if(a)r.push("---");const c=s.createStringifyContext(e,t);const{commentString:l}=c.options;if(e.commentBefore){if(r.length!==1)r.unshift("");const t=l(e.commentBefore);r.unshift(A.indentComment(t,""))}let u=false;let h=null;if(e.contents){if(n.isNode(e.contents)){if(e.contents.spaceBefore&&a)r.push("");if(e.contents.commentBefore){const t=l(e.contents.commentBefore);r.push(A.indentComment(t,""))}c.forceBlockIndent=!!e.comment;h=e.contents.comment}const t=h?undefined:()=>u=true;let g=s.stringify(e.contents,c,(()=>h=null),t);if(h)g+=A.lineComment(g,"",l(h));if((g[0]==="|"||g[0]===">")&&r[r.length-1]==="---"){r[r.length-1]=`--- ${g}`}else r.push(g)}else{r.push(s.stringify(e.contents,c))}if(e.directives?.docEnd){if(e.comment){const t=l(e.comment);if(t.includes("\n")){r.push("...");r.push(A.indentComment(t,""))}else{r.push(`... ${t}`)}}else{r.push("...")}}else{let t=e.comment;if(t&&u)t=t.replace(/^\n+/,"");if(t){if((!u||h)&&r[r.length-1]!=="")r.push("");r.push(A.indentComment(l(t),""))}}return r.join("\n")+"\n"}t.stringifyDocument=stringifyDocument},8689:(e,t)=>{function stringifyNumber({format:e,minFractionDigits:t,tag:r,value:n}){if(typeof n==="bigint")return String(n);const s=typeof n==="number"?n:Number(n);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let A=JSON.stringify(n);if(!e&&t&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(A)){let e=A.indexOf(".");if(e<0){e=A.length;A+="."}let r=t-(A.length-e-1);while(r-- >0)A+="0"}return A}t.stringifyNumber=stringifyNumber},9748:(e,t,r)=>{var n=r(1127);var s=r(3301);var A=r(2148);var a=r(9799);function stringifyPair({key:e,value:t},r,c,l){const{allNullValues:u,doc:h,indent:g,indentStep:p,options:{commentString:C,indentSeq:y,simpleKeys:I}}=r;let B=n.isNode(e)&&e.comment||null;if(I){if(B){throw new Error("With simple keys, key nodes cannot have comments")}if(n.isCollection(e)||!n.isNode(e)&&typeof e==="object"){const e="With simple keys, collection cannot be used as a key value";throw new Error(e)}}let Q=!I&&(!e||B&&t==null&&!r.inFlow||n.isCollection(e)||(n.isScalar(e)?e.type===s.Scalar.BLOCK_FOLDED||e.type===s.Scalar.BLOCK_LITERAL:typeof e==="object"));r=Object.assign({},r,{allNullValues:false,implicitKey:!Q&&(I||!u),indent:g+p});let b=false;let w=false;let S=A.stringify(e,r,(()=>b=true),(()=>w=true));if(!Q&&!r.inFlow&&S.length>1024){if(I)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");Q=true}if(r.inFlow){if(u||t==null){if(b&&c)c();return S===""?"?":Q?`? ${S}`:S}}else if(u&&!I||t==null&&Q){S=`? ${S}`;if(B&&!b){S+=a.lineComment(S,r.indent,C(B))}else if(w&&l)l();return S}if(b)B=null;if(Q){if(B)S+=a.lineComment(S,r.indent,C(B));S=`? ${S}\n${g}:`}else{S=`${S}:`;if(B)S+=a.lineComment(S,r.indent,C(B))}let k,v,R;if(n.isNode(t)){k=!!t.spaceBefore;v=t.commentBefore;R=t.comment}else{k=false;v=null;R=null;if(t&&typeof t==="object")t=h.createNode(t)}r.implicitKey=false;if(!Q&&!B&&n.isScalar(t))r.indentAtStart=S.length+1;w=false;if(!y&&p.length>=2&&!r.inFlow&&!Q&&n.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor){r.indent=r.indent.substring(2)}let D=false;const _=A.stringify(t,r,(()=>D=true),(()=>w=true));let N=" ";if(B||k||v){N=k?"\n":"";if(v){const e=C(v);N+=`\n${a.indentComment(e,r.indent)}`}if(_===""&&!r.inFlow){if(N==="\n")N="\n\n"}else{N+=`\n${r.indent}`}}else if(!Q&&n.isCollection(t)){const e=_[0];const n=_.indexOf("\n");const s=n!==-1;const A=r.inFlow??t.flow??t.items.length===0;if(s||!A){let t=false;if(s&&(e==="&"||e==="!")){let r=_.indexOf(" ");if(e==="&"&&r!==-1&&r{var n=r(3301);var s=r(4475);const getFoldOptions=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth});const containsDocumentMarker=e=>/^(%|---|\.\.\.)/m.test(e);function lineLengthOverLimit(e,t,r){if(!t||t<0)return false;const n=t-r;const s=e.length;if(s<=n)return false;for(let t=0,r=0;tn)return true;r=t+1;if(s-r<=n)return false}}return true}function doubleQuotedString(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=t;const A=t.options.doubleQuotedMinMultiLineLength;const a=t.indent||(containsDocumentMarker(e)?" ":"");let c="";let l=0;for(let e=0,t=r[e];t;t=r[++e]){if(t===" "&&r[e+1]==="\\"&&r[e+2]==="n"){c+=r.slice(l,e)+"\\ ";e+=1;l=e;t="\\"}if(t==="\\")switch(r[e+1]){case"u":{c+=r.slice(l,e);const t=r.substr(e+2,4);switch(t){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:if(t.substr(0,2)==="00")c+="\\x"+t.substr(2);else c+=r.substr(e,6)}e+=5;l=e+1}break;case"n":if(n||r[e+2]==='"'||r.length\n";let y;let I;for(I=r.length;I>0;--I){const e=r[I-1];if(e!=="\n"&&e!=="\t"&&e!==" ")break}let B=r.substring(I);const Q=B.indexOf("\n");if(Q===-1){y="-"}else if(r===B||Q!==B.length-1){y="+";if(l)l()}else{y=""}if(B){r=r.slice(0,-B.length);if(B[B.length-1]==="\n")B=B.slice(0,-1);B=B.replace(A,`$&${p}`)}let b=false;let w;let S=-1;for(w=0;w{A=true}}const l=s.foldFlowLines(`${k}${e}${B}`,p,s.FOLD_BLOCK,c);if(!A)return`>${R}\n${p}${l}`}r=r.replace(/\n+/g,`$&${p}`);return`|${R}\n${p}${k}${r}${B}`}function plainString(e,t,r,A){const{type:a,value:c}=e;const{actualString:l,implicitKey:u,indent:h,indentStep:g,inFlow:p}=t;if(u&&c.includes("\n")||p&&/[[\]{},]/.test(c)){return quotedString(c,t)}if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(c)){return u||p||!c.includes("\n")?quotedString(c,t):blockString(e,t,r,A)}if(!u&&!p&&a!==n.Scalar.PLAIN&&c.includes("\n")){return blockString(e,t,r,A)}if(containsDocumentMarker(c)){if(h===""){t.forceBlockIndent=true;return blockString(e,t,r,A)}else if(u&&h===g){return quotedString(c,t)}}const C=c.replace(/\n+/g,`$&\n${h}`);if(l){const test=e=>e.default&&e.tag!=="tag:yaml.org,2002:str"&&e.test?.test(C);const{compat:e,tags:r}=t.doc.schema;if(r.some(test)||e?.some(test))return quotedString(c,t)}return u?C:s.foldFlowLines(C,h,s.FOLD_FLOW,getFoldOptions(t,false))}function stringifyString(e,t,r,s){const{implicitKey:A,inFlow:a}=t;const c=typeof e.value==="string"?e:Object.assign({},e,{value:String(e.value)});let{type:l}=e;if(l!==n.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value))l=n.Scalar.QUOTE_DOUBLE}const _stringify=e=>{switch(e){case n.Scalar.BLOCK_FOLDED:case n.Scalar.BLOCK_LITERAL:return A||a?quotedString(c.value,t):blockString(c,t,r,s);case n.Scalar.QUOTE_DOUBLE:return doubleQuotedString(c.value,t);case n.Scalar.QUOTE_SINGLE:return singleQuotedString(c.value,t);case n.Scalar.PLAIN:return plainString(c,t,r,s);default:return null}};let u=_stringify(l);if(u===null){const{defaultKeyType:e,defaultStringType:r}=t.options;const n=A&&e||r;u=_stringify(n);if(u===null)throw new Error(`Unsupported default string type ${n}`)}return u}t.stringifyString=stringifyString},204:(e,t,r)=>{var n=r(1127);const s=Symbol("break visit");const A=Symbol("skip children");const a=Symbol("remove node");function visit(e,t){const r=initVisitor(t);if(n.isDocument(e)){const t=visit_(null,e.contents,r,Object.freeze([e]));if(t===a)e.contents=null}else visit_(null,e,r,Object.freeze([]))}visit.BREAK=s;visit.SKIP=A;visit.REMOVE=a;function visit_(e,t,r,A){const c=callVisitor(e,t,r,A);if(n.isNode(c)||n.isPair(c)){replaceNode(e,A,c);return visit_(e,c,r,A)}if(typeof c!=="symbol"){if(n.isCollection(t)){A=Object.freeze(A.concat(t));for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});var n=r(6577);class AbortSignal extends n.EventTarget{constructor(){super();throw new TypeError("AbortSignal cannot be constructed directly")}get aborted(){const e=s.get(this);if(typeof e!=="boolean"){throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`)}return e}}n.defineEventAttribute(AbortSignal.prototype,"abort");function createAbortSignal(){const e=Object.create(AbortSignal.prototype);n.EventTarget.call(e);s.set(e,false);return e}function abortSignal(e){if(s.get(e)!==false){return}s.set(e,true);e.dispatchEvent({type:"abort"})}const s=new WeakMap;Object.defineProperties(AbortSignal.prototype,{aborted:{enumerable:true}});if(typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol"){Object.defineProperty(AbortSignal.prototype,Symbol.toStringTag,{configurable:true,value:"AbortSignal"})}class AbortController{constructor(){A.set(this,createAbortSignal())}get signal(){return getSignal(this)}abort(){abortSignal(getSignal(this))}}const A=new WeakMap;function getSignal(e){const t=A.get(e);if(t==null){throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${e===null?"null":typeof e}`)}return t}Object.defineProperties(AbortController.prototype,{signal:{enumerable:true},abort:{enumerable:true}});if(typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol"){Object.defineProperty(AbortController.prototype,Symbol.toStringTag,{configurable:true,value:"AbortController"})}t.AbortController=AbortController;t.AbortSignal=AbortSignal;t["default"]=AbortController;e.exports=AbortController;e.exports.AbortController=e.exports["default"]=AbortController;e.exports.AbortSignal=AbortSignal},8816:(e,t,r)=>{var n=r(5744);var s=r(6928);var A=r(7047);var a=r(7294);var c=r(3270);var l=r(6542);var u=r(1363);var h=e.exports={};var g=/[\/\\]/g;var processPatterns=function(e,t){var r=[];A(e).forEach((function(e){var n=e.indexOf("!")===0;if(n){e=e.slice(1)}var s=t(e);if(n){r=a(r,s)}else{r=c(r,s)}}));return r};h.exists=function(){var e=s.join.apply(s,arguments);return n.existsSync(e)};h.expand=function(...e){var t=l(e[0])?e.shift():{};var r=Array.isArray(e[0])?e[0]:e;if(r.length===0){return[]}var A=processPatterns(r,(function(e){return u.sync(e,t)}));if(t.filter){A=A.filter((function(e){e=s.join(t.cwd||"",e);try{if(typeof t.filter==="function"){return t.filter(e)}else{return n.statSync(e)[t.filter]()}}catch(e){return false}}))}return A};h.expandMapping=function(e,t,r){r=Object.assign({rename:function(e,t){return s.join(e||"",t)}},r);var n=[];var A={};h.expand(r,e).forEach((function(e){var a=e;if(r.flatten){a=s.basename(a)}if(r.ext){a=a.replace(/(\.[^\/]*)?$/,r.ext)}var c=r.rename(t,a,r);if(r.cwd){e=s.join(r.cwd,e)}c=c.replace(g,"/");e=e.replace(g,"/");if(A[c]){A[c].src.push(e)}else{n.push({src:[e],dest:c});A[c]=n[n.length-1]}}));return n};h.normalizeFilesArray=function(e){var t=[];e.forEach((function(e){var r;if("src"in e||"dest"in e){t.push(e)}}));if(t.length===0){return[]}t=_(t).chain().forEach((function(e){if(!("src"in e)||!e.src){return}if(Array.isArray(e.src)){e.src=A(e.src)}else{e.src=[e.src]}})).map((function(e){var t=Object.assign({},e);delete t.src;delete t.dest;if(e.expand){return h.expandMapping(e.src,e.dest,t).map((function(t){var r=Object.assign({},e);r.orig=Object.assign({},e);r.src=t.src;r.dest=t.dest;["expand","cwd","flatten","rename","ext"].forEach((function(e){delete r[e]}));return r}))}var r=Object.assign({},e);r.orig=Object.assign({},e);if("src"in r){Object.defineProperty(r,"src",{enumerable:true,get:function fn(){var r;if(!("result"in fn)){r=e.src;r=Array.isArray(r)?A(r):[r];fn.result=h.expand(t,r)}return fn.result}})}if("dest"in r){r.dest=e.dest}return r})).flatten().value();return t}},3296:(e,t,r)=>{var n=r(5744);var s=r(6928);var A=r(6543);var a=r(2126);var c=r(6133);var l=r(7511);var u=r(2203).Stream;var h=r(9963).PassThrough;var g=e.exports={};g.file=r(8816);g.collectStream=function(e,t){var r=[];var n=0;e.on("error",t);e.on("data",(function(e){r.push(e);n+=e.length}));e.on("end",(function(){var e=Buffer.alloc(n);var s=0;r.forEach((function(t){t.copy(e,s);s+=t.length}));t(null,e)}))};g.dateify=function(e){e=e||new Date;if(e instanceof Date){e=e}else if(typeof e==="string"){e=new Date(e)}else{e=new Date}return e};g.defaults=function(e,t,r){var n=arguments;n[0]=n[0]||{};return l(...n)};g.isStream=function(e){return A(e)};g.lazyReadStream=function(e){return new a.Readable((function(){return n.createReadStream(e)}))};g.normalizeInputSource=function(e){if(e===null){return Buffer.alloc(0)}else if(typeof e==="string"){return Buffer.from(e)}else if(g.isStream(e)){return e.pipe(new h)}return e};g.sanitizePath=function(e){return c(e,false).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")};g.trailingSlashIt=function(e){return e.slice(-1)!=="/"?e+"/":e};g.unixifyPath=function(e){return c(e,false).replace(/^\w+:/,"")};g.walkdir=function(e,t,r){var A=[];if(typeof t==="function"){r=t;t=e}n.readdir(e,(function(a,c){var l=0;var u;var h;if(a){return r(a)}(function next(){u=c[l++];if(!u){return r(null,A)}h=s.join(e,u);n.stat(h,(function(e,n){A.push({path:h,relative:s.relative(t,h).replace(/\\/g,"/"),stats:n});if(n&&n.isDirectory()){g.walkdir(h,t,(function(e,t){if(e){return r(e)}t.forEach((function(e){A.push(e)}));next()}))}else{next()}}))})()}))}},9392:(e,t,r)=>{ /** * Archiver Vending * @@ -72,4 +72,4 @@ var n=r(181);var s=n.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}i * @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE} * @copyright (c) 2014 Chris Talkington, contributors. */ -var n=r(9023).inherits;var s=r(7544).ZipArchiveOutputStream;var A=r(7544).ZipArchiveEntry;var a=r(3296);var c=e.exports=function(e){if(!(this instanceof c)){return new c(e)}e=this.options=e||{};e.zlib=e.zlib||{};s.call(this,e);if(typeof e.level==="number"&&e.level>=0){e.zlib.level=e.level;delete e.level}if(!e.forceZip64&&typeof e.zlib.level==="number"&&e.zlib.level===0){e.store=true}e.namePrependSlash=e.namePrependSlash||false;if(e.comment&&e.comment.length>0){this.setComment(e.comment)}};n(c,s);c.prototype._normalizeFileData=function(e){e=a.defaults(e,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""});var t=e.type==="directory";var r=e.type==="symlink";if(e.name){e.name=a.sanitizePath(e.name);if(!r&&e.name.slice(-1)==="/"){t=true;e.type="directory"}else if(t){e.name+="/"}}if(t||r){e.store=true}e.date=a.dateify(e.date);return e};c.prototype.entry=function(e,t,r){if(typeof r!=="function"){r=this._emitErrorCallback.bind(this)}t=this._normalizeFileData(t);if(t.type!=="file"&&t.type!=="directory"&&t.type!=="symlink"){r(new Error(t.type+" entries not currently supported"));return}if(typeof t.name!=="string"||t.name.length===0){r(new Error("entry name must be a non-empty string value"));return}if(t.type==="symlink"&&typeof t.linkname!=="string"){r(new Error("entry linkname must be a non-empty string value when type equals symlink"));return}var n=new A(t.name);n.setTime(t.date,this.options.forceLocalTime);if(t.namePrependSlash){n.setName(t.name,true)}if(t.store){n.setMethod(0)}if(t.comment.length>0){n.setComment(t.comment)}if(t.type==="symlink"&&typeof t.mode!=="number"){t.mode=40960}if(typeof t.mode==="number"){if(t.type==="symlink"){t.mode|=40960}n.setUnixMode(t.mode)}if(t.type==="symlink"&&typeof t.linkname==="string"){e=Buffer.from(t.linkname)}return s.prototype.entry.call(this,n,e,r)};c.prototype.finalize=function(){this.finish()}},9592:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A=400){throw new Error(`(${a}) ${A}`)}return JSON.parse(A)}catch(r){const n=(0,C.errorMessage)(r);throw new Error(`Failed to ${e} ${t}: ${n}`)}}async#X(e,t){const r=5e3;for(;;){if(t.onPoll)t.onPoll();const n=await this.getOperation(e);if(n.error){throw new Error(`Operation failed: ${n.error.message}`)}if(n.done){return n}await new Promise((e=>setTimeout(e,r)))}}async getOperation(e){if(e.startsWith("operations/")){e.slice(11)}const t=`${this.#$.cloudfunctions}/${e}`;const r=await this.#Z("GET",t);return r}async create(e,t){const r=this.fullResourceName(e.name);e.name=r;if(t?.onDebug){t.onDebug((()=>`create: computed Cloud Function:\n${JSON.stringify(e,null,2)}`))}const n=this.parentFromName(r);const s=r.split("/").at(-1);const A=`${this.#$.cloudfunctions}/${n}/functions?functionId=${s}`;const a=JSON.stringify(e);const c=await this.#Z("POST",A,a);const l=await this.#X(c.name,{onPoll:t?.onPoll,onDebug:t?.onDebug});if(!l.response){throw new Error(`create operation result did not include function`)}return l.response}async delete(e,t){const r=this.fullResourceName(e);const n=`${this.#$.cloudfunctions}/${r}`;const s=await this.#Z("DELETE",n);return await this.#X(s.name,{onPoll:t?.onPoll,onDebug:t?.onDebug})}async generateUploadURL(e){const t=`${this.#$.cloudfunctions}/${e}/functions:generateUploadUrl`;const r=JSON.stringify({environment:b.GEN_2});const n=await this.#Z("POST",t,r);return n}async get(e){const t=this.fullResourceName(e);const r=`${this.#$.cloudfunctions}/${t}`;const n=await this.#Z("GET",r);return n}async getSafe(e){try{return await this.get(e)}catch(e){const t=(0,C.errorMessage)(e);if(!t.includes("404")&&!t.includes("NOT_FOUND")){throw new Error(`Failed to lookup existing function - does the caller have `+`cloudfunctions.functions.get permissions? ${e}`)}return null}}async patch(e,t){const r=this.fullResourceName(e.name);e.name=r;if(t?.onDebug){t.onDebug((()=>`patch: computed Cloud Function:\n${JSON.stringify(e,null,2)}`))}const n=this.computeUpdateMask(e);if(t?.onDebug){t.onDebug((()=>`Computed updateMask: ${n}`))}const s=`${this.#$.cloudfunctions}/${r}?updateMask=${n}`;const A=JSON.stringify(e);const a=await this.#Z("PATCH",s,A);const c=await this.#X(a.name,{onPoll:t?.onPoll,onDebug:t?.onDebug});if(!c.response){throw new Error(`patch operation result did not include function`)}return c.response}async deployFromLocalSource(e,t,r){const n=(0,c.randomBytes)(12).toString("hex");const s=u.join((0,h.tmpdir)(),`cfsrc-${n}.zip`);try{await(0,y.zipDir)(t,s,r);if(r?.onZip)r.onZip(t,s)}catch(e){throw new Error(`Zip file ${s} creation failed: ${e}`)}const A=this.fullResourceName(e.name);e.name=A;const a=this.parentFromName(A);let l;try{l=await this.generateUploadURL(a);await this.uploadSource(l.uploadUrl,s)}catch(e){throw new Error(`Failed to upload zip file: ${e}`)}await(0,C.forceRemove)(s);if(!e.buildConfig){e.buildConfig={}}if(!e.buildConfig.source){e.buildConfig.source={}}e.buildConfig.source.storageSource=l.storageSource;const g=await this.getSafe(A);if(g){if(r?.onExisting)r.onExisting();const t=await this.patch(e,{onPoll:r?.onPoll,onDebug:r?.onDebug});return t}else{if(r?.onNew)r.onNew();const t=await this.create(e,{onPoll:r?.onPoll,onDebug:r?.onDebug});return t}}async uploadSource(e,t){const r=l.default.createReadStream(t);try{const t=await this.#K.request("PUT",e,r,{"content-type":"application/zip"});const n=await t.readBody();const s=t.message.statusCode||500;if(s>=400){throw new Error(`(${s}) ${n}`)}}catch(e){const t=(0,C.errorMessage)(e);throw new Error(`Failed to upload source: ${t}`)}}fullResourceName(e){if(!e){e=""}e=e.trim();if(!e){throw new Error(`Failed to parse resource name: name cannot be empty`)}if(e.includes("/")){if(e.match(Q)){return e}else{throw new Error(`Invalid resource name '${e}'`)}}const t=this.#q;if(!t){throw new Error(`Failed to get project ID to build resource name. Try setting 'project_id'.`)}const r=this.#z;if(!r){throw new Error(`Failed to get location (region) to build resource name. Try setting 'region'.`)}return`projects/${t}/locations/${r}/functions/${e}`}parentFromName(e){const t=e.split("/");if(t.length<3){throw new Error(`Invalid or missing name '${e}' (expected 'projects/p/locations/l/functions/f')`)}const r=t.slice(0,t.length-2).join("/");return r}computeUpdateMask(e){const t=[];if(e.name!==undefined)t.push("name");if(e.description!==undefined)t.push("description");if(e.environment!==undefined)t.push("environment");if(e.kmsKeyName!==undefined)t.push("kmsKeyName");if(e.labels!==undefined)t.push("labels");if(e.buildConfig?.runtime!==undefined)t.push("buildConfig.runtime");if(e.buildConfig?.entryPoint!==undefined)t.push("buildConfig.entryPoint");if(e.buildConfig?.source!==undefined)t.push("buildConfig.source");if(e.buildConfig?.dockerRepository!==undefined)t.push("buildConfig.dockerRepository");if(e.buildConfig?.environmentVariables!==undefined)t.push("buildConfig.environmentVariables");if(e.buildConfig?.serviceAccount!==undefined)t.push("buildConfig.serviceAccount");if(e.buildConfig?.workerPool!==undefined)t.push("buildConfig.workerPool");if(e.serviceConfig?.allTrafficOnLatestRevision!==undefined)t.push("serviceConfig.allTrafficOnLatestRevision");if(e.serviceConfig?.availableCpu!==undefined)t.push("serviceConfig.availableCpu");if(e.serviceConfig?.availableMemory!==undefined)t.push("serviceConfig.availableMemory");if(e.serviceConfig?.environmentVariables!==undefined)t.push("serviceConfig.environmentVariables");if(e.serviceConfig?.ingressSettings!==undefined)t.push("serviceConfig.ingressSettings");if(e.serviceConfig?.maxInstanceCount!==undefined)t.push("serviceConfig.maxInstanceCount");if(e.serviceConfig?.maxInstanceRequestConcurrency!==undefined)t.push("serviceConfig.maxInstanceRequestConcurrency");if(e.serviceConfig?.minInstanceCount!==undefined)t.push("serviceConfig.minInstanceCount");if(e.serviceConfig?.secretEnvironmentVariables!==undefined)t.push("serviceConfig.secretEnvironmentVariables");if(e.serviceConfig?.secretVolumes!==undefined)t.push("serviceConfig.secretVolumes");if(e.serviceConfig?.serviceAccountEmail!==undefined)t.push("serviceConfig.serviceAccountEmail");if(e.serviceConfig?.timeoutSeconds!==undefined)t.push("serviceConfig.timeoutSeconds");if(e.serviceConfig?.vpcConnector!==undefined)t.push("serviceConfig.vpcConnector");if(e.serviceConfig?.vpcConnectorEgressSettings!==undefined)t.push("serviceConfig.vpcConnectorEgressSettings");if(e.eventTrigger?.triggerRegion!==undefined)t.push("eventTrigger.triggerRegion");if(e.eventTrigger?.eventType!==undefined)t.push("eventTrigger.eventType");if(e.eventTrigger?.eventFilters!==undefined)t.push("eventTrigger.eventFilters");if(e.eventTrigger?.pubsubTopic!==undefined)t.push("eventTrigger.pubsubTopic");if(e.eventTrigger?.serviceAccountEmail!==undefined)t.push("eventTrigger.serviceAccountEmail");if(e.eventTrigger?.retryPolicy!==undefined)t.push("eventTrigger.retryPolicy");if(e.eventTrigger?.channel!==undefined)t.push("eventTrigger.channel");if(e.eventTrigger?.service!==undefined)t.push("eventTrigger.service");return t.join(",")}}t.CloudFunctionsClient=CloudFunctionsClient},7355:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SecretName=void 0;class SecretName{project;name;version;constructor(e){e=(e||"").trim();if(!e){throw new Error(`Missing secret name`)}const t=e.split("/");switch(t.length){case 6:{this.project=t[1];this.name=t[3];this.version=t[5];break}case 4:{this.project=t[1];this.name=t[3];this.version="latest";break}case 3:{this.project=t[0];this.name=t[1];this.version=t[2];break}case 2:{this.project=t[0];this.name=t[1];this.version="latest";break}default:{throw new TypeError(`Failed to parse secret reference "${e}": unknown format. Secrets `+`should be of the format "projects/p/secrets/s/versions/v".`)}}}selfLink(){return`projects/${this.project}/secrets/${this.name}/versions/${this.version}`}}t.SecretName=SecretName},4527:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A{if(a.ignores(e.name)){if(r?.onZipIgnoreEntry)r.onZipIgnoreEntry(e);return false}return e};return new Promise(((s,A)=>{const a=h.create("zip",{zlib:{level:7}});a.on("entry",(e=>{if(r?.onZipAddEntry)r.onZipAddEntry(e)}));a.on("warning",(e=>A(e)));a.on("error",(e=>A(e)));n.on("finish",(()=>s(t)));a.pipe(n);a.directory(e,false,ignoreFn);a.finalize()}))}function formatEntry(e){const t=e.name;const r=e.mode||"000";const n=e.sourcePath||"unknown";const s=(e.type||"unknown").toUpperCase()[0];return`[${s}] (${r}) ${t} => ${n}`}function stringToInt(e){e=(e||"").trim().replace(/[_,]/g,"");if(e===""){return undefined}const t=parseInt(e);if(isNaN(t)){throw new Error(`input "${e}" is not a number`)}return t}function parseEventTriggerFilters(e){const t=(0,g.parseKVString)(e);if(t===undefined){return undefined}const r=[];for(const[e,n]of Object.entries(t)){if(n.startsWith("PATTERN:")){r.push({attribute:e,value:n.slice(8),operator:"match-path-pattern"})}else{r.push({attribute:e,value:n})}}return r}function parseSecrets(e){const t=(0,g.parseKVString)(e);if(t===undefined){return[undefined,undefined]}const r=[];const n=[];for(const[e,s]of Object.entries(t)){const t=new C.SecretName(s);if(e.startsWith("/")){const r=l.posix.dirname(e);const s=l.posix.basename(e);n.push({mountPath:r,projectId:t.project,secret:t.name,versions:[{path:s,version:t.version}]})}else{r.push({key:e,projectId:t.project,secret:t.name,version:t.version})}}return[r,n]}},2613:e=>{"use strict";e.exports=require("assert")},290:e=>{"use strict";e.exports=require("async_hooks")},181:e=>{"use strict";e.exports=require("buffer")},5317:e=>{"use strict";e.exports=require("child_process")},4236:e=>{"use strict";e.exports=require("console")},9140:e=>{"use strict";e.exports=require("constants")},6982:e=>{"use strict";e.exports=require("crypto")},1637:e=>{"use strict";e.exports=require("diagnostics_channel")},4434:e=>{"use strict";e.exports=require("events")},9896:e=>{"use strict";e.exports=require("fs")},1943:e=>{"use strict";e.exports=require("fs/promises")},8611:e=>{"use strict";e.exports=require("http")},5675:e=>{"use strict";e.exports=require("http2")},5692:e=>{"use strict";e.exports=require("https")},9278:e=>{"use strict";e.exports=require("net")},4589:e=>{"use strict";e.exports=require("node:assert")},4573:e=>{"use strict";e.exports=require("node:buffer")},7598:e=>{"use strict";e.exports=require("node:crypto")},8474:e=>{"use strict";e.exports=require("node:events")},3024:e=>{"use strict";e.exports=require("node:fs")},1455:e=>{"use strict";e.exports=require("node:fs/promises")},7067:e=>{"use strict";e.exports=require("node:http")},4708:e=>{"use strict";e.exports=require("node:https")},7030:e=>{"use strict";e.exports=require("node:net")},6760:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},7075:e=>{"use strict";e.exports=require("node:stream")},7830:e=>{"use strict";e.exports=require("node:stream/web")},6193:e=>{"use strict";e.exports=require("node:string_decoder")},3136:e=>{"use strict";e.exports=require("node:url")},7975:e=>{"use strict";e.exports=require("node:util")},8522:e=>{"use strict";e.exports=require("node:zlib")},857:e=>{"use strict";e.exports=require("os")},6928:e=>{"use strict";e.exports=require("path")},2987:e=>{"use strict";e.exports=require("perf_hooks")},932:e=>{"use strict";e.exports=require("process")},3480:e=>{"use strict";e.exports=require("querystring")},2203:e=>{"use strict";e.exports=require("stream")},3774:e=>{"use strict";e.exports=require("stream/web")},3193:e=>{"use strict";e.exports=require("string_decoder")},3557:e=>{"use strict";e.exports=require("timers")},4756:e=>{"use strict";e.exports=require("tls")},2018:e=>{"use strict";e.exports=require("tty")},7016:e=>{"use strict";e.exports=require("url")},9023:e=>{"use strict";e.exports=require("util")},8253:e=>{"use strict";e.exports=require("util/types")},1493:e=>{"use strict";e.exports=require("v8")},8167:e=>{"use strict";e.exports=require("worker_threads")},3106:e=>{"use strict";e.exports=require("zlib")},7182:(e,t,r)=>{"use strict";const n=r(7075).Writable;const s=r(7975).inherits;const A=r(4136);const a=r(612);const c=r(2271);const l=45;const u=Buffer.from("-");const h=Buffer.from("\r\n");const EMPTY_FN=function(){};function Dicer(e){if(!(this instanceof Dicer)){return new Dicer(e)}n.call(this,e);if(!e||!e.headerFirst&&typeof e.boundary!=="string"){throw new TypeError("Boundary required")}if(typeof e.boundary==="string"){this.setBoundary(e.boundary)}else{this._bparser=undefined}this._headerFirst=e.headerFirst;this._dashes=0;this._parts=0;this._finished=false;this._realFinish=false;this._isPreamble=true;this._justMatched=false;this._firstWrite=true;this._inHeader=true;this._part=undefined;this._cb=undefined;this._ignoreData=false;this._partOpts={highWaterMark:e.partHwm};this._pause=false;const t=this;this._hparser=new c(e);this._hparser.on("header",(function(e){t._inHeader=false;t._part.emit("header",e)}))}s(Dicer,n);Dicer.prototype.emit=function(e){if(e==="finish"&&!this._realFinish){if(!this._finished){const e=this;process.nextTick((function(){e.emit("error",new Error("Unexpected end of multipart data"));if(e._part&&!e._ignoreData){const t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data"));e._part.push(null);process.nextTick((function(){e._realFinish=true;e.emit("finish");e._realFinish=false}));return}e._realFinish=true;e.emit("finish");e._realFinish=false}))}}else{n.prototype.emit.apply(this,arguments)}};Dicer.prototype._write=function(e,t,r){if(!this._hparser&&!this._bparser){return r()}if(this._headerFirst&&this._isPreamble){if(!this._part){this._part=new a(this._partOpts);if(this.listenerCount("preamble")!==0){this.emit("preamble",this._part)}else{this._ignore()}}const t=this._hparser.push(e);if(!this._inHeader&&t!==undefined&&t{"use strict";const n=r(8474).EventEmitter;const s=r(7975).inherits;const A=r(2393);const a=r(4136);const c=Buffer.from("\r\n\r\n");const l=/\r\n/g;const u=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function HeaderParser(e){n.call(this);e=e||{};const t=this;this.nread=0;this.maxed=false;this.npairs=0;this.maxHeaderPairs=A(e,"maxHeaderPairs",2e3);this.maxHeaderSize=A(e,"maxHeaderSize",80*1024);this.buffer="";this.header={};this.finished=false;this.ss=new a(c);this.ss.on("info",(function(e,r,n,s){if(r&&!t.maxed){if(t.nread+s-n>=t.maxHeaderSize){s=t.maxHeaderSize-t.nread+n;t.nread=t.maxHeaderSize;t.maxed=true}else{t.nread+=s-n}t.buffer+=r.toString("binary",n,s)}if(e){t._finish()}}))}s(HeaderParser,n);HeaderParser.prototype.push=function(e){const t=this.ss.push(e);if(this.finished){return t}};HeaderParser.prototype.reset=function(){this.finished=false;this.buffer="";this.header={};this.ss.reset()};HeaderParser.prototype._finish=function(){if(this.buffer){this._parseHeader()}this.ss.matches=this.ss.maxMatches;const e=this.header;this.header={};this.buffer="";this.finished=true;this.nread=this.npairs=0;this.maxed=false;this.emit("header",e)};HeaderParser.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs){return}const e=this.buffer.split(l);const t=e.length;let r,n;for(var s=0;s{"use strict";const n=r(7975).inherits;const s=r(7075).Readable;function PartStream(e){s.call(this,e)}n(PartStream,s);PartStream.prototype._read=function(e){};e.exports=PartStream},4136:(e,t,r)=>{"use strict";const n=r(8474).EventEmitter;const s=r(7975).inherits;function SBMH(e){if(typeof e==="string"){e=Buffer.from(e)}if(!Buffer.isBuffer(e)){throw new TypeError("The needle has to be a String or a Buffer.")}const t=e.length;if(t===0){throw new Error("The needle cannot be an empty String/Buffer.")}if(t>256){throw new Error("The needle cannot have a length bigger than 256.")}this.maxMatches=Infinity;this.matches=0;this._occ=new Array(256).fill(t);this._lookbehind_size=0;this._needle=e;this._bufpos=0;this._lookbehind=Buffer.alloc(t);for(var r=0;r=0){this.emit("info",false,this._lookbehind,0,this._lookbehind_size);this._lookbehind_size=0}else{const r=this._lookbehind_size+A;if(r>0){this.emit("info",false,this._lookbehind,0,r)}this._lookbehind.copy(this._lookbehind,0,r,this._lookbehind_size-r);this._lookbehind_size-=r;e.copy(this._lookbehind,this._lookbehind_size);this._lookbehind_size+=t;this._bufpos=t;return t}}A+=(A>=0)*this._bufpos;if(e.indexOf(r,A)!==-1){A=e.indexOf(r,A);++this.matches;if(A>0){this.emit("info",true,e,this._bufpos,A)}else{this.emit("info",true)}return this._bufpos=A+n}else{A=t-n}while(A0){this.emit("info",false,e,this._bufpos,A{"use strict";const n=r(7075).Writable;const{inherits:s}=r(7975);const A=r(7182);const a=r(1192);const c=r(855);const l=r(8929);function Busboy(e){if(!(this instanceof Busboy)){return new Busboy(e)}if(typeof e!=="object"){throw new TypeError("Busboy expected an options-Object.")}if(typeof e.headers!=="object"){throw new TypeError("Busboy expected an options-Object with headers-attribute.")}if(typeof e.headers["content-type"]!=="string"){throw new TypeError("Missing Content-Type-header.")}const{headers:t,...r}=e;this.opts={autoDestroy:false,...r};n.call(this,this.opts);this._done=false;this._parser=this.getParserByHeaders(t);this._finished=false}s(Busboy,n);Busboy.prototype.emit=function(e){if(e==="finish"){if(!this._done){this._parser?.end();return}else if(this._finished){return}this._finished=true}n.prototype.emit.apply(this,arguments)};Busboy.prototype.getParserByHeaders=function(e){const t=l(e["content-type"]);const r={defCharset:this.opts.defCharset,fileHwm:this.opts.fileHwm,headers:e,highWaterMark:this.opts.highWaterMark,isPartAFile:this.opts.isPartAFile,limits:this.opts.limits,parsedConType:t,preservePath:this.opts.preservePath};if(a.detect.test(t[0])){return new a(this,r)}if(c.detect.test(t[0])){return new c(this,r)}throw new Error("Unsupported Content-Type.")};Busboy.prototype._write=function(e,t,r){this._parser.write(e,r)};e.exports=Busboy;e.exports["default"]=Busboy;e.exports.Busboy=Busboy;e.exports.Dicer=A},1192:(e,t,r)=>{"use strict";const{Readable:n}=r(7075);const{inherits:s}=r(7975);const A=r(7182);const a=r(8929);const c=r(2747);const l=r(692);const u=r(2393);const h=/^boundary$/i;const g=/^form-data$/i;const p=/^charset$/i;const C=/^filename$/i;const y=/^name$/i;Multipart.detect=/^multipart\/form-data/i;function Multipart(e,t){let r;let n;const s=this;let I;const B=t.limits;const Q=t.isPartAFile||((e,t,r)=>t==="application/octet-stream"||r!==undefined);const b=t.parsedConType||[];const w=t.defCharset||"utf8";const S=t.preservePath;const k={highWaterMark:t.fileHwm};for(r=0,n=b.length;rN){s.parser.removeListener("part",onPart);s.parser.on("part",skipPart);e.hitPartsLimit=true;e.emit("partsLimit");return skipPart(t)}if(U){const e=U;e.emit("end");e.removeAllListeners("end")}t.on("header",(function(A){let u;let h;let I;let B;let b;let N;let T=0;if(A["content-type"]){I=a(A["content-type"][0]);if(I[0]){u=I[0].toLowerCase();for(r=0,n=I.length;rR){const n=R-T+e.length;if(n>0){r.push(e.slice(0,n))}r.truncated=true;r.bytesRead=R;t.removeAllListeners("data");r.emit("limit");return}else if(!r.push(e)){s._pause=true}r.bytesRead=T};P=function(){O=undefined;r.push(null)}}else{if(M===_){if(!e.hitFieldsLimit){e.hitFieldsLimit=true;e.emit("fieldsLimit")}return skipPart(t)}++M;++x;let r="";let n=false;U=t;F=function(e){if((T+=e.length)>v){const s=v-(T-e.length);r+=e.toString("binary",0,s);n=true;t.removeAllListeners("data")}else{r+=e.toString("binary")}};P=function(){U=undefined;if(r.length){r=c(r,"binary",B)}e.emit("field",h,r,false,n,b,u);--x;checkFinished()}}t._readableState.sync=false;t.on("data",F);t.on("end",P)})).on("error",(function(e){if(O){O.emit("error",e)}}))})).on("error",(function(t){e.emit("error",t)})).on("finish",(function(){P=true;checkFinished()}))}Multipart.prototype.write=function(e,t){const r=this.parser.write(e);if(r&&!this._pause){t()}else{this._needDrain=!r;this._cb=t}};Multipart.prototype.end=function(){const e=this;if(e.parser.writable){e.parser.end()}else if(!e._boy._done){process.nextTick((function(){e._boy._done=true;e._boy.emit("finish")}))}};function skipPart(e){e.resume()}function FileStream(e){n.call(this,e);this.bytesRead=0;this.truncated=false}s(FileStream,n);FileStream.prototype._read=function(e){};e.exports=Multipart},855:(e,t,r)=>{"use strict";const n=r(1496);const s=r(2747);const A=r(2393);const a=/^charset$/i;UrlEncoded.detect=/^application\/x-www-form-urlencoded/i;function UrlEncoded(e,t){const r=t.limits;const s=t.parsedConType;this.boy=e;this.fieldSizeLimit=A(r,"fieldSize",1*1024*1024);this.fieldNameSizeLimit=A(r,"fieldNameSize",100);this.fieldsLimit=A(r,"fields",Infinity);let c;for(var l=0,u=s.length;la){this._key+=this.decoder.write(e.toString("binary",a,r))}this._state="val";this._hitLimit=false;this._checkingBytes=true;this._val="";this._bytesVal=0;this._valTrunc=false;this.decoder.reset();a=r+1}else if(n!==undefined){++this._fields;let r;const A=this._keyTrunc;if(n>a){r=this._key+=this.decoder.write(e.toString("binary",a,n))}else{r=this._key}this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();if(r.length){this.boy.emit("field",s(r,"binary",this.charset),"",A,false)}a=n+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(A>a){this._key+=this.decoder.write(e.toString("binary",a,A))}a=A;if((this._bytesKey=this._key.length)===this.fieldNameSizeLimit){this._checkingBytes=false;this._keyTrunc=true}}else{if(aa){this._val+=this.decoder.write(e.toString("binary",a,n))}this.boy.emit("field",s(this._key,"binary",this.charset),s(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc);this._state="key";this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();a=n+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(A>a){this._val+=this.decoder.write(e.toString("binary",a,A))}a=A;if(this._val===""&&this.fieldSizeLimit===0||(this._bytesVal=this._val.length)===this.fieldSizeLimit){this._checkingBytes=false;this._valTrunc=true}}else{if(a0){this.boy.emit("field",s(this._key,"binary",this.charset),"",this._keyTrunc,false)}else if(this._state==="val"){this.boy.emit("field",s(this._key,"binary",this.charset),s(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc)}this.boy._done=true;this.boy.emit("finish")};e.exports=UrlEncoded},1496:e=>{"use strict";const t=/\+/g;const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function Decoder(){this.buffer=undefined}Decoder.prototype.write=function(e){e=e.replace(t," ");let n="";let s=0;let A=0;const a=e.length;for(;sA){n+=e.substring(A,s);A=s}this.buffer="";++A}}if(A{"use strict";e.exports=function basename(e){if(typeof e!=="string"){return""}for(var t=e.length-1;t>=0;--t){switch(e.charCodeAt(t)){case 47:case 92:e=e.slice(t+1);return e===".."||e==="."?"":e}}return e===".."||e==="."?"":e}},2747:function(e){"use strict";const t=new TextDecoder("utf-8");const r=new Map([["utf-8",t],["utf8",t]]);function getDecoder(e){let t;while(true){switch(e){case"utf-8":case"utf8":return n.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 n.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return n.utf16le;case"base64":return n.base64;default:if(t===undefined){t=true;e=e.toLowerCase();continue}return n.other.bind(e)}}}const n={utf8:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}return e.utf8Slice(0,e.length)},latin1:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){return e}return e.latin1Slice(0,e.length)},utf16le:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}return e.ucs2Slice(0,e.length)},base64:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}return e.base64Slice(0,e.length)},other:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}if(r.has(this.toString())){try{return r.get(this).decode(e)}catch{}}return typeof e==="string"?e:e.toString()}};function decodeText(e,t,r){if(e){return getDecoder(r)(e,t)}return e}e.exports=decodeText},2393:e=>{"use strict";e.exports=function getLimit(e,t,r){if(!e||e[t]===undefined||e[t]===null){return r}if(typeof e[t]!=="number"||isNaN(e[t])){throw new TypeError("Limit "+t+" is not a valid number")}return e[t]}},8929:(e,t,r)=>{"use strict";const n=r(2747);const s=/%[a-fA-F0-9][a-fA-F0-9]/g;const A={"%00":"\0","%01":"","%02":"","%03":"","%04":"","%05":"","%06":"","%07":"","%08":"\b","%09":"\t","%0a":"\n","%0A":"\n","%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":"","%1B":"","%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":"","%7F":"","%80":"€","%81":"","%82":"‚","%83":"ƒ","%84":"„","%85":"…","%86":"†","%87":"‡","%88":"ˆ","%89":"‰","%8a":"Š","%8A":"Š","%8b":"‹","%8B":"‹","%8c":"Œ","%8C":"Œ","%8d":"","%8D":"","%8e":"Ž","%8E":"Ž","%8f":"","%8F":"","%90":"","%91":"‘","%92":"’","%93":"“","%94":"”","%95":"•","%96":"–","%97":"—","%98":"˜","%99":"™","%9a":"š","%9A":"š","%9b":"›","%9B":"›","%9c":"œ","%9C":"œ","%9d":"","%9D":"","%9e":"ž","%9E":"ž","%9f":"Ÿ","%9F":"Ÿ","%a0":" ","%A0":" ","%a1":"¡","%A1":"¡","%a2":"¢","%A2":"¢","%a3":"£","%A3":"£","%a4":"¤","%A4":"¤","%a5":"¥","%A5":"¥","%a6":"¦","%A6":"¦","%a7":"§","%A7":"§","%a8":"¨","%A8":"¨","%a9":"©","%A9":"©","%aa":"ª","%Aa":"ª","%aA":"ª","%AA":"ª","%ab":"«","%Ab":"«","%aB":"«","%AB":"«","%ac":"¬","%Ac":"¬","%aC":"¬","%AC":"¬","%ad":"­","%Ad":"­","%aD":"­","%AD":"­","%ae":"®","%Ae":"®","%aE":"®","%AE":"®","%af":"¯","%Af":"¯","%aF":"¯","%AF":"¯","%b0":"°","%B0":"°","%b1":"±","%B1":"±","%b2":"²","%B2":"²","%b3":"³","%B3":"³","%b4":"´","%B4":"´","%b5":"µ","%B5":"µ","%b6":"¶","%B6":"¶","%b7":"·","%B7":"·","%b8":"¸","%B8":"¸","%b9":"¹","%B9":"¹","%ba":"º","%Ba":"º","%bA":"º","%BA":"º","%bb":"»","%Bb":"»","%bB":"»","%BB":"»","%bc":"¼","%Bc":"¼","%bC":"¼","%BC":"¼","%bd":"½","%Bd":"½","%bD":"½","%BD":"½","%be":"¾","%Be":"¾","%bE":"¾","%BE":"¾","%bf":"¿","%Bf":"¿","%bF":"¿","%BF":"¿","%c0":"À","%C0":"À","%c1":"Á","%C1":"Á","%c2":"Â","%C2":"Â","%c3":"Ã","%C3":"Ã","%c4":"Ä","%C4":"Ä","%c5":"Å","%C5":"Å","%c6":"Æ","%C6":"Æ","%c7":"Ç","%C7":"Ç","%c8":"È","%C8":"È","%c9":"É","%C9":"É","%ca":"Ê","%Ca":"Ê","%cA":"Ê","%CA":"Ê","%cb":"Ë","%Cb":"Ë","%cB":"Ë","%CB":"Ë","%cc":"Ì","%Cc":"Ì","%cC":"Ì","%CC":"Ì","%cd":"Í","%Cd":"Í","%cD":"Í","%CD":"Í","%ce":"Î","%Ce":"Î","%cE":"Î","%CE":"Î","%cf":"Ï","%Cf":"Ï","%cF":"Ï","%CF":"Ï","%d0":"Ð","%D0":"Ð","%d1":"Ñ","%D1":"Ñ","%d2":"Ò","%D2":"Ò","%d3":"Ó","%D3":"Ó","%d4":"Ô","%D4":"Ô","%d5":"Õ","%D5":"Õ","%d6":"Ö","%D6":"Ö","%d7":"×","%D7":"×","%d8":"Ø","%D8":"Ø","%d9":"Ù","%D9":"Ù","%da":"Ú","%Da":"Ú","%dA":"Ú","%DA":"Ú","%db":"Û","%Db":"Û","%dB":"Û","%DB":"Û","%dc":"Ü","%Dc":"Ü","%dC":"Ü","%DC":"Ü","%dd":"Ý","%Dd":"Ý","%dD":"Ý","%DD":"Ý","%de":"Þ","%De":"Þ","%dE":"Þ","%DE":"Þ","%df":"ß","%Df":"ß","%dF":"ß","%DF":"ß","%e0":"à","%E0":"à","%e1":"á","%E1":"á","%e2":"â","%E2":"â","%e3":"ã","%E3":"ã","%e4":"ä","%E4":"ä","%e5":"å","%E5":"å","%e6":"æ","%E6":"æ","%e7":"ç","%E7":"ç","%e8":"è","%E8":"è","%e9":"é","%E9":"é","%ea":"ê","%Ea":"ê","%eA":"ê","%EA":"ê","%eb":"ë","%Eb":"ë","%eB":"ë","%EB":"ë","%ec":"ì","%Ec":"ì","%eC":"ì","%EC":"ì","%ed":"í","%Ed":"í","%eD":"í","%ED":"í","%ee":"î","%Ee":"î","%eE":"î","%EE":"î","%ef":"ï","%Ef":"ï","%eF":"ï","%EF":"ï","%f0":"ð","%F0":"ð","%f1":"ñ","%F1":"ñ","%f2":"ò","%F2":"ò","%f3":"ó","%F3":"ó","%f4":"ô","%F4":"ô","%f5":"õ","%F5":"õ","%f6":"ö","%F6":"ö","%f7":"÷","%F7":"÷","%f8":"ø","%F8":"ø","%f9":"ù","%F9":"ù","%fa":"ú","%Fa":"ú","%fA":"ú","%FA":"ú","%fb":"û","%Fb":"û","%fB":"û","%FB":"û","%fc":"ü","%Fc":"ü","%fC":"ü","%FC":"ü","%fd":"ý","%Fd":"ý","%fD":"ý","%FD":"ý","%fe":"þ","%Fe":"þ","%fE":"þ","%FE":"þ","%ff":"ÿ","%Ff":"ÿ","%fF":"ÿ","%FF":"ÿ"};function encodedReplacer(e){return A[e]}const a=0;const c=1;const l=2;const u=3;function parseParams(e){const t=[];let r=a;let A="";let h=false;let g=false;let p=0;let C="";const y=e.length;for(var I=0;I{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GCE_LINUX_BIOS_PATHS=void 0;t.isGoogleCloudServerless=isGoogleCloudServerless;t.isGoogleComputeEngineLinux=isGoogleComputeEngineLinux;t.isGoogleComputeEngineMACAddress=isGoogleComputeEngineMACAddress;t.isGoogleComputeEngine=isGoogleComputeEngine;t.detectGCPResidency=detectGCPResidency;const n=r(9896);const s=r(857);t.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};const A=/^42:01/;function isGoogleCloudServerless(){const e=process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE;return!!e}function isGoogleComputeEngineLinux(){if((0,s.platform)()!=="linux")return false;try{(0,n.statSync)(t.GCE_LINUX_BIOS_PATHS.BIOS_DATE);const e=(0,n.readFileSync)(t.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(e)}catch{return false}}function isGoogleComputeEngineMACAddress(){const e=(0,s.networkInterfaces)();for(const t of Object.values(e)){if(!t)continue;for(const{mac:e}of t){if(A.test(e)){return true}}}return false}function isGoogleComputeEngine(){return isGoogleComputeEngineLinux()||isGoogleComputeEngineMACAddress()}function detectGCPResidency(){return isGoogleCloudServerless()||isGoogleComputeEngine()}},9595:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A{switch(e){case"params":case"property":case"headers":break;case"qs":throw new Error("'qs' is not a valid configuration option. Please use 'params' instead.");default:throw new Error(`'${e}' is not a valid configuration option.`)}}))}async function metadataAccessor(e,r={},n=3,s=false){const A=new Headers(t.HEADERS);let a="";let u={};if(typeof e==="object"){const t=e;new Headers(t.headers).forEach(((e,t)=>A.set(t,e)));a=t.metadataKey;u=t.params||u;n=t.noResponseRetries||n;s=t.fastFail||s}else{a=e}if(typeof r==="string"){a+=`/${r}`}else{validate(r);if(r.property){a+=`/${r.property}`}new Headers(r.headers).forEach(((e,t)=>A.set(t,e)));u=r.params||u}const h=s?fastFailMetadataRequest:c.request;const p={url:`${getBaseUrl()}/${a}`,headers:A,retryConfig:{noResponseRetries:n},params:u,responseType:"text",timeout:requestTimeout()};g.info("instance request %j",p);const C=await h(p);g.info("instance metadata is %s",C.data);const y=C.headers.get(t.HEADER_NAME);if(y!==t.HEADER_VALUE){throw new RangeError(`Invalid response from metadata service: incorrect ${t.HEADER_NAME} header. Expected '${t.HEADER_VALUE}', got ${y?`'${y}'`:"no header"}`)}if(typeof C.data==="string"){try{return l.parse(C.data)}catch{}}return C.data}async function fastFailMetadataRequest(e){const r={...e,url:e.url?.toString().replace(getBaseUrl(),getBaseUrl(t.SECONDARY_HOST_ADDRESS))};const n=(0,c.request)(e);const s=(0,c.request)(r);return Promise.any([n,s])}function instance(e){return metadataAccessor("instance",e)}function project(e){return metadataAccessor("project",e)}function universe(e){return metadataAccessor("universe",e)}async function bulk(e){const t={};await Promise.all(e.map((e=>(async()=>{const r=await metadataAccessor(e);const n=e.metadataKey;t[n]=r})())));return t}function detectGCPAvailableRetries(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}let p;async function isAvailable(){if(process.env.METADATA_SERVER_DETECTION){const e=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(e in t.METADATA_SERVER_DETECTION)){throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${e}\`, but it should be \`${Object.keys(t.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`)}switch(e){case"assume-present":return true;case"none":return false;case"bios-only":return getGCPResidency();case"ping-only":}}try{if(p===undefined){p=metadataAccessor("instance",undefined,detectGCPAvailableRetries(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))}await p;return true}catch(e){const t=e;if(process.env.DEBUG_AUTH){console.info(t)}if(t.type==="request-timeout"){return false}if(t.response&&t.response.status===404){return false}else{if(!(t.response&&t.response.status===404)&&(!t.code||!["EHOSTDOWN","EHOSTUNREACH","ENETUNREACH","ENOENT","ENOTFOUND","ECONNREFUSED"].includes(t.code.toString()))){let e="UNKNOWN";if(t.code)e=t.code.toString();process.emitWarning(`received unexpected error = ${t.message} code = ${e}`,"MetadataLookupWarning")}return false}}}function resetIsAvailableCache(){p=undefined}t.gcpResidencyCache=null;function getGCPResidency(){if(t.gcpResidencyCache===null){setGCPResidency()}return t.gcpResidencyCache}function setGCPResidency(e=null){t.gcpResidencyCache=e!==null?e:(0,u.detectGCPResidency)()}function requestTimeout(){return getGCPResidency()?0:3e3}a(r(6128),t)},2981:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Glob=void 0;const n=r(1409);const s=r(3136);const A=r(8958);const a=r(7813);const c=r(1157);const l=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Glob{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");this.withFileTypes=!!t.withFileTypes;this.signal=t.signal;this.follow=!!t.follow;this.dot=!!t.dot;this.dotRelative=!!t.dotRelative;this.nodir=!!t.nodir;this.mark=!!t.mark;if(!t.cwd){this.cwd=""}else if(t.cwd instanceof URL||t.cwd.startsWith("file://")){t.cwd=(0,s.fileURLToPath)(t.cwd)}this.cwd=t.cwd||"";this.root=t.root;this.magicalBraces=!!t.magicalBraces;this.nobrace=!!t.nobrace;this.noext=!!t.noext;this.realpath=!!t.realpath;this.absolute=t.absolute;this.includeChildMatches=t.includeChildMatches!==false;this.noglobstar=!!t.noglobstar;this.matchBase=!!t.matchBase;this.maxDepth=typeof t.maxDepth==="number"?t.maxDepth:Infinity;this.stat=!!t.stat;this.ignore=t.ignore;if(this.withFileTypes&&this.absolute!==undefined){throw new Error("cannot set absolute and withFileTypes:true")}if(typeof e==="string"){e=[e]}this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===false;if(this.windowsPathsNoEscape){e=e.map((e=>e.replace(/\\/g,"/")))}if(this.matchBase){if(t.noglobstar){throw new TypeError("base matching requires globstar")}e=e.map((e=>e.includes("/")?e:`./**/${e}`))}this.pattern=e;this.platform=t.platform||l;this.opts={...t,platform:this.platform};if(t.scurry){this.scurry=t.scurry;if(t.nocase!==undefined&&t.nocase!==t.scurry.nocase){throw new Error("nocase option contradicts provided scurry option")}}else{const e=t.platform==="win32"?A.PathScurryWin32:t.platform==="darwin"?A.PathScurryDarwin:t.platform?A.PathScurryPosix:A.PathScurry;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;const r=this.platform==="darwin"||this.platform==="win32";const c={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:r,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug};const u=this.pattern.map((e=>new n.Minimatch(e,c)));const[h,g]=u.reduce(((e,t)=>{e[0].push(...t.set);e[1].push(...t.globParts);return e}),[[],[]]);this.patterns=h.map(((e,t)=>{const r=g[t];if(!r)throw new Error("invalid pattern object");return new a.Pattern(e,r,0,this.platform)}))}async walk(){return[...await new c.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new c.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new c.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new c.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}t.Glob=Glob},5197:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.hasMagic=void 0;const n=r(1409);const hasMagic=(e,t={})=>{if(!Array.isArray(e)){e=[e]}for(const r of e){if(new n.Minimatch(r,t).hasMagic())return true}return false};t.hasMagic=hasMagic},5637:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Ignore=void 0;const n=r(1409);const s=r(7813);const A=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Ignore{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:r,noext:n,noglobstar:s,platform:a=A}){this.relative=[];this.absolute=[];this.relativeChildren=[];this.absoluteChildren=[];this.platform=a;this.mmopts={dot:true,nobrace:t,nocase:r,noext:n,noglobstar:s,optimizationLevel:2,platform:a,nocomment:true,nonegate:true};for(const t of e)this.add(t)}add(e){const t=new n.Minimatch(e,this.mmopts);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.glob=t.sync=t.iterate=t.iterateSync=t.stream=t.streamSync=t.Ignore=t.hasMagic=t.Glob=t.unescape=t.escape=void 0;t.globStreamSync=globStreamSync;t.globStream=globStream;t.globSync=globSync;t.globIterateSync=globIterateSync;t.globIterate=globIterate;const n=r(1409);const s=r(2981);const A=r(5197);var a=r(1409);Object.defineProperty(t,"escape",{enumerable:true,get:function(){return a.escape}});Object.defineProperty(t,"unescape",{enumerable:true,get:function(){return a.unescape}});var c=r(2981);Object.defineProperty(t,"Glob",{enumerable:true,get:function(){return c.Glob}});var l=r(5197);Object.defineProperty(t,"hasMagic",{enumerable:true,get:function(){return l.hasMagic}});var u=r(5637);Object.defineProperty(t,"Ignore",{enumerable:true,get:function(){return u.Ignore}});function globStreamSync(e,t={}){return new s.Glob(e,t).streamSync()}function globStream(e,t={}){return new s.Glob(e,t).stream()}function globSync(e,t={}){return new s.Glob(e,t).walkSync()}async function glob_(e,t={}){return new s.Glob(e,t).walk()}function globIterateSync(e,t={}){return new s.Glob(e,t).iterateSync()}function globIterate(e,t={}){return new s.Glob(e,t).iterate()}t.streamSync=globStreamSync;t.stream=Object.assign(globStream,{sync:globStreamSync});t.iterateSync=globIterateSync;t.iterate=Object.assign(globIterate,{sync:globIterateSync});t.sync=Object.assign(globSync,{stream:globStreamSync,iterate:globIterateSync});t.glob=Object.assign(glob_,{glob:glob_,globSync:globSync,sync:t.sync,globStream:globStream,stream:t.stream,globStreamSync:globStreamSync,streamSync:t.streamSync,globIterate:globIterate,iterate:t.iterate,globIterateSync:globIterateSync,iterateSync:t.iterateSync,Glob:s.Glob,hasMagic:A.hasMagic,escape:n.escape,unescape:n.unescape});t.glob.glob=t.glob},7813:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Pattern=void 0;const n=r(1409);const isPatternList=e=>e.length>=1;const isGlobList=e=>e.length>=1;class Pattern{#ee;#te;#re;length;#ne;#ie;#se;#oe;#Ae;#ae;#ce=true;constructor(e,t,r,n){if(!isPatternList(e)){throw new TypeError("empty pattern list")}if(!isGlobList(t)){throw new TypeError("empty glob list")}if(t.length!==e.length){throw new TypeError("mismatched pattern list and glob list lengths")}this.length=e.length;if(r<0||r>=this.length){throw new TypeError("index out of range")}this.#ee=e;this.#te=t;this.#re=r;this.#ne=n;if(this.#re===0){if(this.isUNC()){const[e,t,r,n,...s]=this.#ee;const[A,a,c,l,...u]=this.#te;if(s[0]===""){s.shift();u.shift()}const h=[e,t,r,n,""].join("/");const g=[A,a,c,l,""].join("/");this.#ee=[h,...s];this.#te=[g,...u];this.length=this.#ee.length}else if(this.isDrive()||this.isAbsolute()){const[e,...t]=this.#ee;const[r,...n]=this.#te;if(t[0]===""){t.shift();n.shift()}const s=e+"/";const A=r+"/";this.#ee=[s,...t];this.#te=[A,...n];this.length=this.#ee.length}}}pattern(){return this.#ee[this.#re]}isString(){return typeof this.#ee[this.#re]==="string"}isGlobstar(){return this.#ee[this.#re]===n.GLOBSTAR}isRegExp(){return this.#ee[this.#re]instanceof RegExp}globString(){return this.#se=this.#se||(this.#re===0?this.isAbsolute()?this.#te[0]+this.#te.slice(1).join("/"):this.#te.join("/"):this.#te.slice(this.#re).join("/"))}hasMore(){return this.length>this.#re+1}rest(){if(this.#ie!==undefined)return this.#ie;if(!this.hasMore())return this.#ie=null;this.#ie=new Pattern(this.#ee,this.#te,this.#re+1,this.#ne);this.#ie.#ae=this.#ae;this.#ie.#Ae=this.#Ae;this.#ie.#oe=this.#oe;return this.#ie}isUNC(){const e=this.#ee;return this.#Ae!==undefined?this.#Ae:this.#Ae=this.#ne==="win32"&&this.#re===0&&e[0]===""&&e[1]===""&&typeof e[2]==="string"&&!!e[2]&&typeof e[3]==="string"&&!!e[3]}isDrive(){const e=this.#ee;return this.#oe!==undefined?this.#oe:this.#oe=this.#ne==="win32"&&this.#re===0&&this.length>1&&typeof e[0]==="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){const e=this.#ee;return this.#ae!==undefined?this.#ae:this.#ae=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){const e=this.#ee[0];return typeof e==="string"&&this.isAbsolute()&&this.#re===0?e:""}checkFollowGlobstar(){return!(this.#re===0||!this.isGlobstar()||!this.#ce)}markFollowGlobstar(){if(this.#re===0||!this.isGlobstar()||!this.#ce)return false;this.#ce=false;return true}}t.Pattern=Pattern},7843:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Processor=t.SubWalks=t.MatchRecord=t.HasWalkedCache=void 0;const n=r(1409);class HasWalkedCache{store;constructor(e=new Map){this.store=e}copy(){return new HasWalkedCache(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){const r=e.fullpath();const n=this.store.get(r);if(n)n.add(t.globString());else this.store.set(r,new Set([t.globString()]))}}t.HasWalkedCache=HasWalkedCache;class MatchRecord{store=new Map;add(e,t,r){const n=(t?2:0)|(r?1:0);const s=this.store.get(e);this.store.set(e,s===undefined?n:n&s)}entries(){return[...this.store.entries()].map((([e,t])=>[e,!!(t&2),!!(t&1)]))}}t.MatchRecord=MatchRecord;class SubWalks{store=new Map;add(e,t){if(!e.canReaddir()){return}const r=this.store.get(e);if(r){if(!r.find((e=>e.globString()===t.globString()))){r.push(t)}}else this.store.set(e,[t])}get(e){const t=this.store.get(e);if(!t){throw new Error("attempting to walk unknown path")}return t}entries(){return this.keys().map((e=>[e,this.store.get(e)]))}keys(){return[...this.store.keys()].filter((e=>e.canReaddir()))}}t.SubWalks=SubWalks;class Processor{hasWalkedCache;matches=new MatchRecord;subwalks=new SubWalks;patterns;follow;dot;opts;constructor(e,t){this.opts=e;this.follow=!!e.follow;this.dot=!!e.dot;this.hasWalkedCache=t?t.copy():new HasWalkedCache}processPatterns(e,t){this.patterns=t;const r=t.map((t=>[e,t]));for(let[e,t]of r){this.hasWalkedCache.storeWalked(e,t);const r=t.root();const s=t.isAbsolute()&&this.opts.absolute!==false;if(r){e=e.resolve(r==="/"&&this.opts.root!==undefined?this.opts.root:r);const n=t.rest();if(!n){this.matches.add(e,true,false);continue}else{t=n}}if(e.isENOENT())continue;let A;let a;let c=false;while(typeof(A=t.pattern())==="string"&&(a=t.rest())){const r=e.resolve(A);e=r;t=a;c=true}A=t.pattern();a=t.rest();if(c){if(this.hasWalkedCache.hasWalked(e,t))continue;this.hasWalkedCache.storeWalked(e,t)}if(typeof A==="string"){const t=A===".."||A===""||A===".";this.matches.add(e.resolve(A),s,t);continue}else if(A===n.GLOBSTAR){if(!e.isSymbolicLink()||this.follow||t.checkFollowGlobstar()){this.subwalks.add(e,t)}const r=a?.pattern();const n=a?.rest();if(!a||(r===""||r===".")&&!n){this.matches.add(e,s,r===""||r===".")}else{if(r===".."){const t=e.parent||e;if(!n)this.matches.add(t,s,true);else if(!this.hasWalkedCache.hasWalked(t,n)){this.subwalks.add(t,n)}}}}else if(A instanceof RegExp){this.subwalks.add(e,t)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Processor(this.opts,this.hasWalkedCache)}filterEntries(e,t){const r=this.subwalks.get(e);const s=this.child();for(const e of t){for(const t of r){const r=t.isAbsolute();const A=t.pattern();const a=t.rest();if(A===n.GLOBSTAR){s.testGlobstar(e,t,a,r)}else if(A instanceof RegExp){s.testRegExp(e,A,a,r)}else{s.testString(e,A,a,r)}}}return s}testGlobstar(e,t,r,n){if(this.dot||!e.name.startsWith(".")){if(!t.hasMore()){this.matches.add(e,n,false)}if(e.canReaddir()){if(this.follow||!e.isSymbolicLink()){this.subwalks.add(e,t)}else if(e.isSymbolicLink()){if(r&&t.checkFollowGlobstar()){this.subwalks.add(e,r)}else if(t.markFollowGlobstar()){this.subwalks.add(e,t)}}}}if(r){const t=r.pattern();if(typeof t==="string"&&t!==".."&&t!==""&&t!=="."){this.testString(e,t,r.rest(),n)}else if(t===".."){const t=e.parent||e;this.subwalks.add(t,r)}else if(t instanceof RegExp){this.testRegExp(e,t,r.rest(),n)}}}testRegExp(e,t,r,n){if(!t.test(e.name))return;if(!r){this.matches.add(e,n,false)}else{this.subwalks.add(e,r)}}testString(e,t,r,n){if(!e.isNamed(t))return;if(!r){this.matches.add(e,n,false)}else{this.subwalks.add(e,r)}}}t.Processor=Processor},1157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GlobStream=t.GlobWalker=t.GlobUtil=void 0;const n=r(8275);const s=r(5637);const A=r(7843);const makeIgnore=(e,t)=>typeof e==="string"?new s.Ignore([e],t):Array.isArray(e)?new s.Ignore(e,t):e;class GlobUtil{path;patterns;opts;seen=new Set;paused=false;aborted=false;#le=[];#ue;#he;signal;maxDepth;includeChildMatches;constructor(e,t,r){this.patterns=e;this.path=t;this.opts=r;this.#he=!r.posix&&r.platform==="win32"?"\\":"/";this.includeChildMatches=r.includeChildMatches!==false;if(r.ignore||!this.includeChildMatches){this.#ue=makeIgnore(r.ignore??[],r);if(!this.includeChildMatches&&typeof this.#ue.add!=="function"){const e="cannot ignore child matches, ignore lacks add() method.";throw new Error(e)}}this.maxDepth=r.maxDepth||Infinity;if(r.signal){this.signal=r.signal;this.signal.addEventListener("abort",(()=>{this.#le.length=0}))}}#fe(e){return this.seen.has(e)||!!this.#ue?.ignored?.(e)}#de(e){return!!this.#ue?.childrenIgnored?.(e)}pause(){this.paused=true}resume(){if(this.signal?.aborted)return;this.paused=false;let e=undefined;while(!this.paused&&(e=this.#le.shift())){e()}}onResume(e){if(this.signal?.aborted)return;if(!this.paused){e()}else{this.#le.push(e)}}async matchCheck(e,t){if(t&&this.opts.nodir)return undefined;let r;if(this.opts.realpath){r=e.realpathCached()||await e.realpath();if(!r)return undefined;e=r}const n=e.isUnknown()||this.opts.stat;const s=n?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){const e=await s.realpath();if(e&&(e.isUnknown()||this.opts.stat)){await e.lstat()}}return this.matchCheckTest(s,t)}matchCheckTest(e,t){return e&&(this.maxDepth===Infinity||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#fe(e)?e:undefined}matchCheckSync(e,t){if(t&&this.opts.nodir)return undefined;let r;if(this.opts.realpath){r=e.realpathCached()||e.realpathSync();if(!r)return undefined;e=r}const n=e.isUnknown()||this.opts.stat;const s=n?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){const e=s.realpathSync();if(e&&(e?.isUnknown()||this.opts.stat)){e.lstatSync()}}return this.matchCheckTest(s,t)}matchFinish(e,t){if(this.#fe(e))return;if(!this.includeChildMatches&&this.#ue?.add){const t=`${e.relativePosix()}/**`;this.#ue.add(t)}const r=this.opts.absolute===undefined?t:this.opts.absolute;this.seen.add(e);const n=this.opts.mark&&e.isDirectory()?this.#he:"";if(this.opts.withFileTypes){this.matchEmit(e)}else if(r){const t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+n)}else{const t=this.opts.posix?e.relativePosix():e.relative();const r=this.opts.dotRelative&&!t.startsWith(".."+this.#he)?"."+this.#he:"";this.matchEmit(!t?"."+n:r+t+n)}}async match(e,t,r){const n=await this.matchCheck(e,r);if(n)this.matchFinish(n,t)}matchSync(e,t,r){const n=this.matchCheckSync(e,r);if(n)this.matchFinish(n,t)}walkCB(e,t,r){if(this.signal?.aborted)r();this.walkCB2(e,t,new A.Processor(this.opts),r)}walkCB2(e,t,r,n){if(this.#de(e))return n();if(this.signal?.aborted)n();if(this.paused){this.onResume((()=>this.walkCB2(e,t,r,n)));return}r.processPatterns(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;s++;this.match(e,t,n).then((()=>next()))}for(const e of r.subwalkTargets()){if(this.maxDepth!==Infinity&&e.depth()>=this.maxDepth){continue}s++;const t=e.readdirCached();if(e.calledReaddir())this.walkCB3(e,t,r,next);else{e.readdirCB(((t,n)=>this.walkCB3(e,n,r,next)),true)}}next()}walkCB3(e,t,r,n){r=r.filterEntries(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;s++;this.match(e,t,n).then((()=>next()))}for(const[e,t]of r.subwalks.entries()){s++;this.walkCB2(e,t,r.child(),next)}next()}walkCBSync(e,t,r){if(this.signal?.aborted)r();this.walkCB2Sync(e,t,new A.Processor(this.opts),r)}walkCB2Sync(e,t,r,n){if(this.#de(e))return n();if(this.signal?.aborted)n();if(this.paused){this.onResume((()=>this.walkCB2Sync(e,t,r,n)));return}r.processPatterns(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;this.matchSync(e,t,n)}for(const e of r.subwalkTargets()){if(this.maxDepth!==Infinity&&e.depth()>=this.maxDepth){continue}s++;const t=e.readdirSync();this.walkCB3Sync(e,t,r,next)}next()}walkCB3Sync(e,t,r,n){r=r.filterEntries(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;this.matchSync(e,t,n)}for(const[e,t]of r.subwalks.entries()){s++;this.walkCB2Sync(e,t,r.child(),next)}next()}}t.GlobUtil=GlobUtil;class GlobWalker extends GlobUtil{matches=new Set;constructor(e,t,r){super(e,t,r)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){await this.path.lstat()}await new Promise(((e,t)=>{this.walkCB(this.path,this.patterns,(()=>{if(this.signal?.aborted){t(this.signal.reason)}else{e(this.matches)}}))}));return this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason}));return this.matches}}t.GlobWalker=GlobWalker;class GlobStream extends GlobUtil{results;constructor(e,t,r){super(e,t,r);this.results=new n.Minipass({signal:this.signal,objectMode:true});this.results.on("drain",(()=>this.resume()));this.results.on("resume",(()=>this.resume()))}matchEmit(e){this.results.write(e);if(!this.results.flowing)this.pause()}stream(){const e=this.path;if(e.isUnknown()){e.lstat().then((()=>{this.walkCB(e,this.patterns,(()=>this.results.end()))}))}else{this.walkCB(e,this.patterns,(()=>this.results.end()))}return this.results}streamSync(){if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>this.results.end()));return this.results}}t.GlobStream=GlobStream},8895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assertValidPattern=void 0;const r=1024*64;const assertValidPattern=e=>{if(typeof e!=="string"){throw new TypeError("invalid pattern")}if(e.length>r){throw new TypeError("pattern is too long")}};t.assertValidPattern=assertValidPattern},3238:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.AST=void 0;const n=r(5192);const s=r(9829);const A=new Set(["!","?","+","*","@"]);const isExtglobType=e=>A.has(e);const a="(?!(?:^|/)\\.\\.?(?:$|/))";const c="(?!\\.)";const l=new Set(["[","."]);const u=new Set(["..","."]);const h=new Set("().*{}+?[]^$\\!");const regExpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const g="[^/]";const p=g+"*?";const C=g+"+?";class AST{type;#ge;#pe;#Ee=false;#Ce=[];#ye;#Ie;#Be;#Qe=false;#me;#be;#we=false;constructor(e,t,r={}){this.type=e;if(e)this.#pe=true;this.#ye=t;this.#ge=this.#ye?this.#ye.#ge:this;this.#me=this.#ge===this?r:this.#ge.#me;this.#Be=this.#ge===this?[]:this.#ge.#Be;if(e==="!"&&!this.#ge.#Qe)this.#Be.push(this);this.#Ie=this.#ye?this.#ye.#Ce.length:0}get hasMagic(){if(this.#pe!==undefined)return this.#pe;for(const e of this.#Ce){if(typeof e==="string")continue;if(e.type||e.hasMagic)return this.#pe=true}return this.#pe}toString(){if(this.#be!==undefined)return this.#be;if(!this.type){return this.#be=this.#Ce.map((e=>String(e))).join("")}else{return this.#be=this.type+"("+this.#Ce.map((e=>String(e))).join("|")+")"}}#Se(){if(this!==this.#ge)throw new Error("should only call on root");if(this.#Qe)return this;this.toString();this.#Qe=true;let e;while(e=this.#Be.pop()){if(e.type!=="!")continue;let t=e;let r=t.#ye;while(r){for(let n=t.#Ie+1;!r.type&&ntypeof e==="string"?e:e.toJSON())):[this.type,...this.#Ce.map((e=>e.toJSON()))];if(this.isStart()&&!this.type)e.unshift([]);if(this.isEnd()&&(this===this.#ge||this.#ge.#Qe&&this.#ye?.type==="!")){e.push({})}return e}isStart(){if(this.#ge===this)return true;if(!this.#ye?.isStart())return false;if(this.#Ie===0)return true;const e=this.#ye;for(let t=0;t{const[n,s,A,a]=typeof t==="string"?AST.#ve(t,this.#pe,r):t.toRegExpSource(e);this.#pe=this.#pe||A;this.#Ee=this.#Ee||a;return n})).join("");let A="";if(this.isStart()){if(typeof this.#Ce[0]==="string"){const r=this.#Ce.length===1&&u.has(this.#Ce[0]);if(!r){const r=l;const s=t&&r.has(n.charAt(0))||n.startsWith("\\.")&&r.has(n.charAt(2))||n.startsWith("\\.\\.")&&r.has(n.charAt(4));const u=!t&&!e&&r.has(n.charAt(0));A=s?a:u?c:""}}}let h="";if(this.isEnd()&&this.#ge.#Qe&&this.#ye?.type==="!"){h="(?:$|\\/)"}const g=A+n+h;return[g,(0,s.unescape)(n),this.#pe=!!this.#pe,this.#Ee]}const r=this.type==="*"||this.type==="+";const n=this.type==="!"?"(?:(?!(?:":"(?:";let A=this.#Re(t);if(this.isStart()&&this.isEnd()&&!A&&this.type!=="!"){const e=this.toString();this.#Ce=[e];this.type=null;this.#pe=undefined;return[e,(0,s.unescape)(this.toString()),false,false]}let h=!r||e||t||!c?"":this.#Re(true);if(h===A){h=""}if(h){A=`(?:${A})(?:${h})*?`}let g="";if(this.type==="!"&&this.#we){g=(this.isStart()&&!t?c:"")+C}else{const r=this.type==="!"?"))"+(this.isStart()&&!t&&!e?c:"")+p+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&h?")":this.type==="*"&&h?`)?`:`)${this.type}`;g=n+A+r}return[g,(0,s.unescape)(A),this.#pe=!!this.#pe,this.#Ee]}#Re(e){return this.#Ce.map((t=>{if(typeof t==="string"){throw new Error("string type in extglob ast??")}const[r,n,s,A]=t.toRegExpSource(e);this.#Ee=this.#Ee||A;return r})).filter((e=>!(this.isStart()&&this.isEnd())||!!e)).join("|")}static#ve(e,t,r=false){let A=false;let a="";let c=false;for(let s=0;s{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.parseClass=void 0;const r={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",true],"[:alpha:]":["\\p{L}\\p{Nl}",true],"[:ascii:]":["\\x"+"00-\\x"+"7f",false],"[:blank:]":["\\p{Zs}\\t",true],"[:cntrl:]":["\\p{Cc}",true],"[:digit:]":["\\p{Nd}",true],"[:graph:]":["\\p{Z}\\p{C}",true,true],"[:lower:]":["\\p{Ll}",true],"[:print:]":["\\p{C}",true],"[:punct:]":["\\p{P}",true],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",true],"[:upper:]":["\\p{Lu}",true],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",true],"[:xdigit:]":["A-Fa-f0-9",false]};const braceEscape=e=>e.replace(/[[\]\\-]/g,"\\$&");const regexpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const rangesToString=e=>e.join("");const parseClass=(e,t)=>{const n=t;if(e.charAt(n)!=="["){throw new Error("not in a brace expression")}const s=[];const A=[];let a=n+1;let c=false;let l=false;let u=false;let h=false;let g=n;let p="";e:while(ap){s.push(braceEscape(p)+"-"+braceEscape(t))}else if(t===p){s.push(braceEscape(t))}p="";a++;continue}if(e.startsWith("-]",a+1)){s.push(braceEscape(t+"-"));a+=2;continue}if(e.startsWith("-",a+1)){p=t;a+=2;continue}s.push(braceEscape(t));a++}if(g{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.escape=void 0;const escape=(e,{windowsPathsNoEscape:t=false}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");t.escape=escape},1409:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.unescape=t.escape=t.AST=t.Minimatch=t.match=t.makeRe=t.braceExpand=t.defaults=t.filter=t.GLOBSTAR=t.sep=t.minimatch=void 0;const s=n(r(8497));const A=r(8895);const a=r(3238);const c=r(6726);const l=r(9829);const minimatch=(e,t,r={})=>{(0,A.assertValidPattern)(t);if(!r.nocomment&&t.charAt(0)==="#"){return false}return new Minimatch(t,r).match(e)};t.minimatch=minimatch;const u=/^\*+([^+@!?\*\[\(]*)$/;const starDotExtTest=e=>t=>!t.startsWith(".")&&t.endsWith(e);const starDotExtTestDot=e=>t=>t.endsWith(e);const starDotExtTestNocase=e=>{e=e.toLowerCase();return t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)};const starDotExtTestNocaseDot=e=>{e=e.toLowerCase();return t=>t.toLowerCase().endsWith(e)};const h=/^\*+\.\*+$/;const starDotStarTest=e=>!e.startsWith(".")&&e.includes(".");const starDotStarTestDot=e=>e!=="."&&e!==".."&&e.includes(".");const g=/^\.\*+$/;const dotStarTest=e=>e!=="."&&e!==".."&&e.startsWith(".");const p=/^\*+$/;const starTest=e=>e.length!==0&&!e.startsWith(".");const starTestDot=e=>e.length!==0&&e!=="."&&e!=="..";const C=/^\?+([^+@!?\*\[\(]*)?$/;const qmarksTestNocase=([e,t=""])=>{const r=qmarksTestNoExt([e]);if(!t)return r;t=t.toLowerCase();return e=>r(e)&&e.toLowerCase().endsWith(t)};const qmarksTestNocaseDot=([e,t=""])=>{const r=qmarksTestNoExtDot([e]);if(!t)return r;t=t.toLowerCase();return e=>r(e)&&e.toLowerCase().endsWith(t)};const qmarksTestDot=([e,t=""])=>{const r=qmarksTestNoExtDot([e]);return!t?r:e=>r(e)&&e.endsWith(t)};const qmarksTest=([e,t=""])=>{const r=qmarksTestNoExt([e]);return!t?r:e=>r(e)&&e.endsWith(t)};const qmarksTestNoExt=([e])=>{const t=e.length;return e=>e.length===t&&!e.startsWith(".")};const qmarksTestNoExtDot=([e])=>{const t=e.length;return e=>e.length===t&&e!=="."&&e!==".."};const y=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";const I={win32:{sep:"\\"},posix:{sep:"/"}};t.sep=y==="win32"?I.win32.sep:I.posix.sep;t.minimatch.sep=t.sep;t.GLOBSTAR=Symbol("globstar **");t.minimatch.GLOBSTAR=t.GLOBSTAR;const B="[^/]";const Q=B+"*?";const b="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";const w="(?:(?!(?:\\/|^)\\.).)*?";const filter=(e,r={})=>n=>(0,t.minimatch)(n,e,r);t.filter=filter;t.minimatch.filter=t.filter;const ext=(e,t={})=>Object.assign({},e,t);const defaults=e=>{if(!e||typeof e!=="object"||!Object.keys(e).length){return t.minimatch}const r=t.minimatch;const m=(t,n,s={})=>r(t,n,ext(e,s));return Object.assign(m,{Minimatch:class Minimatch extends r.Minimatch{constructor(t,r={}){super(t,ext(e,r))}static defaults(t){return r.defaults(ext(e,t)).Minimatch}},AST:class AST extends r.AST{constructor(t,r,n={}){super(t,r,ext(e,n))}static fromGlob(t,n={}){return r.AST.fromGlob(t,ext(e,n))}},unescape:(t,n={})=>r.unescape(t,ext(e,n)),escape:(t,n={})=>r.escape(t,ext(e,n)),filter:(t,n={})=>r.filter(t,ext(e,n)),defaults:t=>r.defaults(ext(e,t)),makeRe:(t,n={})=>r.makeRe(t,ext(e,n)),braceExpand:(t,n={})=>r.braceExpand(t,ext(e,n)),match:(t,n,s={})=>r.match(t,n,ext(e,s)),sep:r.sep,GLOBSTAR:t.GLOBSTAR})};t.defaults=defaults;t.minimatch.defaults=t.defaults;const braceExpand=(e,t={})=>{(0,A.assertValidPattern)(e);if(t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)){return[e]}return(0,s.default)(e)};t.braceExpand=braceExpand;t.minimatch.braceExpand=t.braceExpand;const makeRe=(e,t={})=>new Minimatch(e,t).makeRe();t.makeRe=makeRe;t.minimatch.makeRe=t.makeRe;const match=(e,t,r={})=>{const n=new Minimatch(t,r);e=e.filter((e=>n.match(e)));if(n.options.nonull&&!e.length){e.push(t)}return e};t.match=match;t.minimatch.match=t.match;const S=/[?*]|[+@!]\(.*?\)|\[|\]/;const regExpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Minimatch{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,A.assertValidPattern)(e);t=t||{};this.options=t;this.pattern=e;this.platform=t.platform||y;this.isWindows=this.platform==="win32";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===false;if(this.windowsPathsNoEscape){this.pattern=this.pattern.replace(/\\/g,"/")}this.preserveMultipleSlashes=!!t.preserveMultipleSlashes;this.regexp=null;this.negate=false;this.nonegate=!!t.nonegate;this.comment=false;this.empty=false;this.partial=!!t.partial;this.nocase=!!this.options.nocase;this.windowsNoMagicRoot=t.windowsNoMagicRoot!==undefined?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase);this.globSet=[];this.globParts=[];this.set=[];this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1){return true}for(const e of this.set){for(const t of e){if(typeof t!=="string")return true}}return false}debug(...e){}make(){const e=this.pattern;const t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();this.globSet=[...new Set(this.braceExpand())];if(t.debug){this.debug=(...e)=>console.error(...e)}this.debug(this.pattern,this.globSet);const r=this.globSet.map((e=>this.slashSplit(e)));this.globParts=this.preprocess(r);this.debug(this.pattern,this.globParts);let n=this.globParts.map(((e,t,r)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=e[0]===""&&e[1]===""&&(e[2]==="?"||!S.test(e[2]))&&!S.test(e[3]);const r=/^[a-z]:/i.test(e[0]);if(t){return[...e.slice(0,4),...e.slice(4).map((e=>this.parse(e)))]}else if(r){return[e[0],...e.slice(1).map((e=>this.parse(e)))]}}return e.map((e=>this.parse(e)))}));this.debug(this.pattern,n);this.set=n.filter((e=>e.indexOf(false)===-1));if(this.isWindows){for(let e=0;e=2){e=this.firstPhasePreProcess(e);e=this.secondPhasePreProcess(e)}else if(t>=1){e=this.levelOneOptimize(e)}else{e=this.adjascentGlobstarOptimize(e)}return e}adjascentGlobstarOptimize(e){return e.map((e=>{let t=-1;while(-1!==(t=e.indexOf("**",t+1))){let r=t;while(e[r+1]==="**"){r++}if(r!==t){e.splice(t,r-t)}}return e}))}levelOneOptimize(e){return e.map((e=>{e=e.reduce(((e,t)=>{const r=e[e.length-1];if(t==="**"&&r==="**"){return e}if(t===".."){if(r&&r!==".."&&r!=="."&&r!=="**"){e.pop();return e}}e.push(t);return e}),[]);return e.length===0?[""]:e}))}levelTwoFileOptimize(e){if(!Array.isArray(e)){e=this.slashSplit(e)}let t=false;do{t=false;if(!this.preserveMultipleSlashes){for(let r=1;rn){r.splice(n+1,s-n)}let A=r[n+1];const a=r[n+2];const c=r[n+3];if(A!=="..")continue;if(!a||a==="."||a===".."||!c||c==="."||c===".."){continue}t=true;r.splice(n,1);const l=r.slice(0);l[n]="**";e.push(l);n--}if(!this.preserveMultipleSlashes){for(let e=1;ee.length))}partsMatch(e,t,r=false){let n=0;let s=0;let A=[];let a="";while(na){r=r.slice(c)}else if(a>c){e=e.slice(a)}}}}const{optimizationLevel:A=1}=this.options;if(A>=2){e=this.levelTwoFileOptimize(e)}this.debug("matchOne",this,{file:e,pattern:r});this.debug("matchOne",e.length,r.length);for(var a=0,c=0,l=e.length,u=r.length;a>> no match, partial?",e,p,r,C);if(p===l){return true}}return false}let A;if(typeof h==="string"){A=g===h;this.debug("string match",h,g,A)}else{A=h.test(g);this.debug("pattern match",h,g,A)}if(!A)return false}if(a===l&&c===u){return true}else if(a===l){return n}else if(c===u){return a===l-1&&e[a]===""}else{throw new Error("wtf?")}}braceExpand(){return(0,t.braceExpand)(this.pattern,this.options)}parse(e){(0,A.assertValidPattern)(e);const r=this.options;if(e==="**")return t.GLOBSTAR;if(e==="")return"";let n;let s=null;if(n=e.match(p)){s=r.dot?starTestDot:starTest}else if(n=e.match(u)){s=(r.nocase?r.dot?starDotExtTestNocaseDot:starDotExtTestNocase:r.dot?starDotExtTestDot:starDotExtTest)(n[1])}else if(n=e.match(C)){s=(r.nocase?r.dot?qmarksTestNocaseDot:qmarksTestNocase:r.dot?qmarksTestDot:qmarksTest)(n)}else if(n=e.match(h)){s=r.dot?starDotStarTestDot:starDotStarTest}else if(n=e.match(g)){s=dotStarTest}const c=a.AST.fromGlob(e,this.options).toMMPattern();if(s&&typeof c==="object"){Reflect.defineProperty(c,"test",{value:s})}return c}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;const e=this.set;if(!e.length){this.regexp=false;return this.regexp}const r=this.options;const n=r.noglobstar?Q:r.dot?b:w;const s=new Set(r.nocase?["i"]:[]);let A=e.map((e=>{const r=e.map((e=>{if(e instanceof RegExp){for(const t of e.flags.split(""))s.add(t)}return typeof e==="string"?regExpEscape(e):e===t.GLOBSTAR?t.GLOBSTAR:e._src}));r.forEach(((e,s)=>{const A=r[s+1];const a=r[s-1];if(e!==t.GLOBSTAR||a===t.GLOBSTAR){return}if(a===undefined){if(A!==undefined&&A!==t.GLOBSTAR){r[s+1]="(?:\\/|"+n+"\\/)?"+A}else{r[s]=n}}else if(A===undefined){r[s-1]=a+"(?:\\/|"+n+")?"}else if(A!==t.GLOBSTAR){r[s-1]=a+"(?:\\/|\\/"+n+"\\/)"+A;r[s+1]=t.GLOBSTAR}}));return r.filter((e=>e!==t.GLOBSTAR)).join("/")})).join("|");const[a,c]=e.length>1?["(?:",")"]:["",""];A="^"+a+A+c+"$";if(this.negate)A="^(?!"+A+").+$";try{this.regexp=new RegExp(A,[...s].join(""))}catch(e){this.regexp=false}return this.regexp}slashSplit(e){if(this.preserveMultipleSlashes){return e.split("/")}else if(this.isWindows&&/^\/\/[^\/]+/.test(e)){return["",...e.split(/\/+/)]}else{return e.split(/\/+/)}}match(e,t=this.partial){this.debug("match",e,this.pattern);if(this.comment){return false}if(this.empty){return e===""}if(e==="/"&&t){return true}const r=this.options;if(this.isWindows){e=e.split("\\").join("/")}const n=this.slashSplit(e);this.debug(this.pattern,"split",n);const s=this.set;this.debug(this.pattern,"set",s);let A=n[n.length-1];if(!A){for(let e=n.length-2;!A&&e>=0;e--){A=n[e]}}for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unescape=void 0;const unescape=(e,{windowsPathsNoEscape:t=false}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");t.unescape=unescape},2477:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.LRUCache=void 0;const r=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const n=new Set;const s=typeof process==="object"&&!!process?process:{};const emitWarning=(e,t,r,n)=>{typeof s.emitWarning==="function"?s.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)};let A=globalThis.AbortController;let a=globalThis.AbortSignal;if(typeof A==="undefined"){a=class AbortSignal{onabort;_onabort=[];reason;aborted=false;addEventListener(e,t){this._onabort.push(t)}};A=class AbortController{constructor(){warnACPolyfill()}signal=new a;abort(e){if(this.signal.aborted)return;this.signal.reason=e;this.signal.aborted=true;for(const t of this.signal._onabort){t(e)}this.signal.onabort?.(e)}};let e=s.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const warnACPolyfill=()=>{if(!e)return;e=false;emitWarning("AbortController is not defined. If using lru-cache in "+"node 14, load an AbortController polyfill from the "+"`node-abort-controller` package. A minimal polyfill is "+"provided for use by LRUCache.fetch(), but it should not be "+"relied upon in other contexts (eg, passing it to other APIs that "+"use AbortController/AbortSignal might have undesirable effects). "+"You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",warnACPolyfill)}}const shouldWarn=e=>!n.has(e);const c=Symbol("type");const isPosInt=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e);const getUintArray=e=>!isPosInt(e)?null:e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(e){super(e);this.fill(0)}}class Stack{heap;length;static#De=false;static create(e){const t=getUintArray(e);if(!t)return[];Stack.#De=true;const r=new Stack(e,t);Stack.#De=false;return r}constructor(e,t){if(!Stack.#De){throw new TypeError("instantiate Stack using Stack.create(n)")}this.heap=new t(e);this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class LRUCache{#_e;#Ne;#Te;#Fe;#Le;#Me;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#xe;#Oe;#Ue;#Pe;#Ge;#He;#Ye;#Je;#je;#Ve;#We;#qe;#ze;#Ke;#$e;#Ze;#Xe;static unsafeExposeInternals(e){return{starts:e.#ze,ttls:e.#Ke,sizes:e.#qe,keyMap:e.#Ue,keyList:e.#Pe,valList:e.#Ge,next:e.#He,prev:e.#Ye,get head(){return e.#Je},get tail(){return e.#je},free:e.#Ve,isBackgroundFetch:t=>e.#et(t),backgroundFetch:(t,r,n,s)=>e.#tt(t,r,n,s),moveToTail:t=>e.#rt(t),indexes:t=>e.#nt(t),rindexes:t=>e.#it(t),isStale:t=>e.#st(t)}}get max(){return this.#_e}get maxSize(){return this.#Ne}get calculatedSize(){return this.#Oe}get size(){return this.#xe}get fetchMethod(){return this.#Le}get memoMethod(){return this.#Me}get dispose(){return this.#Te}get disposeAfter(){return this.#Fe}constructor(e){const{max:t=0,ttl:r,ttlResolution:s=1,ttlAutopurge:A,updateAgeOnGet:a,updateAgeOnHas:c,allowStale:l,dispose:u,disposeAfter:h,noDisposeOnSet:g,noUpdateTTL:p,maxSize:C=0,maxEntrySize:y=0,sizeCalculation:I,fetchMethod:B,memoMethod:Q,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:k,ignoreFetchAbort:v}=e;if(t!==0&&!isPosInt(t)){throw new TypeError("max option must be a nonnegative integer")}const R=t?getUintArray(t):Array;if(!R){throw new Error("invalid max value: "+t)}this.#_e=t;this.#Ne=C;this.maxEntrySize=y||this.#Ne;this.sizeCalculation=I;if(this.sizeCalculation){if(!this.#Ne&&!this.maxEntrySize){throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize")}if(typeof this.sizeCalculation!=="function"){throw new TypeError("sizeCalculation set to non-function")}}if(Q!==undefined&&typeof Q!=="function"){throw new TypeError("memoMethod must be a function if defined")}this.#Me=Q;if(B!==undefined&&typeof B!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.#Le=B;this.#Ze=!!B;this.#Ue=new Map;this.#Pe=new Array(t).fill(undefined);this.#Ge=new Array(t).fill(undefined);this.#He=new R(t);this.#Ye=new R(t);this.#Je=0;this.#je=0;this.#Ve=Stack.create(t);this.#xe=0;this.#Oe=0;if(typeof u==="function"){this.#Te=u}if(typeof h==="function"){this.#Fe=h;this.#We=[]}else{this.#Fe=undefined;this.#We=undefined}this.#$e=!!this.#Te;this.#Xe=!!this.#Fe;this.noDisposeOnSet=!!g;this.noUpdateTTL=!!p;this.noDeleteOnFetchRejection=!!b;this.allowStaleOnFetchRejection=!!S;this.allowStaleOnFetchAbort=!!k;this.ignoreFetchAbort=!!v;if(this.maxEntrySize!==0){if(this.#Ne!==0){if(!isPosInt(this.#Ne)){throw new TypeError("maxSize must be a positive integer if specified")}}if(!isPosInt(this.maxEntrySize)){throw new TypeError("maxEntrySize must be a positive integer if specified")}this.#ot()}this.allowStale=!!l;this.noDeleteOnStaleGet=!!w;this.updateAgeOnGet=!!a;this.updateAgeOnHas=!!c;this.ttlResolution=isPosInt(s)||s===0?s:1;this.ttlAutopurge=!!A;this.ttl=r||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.#At()}if(this.#_e===0&&this.ttl===0&&this.#Ne===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.#_e&&!this.#Ne){const e="LRU_CACHE_UNBOUNDED";if(shouldWarn(e)){n.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";emitWarning(t,"UnboundedCacheWarning",e,LRUCache)}}}getRemainingTTL(e){return this.#Ue.has(e)?Infinity:0}#At(){const e=new ZeroArray(this.#_e);const t=new ZeroArray(this.#_e);this.#Ke=e;this.#ze=t;this.#at=(n,s,A=r.now())=>{t[n]=s!==0?A:0;e[n]=s;if(s!==0&&this.ttlAutopurge){const e=setTimeout((()=>{if(this.#st(n)){this.#ct(this.#Pe[n],"expire")}}),s+1);if(e.unref){e.unref()}}};this.#lt=n=>{t[n]=e[n]!==0?r.now():0};this.#ut=(r,s)=>{if(e[s]){const A=e[s];const a=t[s];if(!A||!a)return;r.ttl=A;r.start=a;r.now=n||getNow();const c=r.now-a;r.remainingTTL=A-c}};let n=0;const getNow=()=>{const e=r.now();if(this.ttlResolution>0){n=e;const t=setTimeout((()=>n=0),this.ttlResolution);if(t.unref){t.unref()}}return e};this.getRemainingTTL=r=>{const s=this.#Ue.get(r);if(s===undefined){return 0}const A=e[s];const a=t[s];if(!A||!a){return Infinity}const c=(n||getNow())-a;return A-c};this.#st=r=>{const s=t[r];const A=e[r];return!!A&&!!s&&(n||getNow())-s>A}}#lt=()=>{};#ut=()=>{};#at=()=>{};#st=()=>false;#ot(){const e=new ZeroArray(this.#_e);this.#Oe=0;this.#qe=e;this.#ht=t=>{this.#Oe-=e[t];e[t]=0};this.#ft=(e,t,r,n)=>{if(this.#et(t)){return 0}if(!isPosInt(r)){if(n){if(typeof n!=="function"){throw new TypeError("sizeCalculation must be a function")}r=n(t,e);if(!isPosInt(r)){throw new TypeError("sizeCalculation return invalid (expect positive integer)")}}else{throw new TypeError("invalid size value (must be positive integer). "+"When maxSize or maxEntrySize is used, sizeCalculation "+"or size must be set.")}}return r};this.#dt=(t,r,n)=>{e[t]=r;if(this.#Ne){const r=this.#Ne-e[t];while(this.#Oe>r){this.#D(true)}}this.#Oe+=e[t];if(n){n.entrySize=r;n.totalCalculatedSize=this.#Oe}}}#ht=e=>{};#dt=(e,t,r)=>{};#ft=(e,t,r,n)=>{if(r||n){throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}return 0};*#nt({allowStale:e=this.allowStale}={}){if(this.#xe){for(let t=this.#je;true;){if(!this.#gt(t)){break}if(e||!this.#st(t)){yield t}if(t===this.#Je){break}else{t=this.#Ye[t]}}}}*#it({allowStale:e=this.allowStale}={}){if(this.#xe){for(let t=this.#Je;true;){if(!this.#gt(t)){break}if(e||!this.#st(t)){yield t}if(t===this.#je){break}else{t=this.#He[t]}}}}#gt(e){return e!==undefined&&this.#Ue.get(this.#Pe[e])===e}*entries(){for(const e of this.#nt()){if(this.#Ge[e]!==undefined&&this.#Pe[e]!==undefined&&!this.#et(this.#Ge[e])){yield[this.#Pe[e],this.#Ge[e]]}}}*rentries(){for(const e of this.#it()){if(this.#Ge[e]!==undefined&&this.#Pe[e]!==undefined&&!this.#et(this.#Ge[e])){yield[this.#Pe[e],this.#Ge[e]]}}}*keys(){for(const e of this.#nt()){const t=this.#Pe[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield t}}}*rkeys(){for(const e of this.#it()){const t=this.#Pe[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield t}}}*values(){for(const e of this.#nt()){const t=this.#Ge[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield this.#Ge[e]}}}*rvalues(){for(const e of this.#it()){const t=this.#Ge[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield this.#Ge[e]}}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(const r of this.#nt()){const n=this.#Ge[r];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)continue;if(e(s,this.#Pe[r],this)){return this.get(this.#Pe[r],t)}}}forEach(e,t=this){for(const r of this.#nt()){const n=this.#Ge[r];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)continue;e.call(t,s,this.#Pe[r],this)}}rforEach(e,t=this){for(const r of this.#it()){const n=this.#Ge[r];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)continue;e.call(t,s,this.#Pe[r],this)}}purgeStale(){let e=false;for(const t of this.#it({allowStale:true})){if(this.#st(t)){this.#ct(this.#Pe[t],"expire");e=true}}return e}info(e){const t=this.#Ue.get(e);if(t===undefined)return undefined;const n=this.#Ge[t];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)return undefined;const A={value:s};if(this.#Ke&&this.#ze){const e=this.#Ke[t];const n=this.#ze[t];if(e&&n){const t=e-(r.now()-n);A.ttl=t;A.start=Date.now()}}if(this.#qe){A.size=this.#qe[t]}return A}dump(){const e=[];for(const t of this.#nt({allowStale:true})){const n=this.#Pe[t];const s=this.#Ge[t];const A=this.#et(s)?s.__staleWhileFetching:s;if(A===undefined||n===undefined)continue;const a={value:A};if(this.#Ke&&this.#ze){a.ttl=this.#Ke[t];const e=r.now()-this.#ze[t];a.start=Math.floor(Date.now()-e)}if(this.#qe){a.size=this.#qe[t]}e.unshift([n,a])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}set(e,t,r={}){if(t===undefined){this.delete(e);return this}const{ttl:n=this.ttl,start:s,noDisposeOnSet:A=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=r;let{noUpdateTTL:l=this.noUpdateTTL}=r;const u=this.#ft(e,t,r.size||0,a);if(this.maxEntrySize&&u>this.maxEntrySize){if(c){c.set="miss";c.maxEntrySizeExceeded=true}this.#ct(e,"set");return this}let h=this.#xe===0?undefined:this.#Ue.get(e);if(h===undefined){h=this.#xe===0?this.#je:this.#Ve.length!==0?this.#Ve.pop():this.#xe===this.#_e?this.#D(false):this.#xe;this.#Pe[h]=e;this.#Ge[h]=t;this.#Ue.set(e,h);this.#He[this.#je]=h;this.#Ye[h]=this.#je;this.#je=h;this.#xe++;this.#dt(h,u,c);if(c)c.set="add";l=false}else{this.#rt(h);const r=this.#Ge[h];if(t!==r){if(this.#Ze&&this.#et(r)){r.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=r;if(t!==undefined&&!A){if(this.#$e){this.#Te?.(t,e,"set")}if(this.#Xe){this.#We?.push([t,e,"set"])}}}else if(!A){if(this.#$e){this.#Te?.(r,e,"set")}if(this.#Xe){this.#We?.push([r,e,"set"])}}this.#ht(h);this.#dt(h,u,c);this.#Ge[h]=t;if(c){c.set="replace";const e=r&&this.#et(r)?r.__staleWhileFetching:r;if(e!==undefined)c.oldValue=e}}else if(c){c.set="update"}}if(n!==0&&!this.#Ke){this.#At()}if(this.#Ke){if(!l){this.#at(h,n,s)}if(c)this.#ut(c,h)}if(!A&&this.#Xe&&this.#We){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}return this}pop(){try{while(this.#xe){const e=this.#Ge[this.#Je];this.#D(true);if(this.#et(e)){if(e.__staleWhileFetching){return e.__staleWhileFetching}}else if(e!==undefined){return e}}}finally{if(this.#Xe&&this.#We){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}}}#D(e){const t=this.#Je;const r=this.#Pe[t];const n=this.#Ge[t];if(this.#Ze&&this.#et(n)){n.__abortController.abort(new Error("evicted"))}else if(this.#$e||this.#Xe){if(this.#$e){this.#Te?.(n,r,"evict")}if(this.#Xe){this.#We?.push([n,r,"evict"])}}this.#ht(t);if(e){this.#Pe[t]=undefined;this.#Ge[t]=undefined;this.#Ve.push(t)}if(this.#xe===1){this.#Je=this.#je=0;this.#Ve.length=0}else{this.#Je=this.#He[t]}this.#Ue.delete(r);this.#xe--;return t}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:n}=t;const s=this.#Ue.get(e);if(s!==undefined){const e=this.#Ge[s];if(this.#et(e)&&e.__staleWhileFetching===undefined){return false}if(!this.#st(s)){if(r){this.#lt(s)}if(n){n.has="hit";this.#ut(n,s)}return true}else if(n){n.has="stale";this.#ut(n,s)}}else if(n){n.has="miss"}return false}peek(e,t={}){const{allowStale:r=this.allowStale}=t;const n=this.#Ue.get(e);if(n===undefined||!r&&this.#st(n)){return}const s=this.#Ge[n];return this.#et(s)?s.__staleWhileFetching:s}#tt(e,t,r,n){const s=t===undefined?undefined:this.#Ge[t];if(this.#et(s)){return s}const a=new A;const{signal:c}=r;c?.addEventListener("abort",(()=>a.abort(c.reason)),{signal:a.signal});const l={signal:a.signal,options:r,context:n};const cb=(n,s=false)=>{const{aborted:A}=a.signal;const c=r.ignoreFetchAbort&&n!==undefined;if(r.status){if(A&&!s){r.status.fetchAborted=true;r.status.fetchError=a.signal.reason;if(c)r.status.fetchAbortIgnored=true}else{r.status.fetchResolved=true}}if(A&&!c&&!s){return fetchFail(a.signal.reason)}const h=u;if(this.#Ge[t]===u){if(n===undefined){if(h.__staleWhileFetching){this.#Ge[t]=h.__staleWhileFetching}else{this.#ct(e,"fetch")}}else{if(r.status)r.status.fetchUpdated=true;this.set(e,n,l.options)}}return n};const eb=e=>{if(r.status){r.status.fetchRejected=true;r.status.fetchError=e}return fetchFail(e)};const fetchFail=n=>{const{aborted:s}=a.signal;const A=s&&r.allowStaleOnFetchAbort;const c=A||r.allowStaleOnFetchRejection;const l=c||r.noDeleteOnFetchRejection;const h=u;if(this.#Ge[t]===u){const r=!l||h.__staleWhileFetching===undefined;if(r){this.#ct(e,"fetch")}else if(!A){this.#Ge[t]=h.__staleWhileFetching}}if(c){if(r.status&&h.__staleWhileFetching!==undefined){r.status.returnedStale=true}return h.__staleWhileFetching}else if(h.__returned===h){throw n}};const pcall=(t,n)=>{const A=this.#Le?.(e,s,l);if(A&&A instanceof Promise){A.then((e=>t(e===undefined?undefined:e)),n)}a.signal.addEventListener("abort",(()=>{if(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort){t(undefined);if(r.allowStaleOnFetchAbort){t=e=>cb(e,true)}}}))};if(r.status)r.status.fetchDispatched=true;const u=new Promise(pcall).then(cb,eb);const h=Object.assign(u,{__abortController:a,__staleWhileFetching:s,__returned:undefined});if(t===undefined){this.set(e,h,{...l.options,status:undefined});t=this.#Ue.get(e)}else{this.#Ge[t]=h}return h}#et(e){if(!this.#Ze)return false;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof A}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:A=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:C=this.allowStaleOnFetchAbort,context:y,forceRefresh:I=false,status:B,signal:Q}=t;if(!this.#Ze){if(B)B.fetch="get";return this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:B})}const b={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:A,noDisposeOnSet:a,size:c,sizeCalculation:l,noUpdateTTL:u,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:C,ignoreFetchAbort:p,status:B,signal:Q};let w=this.#Ue.get(e);if(w===undefined){if(B)B.fetch="miss";const t=this.#tt(e,w,b,y);return t.__returned=t}else{const t=this.#Ge[w];if(this.#et(t)){const e=r&&t.__staleWhileFetching!==undefined;if(B){B.fetch="inflight";if(e)B.returnedStale=true}return e?t.__staleWhileFetching:t.__returned=t}const s=this.#st(w);if(!I&&!s){if(B)B.fetch="hit";this.#rt(w);if(n){this.#lt(w)}if(B)this.#ut(B,w);return t}const A=this.#tt(e,w,b,y);const a=A.__staleWhileFetching!==undefined;const c=a&&r;if(B){B.fetch=s?"stale":"refresh";if(c&&s)B.returnedStale=true}return c?A.__staleWhileFetching:A.__returned=A}}async forceFetch(e,t={}){const r=await this.fetch(e,t);if(r===undefined)throw new Error("fetch() returned undefined");return r}memo(e,t={}){const r=this.#Me;if(!r){throw new Error("no memoMethod provided to constructor")}const{context:n,forceRefresh:s,...A}=t;const a=this.get(e,A);if(!s&&a!==undefined)return a;const c=r(e,a,{options:A,context:n});this.set(e,c,A);return c}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:A}=t;const a=this.#Ue.get(e);if(a!==undefined){const t=this.#Ge[a];const c=this.#et(t);if(A)this.#ut(A,a);if(this.#st(a)){if(A)A.get="stale";if(!c){if(!s){this.#ct(e,"expire")}if(A&&r)A.returnedStale=true;return r?t:undefined}else{if(A&&r&&t.__staleWhileFetching!==undefined){A.returnedStale=true}return r?t.__staleWhileFetching:undefined}}else{if(A)A.get="hit";if(c){return t.__staleWhileFetching}this.#rt(a);if(n){this.#lt(a)}return t}}else if(A){A.get="miss"}}#pt(e,t){this.#Ye[t]=e;this.#He[e]=t}#rt(e){if(e!==this.#je){if(e===this.#Je){this.#Je=this.#He[e]}else{this.#pt(this.#Ye[e],this.#He[e])}this.#pt(this.#je,e);this.#je=e}}delete(e){return this.#ct(e,"delete")}#ct(e,t){let r=false;if(this.#xe!==0){const n=this.#Ue.get(e);if(n!==undefined){r=true;if(this.#xe===1){this.#Et(t)}else{this.#ht(n);const r=this.#Ge[n];if(this.#et(r)){r.__abortController.abort(new Error("deleted"))}else if(this.#$e||this.#Xe){if(this.#$e){this.#Te?.(r,e,t)}if(this.#Xe){this.#We?.push([r,e,t])}}this.#Ue.delete(e);this.#Pe[n]=undefined;this.#Ge[n]=undefined;if(n===this.#je){this.#je=this.#Ye[n]}else if(n===this.#Je){this.#Je=this.#He[n]}else{const e=this.#Ye[n];this.#He[e]=this.#He[n];const t=this.#He[n];this.#Ye[t]=this.#Ye[n]}this.#xe--;this.#Ve.push(n)}}}if(this.#Xe&&this.#We?.length){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}return r}clear(){return this.#Et("delete")}#Et(e){for(const t of this.#it({allowStale:true})){const r=this.#Ge[t];if(this.#et(r)){r.__abortController.abort(new Error("deleted"))}else{const n=this.#Pe[t];if(this.#$e){this.#Te?.(r,n,e)}if(this.#Xe){this.#We?.push([r,n,e])}}}this.#Ue.clear();this.#Ge.fill(undefined);this.#Pe.fill(undefined);if(this.#Ke&&this.#ze){this.#Ke.fill(0);this.#ze.fill(0)}if(this.#qe){this.#qe.fill(0)}this.#Je=0;this.#je=0;this.#Ve.length=0;this.#Oe=0;this.#xe=0;if(this.#Xe&&this.#We){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}}}t.LRUCache=LRUCache},8275:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Minipass=t.isWritable=t.isReadable=t.isStream=void 0;const s=typeof process==="object"&&process?process:{stdout:null,stderr:null};const A=r(8474);const a=n(r(7075));const c=r(6193);const isStream=e=>!!e&&typeof e==="object"&&(e instanceof Minipass||e instanceof a.default||(0,t.isReadable)(e)||(0,t.isWritable)(e));t.isStream=isStream;const isReadable=e=>!!e&&typeof e==="object"&&e instanceof A.EventEmitter&&typeof e.pipe==="function"&&e.pipe!==a.default.Writable.prototype.pipe;t.isReadable=isReadable;const isWritable=e=>!!e&&typeof e==="object"&&e instanceof A.EventEmitter&&typeof e.write==="function"&&typeof e.end==="function";t.isWritable=isWritable;const l=Symbol("EOF");const u=Symbol("maybeEmitEnd");const h=Symbol("emittedEnd");const g=Symbol("emittingEnd");const p=Symbol("emittedError");const C=Symbol("closed");const y=Symbol("read");const I=Symbol("flush");const B=Symbol("flushChunk");const Q=Symbol("encoding");const b=Symbol("decoder");const w=Symbol("flowing");const S=Symbol("paused");const k=Symbol("resume");const v=Symbol("buffer");const R=Symbol("pipes");const D=Symbol("bufferLength");const _=Symbol("bufferPush");const N=Symbol("bufferShift");const T=Symbol("objectMode");const F=Symbol("destroyed");const L=Symbol("error");const M=Symbol("emitData");const x=Symbol("emitEnd");const O=Symbol("emitEnd2");const U=Symbol("async");const P=Symbol("abort");const G=Symbol("aborted");const H=Symbol("signal");const Y=Symbol("dataListeners");const J=Symbol("discarded");const defer=e=>Promise.resolve().then(e);const nodefer=e=>e();const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBufferLike=e=>e instanceof ArrayBuffer||!!e&&typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);class Pipe{src;dest;opts;ondrain;constructor(e,t,r){this.src=e;this.dest=t;this.opts=r;this.ondrain=()=>e[k]();this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(e,t,r){super(e,t,r);this.proxyErrors=e=>t.emit("error",e);e.on("error",this.proxyErrors)}}const isObjectModeOptions=e=>!!e.objectMode;const isEncodingOptions=e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer";class Minipass extends A.EventEmitter{[w]=false;[S]=false;[R]=[];[v]=[];[T];[Q];[U];[b];[l]=false;[h]=false;[g]=false;[C]=false;[p]=null;[D]=0;[F]=false;[H];[G]=false;[Y]=0;[J]=false;writable=true;readable=true;constructor(...e){const t=e[0]||{};super();if(t.objectMode&&typeof t.encoding==="string"){throw new TypeError("Encoding and objectMode may not be used together")}if(isObjectModeOptions(t)){this[T]=true;this[Q]=null}else if(isEncodingOptions(t)){this[Q]=t.encoding;this[T]=false}else{this[T]=false;this[Q]=null}this[U]=!!t.async;this[b]=this[Q]?new c.StringDecoder(this[Q]):null;if(t&&t.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[v]})}if(t&&t.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[R]})}const{signal:r}=t;if(r){this[H]=r;if(r.aborted){this[P]()}else{r.addEventListener("abort",(()=>this[P]()))}}}get bufferLength(){return this[D]}get encoding(){return this[Q]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[T]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[U]}set["async"](e){this[U]=this[U]||!!e}[P](){this[G]=true;this.emit("abort",this[H]?.reason);this.destroy(this[H]?.reason)}get aborted(){return this[G]}set aborted(e){}write(e,t,r){if(this[G])return false;if(this[l])throw new Error("write after end");if(this[F]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function"){r=t;t="utf8"}if(!t)t="utf8";const n=this[U]?defer:nodefer;if(!this[T]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e)){e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(isArrayBufferLike(e)){e=Buffer.from(e)}else if(typeof e!=="string"){throw new Error("Non-contiguous data written to non-objectMode stream")}}if(this[T]){if(this[w]&&this[D]!==0)this[I](true);if(this[w])this.emit("data",e);else this[_](e);if(this[D]!==0)this.emit("readable");if(r)n(r);return this[w]}if(!e.length){if(this[D]!==0)this.emit("readable");if(r)n(r);return this[w]}if(typeof e==="string"&&!(t===this[Q]&&!this[b]?.lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[Q]){e=this[b].write(e)}if(this[w]&&this[D]!==0)this[I](true);if(this[w])this.emit("data",e);else this[_](e);if(this[D]!==0)this.emit("readable");if(r)n(r);return this[w]}read(e){if(this[F])return null;this[J]=false;if(this[D]===0||e===0||e&&e>this[D]){this[u]();return null}if(this[T])e=null;if(this[v].length>1&&!this[T]){this[v]=[this[Q]?this[v].join(""):Buffer.concat(this[v],this[D])]}const t=this[y](e||null,this[v][0]);this[u]();return t}[y](e,t){if(this[T])this[N]();else{const r=t;if(e===r.length||e===null)this[N]();else if(typeof r==="string"){this[v][0]=r.slice(e);t=r.slice(0,e);this[D]-=e}else{this[v][0]=r.subarray(e);t=r.subarray(0,e);this[D]-=e}}this.emit("data",t);if(!this[v].length&&!this[l])this.emit("drain");return t}end(e,t,r){if(typeof e==="function"){r=e;e=undefined}if(typeof t==="function"){r=t;t="utf8"}if(e!==undefined)this.write(e,t);if(r)this.once("end",r);this[l]=true;this.writable=false;if(this[w]||!this[S])this[u]();return this}[k](){if(this[F])return;if(!this[Y]&&!this[R].length){this[J]=true}this[S]=false;this[w]=true;this.emit("resume");if(this[v].length)this[I]();else if(this[l])this[u]();else this.emit("drain")}resume(){return this[k]()}pause(){this[w]=false;this[S]=true;this[J]=false}get destroyed(){return this[F]}get flowing(){return this[w]}get paused(){return this[S]}[_](e){if(this[T])this[D]+=1;else this[D]+=e.length;this[v].push(e)}[N](){if(this[T])this[D]-=1;else this[D]-=this[v][0].length;return this[v].shift()}[I](e=false){do{}while(this[B](this[N]())&&this[v].length);if(!e&&!this[v].length&&!this[l])this.emit("drain")}[B](e){this.emit("data",e);return this[w]}pipe(e,t){if(this[F])return e;this[J]=false;const r=this[h];t=t||{};if(e===s.stdout||e===s.stderr)t.end=false;else t.end=t.end!==false;t.proxyErrors=!!t.proxyErrors;if(r){if(t.end)e.end()}else{this[R].push(!t.proxyErrors?new Pipe(this,e,t):new PipeProxyErrors(this,e,t));if(this[U])defer((()=>this[k]()));else this[k]()}return e}unpipe(e){const t=this[R].find((t=>t.dest===e));if(t){if(this[R].length===1){if(this[w]&&this[Y]===0){this[w]=false}this[R]=[]}else this[R].splice(this[R].indexOf(t),1);t.unpipe()}}addListener(e,t){return this.on(e,t)}on(e,t){const r=super.on(e,t);if(e==="data"){this[J]=false;this[Y]++;if(!this[R].length&&!this[w]){this[k]()}}else if(e==="readable"&&this[D]!==0){super.emit("readable")}else if(isEndish(e)&&this[h]){super.emit(e);this.removeAllListeners(e)}else if(e==="error"&&this[p]){const e=t;if(this[U])defer((()=>e.call(this,this[p])));else e.call(this,this[p])}return r}removeListener(e,t){return this.off(e,t)}off(e,t){const r=super.off(e,t);if(e==="data"){this[Y]=this.listeners("data").length;if(this[Y]===0&&!this[J]&&!this[R].length){this[w]=false}}return r}removeAllListeners(e){const t=super.removeAllListeners(e);if(e==="data"||e===undefined){this[Y]=0;if(!this[J]&&!this[R].length){this[w]=false}}return t}get emittedEnd(){return this[h]}[u](){if(!this[g]&&!this[h]&&!this[F]&&this[v].length===0&&this[l]){this[g]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[C])this.emit("close");this[g]=false}}emit(e,...t){const r=t[0];if(e!=="error"&&e!=="close"&&e!==F&&this[F]){return false}else if(e==="data"){return!this[T]&&!r?false:this[U]?(defer((()=>this[M](r))),true):this[M](r)}else if(e==="end"){return this[x]()}else if(e==="close"){this[C]=true;if(!this[h]&&!this[F])return false;const e=super.emit("close");this.removeAllListeners("close");return e}else if(e==="error"){this[p]=r;super.emit(L,r);const e=!this[H]||this.listeners("error").length?super.emit("error",r):false;this[u]();return e}else if(e==="resume"){const e=super.emit("resume");this[u]();return e}else if(e==="finish"||e==="prefinish"){const t=super.emit(e);this.removeAllListeners(e);return t}const n=super.emit(e,...t);this[u]();return n}[M](e){for(const t of this[R]){if(t.dest.write(e)===false)this.pause()}const t=this[J]?false:super.emit("data",e);this[u]();return t}[x](){if(this[h])return false;this[h]=true;this.readable=false;return this[U]?(defer((()=>this[O]())),true):this[O]()}[O](){if(this[b]){const e=this[b].end();if(e){for(const t of this[R]){t.dest.write(e)}if(!this[J])super.emit("data",e)}}for(const e of this[R]){e.end()}const e=super.emit("end");this.removeAllListeners("end");return e}async collect(){const e=Object.assign([],{dataLength:0});if(!this[T])e.dataLength=0;const t=this.promise();this.on("data",(t=>{e.push(t);if(!this[T])e.dataLength+=t.length}));await t;return e}async concat(){if(this[T]){throw new Error("cannot concat in objectMode")}const e=await this.collect();return this[Q]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise(((e,t)=>{this.on(F,(()=>t(new Error("stream destroyed"))));this.on("error",(e=>t(e)));this.on("end",(()=>e()))}))}[Symbol.asyncIterator](){this[J]=false;let e=false;const stop=async()=>{this.pause();e=true;return{value:undefined,done:true}};const next=()=>{if(e)return stop();const t=this.read();if(t!==null)return Promise.resolve({done:false,value:t});if(this[l])return stop();let r;let n;const onerr=e=>{this.off("data",ondata);this.off("end",onend);this.off(F,ondestroy);stop();n(e)};const ondata=e=>{this.off("error",onerr);this.off("end",onend);this.off(F,ondestroy);this.pause();r({value:e,done:!!this[l]})};const onend=()=>{this.off("error",onerr);this.off("data",ondata);this.off(F,ondestroy);stop();r({done:true,value:undefined})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,t)=>{n=t;r=e;this.once(F,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[J]=false;let e=false;const stop=()=>{this.pause();this.off(L,stop);this.off(F,stop);this.off("end",stop);e=true;return{done:true,value:undefined}};const next=()=>{if(e)return stop();const t=this.read();return t===null?stop():{done:false,value:t}};this.once("end",stop);this.once(L,stop);this.once(F,stop);return{next:next,throw:stop,return:stop,[Symbol.iterator](){return this}}}destroy(e){if(this[F]){if(e)this.emit("error",e);else this.emit(F);return this}this[F]=true;this[J]=true;this[v].length=0;this[D]=0;const t=this;if(typeof t.close==="function"&&!this[C])t.close();if(e)this.emit("error",e);else this.emit(F);return this}static get isStream(){return t.isStream}}t.Minipass=Minipass},8958:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.PathScurry=t.Path=t.PathScurryDarwin=t.PathScurryPosix=t.PathScurryWin32=t.PathScurryBase=t.PathPosix=t.PathWin32=t.PathBase=t.ChildrenCache=t.ResolveCache=void 0;const a=r(2477);const c=r(6760);const l=r(3136);const u=r(9896);const h=A(r(3024));const g=u.realpathSync.native;const p=r(1455);const C=r(8275);const y={lstatSync:u.lstatSync,readdir:u.readdir,readdirSync:u.readdirSync,readlinkSync:u.readlinkSync,realpathSync:g,promises:{lstat:p.lstat,readdir:p.readdir,readlink:p.readlink,realpath:p.realpath}};const fsFromOption=e=>!e||e===y||e===h?y:{...y,...e,promises:{...y.promises,...e.promises||{}}};const I=/^\\\\\?\\([a-z]:)\\?$/i;const uncToDrive=e=>e.replace(/\//g,"\\").replace(I,"$1\\");const B=/[\\\/]/;const Q=0;const b=1;const w=2;const S=4;const k=6;const v=8;const R=10;const D=12;const _=15;const N=~_;const T=16;const F=32;const L=64;const M=128;const x=256;const O=512;const U=L|M|O;const P=1023;const entToType=e=>e.isFile()?v:e.isDirectory()?S:e.isSymbolicLink()?R:e.isCharacterDevice()?w:e.isBlockDevice()?k:e.isSocket()?D:e.isFIFO()?b:Q;const G=new Map;const normalize=e=>{const t=G.get(e);if(t)return t;const r=e.normalize("NFKD");G.set(e,r);return r};const H=new Map;const normalizeNocase=e=>{const t=H.get(e);if(t)return t;const r=normalize(e.toLowerCase());H.set(e,r);return r};class ResolveCache extends a.LRUCache{constructor(){super({max:256})}}t.ResolveCache=ResolveCache;class ChildrenCache extends a.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:e=>e.length+1})}}t.ChildrenCache=ChildrenCache;const Y=Symbol("PathScurry setAsCwd");class PathBase{name;root;roots;parent;nocase;isCWD=false;#Ct;#yt;get dev(){return this.#yt}#It;get mode(){return this.#It}#Bt;get nlink(){return this.#Bt}#Qt;get uid(){return this.#Qt}#mt;get gid(){return this.#mt}#bt;get rdev(){return this.#bt}#wt;get blksize(){return this.#wt}#St;get ino(){return this.#St}#xe;get size(){return this.#xe}#kt;get blocks(){return this.#kt}#vt;get atimeMs(){return this.#vt}#Rt;get mtimeMs(){return this.#Rt}#Dt;get ctimeMs(){return this.#Dt}#_t;get birthtimeMs(){return this.#_t}#Nt;get atime(){return this.#Nt}#Tt;get mtime(){return this.#Tt}#Ft;get ctime(){return this.#Ft}#Lt;get birthtime(){return this.#Lt}#Mt;#xt;#Ot;#Ut;#Pt;#Gt;#Ht;#Yt;#Jt;#jt;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Q,r,n,s,A,a){this.name=e;this.#Mt=s?normalizeNocase(e):normalize(e);this.#Ht=t&P;this.nocase=s;this.roots=n;this.root=r||this;this.#Yt=A;this.#Ot=a.fullpath;this.#Pt=a.relative;this.#Gt=a.relativePosix;this.parent=a.parent;if(this.parent){this.#Ct=this.parent.#Ct}else{this.#Ct=fsFromOption(a.fs)}}depth(){if(this.#xt!==undefined)return this.#xt;if(!this.parent)return this.#xt=0;return this.#xt=this.parent.depth()+1}childrenCache(){return this.#Yt}resolve(e){if(!e){return this}const t=this.getRootString(e);const r=e.substring(t.length);const n=r.split(this.splitSep);const s=t?this.getRoot(t).#Vt(n):this.#Vt(n);return s}#Vt(e){let t=this;for(const r of e){t=t.child(r)}return t}children(){const e=this.#Yt.get(this);if(e){return e}const t=Object.assign([],{provisional:0});this.#Yt.set(this,t);this.#Ht&=~T;return t}child(e,t){if(e===""||e==="."){return this}if(e===".."){return this.parent||this}const r=this.children();const n=this.nocase?normalizeNocase(e):normalize(e);for(const e of r){if(e.#Mt===n){return e}}const s=this.parent?this.sep:"";const A=this.#Ot?this.#Ot+s+e:undefined;const a=this.newChild(e,Q,{...t,parent:this,fullpath:A});if(!this.canReaddir()){a.#Ht|=M}r.push(a);return a}relative(){if(this.isCWD)return"";if(this.#Pt!==undefined){return this.#Pt}const e=this.name;const t=this.parent;if(!t){return this.#Pt=this.name}const r=t.relative();return r+(!r||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#Gt!==undefined)return this.#Gt;const e=this.name;const t=this.parent;if(!t){return this.#Gt=this.fullpathPosix()}const r=t.relativePosix();return r+(!r||!t.parent?"":"/")+e}fullpath(){if(this.#Ot!==undefined){return this.#Ot}const e=this.name;const t=this.parent;if(!t){return this.#Ot=this.name}const r=t.fullpath();const n=r+(!t.parent?"":this.sep)+e;return this.#Ot=n}fullpathPosix(){if(this.#Ut!==undefined)return this.#Ut;if(this.sep==="/")return this.#Ut=this.fullpath();if(!this.parent){const e=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(e)){return this.#Ut=`//?/${e}`}else{return this.#Ut=e}}const e=this.parent;const t=e.fullpathPosix();const r=t+(!t||!e.parent?"":"/")+this.name;return this.#Ut=r}isUnknown(){return(this.#Ht&_)===Q}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#Ht&_)===v}isDirectory(){return(this.#Ht&_)===S}isCharacterDevice(){return(this.#Ht&_)===w}isBlockDevice(){return(this.#Ht&_)===k}isFIFO(){return(this.#Ht&_)===b}isSocket(){return(this.#Ht&_)===D}isSymbolicLink(){return(this.#Ht&R)===R}lstatCached(){return this.#Ht&F?this:undefined}readlinkCached(){return this.#Jt}realpathCached(){return this.#jt}readdirCached(){const e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#Jt)return true;if(!this.parent)return false;const e=this.#Ht&_;return!(e!==Q&&e!==R||this.#Ht&x||this.#Ht&M)}calledReaddir(){return!!(this.#Ht&T)}isENOENT(){return!!(this.#Ht&M)}isNamed(e){return!this.nocase?this.#Mt===normalize(e):this.#Mt===normalizeNocase(e)}async readlink(){const e=this.#Jt;if(e){return e}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const e=await this.#Ct.promises.readlink(this.fullpath());const t=(await this.parent.realpath())?.resolve(e);if(t){return this.#Jt=t}}catch(e){this.#Wt(e.code);return undefined}}readlinkSync(){const e=this.#Jt;if(e){return e}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const e=this.#Ct.readlinkSync(this.fullpath());const t=this.parent.realpathSync()?.resolve(e);if(t){return this.#Jt=t}}catch(e){this.#Wt(e.code);return undefined}}#qt(e){this.#Ht|=T;for(let t=e.provisional;tt(null,e)))}readdirCB(e,t=false){if(!this.canReaddir()){if(t)e(null,[]);else queueMicrotask((()=>e(null,[])));return}const r=this.children();if(this.calledReaddir()){const n=r.slice(0,r.provisional);if(t)e(null,n);else queueMicrotask((()=>e(null,n)));return}this.#or.push(e);if(this.#Ar){return}this.#Ar=true;const n=this.fullpath();this.#Ct.readdir(n,{withFileTypes:true},((e,t)=>{if(e){this.#Xt(e.code);r.provisional=0}else{for(const e of t){this.#tr(e,r)}this.#qt(r)}this.#ar(r.slice(0,r.provisional));return}))}#cr;async readdir(){if(!this.canReaddir()){return[]}const e=this.children();if(this.calledReaddir()){return e.slice(0,e.provisional)}const t=this.fullpath();if(this.#cr){await this.#cr}else{let resolve=()=>{};this.#cr=new Promise((e=>resolve=e));try{for(const r of await this.#Ct.promises.readdir(t,{withFileTypes:true})){this.#tr(r,e)}this.#qt(e)}catch(t){this.#Xt(t.code);e.provisional=0}this.#cr=undefined;resolve()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir()){return[]}const e=this.children();if(this.calledReaddir()){return e.slice(0,e.provisional)}const t=this.fullpath();try{for(const r of this.#Ct.readdirSync(t,{withFileTypes:true})){this.#tr(r,e)}this.#qt(e)}catch(t){this.#Xt(t.code);e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#Ht&U)return false;const e=_&this.#Ht;if(!(e===Q||e===S||e===R)){return false}return true}shouldWalk(e,t){return(this.#Ht&S)===S&&!(this.#Ht&U)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#jt)return this.#jt;if((O|x|M)&this.#Ht)return undefined;try{const e=await this.#Ct.promises.realpath(this.fullpath());return this.#jt=this.resolve(e)}catch(e){this.#$t()}}realpathSync(){if(this.#jt)return this.#jt;if((O|x|M)&this.#Ht)return undefined;try{const e=this.#Ct.realpathSync(this.fullpath());return this.#jt=this.resolve(e)}catch(e){this.#$t()}}[Y](e){if(e===this)return;e.isCWD=false;this.isCWD=true;const t=new Set([]);let r=[];let n=this;while(n&&n.parent){t.add(n);n.#Pt=r.join(this.sep);n.#Gt=r.join("/");n=n.parent;r.push("..")}n=e;while(n&&n.parent&&!t.has(n)){n.#Pt=undefined;n.#Gt=undefined;n=n.parent}}}t.PathBase=PathBase;class PathWin32 extends PathBase{sep="\\";splitSep=B;constructor(e,t=Q,r,n,s,A,a){super(e,t,r,n,s,A,a)}newChild(e,t=Q,r={}){return new PathWin32(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return c.win32.parse(e).root}getRoot(e){e=uncToDrive(e.toUpperCase());if(e===this.root.name){return this.root}for(const[t,r]of Object.entries(this.roots)){if(this.sameRoot(e,t)){return this.roots[e]=r}}return this.roots[e]=new PathScurryWin32(e,this).root}sameRoot(e,t=this.root.name){e=e.toUpperCase().replace(/\//g,"\\").replace(I,"$1\\");return e===t}}t.PathWin32=PathWin32;class PathPosix extends PathBase{splitSep="/";sep="/";constructor(e,t=Q,r,n,s,A,a){super(e,t,r,n,s,A,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Q,r={}){return new PathPosix(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}}t.PathPosix=PathPosix;class PathScurryBase{root;rootPath;roots;cwd;#lr;#ur;#Yt;nocase;#Ct;constructor(e=process.cwd(),t,r,{nocase:n,childrenCacheSize:s=16*1024,fs:A=y}={}){this.#Ct=fsFromOption(A);if(e instanceof URL||e.startsWith("file://")){e=(0,l.fileURLToPath)(e)}const a=t.resolve(e);this.roots=Object.create(null);this.rootPath=this.parseRootPath(a);this.#lr=new ResolveCache;this.#ur=new ResolveCache;this.#Yt=new ChildrenCache(s);const c=a.substring(this.rootPath.length).split(r);if(c.length===1&&!c[0]){c.pop()}if(n===undefined){throw new TypeError("must provide nocase setting to PathScurryBase ctor")}this.nocase=n;this.root=this.newRoot(this.#Ct);this.roots[this.rootPath]=this.root;let u=this.root;let h=c.length-1;const g=t.sep;let p=this.rootPath;let C=false;for(const e of c){const t=h--;u=u.child(e,{relative:new Array(t).fill("..").join(g),relativePosix:new Array(t).fill("..").join("/"),fullpath:p+=(C?"":g)+e});C=true}this.cwd=u}depth(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.depth()}childrenCache(){return this.#Yt}resolve(...e){let t="";for(let r=e.length-1;r>=0;r--){const n=e[r];if(!n||n===".")continue;t=t?`${n}/${t}`:n;if(this.isAbsolute(n)){break}}const r=this.#lr.get(t);if(r!==undefined){return r}const n=this.cwd.resolve(t).fullpath();this.#lr.set(t,n);return n}resolvePosix(...e){let t="";for(let r=e.length-1;r>=0;r--){const n=e[r];if(!n||n===".")continue;t=t?`${n}/${t}`:n;if(this.isAbsolute(n)){break}}const r=this.#ur.get(t);if(r!==undefined){return r}const n=this.cwd.resolve(t).fullpathPosix();this.#ur.set(t,n);return n}relative(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.relative()}relativePosix(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.relativePosix()}basename(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.name}dirname(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:true}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r}=t;if(!e.canReaddir()){return[]}else{const t=await e.readdir();return r?t:t.map((e=>e.name))}}readdirSync(e=this.cwd,t={withFileTypes:true}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true}=t;if(!e.canReaddir()){return[]}else if(r){return e.readdirSync()}else{return e.readdirSync().map((e=>e.name))}}async lstat(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.lstat()}lstatSync(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=await e.readlink();return t?r:r?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=e.readlinkSync();return t?r:r?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=await e.realpath();return t?r:r?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=e.realpathSync();return t?r:r?.fullpath()}async walk(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=[];if(!s||s(e)){a.push(r?e:e.fullpath())}const c=new Set;const walk=(e,t)=>{c.add(e);e.readdirCB(((e,l)=>{if(e){return t(e)}let u=l.length;if(!u)return t();const next=()=>{if(--u===0){t()}};for(const e of l){if(!s||s(e)){a.push(r?e:e.fullpath())}if(n&&e.isSymbolicLink()){e.realpath().then((e=>e?.isUnknown()?e.lstat():e)).then((e=>e?.shouldWalk(c,A)?walk(e,next):next()))}else{if(e.shouldWalk(c,A)){walk(e,next)}else{next()}}}}),true)};const l=e;return new Promise(((e,t)=>{walk(l,(r=>{if(r)return t(r);e(a)}))}))}walkSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=[];if(!s||s(e)){a.push(r?e:e.fullpath())}const c=new Set([e]);for(const e of c){const t=e.readdirSync();for(const e of t){if(!s||s(e)){a.push(r?e:e.fullpath())}let t=e;if(e.isSymbolicLink()){if(!(n&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(c,A)){c.add(t)}}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}return this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;if(!s||s(e)){yield r?e:e.fullpath()}const a=new Set([e]);for(const e of a){const t=e.readdirSync();for(const e of t){if(!s||s(e)){yield r?e:e.fullpath()}let t=e;if(e.isSymbolicLink()){if(!(n&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(a,A)){a.add(t)}}}}stream(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=new C.Minipass({objectMode:true});if(!s||s(e)){a.write(r?e:e.fullpath())}const c=new Set;const l=[e];let u=0;const process=()=>{let e=false;while(!e){const t=l.shift();if(!t){if(u===0)a.end();return}u++;c.add(t);const onReaddir=(t,g,p=false)=>{if(t)return a.emit("error",t);if(n&&!p){const e=[];for(const t of g){if(t.isSymbolicLink()){e.push(t.realpath().then((e=>e?.isUnknown()?e.lstat():e)))}}if(e.length){Promise.all(e).then((()=>onReaddir(null,g,true)));return}}for(const t of g){if(t&&(!s||s(t))){if(!a.write(r?t:t.fullpath())){e=true}}}u--;for(const e of g){const t=e.realpathCached()||e;if(t.shouldWalk(c,A)){l.push(t)}}if(e&&!a.flowing){a.once("drain",process)}else if(!h){process()}};let h=true;t.readdirCB(onReaddir,true);h=false}};process();return a}streamSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=new C.Minipass({objectMode:true});const c=new Set;if(!s||s(e)){a.write(r?e:e.fullpath())}const l=[e];let u=0;const process=()=>{let e=false;while(!e){const t=l.shift();if(!t){if(u===0)a.end();return}u++;c.add(t);const h=t.readdirSync();for(const t of h){if(!s||s(t)){if(!a.write(r?t:t.fullpath())){e=true}}}u--;for(const e of h){let t=e;if(e.isSymbolicLink()){if(!(n&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(c,A)){l.push(t)}}}if(e&&!a.flowing)a.once("drain",process)};process();return a}chdir(e=this.cwd){const t=this.cwd;this.cwd=typeof e==="string"?this.cwd.resolve(e):e;this.cwd[Y](t)}}t.PathScurryBase=PathScurryBase;class PathScurryWin32 extends PathScurryBase{sep="\\";constructor(e=process.cwd(),t={}){const{nocase:r=true}=t;super(e,c.win32,"\\",{...t,nocase:r});this.nocase=r;for(let e=this.cwd;e;e=e.parent){e.nocase=this.nocase}}parseRootPath(e){return c.win32.parse(e).root.toUpperCase()}newRoot(e){return new PathWin32(this.rootPath,S,undefined,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}}t.PathScurryWin32=PathScurryWin32;class PathScurryPosix extends PathScurryBase{sep="/";constructor(e=process.cwd(),t={}){const{nocase:r=false}=t;super(e,c.posix,"/",{...t,nocase:r});this.nocase=r}parseRootPath(e){return"/"}newRoot(e){return new PathPosix(this.rootPath,S,undefined,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}}t.PathScurryPosix=PathScurryPosix;class PathScurryDarwin extends PathScurryPosix{constructor(e=process.cwd(),t={}){const{nocase:r=true}=t;super(e,{...t,nocase:r})}}t.PathScurryDarwin=PathScurryDarwin;t.Path=process.platform==="win32"?PathWin32:PathPosix;t.PathScurry=process.platform==="win32"?PathScurryWin32:process.platform==="darwin"?PathScurryDarwin:PathScurryPosix},4928:e=>{"use strict";function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}const t=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function ensureBuffer(e){if(Buffer.isBuffer(e)){return e}if(typeof e==="number"){return Buffer.alloc(e)}else if(typeof e==="string"){return Buffer.from(e)}else{throw new Error("input must be buffer, number, or string, received "+typeof e)}}function bufferizeInt(e){const t=ensureBuffer(4);t.writeInt32BE(e,0);return t}function _crc32(e,r){e=ensureBuffer(e);if(Buffer.isBuffer(r)){r=r.readUInt32BE(0)}let n=~~r^-1;for(var s=0;s>>8}return n^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.apply(null,arguments)};crc32.unsigned=function(){return _crc32.apply(null,arguments)>>>0};var r=crc32;const n=getDefaultExportFromCjs(r);e.exports=n},8823:(e,t,r)=>{"use strict";const n=r(6495);e.exports={pkg:n}},5470:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.USER_AGENT=t.PRODUCT_NAME=t.pkg=void 0;const n=r(6066);t.pkg=n;const s="google-api-nodejs-client";t.PRODUCT_NAME=s;const A=`${s}/${n.version}`;t.USER_AGENT=A},920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GoogleToken=void 0;var n=_interopRequireWildcard(r(9896));var s=r(7842);var A=_interopRequireWildcard(r(3324));var a=_interopRequireWildcard(r(6928));var c=r(9023);function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var s,A,a={__proto__:null,default:e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return a;if(s=t?n:r){if(s.has(e))return s.get(e);s.set(e,a)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((A=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(A.get||A.set)?s(a,c,A):a[c]=e[c]);return a})(e,t)}function _typeof(e){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _classPrivateFieldInitSpec(e,t,r){_checkPrivateRedeclaration(e,t),t.set(e,r)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(e,t,r){return e.set(_assertClassBrand(e,t),r),r}function _classPrivateFieldGet(e,t){return e.get(_assertClassBrand(e,t))}function _assertClassBrand(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function _defineProperties(e,t){for(var r=0;r3?(s=y===n)&&(l=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=e):a[0]<=C&&((s=r<2&&Cn||n>y)&&(a[4]=r,a[5]=n,p.n=y,c=0))}if(s||r>1)return A;throw g=!0,n}return function(s,h,C){if(u>1)throw TypeError("Generator is already running");for(g&&1===h&&d(h,C),c=h,l=C;(t=c<2?e:l)||!g;){a||(c?c<3?(c>1&&(p.n=-1),d(c,l)):p.n=l:p.v=l);try{if(u=2,a){if(c||(s="next"),t=a[s]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,c<2&&(c=0)}else 1===c&&(t=a["return"])&&t.call(a),c<2&&(l=TypeError("The iterator does not provide a '"+s+"' method"),c=1);a=e}else if((t=(g=p.n<0)?l:r.call(n,p))!==A)break}catch(t){a=e,c=1,l=t}finally{u=1}}return{value:t,done:g}}}(r,s,a),!0),l}var A={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var a=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,(function(){return this})),t),c=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(a);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,s,"GeneratorFunction")),e.prototype=Object.create(c),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(c,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,s,"GeneratorFunction"),_regeneratorDefine2(c),_regeneratorDefine2(c,s,"Generator"),_regeneratorDefine2(c,n,(function(){return this})),_regeneratorDefine2(c,"toString",(function(){return"[object Generator]"})),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,t,r,n){var s=Object.defineProperty;try{s({},"",{})}catch(e){s=0}_regeneratorDefine2=function _regeneratorDefine(e,t,r,n){if(t)s?s(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var A=function o(t,r){_regeneratorDefine2(e,t,(function(e){return this._invoke(t,r,e)}))};A("next",0),A("throw",1),A("return",2)}},_regeneratorDefine2(e,t,r,n)}function asyncGeneratorStep(e,t,r,n,s,A,a){try{var c=e[A](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,s)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,s){var A=e.apply(t,r);function _next(e){asyncGeneratorStep(A,n,s,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(A,n,s,_next,_throw,"throw",e)}_next(void 0)}))}}var l=n.readFile?(0,c.promisify)(n.readFile):_asyncToGenerator(_regenerator().m((function _callee(){return _regenerator().w((function(e){while(1)switch(e.n){case 0:throw new g("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return e.a(2)}}),_callee)})));var u="https://oauth2.googleapis.com/token";var h="https://oauth2.googleapis.com/revoke?token=";var g=function(e){function ErrorWithCode(e,t){var r;_classCallCheck(this,ErrorWithCode);r=_callSuper(this,ErrorWithCode,[e]);_defineProperty(r,"code",void 0);r.code=t;return r}_inherits(ErrorWithCode,e);return _createClass(ErrorWithCode)}(_wrapNativeSuper(Error));var p=new WeakMap;var C=new WeakSet;var y=t.GoogleToken=function(){function GoogleToken(e){_classCallCheck(this,GoogleToken);_classPrivateMethodInitSpec(this,C);_defineProperty(this,"expiresAt",void 0);_defineProperty(this,"key",void 0);_defineProperty(this,"keyFile",void 0);_defineProperty(this,"iss",void 0);_defineProperty(this,"sub",void 0);_defineProperty(this,"scope",void 0);_defineProperty(this,"rawToken",void 0);_defineProperty(this,"tokenExpires",void 0);_defineProperty(this,"email",void 0);_defineProperty(this,"additionalClaims",void 0);_defineProperty(this,"eagerRefreshThresholdMillis",void 0);_defineProperty(this,"transporter",{request:function request(e){return(0,s.request)(e)}});_classPrivateFieldInitSpec(this,p,void 0);_assertClassBrand(C,this,_configure).call(this,e)}return _createClass(GoogleToken,[{key:"accessToken",get:function get(){return this.rawToken?this.rawToken.access_token:undefined}},{key:"idToken",get:function get(){return this.rawToken?this.rawToken.id_token:undefined}},{key:"tokenType",get:function get(){return this.rawToken?this.rawToken.token_type:undefined}},{key:"refreshToken",get:function get(){return this.rawToken?this.rawToken.refresh_token:undefined}},{key:"hasExpired",value:function hasExpired(){var e=(new Date).getTime();if(this.rawToken&&this.expiresAt){return e>=this.expiresAt}else{return true}}},{key:"isTokenExpiring",value:function isTokenExpiring(){var e;var t=(new Date).getTime();var r=(e=this.eagerRefreshThresholdMillis)!==null&&e!==void 0?e:0;if(this.rawToken&&this.expiresAt){return this.expiresAt<=t+r}else{return true}}},{key:"getToken",value:function getToken(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(_typeof(e)==="object"){t=e;e=undefined}t=Object.assign({forceRefresh:false},t);if(e){var r=e;_assertClassBrand(C,this,_getTokenAsync).call(this,t).then((function(e){return r(null,e)}),e);return}return _assertClassBrand(C,this,_getTokenAsync).call(this,t)}},{key:"getCredentials",value:function(){var e=_asyncToGenerator(_regenerator().m((function _callee2(e){var t,r,n,s,A,c,u;return _regenerator().w((function(h){while(1)switch(h.n){case 0:t=a.extname(e);u=t;h.n=u===".json"?1:u===".der"?4:u===".crt"?4:u===".pem"?4:u===".p12"?6:u===".pfx"?6:7;break;case 1:h.n=2;return l(e,"utf8");case 2:r=h.v;n=JSON.parse(r);s=n.private_key;A=n.client_email;if(!(!s||!A)){h.n=3;break}throw new g("private_key and client_email are required.","MISSING_CREDENTIALS");case 3:return h.a(2,{privateKey:s,clientEmail:A});case 4:h.n=5;return l(e,"utf8");case 5:c=h.v;return h.a(2,{privateKey:c});case 6:throw new g("*.p12 certificates are not supported after v6.1.2. "+"Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.","UNKNOWN_CERTIFICATE_TYPE");case 7:throw new g("Unknown certificate type. Type is determined based on file extension. "+"Current supported extensions are *.json, and *.pem.","UNKNOWN_CERTIFICATE_TYPE");case 8:return h.a(2)}}),_callee2)})));function getCredentials(t){return e.apply(this,arguments)}return getCredentials}()},{key:"revokeToken",value:function revokeToken(e){if(e){_assertClassBrand(C,this,_revokeTokenAsync).call(this).then((function(){return e()}),e);return}return _assertClassBrand(C,this,_revokeTokenAsync).call(this)}}])}();function _getTokenAsync(e){return _getTokenAsync2.apply(this,arguments)}function _getTokenAsync2(){_getTokenAsync2=_asyncToGenerator(_regenerator().m((function _callee3(e){return _regenerator().w((function(t){while(1)switch(t.n){case 0:if(!(_classPrivateFieldGet(p,this)&&!e.forceRefresh)){t.n=1;break}return t.a(2,_classPrivateFieldGet(p,this));case 1:t.p=1;t.n=2;return _classPrivateFieldSet(p,this,_assertClassBrand(C,this,_getTokenAsyncInner).call(this,e));case 2:return t.a(2,t.v);case 3:t.p=3;_classPrivateFieldSet(p,this,undefined);return t.f(3);case 4:return t.a(2)}}),_callee3,this,[[1,,3,4]])})));return _getTokenAsync2.apply(this,arguments)}function _getTokenAsyncInner(e){return _getTokenAsyncInner2.apply(this,arguments)}function _getTokenAsyncInner2(){_getTokenAsyncInner2=_asyncToGenerator(_regenerator().m((function _callee4(e){var t;return _regenerator().w((function(r){while(1)switch(r.n){case 0:if(!(this.isTokenExpiring()===false&&e.forceRefresh===false)){r.n=1;break}return r.a(2,Promise.resolve(this.rawToken));case 1:if(!(!this.key&&!this.keyFile)){r.n=2;break}throw new Error("No key or keyFile set.");case 2:if(!(!this.key&&this.keyFile)){r.n=4;break}r.n=3;return this.getCredentials(this.keyFile);case 3:t=r.v;this.key=t.privateKey;this.iss=t.clientEmail||this.iss;if(!t.clientEmail){_assertClassBrand(C,this,_ensureEmail).call(this)}case 4:return r.a(2,_assertClassBrand(C,this,_requestToken).call(this))}}),_callee4,this)})));return _getTokenAsyncInner2.apply(this,arguments)}function _ensureEmail(){if(!this.iss){throw new g("email is required.","MISSING_CREDENTIALS")}}function _revokeTokenAsync(){return _revokeTokenAsync2.apply(this,arguments)}function _revokeTokenAsync2(){_revokeTokenAsync2=_asyncToGenerator(_regenerator().m((function _callee5(){var e;return _regenerator().w((function(t){while(1)switch(t.n){case 0:if(this.accessToken){t.n=1;break}throw new Error("No token to revoke.");case 1:e=h+this.accessToken;t.n=2;return this.transporter.request({url:e,retry:true});case 2:_assertClassBrand(C,this,_configure).call(this,{email:this.iss,sub:this.sub,key:this.key,keyFile:this.keyFile,scope:this.scope,additionalClaims:this.additionalClaims});case 3:return t.a(2)}}),_callee5,this)})));return _revokeTokenAsync2.apply(this,arguments)}function _configure(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.keyFile=e.keyFile;this.key=e.key;this.rawToken=undefined;this.iss=e.email||e.iss;this.sub=e.sub;this.additionalClaims=e.additionalClaims;if(_typeof(e.scope)==="object"){this.scope=e.scope.join(" ")}else{this.scope=e.scope}this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis;if(e.transporter){this.transporter=e.transporter}}function _requestToken(){return _requestToken2.apply(this,arguments)}function _requestToken2(){_requestToken2=_asyncToGenerator(_regenerator().m((function _callee6(){var e,t,r,n,s,a,c,l,h,g;return _regenerator().w((function(p){while(1)switch(p.n){case 0:e=Math.floor((new Date).getTime()/1e3);t=this.additionalClaims||{};r=Object.assign({iss:this.iss,scope:this.scope,aud:u,exp:e+3600,iat:e,sub:this.sub},t);n=A.sign({header:{alg:"RS256"},payload:r,secret:this.key});p.p=1;p.n=2;return this.transporter.request({method:"POST",url:u,data:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:n}),responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});case 2:s=p.v;this.rawToken=s.data;this.expiresAt=s.data.expires_in===null||s.data.expires_in===undefined?undefined:(e+s.data.expires_in)*1e3;return p.a(2,this.rawToken);case 3:p.p=3;g=p.v;this.rawToken=undefined;this.tokenExpires=undefined;l=g.response&&(a=g.response)!==null&&a!==void 0&&a.data?(c=g.response)===null||c===void 0?void 0:c.data:{};if(l.error){h=l.error_description?": ".concat(l.error_description):"";g.message="".concat(l.error).concat(h)}throw g;case 4:return p.a(2)}}),_callee6,this,[[1,3]])})));return _requestToken2.apply(this,arguments)}},6495:e=>{"use strict";e.exports=JSON.parse('{"name":"gaxios","version":"7.1.1","description":"A simple common HTTP client specifically for Google APIs and services.","main":"build/cjs/src/index.js","types":"build/cjs/src/index.d.ts","files":["build/"],"exports":{".":{"import":{"types":"./build/esm/src/index.d.ts","default":"./build/esm/src/index.js"},"require":{"types":"./build/cjs/src/index.d.ts","default":"./build/cjs/src/index.js"}}},"scripts":{"lint":"gts check --no-inline-config","test":"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000","compile":"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs","fix":"gts fix","prepare":"npm run compile","pretest":"npm run compile","webpack":"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js","docs":"jsdoc -c .jsdoc.js","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","prelint":"cd samples; npm link ../; npm install","clean":"gts clean"},"repository":"googleapis/gaxios","keywords":["google"],"engines":{"node":">=18"},"author":"Google, LLC","license":"Apache-2.0","devDependencies":{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","assert":"^2.0.0","browserify":"^17.0.0","c8":"^10.0.0","cors":"^2.8.5","express":"^5.0.0","gts":"^6.0.0","is-docker":"^3.0.0","jsdoc":"^4.0.0","jsdoc-fresh":"^4.0.0","jsdoc-region-tag":"^3.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1","linkinator":"^6.1.2","mocha":"^11.1.0","multiparty":"^4.2.1","mv":"^2.1.1","ncp":"^2.0.0","nock":"^14.0.0-beta.13","null-loader":"^4.0.0","pack-n-play":"^3.0.0","puppeteer":"^24.0.0","sinon":"^20.0.0","stream-browserify":"^3.0.0","tmp":"0.2.3","ts-loader":"^9.5.2","typescript":"^5.8.3","webpack":"^5.35.0","webpack-cli":"^6.0.1"},"dependencies":{"extend":"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2"}}')},6066:e=>{"use strict";e.exports=JSON.parse('{"name":"google-auth-library","version":"10.3.0","author":"Google Inc.","description":"Google APIs Authentication Client Library for Node.js","engines":{"node":">=18"},"main":"./build/src/index.js","types":"./build/src/index.d.ts","repository":"googleapis/google-auth-library-nodejs.git","keywords":["google","api","google apis","client","client library"],"dependencies":{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11","gaxios":"^7.0.0","gcp-metadata":"^7.0.0","google-logging-utils":"^1.0.0","gtoken":"^8.0.0","jws":"^4.0.0"},"devDependencies":{"@types/base64-js":"^1.2.5","@types/jws":"^3.1.0","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","assert-rejects":"^1.0.0","c8":"^10.0.0","codecov":"^3.0.2","gts":"^6.0.0","is-docker":"^3.0.0","jsdoc":"^4.0.0","jsdoc-fresh":"^4.0.0","jsdoc-region-tag":"^3.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1","keypair":"^1.0.4","linkinator":"^6.1.2","mocha":"^11.1.0","mv":"^2.1.1","ncp":"^2.0.0","nock":"^14.0.5","null-loader":"^4.0.0","puppeteer":"^24.0.0","sinon":"^21.0.0","ts-loader":"^8.0.0","typescript":"5.8.2","webpack":"^5.21.2","webpack-cli":"^4.0.0"},"files":["build/src","!build/src/**/*.map"],"scripts":{"test":"c8 mocha build/test","clean":"gts clean","prepare":"npm run compile","lint":"gts check --no-inline-config","compile":"tsc -p .","fix":"gts fix","pretest":"npm run compile -- --sourceMap","docs":"jsdoc -c .jsdoc.js","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap","webpack":"webpack","browser-test":"karma start","docs-test":"linkinator docs","predocs-test":"npm run docs","prelint":"cd samples; npm link ../; npm install"},"license":"Apache-2.0"}')},8330:e=>{"use strict";e.exports=JSON.parse('{"name":"@google-github-actions/deploy-cloud-functions","version":"3.0.9","description":"Deploy a Cloud Function","main":"dist/index.js","scripts":{"build":"ncc build -m src/main.ts","docs":"./node_modules/.bin/actions-gen-readme","lint":"eslint .","format":"eslint . --fix","test":"bash ./bin/runTests.sh"},"engines":{"node":">= 20.x","npm":">= 11.x"},"repository":{"type":"git","url":"https://github.com/google-github-actions/deploy-cloud-functions"},"keywords":["actions","gcf","functions","google cloud","cloud function"],"author":"Google LLC","license":"Apache-2.0","dependencies":{"@actions/core":"^1.11.1","@actions/http-client":"^2.2.3","@google-github-actions/actions-utils":"^0.8.10","archiver":"^7.0.1","google-auth-library":"^10.3.0","ignore":"^7.0.5"},"devDependencies":{"@eslint/eslintrc":"^3.3.1","@eslint/js":"^9.34.0","@types/archiver":"^6.0.3","@types/node":"^24.3.0","@typescript-eslint/eslint-plugin":"^8.42.0","@typescript-eslint/parser":"^8.42.0","@vercel/ncc":"^0.38.3","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","eslint":"^9.34.0","node-stream-zip":"^1.15.0","prettier":"^3.6.2","ts-node":"^10.9.2","typescript-eslint":"^8.42.0","typescript":"^5.9.2"}}')}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={id:e,loaded:false,exports:{}};var n=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete __webpack_module_cache__[e]}r.loaded=true;return r.exports}__nccwpck_require__.m=__webpack_modules__;(()=>{var e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;var t;__nccwpck_require__.t=function(r,n){if(n&1)r=this(r);if(n&8)return r;if(typeof r==="object"&&r){if(n&4&&r.__esModule)return r;if(n&16&&typeof r.then==="function")return r}var s=Object.create(null);__nccwpck_require__.r(s);var A={};t=t||[null,e({}),e([]),e(e)];for(var a=n&2&&r;typeof a=="object"&&!~t.indexOf(a);a=e(a)){Object.getOwnPropertyNames(a).forEach((e=>A[e]=()=>r[e]))}A["default"]=()=>r;__nccwpck_require__.d(s,A);return s}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.f={};__nccwpck_require__.e=e=>Promise.all(Object.keys(__nccwpck_require__.f).reduce(((t,r)=>{__nccwpck_require__.f[r](e,t);return t}),[]))})();(()=>{__nccwpck_require__.u=e=>""+e+".index.js"})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";(()=>{var e={792:1};var installChunk=t=>{var r=t.modules,n=t.ids,s=t.runtime;for(var A in r){if(__nccwpck_require__.o(r,A)){__nccwpck_require__.m[A]=r[A]}}if(s)s(__nccwpck_require__);for(var a=0;a{if(!e[t]){if(true){installChunk(require("./"+__nccwpck_require__.u(t)))}else e[t]=1}}})();var __webpack_exports__={};(()=>{"use strict";var exports=__webpack_exports__;Object.defineProperty(exports,"__esModule",{value:true});const core_1=__nccwpck_require__(7484);const actions_utils_1=__nccwpck_require__(6160);const client_1=__nccwpck_require__(9592);const util_1=__nccwpck_require__(4527);async function run(){try{const e=(0,actions_utils_1.presence)((0,core_1.getInput)("project_id"))||(0,actions_utils_1.presence)(process.env?.GCLOUD_PROJECT);const t=(0,actions_utils_1.presence)((0,core_1.getInput)("region"))||"us-central1";const r=(0,core_1.getInput)("universe")||"googleapis.com";const n=(0,core_1.getInput)("name",{required:true});const s=(0,actions_utils_1.presence)((0,core_1.getInput)("description"));const A=(0,actions_utils_1.toEnum)(client_1.Environment,(0,core_1.getInput)("environment")||client_1.Environment.GEN_2);const a=(0,actions_utils_1.presence)((0,core_1.getInput)("kms_key_name"));const c=(0,actions_utils_1.parseKVString)((0,core_1.getInput)("labels"));const l=(0,actions_utils_1.presence)((0,core_1.getInput)("source_dir"))||process.cwd();const u=(0,core_1.getInput)("runtime",{required:true});const h=(0,actions_utils_1.parseKVString)((0,core_1.getInput)("build_environment_variables"));const g=(0,actions_utils_1.presence)((0,core_1.getInput)("build_service_account"));const p=(0,actions_utils_1.presence)((0,core_1.getInput)("build_worker_pool"));const C=(0,actions_utils_1.presence)((0,core_1.getInput)("docker_repository"));const y=(0,actions_utils_1.presence)((0,core_1.getInput)("entry_point"));const I=(0,actions_utils_1.parseBoolean)((0,core_1.getInput)("all_traffic_on_latest_revision"),true);const B=(0,actions_utils_1.presence)((0,core_1.getInput)("cpu"));const Q=(0,actions_utils_1.presence)((0,core_1.getInput)("memory"))||"256Mi";const b=(0,actions_utils_1.parseKVString)((0,core_1.getInput)("environment_variables"));const w=(0,actions_utils_1.toEnum)(client_1.IngressSettings,(0,core_1.getInput)("ingress_settings")||client_1.IngressSettings.ALLOW_ALL);const S=(0,actions_utils_1.presence)((0,core_1.getInput)("max_instance_count"));const k=(0,util_1.stringToInt)((0,core_1.getInput)("max_instance_request_concurrency"));const v=(0,actions_utils_1.presence)((0,core_1.getInput)("min_instance_count"));const[R,D]=(0,util_1.parseSecrets)((0,core_1.getInput)("secrets"));const _=(0,actions_utils_1.presence)((0,core_1.getInput)("service_account"));const N=(0,actions_utils_1.parseDuration)((0,core_1.getInput)("service_timeout"));const T=(0,actions_utils_1.presence)((0,core_1.getInput)("vpc_connector"));const F=(0,actions_utils_1.toEnum)(client_1.VpcConnectorEgressSettings,(0,core_1.getInput)("vpc_connector_egress_settings")||client_1.VpcConnectorEgressSettings.PRIVATE_RANGES_ONLY);const L=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_location"));const M=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_type"));const x=(0,util_1.parseEventTriggerFilters)((0,core_1.getInput)("event_trigger_filters"));const O=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_pubsub_topic"));const U=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_service_account"));const P=(0,actions_utils_1.parseBoolean)((0,core_1.getInput)("event_trigger_retry"),true)?client_1.RetryPolicy.RETRY_POLICY_RETRY:client_1.RetryPolicy.RETRY_POLICY_DO_NOT_RETRY;const G=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_channel"));if(N<=0){throw new Error(`The 'service_timeout' parameter must be > 0 seconds (got ${N})`)}const H=new client_1.CloudFunctionsClient({projectID:e,location:t,universe:r});const Y={name:n,description:s,environment:A,kmsKeyName:a,labels:c,buildConfig:{runtime:u,entryPoint:y,dockerRepository:C,environmentVariables:h,serviceAccount:g,workerPool:p},serviceConfig:{allTrafficOnLatestRevision:I,availableCpu:B,availableMemory:Q,environmentVariables:b,ingressSettings:w,maxInstanceCount:S?+S:undefined,maxInstanceRequestConcurrency:k,minInstanceCount:v?+v:undefined,secretEnvironmentVariables:R,secretVolumes:D,serviceAccountEmail:_,timeoutSeconds:N,vpcConnector:T,vpcConnectorEgressSettings:F},eventTrigger:{triggerRegion:L,eventType:M,eventFilters:x,pubsubTopic:O,serviceAccountEmail:U,retryPolicy:P,channel:G}};if(!Y.eventTrigger?.eventType){delete Y.eventTrigger}if(!Y.serviceConfig?.vpcConnector){delete Y.serviceConfig?.vpcConnectorEgressSettings}const J=await H.deployFromLocalSource(Y,l,{onZip:(e,t)=>{(0,core_1.info)(`Created zip file from '${e}' at '${t}'`)},onZipAddEntry:e=>{(0,core_1.debug)((0,util_1.formatEntry)(e))},onZipIgnoreEntry:e=>{(0,core_1.debug)(`Ignoring ${e.name}`)},onNew:()=>{(0,core_1.info)("Creating new Cloud Functions deployment")},onExisting:()=>{(0,core_1.info)("Updating existing Cloud Functions deployment")},onPoll:(()=>{let e=0;return()=>{if(e===0){process.stdout.write(`Deploying Cloud Function...`)}else{process.stdout.write(`.`)}e++}})(),onDebug:e=>{if((0,core_1.isDebug)()){(0,core_1.debug)(e())}}});if(J.state!=="ACTIVE"){throw new Error(`Cloud Function deployment finished, but the function not in the `+`"ACTIVE" status. The current status is "${J.state}", which `+`could indicate a failed deployment. Check the Cloud Function `+`logs for more information.`)}(0,core_1.setOutput)("name",J.name);(0,core_1.setOutput)("url",J.url)}catch(e){const t=(0,actions_utils_1.errorMessage)(e);(0,core_1.setFailed)(`google-github-actions/deploy-cloud-functions failed with: ${t}`)}}if(require.main===require.cache[eval("__filename")]){run()}})();module.exports=__webpack_exports__})(); \ No newline at end of file +var n=r(9023).inherits;var s=r(7544).ZipArchiveOutputStream;var A=r(7544).ZipArchiveEntry;var a=r(3296);var c=e.exports=function(e){if(!(this instanceof c)){return new c(e)}e=this.options=e||{};e.zlib=e.zlib||{};s.call(this,e);if(typeof e.level==="number"&&e.level>=0){e.zlib.level=e.level;delete e.level}if(!e.forceZip64&&typeof e.zlib.level==="number"&&e.zlib.level===0){e.store=true}e.namePrependSlash=e.namePrependSlash||false;if(e.comment&&e.comment.length>0){this.setComment(e.comment)}};n(c,s);c.prototype._normalizeFileData=function(e){e=a.defaults(e,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""});var t=e.type==="directory";var r=e.type==="symlink";if(e.name){e.name=a.sanitizePath(e.name);if(!r&&e.name.slice(-1)==="/"){t=true;e.type="directory"}else if(t){e.name+="/"}}if(t||r){e.store=true}e.date=a.dateify(e.date);return e};c.prototype.entry=function(e,t,r){if(typeof r!=="function"){r=this._emitErrorCallback.bind(this)}t=this._normalizeFileData(t);if(t.type!=="file"&&t.type!=="directory"&&t.type!=="symlink"){r(new Error(t.type+" entries not currently supported"));return}if(typeof t.name!=="string"||t.name.length===0){r(new Error("entry name must be a non-empty string value"));return}if(t.type==="symlink"&&typeof t.linkname!=="string"){r(new Error("entry linkname must be a non-empty string value when type equals symlink"));return}var n=new A(t.name);n.setTime(t.date,this.options.forceLocalTime);if(t.namePrependSlash){n.setName(t.name,true)}if(t.store){n.setMethod(0)}if(t.comment.length>0){n.setComment(t.comment)}if(t.type==="symlink"&&typeof t.mode!=="number"){t.mode=40960}if(typeof t.mode==="number"){if(t.type==="symlink"){t.mode|=40960}n.setUnixMode(t.mode)}if(t.type==="symlink"&&typeof t.linkname==="string"){e=Buffer.from(t.linkname)}return s.prototype.entry.call(this,n,e,r)};c.prototype.finalize=function(){this.finish()}},9592:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A=400){throw new Error(`(${a}) ${A}`)}return JSON.parse(A)}catch(r){const n=(0,C.errorMessage)(r);throw new Error(`Failed to ${e} ${t}: ${n}`)}}async#X(e,t){const r=5e3;for(;;){if(t.onPoll)t.onPoll();const n=await this.getOperation(e);if(n.error){throw new Error(`Operation failed: ${n.error.message}`)}if(n.done){return n}await new Promise((e=>setTimeout(e,r)))}}async getOperation(e){if(e.startsWith("operations/")){e.slice(11)}const t=`${this.#$.cloudfunctions}/${e}`;const r=await this.#Z("GET",t);return r}async create(e,t){const r=this.fullResourceName(e.name);e.name=r;if(t?.onDebug){t.onDebug((()=>`create: computed Cloud Function:\n${JSON.stringify(e,null,2)}`))}const n=this.parentFromName(r);const s=r.split("/").at(-1);const A=`${this.#$.cloudfunctions}/${n}/functions?functionId=${s}`;const a=JSON.stringify(e);const c=await this.#Z("POST",A,a);const l=await this.#X(c.name,{onPoll:t?.onPoll,onDebug:t?.onDebug});if(!l.response){throw new Error(`create operation result did not include function`)}return l.response}async delete(e,t){const r=this.fullResourceName(e);const n=`${this.#$.cloudfunctions}/${r}`;const s=await this.#Z("DELETE",n);return await this.#X(s.name,{onPoll:t?.onPoll,onDebug:t?.onDebug})}async generateUploadURL(e){const t=`${this.#$.cloudfunctions}/${e}/functions:generateUploadUrl`;const r=JSON.stringify({environment:b.GEN_2});const n=await this.#Z("POST",t,r);return n}async get(e){const t=this.fullResourceName(e);const r=`${this.#$.cloudfunctions}/${t}`;const n=await this.#Z("GET",r);return n}async getSafe(e){try{return await this.get(e)}catch(e){const t=(0,C.errorMessage)(e);if(!t.includes("404")&&!t.includes("NOT_FOUND")){throw new Error(`Failed to lookup existing function - does the caller have `+`cloudfunctions.functions.get permissions? ${e}`)}return null}}async patch(e,t){const r=this.fullResourceName(e.name);e.name=r;if(t?.onDebug){t.onDebug((()=>`patch: computed Cloud Function:\n${JSON.stringify(e,null,2)}`))}const n=this.computeUpdateMask(e);if(t?.onDebug){t.onDebug((()=>`Computed updateMask: ${n}`))}const s=`${this.#$.cloudfunctions}/${r}?updateMask=${n}`;const A=JSON.stringify(e);const a=await this.#Z("PATCH",s,A);const c=await this.#X(a.name,{onPoll:t?.onPoll,onDebug:t?.onDebug});if(!c.response){throw new Error(`patch operation result did not include function`)}return c.response}async deployFromLocalSource(e,t,r){const n=(0,c.randomBytes)(12).toString("hex");const s=u.join((0,h.tmpdir)(),`cfsrc-${n}.zip`);try{await(0,y.zipDir)(t,s,r);if(r?.onZip)r.onZip(t,s)}catch(e){throw new Error(`Zip file ${s} creation failed: ${e}`)}const A=this.fullResourceName(e.name);e.name=A;const a=this.parentFromName(A);let l;try{l=await this.generateUploadURL(a);await this.uploadSource(l.uploadUrl,s)}catch(e){throw new Error(`Failed to upload zip file: ${e}`)}await(0,C.forceRemove)(s);if(!e.buildConfig){e.buildConfig={}}if(!e.buildConfig.source){e.buildConfig.source={}}e.buildConfig.source.storageSource=l.storageSource;const g=await this.getSafe(A);if(g){if(r?.onExisting)r.onExisting();const t=await this.patch(e,{onPoll:r?.onPoll,onDebug:r?.onDebug});return t}else{if(r?.onNew)r.onNew();const t=await this.create(e,{onPoll:r?.onPoll,onDebug:r?.onDebug});return t}}async uploadSource(e,t){const r=l.default.createReadStream(t);try{const t=await this.#K.request("PUT",e,r,{"content-type":"application/zip"});const n=await t.readBody();const s=t.message.statusCode||500;if(s>=400){throw new Error(`(${s}) ${n}`)}}catch(e){const t=(0,C.errorMessage)(e);throw new Error(`Failed to upload source: ${t}`)}}fullResourceName(e){if(!e){e=""}e=e.trim();if(!e){throw new Error(`Failed to parse resource name: name cannot be empty`)}if(e.includes("/")){if(e.match(Q)){return e}else{throw new Error(`Invalid resource name '${e}'`)}}const t=this.#q;if(!t){throw new Error(`Failed to get project ID to build resource name. Try setting 'project_id'.`)}const r=this.#z;if(!r){throw new Error(`Failed to get location (region) to build resource name. Try setting 'region'.`)}return`projects/${t}/locations/${r}/functions/${e}`}parentFromName(e){const t=e.split("/");if(t.length<3){throw new Error(`Invalid or missing name '${e}' (expected 'projects/p/locations/l/functions/f')`)}const r=t.slice(0,t.length-2).join("/");return r}computeUpdateMask(e){const t=[];if(e.name!==undefined)t.push("name");if(e.description!==undefined)t.push("description");if(e.environment!==undefined)t.push("environment");if(e.kmsKeyName!==undefined)t.push("kmsKeyName");if(e.labels!==undefined)t.push("labels");if(e.buildConfig?.runtime!==undefined)t.push("buildConfig.runtime");if(e.buildConfig?.entryPoint!==undefined)t.push("buildConfig.entryPoint");if(e.buildConfig?.source!==undefined)t.push("buildConfig.source");if(e.buildConfig?.dockerRepository!==undefined)t.push("buildConfig.dockerRepository");if(e.buildConfig?.environmentVariables!==undefined)t.push("buildConfig.environmentVariables");if(e.buildConfig?.serviceAccount!==undefined)t.push("buildConfig.serviceAccount");if(e.buildConfig?.workerPool!==undefined)t.push("buildConfig.workerPool");if(e.serviceConfig?.allTrafficOnLatestRevision!==undefined)t.push("serviceConfig.allTrafficOnLatestRevision");if(e.serviceConfig?.availableCpu!==undefined)t.push("serviceConfig.availableCpu");if(e.serviceConfig?.availableMemory!==undefined)t.push("serviceConfig.availableMemory");if(e.serviceConfig?.environmentVariables!==undefined)t.push("serviceConfig.environmentVariables");if(e.serviceConfig?.ingressSettings!==undefined)t.push("serviceConfig.ingressSettings");if(e.serviceConfig?.maxInstanceCount!==undefined)t.push("serviceConfig.maxInstanceCount");if(e.serviceConfig?.maxInstanceRequestConcurrency!==undefined)t.push("serviceConfig.maxInstanceRequestConcurrency");if(e.serviceConfig?.minInstanceCount!==undefined)t.push("serviceConfig.minInstanceCount");if(e.serviceConfig?.secretEnvironmentVariables!==undefined)t.push("serviceConfig.secretEnvironmentVariables");if(e.serviceConfig?.secretVolumes!==undefined)t.push("serviceConfig.secretVolumes");if(e.serviceConfig?.serviceAccountEmail!==undefined)t.push("serviceConfig.serviceAccountEmail");if(e.serviceConfig?.timeoutSeconds!==undefined)t.push("serviceConfig.timeoutSeconds");if(e.serviceConfig?.vpcConnector!==undefined)t.push("serviceConfig.vpcConnector");if(e.serviceConfig?.vpcConnectorEgressSettings!==undefined)t.push("serviceConfig.vpcConnectorEgressSettings");if(e.eventTrigger?.triggerRegion!==undefined)t.push("eventTrigger.triggerRegion");if(e.eventTrigger?.eventType!==undefined)t.push("eventTrigger.eventType");if(e.eventTrigger?.eventFilters!==undefined)t.push("eventTrigger.eventFilters");if(e.eventTrigger?.pubsubTopic!==undefined)t.push("eventTrigger.pubsubTopic");if(e.eventTrigger?.serviceAccountEmail!==undefined)t.push("eventTrigger.serviceAccountEmail");if(e.eventTrigger?.retryPolicy!==undefined)t.push("eventTrigger.retryPolicy");if(e.eventTrigger?.channel!==undefined)t.push("eventTrigger.channel");if(e.eventTrigger?.service!==undefined)t.push("eventTrigger.service");return t.join(",")}}t.CloudFunctionsClient=CloudFunctionsClient},7355:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SecretName=void 0;class SecretName{project;name;version;constructor(e){e=(e||"").trim();if(!e){throw new Error(`Missing secret name`)}const t=e.split("/");switch(t.length){case 6:{this.project=t[1];this.name=t[3];this.version=t[5];break}case 4:{this.project=t[1];this.name=t[3];this.version="latest";break}case 3:{this.project=t[0];this.name=t[1];this.version=t[2];break}case 2:{this.project=t[0];this.name=t[1];this.version="latest";break}default:{throw new TypeError(`Failed to parse secret reference "${e}": unknown format. Secrets `+`should be of the format "projects/p/secrets/s/versions/v".`)}}}selfLink(){return`projects/${this.project}/secrets/${this.name}/versions/${this.version}`}}t.SecretName=SecretName},4527:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A{if(a.ignores(e.name)){if(r?.onZipIgnoreEntry)r.onZipIgnoreEntry(e);return false}return e};return new Promise(((s,A)=>{const a=h.create("zip",{zlib:{level:7}});a.on("entry",(e=>{if(r?.onZipAddEntry)r.onZipAddEntry(e)}));a.on("warning",(e=>A(e)));a.on("error",(e=>A(e)));n.on("finish",(()=>s(t)));a.pipe(n);a.directory(e,false,ignoreFn);a.finalize()}))}function formatEntry(e){const t=e.name;const r=e.mode||"000";const n=e.sourcePath||"unknown";const s=(e.type||"unknown").toUpperCase()[0];return`[${s}] (${r}) ${t} => ${n}`}function stringToInt(e){e=(e||"").trim().replace(/[_,]/g,"");if(e===""){return undefined}const t=parseInt(e);if(isNaN(t)){throw new Error(`input "${e}" is not a number`)}return t}function parseEventTriggerFilters(e){const t=(0,g.parseKVString)(e);if(t===undefined){return undefined}const r=[];for(const[e,n]of Object.entries(t)){if(n.startsWith("PATTERN:")){r.push({attribute:e,value:n.slice(8),operator:"match-path-pattern"})}else{r.push({attribute:e,value:n})}}return r}function parseSecrets(e){const t=(0,g.parseKVString)(e);if(t===undefined){return[undefined,undefined]}const r=[];const n=[];for(const[e,s]of Object.entries(t)){const t=new C.SecretName(s);if(e.startsWith("/")){const r=l.posix.dirname(e);const s=l.posix.basename(e);n.push({mountPath:r,projectId:t.project,secret:t.name,versions:[{path:s,version:t.version}]})}else{r.push({key:e,projectId:t.project,secret:t.name,version:t.version})}}return[r,n]}},2613:e=>{"use strict";e.exports=require("assert")},290:e=>{"use strict";e.exports=require("async_hooks")},181:e=>{"use strict";e.exports=require("buffer")},5317:e=>{"use strict";e.exports=require("child_process")},4236:e=>{"use strict";e.exports=require("console")},9140:e=>{"use strict";e.exports=require("constants")},6982:e=>{"use strict";e.exports=require("crypto")},1637:e=>{"use strict";e.exports=require("diagnostics_channel")},4434:e=>{"use strict";e.exports=require("events")},9896:e=>{"use strict";e.exports=require("fs")},1943:e=>{"use strict";e.exports=require("fs/promises")},8611:e=>{"use strict";e.exports=require("http")},5675:e=>{"use strict";e.exports=require("http2")},5692:e=>{"use strict";e.exports=require("https")},9278:e=>{"use strict";e.exports=require("net")},4589:e=>{"use strict";e.exports=require("node:assert")},4573:e=>{"use strict";e.exports=require("node:buffer")},7598:e=>{"use strict";e.exports=require("node:crypto")},8474:e=>{"use strict";e.exports=require("node:events")},3024:e=>{"use strict";e.exports=require("node:fs")},1455:e=>{"use strict";e.exports=require("node:fs/promises")},7067:e=>{"use strict";e.exports=require("node:http")},4708:e=>{"use strict";e.exports=require("node:https")},7030:e=>{"use strict";e.exports=require("node:net")},6760:e=>{"use strict";e.exports=require("node:path")},1708:e=>{"use strict";e.exports=require("node:process")},7075:e=>{"use strict";e.exports=require("node:stream")},7830:e=>{"use strict";e.exports=require("node:stream/web")},6193:e=>{"use strict";e.exports=require("node:string_decoder")},3136:e=>{"use strict";e.exports=require("node:url")},7975:e=>{"use strict";e.exports=require("node:util")},8522:e=>{"use strict";e.exports=require("node:zlib")},857:e=>{"use strict";e.exports=require("os")},6928:e=>{"use strict";e.exports=require("path")},2987:e=>{"use strict";e.exports=require("perf_hooks")},932:e=>{"use strict";e.exports=require("process")},3480:e=>{"use strict";e.exports=require("querystring")},2203:e=>{"use strict";e.exports=require("stream")},3774:e=>{"use strict";e.exports=require("stream/web")},3193:e=>{"use strict";e.exports=require("string_decoder")},3557:e=>{"use strict";e.exports=require("timers")},4756:e=>{"use strict";e.exports=require("tls")},2018:e=>{"use strict";e.exports=require("tty")},7016:e=>{"use strict";e.exports=require("url")},9023:e=>{"use strict";e.exports=require("util")},8253:e=>{"use strict";e.exports=require("util/types")},1493:e=>{"use strict";e.exports=require("v8")},8167:e=>{"use strict";e.exports=require("worker_threads")},3106:e=>{"use strict";e.exports=require("zlib")},7182:(e,t,r)=>{"use strict";const n=r(7075).Writable;const s=r(7975).inherits;const A=r(4136);const a=r(612);const c=r(2271);const l=45;const u=Buffer.from("-");const h=Buffer.from("\r\n");const EMPTY_FN=function(){};function Dicer(e){if(!(this instanceof Dicer)){return new Dicer(e)}n.call(this,e);if(!e||!e.headerFirst&&typeof e.boundary!=="string"){throw new TypeError("Boundary required")}if(typeof e.boundary==="string"){this.setBoundary(e.boundary)}else{this._bparser=undefined}this._headerFirst=e.headerFirst;this._dashes=0;this._parts=0;this._finished=false;this._realFinish=false;this._isPreamble=true;this._justMatched=false;this._firstWrite=true;this._inHeader=true;this._part=undefined;this._cb=undefined;this._ignoreData=false;this._partOpts={highWaterMark:e.partHwm};this._pause=false;const t=this;this._hparser=new c(e);this._hparser.on("header",(function(e){t._inHeader=false;t._part.emit("header",e)}))}s(Dicer,n);Dicer.prototype.emit=function(e){if(e==="finish"&&!this._realFinish){if(!this._finished){const e=this;process.nextTick((function(){e.emit("error",new Error("Unexpected end of multipart data"));if(e._part&&!e._ignoreData){const t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data"));e._part.push(null);process.nextTick((function(){e._realFinish=true;e.emit("finish");e._realFinish=false}));return}e._realFinish=true;e.emit("finish");e._realFinish=false}))}}else{n.prototype.emit.apply(this,arguments)}};Dicer.prototype._write=function(e,t,r){if(!this._hparser&&!this._bparser){return r()}if(this._headerFirst&&this._isPreamble){if(!this._part){this._part=new a(this._partOpts);if(this.listenerCount("preamble")!==0){this.emit("preamble",this._part)}else{this._ignore()}}const t=this._hparser.push(e);if(!this._inHeader&&t!==undefined&&t{"use strict";const n=r(8474).EventEmitter;const s=r(7975).inherits;const A=r(2393);const a=r(4136);const c=Buffer.from("\r\n\r\n");const l=/\r\n/g;const u=/^([^:]+):[ \t]?([\x00-\xFF]+)?$/;function HeaderParser(e){n.call(this);e=e||{};const t=this;this.nread=0;this.maxed=false;this.npairs=0;this.maxHeaderPairs=A(e,"maxHeaderPairs",2e3);this.maxHeaderSize=A(e,"maxHeaderSize",80*1024);this.buffer="";this.header={};this.finished=false;this.ss=new a(c);this.ss.on("info",(function(e,r,n,s){if(r&&!t.maxed){if(t.nread+s-n>=t.maxHeaderSize){s=t.maxHeaderSize-t.nread+n;t.nread=t.maxHeaderSize;t.maxed=true}else{t.nread+=s-n}t.buffer+=r.toString("binary",n,s)}if(e){t._finish()}}))}s(HeaderParser,n);HeaderParser.prototype.push=function(e){const t=this.ss.push(e);if(this.finished){return t}};HeaderParser.prototype.reset=function(){this.finished=false;this.buffer="";this.header={};this.ss.reset()};HeaderParser.prototype._finish=function(){if(this.buffer){this._parseHeader()}this.ss.matches=this.ss.maxMatches;const e=this.header;this.header={};this.buffer="";this.finished=true;this.nread=this.npairs=0;this.maxed=false;this.emit("header",e)};HeaderParser.prototype._parseHeader=function(){if(this.npairs===this.maxHeaderPairs){return}const e=this.buffer.split(l);const t=e.length;let r,n;for(var s=0;s{"use strict";const n=r(7975).inherits;const s=r(7075).Readable;function PartStream(e){s.call(this,e)}n(PartStream,s);PartStream.prototype._read=function(e){};e.exports=PartStream},4136:(e,t,r)=>{"use strict";const n=r(8474).EventEmitter;const s=r(7975).inherits;function SBMH(e){if(typeof e==="string"){e=Buffer.from(e)}if(!Buffer.isBuffer(e)){throw new TypeError("The needle has to be a String or a Buffer.")}const t=e.length;if(t===0){throw new Error("The needle cannot be an empty String/Buffer.")}if(t>256){throw new Error("The needle cannot have a length bigger than 256.")}this.maxMatches=Infinity;this.matches=0;this._occ=new Array(256).fill(t);this._lookbehind_size=0;this._needle=e;this._bufpos=0;this._lookbehind=Buffer.alloc(t);for(var r=0;r=0){this.emit("info",false,this._lookbehind,0,this._lookbehind_size);this._lookbehind_size=0}else{const r=this._lookbehind_size+A;if(r>0){this.emit("info",false,this._lookbehind,0,r)}this._lookbehind.copy(this._lookbehind,0,r,this._lookbehind_size-r);this._lookbehind_size-=r;e.copy(this._lookbehind,this._lookbehind_size);this._lookbehind_size+=t;this._bufpos=t;return t}}A+=(A>=0)*this._bufpos;if(e.indexOf(r,A)!==-1){A=e.indexOf(r,A);++this.matches;if(A>0){this.emit("info",true,e,this._bufpos,A)}else{this.emit("info",true)}return this._bufpos=A+n}else{A=t-n}while(A0){this.emit("info",false,e,this._bufpos,A{"use strict";const n=r(7075).Writable;const{inherits:s}=r(7975);const A=r(7182);const a=r(1192);const c=r(855);const l=r(8929);function Busboy(e){if(!(this instanceof Busboy)){return new Busboy(e)}if(typeof e!=="object"){throw new TypeError("Busboy expected an options-Object.")}if(typeof e.headers!=="object"){throw new TypeError("Busboy expected an options-Object with headers-attribute.")}if(typeof e.headers["content-type"]!=="string"){throw new TypeError("Missing Content-Type-header.")}const{headers:t,...r}=e;this.opts={autoDestroy:false,...r};n.call(this,this.opts);this._done=false;this._parser=this.getParserByHeaders(t);this._finished=false}s(Busboy,n);Busboy.prototype.emit=function(e){if(e==="finish"){if(!this._done){this._parser?.end();return}else if(this._finished){return}this._finished=true}n.prototype.emit.apply(this,arguments)};Busboy.prototype.getParserByHeaders=function(e){const t=l(e["content-type"]);const r={defCharset:this.opts.defCharset,fileHwm:this.opts.fileHwm,headers:e,highWaterMark:this.opts.highWaterMark,isPartAFile:this.opts.isPartAFile,limits:this.opts.limits,parsedConType:t,preservePath:this.opts.preservePath};if(a.detect.test(t[0])){return new a(this,r)}if(c.detect.test(t[0])){return new c(this,r)}throw new Error("Unsupported Content-Type.")};Busboy.prototype._write=function(e,t,r){this._parser.write(e,r)};e.exports=Busboy;e.exports["default"]=Busboy;e.exports.Busboy=Busboy;e.exports.Dicer=A},1192:(e,t,r)=>{"use strict";const{Readable:n}=r(7075);const{inherits:s}=r(7975);const A=r(7182);const a=r(8929);const c=r(2747);const l=r(692);const u=r(2393);const h=/^boundary$/i;const g=/^form-data$/i;const p=/^charset$/i;const C=/^filename$/i;const y=/^name$/i;Multipart.detect=/^multipart\/form-data/i;function Multipart(e,t){let r;let n;const s=this;let I;const B=t.limits;const Q=t.isPartAFile||((e,t,r)=>t==="application/octet-stream"||r!==undefined);const b=t.parsedConType||[];const w=t.defCharset||"utf8";const S=t.preservePath;const k={highWaterMark:t.fileHwm};for(r=0,n=b.length;rN){s.parser.removeListener("part",onPart);s.parser.on("part",skipPart);e.hitPartsLimit=true;e.emit("partsLimit");return skipPart(t)}if(U){const e=U;e.emit("end");e.removeAllListeners("end")}t.on("header",(function(A){let u;let h;let I;let B;let b;let N;let T=0;if(A["content-type"]){I=a(A["content-type"][0]);if(I[0]){u=I[0].toLowerCase();for(r=0,n=I.length;rR){const n=R-T+e.length;if(n>0){r.push(e.slice(0,n))}r.truncated=true;r.bytesRead=R;t.removeAllListeners("data");r.emit("limit");return}else if(!r.push(e)){s._pause=true}r.bytesRead=T};P=function(){O=undefined;r.push(null)}}else{if(M===_){if(!e.hitFieldsLimit){e.hitFieldsLimit=true;e.emit("fieldsLimit")}return skipPart(t)}++M;++x;let r="";let n=false;U=t;F=function(e){if((T+=e.length)>v){const s=v-(T-e.length);r+=e.toString("binary",0,s);n=true;t.removeAllListeners("data")}else{r+=e.toString("binary")}};P=function(){U=undefined;if(r.length){r=c(r,"binary",B)}e.emit("field",h,r,false,n,b,u);--x;checkFinished()}}t._readableState.sync=false;t.on("data",F);t.on("end",P)})).on("error",(function(e){if(O){O.emit("error",e)}}))})).on("error",(function(t){e.emit("error",t)})).on("finish",(function(){P=true;checkFinished()}))}Multipart.prototype.write=function(e,t){const r=this.parser.write(e);if(r&&!this._pause){t()}else{this._needDrain=!r;this._cb=t}};Multipart.prototype.end=function(){const e=this;if(e.parser.writable){e.parser.end()}else if(!e._boy._done){process.nextTick((function(){e._boy._done=true;e._boy.emit("finish")}))}};function skipPart(e){e.resume()}function FileStream(e){n.call(this,e);this.bytesRead=0;this.truncated=false}s(FileStream,n);FileStream.prototype._read=function(e){};e.exports=Multipart},855:(e,t,r)=>{"use strict";const n=r(1496);const s=r(2747);const A=r(2393);const a=/^charset$/i;UrlEncoded.detect=/^application\/x-www-form-urlencoded/i;function UrlEncoded(e,t){const r=t.limits;const s=t.parsedConType;this.boy=e;this.fieldSizeLimit=A(r,"fieldSize",1*1024*1024);this.fieldNameSizeLimit=A(r,"fieldNameSize",100);this.fieldsLimit=A(r,"fields",Infinity);let c;for(var l=0,u=s.length;la){this._key+=this.decoder.write(e.toString("binary",a,r))}this._state="val";this._hitLimit=false;this._checkingBytes=true;this._val="";this._bytesVal=0;this._valTrunc=false;this.decoder.reset();a=r+1}else if(n!==undefined){++this._fields;let r;const A=this._keyTrunc;if(n>a){r=this._key+=this.decoder.write(e.toString("binary",a,n))}else{r=this._key}this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();if(r.length){this.boy.emit("field",s(r,"binary",this.charset),"",A,false)}a=n+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(A>a){this._key+=this.decoder.write(e.toString("binary",a,A))}a=A;if((this._bytesKey=this._key.length)===this.fieldNameSizeLimit){this._checkingBytes=false;this._keyTrunc=true}}else{if(aa){this._val+=this.decoder.write(e.toString("binary",a,n))}this.boy.emit("field",s(this._key,"binary",this.charset),s(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc);this._state="key";this._hitLimit=false;this._checkingBytes=true;this._key="";this._bytesKey=0;this._keyTrunc=false;this.decoder.reset();a=n+1;if(this._fields===this.fieldsLimit){return t()}}else if(this._hitLimit){if(A>a){this._val+=this.decoder.write(e.toString("binary",a,A))}a=A;if(this._val===""&&this.fieldSizeLimit===0||(this._bytesVal=this._val.length)===this.fieldSizeLimit){this._checkingBytes=false;this._valTrunc=true}}else{if(a0){this.boy.emit("field",s(this._key,"binary",this.charset),"",this._keyTrunc,false)}else if(this._state==="val"){this.boy.emit("field",s(this._key,"binary",this.charset),s(this._val,"binary",this.charset),this._keyTrunc,this._valTrunc)}this.boy._done=true;this.boy.emit("finish")};e.exports=UrlEncoded},1496:e=>{"use strict";const t=/\+/g;const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];function Decoder(){this.buffer=undefined}Decoder.prototype.write=function(e){e=e.replace(t," ");let n="";let s=0;let A=0;const a=e.length;for(;sA){n+=e.substring(A,s);A=s}this.buffer="";++A}}if(A{"use strict";e.exports=function basename(e){if(typeof e!=="string"){return""}for(var t=e.length-1;t>=0;--t){switch(e.charCodeAt(t)){case 47:case 92:e=e.slice(t+1);return e===".."||e==="."?"":e}}return e===".."||e==="."?"":e}},2747:function(e){"use strict";const t=new TextDecoder("utf-8");const r=new Map([["utf-8",t],["utf8",t]]);function getDecoder(e){let t;while(true){switch(e){case"utf-8":case"utf8":return n.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 n.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return n.utf16le;case"base64":return n.base64;default:if(t===undefined){t=true;e=e.toLowerCase();continue}return n.other.bind(e)}}}const n={utf8:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}return e.utf8Slice(0,e.length)},latin1:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){return e}return e.latin1Slice(0,e.length)},utf16le:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}return e.ucs2Slice(0,e.length)},base64:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}return e.base64Slice(0,e.length)},other:(e,t)=>{if(e.length===0){return""}if(typeof e==="string"){e=Buffer.from(e,t)}if(r.has(this.toString())){try{return r.get(this).decode(e)}catch{}}return typeof e==="string"?e:e.toString()}};function decodeText(e,t,r){if(e){return getDecoder(r)(e,t)}return e}e.exports=decodeText},2393:e=>{"use strict";e.exports=function getLimit(e,t,r){if(!e||e[t]===undefined||e[t]===null){return r}if(typeof e[t]!=="number"||isNaN(e[t])){throw new TypeError("Limit "+t+" is not a valid number")}return e[t]}},8929:(e,t,r)=>{"use strict";const n=r(2747);const s=/%[a-fA-F0-9][a-fA-F0-9]/g;const A={"%00":"\0","%01":"","%02":"","%03":"","%04":"","%05":"","%06":"","%07":"","%08":"\b","%09":"\t","%0a":"\n","%0A":"\n","%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":"","%1B":"","%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":"","%7F":"","%80":"€","%81":"","%82":"‚","%83":"ƒ","%84":"„","%85":"…","%86":"†","%87":"‡","%88":"ˆ","%89":"‰","%8a":"Š","%8A":"Š","%8b":"‹","%8B":"‹","%8c":"Œ","%8C":"Œ","%8d":"","%8D":"","%8e":"Ž","%8E":"Ž","%8f":"","%8F":"","%90":"","%91":"‘","%92":"’","%93":"“","%94":"”","%95":"•","%96":"–","%97":"—","%98":"˜","%99":"™","%9a":"š","%9A":"š","%9b":"›","%9B":"›","%9c":"œ","%9C":"œ","%9d":"","%9D":"","%9e":"ž","%9E":"ž","%9f":"Ÿ","%9F":"Ÿ","%a0":" ","%A0":" ","%a1":"¡","%A1":"¡","%a2":"¢","%A2":"¢","%a3":"£","%A3":"£","%a4":"¤","%A4":"¤","%a5":"¥","%A5":"¥","%a6":"¦","%A6":"¦","%a7":"§","%A7":"§","%a8":"¨","%A8":"¨","%a9":"©","%A9":"©","%aa":"ª","%Aa":"ª","%aA":"ª","%AA":"ª","%ab":"«","%Ab":"«","%aB":"«","%AB":"«","%ac":"¬","%Ac":"¬","%aC":"¬","%AC":"¬","%ad":"­","%Ad":"­","%aD":"­","%AD":"­","%ae":"®","%Ae":"®","%aE":"®","%AE":"®","%af":"¯","%Af":"¯","%aF":"¯","%AF":"¯","%b0":"°","%B0":"°","%b1":"±","%B1":"±","%b2":"²","%B2":"²","%b3":"³","%B3":"³","%b4":"´","%B4":"´","%b5":"µ","%B5":"µ","%b6":"¶","%B6":"¶","%b7":"·","%B7":"·","%b8":"¸","%B8":"¸","%b9":"¹","%B9":"¹","%ba":"º","%Ba":"º","%bA":"º","%BA":"º","%bb":"»","%Bb":"»","%bB":"»","%BB":"»","%bc":"¼","%Bc":"¼","%bC":"¼","%BC":"¼","%bd":"½","%Bd":"½","%bD":"½","%BD":"½","%be":"¾","%Be":"¾","%bE":"¾","%BE":"¾","%bf":"¿","%Bf":"¿","%bF":"¿","%BF":"¿","%c0":"À","%C0":"À","%c1":"Á","%C1":"Á","%c2":"Â","%C2":"Â","%c3":"Ã","%C3":"Ã","%c4":"Ä","%C4":"Ä","%c5":"Å","%C5":"Å","%c6":"Æ","%C6":"Æ","%c7":"Ç","%C7":"Ç","%c8":"È","%C8":"È","%c9":"É","%C9":"É","%ca":"Ê","%Ca":"Ê","%cA":"Ê","%CA":"Ê","%cb":"Ë","%Cb":"Ë","%cB":"Ë","%CB":"Ë","%cc":"Ì","%Cc":"Ì","%cC":"Ì","%CC":"Ì","%cd":"Í","%Cd":"Í","%cD":"Í","%CD":"Í","%ce":"Î","%Ce":"Î","%cE":"Î","%CE":"Î","%cf":"Ï","%Cf":"Ï","%cF":"Ï","%CF":"Ï","%d0":"Ð","%D0":"Ð","%d1":"Ñ","%D1":"Ñ","%d2":"Ò","%D2":"Ò","%d3":"Ó","%D3":"Ó","%d4":"Ô","%D4":"Ô","%d5":"Õ","%D5":"Õ","%d6":"Ö","%D6":"Ö","%d7":"×","%D7":"×","%d8":"Ø","%D8":"Ø","%d9":"Ù","%D9":"Ù","%da":"Ú","%Da":"Ú","%dA":"Ú","%DA":"Ú","%db":"Û","%Db":"Û","%dB":"Û","%DB":"Û","%dc":"Ü","%Dc":"Ü","%dC":"Ü","%DC":"Ü","%dd":"Ý","%Dd":"Ý","%dD":"Ý","%DD":"Ý","%de":"Þ","%De":"Þ","%dE":"Þ","%DE":"Þ","%df":"ß","%Df":"ß","%dF":"ß","%DF":"ß","%e0":"à","%E0":"à","%e1":"á","%E1":"á","%e2":"â","%E2":"â","%e3":"ã","%E3":"ã","%e4":"ä","%E4":"ä","%e5":"å","%E5":"å","%e6":"æ","%E6":"æ","%e7":"ç","%E7":"ç","%e8":"è","%E8":"è","%e9":"é","%E9":"é","%ea":"ê","%Ea":"ê","%eA":"ê","%EA":"ê","%eb":"ë","%Eb":"ë","%eB":"ë","%EB":"ë","%ec":"ì","%Ec":"ì","%eC":"ì","%EC":"ì","%ed":"í","%Ed":"í","%eD":"í","%ED":"í","%ee":"î","%Ee":"î","%eE":"î","%EE":"î","%ef":"ï","%Ef":"ï","%eF":"ï","%EF":"ï","%f0":"ð","%F0":"ð","%f1":"ñ","%F1":"ñ","%f2":"ò","%F2":"ò","%f3":"ó","%F3":"ó","%f4":"ô","%F4":"ô","%f5":"õ","%F5":"õ","%f6":"ö","%F6":"ö","%f7":"÷","%F7":"÷","%f8":"ø","%F8":"ø","%f9":"ù","%F9":"ù","%fa":"ú","%Fa":"ú","%fA":"ú","%FA":"ú","%fb":"û","%Fb":"û","%fB":"û","%FB":"û","%fc":"ü","%Fc":"ü","%fC":"ü","%FC":"ü","%fd":"ý","%Fd":"ý","%fD":"ý","%FD":"ý","%fe":"þ","%Fe":"þ","%fE":"þ","%FE":"þ","%ff":"ÿ","%Ff":"ÿ","%fF":"ÿ","%FF":"ÿ"};function encodedReplacer(e){return A[e]}const a=0;const c=1;const l=2;const u=3;function parseParams(e){const t=[];let r=a;let A="";let h=false;let g=false;let p=0;let C="";const y=e.length;for(var I=0;I{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GCE_LINUX_BIOS_PATHS=void 0;t.isGoogleCloudServerless=isGoogleCloudServerless;t.isGoogleComputeEngineLinux=isGoogleComputeEngineLinux;t.isGoogleComputeEngineMACAddress=isGoogleComputeEngineMACAddress;t.isGoogleComputeEngine=isGoogleComputeEngine;t.detectGCPResidency=detectGCPResidency;const n=r(9896);const s=r(857);t.GCE_LINUX_BIOS_PATHS={BIOS_DATE:"/sys/class/dmi/id/bios_date",BIOS_VENDOR:"/sys/class/dmi/id/bios_vendor"};const A=/^42:01/;function isGoogleCloudServerless(){const e=process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE;return!!e}function isGoogleComputeEngineLinux(){if((0,s.platform)()!=="linux")return false;try{(0,n.statSync)(t.GCE_LINUX_BIOS_PATHS.BIOS_DATE);const e=(0,n.readFileSync)(t.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,"utf8");return/Google/.test(e)}catch{return false}}function isGoogleComputeEngineMACAddress(){const e=(0,s.networkInterfaces)();for(const t of Object.values(e)){if(!t)continue;for(const{mac:e}of t){if(A.test(e)){return true}}}return false}function isGoogleComputeEngine(){return isGoogleComputeEngineLinux()||isGoogleComputeEngineMACAddress()}function detectGCPResidency(){return isGoogleCloudServerless()||isGoogleComputeEngine()}},9595:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),A=0;A{switch(e){case"params":case"property":case"headers":break;case"qs":throw new Error("'qs' is not a valid configuration option. Please use 'params' instead.");default:throw new Error(`'${e}' is not a valid configuration option.`)}}))}async function metadataAccessor(e,r={},n=3,s=false){const A=new Headers(t.HEADERS);let a="";let u={};if(typeof e==="object"){const t=e;new Headers(t.headers).forEach(((e,t)=>A.set(t,e)));a=t.metadataKey;u=t.params||u;n=t.noResponseRetries||n;s=t.fastFail||s}else{a=e}if(typeof r==="string"){a+=`/${r}`}else{validate(r);if(r.property){a+=`/${r.property}`}new Headers(r.headers).forEach(((e,t)=>A.set(t,e)));u=r.params||u}const h=s?fastFailMetadataRequest:c.request;const p={url:`${getBaseUrl()}/${a}`,headers:A,retryConfig:{noResponseRetries:n},params:u,responseType:"text",timeout:requestTimeout()};g.info("instance request %j",p);const C=await h(p);g.info("instance metadata is %s",C.data);const y=C.headers.get(t.HEADER_NAME);if(y!==t.HEADER_VALUE){throw new RangeError(`Invalid response from metadata service: incorrect ${t.HEADER_NAME} header. Expected '${t.HEADER_VALUE}', got ${y?`'${y}'`:"no header"}`)}if(typeof C.data==="string"){try{return l.parse(C.data)}catch{}}return C.data}async function fastFailMetadataRequest(e){const r={...e,url:e.url?.toString().replace(getBaseUrl(),getBaseUrl(t.SECONDARY_HOST_ADDRESS))};const n=(0,c.request)(e);const s=(0,c.request)(r);return Promise.any([n,s])}function instance(e){return metadataAccessor("instance",e)}function project(e){return metadataAccessor("project",e)}function universe(e){return metadataAccessor("universe",e)}async function bulk(e){const t={};await Promise.all(e.map((e=>(async()=>{const r=await metadataAccessor(e);const n=e.metadataKey;t[n]=r})())));return t}function detectGCPAvailableRetries(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}let p;async function isAvailable(){if(process.env.METADATA_SERVER_DETECTION){const e=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(e in t.METADATA_SERVER_DETECTION)){throw new RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${e}\`, but it should be \`${Object.keys(t.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`)}switch(e){case"assume-present":return true;case"none":return false;case"bios-only":return getGCPResidency();case"ping-only":}}try{if(p===undefined){p=metadataAccessor("instance",undefined,detectGCPAvailableRetries(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))}await p;return true}catch(e){const t=e;if(process.env.DEBUG_AUTH){console.info(t)}if(t.type==="request-timeout"){return false}if(t.response&&t.response.status===404){return false}else{if(!(t.response&&t.response.status===404)&&(!t.code||!["EHOSTDOWN","EHOSTUNREACH","ENETUNREACH","ENOENT","ENOTFOUND","ECONNREFUSED"].includes(t.code.toString()))){let e="UNKNOWN";if(t.code)e=t.code.toString();process.emitWarning(`received unexpected error = ${t.message} code = ${e}`,"MetadataLookupWarning")}return false}}}function resetIsAvailableCache(){p=undefined}t.gcpResidencyCache=null;function getGCPResidency(){if(t.gcpResidencyCache===null){setGCPResidency()}return t.gcpResidencyCache}function setGCPResidency(e=null){t.gcpResidencyCache=e!==null?e:(0,u.detectGCPResidency)()}function requestTimeout(){return getGCPResidency()?0:3e3}a(r(6128),t)},2981:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Glob=void 0;const n=r(1409);const s=r(3136);const A=r(8958);const a=r(7813);const c=r(1157);const l=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Glob{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");this.withFileTypes=!!t.withFileTypes;this.signal=t.signal;this.follow=!!t.follow;this.dot=!!t.dot;this.dotRelative=!!t.dotRelative;this.nodir=!!t.nodir;this.mark=!!t.mark;if(!t.cwd){this.cwd=""}else if(t.cwd instanceof URL||t.cwd.startsWith("file://")){t.cwd=(0,s.fileURLToPath)(t.cwd)}this.cwd=t.cwd||"";this.root=t.root;this.magicalBraces=!!t.magicalBraces;this.nobrace=!!t.nobrace;this.noext=!!t.noext;this.realpath=!!t.realpath;this.absolute=t.absolute;this.includeChildMatches=t.includeChildMatches!==false;this.noglobstar=!!t.noglobstar;this.matchBase=!!t.matchBase;this.maxDepth=typeof t.maxDepth==="number"?t.maxDepth:Infinity;this.stat=!!t.stat;this.ignore=t.ignore;if(this.withFileTypes&&this.absolute!==undefined){throw new Error("cannot set absolute and withFileTypes:true")}if(typeof e==="string"){e=[e]}this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===false;if(this.windowsPathsNoEscape){e=e.map((e=>e.replace(/\\/g,"/")))}if(this.matchBase){if(t.noglobstar){throw new TypeError("base matching requires globstar")}e=e.map((e=>e.includes("/")?e:`./**/${e}`))}this.pattern=e;this.platform=t.platform||l;this.opts={...t,platform:this.platform};if(t.scurry){this.scurry=t.scurry;if(t.nocase!==undefined&&t.nocase!==t.scurry.nocase){throw new Error("nocase option contradicts provided scurry option")}}else{const e=t.platform==="win32"?A.PathScurryWin32:t.platform==="darwin"?A.PathScurryDarwin:t.platform?A.PathScurryPosix:A.PathScurry;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;const r=this.platform==="darwin"||this.platform==="win32";const c={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:r,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug};const u=this.pattern.map((e=>new n.Minimatch(e,c)));const[h,g]=u.reduce(((e,t)=>{e[0].push(...t.set);e[1].push(...t.globParts);return e}),[[],[]]);this.patterns=h.map(((e,t)=>{const r=g[t];if(!r)throw new Error("invalid pattern object");return new a.Pattern(e,r,0,this.platform)}))}async walk(){return[...await new c.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new c.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new c.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new c.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==Infinity?this.maxDepth+this.scurry.cwd.depth():Infinity,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}t.Glob=Glob},5197:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.hasMagic=void 0;const n=r(1409);const hasMagic=(e,t={})=>{if(!Array.isArray(e)){e=[e]}for(const r of e){if(new n.Minimatch(r,t).hasMagic())return true}return false};t.hasMagic=hasMagic},5637:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Ignore=void 0;const n=r(1409);const s=r(7813);const A=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Ignore{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:r,noext:n,noglobstar:s,platform:a=A}){this.relative=[];this.absolute=[];this.relativeChildren=[];this.absoluteChildren=[];this.platform=a;this.mmopts={dot:true,nobrace:t,nocase:r,noext:n,noglobstar:s,optimizationLevel:2,platform:a,nocomment:true,nonegate:true};for(const t of e)this.add(t)}add(e){const t=new n.Minimatch(e,this.mmopts);for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.glob=t.sync=t.iterate=t.iterateSync=t.stream=t.streamSync=t.Ignore=t.hasMagic=t.Glob=t.unescape=t.escape=void 0;t.globStreamSync=globStreamSync;t.globStream=globStream;t.globSync=globSync;t.globIterateSync=globIterateSync;t.globIterate=globIterate;const n=r(1409);const s=r(2981);const A=r(5197);var a=r(1409);Object.defineProperty(t,"escape",{enumerable:true,get:function(){return a.escape}});Object.defineProperty(t,"unescape",{enumerable:true,get:function(){return a.unescape}});var c=r(2981);Object.defineProperty(t,"Glob",{enumerable:true,get:function(){return c.Glob}});var l=r(5197);Object.defineProperty(t,"hasMagic",{enumerable:true,get:function(){return l.hasMagic}});var u=r(5637);Object.defineProperty(t,"Ignore",{enumerable:true,get:function(){return u.Ignore}});function globStreamSync(e,t={}){return new s.Glob(e,t).streamSync()}function globStream(e,t={}){return new s.Glob(e,t).stream()}function globSync(e,t={}){return new s.Glob(e,t).walkSync()}async function glob_(e,t={}){return new s.Glob(e,t).walk()}function globIterateSync(e,t={}){return new s.Glob(e,t).iterateSync()}function globIterate(e,t={}){return new s.Glob(e,t).iterate()}t.streamSync=globStreamSync;t.stream=Object.assign(globStream,{sync:globStreamSync});t.iterateSync=globIterateSync;t.iterate=Object.assign(globIterate,{sync:globIterateSync});t.sync=Object.assign(globSync,{stream:globStreamSync,iterate:globIterateSync});t.glob=Object.assign(glob_,{glob:glob_,globSync:globSync,sync:t.sync,globStream:globStream,stream:t.stream,globStreamSync:globStreamSync,streamSync:t.streamSync,globIterate:globIterate,iterate:t.iterate,globIterateSync:globIterateSync,iterateSync:t.iterateSync,Glob:s.Glob,hasMagic:A.hasMagic,escape:n.escape,unescape:n.unescape});t.glob.glob=t.glob},7813:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Pattern=void 0;const n=r(1409);const isPatternList=e=>e.length>=1;const isGlobList=e=>e.length>=1;class Pattern{#ee;#te;#re;length;#ne;#ie;#se;#oe;#Ae;#ae;#ce=true;constructor(e,t,r,n){if(!isPatternList(e)){throw new TypeError("empty pattern list")}if(!isGlobList(t)){throw new TypeError("empty glob list")}if(t.length!==e.length){throw new TypeError("mismatched pattern list and glob list lengths")}this.length=e.length;if(r<0||r>=this.length){throw new TypeError("index out of range")}this.#ee=e;this.#te=t;this.#re=r;this.#ne=n;if(this.#re===0){if(this.isUNC()){const[e,t,r,n,...s]=this.#ee;const[A,a,c,l,...u]=this.#te;if(s[0]===""){s.shift();u.shift()}const h=[e,t,r,n,""].join("/");const g=[A,a,c,l,""].join("/");this.#ee=[h,...s];this.#te=[g,...u];this.length=this.#ee.length}else if(this.isDrive()||this.isAbsolute()){const[e,...t]=this.#ee;const[r,...n]=this.#te;if(t[0]===""){t.shift();n.shift()}const s=e+"/";const A=r+"/";this.#ee=[s,...t];this.#te=[A,...n];this.length=this.#ee.length}}}pattern(){return this.#ee[this.#re]}isString(){return typeof this.#ee[this.#re]==="string"}isGlobstar(){return this.#ee[this.#re]===n.GLOBSTAR}isRegExp(){return this.#ee[this.#re]instanceof RegExp}globString(){return this.#se=this.#se||(this.#re===0?this.isAbsolute()?this.#te[0]+this.#te.slice(1).join("/"):this.#te.join("/"):this.#te.slice(this.#re).join("/"))}hasMore(){return this.length>this.#re+1}rest(){if(this.#ie!==undefined)return this.#ie;if(!this.hasMore())return this.#ie=null;this.#ie=new Pattern(this.#ee,this.#te,this.#re+1,this.#ne);this.#ie.#ae=this.#ae;this.#ie.#Ae=this.#Ae;this.#ie.#oe=this.#oe;return this.#ie}isUNC(){const e=this.#ee;return this.#Ae!==undefined?this.#Ae:this.#Ae=this.#ne==="win32"&&this.#re===0&&e[0]===""&&e[1]===""&&typeof e[2]==="string"&&!!e[2]&&typeof e[3]==="string"&&!!e[3]}isDrive(){const e=this.#ee;return this.#oe!==undefined?this.#oe:this.#oe=this.#ne==="win32"&&this.#re===0&&this.length>1&&typeof e[0]==="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){const e=this.#ee;return this.#ae!==undefined?this.#ae:this.#ae=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){const e=this.#ee[0];return typeof e==="string"&&this.isAbsolute()&&this.#re===0?e:""}checkFollowGlobstar(){return!(this.#re===0||!this.isGlobstar()||!this.#ce)}markFollowGlobstar(){if(this.#re===0||!this.isGlobstar()||!this.#ce)return false;this.#ce=false;return true}}t.Pattern=Pattern},7843:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Processor=t.SubWalks=t.MatchRecord=t.HasWalkedCache=void 0;const n=r(1409);class HasWalkedCache{store;constructor(e=new Map){this.store=e}copy(){return new HasWalkedCache(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){const r=e.fullpath();const n=this.store.get(r);if(n)n.add(t.globString());else this.store.set(r,new Set([t.globString()]))}}t.HasWalkedCache=HasWalkedCache;class MatchRecord{store=new Map;add(e,t,r){const n=(t?2:0)|(r?1:0);const s=this.store.get(e);this.store.set(e,s===undefined?n:n&s)}entries(){return[...this.store.entries()].map((([e,t])=>[e,!!(t&2),!!(t&1)]))}}t.MatchRecord=MatchRecord;class SubWalks{store=new Map;add(e,t){if(!e.canReaddir()){return}const r=this.store.get(e);if(r){if(!r.find((e=>e.globString()===t.globString()))){r.push(t)}}else this.store.set(e,[t])}get(e){const t=this.store.get(e);if(!t){throw new Error("attempting to walk unknown path")}return t}entries(){return this.keys().map((e=>[e,this.store.get(e)]))}keys(){return[...this.store.keys()].filter((e=>e.canReaddir()))}}t.SubWalks=SubWalks;class Processor{hasWalkedCache;matches=new MatchRecord;subwalks=new SubWalks;patterns;follow;dot;opts;constructor(e,t){this.opts=e;this.follow=!!e.follow;this.dot=!!e.dot;this.hasWalkedCache=t?t.copy():new HasWalkedCache}processPatterns(e,t){this.patterns=t;const r=t.map((t=>[e,t]));for(let[e,t]of r){this.hasWalkedCache.storeWalked(e,t);const r=t.root();const s=t.isAbsolute()&&this.opts.absolute!==false;if(r){e=e.resolve(r==="/"&&this.opts.root!==undefined?this.opts.root:r);const n=t.rest();if(!n){this.matches.add(e,true,false);continue}else{t=n}}if(e.isENOENT())continue;let A;let a;let c=false;while(typeof(A=t.pattern())==="string"&&(a=t.rest())){const r=e.resolve(A);e=r;t=a;c=true}A=t.pattern();a=t.rest();if(c){if(this.hasWalkedCache.hasWalked(e,t))continue;this.hasWalkedCache.storeWalked(e,t)}if(typeof A==="string"){const t=A===".."||A===""||A===".";this.matches.add(e.resolve(A),s,t);continue}else if(A===n.GLOBSTAR){if(!e.isSymbolicLink()||this.follow||t.checkFollowGlobstar()){this.subwalks.add(e,t)}const r=a?.pattern();const n=a?.rest();if(!a||(r===""||r===".")&&!n){this.matches.add(e,s,r===""||r===".")}else{if(r===".."){const t=e.parent||e;if(!n)this.matches.add(t,s,true);else if(!this.hasWalkedCache.hasWalked(t,n)){this.subwalks.add(t,n)}}}}else if(A instanceof RegExp){this.subwalks.add(e,t)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Processor(this.opts,this.hasWalkedCache)}filterEntries(e,t){const r=this.subwalks.get(e);const s=this.child();for(const e of t){for(const t of r){const r=t.isAbsolute();const A=t.pattern();const a=t.rest();if(A===n.GLOBSTAR){s.testGlobstar(e,t,a,r)}else if(A instanceof RegExp){s.testRegExp(e,A,a,r)}else{s.testString(e,A,a,r)}}}return s}testGlobstar(e,t,r,n){if(this.dot||!e.name.startsWith(".")){if(!t.hasMore()){this.matches.add(e,n,false)}if(e.canReaddir()){if(this.follow||!e.isSymbolicLink()){this.subwalks.add(e,t)}else if(e.isSymbolicLink()){if(r&&t.checkFollowGlobstar()){this.subwalks.add(e,r)}else if(t.markFollowGlobstar()){this.subwalks.add(e,t)}}}}if(r){const t=r.pattern();if(typeof t==="string"&&t!==".."&&t!==""&&t!=="."){this.testString(e,t,r.rest(),n)}else if(t===".."){const t=e.parent||e;this.subwalks.add(t,r)}else if(t instanceof RegExp){this.testRegExp(e,t,r.rest(),n)}}}testRegExp(e,t,r,n){if(!t.test(e.name))return;if(!r){this.matches.add(e,n,false)}else{this.subwalks.add(e,r)}}testString(e,t,r,n){if(!e.isNamed(t))return;if(!r){this.matches.add(e,n,false)}else{this.subwalks.add(e,r)}}}t.Processor=Processor},1157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GlobStream=t.GlobWalker=t.GlobUtil=void 0;const n=r(8275);const s=r(5637);const A=r(7843);const makeIgnore=(e,t)=>typeof e==="string"?new s.Ignore([e],t):Array.isArray(e)?new s.Ignore(e,t):e;class GlobUtil{path;patterns;opts;seen=new Set;paused=false;aborted=false;#le=[];#ue;#he;signal;maxDepth;includeChildMatches;constructor(e,t,r){this.patterns=e;this.path=t;this.opts=r;this.#he=!r.posix&&r.platform==="win32"?"\\":"/";this.includeChildMatches=r.includeChildMatches!==false;if(r.ignore||!this.includeChildMatches){this.#ue=makeIgnore(r.ignore??[],r);if(!this.includeChildMatches&&typeof this.#ue.add!=="function"){const e="cannot ignore child matches, ignore lacks add() method.";throw new Error(e)}}this.maxDepth=r.maxDepth||Infinity;if(r.signal){this.signal=r.signal;this.signal.addEventListener("abort",(()=>{this.#le.length=0}))}}#fe(e){return this.seen.has(e)||!!this.#ue?.ignored?.(e)}#de(e){return!!this.#ue?.childrenIgnored?.(e)}pause(){this.paused=true}resume(){if(this.signal?.aborted)return;this.paused=false;let e=undefined;while(!this.paused&&(e=this.#le.shift())){e()}}onResume(e){if(this.signal?.aborted)return;if(!this.paused){e()}else{this.#le.push(e)}}async matchCheck(e,t){if(t&&this.opts.nodir)return undefined;let r;if(this.opts.realpath){r=e.realpathCached()||await e.realpath();if(!r)return undefined;e=r}const n=e.isUnknown()||this.opts.stat;const s=n?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){const e=await s.realpath();if(e&&(e.isUnknown()||this.opts.stat)){await e.lstat()}}return this.matchCheckTest(s,t)}matchCheckTest(e,t){return e&&(this.maxDepth===Infinity||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#fe(e)?e:undefined}matchCheckSync(e,t){if(t&&this.opts.nodir)return undefined;let r;if(this.opts.realpath){r=e.realpathCached()||e.realpathSync();if(!r)return undefined;e=r}const n=e.isUnknown()||this.opts.stat;const s=n?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){const e=s.realpathSync();if(e&&(e?.isUnknown()||this.opts.stat)){e.lstatSync()}}return this.matchCheckTest(s,t)}matchFinish(e,t){if(this.#fe(e))return;if(!this.includeChildMatches&&this.#ue?.add){const t=`${e.relativePosix()}/**`;this.#ue.add(t)}const r=this.opts.absolute===undefined?t:this.opts.absolute;this.seen.add(e);const n=this.opts.mark&&e.isDirectory()?this.#he:"";if(this.opts.withFileTypes){this.matchEmit(e)}else if(r){const t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+n)}else{const t=this.opts.posix?e.relativePosix():e.relative();const r=this.opts.dotRelative&&!t.startsWith(".."+this.#he)?"."+this.#he:"";this.matchEmit(!t?"."+n:r+t+n)}}async match(e,t,r){const n=await this.matchCheck(e,r);if(n)this.matchFinish(n,t)}matchSync(e,t,r){const n=this.matchCheckSync(e,r);if(n)this.matchFinish(n,t)}walkCB(e,t,r){if(this.signal?.aborted)r();this.walkCB2(e,t,new A.Processor(this.opts),r)}walkCB2(e,t,r,n){if(this.#de(e))return n();if(this.signal?.aborted)n();if(this.paused){this.onResume((()=>this.walkCB2(e,t,r,n)));return}r.processPatterns(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;s++;this.match(e,t,n).then((()=>next()))}for(const e of r.subwalkTargets()){if(this.maxDepth!==Infinity&&e.depth()>=this.maxDepth){continue}s++;const t=e.readdirCached();if(e.calledReaddir())this.walkCB3(e,t,r,next);else{e.readdirCB(((t,n)=>this.walkCB3(e,n,r,next)),true)}}next()}walkCB3(e,t,r,n){r=r.filterEntries(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;s++;this.match(e,t,n).then((()=>next()))}for(const[e,t]of r.subwalks.entries()){s++;this.walkCB2(e,t,r.child(),next)}next()}walkCBSync(e,t,r){if(this.signal?.aborted)r();this.walkCB2Sync(e,t,new A.Processor(this.opts),r)}walkCB2Sync(e,t,r,n){if(this.#de(e))return n();if(this.signal?.aborted)n();if(this.paused){this.onResume((()=>this.walkCB2Sync(e,t,r,n)));return}r.processPatterns(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;this.matchSync(e,t,n)}for(const e of r.subwalkTargets()){if(this.maxDepth!==Infinity&&e.depth()>=this.maxDepth){continue}s++;const t=e.readdirSync();this.walkCB3Sync(e,t,r,next)}next()}walkCB3Sync(e,t,r,n){r=r.filterEntries(e,t);let s=1;const next=()=>{if(--s===0)n()};for(const[e,t,n]of r.matches.entries()){if(this.#fe(e))continue;this.matchSync(e,t,n)}for(const[e,t]of r.subwalks.entries()){s++;this.walkCB2Sync(e,t,r.child(),next)}next()}}t.GlobUtil=GlobUtil;class GlobWalker extends GlobUtil{matches=new Set;constructor(e,t,r){super(e,t,r)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){await this.path.lstat()}await new Promise(((e,t)=>{this.walkCB(this.path,this.patterns,(()=>{if(this.signal?.aborted){t(this.signal.reason)}else{e(this.matches)}}))}));return this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason}));return this.matches}}t.GlobWalker=GlobWalker;class GlobStream extends GlobUtil{results;constructor(e,t,r){super(e,t,r);this.results=new n.Minipass({signal:this.signal,objectMode:true});this.results.on("drain",(()=>this.resume()));this.results.on("resume",(()=>this.resume()))}matchEmit(e){this.results.write(e);if(!this.results.flowing)this.pause()}stream(){const e=this.path;if(e.isUnknown()){e.lstat().then((()=>{this.walkCB(e,this.patterns,(()=>this.results.end()))}))}else{this.walkCB(e,this.patterns,(()=>this.results.end()))}return this.results}streamSync(){if(this.path.isUnknown()){this.path.lstatSync()}this.walkCBSync(this.path,this.patterns,(()=>this.results.end()));return this.results}}t.GlobStream=GlobStream},8895:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assertValidPattern=void 0;const r=1024*64;const assertValidPattern=e=>{if(typeof e!=="string"){throw new TypeError("invalid pattern")}if(e.length>r){throw new TypeError("pattern is too long")}};t.assertValidPattern=assertValidPattern},3238:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.AST=void 0;const n=r(5192);const s=r(9829);const A=new Set(["!","?","+","*","@"]);const isExtglobType=e=>A.has(e);const a="(?!(?:^|/)\\.\\.?(?:$|/))";const c="(?!\\.)";const l=new Set(["[","."]);const u=new Set(["..","."]);const h=new Set("().*{}+?[]^$\\!");const regExpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const g="[^/]";const p=g+"*?";const C=g+"+?";class AST{type;#ge;#pe;#Ee=false;#Ce=[];#ye;#Ie;#Be;#Qe=false;#me;#be;#we=false;constructor(e,t,r={}){this.type=e;if(e)this.#pe=true;this.#ye=t;this.#ge=this.#ye?this.#ye.#ge:this;this.#me=this.#ge===this?r:this.#ge.#me;this.#Be=this.#ge===this?[]:this.#ge.#Be;if(e==="!"&&!this.#ge.#Qe)this.#Be.push(this);this.#Ie=this.#ye?this.#ye.#Ce.length:0}get hasMagic(){if(this.#pe!==undefined)return this.#pe;for(const e of this.#Ce){if(typeof e==="string")continue;if(e.type||e.hasMagic)return this.#pe=true}return this.#pe}toString(){if(this.#be!==undefined)return this.#be;if(!this.type){return this.#be=this.#Ce.map((e=>String(e))).join("")}else{return this.#be=this.type+"("+this.#Ce.map((e=>String(e))).join("|")+")"}}#Se(){if(this!==this.#ge)throw new Error("should only call on root");if(this.#Qe)return this;this.toString();this.#Qe=true;let e;while(e=this.#Be.pop()){if(e.type!=="!")continue;let t=e;let r=t.#ye;while(r){for(let n=t.#Ie+1;!r.type&&ntypeof e==="string"?e:e.toJSON())):[this.type,...this.#Ce.map((e=>e.toJSON()))];if(this.isStart()&&!this.type)e.unshift([]);if(this.isEnd()&&(this===this.#ge||this.#ge.#Qe&&this.#ye?.type==="!")){e.push({})}return e}isStart(){if(this.#ge===this)return true;if(!this.#ye?.isStart())return false;if(this.#Ie===0)return true;const e=this.#ye;for(let t=0;t{const[n,s,A,a]=typeof t==="string"?AST.#ve(t,this.#pe,r):t.toRegExpSource(e);this.#pe=this.#pe||A;this.#Ee=this.#Ee||a;return n})).join("");let A="";if(this.isStart()){if(typeof this.#Ce[0]==="string"){const r=this.#Ce.length===1&&u.has(this.#Ce[0]);if(!r){const r=l;const s=t&&r.has(n.charAt(0))||n.startsWith("\\.")&&r.has(n.charAt(2))||n.startsWith("\\.\\.")&&r.has(n.charAt(4));const u=!t&&!e&&r.has(n.charAt(0));A=s?a:u?c:""}}}let h="";if(this.isEnd()&&this.#ge.#Qe&&this.#ye?.type==="!"){h="(?:$|\\/)"}const g=A+n+h;return[g,(0,s.unescape)(n),this.#pe=!!this.#pe,this.#Ee]}const r=this.type==="*"||this.type==="+";const n=this.type==="!"?"(?:(?!(?:":"(?:";let A=this.#Re(t);if(this.isStart()&&this.isEnd()&&!A&&this.type!=="!"){const e=this.toString();this.#Ce=[e];this.type=null;this.#pe=undefined;return[e,(0,s.unescape)(this.toString()),false,false]}let h=!r||e||t||!c?"":this.#Re(true);if(h===A){h=""}if(h){A=`(?:${A})(?:${h})*?`}let g="";if(this.type==="!"&&this.#we){g=(this.isStart()&&!t?c:"")+C}else{const r=this.type==="!"?"))"+(this.isStart()&&!t&&!e?c:"")+p+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&h?")":this.type==="*"&&h?`)?`:`)${this.type}`;g=n+A+r}return[g,(0,s.unescape)(A),this.#pe=!!this.#pe,this.#Ee]}#Re(e){return this.#Ce.map((t=>{if(typeof t==="string"){throw new Error("string type in extglob ast??")}const[r,n,s,A]=t.toRegExpSource(e);this.#Ee=this.#Ee||A;return r})).filter((e=>!(this.isStart()&&this.isEnd())||!!e)).join("|")}static#ve(e,t,r=false){let A=false;let a="";let c=false;for(let s=0;s{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.parseClass=void 0;const r={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",true],"[:alpha:]":["\\p{L}\\p{Nl}",true],"[:ascii:]":["\\x"+"00-\\x"+"7f",false],"[:blank:]":["\\p{Zs}\\t",true],"[:cntrl:]":["\\p{Cc}",true],"[:digit:]":["\\p{Nd}",true],"[:graph:]":["\\p{Z}\\p{C}",true,true],"[:lower:]":["\\p{Ll}",true],"[:print:]":["\\p{C}",true],"[:punct:]":["\\p{P}",true],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",true],"[:upper:]":["\\p{Lu}",true],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",true],"[:xdigit:]":["A-Fa-f0-9",false]};const braceEscape=e=>e.replace(/[[\]\\-]/g,"\\$&");const regexpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const rangesToString=e=>e.join("");const parseClass=(e,t)=>{const n=t;if(e.charAt(n)!=="["){throw new Error("not in a brace expression")}const s=[];const A=[];let a=n+1;let c=false;let l=false;let u=false;let h=false;let g=n;let p="";e:while(ap){s.push(braceEscape(p)+"-"+braceEscape(t))}else if(t===p){s.push(braceEscape(t))}p="";a++;continue}if(e.startsWith("-]",a+1)){s.push(braceEscape(t+"-"));a+=2;continue}if(e.startsWith("-",a+1)){p=t;a+=2;continue}s.push(braceEscape(t));a++}if(g{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.escape=void 0;const escape=(e,{windowsPathsNoEscape:t=false}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");t.escape=escape},1409:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.unescape=t.escape=t.AST=t.Minimatch=t.match=t.makeRe=t.braceExpand=t.defaults=t.filter=t.GLOBSTAR=t.sep=t.minimatch=void 0;const s=n(r(8497));const A=r(8895);const a=r(3238);const c=r(6726);const l=r(9829);const minimatch=(e,t,r={})=>{(0,A.assertValidPattern)(t);if(!r.nocomment&&t.charAt(0)==="#"){return false}return new Minimatch(t,r).match(e)};t.minimatch=minimatch;const u=/^\*+([^+@!?\*\[\(]*)$/;const starDotExtTest=e=>t=>!t.startsWith(".")&&t.endsWith(e);const starDotExtTestDot=e=>t=>t.endsWith(e);const starDotExtTestNocase=e=>{e=e.toLowerCase();return t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)};const starDotExtTestNocaseDot=e=>{e=e.toLowerCase();return t=>t.toLowerCase().endsWith(e)};const h=/^\*+\.\*+$/;const starDotStarTest=e=>!e.startsWith(".")&&e.includes(".");const starDotStarTestDot=e=>e!=="."&&e!==".."&&e.includes(".");const g=/^\.\*+$/;const dotStarTest=e=>e!=="."&&e!==".."&&e.startsWith(".");const p=/^\*+$/;const starTest=e=>e.length!==0&&!e.startsWith(".");const starTestDot=e=>e.length!==0&&e!=="."&&e!=="..";const C=/^\?+([^+@!?\*\[\(]*)?$/;const qmarksTestNocase=([e,t=""])=>{const r=qmarksTestNoExt([e]);if(!t)return r;t=t.toLowerCase();return e=>r(e)&&e.toLowerCase().endsWith(t)};const qmarksTestNocaseDot=([e,t=""])=>{const r=qmarksTestNoExtDot([e]);if(!t)return r;t=t.toLowerCase();return e=>r(e)&&e.toLowerCase().endsWith(t)};const qmarksTestDot=([e,t=""])=>{const r=qmarksTestNoExtDot([e]);return!t?r:e=>r(e)&&e.endsWith(t)};const qmarksTest=([e,t=""])=>{const r=qmarksTestNoExt([e]);return!t?r:e=>r(e)&&e.endsWith(t)};const qmarksTestNoExt=([e])=>{const t=e.length;return e=>e.length===t&&!e.startsWith(".")};const qmarksTestNoExtDot=([e])=>{const t=e.length;return e=>e.length===t&&e!=="."&&e!==".."};const y=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";const I={win32:{sep:"\\"},posix:{sep:"/"}};t.sep=y==="win32"?I.win32.sep:I.posix.sep;t.minimatch.sep=t.sep;t.GLOBSTAR=Symbol("globstar **");t.minimatch.GLOBSTAR=t.GLOBSTAR;const B="[^/]";const Q=B+"*?";const b="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";const w="(?:(?!(?:\\/|^)\\.).)*?";const filter=(e,r={})=>n=>(0,t.minimatch)(n,e,r);t.filter=filter;t.minimatch.filter=t.filter;const ext=(e,t={})=>Object.assign({},e,t);const defaults=e=>{if(!e||typeof e!=="object"||!Object.keys(e).length){return t.minimatch}const r=t.minimatch;const m=(t,n,s={})=>r(t,n,ext(e,s));return Object.assign(m,{Minimatch:class Minimatch extends r.Minimatch{constructor(t,r={}){super(t,ext(e,r))}static defaults(t){return r.defaults(ext(e,t)).Minimatch}},AST:class AST extends r.AST{constructor(t,r,n={}){super(t,r,ext(e,n))}static fromGlob(t,n={}){return r.AST.fromGlob(t,ext(e,n))}},unescape:(t,n={})=>r.unescape(t,ext(e,n)),escape:(t,n={})=>r.escape(t,ext(e,n)),filter:(t,n={})=>r.filter(t,ext(e,n)),defaults:t=>r.defaults(ext(e,t)),makeRe:(t,n={})=>r.makeRe(t,ext(e,n)),braceExpand:(t,n={})=>r.braceExpand(t,ext(e,n)),match:(t,n,s={})=>r.match(t,n,ext(e,s)),sep:r.sep,GLOBSTAR:t.GLOBSTAR})};t.defaults=defaults;t.minimatch.defaults=t.defaults;const braceExpand=(e,t={})=>{(0,A.assertValidPattern)(e);if(t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)){return[e]}return(0,s.default)(e)};t.braceExpand=braceExpand;t.minimatch.braceExpand=t.braceExpand;const makeRe=(e,t={})=>new Minimatch(e,t).makeRe();t.makeRe=makeRe;t.minimatch.makeRe=t.makeRe;const match=(e,t,r={})=>{const n=new Minimatch(t,r);e=e.filter((e=>n.match(e)));if(n.options.nonull&&!e.length){e.push(t)}return e};t.match=match;t.minimatch.match=t.match;const S=/[?*]|[+@!]\(.*?\)|\[|\]/;const regExpEscape=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Minimatch{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,A.assertValidPattern)(e);t=t||{};this.options=t;this.pattern=e;this.platform=t.platform||y;this.isWindows=this.platform==="win32";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===false;if(this.windowsPathsNoEscape){this.pattern=this.pattern.replace(/\\/g,"/")}this.preserveMultipleSlashes=!!t.preserveMultipleSlashes;this.regexp=null;this.negate=false;this.nonegate=!!t.nonegate;this.comment=false;this.empty=false;this.partial=!!t.partial;this.nocase=!!this.options.nocase;this.windowsNoMagicRoot=t.windowsNoMagicRoot!==undefined?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase);this.globSet=[];this.globParts=[];this.set=[];this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1){return true}for(const e of this.set){for(const t of e){if(typeof t!=="string")return true}}return false}debug(...e){}make(){const e=this.pattern;const t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();this.globSet=[...new Set(this.braceExpand())];if(t.debug){this.debug=(...e)=>console.error(...e)}this.debug(this.pattern,this.globSet);const r=this.globSet.map((e=>this.slashSplit(e)));this.globParts=this.preprocess(r);this.debug(this.pattern,this.globParts);let n=this.globParts.map(((e,t,r)=>{if(this.isWindows&&this.windowsNoMagicRoot){const t=e[0]===""&&e[1]===""&&(e[2]==="?"||!S.test(e[2]))&&!S.test(e[3]);const r=/^[a-z]:/i.test(e[0]);if(t){return[...e.slice(0,4),...e.slice(4).map((e=>this.parse(e)))]}else if(r){return[e[0],...e.slice(1).map((e=>this.parse(e)))]}}return e.map((e=>this.parse(e)))}));this.debug(this.pattern,n);this.set=n.filter((e=>e.indexOf(false)===-1));if(this.isWindows){for(let e=0;e=2){e=this.firstPhasePreProcess(e);e=this.secondPhasePreProcess(e)}else if(t>=1){e=this.levelOneOptimize(e)}else{e=this.adjascentGlobstarOptimize(e)}return e}adjascentGlobstarOptimize(e){return e.map((e=>{let t=-1;while(-1!==(t=e.indexOf("**",t+1))){let r=t;while(e[r+1]==="**"){r++}if(r!==t){e.splice(t,r-t)}}return e}))}levelOneOptimize(e){return e.map((e=>{e=e.reduce(((e,t)=>{const r=e[e.length-1];if(t==="**"&&r==="**"){return e}if(t===".."){if(r&&r!==".."&&r!=="."&&r!=="**"){e.pop();return e}}e.push(t);return e}),[]);return e.length===0?[""]:e}))}levelTwoFileOptimize(e){if(!Array.isArray(e)){e=this.slashSplit(e)}let t=false;do{t=false;if(!this.preserveMultipleSlashes){for(let r=1;rn){r.splice(n+1,s-n)}let A=r[n+1];const a=r[n+2];const c=r[n+3];if(A!=="..")continue;if(!a||a==="."||a===".."||!c||c==="."||c===".."){continue}t=true;r.splice(n,1);const l=r.slice(0);l[n]="**";e.push(l);n--}if(!this.preserveMultipleSlashes){for(let e=1;ee.length))}partsMatch(e,t,r=false){let n=0;let s=0;let A=[];let a="";while(na){r=r.slice(c)}else if(a>c){e=e.slice(a)}}}}const{optimizationLevel:A=1}=this.options;if(A>=2){e=this.levelTwoFileOptimize(e)}this.debug("matchOne",this,{file:e,pattern:r});this.debug("matchOne",e.length,r.length);for(var a=0,c=0,l=e.length,u=r.length;a>> no match, partial?",e,p,r,C);if(p===l){return true}}return false}let A;if(typeof h==="string"){A=g===h;this.debug("string match",h,g,A)}else{A=h.test(g);this.debug("pattern match",h,g,A)}if(!A)return false}if(a===l&&c===u){return true}else if(a===l){return n}else if(c===u){return a===l-1&&e[a]===""}else{throw new Error("wtf?")}}braceExpand(){return(0,t.braceExpand)(this.pattern,this.options)}parse(e){(0,A.assertValidPattern)(e);const r=this.options;if(e==="**")return t.GLOBSTAR;if(e==="")return"";let n;let s=null;if(n=e.match(p)){s=r.dot?starTestDot:starTest}else if(n=e.match(u)){s=(r.nocase?r.dot?starDotExtTestNocaseDot:starDotExtTestNocase:r.dot?starDotExtTestDot:starDotExtTest)(n[1])}else if(n=e.match(C)){s=(r.nocase?r.dot?qmarksTestNocaseDot:qmarksTestNocase:r.dot?qmarksTestDot:qmarksTest)(n)}else if(n=e.match(h)){s=r.dot?starDotStarTestDot:starDotStarTest}else if(n=e.match(g)){s=dotStarTest}const c=a.AST.fromGlob(e,this.options).toMMPattern();if(s&&typeof c==="object"){Reflect.defineProperty(c,"test",{value:s})}return c}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;const e=this.set;if(!e.length){this.regexp=false;return this.regexp}const r=this.options;const n=r.noglobstar?Q:r.dot?b:w;const s=new Set(r.nocase?["i"]:[]);let A=e.map((e=>{const r=e.map((e=>{if(e instanceof RegExp){for(const t of e.flags.split(""))s.add(t)}return typeof e==="string"?regExpEscape(e):e===t.GLOBSTAR?t.GLOBSTAR:e._src}));r.forEach(((e,s)=>{const A=r[s+1];const a=r[s-1];if(e!==t.GLOBSTAR||a===t.GLOBSTAR){return}if(a===undefined){if(A!==undefined&&A!==t.GLOBSTAR){r[s+1]="(?:\\/|"+n+"\\/)?"+A}else{r[s]=n}}else if(A===undefined){r[s-1]=a+"(?:\\/|"+n+")?"}else if(A!==t.GLOBSTAR){r[s-1]=a+"(?:\\/|\\/"+n+"\\/)"+A;r[s+1]=t.GLOBSTAR}}));return r.filter((e=>e!==t.GLOBSTAR)).join("/")})).join("|");const[a,c]=e.length>1?["(?:",")"]:["",""];A="^"+a+A+c+"$";if(this.negate)A="^(?!"+A+").+$";try{this.regexp=new RegExp(A,[...s].join(""))}catch(e){this.regexp=false}return this.regexp}slashSplit(e){if(this.preserveMultipleSlashes){return e.split("/")}else if(this.isWindows&&/^\/\/[^\/]+/.test(e)){return["",...e.split(/\/+/)]}else{return e.split(/\/+/)}}match(e,t=this.partial){this.debug("match",e,this.pattern);if(this.comment){return false}if(this.empty){return e===""}if(e==="/"&&t){return true}const r=this.options;if(this.isWindows){e=e.split("\\").join("/")}const n=this.slashSplit(e);this.debug(this.pattern,"split",n);const s=this.set;this.debug(this.pattern,"set",s);let A=n[n.length-1];if(!A){for(let e=n.length-2;!A&&e>=0;e--){A=n[e]}}for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.unescape=void 0;const unescape=(e,{windowsPathsNoEscape:t=false}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");t.unescape=unescape},2477:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.LRUCache=void 0;const r=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const n=new Set;const s=typeof process==="object"&&!!process?process:{};const emitWarning=(e,t,r,n)=>{typeof s.emitWarning==="function"?s.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)};let A=globalThis.AbortController;let a=globalThis.AbortSignal;if(typeof A==="undefined"){a=class AbortSignal{onabort;_onabort=[];reason;aborted=false;addEventListener(e,t){this._onabort.push(t)}};A=class AbortController{constructor(){warnACPolyfill()}signal=new a;abort(e){if(this.signal.aborted)return;this.signal.reason=e;this.signal.aborted=true;for(const t of this.signal._onabort){t(e)}this.signal.onabort?.(e)}};let e=s.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const warnACPolyfill=()=>{if(!e)return;e=false;emitWarning("AbortController is not defined. If using lru-cache in "+"node 14, load an AbortController polyfill from the "+"`node-abort-controller` package. A minimal polyfill is "+"provided for use by LRUCache.fetch(), but it should not be "+"relied upon in other contexts (eg, passing it to other APIs that "+"use AbortController/AbortSignal might have undesirable effects). "+"You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",warnACPolyfill)}}const shouldWarn=e=>!n.has(e);const c=Symbol("type");const isPosInt=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e);const getUintArray=e=>!isPosInt(e)?null:e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(e){super(e);this.fill(0)}}class Stack{heap;length;static#De=false;static create(e){const t=getUintArray(e);if(!t)return[];Stack.#De=true;const r=new Stack(e,t);Stack.#De=false;return r}constructor(e,t){if(!Stack.#De){throw new TypeError("instantiate Stack using Stack.create(n)")}this.heap=new t(e);this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class LRUCache{#_e;#Ne;#Te;#Fe;#Le;#Me;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#xe;#Oe;#Ue;#Pe;#Ge;#He;#Ye;#Je;#je;#Ve;#We;#qe;#ze;#Ke;#$e;#Ze;#Xe;static unsafeExposeInternals(e){return{starts:e.#ze,ttls:e.#Ke,sizes:e.#qe,keyMap:e.#Ue,keyList:e.#Pe,valList:e.#Ge,next:e.#He,prev:e.#Ye,get head(){return e.#Je},get tail(){return e.#je},free:e.#Ve,isBackgroundFetch:t=>e.#et(t),backgroundFetch:(t,r,n,s)=>e.#tt(t,r,n,s),moveToTail:t=>e.#rt(t),indexes:t=>e.#nt(t),rindexes:t=>e.#it(t),isStale:t=>e.#st(t)}}get max(){return this.#_e}get maxSize(){return this.#Ne}get calculatedSize(){return this.#Oe}get size(){return this.#xe}get fetchMethod(){return this.#Le}get memoMethod(){return this.#Me}get dispose(){return this.#Te}get disposeAfter(){return this.#Fe}constructor(e){const{max:t=0,ttl:r,ttlResolution:s=1,ttlAutopurge:A,updateAgeOnGet:a,updateAgeOnHas:c,allowStale:l,dispose:u,disposeAfter:h,noDisposeOnSet:g,noUpdateTTL:p,maxSize:C=0,maxEntrySize:y=0,sizeCalculation:I,fetchMethod:B,memoMethod:Q,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:k,ignoreFetchAbort:v}=e;if(t!==0&&!isPosInt(t)){throw new TypeError("max option must be a nonnegative integer")}const R=t?getUintArray(t):Array;if(!R){throw new Error("invalid max value: "+t)}this.#_e=t;this.#Ne=C;this.maxEntrySize=y||this.#Ne;this.sizeCalculation=I;if(this.sizeCalculation){if(!this.#Ne&&!this.maxEntrySize){throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize")}if(typeof this.sizeCalculation!=="function"){throw new TypeError("sizeCalculation set to non-function")}}if(Q!==undefined&&typeof Q!=="function"){throw new TypeError("memoMethod must be a function if defined")}this.#Me=Q;if(B!==undefined&&typeof B!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.#Le=B;this.#Ze=!!B;this.#Ue=new Map;this.#Pe=new Array(t).fill(undefined);this.#Ge=new Array(t).fill(undefined);this.#He=new R(t);this.#Ye=new R(t);this.#Je=0;this.#je=0;this.#Ve=Stack.create(t);this.#xe=0;this.#Oe=0;if(typeof u==="function"){this.#Te=u}if(typeof h==="function"){this.#Fe=h;this.#We=[]}else{this.#Fe=undefined;this.#We=undefined}this.#$e=!!this.#Te;this.#Xe=!!this.#Fe;this.noDisposeOnSet=!!g;this.noUpdateTTL=!!p;this.noDeleteOnFetchRejection=!!b;this.allowStaleOnFetchRejection=!!S;this.allowStaleOnFetchAbort=!!k;this.ignoreFetchAbort=!!v;if(this.maxEntrySize!==0){if(this.#Ne!==0){if(!isPosInt(this.#Ne)){throw new TypeError("maxSize must be a positive integer if specified")}}if(!isPosInt(this.maxEntrySize)){throw new TypeError("maxEntrySize must be a positive integer if specified")}this.#ot()}this.allowStale=!!l;this.noDeleteOnStaleGet=!!w;this.updateAgeOnGet=!!a;this.updateAgeOnHas=!!c;this.ttlResolution=isPosInt(s)||s===0?s:1;this.ttlAutopurge=!!A;this.ttl=r||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.#At()}if(this.#_e===0&&this.ttl===0&&this.#Ne===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.#_e&&!this.#Ne){const e="LRU_CACHE_UNBOUNDED";if(shouldWarn(e)){n.add(e);const t="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";emitWarning(t,"UnboundedCacheWarning",e,LRUCache)}}}getRemainingTTL(e){return this.#Ue.has(e)?Infinity:0}#At(){const e=new ZeroArray(this.#_e);const t=new ZeroArray(this.#_e);this.#Ke=e;this.#ze=t;this.#at=(n,s,A=r.now())=>{t[n]=s!==0?A:0;e[n]=s;if(s!==0&&this.ttlAutopurge){const e=setTimeout((()=>{if(this.#st(n)){this.#ct(this.#Pe[n],"expire")}}),s+1);if(e.unref){e.unref()}}};this.#lt=n=>{t[n]=e[n]!==0?r.now():0};this.#ut=(r,s)=>{if(e[s]){const A=e[s];const a=t[s];if(!A||!a)return;r.ttl=A;r.start=a;r.now=n||getNow();const c=r.now-a;r.remainingTTL=A-c}};let n=0;const getNow=()=>{const e=r.now();if(this.ttlResolution>0){n=e;const t=setTimeout((()=>n=0),this.ttlResolution);if(t.unref){t.unref()}}return e};this.getRemainingTTL=r=>{const s=this.#Ue.get(r);if(s===undefined){return 0}const A=e[s];const a=t[s];if(!A||!a){return Infinity}const c=(n||getNow())-a;return A-c};this.#st=r=>{const s=t[r];const A=e[r];return!!A&&!!s&&(n||getNow())-s>A}}#lt=()=>{};#ut=()=>{};#at=()=>{};#st=()=>false;#ot(){const e=new ZeroArray(this.#_e);this.#Oe=0;this.#qe=e;this.#ht=t=>{this.#Oe-=e[t];e[t]=0};this.#ft=(e,t,r,n)=>{if(this.#et(t)){return 0}if(!isPosInt(r)){if(n){if(typeof n!=="function"){throw new TypeError("sizeCalculation must be a function")}r=n(t,e);if(!isPosInt(r)){throw new TypeError("sizeCalculation return invalid (expect positive integer)")}}else{throw new TypeError("invalid size value (must be positive integer). "+"When maxSize or maxEntrySize is used, sizeCalculation "+"or size must be set.")}}return r};this.#dt=(t,r,n)=>{e[t]=r;if(this.#Ne){const r=this.#Ne-e[t];while(this.#Oe>r){this.#D(true)}}this.#Oe+=e[t];if(n){n.entrySize=r;n.totalCalculatedSize=this.#Oe}}}#ht=e=>{};#dt=(e,t,r)=>{};#ft=(e,t,r,n)=>{if(r||n){throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}return 0};*#nt({allowStale:e=this.allowStale}={}){if(this.#xe){for(let t=this.#je;true;){if(!this.#gt(t)){break}if(e||!this.#st(t)){yield t}if(t===this.#Je){break}else{t=this.#Ye[t]}}}}*#it({allowStale:e=this.allowStale}={}){if(this.#xe){for(let t=this.#Je;true;){if(!this.#gt(t)){break}if(e||!this.#st(t)){yield t}if(t===this.#je){break}else{t=this.#He[t]}}}}#gt(e){return e!==undefined&&this.#Ue.get(this.#Pe[e])===e}*entries(){for(const e of this.#nt()){if(this.#Ge[e]!==undefined&&this.#Pe[e]!==undefined&&!this.#et(this.#Ge[e])){yield[this.#Pe[e],this.#Ge[e]]}}}*rentries(){for(const e of this.#it()){if(this.#Ge[e]!==undefined&&this.#Pe[e]!==undefined&&!this.#et(this.#Ge[e])){yield[this.#Pe[e],this.#Ge[e]]}}}*keys(){for(const e of this.#nt()){const t=this.#Pe[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield t}}}*rkeys(){for(const e of this.#it()){const t=this.#Pe[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield t}}}*values(){for(const e of this.#nt()){const t=this.#Ge[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield this.#Ge[e]}}}*rvalues(){for(const e of this.#it()){const t=this.#Ge[e];if(t!==undefined&&!this.#et(this.#Ge[e])){yield this.#Ge[e]}}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(const r of this.#nt()){const n=this.#Ge[r];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)continue;if(e(s,this.#Pe[r],this)){return this.get(this.#Pe[r],t)}}}forEach(e,t=this){for(const r of this.#nt()){const n=this.#Ge[r];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)continue;e.call(t,s,this.#Pe[r],this)}}rforEach(e,t=this){for(const r of this.#it()){const n=this.#Ge[r];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)continue;e.call(t,s,this.#Pe[r],this)}}purgeStale(){let e=false;for(const t of this.#it({allowStale:true})){if(this.#st(t)){this.#ct(this.#Pe[t],"expire");e=true}}return e}info(e){const t=this.#Ue.get(e);if(t===undefined)return undefined;const n=this.#Ge[t];const s=this.#et(n)?n.__staleWhileFetching:n;if(s===undefined)return undefined;const A={value:s};if(this.#Ke&&this.#ze){const e=this.#Ke[t];const n=this.#ze[t];if(e&&n){const t=e-(r.now()-n);A.ttl=t;A.start=Date.now()}}if(this.#qe){A.size=this.#qe[t]}return A}dump(){const e=[];for(const t of this.#nt({allowStale:true})){const n=this.#Pe[t];const s=this.#Ge[t];const A=this.#et(s)?s.__staleWhileFetching:s;if(A===undefined||n===undefined)continue;const a={value:A};if(this.#Ke&&this.#ze){a.ttl=this.#Ke[t];const e=r.now()-this.#ze[t];a.start=Math.floor(Date.now()-e)}if(this.#qe){a.size=this.#qe[t]}e.unshift([n,a])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}set(e,t,r={}){if(t===undefined){this.delete(e);return this}const{ttl:n=this.ttl,start:s,noDisposeOnSet:A=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=r;let{noUpdateTTL:l=this.noUpdateTTL}=r;const u=this.#ft(e,t,r.size||0,a);if(this.maxEntrySize&&u>this.maxEntrySize){if(c){c.set="miss";c.maxEntrySizeExceeded=true}this.#ct(e,"set");return this}let h=this.#xe===0?undefined:this.#Ue.get(e);if(h===undefined){h=this.#xe===0?this.#je:this.#Ve.length!==0?this.#Ve.pop():this.#xe===this.#_e?this.#D(false):this.#xe;this.#Pe[h]=e;this.#Ge[h]=t;this.#Ue.set(e,h);this.#He[this.#je]=h;this.#Ye[h]=this.#je;this.#je=h;this.#xe++;this.#dt(h,u,c);if(c)c.set="add";l=false}else{this.#rt(h);const r=this.#Ge[h];if(t!==r){if(this.#Ze&&this.#et(r)){r.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=r;if(t!==undefined&&!A){if(this.#$e){this.#Te?.(t,e,"set")}if(this.#Xe){this.#We?.push([t,e,"set"])}}}else if(!A){if(this.#$e){this.#Te?.(r,e,"set")}if(this.#Xe){this.#We?.push([r,e,"set"])}}this.#ht(h);this.#dt(h,u,c);this.#Ge[h]=t;if(c){c.set="replace";const e=r&&this.#et(r)?r.__staleWhileFetching:r;if(e!==undefined)c.oldValue=e}}else if(c){c.set="update"}}if(n!==0&&!this.#Ke){this.#At()}if(this.#Ke){if(!l){this.#at(h,n,s)}if(c)this.#ut(c,h)}if(!A&&this.#Xe&&this.#We){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}return this}pop(){try{while(this.#xe){const e=this.#Ge[this.#Je];this.#D(true);if(this.#et(e)){if(e.__staleWhileFetching){return e.__staleWhileFetching}}else if(e!==undefined){return e}}}finally{if(this.#Xe&&this.#We){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}}}#D(e){const t=this.#Je;const r=this.#Pe[t];const n=this.#Ge[t];if(this.#Ze&&this.#et(n)){n.__abortController.abort(new Error("evicted"))}else if(this.#$e||this.#Xe){if(this.#$e){this.#Te?.(n,r,"evict")}if(this.#Xe){this.#We?.push([n,r,"evict"])}}this.#ht(t);if(e){this.#Pe[t]=undefined;this.#Ge[t]=undefined;this.#Ve.push(t)}if(this.#xe===1){this.#Je=this.#je=0;this.#Ve.length=0}else{this.#Je=this.#He[t]}this.#Ue.delete(r);this.#xe--;return t}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:n}=t;const s=this.#Ue.get(e);if(s!==undefined){const e=this.#Ge[s];if(this.#et(e)&&e.__staleWhileFetching===undefined){return false}if(!this.#st(s)){if(r){this.#lt(s)}if(n){n.has="hit";this.#ut(n,s)}return true}else if(n){n.has="stale";this.#ut(n,s)}}else if(n){n.has="miss"}return false}peek(e,t={}){const{allowStale:r=this.allowStale}=t;const n=this.#Ue.get(e);if(n===undefined||!r&&this.#st(n)){return}const s=this.#Ge[n];return this.#et(s)?s.__staleWhileFetching:s}#tt(e,t,r,n){const s=t===undefined?undefined:this.#Ge[t];if(this.#et(s)){return s}const a=new A;const{signal:c}=r;c?.addEventListener("abort",(()=>a.abort(c.reason)),{signal:a.signal});const l={signal:a.signal,options:r,context:n};const cb=(n,s=false)=>{const{aborted:A}=a.signal;const c=r.ignoreFetchAbort&&n!==undefined;if(r.status){if(A&&!s){r.status.fetchAborted=true;r.status.fetchError=a.signal.reason;if(c)r.status.fetchAbortIgnored=true}else{r.status.fetchResolved=true}}if(A&&!c&&!s){return fetchFail(a.signal.reason)}const h=u;if(this.#Ge[t]===u){if(n===undefined){if(h.__staleWhileFetching){this.#Ge[t]=h.__staleWhileFetching}else{this.#ct(e,"fetch")}}else{if(r.status)r.status.fetchUpdated=true;this.set(e,n,l.options)}}return n};const eb=e=>{if(r.status){r.status.fetchRejected=true;r.status.fetchError=e}return fetchFail(e)};const fetchFail=n=>{const{aborted:s}=a.signal;const A=s&&r.allowStaleOnFetchAbort;const c=A||r.allowStaleOnFetchRejection;const l=c||r.noDeleteOnFetchRejection;const h=u;if(this.#Ge[t]===u){const r=!l||h.__staleWhileFetching===undefined;if(r){this.#ct(e,"fetch")}else if(!A){this.#Ge[t]=h.__staleWhileFetching}}if(c){if(r.status&&h.__staleWhileFetching!==undefined){r.status.returnedStale=true}return h.__staleWhileFetching}else if(h.__returned===h){throw n}};const pcall=(t,n)=>{const A=this.#Le?.(e,s,l);if(A&&A instanceof Promise){A.then((e=>t(e===undefined?undefined:e)),n)}a.signal.addEventListener("abort",(()=>{if(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort){t(undefined);if(r.allowStaleOnFetchAbort){t=e=>cb(e,true)}}}))};if(r.status)r.status.fetchDispatched=true;const u=new Promise(pcall).then(cb,eb);const h=Object.assign(u,{__abortController:a,__staleWhileFetching:s,__returned:undefined});if(t===undefined){this.set(e,h,{...l.options,status:undefined});t=this.#Ue.get(e)}else{this.#Ge[t]=h}return h}#et(e){if(!this.#Ze)return false;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof A}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:A=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:g=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:C=this.allowStaleOnFetchAbort,context:y,forceRefresh:I=false,status:B,signal:Q}=t;if(!this.#Ze){if(B)B.fetch="get";return this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:s,status:B})}const b={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:s,ttl:A,noDisposeOnSet:a,size:c,sizeCalculation:l,noUpdateTTL:u,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:g,allowStaleOnFetchAbort:C,ignoreFetchAbort:p,status:B,signal:Q};let w=this.#Ue.get(e);if(w===undefined){if(B)B.fetch="miss";const t=this.#tt(e,w,b,y);return t.__returned=t}else{const t=this.#Ge[w];if(this.#et(t)){const e=r&&t.__staleWhileFetching!==undefined;if(B){B.fetch="inflight";if(e)B.returnedStale=true}return e?t.__staleWhileFetching:t.__returned=t}const s=this.#st(w);if(!I&&!s){if(B)B.fetch="hit";this.#rt(w);if(n){this.#lt(w)}if(B)this.#ut(B,w);return t}const A=this.#tt(e,w,b,y);const a=A.__staleWhileFetching!==undefined;const c=a&&r;if(B){B.fetch=s?"stale":"refresh";if(c&&s)B.returnedStale=true}return c?A.__staleWhileFetching:A.__returned=A}}async forceFetch(e,t={}){const r=await this.fetch(e,t);if(r===undefined)throw new Error("fetch() returned undefined");return r}memo(e,t={}){const r=this.#Me;if(!r){throw new Error("no memoMethod provided to constructor")}const{context:n,forceRefresh:s,...A}=t;const a=this.get(e,A);if(!s&&a!==undefined)return a;const c=r(e,a,{options:A,context:n});this.set(e,c,A);return c}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:A}=t;const a=this.#Ue.get(e);if(a!==undefined){const t=this.#Ge[a];const c=this.#et(t);if(A)this.#ut(A,a);if(this.#st(a)){if(A)A.get="stale";if(!c){if(!s){this.#ct(e,"expire")}if(A&&r)A.returnedStale=true;return r?t:undefined}else{if(A&&r&&t.__staleWhileFetching!==undefined){A.returnedStale=true}return r?t.__staleWhileFetching:undefined}}else{if(A)A.get="hit";if(c){return t.__staleWhileFetching}this.#rt(a);if(n){this.#lt(a)}return t}}else if(A){A.get="miss"}}#pt(e,t){this.#Ye[t]=e;this.#He[e]=t}#rt(e){if(e!==this.#je){if(e===this.#Je){this.#Je=this.#He[e]}else{this.#pt(this.#Ye[e],this.#He[e])}this.#pt(this.#je,e);this.#je=e}}delete(e){return this.#ct(e,"delete")}#ct(e,t){let r=false;if(this.#xe!==0){const n=this.#Ue.get(e);if(n!==undefined){r=true;if(this.#xe===1){this.#Et(t)}else{this.#ht(n);const r=this.#Ge[n];if(this.#et(r)){r.__abortController.abort(new Error("deleted"))}else if(this.#$e||this.#Xe){if(this.#$e){this.#Te?.(r,e,t)}if(this.#Xe){this.#We?.push([r,e,t])}}this.#Ue.delete(e);this.#Pe[n]=undefined;this.#Ge[n]=undefined;if(n===this.#je){this.#je=this.#Ye[n]}else if(n===this.#Je){this.#Je=this.#He[n]}else{const e=this.#Ye[n];this.#He[e]=this.#He[n];const t=this.#He[n];this.#Ye[t]=this.#Ye[n]}this.#xe--;this.#Ve.push(n)}}}if(this.#Xe&&this.#We?.length){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}return r}clear(){return this.#Et("delete")}#Et(e){for(const t of this.#it({allowStale:true})){const r=this.#Ge[t];if(this.#et(r)){r.__abortController.abort(new Error("deleted"))}else{const n=this.#Pe[t];if(this.#$e){this.#Te?.(r,n,e)}if(this.#Xe){this.#We?.push([r,n,e])}}}this.#Ue.clear();this.#Ge.fill(undefined);this.#Pe.fill(undefined);if(this.#Ke&&this.#ze){this.#Ke.fill(0);this.#ze.fill(0)}if(this.#qe){this.#qe.fill(0)}this.#Je=0;this.#je=0;this.#Ve.length=0;this.#Oe=0;this.#xe=0;if(this.#Xe&&this.#We){const e=this.#We;let t;while(t=e?.shift()){this.#Fe?.(...t)}}}}t.LRUCache=LRUCache},8275:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.Minipass=t.isWritable=t.isReadable=t.isStream=void 0;const s=typeof process==="object"&&process?process:{stdout:null,stderr:null};const A=r(8474);const a=n(r(7075));const c=r(6193);const isStream=e=>!!e&&typeof e==="object"&&(e instanceof Minipass||e instanceof a.default||(0,t.isReadable)(e)||(0,t.isWritable)(e));t.isStream=isStream;const isReadable=e=>!!e&&typeof e==="object"&&e instanceof A.EventEmitter&&typeof e.pipe==="function"&&e.pipe!==a.default.Writable.prototype.pipe;t.isReadable=isReadable;const isWritable=e=>!!e&&typeof e==="object"&&e instanceof A.EventEmitter&&typeof e.write==="function"&&typeof e.end==="function";t.isWritable=isWritable;const l=Symbol("EOF");const u=Symbol("maybeEmitEnd");const h=Symbol("emittedEnd");const g=Symbol("emittingEnd");const p=Symbol("emittedError");const C=Symbol("closed");const y=Symbol("read");const I=Symbol("flush");const B=Symbol("flushChunk");const Q=Symbol("encoding");const b=Symbol("decoder");const w=Symbol("flowing");const S=Symbol("paused");const k=Symbol("resume");const v=Symbol("buffer");const R=Symbol("pipes");const D=Symbol("bufferLength");const _=Symbol("bufferPush");const N=Symbol("bufferShift");const T=Symbol("objectMode");const F=Symbol("destroyed");const L=Symbol("error");const M=Symbol("emitData");const x=Symbol("emitEnd");const O=Symbol("emitEnd2");const U=Symbol("async");const P=Symbol("abort");const G=Symbol("aborted");const H=Symbol("signal");const Y=Symbol("dataListeners");const J=Symbol("discarded");const defer=e=>Promise.resolve().then(e);const nodefer=e=>e();const isEndish=e=>e==="end"||e==="finish"||e==="prefinish";const isArrayBufferLike=e=>e instanceof ArrayBuffer||!!e&&typeof e==="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0;const isArrayBufferView=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e);class Pipe{src;dest;opts;ondrain;constructor(e,t,r){this.src=e;this.dest=t;this.opts=r;this.ondrain=()=>e[k]();this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(e,t,r){super(e,t,r);this.proxyErrors=e=>t.emit("error",e);e.on("error",this.proxyErrors)}}const isObjectModeOptions=e=>!!e.objectMode;const isEncodingOptions=e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer";class Minipass extends A.EventEmitter{[w]=false;[S]=false;[R]=[];[v]=[];[T];[Q];[U];[b];[l]=false;[h]=false;[g]=false;[C]=false;[p]=null;[D]=0;[F]=false;[H];[G]=false;[Y]=0;[J]=false;writable=true;readable=true;constructor(...e){const t=e[0]||{};super();if(t.objectMode&&typeof t.encoding==="string"){throw new TypeError("Encoding and objectMode may not be used together")}if(isObjectModeOptions(t)){this[T]=true;this[Q]=null}else if(isEncodingOptions(t)){this[Q]=t.encoding;this[T]=false}else{this[T]=false;this[Q]=null}this[U]=!!t.async;this[b]=this[Q]?new c.StringDecoder(this[Q]):null;if(t&&t.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[v]})}if(t&&t.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[R]})}const{signal:r}=t;if(r){this[H]=r;if(r.aborted){this[P]()}else{r.addEventListener("abort",(()=>this[P]()))}}}get bufferLength(){return this[D]}get encoding(){return this[Q]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[T]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[U]}set["async"](e){this[U]=this[U]||!!e}[P](){this[G]=true;this.emit("abort",this[H]?.reason);this.destroy(this[H]?.reason)}get aborted(){return this[G]}set aborted(e){}write(e,t,r){if(this[G])return false;if(this[l])throw new Error("write after end");if(this[F]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof t==="function"){r=t;t="utf8"}if(!t)t="utf8";const n=this[U]?defer:nodefer;if(!this[T]&&!Buffer.isBuffer(e)){if(isArrayBufferView(e)){e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(isArrayBufferLike(e)){e=Buffer.from(e)}else if(typeof e!=="string"){throw new Error("Non-contiguous data written to non-objectMode stream")}}if(this[T]){if(this[w]&&this[D]!==0)this[I](true);if(this[w])this.emit("data",e);else this[_](e);if(this[D]!==0)this.emit("readable");if(r)n(r);return this[w]}if(!e.length){if(this[D]!==0)this.emit("readable");if(r)n(r);return this[w]}if(typeof e==="string"&&!(t===this[Q]&&!this[b]?.lastNeed)){e=Buffer.from(e,t)}if(Buffer.isBuffer(e)&&this[Q]){e=this[b].write(e)}if(this[w]&&this[D]!==0)this[I](true);if(this[w])this.emit("data",e);else this[_](e);if(this[D]!==0)this.emit("readable");if(r)n(r);return this[w]}read(e){if(this[F])return null;this[J]=false;if(this[D]===0||e===0||e&&e>this[D]){this[u]();return null}if(this[T])e=null;if(this[v].length>1&&!this[T]){this[v]=[this[Q]?this[v].join(""):Buffer.concat(this[v],this[D])]}const t=this[y](e||null,this[v][0]);this[u]();return t}[y](e,t){if(this[T])this[N]();else{const r=t;if(e===r.length||e===null)this[N]();else if(typeof r==="string"){this[v][0]=r.slice(e);t=r.slice(0,e);this[D]-=e}else{this[v][0]=r.subarray(e);t=r.subarray(0,e);this[D]-=e}}this.emit("data",t);if(!this[v].length&&!this[l])this.emit("drain");return t}end(e,t,r){if(typeof e==="function"){r=e;e=undefined}if(typeof t==="function"){r=t;t="utf8"}if(e!==undefined)this.write(e,t);if(r)this.once("end",r);this[l]=true;this.writable=false;if(this[w]||!this[S])this[u]();return this}[k](){if(this[F])return;if(!this[Y]&&!this[R].length){this[J]=true}this[S]=false;this[w]=true;this.emit("resume");if(this[v].length)this[I]();else if(this[l])this[u]();else this.emit("drain")}resume(){return this[k]()}pause(){this[w]=false;this[S]=true;this[J]=false}get destroyed(){return this[F]}get flowing(){return this[w]}get paused(){return this[S]}[_](e){if(this[T])this[D]+=1;else this[D]+=e.length;this[v].push(e)}[N](){if(this[T])this[D]-=1;else this[D]-=this[v][0].length;return this[v].shift()}[I](e=false){do{}while(this[B](this[N]())&&this[v].length);if(!e&&!this[v].length&&!this[l])this.emit("drain")}[B](e){this.emit("data",e);return this[w]}pipe(e,t){if(this[F])return e;this[J]=false;const r=this[h];t=t||{};if(e===s.stdout||e===s.stderr)t.end=false;else t.end=t.end!==false;t.proxyErrors=!!t.proxyErrors;if(r){if(t.end)e.end()}else{this[R].push(!t.proxyErrors?new Pipe(this,e,t):new PipeProxyErrors(this,e,t));if(this[U])defer((()=>this[k]()));else this[k]()}return e}unpipe(e){const t=this[R].find((t=>t.dest===e));if(t){if(this[R].length===1){if(this[w]&&this[Y]===0){this[w]=false}this[R]=[]}else this[R].splice(this[R].indexOf(t),1);t.unpipe()}}addListener(e,t){return this.on(e,t)}on(e,t){const r=super.on(e,t);if(e==="data"){this[J]=false;this[Y]++;if(!this[R].length&&!this[w]){this[k]()}}else if(e==="readable"&&this[D]!==0){super.emit("readable")}else if(isEndish(e)&&this[h]){super.emit(e);this.removeAllListeners(e)}else if(e==="error"&&this[p]){const e=t;if(this[U])defer((()=>e.call(this,this[p])));else e.call(this,this[p])}return r}removeListener(e,t){return this.off(e,t)}off(e,t){const r=super.off(e,t);if(e==="data"){this[Y]=this.listeners("data").length;if(this[Y]===0&&!this[J]&&!this[R].length){this[w]=false}}return r}removeAllListeners(e){const t=super.removeAllListeners(e);if(e==="data"||e===undefined){this[Y]=0;if(!this[J]&&!this[R].length){this[w]=false}}return t}get emittedEnd(){return this[h]}[u](){if(!this[g]&&!this[h]&&!this[F]&&this[v].length===0&&this[l]){this[g]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[C])this.emit("close");this[g]=false}}emit(e,...t){const r=t[0];if(e!=="error"&&e!=="close"&&e!==F&&this[F]){return false}else if(e==="data"){return!this[T]&&!r?false:this[U]?(defer((()=>this[M](r))),true):this[M](r)}else if(e==="end"){return this[x]()}else if(e==="close"){this[C]=true;if(!this[h]&&!this[F])return false;const e=super.emit("close");this.removeAllListeners("close");return e}else if(e==="error"){this[p]=r;super.emit(L,r);const e=!this[H]||this.listeners("error").length?super.emit("error",r):false;this[u]();return e}else if(e==="resume"){const e=super.emit("resume");this[u]();return e}else if(e==="finish"||e==="prefinish"){const t=super.emit(e);this.removeAllListeners(e);return t}const n=super.emit(e,...t);this[u]();return n}[M](e){for(const t of this[R]){if(t.dest.write(e)===false)this.pause()}const t=this[J]?false:super.emit("data",e);this[u]();return t}[x](){if(this[h])return false;this[h]=true;this.readable=false;return this[U]?(defer((()=>this[O]())),true):this[O]()}[O](){if(this[b]){const e=this[b].end();if(e){for(const t of this[R]){t.dest.write(e)}if(!this[J])super.emit("data",e)}}for(const e of this[R]){e.end()}const e=super.emit("end");this.removeAllListeners("end");return e}async collect(){const e=Object.assign([],{dataLength:0});if(!this[T])e.dataLength=0;const t=this.promise();this.on("data",(t=>{e.push(t);if(!this[T])e.dataLength+=t.length}));await t;return e}async concat(){if(this[T]){throw new Error("cannot concat in objectMode")}const e=await this.collect();return this[Q]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise(((e,t)=>{this.on(F,(()=>t(new Error("stream destroyed"))));this.on("error",(e=>t(e)));this.on("end",(()=>e()))}))}[Symbol.asyncIterator](){this[J]=false;let e=false;const stop=async()=>{this.pause();e=true;return{value:undefined,done:true}};const next=()=>{if(e)return stop();const t=this.read();if(t!==null)return Promise.resolve({done:false,value:t});if(this[l])return stop();let r;let n;const onerr=e=>{this.off("data",ondata);this.off("end",onend);this.off(F,ondestroy);stop();n(e)};const ondata=e=>{this.off("error",onerr);this.off("end",onend);this.off(F,ondestroy);this.pause();r({value:e,done:!!this[l]})};const onend=()=>{this.off("error",onerr);this.off("data",ondata);this.off(F,ondestroy);stop();r({done:true,value:undefined})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((e,t)=>{n=t;r=e;this.once(F,ondestroy);this.once("error",onerr);this.once("end",onend);this.once("data",ondata)}))};return{next:next,throw:stop,return:stop,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[J]=false;let e=false;const stop=()=>{this.pause();this.off(L,stop);this.off(F,stop);this.off("end",stop);e=true;return{done:true,value:undefined}};const next=()=>{if(e)return stop();const t=this.read();return t===null?stop():{done:false,value:t}};this.once("end",stop);this.once(L,stop);this.once(F,stop);return{next:next,throw:stop,return:stop,[Symbol.iterator](){return this}}}destroy(e){if(this[F]){if(e)this.emit("error",e);else this.emit(F);return this}this[F]=true;this[J]=true;this[v].length=0;this[D]=0;const t=this;if(typeof t.close==="function"&&!this[C])t.close();if(e)this.emit("error",e);else this.emit(F);return this}static get isStream(){return t.isStream}}t.Minipass=Minipass},8958:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var A=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.PathScurry=t.Path=t.PathScurryDarwin=t.PathScurryPosix=t.PathScurryWin32=t.PathScurryBase=t.PathPosix=t.PathWin32=t.PathBase=t.ChildrenCache=t.ResolveCache=void 0;const a=r(2477);const c=r(6760);const l=r(3136);const u=r(9896);const h=A(r(3024));const g=u.realpathSync.native;const p=r(1455);const C=r(8275);const y={lstatSync:u.lstatSync,readdir:u.readdir,readdirSync:u.readdirSync,readlinkSync:u.readlinkSync,realpathSync:g,promises:{lstat:p.lstat,readdir:p.readdir,readlink:p.readlink,realpath:p.realpath}};const fsFromOption=e=>!e||e===y||e===h?y:{...y,...e,promises:{...y.promises,...e.promises||{}}};const I=/^\\\\\?\\([a-z]:)\\?$/i;const uncToDrive=e=>e.replace(/\//g,"\\").replace(I,"$1\\");const B=/[\\\/]/;const Q=0;const b=1;const w=2;const S=4;const k=6;const v=8;const R=10;const D=12;const _=15;const N=~_;const T=16;const F=32;const L=64;const M=128;const x=256;const O=512;const U=L|M|O;const P=1023;const entToType=e=>e.isFile()?v:e.isDirectory()?S:e.isSymbolicLink()?R:e.isCharacterDevice()?w:e.isBlockDevice()?k:e.isSocket()?D:e.isFIFO()?b:Q;const G=new Map;const normalize=e=>{const t=G.get(e);if(t)return t;const r=e.normalize("NFKD");G.set(e,r);return r};const H=new Map;const normalizeNocase=e=>{const t=H.get(e);if(t)return t;const r=normalize(e.toLowerCase());H.set(e,r);return r};class ResolveCache extends a.LRUCache{constructor(){super({max:256})}}t.ResolveCache=ResolveCache;class ChildrenCache extends a.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:e=>e.length+1})}}t.ChildrenCache=ChildrenCache;const Y=Symbol("PathScurry setAsCwd");class PathBase{name;root;roots;parent;nocase;isCWD=false;#Ct;#yt;get dev(){return this.#yt}#It;get mode(){return this.#It}#Bt;get nlink(){return this.#Bt}#Qt;get uid(){return this.#Qt}#mt;get gid(){return this.#mt}#bt;get rdev(){return this.#bt}#wt;get blksize(){return this.#wt}#St;get ino(){return this.#St}#xe;get size(){return this.#xe}#kt;get blocks(){return this.#kt}#vt;get atimeMs(){return this.#vt}#Rt;get mtimeMs(){return this.#Rt}#Dt;get ctimeMs(){return this.#Dt}#_t;get birthtimeMs(){return this.#_t}#Nt;get atime(){return this.#Nt}#Tt;get mtime(){return this.#Tt}#Ft;get ctime(){return this.#Ft}#Lt;get birthtime(){return this.#Lt}#Mt;#xt;#Ot;#Ut;#Pt;#Gt;#Ht;#Yt;#Jt;#jt;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Q,r,n,s,A,a){this.name=e;this.#Mt=s?normalizeNocase(e):normalize(e);this.#Ht=t&P;this.nocase=s;this.roots=n;this.root=r||this;this.#Yt=A;this.#Ot=a.fullpath;this.#Pt=a.relative;this.#Gt=a.relativePosix;this.parent=a.parent;if(this.parent){this.#Ct=this.parent.#Ct}else{this.#Ct=fsFromOption(a.fs)}}depth(){if(this.#xt!==undefined)return this.#xt;if(!this.parent)return this.#xt=0;return this.#xt=this.parent.depth()+1}childrenCache(){return this.#Yt}resolve(e){if(!e){return this}const t=this.getRootString(e);const r=e.substring(t.length);const n=r.split(this.splitSep);const s=t?this.getRoot(t).#Vt(n):this.#Vt(n);return s}#Vt(e){let t=this;for(const r of e){t=t.child(r)}return t}children(){const e=this.#Yt.get(this);if(e){return e}const t=Object.assign([],{provisional:0});this.#Yt.set(this,t);this.#Ht&=~T;return t}child(e,t){if(e===""||e==="."){return this}if(e===".."){return this.parent||this}const r=this.children();const n=this.nocase?normalizeNocase(e):normalize(e);for(const e of r){if(e.#Mt===n){return e}}const s=this.parent?this.sep:"";const A=this.#Ot?this.#Ot+s+e:undefined;const a=this.newChild(e,Q,{...t,parent:this,fullpath:A});if(!this.canReaddir()){a.#Ht|=M}r.push(a);return a}relative(){if(this.isCWD)return"";if(this.#Pt!==undefined){return this.#Pt}const e=this.name;const t=this.parent;if(!t){return this.#Pt=this.name}const r=t.relative();return r+(!r||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#Gt!==undefined)return this.#Gt;const e=this.name;const t=this.parent;if(!t){return this.#Gt=this.fullpathPosix()}const r=t.relativePosix();return r+(!r||!t.parent?"":"/")+e}fullpath(){if(this.#Ot!==undefined){return this.#Ot}const e=this.name;const t=this.parent;if(!t){return this.#Ot=this.name}const r=t.fullpath();const n=r+(!t.parent?"":this.sep)+e;return this.#Ot=n}fullpathPosix(){if(this.#Ut!==undefined)return this.#Ut;if(this.sep==="/")return this.#Ut=this.fullpath();if(!this.parent){const e=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(e)){return this.#Ut=`//?/${e}`}else{return this.#Ut=e}}const e=this.parent;const t=e.fullpathPosix();const r=t+(!t||!e.parent?"":"/")+this.name;return this.#Ut=r}isUnknown(){return(this.#Ht&_)===Q}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#Ht&_)===v}isDirectory(){return(this.#Ht&_)===S}isCharacterDevice(){return(this.#Ht&_)===w}isBlockDevice(){return(this.#Ht&_)===k}isFIFO(){return(this.#Ht&_)===b}isSocket(){return(this.#Ht&_)===D}isSymbolicLink(){return(this.#Ht&R)===R}lstatCached(){return this.#Ht&F?this:undefined}readlinkCached(){return this.#Jt}realpathCached(){return this.#jt}readdirCached(){const e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#Jt)return true;if(!this.parent)return false;const e=this.#Ht&_;return!(e!==Q&&e!==R||this.#Ht&x||this.#Ht&M)}calledReaddir(){return!!(this.#Ht&T)}isENOENT(){return!!(this.#Ht&M)}isNamed(e){return!this.nocase?this.#Mt===normalize(e):this.#Mt===normalizeNocase(e)}async readlink(){const e=this.#Jt;if(e){return e}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const e=await this.#Ct.promises.readlink(this.fullpath());const t=(await this.parent.realpath())?.resolve(e);if(t){return this.#Jt=t}}catch(e){this.#Wt(e.code);return undefined}}readlinkSync(){const e=this.#Jt;if(e){return e}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const e=this.#Ct.readlinkSync(this.fullpath());const t=this.parent.realpathSync()?.resolve(e);if(t){return this.#Jt=t}}catch(e){this.#Wt(e.code);return undefined}}#qt(e){this.#Ht|=T;for(let t=e.provisional;tt(null,e)))}readdirCB(e,t=false){if(!this.canReaddir()){if(t)e(null,[]);else queueMicrotask((()=>e(null,[])));return}const r=this.children();if(this.calledReaddir()){const n=r.slice(0,r.provisional);if(t)e(null,n);else queueMicrotask((()=>e(null,n)));return}this.#or.push(e);if(this.#Ar){return}this.#Ar=true;const n=this.fullpath();this.#Ct.readdir(n,{withFileTypes:true},((e,t)=>{if(e){this.#Xt(e.code);r.provisional=0}else{for(const e of t){this.#tr(e,r)}this.#qt(r)}this.#ar(r.slice(0,r.provisional));return}))}#cr;async readdir(){if(!this.canReaddir()){return[]}const e=this.children();if(this.calledReaddir()){return e.slice(0,e.provisional)}const t=this.fullpath();if(this.#cr){await this.#cr}else{let resolve=()=>{};this.#cr=new Promise((e=>resolve=e));try{for(const r of await this.#Ct.promises.readdir(t,{withFileTypes:true})){this.#tr(r,e)}this.#qt(e)}catch(t){this.#Xt(t.code);e.provisional=0}this.#cr=undefined;resolve()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir()){return[]}const e=this.children();if(this.calledReaddir()){return e.slice(0,e.provisional)}const t=this.fullpath();try{for(const r of this.#Ct.readdirSync(t,{withFileTypes:true})){this.#tr(r,e)}this.#qt(e)}catch(t){this.#Xt(t.code);e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#Ht&U)return false;const e=_&this.#Ht;if(!(e===Q||e===S||e===R)){return false}return true}shouldWalk(e,t){return(this.#Ht&S)===S&&!(this.#Ht&U)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#jt)return this.#jt;if((O|x|M)&this.#Ht)return undefined;try{const e=await this.#Ct.promises.realpath(this.fullpath());return this.#jt=this.resolve(e)}catch(e){this.#$t()}}realpathSync(){if(this.#jt)return this.#jt;if((O|x|M)&this.#Ht)return undefined;try{const e=this.#Ct.realpathSync(this.fullpath());return this.#jt=this.resolve(e)}catch(e){this.#$t()}}[Y](e){if(e===this)return;e.isCWD=false;this.isCWD=true;const t=new Set([]);let r=[];let n=this;while(n&&n.parent){t.add(n);n.#Pt=r.join(this.sep);n.#Gt=r.join("/");n=n.parent;r.push("..")}n=e;while(n&&n.parent&&!t.has(n)){n.#Pt=undefined;n.#Gt=undefined;n=n.parent}}}t.PathBase=PathBase;class PathWin32 extends PathBase{sep="\\";splitSep=B;constructor(e,t=Q,r,n,s,A,a){super(e,t,r,n,s,A,a)}newChild(e,t=Q,r={}){return new PathWin32(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return c.win32.parse(e).root}getRoot(e){e=uncToDrive(e.toUpperCase());if(e===this.root.name){return this.root}for(const[t,r]of Object.entries(this.roots)){if(this.sameRoot(e,t)){return this.roots[e]=r}}return this.roots[e]=new PathScurryWin32(e,this).root}sameRoot(e,t=this.root.name){e=e.toUpperCase().replace(/\//g,"\\").replace(I,"$1\\");return e===t}}t.PathWin32=PathWin32;class PathPosix extends PathBase{splitSep="/";sep="/";constructor(e,t=Q,r,n,s,A,a){super(e,t,r,n,s,A,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Q,r={}){return new PathPosix(e,t,this.root,this.roots,this.nocase,this.childrenCache(),r)}}t.PathPosix=PathPosix;class PathScurryBase{root;rootPath;roots;cwd;#lr;#ur;#Yt;nocase;#Ct;constructor(e=process.cwd(),t,r,{nocase:n,childrenCacheSize:s=16*1024,fs:A=y}={}){this.#Ct=fsFromOption(A);if(e instanceof URL||e.startsWith("file://")){e=(0,l.fileURLToPath)(e)}const a=t.resolve(e);this.roots=Object.create(null);this.rootPath=this.parseRootPath(a);this.#lr=new ResolveCache;this.#ur=new ResolveCache;this.#Yt=new ChildrenCache(s);const c=a.substring(this.rootPath.length).split(r);if(c.length===1&&!c[0]){c.pop()}if(n===undefined){throw new TypeError("must provide nocase setting to PathScurryBase ctor")}this.nocase=n;this.root=this.newRoot(this.#Ct);this.roots[this.rootPath]=this.root;let u=this.root;let h=c.length-1;const g=t.sep;let p=this.rootPath;let C=false;for(const e of c){const t=h--;u=u.child(e,{relative:new Array(t).fill("..").join(g),relativePosix:new Array(t).fill("..").join("/"),fullpath:p+=(C?"":g)+e});C=true}this.cwd=u}depth(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.depth()}childrenCache(){return this.#Yt}resolve(...e){let t="";for(let r=e.length-1;r>=0;r--){const n=e[r];if(!n||n===".")continue;t=t?`${n}/${t}`:n;if(this.isAbsolute(n)){break}}const r=this.#lr.get(t);if(r!==undefined){return r}const n=this.cwd.resolve(t).fullpath();this.#lr.set(t,n);return n}resolvePosix(...e){let t="";for(let r=e.length-1;r>=0;r--){const n=e[r];if(!n||n===".")continue;t=t?`${n}/${t}`:n;if(this.isAbsolute(n)){break}}const r=this.#ur.get(t);if(r!==undefined){return r}const n=this.cwd.resolve(t).fullpathPosix();this.#ur.set(t,n);return n}relative(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.relative()}relativePosix(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.relativePosix()}basename(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.name}dirname(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:true}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r}=t;if(!e.canReaddir()){return[]}else{const t=await e.readdir();return r?t:t.map((e=>e.name))}}readdirSync(e=this.cwd,t={withFileTypes:true}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true}=t;if(!e.canReaddir()){return[]}else if(r){return e.readdirSync()}else{return e.readdirSync().map((e=>e.name))}}async lstat(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.lstat()}lstatSync(e=this.cwd){if(typeof e==="string"){e=this.cwd.resolve(e)}return e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=await e.readlink();return t?r:r?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=e.readlinkSync();return t?r:r?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=await e.realpath();return t?r:r?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:false}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e.withFileTypes;e=this.cwd}const r=e.realpathSync();return t?r:r?.fullpath()}async walk(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=[];if(!s||s(e)){a.push(r?e:e.fullpath())}const c=new Set;const walk=(e,t)=>{c.add(e);e.readdirCB(((e,l)=>{if(e){return t(e)}let u=l.length;if(!u)return t();const next=()=>{if(--u===0){t()}};for(const e of l){if(!s||s(e)){a.push(r?e:e.fullpath())}if(n&&e.isSymbolicLink()){e.realpath().then((e=>e?.isUnknown()?e.lstat():e)).then((e=>e?.shouldWalk(c,A)?walk(e,next):next()))}else{if(e.shouldWalk(c,A)){walk(e,next)}else{next()}}}}),true)};const l=e;return new Promise(((e,t)=>{walk(l,(r=>{if(r)return t(r);e(a)}))}))}walkSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=[];if(!s||s(e)){a.push(r?e:e.fullpath())}const c=new Set([e]);for(const e of c){const t=e.readdirSync();for(const e of t){if(!s||s(e)){a.push(r?e:e.fullpath())}let t=e;if(e.isSymbolicLink()){if(!(n&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(c,A)){c.add(t)}}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}return this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;if(!s||s(e)){yield r?e:e.fullpath()}const a=new Set([e]);for(const e of a){const t=e.readdirSync();for(const e of t){if(!s||s(e)){yield r?e:e.fullpath()}let t=e;if(e.isSymbolicLink()){if(!(n&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(a,A)){a.add(t)}}}}stream(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=new C.Minipass({objectMode:true});if(!s||s(e)){a.write(r?e:e.fullpath())}const c=new Set;const l=[e];let u=0;const process=()=>{let e=false;while(!e){const t=l.shift();if(!t){if(u===0)a.end();return}u++;c.add(t);const onReaddir=(t,g,p=false)=>{if(t)return a.emit("error",t);if(n&&!p){const e=[];for(const t of g){if(t.isSymbolicLink()){e.push(t.realpath().then((e=>e?.isUnknown()?e.lstat():e)))}}if(e.length){Promise.all(e).then((()=>onReaddir(null,g,true)));return}}for(const t of g){if(t&&(!s||s(t))){if(!a.write(r?t:t.fullpath())){e=true}}}u--;for(const e of g){const t=e.realpathCached()||e;if(t.shouldWalk(c,A)){l.push(t)}}if(e&&!a.flowing){a.once("drain",process)}else if(!h){process()}};let h=true;t.readdirCB(onReaddir,true);h=false}};process();return a}streamSync(e=this.cwd,t={}){if(typeof e==="string"){e=this.cwd.resolve(e)}else if(!(e instanceof PathBase)){t=e;e=this.cwd}const{withFileTypes:r=true,follow:n=false,filter:s,walkFilter:A}=t;const a=new C.Minipass({objectMode:true});const c=new Set;if(!s||s(e)){a.write(r?e:e.fullpath())}const l=[e];let u=0;const process=()=>{let e=false;while(!e){const t=l.shift();if(!t){if(u===0)a.end();return}u++;c.add(t);const h=t.readdirSync();for(const t of h){if(!s||s(t)){if(!a.write(r?t:t.fullpath())){e=true}}}u--;for(const e of h){let t=e;if(e.isSymbolicLink()){if(!(n&&(t=e.realpathSync())))continue;if(t.isUnknown())t.lstatSync()}if(t.shouldWalk(c,A)){l.push(t)}}}if(e&&!a.flowing)a.once("drain",process)};process();return a}chdir(e=this.cwd){const t=this.cwd;this.cwd=typeof e==="string"?this.cwd.resolve(e):e;this.cwd[Y](t)}}t.PathScurryBase=PathScurryBase;class PathScurryWin32 extends PathScurryBase{sep="\\";constructor(e=process.cwd(),t={}){const{nocase:r=true}=t;super(e,c.win32,"\\",{...t,nocase:r});this.nocase=r;for(let e=this.cwd;e;e=e.parent){e.nocase=this.nocase}}parseRootPath(e){return c.win32.parse(e).root.toUpperCase()}newRoot(e){return new PathWin32(this.rootPath,S,undefined,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}}t.PathScurryWin32=PathScurryWin32;class PathScurryPosix extends PathScurryBase{sep="/";constructor(e=process.cwd(),t={}){const{nocase:r=false}=t;super(e,c.posix,"/",{...t,nocase:r});this.nocase=r}parseRootPath(e){return"/"}newRoot(e){return new PathPosix(this.rootPath,S,undefined,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}}t.PathScurryPosix=PathScurryPosix;class PathScurryDarwin extends PathScurryPosix{constructor(e=process.cwd(),t={}){const{nocase:r=true}=t;super(e,{...t,nocase:r})}}t.PathScurryDarwin=PathScurryDarwin;t.Path=process.platform==="win32"?PathWin32:PathPosix;t.PathScurry=process.platform==="win32"?PathScurryWin32:process.platform==="darwin"?PathScurryDarwin:PathScurryPosix},4928:e=>{"use strict";function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}const t=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function ensureBuffer(e){if(Buffer.isBuffer(e)){return e}if(typeof e==="number"){return Buffer.alloc(e)}else if(typeof e==="string"){return Buffer.from(e)}else{throw new Error("input must be buffer, number, or string, received "+typeof e)}}function bufferizeInt(e){const t=ensureBuffer(4);t.writeInt32BE(e,0);return t}function _crc32(e,r){e=ensureBuffer(e);if(Buffer.isBuffer(r)){r=r.readUInt32BE(0)}let n=~~r^-1;for(var s=0;s>>8}return n^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.apply(null,arguments)};crc32.unsigned=function(){return _crc32.apply(null,arguments)>>>0};var r=crc32;const n=getDefaultExportFromCjs(r);e.exports=n},8823:(e,t,r)=>{"use strict";const n=r(6495);e.exports={pkg:n}},5470:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.USER_AGENT=t.PRODUCT_NAME=t.pkg=void 0;const n=r(6066);t.pkg=n;const s="google-api-nodejs-client";t.PRODUCT_NAME=s;const A=`${s}/${n.version}`;t.USER_AGENT=A},920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GoogleToken=void 0;var n=_interopRequireWildcard(r(9896));var s=r(7842);var A=_interopRequireWildcard(r(3324));var a=_interopRequireWildcard(r(6928));var c=r(9023);function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var s,A,a={__proto__:null,default:e};if(null===e||"object"!=_typeof(e)&&"function"!=typeof e)return a;if(s=t?n:r){if(s.has(e))return s.get(e);s.set(e,a)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((A=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(A.get||A.set)?s(a,c,A):a[c]=e[c]);return a})(e,t)}function _typeof(e){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _classPrivateMethodInitSpec(e,t){_checkPrivateRedeclaration(e,t),t.add(e)}function _classPrivateFieldInitSpec(e,t,r){_checkPrivateRedeclaration(e,t),t.set(e,r)}function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(e,t,r){return e.set(_assertClassBrand(e,t),r),r}function _classPrivateFieldGet(e,t){return e.get(_assertClassBrand(e,t))}function _assertClassBrand(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function _defineProperties(e,t){for(var r=0;r3?(s=y===n)&&(l=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=e):a[0]<=C&&((s=r<2&&Cn||n>y)&&(a[4]=r,a[5]=n,p.n=y,c=0))}if(s||r>1)return A;throw g=!0,n}return function(s,h,C){if(u>1)throw TypeError("Generator is already running");for(g&&1===h&&d(h,C),c=h,l=C;(t=c<2?e:l)||!g;){a||(c?c<3?(c>1&&(p.n=-1),d(c,l)):p.n=l:p.v=l);try{if(u=2,a){if(c||(s="next"),t=a[s]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,c<2&&(c=0)}else 1===c&&(t=a["return"])&&t.call(a),c<2&&(l=TypeError("The iterator does not provide a '"+s+"' method"),c=1);a=e}else if((t=(g=p.n<0)?l:r.call(n,p))!==A)break}catch(t){a=e,c=1,l=t}finally{u=1}}return{value:t,done:g}}}(r,s,a),!0),l}var A={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var a=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,(function(){return this})),t),c=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(a);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,s,"GeneratorFunction")),e.prototype=Object.create(c),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(c,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,s,"GeneratorFunction"),_regeneratorDefine2(c),_regeneratorDefine2(c,s,"Generator"),_regeneratorDefine2(c,n,(function(){return this})),_regeneratorDefine2(c,"toString",(function(){return"[object Generator]"})),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,t,r,n){var s=Object.defineProperty;try{s({},"",{})}catch(e){s=0}_regeneratorDefine2=function _regeneratorDefine(e,t,r,n){if(t)s?s(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var A=function o(t,r){_regeneratorDefine2(e,t,(function(e){return this._invoke(t,r,e)}))};A("next",0),A("throw",1),A("return",2)}},_regeneratorDefine2(e,t,r,n)}function asyncGeneratorStep(e,t,r,n,s,A,a){try{var c=e[A](a),l=c.value}catch(e){return void r(e)}c.done?t(l):Promise.resolve(l).then(n,s)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,s){var A=e.apply(t,r);function _next(e){asyncGeneratorStep(A,n,s,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(A,n,s,_next,_throw,"throw",e)}_next(void 0)}))}}var l=n.readFile?(0,c.promisify)(n.readFile):_asyncToGenerator(_regenerator().m((function _callee(){return _regenerator().w((function(e){while(1)switch(e.n){case 0:throw new g("use key rather than keyFile.","MISSING_CREDENTIALS");case 1:return e.a(2)}}),_callee)})));var u="https://oauth2.googleapis.com/token";var h="https://oauth2.googleapis.com/revoke?token=";var g=function(e){function ErrorWithCode(e,t){var r;_classCallCheck(this,ErrorWithCode);r=_callSuper(this,ErrorWithCode,[e]);_defineProperty(r,"code",void 0);r.code=t;return r}_inherits(ErrorWithCode,e);return _createClass(ErrorWithCode)}(_wrapNativeSuper(Error));var p=new WeakMap;var C=new WeakSet;var y=t.GoogleToken=function(){function GoogleToken(e){_classCallCheck(this,GoogleToken);_classPrivateMethodInitSpec(this,C);_defineProperty(this,"expiresAt",void 0);_defineProperty(this,"key",void 0);_defineProperty(this,"keyFile",void 0);_defineProperty(this,"iss",void 0);_defineProperty(this,"sub",void 0);_defineProperty(this,"scope",void 0);_defineProperty(this,"rawToken",void 0);_defineProperty(this,"tokenExpires",void 0);_defineProperty(this,"email",void 0);_defineProperty(this,"additionalClaims",void 0);_defineProperty(this,"eagerRefreshThresholdMillis",void 0);_defineProperty(this,"transporter",{request:function request(e){return(0,s.request)(e)}});_classPrivateFieldInitSpec(this,p,void 0);_assertClassBrand(C,this,_configure).call(this,e)}return _createClass(GoogleToken,[{key:"accessToken",get:function get(){return this.rawToken?this.rawToken.access_token:undefined}},{key:"idToken",get:function get(){return this.rawToken?this.rawToken.id_token:undefined}},{key:"tokenType",get:function get(){return this.rawToken?this.rawToken.token_type:undefined}},{key:"refreshToken",get:function get(){return this.rawToken?this.rawToken.refresh_token:undefined}},{key:"hasExpired",value:function hasExpired(){var e=(new Date).getTime();if(this.rawToken&&this.expiresAt){return e>=this.expiresAt}else{return true}}},{key:"isTokenExpiring",value:function isTokenExpiring(){var e;var t=(new Date).getTime();var r=(e=this.eagerRefreshThresholdMillis)!==null&&e!==void 0?e:0;if(this.rawToken&&this.expiresAt){return this.expiresAt<=t+r}else{return true}}},{key:"getToken",value:function getToken(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(_typeof(e)==="object"){t=e;e=undefined}t=Object.assign({forceRefresh:false},t);if(e){var r=e;_assertClassBrand(C,this,_getTokenAsync).call(this,t).then((function(e){return r(null,e)}),e);return}return _assertClassBrand(C,this,_getTokenAsync).call(this,t)}},{key:"getCredentials",value:function(){var e=_asyncToGenerator(_regenerator().m((function _callee2(e){var t,r,n,s,A,c,u;return _regenerator().w((function(h){while(1)switch(h.n){case 0:t=a.extname(e);u=t;h.n=u===".json"?1:u===".der"?4:u===".crt"?4:u===".pem"?4:u===".p12"?6:u===".pfx"?6:7;break;case 1:h.n=2;return l(e,"utf8");case 2:r=h.v;n=JSON.parse(r);s=n.private_key;A=n.client_email;if(!(!s||!A)){h.n=3;break}throw new g("private_key and client_email are required.","MISSING_CREDENTIALS");case 3:return h.a(2,{privateKey:s,clientEmail:A});case 4:h.n=5;return l(e,"utf8");case 5:c=h.v;return h.a(2,{privateKey:c});case 6:throw new g("*.p12 certificates are not supported after v6.1.2. "+"Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.","UNKNOWN_CERTIFICATE_TYPE");case 7:throw new g("Unknown certificate type. Type is determined based on file extension. "+"Current supported extensions are *.json, and *.pem.","UNKNOWN_CERTIFICATE_TYPE");case 8:return h.a(2)}}),_callee2)})));function getCredentials(t){return e.apply(this,arguments)}return getCredentials}()},{key:"revokeToken",value:function revokeToken(e){if(e){_assertClassBrand(C,this,_revokeTokenAsync).call(this).then((function(){return e()}),e);return}return _assertClassBrand(C,this,_revokeTokenAsync).call(this)}}])}();function _getTokenAsync(e){return _getTokenAsync2.apply(this,arguments)}function _getTokenAsync2(){_getTokenAsync2=_asyncToGenerator(_regenerator().m((function _callee3(e){return _regenerator().w((function(t){while(1)switch(t.n){case 0:if(!(_classPrivateFieldGet(p,this)&&!e.forceRefresh)){t.n=1;break}return t.a(2,_classPrivateFieldGet(p,this));case 1:t.p=1;t.n=2;return _classPrivateFieldSet(p,this,_assertClassBrand(C,this,_getTokenAsyncInner).call(this,e));case 2:return t.a(2,t.v);case 3:t.p=3;_classPrivateFieldSet(p,this,undefined);return t.f(3);case 4:return t.a(2)}}),_callee3,this,[[1,,3,4]])})));return _getTokenAsync2.apply(this,arguments)}function _getTokenAsyncInner(e){return _getTokenAsyncInner2.apply(this,arguments)}function _getTokenAsyncInner2(){_getTokenAsyncInner2=_asyncToGenerator(_regenerator().m((function _callee4(e){var t;return _regenerator().w((function(r){while(1)switch(r.n){case 0:if(!(this.isTokenExpiring()===false&&e.forceRefresh===false)){r.n=1;break}return r.a(2,Promise.resolve(this.rawToken));case 1:if(!(!this.key&&!this.keyFile)){r.n=2;break}throw new Error("No key or keyFile set.");case 2:if(!(!this.key&&this.keyFile)){r.n=4;break}r.n=3;return this.getCredentials(this.keyFile);case 3:t=r.v;this.key=t.privateKey;this.iss=t.clientEmail||this.iss;if(!t.clientEmail){_assertClassBrand(C,this,_ensureEmail).call(this)}case 4:return r.a(2,_assertClassBrand(C,this,_requestToken).call(this))}}),_callee4,this)})));return _getTokenAsyncInner2.apply(this,arguments)}function _ensureEmail(){if(!this.iss){throw new g("email is required.","MISSING_CREDENTIALS")}}function _revokeTokenAsync(){return _revokeTokenAsync2.apply(this,arguments)}function _revokeTokenAsync2(){_revokeTokenAsync2=_asyncToGenerator(_regenerator().m((function _callee5(){var e;return _regenerator().w((function(t){while(1)switch(t.n){case 0:if(this.accessToken){t.n=1;break}throw new Error("No token to revoke.");case 1:e=h+this.accessToken;t.n=2;return this.transporter.request({url:e,retry:true});case 2:_assertClassBrand(C,this,_configure).call(this,{email:this.iss,sub:this.sub,key:this.key,keyFile:this.keyFile,scope:this.scope,additionalClaims:this.additionalClaims});case 3:return t.a(2)}}),_callee5,this)})));return _revokeTokenAsync2.apply(this,arguments)}function _configure(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};this.keyFile=e.keyFile;this.key=e.key;this.rawToken=undefined;this.iss=e.email||e.iss;this.sub=e.sub;this.additionalClaims=e.additionalClaims;if(_typeof(e.scope)==="object"){this.scope=e.scope.join(" ")}else{this.scope=e.scope}this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis;if(e.transporter){this.transporter=e.transporter}}function _requestToken(){return _requestToken2.apply(this,arguments)}function _requestToken2(){_requestToken2=_asyncToGenerator(_regenerator().m((function _callee6(){var e,t,r,n,s,a,c,l,h,g;return _regenerator().w((function(p){while(1)switch(p.n){case 0:e=Math.floor((new Date).getTime()/1e3);t=this.additionalClaims||{};r=Object.assign({iss:this.iss,scope:this.scope,aud:u,exp:e+3600,iat:e,sub:this.sub},t);n=A.sign({header:{alg:"RS256"},payload:r,secret:this.key});p.p=1;p.n=2;return this.transporter.request({method:"POST",url:u,data:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:n}),responseType:"json",retryConfig:{httpMethodsToRetry:["POST"]}});case 2:s=p.v;this.rawToken=s.data;this.expiresAt=s.data.expires_in===null||s.data.expires_in===undefined?undefined:(e+s.data.expires_in)*1e3;return p.a(2,this.rawToken);case 3:p.p=3;g=p.v;this.rawToken=undefined;this.tokenExpires=undefined;l=g.response&&(a=g.response)!==null&&a!==void 0&&a.data?(c=g.response)===null||c===void 0?void 0:c.data:{};if(l.error){h=l.error_description?": ".concat(l.error_description):"";g.message="".concat(l.error).concat(h)}throw g;case 4:return p.a(2)}}),_callee6,this,[[1,3]])})));return _requestToken2.apply(this,arguments)}},6495:e=>{"use strict";e.exports=JSON.parse('{"name":"gaxios","version":"7.1.1","description":"A simple common HTTP client specifically for Google APIs and services.","main":"build/cjs/src/index.js","types":"build/cjs/src/index.d.ts","files":["build/"],"exports":{".":{"import":{"types":"./build/esm/src/index.d.ts","default":"./build/esm/src/index.js"},"require":{"types":"./build/cjs/src/index.d.ts","default":"./build/cjs/src/index.js"}}},"scripts":{"lint":"gts check --no-inline-config","test":"c8 mocha build/esm/test","presystem-test":"npm run compile","system-test":"mocha build/esm/system-test --timeout 80000","compile":"tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs","fix":"gts fix","prepare":"npm run compile","pretest":"npm run compile","webpack":"webpack","prebrowser-test":"npm run compile","browser-test":"node build/browser-test/browser-test-runner.js","docs":"jsdoc -c .jsdoc.js","docs-test":"linkinator docs","predocs-test":"npm run docs","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","prelint":"cd samples; npm link ../; npm install","clean":"gts clean"},"repository":"googleapis/gaxios","keywords":["google"],"engines":{"node":">=18"},"author":"Google, LLC","license":"Apache-2.0","devDependencies":{"@babel/plugin-proposal-private-methods":"^7.18.6","@types/cors":"^2.8.6","@types/express":"^5.0.0","@types/extend":"^3.0.1","@types/mocha":"^10.0.10","@types/multiparty":"4.2.1","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","@types/tmp":"0.2.6","assert":"^2.0.0","browserify":"^17.0.0","c8":"^10.0.0","cors":"^2.8.5","express":"^5.0.0","gts":"^6.0.0","is-docker":"^3.0.0","jsdoc":"^4.0.0","jsdoc-fresh":"^4.0.0","jsdoc-region-tag":"^3.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-remap-coverage":"^0.1.5","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1","linkinator":"^6.1.2","mocha":"^11.1.0","multiparty":"^4.2.1","mv":"^2.1.1","ncp":"^2.0.0","nock":"^14.0.0-beta.13","null-loader":"^4.0.0","pack-n-play":"^3.0.0","puppeteer":"^24.0.0","sinon":"^20.0.0","stream-browserify":"^3.0.0","tmp":"0.2.3","ts-loader":"^9.5.2","typescript":"^5.8.3","webpack":"^5.35.0","webpack-cli":"^6.0.1"},"dependencies":{"extend":"^3.0.2","https-proxy-agent":"^7.0.1","node-fetch":"^3.3.2"}}')},6066:e=>{"use strict";e.exports=JSON.parse('{"name":"google-auth-library","version":"10.3.0","author":"Google Inc.","description":"Google APIs Authentication Client Library for Node.js","engines":{"node":">=18"},"main":"./build/src/index.js","types":"./build/src/index.d.ts","repository":"googleapis/google-auth-library-nodejs.git","keywords":["google","api","google apis","client","client library"],"dependencies":{"base64-js":"^1.3.0","ecdsa-sig-formatter":"^1.0.11","gaxios":"^7.0.0","gcp-metadata":"^7.0.0","google-logging-utils":"^1.0.0","gtoken":"^8.0.0","jws":"^4.0.0"},"devDependencies":{"@types/base64-js":"^1.2.5","@types/jws":"^3.1.0","@types/mocha":"^10.0.10","@types/mv":"^2.1.0","@types/ncp":"^2.0.1","@types/node":"^22.0.0","@types/sinon":"^17.0.0","assert-rejects":"^1.0.0","c8":"^10.0.0","codecov":"^3.0.2","gts":"^6.0.0","is-docker":"^3.0.0","jsdoc":"^4.0.0","jsdoc-fresh":"^4.0.0","jsdoc-region-tag":"^3.0.0","karma":"^6.0.0","karma-chrome-launcher":"^3.0.0","karma-coverage":"^2.0.0","karma-firefox-launcher":"^2.0.0","karma-mocha":"^2.0.0","karma-sourcemap-loader":"^0.4.0","karma-webpack":"^5.0.1","keypair":"^1.0.4","linkinator":"^6.1.2","mocha":"^11.1.0","mv":"^2.1.1","ncp":"^2.0.0","nock":"^14.0.5","null-loader":"^4.0.0","puppeteer":"^24.0.0","sinon":"^21.0.0","ts-loader":"^8.0.0","typescript":"5.8.2","webpack":"^5.21.2","webpack-cli":"^4.0.0"},"files":["build/src","!build/src/**/*.map"],"scripts":{"test":"c8 mocha build/test","clean":"gts clean","prepare":"npm run compile","lint":"gts check --no-inline-config","compile":"tsc -p .","fix":"gts fix","pretest":"npm run compile -- --sourceMap","docs":"jsdoc -c .jsdoc.js","samples-setup":"cd samples/ && npm link ../ && npm run setup && cd ../","samples-test":"cd samples/ && npm link ../ && npm test && cd ../","system-test":"mocha build/system-test --timeout 60000","presystem-test":"npm run compile -- --sourceMap","webpack":"webpack","browser-test":"karma start","docs-test":"linkinator docs","predocs-test":"npm run docs","prelint":"cd samples; npm link ../; npm install"},"license":"Apache-2.0"}')},8330:e=>{"use strict";e.exports=JSON.parse('{"name":"@google-github-actions/deploy-cloud-functions","version":"3.0.9","description":"Deploy a Cloud Function","main":"dist/index.js","scripts":{"build":"rm -rf dist/ && ncc build -m src/main.ts -o dist/main","docs":"./node_modules/.bin/actions-gen-readme","lint":"eslint .","format":"eslint . --fix","test":"node --require ts-node/register --test-reporter spec --test tests/**/*.test.ts"},"engines":{"node":">= 24.x","npm":">= 11.x"},"repository":{"type":"git","url":"https://github.com/google-github-actions/deploy-cloud-functions"},"keywords":["actions","gcf","functions","google cloud","cloud function"],"author":"Google LLC","license":"Apache-2.0","dependencies":{"@actions/core":"^1.11.1","@actions/http-client":"^2.2.3","@google-github-actions/actions-utils":"^1.0.1","archiver":"^7.0.1","google-auth-library":"^10.3.0","ignore":"^7.0.5"},"devDependencies":{"@eslint/eslintrc":"^3.3.1","@eslint/js":"^9.34.0","@types/archiver":"^6.0.3","@types/node":"^24.3.0","@typescript-eslint/eslint-plugin":"^8.42.0","@typescript-eslint/parser":"^8.42.0","@vercel/ncc":"^0.38.3","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","eslint":"^9.34.0","node-stream-zip":"^1.15.0","prettier":"^3.6.2","ts-node":"^10.9.2","typescript-eslint":"^8.42.0","typescript":"^5.9.2"}}')}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={id:e,loaded:false,exports:{}};var n=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete __webpack_module_cache__[e]}r.loaded=true;return r.exports}__nccwpck_require__.m=__webpack_modules__;(()=>{var e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;var t;__nccwpck_require__.t=function(r,n){if(n&1)r=this(r);if(n&8)return r;if(typeof r==="object"&&r){if(n&4&&r.__esModule)return r;if(n&16&&typeof r.then==="function")return r}var s=Object.create(null);__nccwpck_require__.r(s);var A={};t=t||[null,e({}),e([]),e(e)];for(var a=n&2&&r;typeof a=="object"&&!~t.indexOf(a);a=e(a)){Object.getOwnPropertyNames(a).forEach((e=>A[e]=()=>r[e]))}A["default"]=()=>r;__nccwpck_require__.d(s,A);return s}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.f={};__nccwpck_require__.e=e=>Promise.all(Object.keys(__nccwpck_require__.f).reduce(((t,r)=>{__nccwpck_require__.f[r](e,t);return t}),[]))})();(()=>{__nccwpck_require__.u=e=>""+e+".index.js"})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";(()=>{var e={792:1};var installChunk=t=>{var r=t.modules,n=t.ids,s=t.runtime;for(var A in r){if(__nccwpck_require__.o(r,A)){__nccwpck_require__.m[A]=r[A]}}if(s)s(__nccwpck_require__);for(var a=0;a{if(!e[t]){if(true){installChunk(require("./"+__nccwpck_require__.u(t)))}else e[t]=1}}})();var __webpack_exports__={};(()=>{"use strict";var exports=__webpack_exports__;Object.defineProperty(exports,"__esModule",{value:true});const core_1=__nccwpck_require__(7484);const actions_utils_1=__nccwpck_require__(6160);const client_1=__nccwpck_require__(9592);const util_1=__nccwpck_require__(4527);async function run(){try{const e=(0,actions_utils_1.presence)((0,core_1.getInput)("project_id"))||(0,actions_utils_1.presence)(process.env?.GCLOUD_PROJECT);const t=(0,actions_utils_1.presence)((0,core_1.getInput)("region"))||"us-central1";const r=(0,core_1.getInput)("universe")||"googleapis.com";const n=(0,core_1.getInput)("name",{required:true});const s=(0,actions_utils_1.presence)((0,core_1.getInput)("description"));const A=(0,actions_utils_1.toEnum)(client_1.Environment,(0,core_1.getInput)("environment")||client_1.Environment.GEN_2);const a=(0,actions_utils_1.presence)((0,core_1.getInput)("kms_key_name"));const c=(0,actions_utils_1.parseKVString)((0,core_1.getInput)("labels"));const l=(0,actions_utils_1.presence)((0,core_1.getInput)("source_dir"))||process.cwd();const u=(0,core_1.getInput)("runtime",{required:true});const h=(0,actions_utils_1.parseKVString)((0,core_1.getInput)("build_environment_variables"));const g=(0,actions_utils_1.presence)((0,core_1.getInput)("build_service_account"));const p=(0,actions_utils_1.presence)((0,core_1.getInput)("build_worker_pool"));const C=(0,actions_utils_1.presence)((0,core_1.getInput)("docker_repository"));const y=(0,actions_utils_1.presence)((0,core_1.getInput)("entry_point"));const I=(0,actions_utils_1.parseBoolean)((0,core_1.getInput)("all_traffic_on_latest_revision"),true);const B=(0,actions_utils_1.presence)((0,core_1.getInput)("cpu"));const Q=(0,actions_utils_1.presence)((0,core_1.getInput)("memory"))||"256Mi";const b=(0,actions_utils_1.parseKVString)((0,core_1.getInput)("environment_variables"));const w=(0,actions_utils_1.toEnum)(client_1.IngressSettings,(0,core_1.getInput)("ingress_settings")||client_1.IngressSettings.ALLOW_ALL);const S=(0,actions_utils_1.presence)((0,core_1.getInput)("max_instance_count"));const k=(0,util_1.stringToInt)((0,core_1.getInput)("max_instance_request_concurrency"));const v=(0,actions_utils_1.presence)((0,core_1.getInput)("min_instance_count"));const[R,D]=(0,util_1.parseSecrets)((0,core_1.getInput)("secrets"));const _=(0,actions_utils_1.presence)((0,core_1.getInput)("service_account"));const N=(0,actions_utils_1.parseDuration)((0,core_1.getInput)("service_timeout"));const T=(0,actions_utils_1.presence)((0,core_1.getInput)("vpc_connector"));const F=(0,actions_utils_1.toEnum)(client_1.VpcConnectorEgressSettings,(0,core_1.getInput)("vpc_connector_egress_settings")||client_1.VpcConnectorEgressSettings.PRIVATE_RANGES_ONLY);const L=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_location"));const M=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_type"));const x=(0,util_1.parseEventTriggerFilters)((0,core_1.getInput)("event_trigger_filters"));const O=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_pubsub_topic"));const U=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_service_account"));const P=(0,actions_utils_1.parseBoolean)((0,core_1.getInput)("event_trigger_retry"),true)?client_1.RetryPolicy.RETRY_POLICY_RETRY:client_1.RetryPolicy.RETRY_POLICY_DO_NOT_RETRY;const G=(0,actions_utils_1.presence)((0,core_1.getInput)("event_trigger_channel"));if(N<=0){throw new Error(`The 'service_timeout' parameter must be > 0 seconds (got ${N})`)}const H=new client_1.CloudFunctionsClient({projectID:e,location:t,universe:r});const Y={name:n,description:s,environment:A,kmsKeyName:a,labels:c,buildConfig:{runtime:u,entryPoint:y,dockerRepository:C,environmentVariables:h,serviceAccount:g,workerPool:p},serviceConfig:{allTrafficOnLatestRevision:I,availableCpu:B,availableMemory:Q,environmentVariables:b,ingressSettings:w,maxInstanceCount:S?+S:undefined,maxInstanceRequestConcurrency:k,minInstanceCount:v?+v:undefined,secretEnvironmentVariables:R,secretVolumes:D,serviceAccountEmail:_,timeoutSeconds:N,vpcConnector:T,vpcConnectorEgressSettings:F},eventTrigger:{triggerRegion:L,eventType:M,eventFilters:x,pubsubTopic:O,serviceAccountEmail:U,retryPolicy:P,channel:G}};if(!Y.eventTrigger?.eventType){delete Y.eventTrigger}if(!Y.serviceConfig?.vpcConnector){delete Y.serviceConfig?.vpcConnectorEgressSettings}const J=await H.deployFromLocalSource(Y,l,{onZip:(e,t)=>{(0,core_1.info)(`Created zip file from '${e}' at '${t}'`)},onZipAddEntry:e=>{(0,core_1.debug)((0,util_1.formatEntry)(e))},onZipIgnoreEntry:e=>{(0,core_1.debug)(`Ignoring ${e.name}`)},onNew:()=>{(0,core_1.info)("Creating new Cloud Functions deployment")},onExisting:()=>{(0,core_1.info)("Updating existing Cloud Functions deployment")},onPoll:(()=>{let e=0;return()=>{if(e===0){process.stdout.write(`Deploying Cloud Function...`)}else{process.stdout.write(`.`)}e++}})(),onDebug:e=>{if((0,core_1.isDebug)()){(0,core_1.debug)(e())}}});if(J.state!=="ACTIVE"){throw new Error(`Cloud Function deployment finished, but the function not in the `+`"ACTIVE" status. The current status is "${J.state}", which `+`could indicate a failed deployment. Check the Cloud Function `+`logs for more information.`)}(0,core_1.setOutput)("name",J.name);(0,core_1.setOutput)("url",J.url)}catch(e){const t=(0,actions_utils_1.errorMessage)(e);(0,core_1.setFailed)(`google-github-actions/deploy-cloud-functions failed with: ${t}`)}}if(require.main===require.cache[eval("__filename")]){run()}})();module.exports=__webpack_exports__})(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7dbfe79..25ff454 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@actions/core": "^1.11.1", "@actions/http-client": "^2.2.3", - "@google-github-actions/actions-utils": "^0.8.10", + "@google-github-actions/actions-utils": "^1.0.1", "archiver": "^7.0.1", "google-auth-library": "^10.3.0", "ignore": "^7.0.5" @@ -34,7 +34,7 @@ "typescript-eslint": "^8.42.0" }, "engines": { - "node": ">= 20.x", + "node": ">= 24.x", "npm": ">= 11.x" } }, @@ -234,9 +234,9 @@ } }, "node_modules/@google-github-actions/actions-utils": { - "version": "0.8.10", - "resolved": "https://registry.npmjs.org/@google-github-actions/actions-utils/-/actions-utils-0.8.10.tgz", - "integrity": "sha512-NLmKwQgPj0cQyDjbtQIGUYBdPtFIywLbH10RPRuhF6tO7qlO19N76SsaDEiZ7iKlXA9Yfj8TS3lK6wfdJyE+hw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@google-github-actions/actions-utils/-/actions-utils-1.0.1.tgz", + "integrity": "sha512-dEvNcy63a6pkcMsRhWbfjNePsv4kR61O56mQ9rVXvRgjAvRkZTBiM1G7QSnHulMEjhLIlTEGlBIKEKIxCoonkQ==", "license": "Apache-2.0", "dependencies": { "yaml": "^2.8.1" @@ -245,8 +245,8 @@ "actions-gen-readme": "bin/actions-gen-readme.mjs" }, "engines": { - "node": ">= 20.x", - "npm": ">= 10.x" + "node": ">= 24.x", + "npm": ">= 11.x" } }, "node_modules/@humanfs/core": { diff --git a/package.json b/package.json index 9d4caca..6a81e1b 100644 --- a/package.json +++ b/package.json @@ -4,14 +4,14 @@ "description": "Deploy a Cloud Function", "main": "dist/index.js", "scripts": { - "build": "ncc build -m src/main.ts", + "build": "rm -rf dist/ && ncc build -m src/main.ts -o dist/main", "docs": "./node_modules/.bin/actions-gen-readme", "lint": "eslint .", "format": "eslint . --fix", - "test": "bash ./bin/runTests.sh" + "test": "node --require ts-node/register --test-reporter spec --test tests/**/*.test.ts" }, "engines": { - "node": ">= 20.x", + "node": ">= 24.x", "npm": ">= 11.x" }, "repository": { @@ -30,7 +30,7 @@ "dependencies": { "@actions/core": "^1.11.1", "@actions/http-client": "^2.2.3", - "@google-github-actions/actions-utils": "^0.8.10", + "@google-github-actions/actions-utils": "^1.0.1", "archiver": "^7.0.1", "google-auth-library": "^10.3.0", "ignore": "^7.0.5"