From 0b1ff502591bcba42a55bd052eae6a82b187968b Mon Sep 17 00:00:00 2001 From: Yamil Medina Date: Thu, 2 May 2024 07:22:11 +0200 Subject: [PATCH] fix: markdown breaking lines format (#97) * chore: change format to table, breaking lines reliable, add tests * chore: github actions standard template-like * chore: github actions standard template-like, more tests * chore: adjustments * chore: adjustments readme * fix: tests and use templates for concat * fix: tests cleanup * fix: tests packaging * fix: prefix with npx to build * fix: add pr comment suggestions --- README.md | 37 ++++++++++ __tests__/fixtures/output.txt | 4 ++ __tests__/fixtures/sample.json | 124 +++++++++++++++++++++++++++++++++ __tests__/index.test.ts | 13 ++++ __tests__/tablebuilder.test.ts | 18 +++++ dist/index.js | 2 +- package.json | 9 +-- src/benchmark.ts | 56 +++++++-------- src/index.ts | 7 ++ src/main.ts | 16 ++--- src/tablebuilder.ts | 17 +++-- tsconfig.json | 26 +++++-- 12 files changed, 274 insertions(+), 55 deletions(-) create mode 100644 __tests__/fixtures/output.txt create mode 100644 __tests__/fixtures/sample.json create mode 100644 __tests__/index.test.ts create mode 100644 __tests__/tablebuilder.test.ts create mode 100644 src/index.ts diff --git a/README.md b/README.md index 5ae3912..c4b5156 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,39 @@ # kotlinx-benchmark-table-action An Action to take info from kotlinx-benchmark outputs and display them in a table as a pull request comment + +Check [action.yml](action.yml) for a description of inputs and outputs. + +### Configuration sample + +1. As a GitHub Summary check: + +```yml +- name: Create Benchmark Table + id: benchmark-table + uses: boswelja/kotlinx-benchmark-table-action@0.0.2 + with: + benchmark-results: ./benchmarks/build/reports/benchmarks/main/**/jvm.json +- name: Post Results + run: | + echo '## Benchmarks results ⏱️' >> $GITHUB_STEP_SUMMARY + echo '${{steps.benchmark-table.outputs.benchmark-table}}️' >> $GITHUB_STEP_SUMMARY +``` + +2. As a GitHub PR comment (Assuming the action is running on a GitHub runners): + +```yml +- name: Create Benchmark Table + id: benchmark-table + uses: boswelja/kotlinx-benchmark-table-action@0.0.2 + with: + benchmark-results: ./benchmarks/build/reports/benchmarks/main/**/jvm.json +- name: Post Results + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_HEAD_REF: ${{github.head_ref}} + run: | + gh pr comment "$GH_HEAD_REF" --body " + ## Benchmarks from last commit: + ${{steps.benchmark-table.outputs.benchmark-table}} + " +``` diff --git a/__tests__/fixtures/output.txt b/__tests__/fixtures/output.txt new file mode 100644 index 0000000..b300ae6 --- /dev/null +++ b/__tests__/fixtures/output.txt @@ -0,0 +1,4 @@ +| Benchmark | Score | Error | +| --------- | ----- | ----- | +| com.benchmarks.MessagesBenchmark.messageInsertionBenchmark | 1.782ops/s | 0.223ops/s | +| com.benchmarks.MessagesBenchmark.queryMessagesBenchmark | 50.457ops/s | 3.394ops/s | \ No newline at end of file diff --git a/__tests__/fixtures/sample.json b/__tests__/fixtures/sample.json new file mode 100644 index 0000000..6a16f87 --- /dev/null +++ b/__tests__/fixtures/sample.json @@ -0,0 +1,124 @@ +[ + { + "jmhVersion" : "1.37", + "benchmark" : "com.benchmarks.MessagesBenchmark.messageInsertionBenchmark", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/Users/theUser/.sdkman/candidates/java/17.0.7-tem/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Duser.country=DE", + "-Duser.language=en", + "-Duser.variant" + ], + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7", + "warmupIterations" : 1, + "warmupTime" : "10 s", + "warmupBatchSize" : 1, + "measurementIterations" : 10, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "primaryMetric" : { + "score" : 1.7823356802696022, + "scoreError" : 0.2226165791748437, + "scoreConfidence" : [ + 1.5597191010947584, + 2.0049522594444458 + ], + "scorePercentiles" : { + "0.0" : 1.4878886330237069, + "50.0" : 1.8424420821050043, + "90.0" : 1.9010407215835783, + "95.0" : 1.902112609711454, + "99.0" : 1.902112609711454, + "99.9" : 1.902112609711454, + "99.99" : 1.902112609711454, + "99.999" : 1.902112609711454, + "99.9999" : 1.902112609711454, + "100.0" : 1.902112609711454 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 1.8012946805516465, + 1.5654607694063567, + 1.4878886330237069, + 1.7169346383277355, + 1.8913937284326974, + 1.8699750264835213, + 1.8876201422086203, + 1.902112609711454, + 1.814909137726487, + 1.8857674368237995 + ] + ] + }, + "secondaryMetrics" : { + } + }, + { + "jmhVersion" : "1.37", + "benchmark" : "com.benchmarks.MessagesBenchmark.queryMessagesBenchmark", + "mode" : "thrpt", + "threads" : 1, + "forks" : 1, + "jvm" : "/Users/theUser/.sdkman/candidates/java/17.0.7-tem/bin/java", + "jvmArgs" : [ + "-Dfile.encoding=UTF-8", + "-Duser.country=DE", + "-Duser.language=en", + "-Duser.variant" + ], + "jdkVersion" : "17.0.7", + "vmName" : "OpenJDK 64-Bit Server VM", + "vmVersion" : "17.0.7+7", + "warmupIterations" : 1, + "warmupTime" : "10 s", + "warmupBatchSize" : 1, + "measurementIterations" : 10, + "measurementTime" : "1 s", + "measurementBatchSize" : 1, + "primaryMetric" : { + "score" : 50.45665058195113, + "scoreError" : 3.3937165496625408, + "scoreConfidence" : [ + 47.06293403228859, + 53.85036713161367 + ], + "scorePercentiles" : { + "0.0" : 44.74868687531958, + "50.0" : 51.19678172516677, + "90.0" : 52.28606095305461, + "95.0" : 52.29307176896627, + "99.0" : 52.29307176896627, + "99.9" : 52.29307176896627, + "99.99" : 52.29307176896627, + "99.999" : 52.29307176896627, + "99.9999" : 52.29307176896627, + "100.0" : 52.29307176896627 + }, + "scoreUnit" : "ops/s", + "rawData" : [ + [ + 52.22296360984965, + 50.878313350724106, + 51.958061150989145, + 49.564829078021425, + 51.53162687896872, + 51.51525009960944, + 52.29307176896627, + 44.74868687531958, + 50.251918533264735, + 49.601784473798226 + ] + ] + }, + "secondaryMetrics" : { + } + } +] + + diff --git a/__tests__/index.test.ts b/__tests__/index.test.ts new file mode 100644 index 0000000..5eca221 --- /dev/null +++ b/__tests__/index.test.ts @@ -0,0 +1,13 @@ +import * as main from '../src/main' + +// Mock the action's entrypoint +const runMock = jest.spyOn(main, 'run').mockImplementation() + +describe('index', () => { + it('calls run when imported', async () => { + // eslint-disable-next-line @typescript-eslint/no-require-imports + require('../src/index') + + expect(runMock).toHaveBeenCalled() + }) +}) \ No newline at end of file diff --git a/__tests__/tablebuilder.test.ts b/__tests__/tablebuilder.test.ts new file mode 100644 index 0000000..4ba0377 --- /dev/null +++ b/__tests__/tablebuilder.test.ts @@ -0,0 +1,18 @@ +import * as tablebuild from '../src/tablebuilder' +import { Benchmark } from '../src/benchmark' +import { debug } from '@actions/core' +import sample from './fixtures/sample.json' +import { readFileSync } from 'fs' + +const runMock = jest.spyOn(tablebuild, 'buildBenchmarkTable') + +describe('tablebuilder', () => { + it('maps the parsed benchmarks into markdown', () => { + let benchmarks: Benchmark[] = JSON.parse(JSON.stringify(sample)) + debug("Num of benchmarks: " + benchmarks.length) + let result = tablebuild.buildBenchmarkTable(benchmarks) + let output = readFileSync(__dirname + '/fixtures/output.txt') + + expect(result).toBe(output.toString()) + }) +}) diff --git a/dist/index.js b/dist/index.js index a5df5de..7a36577 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -(()=>{var t={351:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.issue=e.issueCommand=void 0;const o=n(s(37));const a=s(278);function issueCommand(t,e,s){const i=new Command(t,e,s);process.stdout.write(i.toString()+o.EOL)}e.issueCommand=issueCommand;function issue(t,e=""){issueCommand(t,{},e)}e.issue=issue;const h="::";class Command{constructor(t,e,s){if(!t){t="missing.command"}this.command=t;this.properties=e;this.message=s}toString(){let t=h+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let e=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const i=this.properties[s];if(i){if(e){e=false}else{t+=","}t+=`${s}=${escapeProperty(i)}`}}}}t+=`${h}${escapeData(this.message)}`;return t}}function escapeData(t){return a.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(t){return a.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},186:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};var o=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.getIDToken=e.getState=e.saveState=e.group=e.endGroup=e.startGroup=e.info=e.notice=e.warning=e.error=e.debug=e.isDebug=e.setFailed=e.setCommandEcho=e.setOutput=e.getBooleanInput=e.getMultilineInput=e.getInput=e.addPath=e.setSecret=e.exportVariable=e.ExitCode=void 0;const a=s(351);const h=s(717);const l=s(278);const c=n(s(37));const u=n(s(17));const f=s(41);var d;(function(t){t[t["Success"]=0]="Success";t[t["Failure"]=1]="Failure"})(d=e.ExitCode||(e.ExitCode={}));function exportVariable(t,e){const s=l.toCommandValue(e);process.env[t]=s;const i=process.env["GITHUB_ENV"]||"";if(i){return h.issueFileCommand("ENV",h.prepareKeyValueMessage(t,e))}a.issueCommand("set-env",{name:t},s)}e.exportVariable=exportVariable;function setSecret(t){a.issueCommand("add-mask",{},t)}e.setSecret=setSecret;function addPath(t){const e=process.env["GITHUB_PATH"]||"";if(e){h.issueFileCommand("PATH",t)}else{a.issueCommand("add-path",{},t)}process.env["PATH"]=`${t}${u.delimiter}${process.env["PATH"]}`}e.addPath=addPath;function getInput(t,e){const s=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!s){throw new Error(`Input required and not supplied: ${t}`)}if(e&&e.trimWhitespace===false){return s}return s.trim()}e.getInput=getInput;function getMultilineInput(t,e){const s=getInput(t,e).split("\n").filter((t=>t!==""));if(e&&e.trimWhitespace===false){return s}return s.map((t=>t.trim()))}e.getMultilineInput=getMultilineInput;function getBooleanInput(t,e){const s=["true","True","TRUE"];const i=["false","False","FALSE"];const r=getInput(t,e);if(s.includes(r))return true;if(i.includes(r))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}e.getBooleanInput=getBooleanInput;function setOutput(t,e){const s=process.env["GITHUB_OUTPUT"]||"";if(s){return h.issueFileCommand("OUTPUT",h.prepareKeyValueMessage(t,e))}process.stdout.write(c.EOL);a.issueCommand("set-output",{name:t},l.toCommandValue(e))}e.setOutput=setOutput;function setCommandEcho(t){a.issue("echo",t?"on":"off")}e.setCommandEcho=setCommandEcho;function setFailed(t){process.exitCode=d.Failure;error(t)}e.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}e.isDebug=isDebug;function debug(t){a.issueCommand("debug",{},t)}e.debug=debug;function error(t,e={}){a.issueCommand("error",l.toCommandProperties(e),t instanceof Error?t.toString():t)}e.error=error;function warning(t,e={}){a.issueCommand("warning",l.toCommandProperties(e),t instanceof Error?t.toString():t)}e.warning=warning;function notice(t,e={}){a.issueCommand("notice",l.toCommandProperties(e),t instanceof Error?t.toString():t)}e.notice=notice;function info(t){process.stdout.write(t+c.EOL)}e.info=info;function startGroup(t){a.issue("group",t)}e.startGroup=startGroup;function endGroup(){a.issue("endgroup")}e.endGroup=endGroup;function group(t,e){return o(this,void 0,void 0,(function*(){startGroup(t);let s;try{s=yield e()}finally{endGroup()}return s}))}e.group=group;function saveState(t,e){const s=process.env["GITHUB_STATE"]||"";if(s){return h.issueFileCommand("STATE",h.prepareKeyValueMessage(t,e))}a.issueCommand("save-state",{name:t},l.toCommandValue(e))}e.saveState=saveState;function getState(t){return process.env[`STATE_${t}`]||""}e.getState=getState;function getIDToken(t){return o(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(t)}))}e.getIDToken=getIDToken;var p=s(327);Object.defineProperty(e,"summary",{enumerable:true,get:function(){return p.summary}});var g=s(327);Object.defineProperty(e,"markdownSummary",{enumerable:true,get:function(){return g.markdownSummary}});var y=s(981);Object.defineProperty(e,"toPosixPath",{enumerable:true,get:function(){return y.toPosixPath}});Object.defineProperty(e,"toWin32Path",{enumerable:true,get:function(){return y.toWin32Path}});Object.defineProperty(e,"toPlatformPath",{enumerable:true,get:function(){return y.toPlatformPath}})},717:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.prepareKeyValueMessage=e.issueFileCommand=void 0;const o=n(s(147));const a=n(s(37));const h=s(840);const l=s(278);function issueFileCommand(t,e){const s=process.env[`GITHUB_${t}`];if(!s){throw new Error(`Unable to find environment variable for file command ${t}`)}if(!o.existsSync(s)){throw new Error(`Missing file at path: ${s}`)}o.appendFileSync(s,`${l.toCommandValue(e)}${a.EOL}`,{encoding:"utf8"})}e.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(t,e){const s=`ghadelimiter_${h.v4()}`;const i=l.toCommandValue(e);if(t.includes(s)){throw new Error(`Unexpected input: name should not contain the delimiter "${s}"`)}if(i.includes(s)){throw new Error(`Unexpected input: value should not contain the delimiter "${s}"`)}return`${t}<<${s}${a.EOL}${i}${a.EOL}${s}`}e.prepareKeyValueMessage=prepareKeyValueMessage},41:function(t,e,s){"use strict";var i=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.OidcClient=void 0;const r=s(255);const n=s(526);const o=s(186);class OidcClient{static createHttpClient(t=true,e=10){const s={allowRetries:t,maxRetries:e};return new r.HttpClient("actions/oidc-client",[new n.BearerCredentialHandler(OidcClient.getRequestToken())],s)}static getRequestToken(){const t=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!t){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return t}static getIDTokenUrl(){const t=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!t){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return t}static getCall(t){var e;return i(this,void 0,void 0,(function*(){const s=OidcClient.createHttpClient();const i=yield s.getJson(t).catch((t=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${t.statusCode}\n \n Error Message: ${t.message}`)}));const r=(e=i.result)===null||e===void 0?void 0:e.value;if(!r){throw new Error("Response json body do not have ID Token field")}return r}))}static getIDToken(t){return i(this,void 0,void 0,(function*(){try{let e=OidcClient.getIDTokenUrl();if(t){const s=encodeURIComponent(t);e=`${e}&audience=${s}`}o.debug(`ID token url is ${e}`);const s=yield OidcClient.getCall(e);o.setSecret(s);return s}catch(t){throw new Error(`Error message: ${t.message}`)}}))}}e.OidcClient=OidcClient},981:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.toPlatformPath=e.toWin32Path=e.toPosixPath=void 0;const o=n(s(17));function toPosixPath(t){return t.replace(/[\\]/g,"/")}e.toPosixPath=toPosixPath;function toWin32Path(t){return t.replace(/[/]/g,"\\")}e.toWin32Path=toWin32Path;function toPlatformPath(t){return t.replace(/[/\\]/g,o.sep)}e.toPlatformPath=toPlatformPath},327:function(t,e,s){"use strict";var i=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.summary=e.markdownSummary=e.SUMMARY_DOCS_URL=e.SUMMARY_ENV_VAR=void 0;const r=s(37);const n=s(147);const{access:o,appendFile:a,writeFile:h}=n.promises;e.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";e.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 i(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const t=process.env[e.SUMMARY_ENV_VAR];if(!t){throw new Error(`Unable to find environment variable for $${e.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield o(t,n.constants.R_OK|n.constants.W_OK)}catch(e){throw new Error(`Unable to access summary file: '${t}'. Check if the file has correct read/write permissions.`)}this._filePath=t;return this._filePath}))}wrap(t,e,s={}){const i=Object.entries(s).map((([t,e])=>` ${t}="${e}"`)).join("");if(!e){return`<${t}${i}>`}return`<${t}${i}>${e}`}write(t){return i(this,void 0,void 0,(function*(){const e=!!(t===null||t===void 0?void 0:t.overwrite);const s=yield this.filePath();const i=e?h:a;yield i(s,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return i(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(t,e=false){this._buffer+=t;return e?this.addEOL():this}addEOL(){return this.addRaw(r.EOL)}addCodeBlock(t,e){const s=Object.assign({},e&&{lang:e});const i=this.wrap("pre",this.wrap("code",t),s);return this.addRaw(i).addEOL()}addList(t,e=false){const s=e?"ol":"ul";const i=t.map((t=>this.wrap("li",t))).join("");const r=this.wrap(s,i);return this.addRaw(r).addEOL()}addTable(t){const e=t.map((t=>{const e=t.map((t=>{if(typeof t==="string"){return this.wrap("td",t)}const{header:e,data:s,colspan:i,rowspan:r}=t;const n=e?"th":"td";const o=Object.assign(Object.assign({},i&&{colspan:i}),r&&{rowspan:r});return this.wrap(n,s,o)})).join("");return this.wrap("tr",e)})).join("");const s=this.wrap("table",e);return this.addRaw(s).addEOL()}addDetails(t,e){const s=this.wrap("details",this.wrap("summary",t)+e);return this.addRaw(s).addEOL()}addImage(t,e,s){const{width:i,height:r}=s||{};const n=Object.assign(Object.assign({},i&&{width:i}),r&&{height:r});const o=this.wrap("img",null,Object.assign({src:t,alt:e},n));return this.addRaw(o).addEOL()}addHeading(t,e){const s=`h${e}`;const i=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1";const r=this.wrap(i,t);return this.addRaw(r).addEOL()}addSeparator(){const t=this.wrap("hr",null);return this.addRaw(t).addEOL()}addBreak(){const t=this.wrap("br",null);return this.addRaw(t).addEOL()}addQuote(t,e){const s=Object.assign({},e&&{cite:e});const i=this.wrap("blockquote",t,s);return this.addRaw(i).addEOL()}addLink(t,e){const s=this.wrap("a",t,{href:e});return this.addRaw(s).addEOL()}}const l=new Summary;e.markdownSummary=l;e.summary=l},278:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.toCommandProperties=e.toCommandValue=void 0;function toCommandValue(t){if(t===null||t===undefined){return""}else if(typeof t==="string"||t instanceof String){return t}return JSON.stringify(t)}e.toCommandValue=toCommandValue;function toCommandProperties(t){if(!Object.keys(t).length){return{}}return{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}}e.toCommandProperties=toCommandProperties},526:function(t,e){"use strict";var s=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.PersonalAccessTokenCredentialHandler=e.BearerCredentialHandler=e.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(t,e){this.username=t;this.password=e}prepareRequest(t){if(!t.headers){throw Error("The request has no headers")}t.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}e.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(t){this.token=t}prepareRequest(t){if(!t.headers){throw Error("The request has no headers")}t.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}e.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(t){this.token=t}prepareRequest(t){if(!t.headers){throw Error("The request has no headers")}t.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}e.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},255:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};var o=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.HttpClient=e.isHttps=e.HttpClientResponse=e.HttpClientError=e.getProxyUrl=e.MediaTypes=e.Headers=e.HttpCodes=void 0;const a=n(s(685));const h=n(s(687));const l=n(s(835));const c=n(s(294));var u;(function(t){t[t["OK"]=200]="OK";t[t["MultipleChoices"]=300]="MultipleChoices";t[t["MovedPermanently"]=301]="MovedPermanently";t[t["ResourceMoved"]=302]="ResourceMoved";t[t["SeeOther"]=303]="SeeOther";t[t["NotModified"]=304]="NotModified";t[t["UseProxy"]=305]="UseProxy";t[t["SwitchProxy"]=306]="SwitchProxy";t[t["TemporaryRedirect"]=307]="TemporaryRedirect";t[t["PermanentRedirect"]=308]="PermanentRedirect";t[t["BadRequest"]=400]="BadRequest";t[t["Unauthorized"]=401]="Unauthorized";t[t["PaymentRequired"]=402]="PaymentRequired";t[t["Forbidden"]=403]="Forbidden";t[t["NotFound"]=404]="NotFound";t[t["MethodNotAllowed"]=405]="MethodNotAllowed";t[t["NotAcceptable"]=406]="NotAcceptable";t[t["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";t[t["RequestTimeout"]=408]="RequestTimeout";t[t["Conflict"]=409]="Conflict";t[t["Gone"]=410]="Gone";t[t["TooManyRequests"]=429]="TooManyRequests";t[t["InternalServerError"]=500]="InternalServerError";t[t["NotImplemented"]=501]="NotImplemented";t[t["BadGateway"]=502]="BadGateway";t[t["ServiceUnavailable"]=503]="ServiceUnavailable";t[t["GatewayTimeout"]=504]="GatewayTimeout"})(u=e.HttpCodes||(e.HttpCodes={}));var f;(function(t){t["Accept"]="accept";t["ContentType"]="content-type"})(f=e.Headers||(e.Headers={}));var d;(function(t){t["ApplicationJson"]="application/json"})(d=e.MediaTypes||(e.MediaTypes={}));function getProxyUrl(t){const e=l.getProxyUrl(new URL(t));return e?e.href:""}e.getProxyUrl=getProxyUrl;const p=[u.MovedPermanently,u.ResourceMoved,u.SeeOther,u.TemporaryRedirect,u.PermanentRedirect];const g=[u.BadGateway,u.ServiceUnavailable,u.GatewayTimeout];const y=["OPTIONS","GET","DELETE","HEAD"];const w=10;const b=5;class HttpClientError extends Error{constructor(t,e){super(t);this.name="HttpClientError";this.statusCode=e;Object.setPrototypeOf(this,HttpClientError.prototype)}}e.HttpClientError=HttpClientError;class HttpClientResponse{constructor(t){this.message=t}readBody(){return o(this,void 0,void 0,(function*(){return new Promise((t=>o(this,void 0,void 0,(function*(){let e=Buffer.alloc(0);this.message.on("data",(t=>{e=Buffer.concat([e,t])}));this.message.on("end",(()=>{t(e.toString())}))}))))}))}}e.HttpClientResponse=HttpClientResponse;function isHttps(t){const e=new URL(t);return e.protocol==="https:"}e.isHttps=isHttps;class HttpClient{constructor(t,e,s){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=t;this.handlers=e||[];this.requestOptions=s;if(s){if(s.ignoreSslError!=null){this._ignoreSslError=s.ignoreSslError}this._socketTimeout=s.socketTimeout;if(s.allowRedirects!=null){this._allowRedirects=s.allowRedirects}if(s.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=s.allowRedirectDowngrade}if(s.maxRedirects!=null){this._maxRedirects=Math.max(s.maxRedirects,0)}if(s.keepAlive!=null){this._keepAlive=s.keepAlive}if(s.allowRetries!=null){this._allowRetries=s.allowRetries}if(s.maxRetries!=null){this._maxRetries=s.maxRetries}}}options(t,e){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",t,null,e||{})}))}get(t,e){return o(this,void 0,void 0,(function*(){return this.request("GET",t,null,e||{})}))}del(t,e){return o(this,void 0,void 0,(function*(){return this.request("DELETE",t,null,e||{})}))}post(t,e,s){return o(this,void 0,void 0,(function*(){return this.request("POST",t,e,s||{})}))}patch(t,e,s){return o(this,void 0,void 0,(function*(){return this.request("PATCH",t,e,s||{})}))}put(t,e,s){return o(this,void 0,void 0,(function*(){return this.request("PUT",t,e,s||{})}))}head(t,e){return o(this,void 0,void 0,(function*(){return this.request("HEAD",t,null,e||{})}))}sendStream(t,e,s,i){return o(this,void 0,void 0,(function*(){return this.request(t,e,s,i)}))}getJson(t,e={}){return o(this,void 0,void 0,(function*(){e[f.Accept]=this._getExistingOrDefaultHeader(e,f.Accept,d.ApplicationJson);const s=yield this.get(t,e);return this._processResponse(s,this.requestOptions)}))}postJson(t,e,s={}){return o(this,void 0,void 0,(function*(){const i=JSON.stringify(e,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,d.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,d.ApplicationJson);const r=yield this.post(t,i,s);return this._processResponse(r,this.requestOptions)}))}putJson(t,e,s={}){return o(this,void 0,void 0,(function*(){const i=JSON.stringify(e,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,d.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,d.ApplicationJson);const r=yield this.put(t,i,s);return this._processResponse(r,this.requestOptions)}))}patchJson(t,e,s={}){return o(this,void 0,void 0,(function*(){const i=JSON.stringify(e,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,d.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,d.ApplicationJson);const r=yield this.patch(t,i,s);return this._processResponse(r,this.requestOptions)}))}request(t,e,s,i){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const r=new URL(e);let n=this._prepareRequest(t,r,i);const o=this._allowRetries&&y.includes(t)?this._maxRetries+1:1;let a=0;let h;do{h=yield this.requestRaw(n,s);if(h&&h.message&&h.message.statusCode===u.Unauthorized){let t;for(const e of this.handlers){if(e.canHandleAuthentication(h)){t=e;break}}if(t){return t.handleAuthentication(this,n,s)}else{return h}}let e=this._maxRedirects;while(h.message.statusCode&&p.includes(h.message.statusCode)&&this._allowRedirects&&e>0){const o=h.message.headers["location"];if(!o){break}const a=new URL(o);if(r.protocol==="https:"&&r.protocol!==a.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 h.readBody();if(a.hostname!==r.hostname){for(const t in i){if(t.toLowerCase()==="authorization"){delete i[t]}}}n=this._prepareRequest(t,a,i);h=yield this.requestRaw(n,s);e--}if(!h.message.statusCode||!g.includes(h.message.statusCode)){return h}a+=1;if(a{function callbackForResult(t,e){if(t){i(t)}else if(!e){i(new Error("Unknown error"))}else{s(e)}}this.requestRawWithCallback(t,e,callbackForResult)}))}))}requestRawWithCallback(t,e,s){if(typeof e==="string"){if(!t.options.headers){t.options.headers={}}t.options.headers["Content-Length"]=Buffer.byteLength(e,"utf8")}let i=false;function handleResult(t,e){if(!i){i=true;s(t,e)}}const r=t.httpModule.request(t.options,(t=>{const e=new HttpClientResponse(t);handleResult(undefined,e)}));let n;r.on("socket",(t=>{n=t}));r.setTimeout(this._socketTimeout||3*6e4,(()=>{if(n){n.end()}handleResult(new Error(`Request timeout: ${t.options.path}`))}));r.on("error",(function(t){handleResult(t)}));if(e&&typeof e==="string"){r.write(e,"utf8")}if(e&&typeof e!=="string"){e.on("close",(function(){r.end()}));e.pipe(r)}else{r.end()}}getAgent(t){const e=new URL(t);return this._getAgent(e)}_prepareRequest(t,e,s){const i={};i.parsedUrl=e;const r=i.parsedUrl.protocol==="https:";i.httpModule=r?h:a;const n=r?443:80;i.options={};i.options.host=i.parsedUrl.hostname;i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):n;i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||"");i.options.method=t;i.options.headers=this._mergeHeaders(s);if(this.userAgent!=null){i.options.headers["user-agent"]=this.userAgent}i.options.agent=this._getAgent(i.parsedUrl);if(this.handlers){for(const t of this.handlers){t.prepareRequest(i.options)}}return i}_mergeHeaders(t){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(t||{}))}return lowercaseKeys(t||{})}_getExistingOrDefaultHeader(t,e,s){let i;if(this.requestOptions&&this.requestOptions.headers){i=lowercaseKeys(this.requestOptions.headers)[e]}return t[e]||i||s}_getAgent(t){let e;const s=l.getProxyUrl(t);const i=s&&s.hostname;if(this._keepAlive&&i){e=this._proxyAgent}if(this._keepAlive&&!i){e=this._agent}if(e){return e}const r=t.protocol==="https:";let n=100;if(this.requestOptions){n=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(s&&s.hostname){const t={maxSockets:n,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(s.username||s.password)&&{proxyAuth:`${s.username}:${s.password}`}),{host:s.hostname,port:s.port})};let i;const o=s.protocol==="https:";if(r){i=o?c.httpsOverHttps:c.httpsOverHttp}else{i=o?c.httpOverHttps:c.httpOverHttp}e=i(t);this._proxyAgent=e}if(this._keepAlive&&!e){const t={keepAlive:this._keepAlive,maxSockets:n};e=r?new h.Agent(t):new a.Agent(t);this._agent=e}if(!e){e=r?h.globalAgent:a.globalAgent}if(r&&this._ignoreSslError){e.options=Object.assign(e.options||{},{rejectUnauthorized:false})}return e}_performExponentialBackoff(t){return o(this,void 0,void 0,(function*(){t=Math.min(w,t);const e=b*Math.pow(2,t);return new Promise((t=>setTimeout((()=>t()),e)))}))}_processResponse(t,e){return o(this,void 0,void 0,(function*(){return new Promise(((s,i)=>o(this,void 0,void 0,(function*(){const r=t.message.statusCode||0;const n={statusCode:r,result:null,headers:{}};if(r===u.NotFound){s(n)}function dateTimeDeserializer(t,e){if(typeof e==="string"){const t=new Date(e);if(!isNaN(t.valueOf())){return t}}return e}let o;let a;try{a=yield t.readBody();if(a&&a.length>0){if(e&&e.deserializeDates){o=JSON.parse(a,dateTimeDeserializer)}else{o=JSON.parse(a)}n.result=o}n.headers=t.message.headers}catch(t){}if(r>299){let t;if(o&&o.message){t=o.message}else if(a&&a.length>0){t=a}else{t=`Failed request: (${r})`}const e=new HttpClientError(t,r);e.result=n.result;i(e)}else{s(n)}}))))}))}}e.HttpClient=HttpClient;const lowercaseKeys=t=>Object.keys(t).reduce(((e,s)=>(e[s.toLowerCase()]=t[s],e)),{})},835:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.checkBypass=e.getProxyUrl=void 0;function getProxyUrl(t){const e=t.protocol==="https:";if(checkBypass(t)){return undefined}const s=(()=>{if(e){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(s){return new URL(s)}else{return undefined}}e.getProxyUrl=getProxyUrl;function checkBypass(t){if(!t.hostname){return false}const e=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!e){return false}let s;if(t.port){s=Number(t.port)}else if(t.protocol==="http:"){s=80}else if(t.protocol==="https:"){s=443}const i=[t.hostname.toUpperCase()];if(typeof s==="number"){i.push(`${i[0]}:${s}`)}for(const t of e.split(",").map((t=>t.trim().toUpperCase())).filter((t=>t))){if(i.some((e=>e===t))){return true}}return false}e.checkBypass=checkBypass},417:t=>{"use strict";t.exports=balanced;function balanced(t,e,s){if(t instanceof RegExp)t=maybeMatch(t,s);if(e instanceof RegExp)e=maybeMatch(e,s);var i=range(t,e,s);return i&&{start:i[0],end:i[1],pre:s.slice(0,i[0]),body:s.slice(i[0]+t.length,i[1]),post:s.slice(i[1]+e.length)}}function maybeMatch(t,e){var s=e.match(t);return s?s[0]:null}balanced.range=range;function range(t,e,s){var i,r,n,o,a;var h=s.indexOf(t);var l=s.indexOf(e,h+1);var c=h;if(h>=0&&l>0){if(t===e){return[h,l]}i=[];n=s.length;while(c>=0&&!a){if(c==h){i.push(c);h=s.indexOf(t,c+1)}else if(i.length==1){a=[i.pop(),l]}else{r=i.pop();if(r=0?h:l}if(i.length){a=[n,o]}}return a}},850:(t,e,s)=>{var i=s(417);t.exports=expandTop;var r="\0SLASH"+Math.random()+"\0";var n="\0OPEN"+Math.random()+"\0";var o="\0CLOSE"+Math.random()+"\0";var a="\0COMMA"+Math.random()+"\0";var h="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(r).split("\\{").join(n).split("\\}").join(o).split("\\,").join(a).split("\\.").join(h)}function unescapeBraces(t){return t.split(r).join("\\").split(n).join("{").split(o).join("}").split(a).join(",").split(h).join(".")}function parseCommaParts(t){if(!t)return[""];var e=[];var s=i("{","}",t);if(!s)return t.split(",");var r=s.pre;var n=s.body;var o=s.post;var a=r.split(",");a[a.length-1]+="{"+n+"}";var h=parseCommaParts(o);if(o.length){a[a.length-1]+=h.shift();a.push.apply(a,h)}e.push.apply(e,a);return e}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,e){return t<=e}function gte(t,e){return t>=e}function expand(t,e){var s=[];var r=i("{","}",t);if(!r)return[t];var n=r.pre;var a=r.post.length?expand(r.post,false):[""];if(/\$$/.test(r.pre)){for(var h=0;h=0;if(!f&&!d){if(r.post.match(/,.*\}/)){t=r.pre+"{"+r.body+o+r.post;return expand(t)}return[t]}var p;if(f){p=r.body.split(/\.\./)}else{p=parseCommaParts(r.body);if(p.length===1){p=expand(p[0],false).map(embrace);if(p.length===1){return a.map((function(t){return r.pre+p[0]+t}))}}}var g;if(f){var y=numeric(p[0]);var w=numeric(p[1]);var b=Math.max(p[0].length,p[1].length);var v=p.length==3?Math.abs(numeric(p[2])):1;var S=lte;var _=w0){var C=new Array(E+1).join("0");if(x<0)O="-"+C+O.slice(1);else O=C+O}}}g.push(O)}}else{g=[];for(var P=0;P{t.exports=s(219)},219:(t,e,s)=>{"use strict";var i=s(808);var r=s(404);var n=s(685);var o=s(687);var a=s(361);var h=s(491);var l=s(837);e.httpOverHttp=httpOverHttp;e.httpsOverHttp=httpsOverHttp;e.httpOverHttps=httpOverHttps;e.httpsOverHttps=httpsOverHttps;function httpOverHttp(t){var e=new TunnelingAgent(t);e.request=n.request;return e}function httpsOverHttp(t){var e=new TunnelingAgent(t);e.request=n.request;e.createSocket=createSecureSocket;e.defaultPort=443;return e}function httpOverHttps(t){var e=new TunnelingAgent(t);e.request=o.request;return e}function httpsOverHttps(t){var e=new TunnelingAgent(t);e.request=o.request;e.createSocket=createSecureSocket;e.defaultPort=443;return e}function TunnelingAgent(t){var e=this;e.options=t||{};e.proxyOptions=e.options.proxy||{};e.maxSockets=e.options.maxSockets||n.Agent.defaultMaxSockets;e.requests=[];e.sockets=[];e.on("free",(function onFree(t,s,i,r){var n=toOptions(s,i,r);for(var o=0,a=e.requests.length;o=this.maxSockets){r.requests.push(n);return}r.createSocket(n,(function(e){e.on("free",onFree);e.on("close",onCloseOrRemove);e.on("agentRemove",onCloseOrRemove);t.onSocket(e);function onFree(){r.emit("free",e,n)}function onCloseOrRemove(t){r.removeSocket(e);e.removeListener("free",onFree);e.removeListener("close",onCloseOrRemove);e.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(t,e){var s=this;var i={};s.sockets.push(i);var r=mergeOptions({},s.proxyOptions,{method:"CONNECT",path:t.host+":"+t.port,agent:false,headers:{host:t.host+":"+t.port}});if(t.localAddress){r.localAddress=t.localAddress}if(r.proxyAuth){r.headers=r.headers||{};r.headers["Proxy-Authorization"]="Basic "+new Buffer(r.proxyAuth).toString("base64")}c("making CONNECT request");var n=s.request(r);n.useChunkedEncodingByDefault=false;n.once("response",onResponse);n.once("upgrade",onUpgrade);n.once("connect",onConnect);n.once("error",onError);n.end();function onResponse(t){t.upgrade=true}function onUpgrade(t,e,s){process.nextTick((function(){onConnect(t,e,s)}))}function onConnect(r,o,a){n.removeAllListeners();o.removeAllListeners();if(r.statusCode!==200){c("tunneling socket could not be established, statusCode=%d",r.statusCode);o.destroy();var h=new Error("tunneling socket could not be established, "+"statusCode="+r.statusCode);h.code="ECONNRESET";t.request.emit("error",h);s.removeSocket(i);return}if(a.length>0){c("got illegal response body from proxy");o.destroy();var h=new Error("got illegal response body from proxy");h.code="ECONNRESET";t.request.emit("error",h);s.removeSocket(i);return}c("tunneling connection has established");s.sockets[s.sockets.indexOf(i)]=o;return e(o)}function onError(e){n.removeAllListeners();c("tunneling socket could not be established, cause=%s\n",e.message,e.stack);var r=new Error("tunneling socket could not be established, "+"cause="+e.message);r.code="ECONNRESET";t.request.emit("error",r);s.removeSocket(i)}};TunnelingAgent.prototype.removeSocket=function removeSocket(t){var e=this.sockets.indexOf(t);if(e===-1){return}this.sockets.splice(e,1);var s=this.requests.shift();if(s){this.createSocket(s,(function(t){s.request.onSocket(t)}))}};function createSecureSocket(t,e){var s=this;TunnelingAgent.prototype.createSocket.call(s,t,(function(i){var n=t.request.getHeader("host");var o=mergeOptions({},s.options,{socket:i,servername:n?n.replace(/:.*$/,""):t.host});var a=r.connect(0,o);s.sockets[s.sockets.indexOf(i)]=a;e(a)}))}function toOptions(t,e,s){if(typeof t==="string"){return{host:t,port:e,localAddress:s}}return t}function mergeOptions(t){for(var e=1,s=arguments.length;e{"use strict";Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"v1",{enumerable:true,get:function(){return i.default}});Object.defineProperty(e,"v3",{enumerable:true,get:function(){return r.default}});Object.defineProperty(e,"v4",{enumerable:true,get:function(){return n.default}});Object.defineProperty(e,"v5",{enumerable:true,get:function(){return o.default}});Object.defineProperty(e,"NIL",{enumerable:true,get:function(){return a.default}});Object.defineProperty(e,"version",{enumerable:true,get:function(){return h.default}});Object.defineProperty(e,"validate",{enumerable:true,get:function(){return l.default}});Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return c.default}});Object.defineProperty(e,"parse",{enumerable:true,get:function(){return u.default}});var i=_interopRequireDefault(s(628));var r=_interopRequireDefault(s(409));var n=_interopRequireDefault(s(122));var o=_interopRequireDefault(s(120));var a=_interopRequireDefault(s(332));var h=_interopRequireDefault(s(595));var l=_interopRequireDefault(s(900));var c=_interopRequireDefault(s(950));var u=_interopRequireDefault(s(746));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}},569:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(113));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function md5(t){if(Array.isArray(t)){t=Buffer.from(t)}else if(typeof t==="string"){t=Buffer.from(t,"utf8")}return i.default.createHash("md5").update(t).digest()}var r=md5;e["default"]=r},332:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var s="00000000-0000-0000-0000-000000000000";e["default"]=s},746:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(900));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function parse(t){if(!(0,i.default)(t)){throw TypeError("Invalid UUID")}let e;const s=new Uint8Array(16);s[0]=(e=parseInt(t.slice(0,8),16))>>>24;s[1]=e>>>16&255;s[2]=e>>>8&255;s[3]=e&255;s[4]=(e=parseInt(t.slice(9,13),16))>>>8;s[5]=e&255;s[6]=(e=parseInt(t.slice(14,18),16))>>>8;s[7]=e&255;s[8]=(e=parseInt(t.slice(19,23),16))>>>8;s[9]=e&255;s[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255;s[11]=e/4294967296&255;s[12]=e>>>24&255;s[13]=e>>>16&255;s[14]=e>>>8&255;s[15]=e&255;return s}var r=parse;e["default"]=r},814:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;e["default"]=s},807:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=rng;var i=_interopRequireDefault(s(113));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const r=new Uint8Array(256);let n=r.length;function rng(){if(n>r.length-16){i.default.randomFillSync(r);n=0}return r.slice(n,n+=16)}},274:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(113));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function sha1(t){if(Array.isArray(t)){t=Buffer.from(t)}else if(typeof t==="string"){t=Buffer.from(t,"utf8")}return i.default.createHash("sha1").update(t).digest()}var r=sha1;e["default"]=r},950:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(900));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const r=[];for(let t=0;t<256;++t){r.push((t+256).toString(16).substr(1))}function stringify(t,e=0){const s=(r[t[e+0]]+r[t[e+1]]+r[t[e+2]]+r[t[e+3]]+"-"+r[t[e+4]]+r[t[e+5]]+"-"+r[t[e+6]]+r[t[e+7]]+"-"+r[t[e+8]]+r[t[e+9]]+"-"+r[t[e+10]]+r[t[e+11]]+r[t[e+12]]+r[t[e+13]]+r[t[e+14]]+r[t[e+15]]).toLowerCase();if(!(0,i.default)(s)){throw TypeError("Stringified UUID is invalid")}return s}var n=stringify;e["default"]=n},628:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(807));var r=_interopRequireDefault(s(950));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}let n;let o;let a=0;let h=0;function v1(t,e,s){let l=e&&s||0;const c=e||new Array(16);t=t||{};let u=t.node||n;let f=t.clockseq!==undefined?t.clockseq:o;if(u==null||f==null){const e=t.random||(t.rng||i.default)();if(u==null){u=n=[e[0]|1,e[1],e[2],e[3],e[4],e[5]]}if(f==null){f=o=(e[6]<<8|e[7])&16383}}let d=t.msecs!==undefined?t.msecs:Date.now();let p=t.nsecs!==undefined?t.nsecs:h+1;const g=d-a+(p-h)/1e4;if(g<0&&t.clockseq===undefined){f=f+1&16383}if((g<0||d>a)&&t.nsecs===undefined){p=0}if(p>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}a=d;h=p;o=f;d+=122192928e5;const y=((d&268435455)*1e4+p)%4294967296;c[l++]=y>>>24&255;c[l++]=y>>>16&255;c[l++]=y>>>8&255;c[l++]=y&255;const w=d/4294967296*1e4&268435455;c[l++]=w>>>8&255;c[l++]=w&255;c[l++]=w>>>24&15|16;c[l++]=w>>>16&255;c[l++]=f>>>8|128;c[l++]=f&255;for(let t=0;t<6;++t){c[l+t]=u[t]}return e||(0,r.default)(c)}var l=v1;e["default"]=l},409:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(998));var r=_interopRequireDefault(s(569));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const n=(0,i.default)("v3",48,r.default);var o=n;e["default"]=o},998:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=_default;e.URL=e.DNS=void 0;var i=_interopRequireDefault(s(950));var r=_interopRequireDefault(s(746));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function stringToBytes(t){t=unescape(encodeURIComponent(t));const e=[];for(let s=0;s{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(807));var r=_interopRequireDefault(s(950));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function v4(t,e,s){t=t||{};const n=t.random||(t.rng||i.default)();n[6]=n[6]&15|64;n[8]=n[8]&63|128;if(e){s=s||0;for(let t=0;t<16;++t){e[s+t]=n[t]}return e}return(0,r.default)(n)}var n=v4;e["default"]=n},120:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(998));var r=_interopRequireDefault(s(274));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const n=(0,i.default)("v5",80,r.default);var o=n;e["default"]=o},900:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(814));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function validate(t){return typeof t==="string"&&i.default.test(t)}var r=validate;e["default"]=r},595:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(900));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function version(t){if(!(0,i.default)(t)){throw TypeError("Invalid UUID")}return parseInt(t.substr(14,1),16)}var r=version;e["default"]=r},491:t=>{"use strict";t.exports=require("assert")},113:t=>{"use strict";t.exports=require("crypto")},361:t=>{"use strict";t.exports=require("events")},147:t=>{"use strict";t.exports=require("fs")},685:t=>{"use strict";t.exports=require("http")},687:t=>{"use strict";t.exports=require("https")},808:t=>{"use strict";t.exports=require("net")},37:t=>{"use strict";t.exports=require("os")},17:t=>{"use strict";t.exports=require("path")},404:t=>{"use strict";t.exports=require("tls")},837:t=>{"use strict";t.exports=require("util")}};var e={};function __nccwpck_require__(s){var i=e[s];if(i!==undefined){return i.exports}var r=e[s]={exports:{}};var n=true;try{t[s].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete e[s]}return r.exports}(()=>{var t=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;var e;__nccwpck_require__.t=function(s,i){if(i&1)s=this(s);if(i&8)return s;if(typeof s==="object"&&s){if(i&4&&s.__esModule)return s;if(i&16&&typeof s.then==="function")return s}var r=Object.create(null);__nccwpck_require__.r(r);var n={};e=e||[null,t({}),t([]),t(t)];for(var o=i&2&&s;typeof o=="object"&&!~e.indexOf(o);o=t(o)){Object.getOwnPropertyNames(o).forEach((t=>n[t]=()=>s[t]))}n["default"]=()=>s;__nccwpck_require__.d(r,n);return r}})();(()=>{__nccwpck_require__.d=(t,e)=>{for(var s in e){if(__nccwpck_require__.o(e,s)&&!__nccwpck_require__.o(t,s)){Object.defineProperty(t,s,{enumerable:true,get:e[s]})}}}})();(()=>{__nccwpck_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var s={};(()=>{"use strict";__nccwpck_require__.r(s);var t=__nccwpck_require__(186);var e=__nccwpck_require__(850);const i=1024*64;const assertValidPattern=t=>{if(typeof t!=="string"){throw new TypeError("invalid pattern")}if(t.length>i){throw new TypeError("pattern is too long")}};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=t=>t.replace(/[[\]\\-]/g,"\\$&");const regexpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const rangesToString=t=>t.join("");const parseClass=(t,e)=>{const s=e;if(t.charAt(s)!=="["){throw new Error("not in a brace expression")}const i=[];const n=[];let o=s+1;let a=false;let h=false;let l=false;let c=false;let u=s;let f="";t:while(of){i.push(braceEscape(f)+"-"+braceEscape(e))}else if(e===f){i.push(braceEscape(e))}f="";o++;continue}if(t.startsWith("-]",o+1)){i.push(braceEscape(e+"-"));o+=2;continue}if(t.startsWith("-",o+1)){f=e;o+=2;continue}i.push(braceEscape(e));o++}if(ue?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");const n=new Set(["!","?","+","*","@"]);const isExtglobType=t=>n.has(t);const o="(?!\\.\\.?(?:$|/))";const a="(?!\\.)";const h=new Set(["[","."]);const l=new Set(["..","."]);const c=new Set("().*{}+?[]^$\\!");const regExpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const u="[^/]";const f=u+"*?";const d=u+"+?";class AST{type;#t;#e;#s=false;#i=[];#r;#n;#o;#a=false;#h;#l;#c=false;constructor(t,e,s={}){this.type=t;if(t)this.#e=true;this.#r=e;this.#t=this.#r?this.#r.#t:this;this.#h=this.#t===this?s:this.#t.#h;this.#o=this.#t===this?[]:this.#t.#o;if(t==="!"&&!this.#t.#a)this.#o.push(this);this.#n=this.#r?this.#r.#i.length:0}get hasMagic(){if(this.#e!==undefined)return this.#e;for(const t of this.#i){if(typeof t==="string")continue;if(t.type||t.hasMagic)return this.#e=true}return this.#e}toString(){if(this.#l!==undefined)return this.#l;if(!this.type){return this.#l=this.#i.map((t=>String(t))).join("")}else{return this.#l=this.type+"("+this.#i.map((t=>String(t))).join("|")+")"}}#u(){if(this!==this.#t)throw new Error("should only call on root");if(this.#a)return this;this.toString();this.#a=true;let t;while(t=this.#o.pop()){if(t.type!=="!")continue;let e=t;let s=e.#r;while(s){for(let i=e.#n+1;!s.type&&itypeof t==="string"?t:t.toJSON())):[this.type,...this.#i.map((t=>t.toJSON()))];if(this.isStart()&&!this.type)t.unshift([]);if(this.isEnd()&&(this===this.#t||this.#t.#a&&this.#r?.type==="!")){t.push({})}return t}isStart(){if(this.#t===this)return true;if(!this.#r?.isStart())return false;if(this.#n===0)return true;const t=this.#r;for(let e=0;e{const[s,i,r,n]=typeof e==="string"?AST.#d(e,this.#e,t):e.toRegExpSource();this.#e=this.#e||r;this.#s=this.#s||n;return s})).join("");let s="";if(this.isStart()){if(typeof this.#i[0]==="string"){const t=this.#i.length===1&&l.has(this.#i[0]);if(!t){const t=h;const i=this.#h.dot&&t.has(e.charAt(0))||e.startsWith("\\.")&&t.has(e.charAt(2))||e.startsWith("\\.\\.")&&t.has(e.charAt(4));const r=!this.#h.dot&&t.has(e.charAt(0));s=i?o:r?a:""}}}let i="";if(this.isEnd()&&this.#t.#a&&this.#r?.type==="!"){i="(?:$|\\/)"}const r=s+e+i;return[r,unescape_unescape(e),this.#e=!!this.#e,this.#s]}const t=this.type==="!"?"(?:(?!(?:":"(?:";const e=this.#i.map((t=>{if(typeof t==="string"){throw new Error("string type in extglob ast??")}const[e,s,i,r]=t.toRegExpSource();this.#s=this.#s||r;return e})).filter((t=>!(this.isStart()&&this.isEnd())||!!t)).join("|");if(this.isStart()&&this.isEnd()&&!e&&this.type!=="!"){const t=this.toString();this.#i=[t];this.type=null;this.#e=undefined;return[t,unescape_unescape(this.toString()),false,false]}let s="";if(this.type==="!"&&this.#c){s=(this.isStart()&&!this.#h.dot?a:"")+d}else{const i=this.type==="!"?"))"+(this.isStart()&&!this.#h.dot?a:"")+f+")":this.type==="@"?")":`)${this.type}`;s=t+e+i}return[s,unescape_unescape(e),this.#e=!!this.#e,this.#s]}static#d(t,e,s=false){let i=false;let r="";let n=false;for(let o=0;oe?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");const minimatch=(t,e,s={})=>{assertValidPattern(e);if(!s.nocomment&&e.charAt(0)==="#"){return false}return new Minimatch(e,s).match(t)};const p=/^\*+([^+@!?\*\[\(]*)$/;const starDotExtTest=t=>e=>!e.startsWith(".")&&e.endsWith(t);const starDotExtTestDot=t=>e=>e.endsWith(t);const starDotExtTestNocase=t=>{t=t.toLowerCase();return e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)};const starDotExtTestNocaseDot=t=>{t=t.toLowerCase();return e=>e.toLowerCase().endsWith(t)};const g=/^\*+\.\*+$/;const starDotStarTest=t=>!t.startsWith(".")&&t.includes(".");const starDotStarTestDot=t=>t!=="."&&t!==".."&&t.includes(".");const y=/^\.\*+$/;const dotStarTest=t=>t!=="."&&t!==".."&&t.startsWith(".");const w=/^\*+$/;const starTest=t=>t.length!==0&&!t.startsWith(".");const starTestDot=t=>t.length!==0&&t!=="."&&t!=="..";const b=/^\?+([^+@!?\*\[\(]*)?$/;const qmarksTestNocase=([t,e=""])=>{const s=qmarksTestNoExt([t]);if(!e)return s;e=e.toLowerCase();return t=>s(t)&&t.toLowerCase().endsWith(e)};const qmarksTestNocaseDot=([t,e=""])=>{const s=qmarksTestNoExtDot([t]);if(!e)return s;e=e.toLowerCase();return t=>s(t)&&t.toLowerCase().endsWith(e)};const qmarksTestDot=([t,e=""])=>{const s=qmarksTestNoExtDot([t]);return!e?s:t=>s(t)&&t.endsWith(e)};const qmarksTest=([t,e=""])=>{const s=qmarksTestNoExt([t]);return!e?s:t=>s(t)&&t.endsWith(e)};const qmarksTestNoExt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")};const qmarksTestNoExtDot=([t])=>{const e=t.length;return t=>t.length===e&&t!=="."&&t!==".."};const v=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";const S={win32:{sep:"\\"},posix:{sep:"/"}};const _=v==="win32"?S.win32.sep:S.posix.sep;minimatch.sep=_;const k=Symbol("globstar **");minimatch.GLOBSTAR=k;const x="[^/]";const O=x+"*?";const E="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";const C="(?:(?!(?:\\/|^)\\.).)*?";const filter=(t,e={})=>s=>minimatch(s,t,e);minimatch.filter=filter;const ext=(t,e={})=>Object.assign({},t,e);const defaults=t=>{if(!t||typeof t!=="object"||!Object.keys(t).length){return minimatch}const e=minimatch;const m=(s,i,r={})=>e(s,i,ext(t,r));return Object.assign(m,{Minimatch:class Minimatch extends e.Minimatch{constructor(e,s={}){super(e,ext(t,s))}static defaults(s){return e.defaults(ext(t,s)).Minimatch}},AST:class AST extends e.AST{constructor(e,s,i={}){super(e,s,ext(t,i))}static fromGlob(s,i={}){return e.AST.fromGlob(s,ext(t,i))}},unescape:(s,i={})=>e.unescape(s,ext(t,i)),escape:(s,i={})=>e.escape(s,ext(t,i)),filter:(s,i={})=>e.filter(s,ext(t,i)),defaults:s=>e.defaults(ext(t,s)),makeRe:(s,i={})=>e.makeRe(s,ext(t,i)),braceExpand:(s,i={})=>e.braceExpand(s,ext(t,i)),match:(s,i,r={})=>e.match(s,i,ext(t,r)),sep:e.sep,GLOBSTAR:k})};minimatch.defaults=defaults;const braceExpand=(t,s={})=>{assertValidPattern(t);if(s.nobrace||!/\{(?:(?!\{).)*\}/.test(t)){return[t]}return e(t)};minimatch.braceExpand=braceExpand;const makeRe=(t,e={})=>new Minimatch(t,e).makeRe();minimatch.makeRe=makeRe;const match=(t,e,s={})=>{const i=new Minimatch(e,s);t=t.filter((t=>i.match(t)));if(i.options.nonull&&!t.length){t.push(e)}return t};minimatch.match=match;const P=/[?*]|[+@!]\(.*?\)|\[|\]/;const mjs_regExpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Minimatch{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){assertValidPattern(t);e=e||{};this.options=e;this.pattern=t;this.platform=e.platform||v;this.isWindows=this.platform==="win32";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false;if(this.windowsPathsNoEscape){this.pattern=this.pattern.replace(/\\/g,"/")}this.preserveMultipleSlashes=!!e.preserveMultipleSlashes;this.regexp=null;this.negate=false;this.nonegate=!!e.nonegate;this.comment=false;this.empty=false;this.partial=!!e.partial;this.nocase=!!this.options.nocase;this.windowsNoMagicRoot=e.windowsNoMagicRoot!==undefined?e.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 t of this.set){for(const e of t){if(typeof e!=="string")return true}}return false}debug(...t){}make(){const t=this.pattern;const e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();this.globSet=[...new Set(this.braceExpand())];if(e.debug){this.debug=(...t)=>console.error(...t)}this.debug(this.pattern,this.globSet);const s=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(s);this.debug(this.pattern,this.globParts);let i=this.globParts.map(((t,e,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=t[0]===""&&t[1]===""&&(t[2]==="?"||!P.test(t[2]))&&!P.test(t[3]);const s=/^[a-z]:/i.test(t[0]);if(e){return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))]}else if(s){return[t[0],...t.slice(1).map((t=>this.parse(t)))]}}return t.map((t=>this.parse(t)))}));this.debug(this.pattern,i);this.set=i.filter((t=>t.indexOf(false)===-1));if(this.isWindows){for(let t=0;t=2){t=this.firstPhasePreProcess(t);t=this.secondPhasePreProcess(t)}else if(e>=1){t=this.levelOneOptimize(t)}else{t=this.adjascentGlobstarOptimize(t)}return t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;while(-1!==(e=t.indexOf("**",e+1))){let s=e;while(t[s+1]==="**"){s++}if(s!==e){t.splice(e,s-e)}}return t}))}levelOneOptimize(t){return t.map((t=>{t=t.reduce(((t,e)=>{const s=t[t.length-1];if(e==="**"&&s==="**"){return t}if(e===".."){if(s&&s!==".."&&s!=="."&&s!=="**"){t.pop();return t}}t.push(e);return t}),[]);return t.length===0?[""]:t}))}levelTwoFileOptimize(t){if(!Array.isArray(t)){t=this.slashSplit(t)}let e=false;do{e=false;if(!this.preserveMultipleSlashes){for(let s=1;si){s.splice(i+1,r-i)}let n=s[i+1];const o=s[i+2];const a=s[i+3];if(n!=="..")continue;if(!o||o==="."||o===".."||!a||a==="."||a===".."){continue}e=true;s.splice(i,1);const h=s.slice(0);h[i]="**";t.push(h);i--}if(!this.preserveMultipleSlashes){for(let t=1;tt.length))}partsMatch(t,e,s=false){let i=0;let r=0;let n=[];let o="";while(io){e=e.slice(a)}else if(o>a){t=t.slice(o)}}}}const{optimizationLevel:r=1}=this.options;if(r>=2){t=this.levelTwoFileOptimize(t)}this.debug("matchOne",this,{file:t,pattern:e});this.debug("matchOne",t.length,e.length);for(var n=0,o=0,a=t.length,h=e.length;n>> no match, partial?",t,u,e,f);if(u===a){return true}}return false}let r;if(typeof l==="string"){r=c===l;this.debug("string match",l,c,r)}else{r=l.test(c);this.debug("pattern match",l,c,r)}if(!r)return false}if(n===a&&o===h){return true}else if(n===a){return s}else if(o===h){return n===a-1&&t[n]===""}else{throw new Error("wtf?")}}braceExpand(){return braceExpand(this.pattern,this.options)}parse(t){assertValidPattern(t);const e=this.options;if(t==="**")return k;if(t==="")return"";let s;let i=null;if(s=t.match(w)){i=e.dot?starTestDot:starTest}else if(s=t.match(p)){i=(e.nocase?e.dot?starDotExtTestNocaseDot:starDotExtTestNocase:e.dot?starDotExtTestDot:starDotExtTest)(s[1])}else if(s=t.match(b)){i=(e.nocase?e.dot?qmarksTestNocaseDot:qmarksTestNocase:e.dot?qmarksTestDot:qmarksTest)(s)}else if(s=t.match(g)){i=e.dot?starDotStarTestDot:starDotStarTest}else if(s=t.match(y)){i=dotStarTest}const r=AST.fromGlob(t,this.options).toMMPattern();return i?Object.assign(r,{test:i}):r}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;const t=this.set;if(!t.length){this.regexp=false;return this.regexp}const e=this.options;const s=e.noglobstar?O:e.dot?E:C;const i=new Set(e.nocase?["i"]:[]);let r=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp){for(const e of t.flags.split(""))i.add(e)}return typeof t==="string"?mjs_regExpEscape(t):t===k?k:t._src}));e.forEach(((t,i)=>{const r=e[i+1];const n=e[i-1];if(t!==k||n===k){return}if(n===undefined){if(r!==undefined&&r!==k){e[i+1]="(?:\\/|"+s+"\\/)?"+r}else{e[i]=s}}else if(r===undefined){e[i-1]=n+"(?:\\/|"+s+")?"}else if(r!==k){e[i-1]=n+"(?:\\/|\\/"+s+"\\/)"+r;e[i+1]=k}}));return e.filter((t=>t!==k)).join("/")})).join("|");const[n,o]=t.length>1?["(?:",")"]:["",""];r="^"+n+r+o+"$";if(this.negate)r="^(?!"+r+").+$";try{this.regexp=new RegExp(r,[...i].join(""))}catch(t){this.regexp=false}return this.regexp}slashSplit(t){if(this.preserveMultipleSlashes){return t.split("/")}else if(this.isWindows&&/^\/\/[^\/]+/.test(t)){return["",...t.split(/\/+/)]}else{return t.split(/\/+/)}}match(t,e=this.partial){this.debug("match",t,this.pattern);if(this.comment){return false}if(this.empty){return t===""}if(t==="/"&&e){return true}const s=this.options;if(this.isWindows){t=t.split("\\").join("/")}const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const r=this.set;this.debug(this.pattern,"set",r);let n=i[i.length-1];if(!n){for(let t=i.length-2;!n&&t>=0;t--){n=i[t]}}for(let t=0;t{typeof A.emitWarning==="function"?A.emitWarning(t,e,s,i):console.error(`[${s}] ${e}: ${t}`)};let M=globalThis.AbortController;let L=globalThis.AbortSignal;if(typeof M==="undefined"){L=class AbortSignal{onabort;_onabort=[];reason;aborted=false;addEventListener(t,e){this._onabort.push(e)}};M=class AbortController{constructor(){warnACPolyfill()}signal=new L;abort(t){if(this.signal.aborted)return;this.signal.reason=t;this.signal.aborted=true;for(const e of this.signal._onabort){e(t)}this.signal.onabort?.(t)}};let t=A.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const warnACPolyfill=()=>{if(!t)return;t=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=t=>!R.has(t);const D=Symbol("type");const isPosInt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t);const getUintArray=t=>!isPosInt(t)?null:t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(t){super(t);this.fill(0)}}class Stack{heap;length;static#p=false;static create(t){const e=getUintArray(t);if(!e)return[];Stack.#p=true;const s=new Stack(t,e);Stack.#p=false;return s}constructor(t,e){if(!Stack.#p){throw new TypeError("instantiate Stack using Stack.create(n)")}this.heap=new e(t);this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class LRUCache{#g;#m;#y;#w;#b;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#v;#S;#_;#k;#x;#O;#E;#C;#P;#T;#R;#A;#M;#L;#D;#F;#j;static unsafeExposeInternals(t){return{starts:t.#M,ttls:t.#L,sizes:t.#A,keyMap:t.#_,keyList:t.#k,valList:t.#x,next:t.#O,prev:t.#E,get head(){return t.#C},get tail(){return t.#P},free:t.#T,isBackgroundFetch:e=>t.#B(e),backgroundFetch:(e,s,i,r)=>t.#N(e,s,i,r),moveToTail:e=>t.#I(e),indexes:e=>t.#U(e),rindexes:e=>t.#q(e),isStale:e=>t.#z(e)}}get max(){return this.#g}get maxSize(){return this.#m}get calculatedSize(){return this.#S}get size(){return this.#v}get fetchMethod(){return this.#b}get dispose(){return this.#y}get disposeAfter(){return this.#w}constructor(t){const{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:n,updateAgeOnHas:o,allowStale:a,dispose:h,disposeAfter:l,noDisposeOnSet:c,noUpdateTTL:u,maxSize:f=0,maxEntrySize:d=0,sizeCalculation:p,fetchMethod:g,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:v,ignoreFetchAbort:S}=t;if(e!==0&&!isPosInt(e)){throw new TypeError("max option must be a nonnegative integer")}const _=e?getUintArray(e):Array;if(!_){throw new Error("invalid max value: "+e)}this.#g=e;this.#m=f;this.maxEntrySize=d||this.#m;this.sizeCalculation=p;if(this.sizeCalculation){if(!this.#m&&!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(g!==undefined&&typeof g!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.#b=g;this.#F=!!g;this.#_=new Map;this.#k=new Array(e).fill(undefined);this.#x=new Array(e).fill(undefined);this.#O=new _(e);this.#E=new _(e);this.#C=0;this.#P=0;this.#T=Stack.create(e);this.#v=0;this.#S=0;if(typeof h==="function"){this.#y=h}if(typeof l==="function"){this.#w=l;this.#R=[]}else{this.#w=undefined;this.#R=undefined}this.#D=!!this.#y;this.#j=!!this.#w;this.noDisposeOnSet=!!c;this.noUpdateTTL=!!u;this.noDeleteOnFetchRejection=!!y;this.allowStaleOnFetchRejection=!!b;this.allowStaleOnFetchAbort=!!v;this.ignoreFetchAbort=!!S;if(this.maxEntrySize!==0){if(this.#m!==0){if(!isPosInt(this.#m)){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.#W()}this.allowStale=!!a;this.noDeleteOnStaleGet=!!w;this.updateAgeOnGet=!!n;this.updateAgeOnHas=!!o;this.ttlResolution=isPosInt(i)||i===0?i:1;this.ttlAutopurge=!!r;this.ttl=s||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.#$()}if(this.#g===0&&this.ttl===0&&this.#m===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.#g&&!this.#m){const t="LRU_CACHE_UNBOUNDED";if(shouldWarn(t)){R.add(t);const e="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";emitWarning(e,"UnboundedCacheWarning",t,LRUCache)}}}getRemainingTTL(t){return this.#_.has(t)?Infinity:0}#$(){const t=new ZeroArray(this.#g);const e=new ZeroArray(this.#g);this.#L=t;this.#M=e;this.#H=(s,i,r=T.now())=>{e[s]=i!==0?r:0;t[s]=i;if(i!==0&&this.ttlAutopurge){const t=setTimeout((()=>{if(this.#z(s)){this.delete(this.#k[s])}}),i+1);if(t.unref){t.unref()}}};this.#G=s=>{e[s]=t[s]!==0?T.now():0};this.#V=(i,r)=>{if(t[r]){const n=t[r];const o=e[r];if(!n||!o)return;i.ttl=n;i.start=o;i.now=s||getNow();const a=i.now-o;i.remainingTTL=n-a}};let s=0;const getNow=()=>{const t=T.now();if(this.ttlResolution>0){s=t;const e=setTimeout((()=>s=0),this.ttlResolution);if(e.unref){e.unref()}}return t};this.getRemainingTTL=i=>{const r=this.#_.get(i);if(r===undefined){return 0}const n=t[r];const o=e[r];if(!n||!o){return Infinity}const a=(s||getNow())-o;return n-a};this.#z=i=>{const r=e[i];const n=t[i];return!!n&&!!r&&(s||getNow())-r>n}}#G=()=>{};#V=()=>{};#H=()=>{};#z=()=>false;#W(){const t=new ZeroArray(this.#g);this.#S=0;this.#A=t;this.#J=e=>{this.#S-=t[e];t[e]=0};this.#K=(t,e,s,i)=>{if(this.#B(e)){return 0}if(!isPosInt(s)){if(i){if(typeof i!=="function"){throw new TypeError("sizeCalculation must be a function")}s=i(e,t);if(!isPosInt(s)){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 s};this.#Y=(e,s,i)=>{t[e]=s;if(this.#m){const s=this.#m-t[e];while(this.#S>s){this.#Z(true)}}this.#S+=t[e];if(i){i.entrySize=s;i.totalCalculatedSize=this.#S}}}#J=t=>{};#Y=(t,e,s)=>{};#K=(t,e,s,i)=>{if(s||i){throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}return 0};*#U({allowStale:t=this.allowStale}={}){if(this.#v){for(let e=this.#P;true;){if(!this.#Q(e)){break}if(t||!this.#z(e)){yield e}if(e===this.#C){break}else{e=this.#E[e]}}}}*#q({allowStale:t=this.allowStale}={}){if(this.#v){for(let e=this.#C;true;){if(!this.#Q(e)){break}if(t||!this.#z(e)){yield e}if(e===this.#P){break}else{e=this.#O[e]}}}}#Q(t){return t!==undefined&&this.#_.get(this.#k[t])===t}*entries(){for(const t of this.#U()){if(this.#x[t]!==undefined&&this.#k[t]!==undefined&&!this.#B(this.#x[t])){yield[this.#k[t],this.#x[t]]}}}*rentries(){for(const t of this.#q()){if(this.#x[t]!==undefined&&this.#k[t]!==undefined&&!this.#B(this.#x[t])){yield[this.#k[t],this.#x[t]]}}}*keys(){for(const t of this.#U()){const e=this.#k[t];if(e!==undefined&&!this.#B(this.#x[t])){yield e}}}*rkeys(){for(const t of this.#q()){const e=this.#k[t];if(e!==undefined&&!this.#B(this.#x[t])){yield e}}}*values(){for(const t of this.#U()){const e=this.#x[t];if(e!==undefined&&!this.#B(this.#x[t])){yield this.#x[t]}}}*rvalues(){for(const t of this.#q()){const e=this.#x[t];if(e!==undefined&&!this.#B(this.#x[t])){yield this.#x[t]}}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const s of this.#U()){const i=this.#x[s];const r=this.#B(i)?i.__staleWhileFetching:i;if(r===undefined)continue;if(t(r,this.#k[s],this)){return this.get(this.#k[s],e)}}}forEach(t,e=this){for(const s of this.#U()){const i=this.#x[s];const r=this.#B(i)?i.__staleWhileFetching:i;if(r===undefined)continue;t.call(e,r,this.#k[s],this)}}rforEach(t,e=this){for(const s of this.#q()){const i=this.#x[s];const r=this.#B(i)?i.__staleWhileFetching:i;if(r===undefined)continue;t.call(e,r,this.#k[s],this)}}purgeStale(){let t=false;for(const e of this.#q({allowStale:true})){if(this.#z(e)){this.delete(this.#k[e]);t=true}}return t}info(t){const e=this.#_.get(t);if(e===undefined)return undefined;const s=this.#x[e];const i=this.#B(s)?s.__staleWhileFetching:s;if(i===undefined)return undefined;const r={value:i};if(this.#L&&this.#M){const t=this.#L[e];const s=this.#M[e];if(t&&s){const e=t-(T.now()-s);r.ttl=e;r.start=Date.now()}}if(this.#A){r.size=this.#A[e]}return r}dump(){const t=[];for(const e of this.#U({allowStale:true})){const s=this.#k[e];const i=this.#x[e];const r=this.#B(i)?i.__staleWhileFetching:i;if(r===undefined||s===undefined)continue;const n={value:r};if(this.#L&&this.#M){n.ttl=this.#L[e];const t=T.now()-this.#M[e];n.start=Math.floor(Date.now()-t)}if(this.#A){n.size=this.#A[e]}t.unshift([s,n])}return t}load(t){this.clear();for(const[e,s]of t){if(s.start){const t=Date.now()-s.start;s.start=T.now()-t}this.set(e,s.value,s)}}set(t,e,s={}){if(e===undefined){this.delete(t);return this}const{ttl:i=this.ttl,start:r,noDisposeOnSet:n=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=s;let{noUpdateTTL:h=this.noUpdateTTL}=s;const l=this.#K(t,e,s.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize){if(a){a.set="miss";a.maxEntrySizeExceeded=true}this.delete(t);return this}let c=this.#v===0?undefined:this.#_.get(t);if(c===undefined){c=this.#v===0?this.#P:this.#T.length!==0?this.#T.pop():this.#v===this.#g?this.#Z(false):this.#v;this.#k[c]=t;this.#x[c]=e;this.#_.set(t,c);this.#O[this.#P]=c;this.#E[c]=this.#P;this.#P=c;this.#v++;this.#Y(c,l,a);if(a)a.set="add";h=false}else{this.#I(c);const s=this.#x[c];if(e!==s){if(this.#F&&this.#B(s)){s.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:e}=s;if(e!==undefined&&!n){if(this.#D){this.#y?.(e,t,"set")}if(this.#j){this.#R?.push([e,t,"set"])}}}else if(!n){if(this.#D){this.#y?.(s,t,"set")}if(this.#j){this.#R?.push([s,t,"set"])}}this.#J(c);this.#Y(c,l,a);this.#x[c]=e;if(a){a.set="replace";const t=s&&this.#B(s)?s.__staleWhileFetching:s;if(t!==undefined)a.oldValue=t}}else if(a){a.set="update"}}if(i!==0&&!this.#L){this.#$()}if(this.#L){if(!h){this.#H(c,i,r)}if(a)this.#V(a,c)}if(!n&&this.#j&&this.#R){const t=this.#R;let e;while(e=t?.shift()){this.#w?.(...e)}}return this}pop(){try{while(this.#v){const t=this.#x[this.#C];this.#Z(true);if(this.#B(t)){if(t.__staleWhileFetching){return t.__staleWhileFetching}}else if(t!==undefined){return t}}}finally{if(this.#j&&this.#R){const t=this.#R;let e;while(e=t?.shift()){this.#w?.(...e)}}}}#Z(t){const e=this.#C;const s=this.#k[e];const i=this.#x[e];if(this.#F&&this.#B(i)){i.__abortController.abort(new Error("evicted"))}else if(this.#D||this.#j){if(this.#D){this.#y?.(i,s,"evict")}if(this.#j){this.#R?.push([i,s,"evict"])}}this.#J(e);if(t){this.#k[e]=undefined;this.#x[e]=undefined;this.#T.push(e)}if(this.#v===1){this.#C=this.#P=0;this.#T.length=0}else{this.#C=this.#O[e]}this.#_.delete(s);this.#v--;return e}has(t,e={}){const{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e;const r=this.#_.get(t);if(r!==undefined){const t=this.#x[r];if(this.#B(t)&&t.__staleWhileFetching===undefined){return false}if(!this.#z(r)){if(s){this.#G(r)}if(i){i.has="hit";this.#V(i,r)}return true}else if(i){i.has="stale";this.#V(i,r)}}else if(i){i.has="miss"}return false}peek(t,e={}){const{allowStale:s=this.allowStale}=e;const i=this.#_.get(t);if(i===undefined||!s&&this.#z(i)){return}const r=this.#x[i];return this.#B(r)?r.__staleWhileFetching:r}#N(t,e,s,i){const r=e===undefined?undefined:this.#x[e];if(this.#B(r)){return r}const n=new M;const{signal:o}=s;o?.addEventListener("abort",(()=>n.abort(o.reason)),{signal:n.signal});const a={signal:n.signal,options:s,context:i};const cb=(i,r=false)=>{const{aborted:o}=n.signal;const l=s.ignoreFetchAbort&&i!==undefined;if(s.status){if(o&&!r){s.status.fetchAborted=true;s.status.fetchError=n.signal.reason;if(l)s.status.fetchAbortIgnored=true}else{s.status.fetchResolved=true}}if(o&&!l&&!r){return fetchFail(n.signal.reason)}const c=h;if(this.#x[e]===h){if(i===undefined){if(c.__staleWhileFetching){this.#x[e]=c.__staleWhileFetching}else{this.delete(t)}}else{if(s.status)s.status.fetchUpdated=true;this.set(t,i,a.options)}}return i};const eb=t=>{if(s.status){s.status.fetchRejected=true;s.status.fetchError=t}return fetchFail(t)};const fetchFail=i=>{const{aborted:r}=n.signal;const o=r&&s.allowStaleOnFetchAbort;const a=o||s.allowStaleOnFetchRejection;const l=a||s.noDeleteOnFetchRejection;const c=h;if(this.#x[e]===h){const s=!l||c.__staleWhileFetching===undefined;if(s){this.delete(t)}else if(!o){this.#x[e]=c.__staleWhileFetching}}if(a){if(s.status&&c.__staleWhileFetching!==undefined){s.status.returnedStale=true}return c.__staleWhileFetching}else if(c.__returned===c){throw i}};const pcall=(e,i)=>{const o=this.#b?.(t,r,a);if(o&&o instanceof Promise){o.then((t=>e(t===undefined?undefined:t)),i)}n.signal.addEventListener("abort",(()=>{if(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort){e(undefined);if(s.allowStaleOnFetchAbort){e=t=>cb(t,true)}}}))};if(s.status)s.status.fetchDispatched=true;const h=new Promise(pcall).then(cb,eb);const l=Object.assign(h,{__abortController:n,__staleWhileFetching:r,__returned:undefined});if(e===undefined){this.set(t,l,{...a.options,status:undefined});e=this.#_.get(t)}else{this.#x[e]=l}return l}#B(t){if(!this.#F)return false;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof M}async fetch(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:p,forceRefresh:g=false,status:y,signal:w}=e;if(!this.#F){if(y)y.fetch="get";return this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:y})}const b={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:n,noDisposeOnSet:o,size:a,sizeCalculation:h,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:d,ignoreFetchAbort:f,status:y,signal:w};let v=this.#_.get(t);if(v===undefined){if(y)y.fetch="miss";const e=this.#N(t,v,b,p);return e.__returned=e}else{const e=this.#x[v];if(this.#B(e)){const t=s&&e.__staleWhileFetching!==undefined;if(y){y.fetch="inflight";if(t)y.returnedStale=true}return t?e.__staleWhileFetching:e.__returned=e}const r=this.#z(v);if(!g&&!r){if(y)y.fetch="hit";this.#I(v);if(i){this.#G(v)}if(y)this.#V(y,v);return e}const n=this.#N(t,v,b,p);const o=n.__staleWhileFetching!==undefined;const a=o&&s;if(y){y.fetch=r?"stale":"refresh";if(a&&r)y.returnedStale=true}return a?n.__staleWhileFetching:n.__returned=n}}get(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:n}=e;const o=this.#_.get(t);if(o!==undefined){const e=this.#x[o];const a=this.#B(e);if(n)this.#V(n,o);if(this.#z(o)){if(n)n.get="stale";if(!a){if(!r){this.delete(t)}if(n&&s)n.returnedStale=true;return s?e:undefined}else{if(n&&s&&e.__staleWhileFetching!==undefined){n.returnedStale=true}return s?e.__staleWhileFetching:undefined}}else{if(n)n.get="hit";if(a){return e.__staleWhileFetching}this.#I(o);if(i){this.#G(o)}return e}}else if(n){n.get="miss"}}#X(t,e){this.#E[e]=t;this.#O[t]=e}#I(t){if(t!==this.#P){if(t===this.#C){this.#C=this.#O[t]}else{this.#X(this.#E[t],this.#O[t])}this.#X(this.#P,t);this.#P=t}}delete(t){let e=false;if(this.#v!==0){const s=this.#_.get(t);if(s!==undefined){e=true;if(this.#v===1){this.clear()}else{this.#J(s);const e=this.#x[s];if(this.#B(e)){e.__abortController.abort(new Error("deleted"))}else if(this.#D||this.#j){if(this.#D){this.#y?.(e,t,"delete")}if(this.#j){this.#R?.push([e,t,"delete"])}}this.#_.delete(t);this.#k[s]=undefined;this.#x[s]=undefined;if(s===this.#P){this.#P=this.#E[s]}else if(s===this.#C){this.#C=this.#O[s]}else{const t=this.#E[s];this.#O[t]=this.#O[s];const e=this.#O[s];this.#E[e]=this.#E[s]}this.#v--;this.#T.push(s)}}}if(this.#j&&this.#R?.length){const t=this.#R;let e;while(e=t?.shift()){this.#w?.(...e)}}return e}clear(){for(const t of this.#q({allowStale:true})){const e=this.#x[t];if(this.#B(e)){e.__abortController.abort(new Error("deleted"))}else{const s=this.#k[t];if(this.#D){this.#y?.(e,s,"delete")}if(this.#j){this.#R?.push([e,s,"delete"])}}}this.#_.clear();this.#x.fill(undefined);this.#k.fill(undefined);if(this.#L&&this.#M){this.#L.fill(0);this.#M.fill(0)}if(this.#A){this.#A.fill(0)}this.#C=0;this.#P=0;this.#T.length=0;this.#S=0;this.#v=0;if(this.#j&&this.#R){const t=this.#R;let e;while(e=t?.shift()){this.#w?.(...e)}}}}var F=__nccwpck_require__(17);const j=require("url");var B=__nccwpck_require__(147);var N=__nccwpck_require__.t(B,2);const I=require("fs/promises");var U=__nccwpck_require__(361);const q=require("stream");const z=require("string_decoder");const W=typeof process==="object"&&process?process:{stdout:null,stderr:null};const isStream=t=>!!t&&typeof t==="object"&&(t instanceof Minipass||t instanceof q||isReadable(t)||isWritable(t));const isReadable=t=>!!t&&typeof t==="object"&&t instanceof U.EventEmitter&&typeof t.pipe==="function"&&t.pipe!==q.Writable.prototype.pipe;const isWritable=t=>!!t&&typeof t==="object"&&t instanceof U.EventEmitter&&typeof t.write==="function"&&typeof t.end==="function";const $=Symbol("EOF");const H=Symbol("maybeEmitEnd");const G=Symbol("emittedEnd");const V=Symbol("emittingEnd");const J=Symbol("emittedError");const K=Symbol("closed");const Y=Symbol("read");const Z=Symbol("flush");const Q=Symbol("flushChunk");const X=Symbol("encoding");const tt=Symbol("decoder");const et=Symbol("flowing");const st=Symbol("paused");const it=Symbol("resume");const rt=Symbol("buffer");const nt=Symbol("pipes");const ot=Symbol("bufferLength");const at=Symbol("bufferPush");const ht=Symbol("bufferShift");const lt=Symbol("objectMode");const ct=Symbol("destroyed");const ut=Symbol("error");const ft=Symbol("emitData");const dt=Symbol("emitEnd");const pt=Symbol("emitEnd2");const gt=Symbol("async");const mt=Symbol("abort");const yt=Symbol("aborted");const wt=Symbol("signal");const bt=Symbol("dataListeners");const vt=Symbol("discarded");const defer=t=>Promise.resolve().then(t);const nodefer=t=>t();const isEndish=t=>t==="end"||t==="finish"||t==="prefinish";const isArrayBufferLike=t=>t instanceof ArrayBuffer||!!t&&typeof t==="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0;const isArrayBufferView=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t);class Pipe{src;dest;opts;ondrain;constructor(t,e,s){this.src=t;this.dest=e;this.opts=s;this.ondrain=()=>t[it]();this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(t,e,s){super(t,e,s);this.proxyErrors=t=>e.emit("error",t);t.on("error",this.proxyErrors)}}const isObjectModeOptions=t=>!!t.objectMode;const isEncodingOptions=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer";class Minipass extends U.EventEmitter{[et]=false;[st]=false;[nt]=[];[rt]=[];[lt];[X];[gt];[tt];[$]=false;[G]=false;[V]=false;[K]=false;[J]=null;[ot]=0;[ct]=false;[wt];[yt]=false;[bt]=0;[vt]=false;writable=true;readable=true;constructor(...t){const e=t[0]||{};super();if(e.objectMode&&typeof e.encoding==="string"){throw new TypeError("Encoding and objectMode may not be used together")}if(isObjectModeOptions(e)){this[lt]=true;this[X]=null}else if(isEncodingOptions(e)){this[X]=e.encoding;this[lt]=false}else{this[lt]=false;this[X]=null}this[gt]=!!e.async;this[tt]=this[X]?new z.StringDecoder(this[X]):null;if(e&&e.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[rt]})}if(e&&e.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[nt]})}const{signal:s}=e;if(s){this[wt]=s;if(s.aborted){this[mt]()}else{s.addEventListener("abort",(()=>this[mt]()))}}}get bufferLength(){return this[ot]}get encoding(){return this[X]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[lt]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[gt]}set["async"](t){this[gt]=this[gt]||!!t}[mt](){this[yt]=true;this.emit("abort",this[wt]?.reason);this.destroy(this[wt]?.reason)}get aborted(){return this[yt]}set aborted(t){}write(t,e,s){if(this[yt])return false;if(this[$])throw new Error("write after end");if(this[ct]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof e==="function"){s=e;e="utf8"}if(!e)e="utf8";const i=this[gt]?defer:nodefer;if(!this[lt]&&!Buffer.isBuffer(t)){if(isArrayBufferView(t)){t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)}else if(isArrayBufferLike(t)){t=Buffer.from(t)}else if(typeof t!=="string"){throw new Error("Non-contiguous data written to non-objectMode stream")}}if(this[lt]){if(this[et]&&this[ot]!==0)this[Z](true);if(this[et])this.emit("data",t);else this[at](t);if(this[ot]!==0)this.emit("readable");if(s)i(s);return this[et]}if(!t.length){if(this[ot]!==0)this.emit("readable");if(s)i(s);return this[et]}if(typeof t==="string"&&!(e===this[X]&&!this[tt]?.lastNeed)){t=Buffer.from(t,e)}if(Buffer.isBuffer(t)&&this[X]){t=this[tt].write(t)}if(this[et]&&this[ot]!==0)this[Z](true);if(this[et])this.emit("data",t);else this[at](t);if(this[ot]!==0)this.emit("readable");if(s)i(s);return this[et]}read(t){if(this[ct])return null;this[vt]=false;if(this[ot]===0||t===0||t&&t>this[ot]){this[H]();return null}if(this[lt])t=null;if(this[rt].length>1&&!this[lt]){this[rt]=[this[X]?this[rt].join(""):Buffer.concat(this[rt],this[ot])]}const e=this[Y](t||null,this[rt][0]);this[H]();return e}[Y](t,e){if(this[lt])this[ht]();else{const s=e;if(t===s.length||t===null)this[ht]();else if(typeof s==="string"){this[rt][0]=s.slice(t);e=s.slice(0,t);this[ot]-=t}else{this[rt][0]=s.subarray(t);e=s.subarray(0,t);this[ot]-=t}}this.emit("data",e);if(!this[rt].length&&!this[$])this.emit("drain");return e}end(t,e,s){if(typeof t==="function"){s=t;t=undefined}if(typeof e==="function"){s=e;e="utf8"}if(t!==undefined)this.write(t,e);if(s)this.once("end",s);this[$]=true;this.writable=false;if(this[et]||!this[st])this[H]();return this}[it](){if(this[ct])return;if(!this[bt]&&!this[nt].length){this[vt]=true}this[st]=false;this[et]=true;this.emit("resume");if(this[rt].length)this[Z]();else if(this[$])this[H]();else this.emit("drain")}resume(){return this[it]()}pause(){this[et]=false;this[st]=true;this[vt]=false}get destroyed(){return this[ct]}get flowing(){return this[et]}get paused(){return this[st]}[at](t){if(this[lt])this[ot]+=1;else this[ot]+=t.length;this[rt].push(t)}[ht](){if(this[lt])this[ot]-=1;else this[ot]-=this[rt][0].length;return this[rt].shift()}[Z](t=false){do{}while(this[Q](this[ht]())&&this[rt].length);if(!t&&!this[rt].length&&!this[$])this.emit("drain")}[Q](t){this.emit("data",t);return this[et]}pipe(t,e){if(this[ct])return t;this[vt]=false;const s=this[G];e=e||{};if(t===W.stdout||t===W.stderr)e.end=false;else e.end=e.end!==false;e.proxyErrors=!!e.proxyErrors;if(s){if(e.end)t.end()}else{this[nt].push(!e.proxyErrors?new Pipe(this,t,e):new PipeProxyErrors(this,t,e));if(this[gt])defer((()=>this[it]()));else this[it]()}return t}unpipe(t){const e=this[nt].find((e=>e.dest===t));if(e){if(this[nt].length===1){if(this[et]&&this[bt]===0){this[et]=false}this[nt]=[]}else this[nt].splice(this[nt].indexOf(e),1);e.unpipe()}}addListener(t,e){return this.on(t,e)}on(t,e){const s=super.on(t,e);if(t==="data"){this[vt]=false;this[bt]++;if(!this[nt].length&&!this[et]){this[it]()}}else if(t==="readable"&&this[ot]!==0){super.emit("readable")}else if(isEndish(t)&&this[G]){super.emit(t);this.removeAllListeners(t)}else if(t==="error"&&this[J]){const t=e;if(this[gt])defer((()=>t.call(this,this[J])));else t.call(this,this[J])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){const s=super.off(t,e);if(t==="data"){this[bt]=this.listeners("data").length;if(this[bt]===0&&!this[vt]&&!this[nt].length){this[et]=false}}return s}removeAllListeners(t){const e=super.removeAllListeners(t);if(t==="data"||t===undefined){this[bt]=0;if(!this[vt]&&!this[nt].length){this[et]=false}}return e}get emittedEnd(){return this[G]}[H](){if(!this[V]&&!this[G]&&!this[ct]&&this[rt].length===0&&this[$]){this[V]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[K])this.emit("close");this[V]=false}}emit(t,...e){const s=e[0];if(t!=="error"&&t!=="close"&&t!==ct&&this[ct]){return false}else if(t==="data"){return!this[lt]&&!s?false:this[gt]?(defer((()=>this[ft](s))),true):this[ft](s)}else if(t==="end"){return this[dt]()}else if(t==="close"){this[K]=true;if(!this[G]&&!this[ct])return false;const t=super.emit("close");this.removeAllListeners("close");return t}else if(t==="error"){this[J]=s;super.emit(ut,s);const t=!this[wt]||this.listeners("error").length?super.emit("error",s):false;this[H]();return t}else if(t==="resume"){const t=super.emit("resume");this[H]();return t}else if(t==="finish"||t==="prefinish"){const e=super.emit(t);this.removeAllListeners(t);return e}const i=super.emit(t,...e);this[H]();return i}[ft](t){for(const e of this[nt]){if(e.dest.write(t)===false)this.pause()}const e=this[vt]?false:super.emit("data",t);this[H]();return e}[dt](){if(this[G])return false;this[G]=true;this.readable=false;return this[gt]?(defer((()=>this[pt]())),true):this[pt]()}[pt](){if(this[tt]){const t=this[tt].end();if(t){for(const e of this[nt]){e.dest.write(t)}if(!this[vt])super.emit("data",t)}}for(const t of this[nt]){t.end()}const t=super.emit("end");this.removeAllListeners("end");return t}async collect(){const t=Object.assign([],{dataLength:0});if(!this[lt])t.dataLength=0;const e=this.promise();this.on("data",(e=>{t.push(e);if(!this[lt])t.dataLength+=e.length}));await e;return t}async concat(){if(this[lt]){throw new Error("cannot concat in objectMode")}const t=await this.collect();return this[X]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,e)=>{this.on(ct,(()=>e(new Error("stream destroyed"))));this.on("error",(t=>e(t)));this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[vt]=false;let t=false;const stop=async()=>{this.pause();t=true;return{value:undefined,done:true}};const next=()=>{if(t)return stop();const e=this.read();if(e!==null)return Promise.resolve({done:false,value:e});if(this[$])return stop();let s;let i;const onerr=t=>{this.off("data",ondata);this.off("end",onend);this.off(ct,ondestroy);stop();i(t)};const ondata=t=>{this.off("error",onerr);this.off("end",onend);this.off(ct,ondestroy);this.pause();s({value:t,done:!!this[$]})};const onend=()=>{this.off("error",onerr);this.off("data",ondata);this.off(ct,ondestroy);stop();s({done:true,value:undefined})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((t,e)=>{i=e;s=t;this.once(ct,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[vt]=false;let t=false;const stop=()=>{this.pause();this.off(ut,stop);this.off(ct,stop);this.off("end",stop);t=true;return{done:true,value:undefined}};const next=()=>{if(t)return stop();const e=this.read();return e===null?stop():{done:false,value:e}};this.once("end",stop);this.once(ut,stop);this.once(ct,stop);return{next:next,throw:stop,return:stop,[Symbol.iterator](){return this}}}destroy(t){if(this[ct]){if(t)this.emit("error",t);else this.emit(ct);return this}this[ct]=true;this[vt]=true;this[rt].length=0;this[ot]=0;const e=this;if(typeof e.close==="function"&&!this[K])e.close();if(t)this.emit("error",t);else this.emit(ct);return this}static get isStream(){return isStream}}const St=B.realpathSync.native;const _t={lstatSync:B.lstatSync,readdir:B.readdir,readdirSync:B.readdirSync,readlinkSync:B.readlinkSync,realpathSync:St,promises:{lstat:I.lstat,readdir:I.readdir,readlink:I.readlink,realpath:I.realpath}};const fsFromOption=t=>!t||t===_t||t===N?_t:{..._t,...t,promises:{..._t.promises,...t.promises||{}}};const kt=/^\\\\\?\\([a-z]:)\\?$/i;const uncToDrive=t=>t.replace(/\//g,"\\").replace(kt,"$1\\");const xt=/[\\\/]/;const Ot=0;const Et=1;const Ct=2;const Pt=4;const Tt=6;const Rt=8;const At=10;const Mt=12;const Lt=15;const Dt=~Lt;const Ft=16;const jt=32;const Bt=64;const Nt=128;const It=256;const Ut=512;const qt=Bt|Nt|Ut;const zt=1023;const entToType=t=>t.isFile()?Rt:t.isDirectory()?Pt:t.isSymbolicLink()?At:t.isCharacterDevice()?Ct:t.isBlockDevice()?Tt:t.isSocket()?Mt:t.isFIFO()?Et:Ot;const Wt=new Map;const normalize=t=>{const e=Wt.get(t);if(e)return e;const s=t.normalize("NFKD");Wt.set(t,s);return s};const $t=new Map;const normalizeNocase=t=>{const e=$t.get(t);if(e)return e;const s=normalize(t.toLowerCase());$t.set(t,s);return s};class ResolveCache extends LRUCache{constructor(){super({max:256})}}class ChildrenCache extends LRUCache{constructor(t=16*1024){super({maxSize:t,sizeCalculation:t=>t.length+1})}}const Ht=Symbol("PathScurry setAsCwd");class PathBase{name;root;roots;parent;nocase;#tt;#et;get dev(){return this.#et}#st;get mode(){return this.#st}#it;get nlink(){return this.#it}#rt;get uid(){return this.#rt}#nt;get gid(){return this.#nt}#ot;get rdev(){return this.#ot}#at;get blksize(){return this.#at}#ht;get ino(){return this.#ht}#v;get size(){return this.#v}#lt;get blocks(){return this.#lt}#ct;get atimeMs(){return this.#ct}#ut;get mtimeMs(){return this.#ut}#ft;get ctimeMs(){return this.#ft}#dt;get birthtimeMs(){return this.#dt}#pt;get atime(){return this.#pt}#gt;get mtime(){return this.#gt}#mt;get ctime(){return this.#mt}#yt;get birthtime(){return this.#yt}#wt;#bt;#vt;#St;#_t;#kt;#xt;#Ot;#Et;#Ct;get path(){return(this.parent||this).fullpath()}constructor(t,e=Ot,s,i,r,n,o){this.name=t;this.#wt=r?normalizeNocase(t):normalize(t);this.#xt=e&zt;this.nocase=r;this.roots=i;this.root=s||this;this.#Ot=n;this.#vt=o.fullpath;this.#_t=o.relative;this.#kt=o.relativePosix;this.parent=o.parent;if(this.parent){this.#tt=this.parent.#tt}else{this.#tt=fsFromOption(o.fs)}}depth(){if(this.#bt!==undefined)return this.#bt;if(!this.parent)return this.#bt=0;return this.#bt=this.parent.depth()+1}childrenCache(){return this.#Ot}resolve(t){if(!t){return this}const e=this.getRootString(t);const s=t.substring(e.length);const i=s.split(this.splitSep);const r=e?this.getRoot(e).#Pt(i):this.#Pt(i);return r}#Pt(t){let e=this;for(const s of t){e=e.child(s)}return e}children(){const t=this.#Ot.get(this);if(t){return t}const e=Object.assign([],{provisional:0});this.#Ot.set(this,e);this.#xt&=~Ft;return e}child(t,e){if(t===""||t==="."){return this}if(t===".."){return this.parent||this}const s=this.children();const i=this.nocase?normalizeNocase(t):normalize(t);for(const t of s){if(t.#wt===i){return t}}const r=this.parent?this.sep:"";const n=this.#vt?this.#vt+r+t:undefined;const o=this.newChild(t,Ot,{...e,parent:this,fullpath:n});if(!this.canReaddir()){o.#xt|=Nt}s.push(o);return o}relative(){if(this.#_t!==undefined){return this.#_t}const t=this.name;const e=this.parent;if(!e){return this.#_t=this.name}const s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.#kt!==undefined)return this.#kt;const t=this.name;const e=this.parent;if(!e){return this.#kt=this.fullpathPosix()}const s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#vt!==undefined){return this.#vt}const t=this.name;const e=this.parent;if(!e){return this.#vt=this.name}const s=e.fullpath();const i=s+(!e.parent?"":this.sep)+t;return this.#vt=i}fullpathPosix(){if(this.#St!==undefined)return this.#St;if(this.sep==="/")return this.#St=this.fullpath();if(!this.parent){const t=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(t)){return this.#St=`//?/${t}`}else{return this.#St=t}}const t=this.parent;const e=t.fullpathPosix();const s=e+(!e||!t.parent?"":"/")+this.name;return this.#St=s}isUnknown(){return(this.#xt&Lt)===Ot}isType(t){return this[`is${t}`]()}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.#xt&Lt)===Rt}isDirectory(){return(this.#xt&Lt)===Pt}isCharacterDevice(){return(this.#xt&Lt)===Ct}isBlockDevice(){return(this.#xt&Lt)===Tt}isFIFO(){return(this.#xt&Lt)===Et}isSocket(){return(this.#xt&Lt)===Mt}isSymbolicLink(){return(this.#xt&At)===At}lstatCached(){return this.#xt&jt?this:undefined}readlinkCached(){return this.#Et}realpathCached(){return this.#Ct}readdirCached(){const t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#Et)return true;if(!this.parent)return false;const t=this.#xt≪return!(t!==Ot&&t!==At||this.#xt&It||this.#xt&Nt)}calledReaddir(){return!!(this.#xt&Ft)}isENOENT(){return!!(this.#xt&Nt)}isNamed(t){return!this.nocase?this.#wt===normalize(t):this.#wt===normalizeNocase(t)}async readlink(){const t=this.#Et;if(t){return t}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const t=await this.#tt.promises.readlink(this.fullpath());const e=(await this.parent.realpath())?.resolve(t);if(e){return this.#Et=e}}catch(t){this.#Tt(t.code);return undefined}}readlinkSync(){const t=this.#Et;if(t){return t}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const t=this.#tt.readlinkSync(this.fullpath());const e=this.parent.realpathSync()?.resolve(t);if(e){return this.#Et=e}}catch(t){this.#Tt(t.code);return undefined}}#Rt(t){this.#xt|=Ft;for(let e=t.provisional;ee(null,t)))}readdirCB(t,e=false){if(!this.canReaddir()){if(e)t(null,[]);else queueMicrotask((()=>t(null,[])));return}const s=this.children();if(this.calledReaddir()){const i=s.slice(0,s.provisional);if(e)t(null,i);else queueMicrotask((()=>t(null,i)));return}this.#zt.push(t);if(this.#Wt){return}this.#Wt=true;const i=this.fullpath();this.#tt.readdir(i,{withFileTypes:true},((t,e)=>{if(t){this.#Ft(t.code);s.provisional=0}else{for(const t of e){this.#Bt(t,s)}this.#Rt(s)}this.#$t(s.slice(0,s.provisional));return}))}#Ht;async readdir(){if(!this.canReaddir()){return[]}const t=this.children();if(this.calledReaddir()){return t.slice(0,t.provisional)}const e=this.fullpath();if(this.#Ht){await this.#Ht}else{let resolve=()=>{};this.#Ht=new Promise((t=>resolve=t));try{for(const s of await this.#tt.promises.readdir(e,{withFileTypes:true})){this.#Bt(s,t)}this.#Rt(t)}catch(e){this.#Ft(e.code);t.provisional=0}this.#Ht=undefined;resolve()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir()){return[]}const t=this.children();if(this.calledReaddir()){return t.slice(0,t.provisional)}const e=this.fullpath();try{for(const s of this.#tt.readdirSync(e,{withFileTypes:true})){this.#Bt(s,t)}this.#Rt(t)}catch(e){this.#Ft(e.code);t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#xt&qt)return false;const t=Lt&this.#xt;if(!(t===Ot||t===Pt||t===At)){return false}return true}shouldWalk(t,e){return(this.#xt&Pt)===Pt&&!(this.#xt&qt)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#Ct)return this.#Ct;if((Ut|It|Nt)&this.#xt)return undefined;try{const t=await this.#tt.promises.realpath(this.fullpath());return this.#Ct=this.resolve(t)}catch(t){this.#Lt()}}realpathSync(){if(this.#Ct)return this.#Ct;if((Ut|It|Nt)&this.#xt)return undefined;try{const t=this.#tt.realpathSync(this.fullpath());return this.#Ct=this.resolve(t)}catch(t){this.#Lt()}}[Ht](t){if(t===this)return;const e=new Set([]);let s=[];let i=this;while(i&&i.parent){e.add(i);i.#_t=s.join(this.sep);i.#kt=s.join("/");i=i.parent;s.push("..")}i=t;while(i&&i.parent&&!e.has(i)){i.#_t=undefined;i.#kt=undefined;i=i.parent}}}class PathWin32 extends PathBase{sep="\\";splitSep=xt;constructor(t,e=Ot,s,i,r,n,o){super(t,e,s,i,r,n,o)}newChild(t,e=Ot,s={}){return new PathWin32(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return F.win32.parse(t).root}getRoot(t){t=uncToDrive(t.toUpperCase());if(t===this.root.name){return this.root}for(const[e,s]of Object.entries(this.roots)){if(this.sameRoot(t,e)){return this.roots[t]=s}}return this.roots[t]=new PathScurryWin32(t,this).root}sameRoot(t,e=this.root.name){t=t.toUpperCase().replace(/\//g,"\\").replace(kt,"$1\\");return t===e}}class PathPosix extends PathBase{splitSep="/";sep="/";constructor(t,e=Ot,s,i,r,n,o){super(t,e,s,i,r,n,o)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=Ot,s={}){return new PathPosix(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}}class PathScurryBase{root;rootPath;roots;cwd;#Gt;#Vt;#Ot;nocase;#tt;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:n=_t}={}){this.#tt=fsFromOption(n);if(t instanceof URL||t.startsWith("file://")){t=(0,j.fileURLToPath)(t)}const o=e.resolve(t);this.roots=Object.create(null);this.rootPath=this.parseRootPath(o);this.#Gt=new ResolveCache;this.#Vt=new ResolveCache;this.#Ot=new ChildrenCache(r);const a=o.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]){a.pop()}if(i===undefined){throw new TypeError("must provide nocase setting to PathScurryBase ctor")}this.nocase=i;this.root=this.newRoot(this.#tt);this.roots[this.rootPath]=this.root;let h=this.root;let l=a.length-1;const c=e.sep;let u=this.rootPath;let f=false;for(const t of a){const e=l--;h=h.child(t,{relative:new Array(e).fill("..").join(c),relativePosix:new Array(e).fill("..").join("/"),fullpath:u+=(f?"":c)+t});f=true}this.cwd=h}depth(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.depth()}childrenCache(){return this.#Ot}resolve(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(!i||i===".")continue;e=e?`${i}/${e}`:i;if(this.isAbsolute(i)){break}}const s=this.#Gt.get(e);if(s!==undefined){return s}const i=this.cwd.resolve(e).fullpath();this.#Gt.set(e,i);return i}resolvePosix(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(!i||i===".")continue;e=e?`${i}/${e}`:i;if(this.isAbsolute(i)){break}}const s=this.#Vt.get(e);if(s!==undefined){return s}const i=this.cwd.resolve(e).fullpathPosix();this.#Vt.set(e,i);return i}relative(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.relative()}relativePosix(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.relativePosix()}basename(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.name}dirname(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:true}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s}=e;if(!t.canReaddir()){return[]}else{const e=await t.readdir();return s?e:e.map((t=>t.name))}}readdirSync(t=this.cwd,e={withFileTypes:true}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true}=e;if(!t.canReaddir()){return[]}else if(s){return t.readdirSync()}else{return t.readdirSync().map((t=>t.name))}}async lstat(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.lstat()}lstatSync(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=[];if(!r||r(t)){o.push(s?t:t.fullpath())}const a=new Set;const walk=(t,e)=>{a.add(t);t.readdirCB(((t,h)=>{if(t){return e(t)}let l=h.length;if(!l)return e();const next=()=>{if(--l===0){e()}};for(const t of h){if(!r||r(t)){o.push(s?t:t.fullpath())}if(i&&t.isSymbolicLink()){t.realpath().then((t=>t?.isUnknown()?t.lstat():t)).then((t=>t?.shouldWalk(a,n)?walk(t,next):next()))}else{if(t.shouldWalk(a,n)){walk(t,next)}else{next()}}}}),true)};const h=t;return new Promise(((t,e)=>{walk(h,(s=>{if(s)return e(s);t(o)}))}))}walkSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=[];if(!r||r(t)){o.push(s?t:t.fullpath())}const a=new Set([t]);for(const t of a){const e=t.readdirSync();for(const t of e){if(!r||r(t)){o.push(s?t:t.fullpath())}let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(a,n)){a.add(e)}}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}return this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;if(!r||r(t)){yield s?t:t.fullpath()}const o=new Set([t]);for(const t of o){const e=t.readdirSync();for(const t of e){if(!r||r(t)){yield s?t:t.fullpath()}let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(o,n)){o.add(e)}}}}stream(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=new Minipass({objectMode:true});if(!r||r(t)){o.write(s?t:t.fullpath())}const a=new Set;const h=[t];let l=0;const process=()=>{let t=false;while(!t){const e=h.shift();if(!e){if(l===0)o.end();return}l++;a.add(e);const onReaddir=(e,u,f=false)=>{if(e)return o.emit("error",e);if(i&&!f){const t=[];for(const e of u){if(e.isSymbolicLink()){t.push(e.realpath().then((t=>t?.isUnknown()?t.lstat():t)))}}if(t.length){Promise.all(t).then((()=>onReaddir(null,u,true)));return}}for(const e of u){if(e&&(!r||r(e))){if(!o.write(s?e:e.fullpath())){t=true}}}l--;for(const t of u){const e=t.realpathCached()||t;if(e.shouldWalk(a,n)){h.push(e)}}if(t&&!o.flowing){o.once("drain",process)}else if(!c){process()}};let c=true;e.readdirCB(onReaddir,true);c=false}};process();return o}streamSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=new Minipass({objectMode:true});const a=new Set;if(!r||r(t)){o.write(s?t:t.fullpath())}const h=[t];let l=0;const process=()=>{let t=false;while(!t){const e=h.shift();if(!e){if(l===0)o.end();return}l++;a.add(e);const c=e.readdirSync();for(const e of c){if(!r||r(e)){if(!o.write(s?e:e.fullpath())){t=true}}}l--;for(const t of c){let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(a,n)){h.push(e)}}}if(t&&!o.flowing)o.once("drain",process)};process();return o}chdir(t=this.cwd){const e=this.cwd;this.cwd=typeof t==="string"?this.cwd.resolve(t):t;this.cwd[Ht](e)}}class PathScurryWin32 extends PathScurryBase{sep="\\";constructor(t=process.cwd(),e={}){const{nocase:s=true}=e;super(t,F.win32,"\\",{...e,nocase:s});this.nocase=s;for(let t=this.cwd;t;t=t.parent){t.nocase=this.nocase}}parseRootPath(t){return F.win32.parse(t).root.toUpperCase()}newRoot(t){return new PathWin32(this.rootPath,Pt,undefined,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}}class PathScurryPosix extends PathScurryBase{sep="/";constructor(t=process.cwd(),e={}){const{nocase:s=false}=e;super(t,F.posix,"/",{...e,nocase:s});this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new PathPosix(this.rootPath,Pt,undefined,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}}class PathScurryDarwin extends PathScurryPosix{constructor(t=process.cwd(),e={}){const{nocase:s=true}=e;super(t,{...e,nocase:s})}}const Gt=process.platform==="win32"?PathWin32:PathPosix;const Vt=process.platform==="win32"?PathScurryWin32:process.platform==="darwin"?PathScurryDarwin:PathScurryPosix;const isPatternList=t=>t.length>=1;const isGlobList=t=>t.length>=1;class Pattern{#Jt;#Kt;#Yt;length;#Zt;#Qt;#Xt;#te;#ee;#se;#ie=true;constructor(t,e,s,i){if(!isPatternList(t)){throw new TypeError("empty pattern list")}if(!isGlobList(e)){throw new TypeError("empty glob list")}if(e.length!==t.length){throw new TypeError("mismatched pattern list and glob list lengths")}this.length=t.length;if(s<0||s>=this.length){throw new TypeError("index out of range")}this.#Jt=t;this.#Kt=e;this.#Yt=s;this.#Zt=i;if(this.#Yt===0){if(this.isUNC()){const[t,e,s,i,...r]=this.#Jt;const[n,o,a,h,...l]=this.#Kt;if(r[0]===""){r.shift();l.shift()}const c=[t,e,s,i,""].join("/");const u=[n,o,a,h,""].join("/");this.#Jt=[c,...r];this.#Kt=[u,...l];this.length=this.#Jt.length}else if(this.isDrive()||this.isAbsolute()){const[t,...e]=this.#Jt;const[s,...i]=this.#Kt;if(e[0]===""){e.shift();i.shift()}const r=t+"/";const n=s+"/";this.#Jt=[r,...e];this.#Kt=[n,...i];this.length=this.#Jt.length}}}pattern(){return this.#Jt[this.#Yt]}isString(){return typeof this.#Jt[this.#Yt]==="string"}isGlobstar(){return this.#Jt[this.#Yt]===k}isRegExp(){return this.#Jt[this.#Yt]instanceof RegExp}globString(){return this.#Xt=this.#Xt||(this.#Yt===0?this.isAbsolute()?this.#Kt[0]+this.#Kt.slice(1).join("/"):this.#Kt.join("/"):this.#Kt.slice(this.#Yt).join("/"))}hasMore(){return this.length>this.#Yt+1}rest(){if(this.#Qt!==undefined)return this.#Qt;if(!this.hasMore())return this.#Qt=null;this.#Qt=new Pattern(this.#Jt,this.#Kt,this.#Yt+1,this.#Zt);this.#Qt.#se=this.#se;this.#Qt.#ee=this.#ee;this.#Qt.#te=this.#te;return this.#Qt}isUNC(){const t=this.#Jt;return this.#ee!==undefined?this.#ee:this.#ee=this.#Zt==="win32"&&this.#Yt===0&&t[0]===""&&t[1]===""&&typeof t[2]==="string"&&!!t[2]&&typeof t[3]==="string"&&!!t[3]}isDrive(){const t=this.#Jt;return this.#te!==undefined?this.#te:this.#te=this.#Zt==="win32"&&this.#Yt===0&&this.length>1&&typeof t[0]==="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){const t=this.#Jt;return this.#se!==undefined?this.#se:this.#se=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){const t=this.#Jt[0];return typeof t==="string"&&this.isAbsolute()&&this.#Yt===0?t:""}checkFollowGlobstar(){return!(this.#Yt===0||!this.isGlobstar()||!this.#ie)}markFollowGlobstar(){if(this.#Yt===0||!this.isGlobstar()||!this.#ie)return false;this.#ie=false;return true}}const Jt=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Ignore{relative;relativeChildren;absolute;absoluteChildren;constructor(t,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:n=Jt}){this.relative=[];this.absolute=[];this.relativeChildren=[];this.absoluteChildren=[];const o={dot:true,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:n,nocomment:true,nonegate:true};for(const e of t){const t=new Minimatch(e,o);for(let e=0;e[t,!!(e&2),!!(e&1)]))}}class SubWalks{store=new Map;add(t,e){if(!t.canReaddir()){return}const s=this.store.get(t);if(s){if(!s.find((t=>t.globString()===e.globString()))){s.push(e)}}else this.store.set(t,[e])}get(t){const e=this.store.get(t);if(!e){throw new Error("attempting to walk unknown path")}return e}entries(){return this.keys().map((t=>[t,this.store.get(t)]))}keys(){return[...this.store.keys()].filter((t=>t.canReaddir()))}}class Processor{hasWalkedCache;matches=new MatchRecord;subwalks=new SubWalks;patterns;follow;dot;opts;constructor(t,e){this.opts=t;this.follow=!!t.follow;this.dot=!!t.dot;this.hasWalkedCache=e?e.copy():new HasWalkedCache}processPatterns(t,e){this.patterns=e;const s=e.map((e=>[t,e]));for(let[t,e]of s){this.hasWalkedCache.storeWalked(t,e);const s=e.root();const i=e.isAbsolute()&&this.opts.absolute!==false;if(s){t=t.resolve(s==="/"&&this.opts.root!==undefined?this.opts.root:s);const i=e.rest();if(!i){this.matches.add(t,true,false);continue}else{e=i}}if(t.isENOENT())continue;let r;let n;let o=false;while(typeof(r=e.pattern())==="string"&&(n=e.rest())){const s=t.resolve(r);t=s;e=n;o=true}r=e.pattern();n=e.rest();if(o){if(this.hasWalkedCache.hasWalked(t,e))continue;this.hasWalkedCache.storeWalked(t,e)}if(typeof r==="string"){const e=r===".."||r===""||r===".";this.matches.add(t.resolve(r),i,e);continue}else if(r===k){if(!t.isSymbolicLink()||this.follow||e.checkFollowGlobstar()){this.subwalks.add(t,e)}const s=n?.pattern();const r=n?.rest();if(!n||(s===""||s===".")&&!r){this.matches.add(t,i,s===""||s===".")}else{if(s===".."){const e=t.parent||t;if(!r)this.matches.add(e,i,true);else if(!this.hasWalkedCache.hasWalked(e,r)){this.subwalks.add(e,r)}}}}else if(r instanceof RegExp){this.subwalks.add(t,e)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Processor(this.opts,this.hasWalkedCache)}filterEntries(t,e){const s=this.subwalks.get(t);const i=this.child();for(const t of e){for(const e of s){const s=e.isAbsolute();const r=e.pattern();const n=e.rest();if(r===k){i.testGlobstar(t,e,n,s)}else if(r instanceof RegExp){i.testRegExp(t,r,n,s)}else{i.testString(t,r,n,s)}}}return i}testGlobstar(t,e,s,i){if(this.dot||!t.name.startsWith(".")){if(!e.hasMore()){this.matches.add(t,i,false)}if(t.canReaddir()){if(this.follow||!t.isSymbolicLink()){this.subwalks.add(t,e)}else if(t.isSymbolicLink()){if(s&&e.checkFollowGlobstar()){this.subwalks.add(t,s)}else if(e.markFollowGlobstar()){this.subwalks.add(t,e)}}}}if(s){const e=s.pattern();if(typeof e==="string"&&e!==".."&&e!==""&&e!=="."){this.testString(t,e,s.rest(),i)}else if(e===".."){const e=t.parent||t;this.subwalks.add(e,s)}else if(e instanceof RegExp){this.testRegExp(t,e,s.rest(),i)}}}testRegExp(t,e,s,i){if(!e.test(t.name))return;if(!s){this.matches.add(t,i,false)}else{this.subwalks.add(t,s)}}testString(t,e,s,i){if(!t.isNamed(e))return;if(!s){this.matches.add(t,i,false)}else{this.subwalks.add(t,s)}}}const makeIgnore=(t,e)=>typeof t==="string"?new Ignore([t],e):Array.isArray(t)?new Ignore(t,e):t;class GlobUtil{path;patterns;opts;seen=new Set;paused=false;aborted=false;#re=[];#ne;#oe;signal;maxDepth;constructor(t,e,s){this.patterns=t;this.path=e;this.opts=s;this.#oe=!s.posix&&s.platform==="win32"?"\\":"/";if(s.ignore){this.#ne=makeIgnore(s.ignore,s)}this.maxDepth=s.maxDepth||Infinity;if(s.signal){this.signal=s.signal;this.signal.addEventListener("abort",(()=>{this.#re.length=0}))}}#ae(t){return this.seen.has(t)||!!this.#ne?.ignored?.(t)}#he(t){return!!this.#ne?.childrenIgnored?.(t)}pause(){this.paused=true}resume(){if(this.signal?.aborted)return;this.paused=false;let t=undefined;while(!this.paused&&(t=this.#re.shift())){t()}}onResume(t){if(this.signal?.aborted)return;if(!this.paused){t()}else{this.#re.push(t)}}async matchCheck(t,e){if(e&&this.opts.nodir)return undefined;let s;if(this.opts.realpath){s=t.realpathCached()||await t.realpath();if(!s)return undefined;t=s}const i=t.isUnknown()||this.opts.stat;const r=i?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){const t=await r.realpath();if(t&&(t.isUnknown()||this.opts.stat)){await t.lstat()}}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===Infinity||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#ae(t)?t:undefined}matchCheckSync(t,e){if(e&&this.opts.nodir)return undefined;let s;if(this.opts.realpath){s=t.realpathCached()||t.realpathSync();if(!s)return undefined;t=s}const i=t.isUnknown()||this.opts.stat;const r=i?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){const t=r.realpathSync();if(t&&(t?.isUnknown()||this.opts.stat)){t.lstatSync()}}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#ae(t))return;const s=this.opts.absolute===undefined?e:this.opts.absolute;this.seen.add(t);const i=this.opts.mark&&t.isDirectory()?this.#oe:"";if(this.opts.withFileTypes){this.matchEmit(t)}else if(s){const e=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(e+i)}else{const e=this.opts.posix?t.relativePosix():t.relative();const s=this.opts.dotRelative&&!e.startsWith(".."+this.#oe)?"."+this.#oe:"";this.matchEmit(!e?"."+i:s+e+i)}}async match(t,e,s){const i=await this.matchCheck(t,s);if(i)this.matchFinish(i,e)}matchSync(t,e,s){const i=this.matchCheckSync(t,s);if(i)this.matchFinish(i,e)}walkCB(t,e,s){if(this.signal?.aborted)s();this.walkCB2(t,e,new Processor(this.opts),s)}walkCB2(t,e,s,i){if(this.#he(t))return i();if(this.signal?.aborted)i();if(this.paused){this.onResume((()=>this.walkCB2(t,e,s,i)));return}s.processPatterns(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#ae(t))continue;r++;this.match(t,e,i).then((()=>next()))}for(const t of s.subwalkTargets()){if(this.maxDepth!==Infinity&&t.depth()>=this.maxDepth){continue}r++;const e=t.readdirCached();if(t.calledReaddir())this.walkCB3(t,e,s,next);else{t.readdirCB(((e,i)=>this.walkCB3(t,i,s,next)),true)}}next()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#ae(t))continue;r++;this.match(t,e,i).then((()=>next()))}for(const[t,e]of s.subwalks.entries()){r++;this.walkCB2(t,e,s.child(),next)}next()}walkCBSync(t,e,s){if(this.signal?.aborted)s();this.walkCB2Sync(t,e,new Processor(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#he(t))return i();if(this.signal?.aborted)i();if(this.paused){this.onResume((()=>this.walkCB2Sync(t,e,s,i)));return}s.processPatterns(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#ae(t))continue;this.matchSync(t,e,i)}for(const t of s.subwalkTargets()){if(this.maxDepth!==Infinity&&t.depth()>=this.maxDepth){continue}r++;const e=t.readdirSync();this.walkCB3Sync(t,e,s,next)}next()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#ae(t))continue;this.matchSync(t,e,i)}for(const[t,e]of s.subwalks.entries()){r++;this.walkCB2Sync(t,e,s.child(),next)}next()}}class GlobWalker extends GlobUtil{matches;constructor(t,e,s){super(t,e,s);this.matches=new Set}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){await this.path.lstat()}await new Promise(((t,e)=>{this.walkCB(this.path,this.patterns,(()=>{if(this.signal?.aborted){e(this.signal.reason)}else{t(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}}class GlobStream extends GlobUtil{results;constructor(t,e,s){super(t,e,s);this.results=new Minipass({signal:this.signal,objectMode:true});this.results.on("drain",(()=>this.resume()));this.results.on("resume",(()=>this.resume()))}matchEmit(t){this.results.write(t);if(!this.results.flowing)this.pause()}stream(){const t=this.path;if(t.isUnknown()){t.lstat().then((()=>{this.walkCB(t,this.patterns,(()=>this.results.end()))}))}else{this.walkCB(t,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}}const Kt=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;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");this.withFileTypes=!!e.withFileTypes;this.signal=e.signal;this.follow=!!e.follow;this.dot=!!e.dot;this.dotRelative=!!e.dotRelative;this.nodir=!!e.nodir;this.mark=!!e.mark;if(!e.cwd){this.cwd=""}else if(e.cwd instanceof URL||e.cwd.startsWith("file://")){e.cwd=(0,j.fileURLToPath)(e.cwd)}this.cwd=e.cwd||"";this.root=e.root;this.magicalBraces=!!e.magicalBraces;this.nobrace=!!e.nobrace;this.noext=!!e.noext;this.realpath=!!e.realpath;this.absolute=e.absolute;this.noglobstar=!!e.noglobstar;this.matchBase=!!e.matchBase;this.maxDepth=typeof e.maxDepth==="number"?e.maxDepth:Infinity;this.stat=!!e.stat;this.ignore=e.ignore;if(this.withFileTypes&&this.absolute!==undefined){throw new Error("cannot set absolute and withFileTypes:true")}if(typeof t==="string"){t=[t]}this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false;if(this.windowsPathsNoEscape){t=t.map((t=>t.replace(/\\/g,"/")))}if(this.matchBase){if(e.noglobstar){throw new TypeError("base matching requires globstar")}t=t.map((t=>t.includes("/")?t:`./**/${t}`))}this.pattern=t;this.platform=e.platform||Kt;this.opts={...e,platform:this.platform};if(e.scurry){this.scurry=e.scurry;if(e.nocase!==undefined&&e.nocase!==e.scurry.nocase){throw new Error("nocase option contradicts provided scurry option")}}else{const t=e.platform==="win32"?PathScurryWin32:e.platform==="darwin"?PathScurryDarwin:e.platform?PathScurryPosix:Vt;this.scurry=new t(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;const s=this.platform==="darwin"||this.platform==="win32";const i={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug};const r=this.pattern.map((t=>new Minimatch(t,i)));const[n,o]=r.reduce(((t,e)=>{t[0].push(...e.set);t[1].push(...e.globParts);return t}),[[],[]]);this.patterns=n.map(((t,e)=>{const s=o[e];if(!s)throw new Error("invalid pattern object");return new Pattern(t,s,0,this.platform)}))}async walk(){return[...await new 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}).walk()]}walkSync(){return[...new 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}).walkSync()]}stream(){return new 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}).stream()}streamSync(){return new 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}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}const hasMagic=(t,e={})=>{if(!Array.isArray(t)){t=[t]}for(const s of t){if(new Minimatch(s,e).hasMagic())return true}return false};function globStreamSync(t,e={}){return new Glob(t,e).streamSync()}function globStream(t,e={}){return new Glob(t,e).stream()}function globSync(t,e={}){return new Glob(t,e).walkSync()}async function glob_(t,e={}){return new Glob(t,e).walk()}function globIterateSync(t,e={}){return new Glob(t,e).iterateSync()}function globIterate(t,e={}){return new Glob(t,e).iterate()}const Yt=globStreamSync;const Zt=Object.assign(globStream,{sync:globStreamSync});const Qt=globIterateSync;const Xt=Object.assign(globIterate,{sync:globIterateSync});const te=Object.assign(globSync,{stream:globStreamSync,iterate:globIterateSync});const ee=Object.assign(glob_,{glob:glob_,globSync:globSync,sync:te,globStream:globStream,stream:Zt,globStreamSync:globStreamSync,streamSync:Yt,globIterate:globIterate,iterate:Xt,globIterateSync:globIterateSync,iterateSync:Qt,Glob:Glob,hasMagic:hasMagic,escape:escape_escape,unescape:unescape_unescape});ee.glob=ee;function benchmarksFromFile(t){let e=(0,B.readFileSync)(t);let s=JSON.parse(e.toString());return s}function mapFilesToBenchmarks(t){return t.flatMap((function(t){return benchmarksFromFile(t)}))}function formattedScoreFor(t){return t.primaryMetric.score.toFixed(3)+t.primaryMetric.scoreUnit}function formattedErrorFor(t){return t.primaryMetric.scoreError.toFixed(3)+t.primaryMetric.scoreUnit}function buildBenchmarkTable(t){var e="| Benchmark | Score | Error |\n"+"| --------- | ----- | ----- |\n";t.forEach((function(t){e+="| "+t.benchmark+" | "+formattedScoreFor(t)+" | "+formattedErrorFor(t)+" |\n"}));return e}function main(){var e=(0,t.getInput)("benchmark-results",{required:true});(0,t.debug)("Getting results matching path "+e);try{let s=ee.sync(e);let i=mapFilesToBenchmarks(s);if(i.length<1){(0,t.setFailed)("Didn't find any benchmarks");return}let r=buildBenchmarkTable(i);(0,t.setOutput)("benchmark-table",r)}catch{(0,t.setFailed)("Failed to get benchmarks");return}}main()})();module.exports=s})(); \ No newline at end of file +(()=>{var t={7351:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.issue=e.issueCommand=void 0;const o=n(s(2037));const a=s(5278);function issueCommand(t,e,s){const i=new Command(t,e,s);process.stdout.write(i.toString()+o.EOL)}e.issueCommand=issueCommand;function issue(t,e=""){issueCommand(t,{},e)}e.issue=issue;const h="::";class Command{constructor(t,e,s){if(!t){t="missing.command"}this.command=t;this.properties=e;this.message=s}toString(){let t=h+this.command;if(this.properties&&Object.keys(this.properties).length>0){t+=" ";let e=true;for(const s in this.properties){if(this.properties.hasOwnProperty(s)){const i=this.properties[s];if(i){if(e){e=false}else{t+=","}t+=`${s}=${escapeProperty(i)}`}}}}t+=`${h}${escapeData(this.message)}`;return t}}function escapeData(t){return a.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(t){return a.toCommandValue(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};var o=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.getIDToken=e.getState=e.saveState=e.group=e.endGroup=e.startGroup=e.info=e.notice=e.warning=e.error=e.debug=e.isDebug=e.setFailed=e.setCommandEcho=e.setOutput=e.getBooleanInput=e.getMultilineInput=e.getInput=e.addPath=e.setSecret=e.exportVariable=e.ExitCode=void 0;const a=s(7351);const h=s(717);const l=s(5278);const c=n(s(2037));const u=n(s(1017));const f=s(8041);var d;(function(t){t[t["Success"]=0]="Success";t[t["Failure"]=1]="Failure"})(d=e.ExitCode||(e.ExitCode={}));function exportVariable(t,e){const s=l.toCommandValue(e);process.env[t]=s;const i=process.env["GITHUB_ENV"]||"";if(i){return h.issueFileCommand("ENV",h.prepareKeyValueMessage(t,e))}a.issueCommand("set-env",{name:t},s)}e.exportVariable=exportVariable;function setSecret(t){a.issueCommand("add-mask",{},t)}e.setSecret=setSecret;function addPath(t){const e=process.env["GITHUB_PATH"]||"";if(e){h.issueFileCommand("PATH",t)}else{a.issueCommand("add-path",{},t)}process.env["PATH"]=`${t}${u.delimiter}${process.env["PATH"]}`}e.addPath=addPath;function getInput(t,e){const s=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!s){throw new Error(`Input required and not supplied: ${t}`)}if(e&&e.trimWhitespace===false){return s}return s.trim()}e.getInput=getInput;function getMultilineInput(t,e){const s=getInput(t,e).split("\n").filter((t=>t!==""));if(e&&e.trimWhitespace===false){return s}return s.map((t=>t.trim()))}e.getMultilineInput=getMultilineInput;function getBooleanInput(t,e){const s=["true","True","TRUE"];const i=["false","False","FALSE"];const r=getInput(t,e);if(s.includes(r))return true;if(i.includes(r))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}e.getBooleanInput=getBooleanInput;function setOutput(t,e){const s=process.env["GITHUB_OUTPUT"]||"";if(s){return h.issueFileCommand("OUTPUT",h.prepareKeyValueMessage(t,e))}process.stdout.write(c.EOL);a.issueCommand("set-output",{name:t},l.toCommandValue(e))}e.setOutput=setOutput;function setCommandEcho(t){a.issue("echo",t?"on":"off")}e.setCommandEcho=setCommandEcho;function setFailed(t){process.exitCode=d.Failure;error(t)}e.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}e.isDebug=isDebug;function debug(t){a.issueCommand("debug",{},t)}e.debug=debug;function error(t,e={}){a.issueCommand("error",l.toCommandProperties(e),t instanceof Error?t.toString():t)}e.error=error;function warning(t,e={}){a.issueCommand("warning",l.toCommandProperties(e),t instanceof Error?t.toString():t)}e.warning=warning;function notice(t,e={}){a.issueCommand("notice",l.toCommandProperties(e),t instanceof Error?t.toString():t)}e.notice=notice;function info(t){process.stdout.write(t+c.EOL)}e.info=info;function startGroup(t){a.issue("group",t)}e.startGroup=startGroup;function endGroup(){a.issue("endgroup")}e.endGroup=endGroup;function group(t,e){return o(this,void 0,void 0,(function*(){startGroup(t);let s;try{s=yield e()}finally{endGroup()}return s}))}e.group=group;function saveState(t,e){const s=process.env["GITHUB_STATE"]||"";if(s){return h.issueFileCommand("STATE",h.prepareKeyValueMessage(t,e))}a.issueCommand("save-state",{name:t},l.toCommandValue(e))}e.saveState=saveState;function getState(t){return process.env[`STATE_${t}`]||""}e.getState=getState;function getIDToken(t){return o(this,void 0,void 0,(function*(){return yield f.OidcClient.getIDToken(t)}))}e.getIDToken=getIDToken;var p=s(1327);Object.defineProperty(e,"summary",{enumerable:true,get:function(){return p.summary}});var g=s(1327);Object.defineProperty(e,"markdownSummary",{enumerable:true,get:function(){return g.markdownSummary}});var y=s(2981);Object.defineProperty(e,"toPosixPath",{enumerable:true,get:function(){return y.toPosixPath}});Object.defineProperty(e,"toWin32Path",{enumerable:true,get:function(){return y.toWin32Path}});Object.defineProperty(e,"toPlatformPath",{enumerable:true,get:function(){return y.toPlatformPath}})},717:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.prepareKeyValueMessage=e.issueFileCommand=void 0;const o=n(s(7147));const a=n(s(2037));const h=s(5840);const l=s(5278);function issueFileCommand(t,e){const s=process.env[`GITHUB_${t}`];if(!s){throw new Error(`Unable to find environment variable for file command ${t}`)}if(!o.existsSync(s)){throw new Error(`Missing file at path: ${s}`)}o.appendFileSync(s,`${l.toCommandValue(e)}${a.EOL}`,{encoding:"utf8"})}e.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(t,e){const s=`ghadelimiter_${h.v4()}`;const i=l.toCommandValue(e);if(t.includes(s)){throw new Error(`Unexpected input: name should not contain the delimiter "${s}"`)}if(i.includes(s)){throw new Error(`Unexpected input: value should not contain the delimiter "${s}"`)}return`${t}<<${s}${a.EOL}${i}${a.EOL}${s}`}e.prepareKeyValueMessage=prepareKeyValueMessage},8041:function(t,e,s){"use strict";var i=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.OidcClient=void 0;const r=s(6255);const n=s(5526);const o=s(2186);class OidcClient{static createHttpClient(t=true,e=10){const s={allowRetries:t,maxRetries:e};return new r.HttpClient("actions/oidc-client",[new n.BearerCredentialHandler(OidcClient.getRequestToken())],s)}static getRequestToken(){const t=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!t){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return t}static getIDTokenUrl(){const t=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!t){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return t}static getCall(t){var e;return i(this,void 0,void 0,(function*(){const s=OidcClient.createHttpClient();const i=yield s.getJson(t).catch((t=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${t.statusCode}\n \n Error Message: ${t.message}`)}));const r=(e=i.result)===null||e===void 0?void 0:e.value;if(!r){throw new Error("Response json body do not have ID Token field")}return r}))}static getIDToken(t){return i(this,void 0,void 0,(function*(){try{let e=OidcClient.getIDTokenUrl();if(t){const s=encodeURIComponent(t);e=`${e}&audience=${s}`}o.debug(`ID token url is ${e}`);const s=yield OidcClient.getCall(e);o.setSecret(s);return s}catch(t){throw new Error(`Error message: ${t.message}`)}}))}}e.OidcClient=OidcClient},2981:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.toPlatformPath=e.toWin32Path=e.toPosixPath=void 0;const o=n(s(1017));function toPosixPath(t){return t.replace(/[\\]/g,"/")}e.toPosixPath=toPosixPath;function toWin32Path(t){return t.replace(/[/]/g,"\\")}e.toWin32Path=toWin32Path;function toPlatformPath(t){return t.replace(/[/\\]/g,o.sep)}e.toPlatformPath=toPlatformPath},1327:function(t,e,s){"use strict";var i=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.summary=e.markdownSummary=e.SUMMARY_DOCS_URL=e.SUMMARY_ENV_VAR=void 0;const r=s(2037);const n=s(7147);const{access:o,appendFile:a,writeFile:h}=n.promises;e.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";e.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 i(this,void 0,void 0,(function*(){if(this._filePath){return this._filePath}const t=process.env[e.SUMMARY_ENV_VAR];if(!t){throw new Error(`Unable to find environment variable for $${e.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`)}try{yield o(t,n.constants.R_OK|n.constants.W_OK)}catch(e){throw new Error(`Unable to access summary file: '${t}'. Check if the file has correct read/write permissions.`)}this._filePath=t;return this._filePath}))}wrap(t,e,s={}){const i=Object.entries(s).map((([t,e])=>` ${t}="${e}"`)).join("");if(!e){return`<${t}${i}>`}return`<${t}${i}>${e}`}write(t){return i(this,void 0,void 0,(function*(){const e=!!(t===null||t===void 0?void 0:t.overwrite);const s=yield this.filePath();const i=e?h:a;yield i(s,this._buffer,{encoding:"utf8"});return this.emptyBuffer()}))}clear(){return i(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(t,e=false){this._buffer+=t;return e?this.addEOL():this}addEOL(){return this.addRaw(r.EOL)}addCodeBlock(t,e){const s=Object.assign({},e&&{lang:e});const i=this.wrap("pre",this.wrap("code",t),s);return this.addRaw(i).addEOL()}addList(t,e=false){const s=e?"ol":"ul";const i=t.map((t=>this.wrap("li",t))).join("");const r=this.wrap(s,i);return this.addRaw(r).addEOL()}addTable(t){const e=t.map((t=>{const e=t.map((t=>{if(typeof t==="string"){return this.wrap("td",t)}const{header:e,data:s,colspan:i,rowspan:r}=t;const n=e?"th":"td";const o=Object.assign(Object.assign({},i&&{colspan:i}),r&&{rowspan:r});return this.wrap(n,s,o)})).join("");return this.wrap("tr",e)})).join("");const s=this.wrap("table",e);return this.addRaw(s).addEOL()}addDetails(t,e){const s=this.wrap("details",this.wrap("summary",t)+e);return this.addRaw(s).addEOL()}addImage(t,e,s){const{width:i,height:r}=s||{};const n=Object.assign(Object.assign({},i&&{width:i}),r&&{height:r});const o=this.wrap("img",null,Object.assign({src:t,alt:e},n));return this.addRaw(o).addEOL()}addHeading(t,e){const s=`h${e}`;const i=["h1","h2","h3","h4","h5","h6"].includes(s)?s:"h1";const r=this.wrap(i,t);return this.addRaw(r).addEOL()}addSeparator(){const t=this.wrap("hr",null);return this.addRaw(t).addEOL()}addBreak(){const t=this.wrap("br",null);return this.addRaw(t).addEOL()}addQuote(t,e){const s=Object.assign({},e&&{cite:e});const i=this.wrap("blockquote",t,s);return this.addRaw(i).addEOL()}addLink(t,e){const s=this.wrap("a",t,{href:e});return this.addRaw(s).addEOL()}}const l=new Summary;e.markdownSummary=l;e.summary=l},5278:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.toCommandProperties=e.toCommandValue=void 0;function toCommandValue(t){if(t===null||t===undefined){return""}else if(typeof t==="string"||t instanceof String){return t}return JSON.stringify(t)}e.toCommandValue=toCommandValue;function toCommandProperties(t){if(!Object.keys(t).length){return{}}return{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}}e.toCommandProperties=toCommandProperties},5526:function(t,e){"use strict";var s=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.PersonalAccessTokenCredentialHandler=e.BearerCredentialHandler=e.BasicCredentialHandler=void 0;class BasicCredentialHandler{constructor(t,e){this.username=t;this.password=e}prepareRequest(t){if(!t.headers){throw Error("The request has no headers")}t.headers["Authorization"]=`Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}e.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(t){this.token=t}prepareRequest(t){if(!t.headers){throw Error("The request has no headers")}t.headers["Authorization"]=`Bearer ${this.token}`}canHandleAuthentication(){return false}handleAuthentication(){return s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}e.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(t){this.token=t}prepareRequest(t){if(!t.headers){throw Error("The request has no headers")}t.headers["Authorization"]=`Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`}canHandleAuthentication(){return false}handleAuthentication(){return s(this,void 0,void 0,(function*(){throw new Error("not implemented")}))}}e.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},6255:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;Object.defineProperty(t,i,{enumerable:true,get:function(){return e[s]}})}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};var o=this&&this.__awaiter||function(t,e,s,i){function adopt(t){return t instanceof s?t:new s((function(e){e(t)}))}return new(s||(s=Promise))((function(s,r){function fulfilled(t){try{step(i.next(t))}catch(t){r(t)}}function rejected(t){try{step(i["throw"](t))}catch(t){r(t)}}function step(t){t.done?s(t.value):adopt(t.value).then(fulfilled,rejected)}step((i=i.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.HttpClient=e.isHttps=e.HttpClientResponse=e.HttpClientError=e.getProxyUrl=e.MediaTypes=e.Headers=e.HttpCodes=void 0;const a=n(s(3685));const h=n(s(5687));const l=n(s(9835));const c=n(s(4294));var u;(function(t){t[t["OK"]=200]="OK";t[t["MultipleChoices"]=300]="MultipleChoices";t[t["MovedPermanently"]=301]="MovedPermanently";t[t["ResourceMoved"]=302]="ResourceMoved";t[t["SeeOther"]=303]="SeeOther";t[t["NotModified"]=304]="NotModified";t[t["UseProxy"]=305]="UseProxy";t[t["SwitchProxy"]=306]="SwitchProxy";t[t["TemporaryRedirect"]=307]="TemporaryRedirect";t[t["PermanentRedirect"]=308]="PermanentRedirect";t[t["BadRequest"]=400]="BadRequest";t[t["Unauthorized"]=401]="Unauthorized";t[t["PaymentRequired"]=402]="PaymentRequired";t[t["Forbidden"]=403]="Forbidden";t[t["NotFound"]=404]="NotFound";t[t["MethodNotAllowed"]=405]="MethodNotAllowed";t[t["NotAcceptable"]=406]="NotAcceptable";t[t["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";t[t["RequestTimeout"]=408]="RequestTimeout";t[t["Conflict"]=409]="Conflict";t[t["Gone"]=410]="Gone";t[t["TooManyRequests"]=429]="TooManyRequests";t[t["InternalServerError"]=500]="InternalServerError";t[t["NotImplemented"]=501]="NotImplemented";t[t["BadGateway"]=502]="BadGateway";t[t["ServiceUnavailable"]=503]="ServiceUnavailable";t[t["GatewayTimeout"]=504]="GatewayTimeout"})(u=e.HttpCodes||(e.HttpCodes={}));var f;(function(t){t["Accept"]="accept";t["ContentType"]="content-type"})(f=e.Headers||(e.Headers={}));var d;(function(t){t["ApplicationJson"]="application/json"})(d=e.MediaTypes||(e.MediaTypes={}));function getProxyUrl(t){const e=l.getProxyUrl(new URL(t));return e?e.href:""}e.getProxyUrl=getProxyUrl;const p=[u.MovedPermanently,u.ResourceMoved,u.SeeOther,u.TemporaryRedirect,u.PermanentRedirect];const g=[u.BadGateway,u.ServiceUnavailable,u.GatewayTimeout];const y=["OPTIONS","GET","DELETE","HEAD"];const w=10;const b=5;class HttpClientError extends Error{constructor(t,e){super(t);this.name="HttpClientError";this.statusCode=e;Object.setPrototypeOf(this,HttpClientError.prototype)}}e.HttpClientError=HttpClientError;class HttpClientResponse{constructor(t){this.message=t}readBody(){return o(this,void 0,void 0,(function*(){return new Promise((t=>o(this,void 0,void 0,(function*(){let e=Buffer.alloc(0);this.message.on("data",(t=>{e=Buffer.concat([e,t])}));this.message.on("end",(()=>{t(e.toString())}))}))))}))}}e.HttpClientResponse=HttpClientResponse;function isHttps(t){const e=new URL(t);return e.protocol==="https:"}e.isHttps=isHttps;class HttpClient{constructor(t,e,s){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=t;this.handlers=e||[];this.requestOptions=s;if(s){if(s.ignoreSslError!=null){this._ignoreSslError=s.ignoreSslError}this._socketTimeout=s.socketTimeout;if(s.allowRedirects!=null){this._allowRedirects=s.allowRedirects}if(s.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=s.allowRedirectDowngrade}if(s.maxRedirects!=null){this._maxRedirects=Math.max(s.maxRedirects,0)}if(s.keepAlive!=null){this._keepAlive=s.keepAlive}if(s.allowRetries!=null){this._allowRetries=s.allowRetries}if(s.maxRetries!=null){this._maxRetries=s.maxRetries}}}options(t,e){return o(this,void 0,void 0,(function*(){return this.request("OPTIONS",t,null,e||{})}))}get(t,e){return o(this,void 0,void 0,(function*(){return this.request("GET",t,null,e||{})}))}del(t,e){return o(this,void 0,void 0,(function*(){return this.request("DELETE",t,null,e||{})}))}post(t,e,s){return o(this,void 0,void 0,(function*(){return this.request("POST",t,e,s||{})}))}patch(t,e,s){return o(this,void 0,void 0,(function*(){return this.request("PATCH",t,e,s||{})}))}put(t,e,s){return o(this,void 0,void 0,(function*(){return this.request("PUT",t,e,s||{})}))}head(t,e){return o(this,void 0,void 0,(function*(){return this.request("HEAD",t,null,e||{})}))}sendStream(t,e,s,i){return o(this,void 0,void 0,(function*(){return this.request(t,e,s,i)}))}getJson(t,e={}){return o(this,void 0,void 0,(function*(){e[f.Accept]=this._getExistingOrDefaultHeader(e,f.Accept,d.ApplicationJson);const s=yield this.get(t,e);return this._processResponse(s,this.requestOptions)}))}postJson(t,e,s={}){return o(this,void 0,void 0,(function*(){const i=JSON.stringify(e,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,d.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,d.ApplicationJson);const r=yield this.post(t,i,s);return this._processResponse(r,this.requestOptions)}))}putJson(t,e,s={}){return o(this,void 0,void 0,(function*(){const i=JSON.stringify(e,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,d.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,d.ApplicationJson);const r=yield this.put(t,i,s);return this._processResponse(r,this.requestOptions)}))}patchJson(t,e,s={}){return o(this,void 0,void 0,(function*(){const i=JSON.stringify(e,null,2);s[f.Accept]=this._getExistingOrDefaultHeader(s,f.Accept,d.ApplicationJson);s[f.ContentType]=this._getExistingOrDefaultHeader(s,f.ContentType,d.ApplicationJson);const r=yield this.patch(t,i,s);return this._processResponse(r,this.requestOptions)}))}request(t,e,s,i){return o(this,void 0,void 0,(function*(){if(this._disposed){throw new Error("Client has already been disposed.")}const r=new URL(e);let n=this._prepareRequest(t,r,i);const o=this._allowRetries&&y.includes(t)?this._maxRetries+1:1;let a=0;let h;do{h=yield this.requestRaw(n,s);if(h&&h.message&&h.message.statusCode===u.Unauthorized){let t;for(const e of this.handlers){if(e.canHandleAuthentication(h)){t=e;break}}if(t){return t.handleAuthentication(this,n,s)}else{return h}}let e=this._maxRedirects;while(h.message.statusCode&&p.includes(h.message.statusCode)&&this._allowRedirects&&e>0){const o=h.message.headers["location"];if(!o){break}const a=new URL(o);if(r.protocol==="https:"&&r.protocol!==a.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 h.readBody();if(a.hostname!==r.hostname){for(const t in i){if(t.toLowerCase()==="authorization"){delete i[t]}}}n=this._prepareRequest(t,a,i);h=yield this.requestRaw(n,s);e--}if(!h.message.statusCode||!g.includes(h.message.statusCode)){return h}a+=1;if(a{function callbackForResult(t,e){if(t){i(t)}else if(!e){i(new Error("Unknown error"))}else{s(e)}}this.requestRawWithCallback(t,e,callbackForResult)}))}))}requestRawWithCallback(t,e,s){if(typeof e==="string"){if(!t.options.headers){t.options.headers={}}t.options.headers["Content-Length"]=Buffer.byteLength(e,"utf8")}let i=false;function handleResult(t,e){if(!i){i=true;s(t,e)}}const r=t.httpModule.request(t.options,(t=>{const e=new HttpClientResponse(t);handleResult(undefined,e)}));let n;r.on("socket",(t=>{n=t}));r.setTimeout(this._socketTimeout||3*6e4,(()=>{if(n){n.end()}handleResult(new Error(`Request timeout: ${t.options.path}`))}));r.on("error",(function(t){handleResult(t)}));if(e&&typeof e==="string"){r.write(e,"utf8")}if(e&&typeof e!=="string"){e.on("close",(function(){r.end()}));e.pipe(r)}else{r.end()}}getAgent(t){const e=new URL(t);return this._getAgent(e)}_prepareRequest(t,e,s){const i={};i.parsedUrl=e;const r=i.parsedUrl.protocol==="https:";i.httpModule=r?h:a;const n=r?443:80;i.options={};i.options.host=i.parsedUrl.hostname;i.options.port=i.parsedUrl.port?parseInt(i.parsedUrl.port):n;i.options.path=(i.parsedUrl.pathname||"")+(i.parsedUrl.search||"");i.options.method=t;i.options.headers=this._mergeHeaders(s);if(this.userAgent!=null){i.options.headers["user-agent"]=this.userAgent}i.options.agent=this._getAgent(i.parsedUrl);if(this.handlers){for(const t of this.handlers){t.prepareRequest(i.options)}}return i}_mergeHeaders(t){if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(t||{}))}return lowercaseKeys(t||{})}_getExistingOrDefaultHeader(t,e,s){let i;if(this.requestOptions&&this.requestOptions.headers){i=lowercaseKeys(this.requestOptions.headers)[e]}return t[e]||i||s}_getAgent(t){let e;const s=l.getProxyUrl(t);const i=s&&s.hostname;if(this._keepAlive&&i){e=this._proxyAgent}if(this._keepAlive&&!i){e=this._agent}if(e){return e}const r=t.protocol==="https:";let n=100;if(this.requestOptions){n=this.requestOptions.maxSockets||a.globalAgent.maxSockets}if(s&&s.hostname){const t={maxSockets:n,keepAlive:this._keepAlive,proxy:Object.assign(Object.assign({},(s.username||s.password)&&{proxyAuth:`${s.username}:${s.password}`}),{host:s.hostname,port:s.port})};let i;const o=s.protocol==="https:";if(r){i=o?c.httpsOverHttps:c.httpsOverHttp}else{i=o?c.httpOverHttps:c.httpOverHttp}e=i(t);this._proxyAgent=e}if(this._keepAlive&&!e){const t={keepAlive:this._keepAlive,maxSockets:n};e=r?new h.Agent(t):new a.Agent(t);this._agent=e}if(!e){e=r?h.globalAgent:a.globalAgent}if(r&&this._ignoreSslError){e.options=Object.assign(e.options||{},{rejectUnauthorized:false})}return e}_performExponentialBackoff(t){return o(this,void 0,void 0,(function*(){t=Math.min(w,t);const e=b*Math.pow(2,t);return new Promise((t=>setTimeout((()=>t()),e)))}))}_processResponse(t,e){return o(this,void 0,void 0,(function*(){return new Promise(((s,i)=>o(this,void 0,void 0,(function*(){const r=t.message.statusCode||0;const n={statusCode:r,result:null,headers:{}};if(r===u.NotFound){s(n)}function dateTimeDeserializer(t,e){if(typeof e==="string"){const t=new Date(e);if(!isNaN(t.valueOf())){return t}}return e}let o;let a;try{a=yield t.readBody();if(a&&a.length>0){if(e&&e.deserializeDates){o=JSON.parse(a,dateTimeDeserializer)}else{o=JSON.parse(a)}n.result=o}n.headers=t.message.headers}catch(t){}if(r>299){let t;if(o&&o.message){t=o.message}else if(a&&a.length>0){t=a}else{t=`Failed request: (${r})`}const e=new HttpClientError(t,r);e.result=n.result;i(e)}else{s(n)}}))))}))}}e.HttpClient=HttpClient;const lowercaseKeys=t=>Object.keys(t).reduce(((e,s)=>(e[s.toLowerCase()]=t[s],e)),{})},9835:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.checkBypass=e.getProxyUrl=void 0;function getProxyUrl(t){const e=t.protocol==="https:";if(checkBypass(t)){return undefined}const s=(()=>{if(e){return process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{return process.env["http_proxy"]||process.env["HTTP_PROXY"]}})();if(s){return new URL(s)}else{return undefined}}e.getProxyUrl=getProxyUrl;function checkBypass(t){if(!t.hostname){return false}const e=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!e){return false}let s;if(t.port){s=Number(t.port)}else if(t.protocol==="http:"){s=80}else if(t.protocol==="https:"){s=443}const i=[t.hostname.toUpperCase()];if(typeof s==="number"){i.push(`${i[0]}:${s}`)}for(const t of e.split(",").map((t=>t.trim().toUpperCase())).filter((t=>t))){if(i.some((e=>e===t))){return true}}return false}e.checkBypass=checkBypass},9417:t=>{"use strict";t.exports=balanced;function balanced(t,e,s){if(t instanceof RegExp)t=maybeMatch(t,s);if(e instanceof RegExp)e=maybeMatch(e,s);var i=range(t,e,s);return i&&{start:i[0],end:i[1],pre:s.slice(0,i[0]),body:s.slice(i[0]+t.length,i[1]),post:s.slice(i[1]+e.length)}}function maybeMatch(t,e){var s=e.match(t);return s?s[0]:null}balanced.range=range;function range(t,e,s){var i,r,n,o,a;var h=s.indexOf(t);var l=s.indexOf(e,h+1);var c=h;if(h>=0&&l>0){if(t===e){return[h,l]}i=[];n=s.length;while(c>=0&&!a){if(c==h){i.push(c);h=s.indexOf(t,c+1)}else if(i.length==1){a=[i.pop(),l]}else{r=i.pop();if(r=0?h:l}if(i.length){a=[n,o]}}return a}},3717:(t,e,s)=>{var i=s(9417);t.exports=expandTop;var r="\0SLASH"+Math.random()+"\0";var n="\0OPEN"+Math.random()+"\0";var o="\0CLOSE"+Math.random()+"\0";var a="\0COMMA"+Math.random()+"\0";var h="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(r).split("\\{").join(n).split("\\}").join(o).split("\\,").join(a).split("\\.").join(h)}function unescapeBraces(t){return t.split(r).join("\\").split(n).join("{").split(o).join("}").split(a).join(",").split(h).join(".")}function parseCommaParts(t){if(!t)return[""];var e=[];var s=i("{","}",t);if(!s)return t.split(",");var r=s.pre;var n=s.body;var o=s.post;var a=r.split(",");a[a.length-1]+="{"+n+"}";var h=parseCommaParts(o);if(o.length){a[a.length-1]+=h.shift();a.push.apply(a,h)}e.push.apply(e,a);return e}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,e){return t<=e}function gte(t,e){return t>=e}function expand(t,e){var s=[];var r=i("{","}",t);if(!r)return[t];var n=r.pre;var a=r.post.length?expand(r.post,false):[""];if(/\$$/.test(r.pre)){for(var h=0;h=0;if(!f&&!d){if(r.post.match(/,.*\}/)){t=r.pre+"{"+r.body+o+r.post;return expand(t)}return[t]}var p;if(f){p=r.body.split(/\.\./)}else{p=parseCommaParts(r.body);if(p.length===1){p=expand(p[0],false).map(embrace);if(p.length===1){return a.map((function(t){return r.pre+p[0]+t}))}}}var g;if(f){var y=numeric(p[0]);var w=numeric(p[1]);var b=Math.max(p[0].length,p[1].length);var v=p.length==3?Math.abs(numeric(p[2])):1;var S=lte;var _=w0){var E=new Array(x+1).join("0");if(O<0)P="-"+E+P.slice(1);else P=E+P}}}g.push(P)}}else{g=[];for(var C=0;C{t.exports=s(4219)},4219:(t,e,s)=>{"use strict";var i=s(1808);var r=s(4404);var n=s(3685);var o=s(5687);var a=s(2361);var h=s(9491);var l=s(3837);e.httpOverHttp=httpOverHttp;e.httpsOverHttp=httpsOverHttp;e.httpOverHttps=httpOverHttps;e.httpsOverHttps=httpsOverHttps;function httpOverHttp(t){var e=new TunnelingAgent(t);e.request=n.request;return e}function httpsOverHttp(t){var e=new TunnelingAgent(t);e.request=n.request;e.createSocket=createSecureSocket;e.defaultPort=443;return e}function httpOverHttps(t){var e=new TunnelingAgent(t);e.request=o.request;return e}function httpsOverHttps(t){var e=new TunnelingAgent(t);e.request=o.request;e.createSocket=createSecureSocket;e.defaultPort=443;return e}function TunnelingAgent(t){var e=this;e.options=t||{};e.proxyOptions=e.options.proxy||{};e.maxSockets=e.options.maxSockets||n.Agent.defaultMaxSockets;e.requests=[];e.sockets=[];e.on("free",(function onFree(t,s,i,r){var n=toOptions(s,i,r);for(var o=0,a=e.requests.length;o=this.maxSockets){r.requests.push(n);return}r.createSocket(n,(function(e){e.on("free",onFree);e.on("close",onCloseOrRemove);e.on("agentRemove",onCloseOrRemove);t.onSocket(e);function onFree(){r.emit("free",e,n)}function onCloseOrRemove(t){r.removeSocket(e);e.removeListener("free",onFree);e.removeListener("close",onCloseOrRemove);e.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(t,e){var s=this;var i={};s.sockets.push(i);var r=mergeOptions({},s.proxyOptions,{method:"CONNECT",path:t.host+":"+t.port,agent:false,headers:{host:t.host+":"+t.port}});if(t.localAddress){r.localAddress=t.localAddress}if(r.proxyAuth){r.headers=r.headers||{};r.headers["Proxy-Authorization"]="Basic "+new Buffer(r.proxyAuth).toString("base64")}c("making CONNECT request");var n=s.request(r);n.useChunkedEncodingByDefault=false;n.once("response",onResponse);n.once("upgrade",onUpgrade);n.once("connect",onConnect);n.once("error",onError);n.end();function onResponse(t){t.upgrade=true}function onUpgrade(t,e,s){process.nextTick((function(){onConnect(t,e,s)}))}function onConnect(r,o,a){n.removeAllListeners();o.removeAllListeners();if(r.statusCode!==200){c("tunneling socket could not be established, statusCode=%d",r.statusCode);o.destroy();var h=new Error("tunneling socket could not be established, "+"statusCode="+r.statusCode);h.code="ECONNRESET";t.request.emit("error",h);s.removeSocket(i);return}if(a.length>0){c("got illegal response body from proxy");o.destroy();var h=new Error("got illegal response body from proxy");h.code="ECONNRESET";t.request.emit("error",h);s.removeSocket(i);return}c("tunneling connection has established");s.sockets[s.sockets.indexOf(i)]=o;return e(o)}function onError(e){n.removeAllListeners();c("tunneling socket could not be established, cause=%s\n",e.message,e.stack);var r=new Error("tunneling socket could not be established, "+"cause="+e.message);r.code="ECONNRESET";t.request.emit("error",r);s.removeSocket(i)}};TunnelingAgent.prototype.removeSocket=function removeSocket(t){var e=this.sockets.indexOf(t);if(e===-1){return}this.sockets.splice(e,1);var s=this.requests.shift();if(s){this.createSocket(s,(function(t){s.request.onSocket(t)}))}};function createSecureSocket(t,e){var s=this;TunnelingAgent.prototype.createSocket.call(s,t,(function(i){var n=t.request.getHeader("host");var o=mergeOptions({},s.options,{socket:i,servername:n?n.replace(/:.*$/,""):t.host});var a=r.connect(0,o);s.sockets[s.sockets.indexOf(i)]=a;e(a)}))}function toOptions(t,e,s){if(typeof t==="string"){return{host:t,port:e,localAddress:s}}return t}function mergeOptions(t){for(var e=1,s=arguments.length;e{"use strict";Object.defineProperty(e,"__esModule",{value:true});Object.defineProperty(e,"v1",{enumerable:true,get:function(){return i.default}});Object.defineProperty(e,"v3",{enumerable:true,get:function(){return r.default}});Object.defineProperty(e,"v4",{enumerable:true,get:function(){return n.default}});Object.defineProperty(e,"v5",{enumerable:true,get:function(){return o.default}});Object.defineProperty(e,"NIL",{enumerable:true,get:function(){return a.default}});Object.defineProperty(e,"version",{enumerable:true,get:function(){return h.default}});Object.defineProperty(e,"validate",{enumerable:true,get:function(){return l.default}});Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return c.default}});Object.defineProperty(e,"parse",{enumerable:true,get:function(){return u.default}});var i=_interopRequireDefault(s(8628));var r=_interopRequireDefault(s(6409));var n=_interopRequireDefault(s(5122));var o=_interopRequireDefault(s(9120));var a=_interopRequireDefault(s(5332));var h=_interopRequireDefault(s(1595));var l=_interopRequireDefault(s(6900));var c=_interopRequireDefault(s(8950));var u=_interopRequireDefault(s(2746));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}},4569:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6113));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function md5(t){if(Array.isArray(t)){t=Buffer.from(t)}else if(typeof t==="string"){t=Buffer.from(t,"utf8")}return i.default.createHash("md5").update(t).digest()}var r=md5;e["default"]=r},5332:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var s="00000000-0000-0000-0000-000000000000";e["default"]=s},2746:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6900));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function parse(t){if(!(0,i.default)(t)){throw TypeError("Invalid UUID")}let e;const s=new Uint8Array(16);s[0]=(e=parseInt(t.slice(0,8),16))>>>24;s[1]=e>>>16&255;s[2]=e>>>8&255;s[3]=e&255;s[4]=(e=parseInt(t.slice(9,13),16))>>>8;s[5]=e&255;s[6]=(e=parseInt(t.slice(14,18),16))>>>8;s[7]=e&255;s[8]=(e=parseInt(t.slice(19,23),16))>>>8;s[9]=e&255;s[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255;s[11]=e/4294967296&255;s[12]=e>>>24&255;s[13]=e>>>16&255;s[14]=e>>>8&255;s[15]=e&255;return s}var r=parse;e["default"]=r},814:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;e["default"]=s},807:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=rng;var i=_interopRequireDefault(s(6113));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const r=new Uint8Array(256);let n=r.length;function rng(){if(n>r.length-16){i.default.randomFillSync(r);n=0}return r.slice(n,n+=16)}},5274:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6113));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function sha1(t){if(Array.isArray(t)){t=Buffer.from(t)}else if(typeof t==="string"){t=Buffer.from(t,"utf8")}return i.default.createHash("sha1").update(t).digest()}var r=sha1;e["default"]=r},8950:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6900));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const r=[];for(let t=0;t<256;++t){r.push((t+256).toString(16).substr(1))}function stringify(t,e=0){const s=(r[t[e+0]]+r[t[e+1]]+r[t[e+2]]+r[t[e+3]]+"-"+r[t[e+4]]+r[t[e+5]]+"-"+r[t[e+6]]+r[t[e+7]]+"-"+r[t[e+8]]+r[t[e+9]]+"-"+r[t[e+10]]+r[t[e+11]]+r[t[e+12]]+r[t[e+13]]+r[t[e+14]]+r[t[e+15]]).toLowerCase();if(!(0,i.default)(s)){throw TypeError("Stringified UUID is invalid")}return s}var n=stringify;e["default"]=n},8628:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(807));var r=_interopRequireDefault(s(8950));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}let n;let o;let a=0;let h=0;function v1(t,e,s){let l=e&&s||0;const c=e||new Array(16);t=t||{};let u=t.node||n;let f=t.clockseq!==undefined?t.clockseq:o;if(u==null||f==null){const e=t.random||(t.rng||i.default)();if(u==null){u=n=[e[0]|1,e[1],e[2],e[3],e[4],e[5]]}if(f==null){f=o=(e[6]<<8|e[7])&16383}}let d=t.msecs!==undefined?t.msecs:Date.now();let p=t.nsecs!==undefined?t.nsecs:h+1;const g=d-a+(p-h)/1e4;if(g<0&&t.clockseq===undefined){f=f+1&16383}if((g<0||d>a)&&t.nsecs===undefined){p=0}if(p>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}a=d;h=p;o=f;d+=122192928e5;const y=((d&268435455)*1e4+p)%4294967296;c[l++]=y>>>24&255;c[l++]=y>>>16&255;c[l++]=y>>>8&255;c[l++]=y&255;const w=d/4294967296*1e4&268435455;c[l++]=w>>>8&255;c[l++]=w&255;c[l++]=w>>>24&15|16;c[l++]=w>>>16&255;c[l++]=f>>>8|128;c[l++]=f&255;for(let t=0;t<6;++t){c[l+t]=u[t]}return e||(0,r.default)(c)}var l=v1;e["default"]=l},6409:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(5998));var r=_interopRequireDefault(s(4569));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const n=(0,i.default)("v3",48,r.default);var o=n;e["default"]=o},5998:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=_default;e.URL=e.DNS=void 0;var i=_interopRequireDefault(s(8950));var r=_interopRequireDefault(s(2746));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function stringToBytes(t){t=unescape(encodeURIComponent(t));const e=[];for(let s=0;s{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(807));var r=_interopRequireDefault(s(8950));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function v4(t,e,s){t=t||{};const n=t.random||(t.rng||i.default)();n[6]=n[6]&15|64;n[8]=n[8]&63|128;if(e){s=s||0;for(let t=0;t<16;++t){e[s+t]=n[t]}return e}return(0,r.default)(n)}var n=v4;e["default"]=n},9120:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(5998));var r=_interopRequireDefault(s(5274));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const n=(0,i.default)("v5",80,r.default);var o=n;e["default"]=o},6900:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(814));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function validate(t){return typeof t==="string"&&i.default.test(t)}var r=validate;e["default"]=r},1595:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e["default"]=void 0;var i=_interopRequireDefault(s(6900));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function version(t){if(!(0,i.default)(t)){throw TypeError("Invalid UUID")}return parseInt(t.substr(14,1),16)}var r=version;e["default"]=r},685:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.mapFilesToBenchmarks=void 0;const i=s(7147);function benchmarksFromFile(t){let e=(0,i.readFileSync)(t);let s=JSON.parse(e.toString());return s}function mapFilesToBenchmarks(t){return t.flatMap((function(t){return benchmarksFromFile(t)}))}e.mapFilesToBenchmarks=mapFilesToBenchmarks},399:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.run=void 0;const i=s(2186);const r=s(8211);const n=s(685);const o=s(6961);function run(){let t=(0,i.getInput)("benchmark-results",{required:true});(0,i.debug)("Getting results matching path "+t);try{let e=r.glob.sync(t);let s=(0,n.mapFilesToBenchmarks)(e);if(s.length<1){(0,i.setFailed)("Didn't find any benchmarks");return}let a=(0,o.buildBenchmarkTable)(s);(0,i.setOutput)("benchmark-table",a)}catch{(0,i.setFailed)("Failed to get benchmarks");return}}e.run=run},6961:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.buildBenchmarkTable=void 0;function formattedScoreFor(t){return t.primaryMetric.score.toFixed(3)+t.primaryMetric.scoreUnit}function formattedErrorFor(t){return t.primaryMetric.scoreError.toFixed(3)+t.primaryMetric.scoreUnit}function buildBenchmarkTable(t){let e=`| Benchmark | Score | Error |`;e+=`\n`;e+=`| --------- | ----- | ----- |`;t.forEach((function(t){e+=`\n`;e+=`| ${t.benchmark} | ${formattedScoreFor(t)} | ${formattedErrorFor(t)} |`}));return e}e.buildBenchmarkTable=buildBenchmarkTable},9491:t=>{"use strict";t.exports=require("assert")},6113:t=>{"use strict";t.exports=require("crypto")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},3292:t=>{"use strict";t.exports=require("fs/promises")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},1808:t=>{"use strict";t.exports=require("net")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},2781:t=>{"use strict";t.exports=require("stream")},1576:t=>{"use strict";t.exports=require("string_decoder")},4404:t=>{"use strict";t.exports=require("tls")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},2487:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Glob=void 0;const i=s(1953);const r=s(1081);const n=s(7310);const o=s(6866);const a=s(153);const h=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;opts;patterns;constructor(t,e){if(!e)throw new TypeError("glob options required");this.withFileTypes=!!e.withFileTypes;this.signal=e.signal;this.follow=!!e.follow;this.dot=!!e.dot;this.dotRelative=!!e.dotRelative;this.nodir=!!e.nodir;this.mark=!!e.mark;if(!e.cwd){this.cwd=""}else if(e.cwd instanceof URL||e.cwd.startsWith("file://")){e.cwd=(0,n.fileURLToPath)(e.cwd)}this.cwd=e.cwd||"";this.root=e.root;this.magicalBraces=!!e.magicalBraces;this.nobrace=!!e.nobrace;this.noext=!!e.noext;this.realpath=!!e.realpath;this.absolute=e.absolute;this.noglobstar=!!e.noglobstar;this.matchBase=!!e.matchBase;this.maxDepth=typeof e.maxDepth==="number"?e.maxDepth:Infinity;this.stat=!!e.stat;this.ignore=e.ignore;if(this.withFileTypes&&this.absolute!==undefined){throw new Error("cannot set absolute and withFileTypes:true")}if(typeof t==="string"){t=[t]}this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false;if(this.windowsPathsNoEscape){t=t.map((t=>t.replace(/\\/g,"/")))}if(this.matchBase){if(e.noglobstar){throw new TypeError("base matching requires globstar")}t=t.map((t=>t.includes("/")?t:`./**/${t}`))}this.pattern=t;this.platform=e.platform||h;this.opts={...e,platform:this.platform};if(e.scurry){this.scurry=e.scurry;if(e.nocase!==undefined&&e.nocase!==e.scurry.nocase){throw new Error("nocase option contradicts provided scurry option")}}else{const t=e.platform==="win32"?r.PathScurryWin32:e.platform==="darwin"?r.PathScurryDarwin:e.platform?r.PathScurryPosix:r.PathScurry;this.scurry=new t(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;const s=this.platform==="darwin"||this.platform==="win32";const a={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:true,noext:this.noext,nonegate:true,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug};const l=this.pattern.map((t=>new i.Minimatch(t,a)));const[c,u]=l.reduce(((t,e)=>{t[0].push(...e.set);t[1].push(...e.globParts);return t}),[[],[]]);this.patterns=c.map(((t,e)=>{const s=u[e];if(!s)throw new Error("invalid pattern object");return new o.Pattern(t,s,0,this.platform)}))}async walk(){return[...await new a.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}).walk()]}walkSync(){return[...new a.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}).walkSync()]}stream(){return new a.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}).stream()}streamSync(){return new a.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}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}e.Glob=Glob},3133:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.hasMagic=void 0;const i=s(1953);const hasMagic=(t,e={})=>{if(!Array.isArray(t)){t=[t]}for(const s of t){if(new i.Minimatch(s,e).hasMagic())return true}return false};e.hasMagic=hasMagic},9703:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Ignore=void 0;const i=s(1953);const r=s(6866);const n=typeof process==="object"&&process&&typeof process.platform==="string"?process.platform:"linux";class Ignore{relative;relativeChildren;absolute;absoluteChildren;constructor(t,{nobrace:e,nocase:s,noext:o,noglobstar:a,platform:h=n}){this.relative=[];this.absolute=[];this.relativeChildren=[];this.absoluteChildren=[];const l={dot:true,nobrace:e,nocase:s,noext:o,noglobstar:a,optimizationLevel:2,platform:h,nocomment:true,nonegate:true};for(const e of t){const t=new i.Minimatch(e,l);for(let e=0;e{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.glob=e.hasMagic=e.Glob=e.unescape=e.escape=e.sync=e.iterate=e.iterateSync=e.stream=e.streamSync=e.globIterate=e.globIterateSync=e.globSync=e.globStream=e.globStreamSync=void 0;const i=s(1953);const r=s(2487);const n=s(3133);function globStreamSync(t,e={}){return new r.Glob(t,e).streamSync()}e.globStreamSync=globStreamSync;function globStream(t,e={}){return new r.Glob(t,e).stream()}e.globStream=globStream;function globSync(t,e={}){return new r.Glob(t,e).walkSync()}e.globSync=globSync;async function glob_(t,e={}){return new r.Glob(t,e).walk()}function globIterateSync(t,e={}){return new r.Glob(t,e).iterateSync()}e.globIterateSync=globIterateSync;function globIterate(t,e={}){return new r.Glob(t,e).iterate()}e.globIterate=globIterate;e.streamSync=globStreamSync;e.stream=Object.assign(globStream,{sync:globStreamSync});e.iterateSync=globIterateSync;e.iterate=Object.assign(globIterate,{sync:globIterateSync});e.sync=Object.assign(globSync,{stream:globStreamSync,iterate:globIterateSync});var o=s(1953);Object.defineProperty(e,"escape",{enumerable:true,get:function(){return o.escape}});Object.defineProperty(e,"unescape",{enumerable:true,get:function(){return o.unescape}});var a=s(2487);Object.defineProperty(e,"Glob",{enumerable:true,get:function(){return a.Glob}});var h=s(3133);Object.defineProperty(e,"hasMagic",{enumerable:true,get:function(){return h.hasMagic}});e.glob=Object.assign(glob_,{glob:glob_,globSync:globSync,sync:e.sync,globStream:globStream,stream:e.stream,globStreamSync:globStreamSync,streamSync:e.streamSync,globIterate:globIterate,iterate:e.iterate,globIterateSync:globIterateSync,iterateSync:e.iterateSync,Glob:r.Glob,hasMagic:n.hasMagic,escape:i.escape,unescape:i.unescape});e.glob.glob=e.glob},6866:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Pattern=void 0;const i=s(1953);const isPatternList=t=>t.length>=1;const isGlobList=t=>t.length>=1;class Pattern{#t;#e;#s;length;#i;#r;#n;#o;#a;#h;#l=true;constructor(t,e,s,i){if(!isPatternList(t)){throw new TypeError("empty pattern list")}if(!isGlobList(e)){throw new TypeError("empty glob list")}if(e.length!==t.length){throw new TypeError("mismatched pattern list and glob list lengths")}this.length=t.length;if(s<0||s>=this.length){throw new TypeError("index out of range")}this.#t=t;this.#e=e;this.#s=s;this.#i=i;if(this.#s===0){if(this.isUNC()){const[t,e,s,i,...r]=this.#t;const[n,o,a,h,...l]=this.#e;if(r[0]===""){r.shift();l.shift()}const c=[t,e,s,i,""].join("/");const u=[n,o,a,h,""].join("/");this.#t=[c,...r];this.#e=[u,...l];this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){const[t,...e]=this.#t;const[s,...i]=this.#e;if(e[0]===""){e.shift();i.shift()}const r=t+"/";const n=s+"/";this.#t=[r,...e];this.#e=[n,...i];this.length=this.#t.length}}}pattern(){return this.#t[this.#s]}isString(){return typeof this.#t[this.#s]==="string"}isGlobstar(){return this.#t[this.#s]===i.GLOBSTAR}isRegExp(){return this.#t[this.#s]instanceof RegExp}globString(){return this.#n=this.#n||(this.#s===0?this.isAbsolute()?this.#e[0]+this.#e.slice(1).join("/"):this.#e.join("/"):this.#e.slice(this.#s).join("/"))}hasMore(){return this.length>this.#s+1}rest(){if(this.#r!==undefined)return this.#r;if(!this.hasMore())return this.#r=null;this.#r=new Pattern(this.#t,this.#e,this.#s+1,this.#i);this.#r.#h=this.#h;this.#r.#a=this.#a;this.#r.#o=this.#o;return this.#r}isUNC(){const t=this.#t;return this.#a!==undefined?this.#a:this.#a=this.#i==="win32"&&this.#s===0&&t[0]===""&&t[1]===""&&typeof t[2]==="string"&&!!t[2]&&typeof t[3]==="string"&&!!t[3]}isDrive(){const t=this.#t;return this.#o!==undefined?this.#o:this.#o=this.#i==="win32"&&this.#s===0&&this.length>1&&typeof t[0]==="string"&&/^[a-z]:$/i.test(t[0])}isAbsolute(){const t=this.#t;return this.#h!==undefined?this.#h:this.#h=t[0]===""&&t.length>1||this.isDrive()||this.isUNC()}root(){const t=this.#t[0];return typeof t==="string"&&this.isAbsolute()&&this.#s===0?t:""}checkFollowGlobstar(){return!(this.#s===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){if(this.#s===0||!this.isGlobstar()||!this.#l)return false;this.#l=false;return true}}e.Pattern=Pattern},4628:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;const i=s(1953);class HasWalkedCache{store;constructor(t=new Map){this.store=t}copy(){return new HasWalkedCache(new Map(this.store))}hasWalked(t,e){return this.store.get(t.fullpath())?.has(e.globString())}storeWalked(t,e){const s=t.fullpath();const i=this.store.get(s);if(i)i.add(e.globString());else this.store.set(s,new Set([e.globString()]))}}e.HasWalkedCache=HasWalkedCache;class MatchRecord{store=new Map;add(t,e,s){const i=(e?2:0)|(s?1:0);const r=this.store.get(t);this.store.set(t,r===undefined?i:i&r)}entries(){return[...this.store.entries()].map((([t,e])=>[t,!!(e&2),!!(e&1)]))}}e.MatchRecord=MatchRecord;class SubWalks{store=new Map;add(t,e){if(!t.canReaddir()){return}const s=this.store.get(t);if(s){if(!s.find((t=>t.globString()===e.globString()))){s.push(e)}}else this.store.set(t,[e])}get(t){const e=this.store.get(t);if(!e){throw new Error("attempting to walk unknown path")}return e}entries(){return this.keys().map((t=>[t,this.store.get(t)]))}keys(){return[...this.store.keys()].filter((t=>t.canReaddir()))}}e.SubWalks=SubWalks;class Processor{hasWalkedCache;matches=new MatchRecord;subwalks=new SubWalks;patterns;follow;dot;opts;constructor(t,e){this.opts=t;this.follow=!!t.follow;this.dot=!!t.dot;this.hasWalkedCache=e?e.copy():new HasWalkedCache}processPatterns(t,e){this.patterns=e;const s=e.map((e=>[t,e]));for(let[t,e]of s){this.hasWalkedCache.storeWalked(t,e);const s=e.root();const r=e.isAbsolute()&&this.opts.absolute!==false;if(s){t=t.resolve(s==="/"&&this.opts.root!==undefined?this.opts.root:s);const i=e.rest();if(!i){this.matches.add(t,true,false);continue}else{e=i}}if(t.isENOENT())continue;let n;let o;let a=false;while(typeof(n=e.pattern())==="string"&&(o=e.rest())){const s=t.resolve(n);t=s;e=o;a=true}n=e.pattern();o=e.rest();if(a){if(this.hasWalkedCache.hasWalked(t,e))continue;this.hasWalkedCache.storeWalked(t,e)}if(typeof n==="string"){const e=n===".."||n===""||n===".";this.matches.add(t.resolve(n),r,e);continue}else if(n===i.GLOBSTAR){if(!t.isSymbolicLink()||this.follow||e.checkFollowGlobstar()){this.subwalks.add(t,e)}const s=o?.pattern();const i=o?.rest();if(!o||(s===""||s===".")&&!i){this.matches.add(t,r,s===""||s===".")}else{if(s===".."){const e=t.parent||t;if(!i)this.matches.add(e,r,true);else if(!this.hasWalkedCache.hasWalked(e,i)){this.subwalks.add(e,i)}}}}else if(n instanceof RegExp){this.subwalks.add(t,e)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Processor(this.opts,this.hasWalkedCache)}filterEntries(t,e){const s=this.subwalks.get(t);const r=this.child();for(const t of e){for(const e of s){const s=e.isAbsolute();const n=e.pattern();const o=e.rest();if(n===i.GLOBSTAR){r.testGlobstar(t,e,o,s)}else if(n instanceof RegExp){r.testRegExp(t,n,o,s)}else{r.testString(t,n,o,s)}}}return r}testGlobstar(t,e,s,i){if(this.dot||!t.name.startsWith(".")){if(!e.hasMore()){this.matches.add(t,i,false)}if(t.canReaddir()){if(this.follow||!t.isSymbolicLink()){this.subwalks.add(t,e)}else if(t.isSymbolicLink()){if(s&&e.checkFollowGlobstar()){this.subwalks.add(t,s)}else if(e.markFollowGlobstar()){this.subwalks.add(t,e)}}}}if(s){const e=s.pattern();if(typeof e==="string"&&e!==".."&&e!==""&&e!=="."){this.testString(t,e,s.rest(),i)}else if(e===".."){const e=t.parent||t;this.subwalks.add(e,s)}else if(e instanceof RegExp){this.testRegExp(t,e,s.rest(),i)}}}testRegExp(t,e,s,i){if(!e.test(t.name))return;if(!s){this.matches.add(t,i,false)}else{this.subwalks.add(t,s)}}testString(t,e,s,i){if(!t.isNamed(e))return;if(!s){this.matches.add(t,i,false)}else{this.subwalks.add(t,s)}}}e.Processor=Processor},153:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;const i=s(4968);const r=s(9703);const n=s(4628);const makeIgnore=(t,e)=>typeof t==="string"?new r.Ignore([t],e):Array.isArray(t)?new r.Ignore(t,e):t;class GlobUtil{path;patterns;opts;seen=new Set;paused=false;aborted=false;#c=[];#u;#f;signal;maxDepth;constructor(t,e,s){this.patterns=t;this.path=e;this.opts=s;this.#f=!s.posix&&s.platform==="win32"?"\\":"/";if(s.ignore){this.#u=makeIgnore(s.ignore,s)}this.maxDepth=s.maxDepth||Infinity;if(s.signal){this.signal=s.signal;this.signal.addEventListener("abort",(()=>{this.#c.length=0}))}}#d(t){return this.seen.has(t)||!!this.#u?.ignored?.(t)}#p(t){return!!this.#u?.childrenIgnored?.(t)}pause(){this.paused=true}resume(){if(this.signal?.aborted)return;this.paused=false;let t=undefined;while(!this.paused&&(t=this.#c.shift())){t()}}onResume(t){if(this.signal?.aborted)return;if(!this.paused){t()}else{this.#c.push(t)}}async matchCheck(t,e){if(e&&this.opts.nodir)return undefined;let s;if(this.opts.realpath){s=t.realpathCached()||await t.realpath();if(!s)return undefined;t=s}const i=t.isUnknown()||this.opts.stat;const r=i?await t.lstat():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){const t=await r.realpath();if(t&&(t.isUnknown()||this.opts.stat)){await t.lstat()}}return this.matchCheckTest(r,e)}matchCheckTest(t,e){return t&&(this.maxDepth===Infinity||t.depth()<=this.maxDepth)&&(!e||t.canReaddir())&&(!this.opts.nodir||!t.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!t.isSymbolicLink()||!t.realpathCached()?.isDirectory())&&!this.#d(t)?t:undefined}matchCheckSync(t,e){if(e&&this.opts.nodir)return undefined;let s;if(this.opts.realpath){s=t.realpathCached()||t.realpathSync();if(!s)return undefined;t=s}const i=t.isUnknown()||this.opts.stat;const r=i?t.lstatSync():t;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){const t=r.realpathSync();if(t&&(t?.isUnknown()||this.opts.stat)){t.lstatSync()}}return this.matchCheckTest(r,e)}matchFinish(t,e){if(this.#d(t))return;const s=this.opts.absolute===undefined?e:this.opts.absolute;this.seen.add(t);const i=this.opts.mark&&t.isDirectory()?this.#f:"";if(this.opts.withFileTypes){this.matchEmit(t)}else if(s){const e=this.opts.posix?t.fullpathPosix():t.fullpath();this.matchEmit(e+i)}else{const e=this.opts.posix?t.relativePosix():t.relative();const s=this.opts.dotRelative&&!e.startsWith(".."+this.#f)?"."+this.#f:"";this.matchEmit(!e?"."+i:s+e+i)}}async match(t,e,s){const i=await this.matchCheck(t,s);if(i)this.matchFinish(i,e)}matchSync(t,e,s){const i=this.matchCheckSync(t,s);if(i)this.matchFinish(i,e)}walkCB(t,e,s){if(this.signal?.aborted)s();this.walkCB2(t,e,new n.Processor(this.opts),s)}walkCB2(t,e,s,i){if(this.#p(t))return i();if(this.signal?.aborted)i();if(this.paused){this.onResume((()=>this.walkCB2(t,e,s,i)));return}s.processPatterns(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#d(t))continue;r++;this.match(t,e,i).then((()=>next()))}for(const t of s.subwalkTargets()){if(this.maxDepth!==Infinity&&t.depth()>=this.maxDepth){continue}r++;const e=t.readdirCached();if(t.calledReaddir())this.walkCB3(t,e,s,next);else{t.readdirCB(((e,i)=>this.walkCB3(t,i,s,next)),true)}}next()}walkCB3(t,e,s,i){s=s.filterEntries(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#d(t))continue;r++;this.match(t,e,i).then((()=>next()))}for(const[t,e]of s.subwalks.entries()){r++;this.walkCB2(t,e,s.child(),next)}next()}walkCBSync(t,e,s){if(this.signal?.aborted)s();this.walkCB2Sync(t,e,new n.Processor(this.opts),s)}walkCB2Sync(t,e,s,i){if(this.#p(t))return i();if(this.signal?.aborted)i();if(this.paused){this.onResume((()=>this.walkCB2Sync(t,e,s,i)));return}s.processPatterns(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#d(t))continue;this.matchSync(t,e,i)}for(const t of s.subwalkTargets()){if(this.maxDepth!==Infinity&&t.depth()>=this.maxDepth){continue}r++;const e=t.readdirSync();this.walkCB3Sync(t,e,s,next)}next()}walkCB3Sync(t,e,s,i){s=s.filterEntries(t,e);let r=1;const next=()=>{if(--r===0)i()};for(const[t,e,i]of s.matches.entries()){if(this.#d(t))continue;this.matchSync(t,e,i)}for(const[t,e]of s.subwalks.entries()){r++;this.walkCB2Sync(t,e,s.child(),next)}next()}}e.GlobUtil=GlobUtil;class GlobWalker extends GlobUtil{matches;constructor(t,e,s){super(t,e,s);this.matches=new Set}matchEmit(t){this.matches.add(t)}async walk(){if(this.signal?.aborted)throw this.signal.reason;if(this.path.isUnknown()){await this.path.lstat()}await new Promise(((t,e)=>{this.walkCB(this.path,this.patterns,(()=>{if(this.signal?.aborted){e(this.signal.reason)}else{t(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}}e.GlobWalker=GlobWalker;class GlobStream extends GlobUtil{results;constructor(t,e,s){super(t,e,s);this.results=new i.Minipass({signal:this.signal,objectMode:true});this.results.on("drain",(()=>this.resume()));this.results.on("resume",(()=>this.resume()))}matchEmit(t){this.results.write(t);if(!this.results.flowing)this.pause()}stream(){const t=this.path;if(t.isUnknown()){t.lstat().then((()=>{this.walkCB(t,this.patterns,(()=>this.results.end()))}))}else{this.walkCB(t,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}}e.GlobStream=GlobStream},3866:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.LRUCache=void 0;const s=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const i=new Set;const r=typeof process==="object"&&!!process?process:{};const emitWarning=(t,e,s,i)=>{typeof r.emitWarning==="function"?r.emitWarning(t,e,s,i):console.error(`[${s}] ${e}: ${t}`)};let n=globalThis.AbortController;let o=globalThis.AbortSignal;if(typeof n==="undefined"){o=class AbortSignal{onabort;_onabort=[];reason;aborted=false;addEventListener(t,e){this._onabort.push(e)}};n=class AbortController{constructor(){warnACPolyfill()}signal=new o;abort(t){if(this.signal.aborted)return;this.signal.reason=t;this.signal.aborted=true;for(const e of this.signal._onabort){e(t)}this.signal.onabort?.(t)}};let t=r.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1";const warnACPolyfill=()=>{if(!t)return;t=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=t=>!i.has(t);const a=Symbol("type");const isPosInt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t);const getUintArray=t=>!isPosInt(t)?null:t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(t){super(t);this.fill(0)}}class Stack{heap;length;static#m=false;static create(t){const e=getUintArray(t);if(!e)return[];Stack.#m=true;const s=new Stack(t,e);Stack.#m=false;return s}constructor(t,e){if(!Stack.#m){throw new TypeError("instantiate Stack using Stack.create(n)")}this.heap=new e(t);this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class LRUCache{#g;#y;#w;#b;#v;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#S;#_;#k;#O;#P;#x;#E;#C;#T;#R;#A;#M;#L;#D;#F;#j;#B;static unsafeExposeInternals(t){return{starts:t.#L,ttls:t.#D,sizes:t.#M,keyMap:t.#k,keyList:t.#O,valList:t.#P,next:t.#x,prev:t.#E,get head(){return t.#C},get tail(){return t.#T},free:t.#R,isBackgroundFetch:e=>t.#I(e),backgroundFetch:(e,s,i,r)=>t.#N(e,s,i,r),moveToTail:e=>t.#U(e),indexes:e=>t.#z(e),rindexes:e=>t.#q(e),isStale:e=>t.#W(e)}}get max(){return this.#g}get maxSize(){return this.#y}get calculatedSize(){return this.#_}get size(){return this.#S}get fetchMethod(){return this.#v}get dispose(){return this.#w}get disposeAfter(){return this.#b}constructor(t){const{max:e=0,ttl:s,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:h,dispose:l,disposeAfter:c,noDisposeOnSet:u,noUpdateTTL:f,maxSize:d=0,maxEntrySize:p=0,sizeCalculation:g,fetchMethod:y,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:v,allowStaleOnFetchAbort:S,ignoreFetchAbort:_}=t;if(e!==0&&!isPosInt(e)){throw new TypeError("max option must be a nonnegative integer")}const k=e?getUintArray(e):Array;if(!k){throw new Error("invalid max value: "+e)}this.#g=e;this.#y=d;this.maxEntrySize=p||this.#y;this.sizeCalculation=g;if(this.sizeCalculation){if(!this.#y&&!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(y!==undefined&&typeof y!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.#v=y;this.#j=!!y;this.#k=new Map;this.#O=new Array(e).fill(undefined);this.#P=new Array(e).fill(undefined);this.#x=new k(e);this.#E=new k(e);this.#C=0;this.#T=0;this.#R=Stack.create(e);this.#S=0;this.#_=0;if(typeof l==="function"){this.#w=l}if(typeof c==="function"){this.#b=c;this.#A=[]}else{this.#b=undefined;this.#A=undefined}this.#F=!!this.#w;this.#B=!!this.#b;this.noDisposeOnSet=!!u;this.noUpdateTTL=!!f;this.noDeleteOnFetchRejection=!!w;this.allowStaleOnFetchRejection=!!v;this.allowStaleOnFetchAbort=!!S;this.ignoreFetchAbort=!!_;if(this.maxEntrySize!==0){if(this.#y!==0){if(!isPosInt(this.#y)){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.#G()}this.allowStale=!!h;this.noDeleteOnStaleGet=!!b;this.updateAgeOnGet=!!o;this.updateAgeOnHas=!!a;this.ttlResolution=isPosInt(r)||r===0?r:1;this.ttlAutopurge=!!n;this.ttl=s||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.#$()}if(this.#g===0&&this.ttl===0&&this.#y===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.#g&&!this.#y){const t="LRU_CACHE_UNBOUNDED";if(shouldWarn(t)){i.add(t);const e="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";emitWarning(e,"UnboundedCacheWarning",t,LRUCache)}}}getRemainingTTL(t){return this.#k.has(t)?Infinity:0}#$(){const t=new ZeroArray(this.#g);const e=new ZeroArray(this.#g);this.#D=t;this.#L=e;this.#H=(i,r,n=s.now())=>{e[i]=r!==0?n:0;t[i]=r;if(r!==0&&this.ttlAutopurge){const t=setTimeout((()=>{if(this.#W(i)){this.delete(this.#O[i])}}),r+1);if(t.unref){t.unref()}}};this.#V=i=>{e[i]=t[i]!==0?s.now():0};this.#J=(s,r)=>{if(t[r]){const n=t[r];const o=e[r];if(!n||!o)return;s.ttl=n;s.start=o;s.now=i||getNow();const a=s.now-o;s.remainingTTL=n-a}};let i=0;const getNow=()=>{const t=s.now();if(this.ttlResolution>0){i=t;const e=setTimeout((()=>i=0),this.ttlResolution);if(e.unref){e.unref()}}return t};this.getRemainingTTL=s=>{const r=this.#k.get(s);if(r===undefined){return 0}const n=t[r];const o=e[r];if(!n||!o){return Infinity}const a=(i||getNow())-o;return n-a};this.#W=s=>{const r=e[s];const n=t[s];return!!n&&!!r&&(i||getNow())-r>n}}#V=()=>{};#J=()=>{};#H=()=>{};#W=()=>false;#G(){const t=new ZeroArray(this.#g);this.#_=0;this.#M=t;this.#K=e=>{this.#_-=t[e];t[e]=0};this.#Y=(t,e,s,i)=>{if(this.#I(e)){return 0}if(!isPosInt(s)){if(i){if(typeof i!=="function"){throw new TypeError("sizeCalculation must be a function")}s=i(e,t);if(!isPosInt(s)){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 s};this.#Z=(e,s,i)=>{t[e]=s;if(this.#y){const s=this.#y-t[e];while(this.#_>s){this.#Q(true)}}this.#_+=t[e];if(i){i.entrySize=s;i.totalCalculatedSize=this.#_}}}#K=t=>{};#Z=(t,e,s)=>{};#Y=(t,e,s,i)=>{if(s||i){throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}return 0};*#z({allowStale:t=this.allowStale}={}){if(this.#S){for(let e=this.#T;true;){if(!this.#X(e)){break}if(t||!this.#W(e)){yield e}if(e===this.#C){break}else{e=this.#E[e]}}}}*#q({allowStale:t=this.allowStale}={}){if(this.#S){for(let e=this.#C;true;){if(!this.#X(e)){break}if(t||!this.#W(e)){yield e}if(e===this.#T){break}else{e=this.#x[e]}}}}#X(t){return t!==undefined&&this.#k.get(this.#O[t])===t}*entries(){for(const t of this.#z()){if(this.#P[t]!==undefined&&this.#O[t]!==undefined&&!this.#I(this.#P[t])){yield[this.#O[t],this.#P[t]]}}}*rentries(){for(const t of this.#q()){if(this.#P[t]!==undefined&&this.#O[t]!==undefined&&!this.#I(this.#P[t])){yield[this.#O[t],this.#P[t]]}}}*keys(){for(const t of this.#z()){const e=this.#O[t];if(e!==undefined&&!this.#I(this.#P[t])){yield e}}}*rkeys(){for(const t of this.#q()){const e=this.#O[t];if(e!==undefined&&!this.#I(this.#P[t])){yield e}}}*values(){for(const t of this.#z()){const e=this.#P[t];if(e!==undefined&&!this.#I(this.#P[t])){yield this.#P[t]}}}*rvalues(){for(const t of this.#q()){const e=this.#P[t];if(e!==undefined&&!this.#I(this.#P[t])){yield this.#P[t]}}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(t,e={}){for(const s of this.#z()){const i=this.#P[s];const r=this.#I(i)?i.__staleWhileFetching:i;if(r===undefined)continue;if(t(r,this.#O[s],this)){return this.get(this.#O[s],e)}}}forEach(t,e=this){for(const s of this.#z()){const i=this.#P[s];const r=this.#I(i)?i.__staleWhileFetching:i;if(r===undefined)continue;t.call(e,r,this.#O[s],this)}}rforEach(t,e=this){for(const s of this.#q()){const i=this.#P[s];const r=this.#I(i)?i.__staleWhileFetching:i;if(r===undefined)continue;t.call(e,r,this.#O[s],this)}}purgeStale(){let t=false;for(const e of this.#q({allowStale:true})){if(this.#W(e)){this.delete(this.#O[e]);t=true}}return t}info(t){const e=this.#k.get(t);if(e===undefined)return undefined;const i=this.#P[e];const r=this.#I(i)?i.__staleWhileFetching:i;if(r===undefined)return undefined;const n={value:r};if(this.#D&&this.#L){const t=this.#D[e];const i=this.#L[e];if(t&&i){const e=t-(s.now()-i);n.ttl=e;n.start=Date.now()}}if(this.#M){n.size=this.#M[e]}return n}dump(){const t=[];for(const e of this.#z({allowStale:true})){const i=this.#O[e];const r=this.#P[e];const n=this.#I(r)?r.__staleWhileFetching:r;if(n===undefined||i===undefined)continue;const o={value:n};if(this.#D&&this.#L){o.ttl=this.#D[e];const t=s.now()-this.#L[e];o.start=Math.floor(Date.now()-t)}if(this.#M){o.size=this.#M[e]}t.unshift([i,o])}return t}load(t){this.clear();for(const[e,i]of t){if(i.start){const t=Date.now()-i.start;i.start=s.now()-t}this.set(e,i.value,i)}}set(t,e,s={}){if(e===undefined){this.delete(t);return this}const{ttl:i=this.ttl,start:r,noDisposeOnSet:n=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:a}=s;let{noUpdateTTL:h=this.noUpdateTTL}=s;const l=this.#Y(t,e,s.size||0,o);if(this.maxEntrySize&&l>this.maxEntrySize){if(a){a.set="miss";a.maxEntrySizeExceeded=true}this.delete(t);return this}let c=this.#S===0?undefined:this.#k.get(t);if(c===undefined){c=this.#S===0?this.#T:this.#R.length!==0?this.#R.pop():this.#S===this.#g?this.#Q(false):this.#S;this.#O[c]=t;this.#P[c]=e;this.#k.set(t,c);this.#x[this.#T]=c;this.#E[c]=this.#T;this.#T=c;this.#S++;this.#Z(c,l,a);if(a)a.set="add";h=false}else{this.#U(c);const s=this.#P[c];if(e!==s){if(this.#j&&this.#I(s)){s.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:e}=s;if(e!==undefined&&!n){if(this.#F){this.#w?.(e,t,"set")}if(this.#B){this.#A?.push([e,t,"set"])}}}else if(!n){if(this.#F){this.#w?.(s,t,"set")}if(this.#B){this.#A?.push([s,t,"set"])}}this.#K(c);this.#Z(c,l,a);this.#P[c]=e;if(a){a.set="replace";const t=s&&this.#I(s)?s.__staleWhileFetching:s;if(t!==undefined)a.oldValue=t}}else if(a){a.set="update"}}if(i!==0&&!this.#D){this.#$()}if(this.#D){if(!h){this.#H(c,i,r)}if(a)this.#J(a,c)}if(!n&&this.#B&&this.#A){const t=this.#A;let e;while(e=t?.shift()){this.#b?.(...e)}}return this}pop(){try{while(this.#S){const t=this.#P[this.#C];this.#Q(true);if(this.#I(t)){if(t.__staleWhileFetching){return t.__staleWhileFetching}}else if(t!==undefined){return t}}}finally{if(this.#B&&this.#A){const t=this.#A;let e;while(e=t?.shift()){this.#b?.(...e)}}}}#Q(t){const e=this.#C;const s=this.#O[e];const i=this.#P[e];if(this.#j&&this.#I(i)){i.__abortController.abort(new Error("evicted"))}else if(this.#F||this.#B){if(this.#F){this.#w?.(i,s,"evict")}if(this.#B){this.#A?.push([i,s,"evict"])}}this.#K(e);if(t){this.#O[e]=undefined;this.#P[e]=undefined;this.#R.push(e)}if(this.#S===1){this.#C=this.#T=0;this.#R.length=0}else{this.#C=this.#x[e]}this.#k.delete(s);this.#S--;return e}has(t,e={}){const{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e;const r=this.#k.get(t);if(r!==undefined){const t=this.#P[r];if(this.#I(t)&&t.__staleWhileFetching===undefined){return false}if(!this.#W(r)){if(s){this.#V(r)}if(i){i.has="hit";this.#J(i,r)}return true}else if(i){i.has="stale";this.#J(i,r)}}else if(i){i.has="miss"}return false}peek(t,e={}){const{allowStale:s=this.allowStale}=e;const i=this.#k.get(t);if(i===undefined||!s&&this.#W(i)){return}const r=this.#P[i];return this.#I(r)?r.__staleWhileFetching:r}#N(t,e,s,i){const r=e===undefined?undefined:this.#P[e];if(this.#I(r)){return r}const o=new n;const{signal:a}=s;a?.addEventListener("abort",(()=>o.abort(a.reason)),{signal:o.signal});const h={signal:o.signal,options:s,context:i};const cb=(i,r=false)=>{const{aborted:n}=o.signal;const a=s.ignoreFetchAbort&&i!==undefined;if(s.status){if(n&&!r){s.status.fetchAborted=true;s.status.fetchError=o.signal.reason;if(a)s.status.fetchAbortIgnored=true}else{s.status.fetchResolved=true}}if(n&&!a&&!r){return fetchFail(o.signal.reason)}const c=l;if(this.#P[e]===l){if(i===undefined){if(c.__staleWhileFetching){this.#P[e]=c.__staleWhileFetching}else{this.delete(t)}}else{if(s.status)s.status.fetchUpdated=true;this.set(t,i,h.options)}}return i};const eb=t=>{if(s.status){s.status.fetchRejected=true;s.status.fetchError=t}return fetchFail(t)};const fetchFail=i=>{const{aborted:r}=o.signal;const n=r&&s.allowStaleOnFetchAbort;const a=n||s.allowStaleOnFetchRejection;const h=a||s.noDeleteOnFetchRejection;const c=l;if(this.#P[e]===l){const s=!h||c.__staleWhileFetching===undefined;if(s){this.delete(t)}else if(!n){this.#P[e]=c.__staleWhileFetching}}if(a){if(s.status&&c.__staleWhileFetching!==undefined){s.status.returnedStale=true}return c.__staleWhileFetching}else if(c.__returned===c){throw i}};const pcall=(e,i)=>{const n=this.#v?.(t,r,h);if(n&&n instanceof Promise){n.then((t=>e(t===undefined?undefined:t)),i)}o.signal.addEventListener("abort",(()=>{if(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort){e(undefined);if(s.allowStaleOnFetchAbort){e=t=>cb(t,true)}}}))};if(s.status)s.status.fetchDispatched=true;const l=new Promise(pcall).then(cb,eb);const c=Object.assign(l,{__abortController:o,__staleWhileFetching:r,__returned:undefined});if(e===undefined){this.set(t,c,{...h.options,status:undefined});e=this.#k.get(t)}else{this.#P[e]=c}return c}#I(t){if(!this.#j)return false;const e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof n}async fetch(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:p,forceRefresh:g=false,status:y,signal:w}=e;if(!this.#j){if(y)y.fetch="get";return this.get(t,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:y})}const b={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:n,noDisposeOnSet:o,size:a,sizeCalculation:h,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:d,ignoreFetchAbort:f,status:y,signal:w};let v=this.#k.get(t);if(v===undefined){if(y)y.fetch="miss";const e=this.#N(t,v,b,p);return e.__returned=e}else{const e=this.#P[v];if(this.#I(e)){const t=s&&e.__staleWhileFetching!==undefined;if(y){y.fetch="inflight";if(t)y.returnedStale=true}return t?e.__staleWhileFetching:e.__returned=e}const r=this.#W(v);if(!g&&!r){if(y)y.fetch="hit";this.#U(v);if(i){this.#V(v)}if(y)this.#J(y,v);return e}const n=this.#N(t,v,b,p);const o=n.__staleWhileFetching!==undefined;const a=o&&s;if(y){y.fetch=r?"stale":"refresh";if(a&&r)y.returnedStale=true}return a?n.__staleWhileFetching:n.__returned=n}}get(t,e={}){const{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:n}=e;const o=this.#k.get(t);if(o!==undefined){const e=this.#P[o];const a=this.#I(e);if(n)this.#J(n,o);if(this.#W(o)){if(n)n.get="stale";if(!a){if(!r){this.delete(t)}if(n&&s)n.returnedStale=true;return s?e:undefined}else{if(n&&s&&e.__staleWhileFetching!==undefined){n.returnedStale=true}return s?e.__staleWhileFetching:undefined}}else{if(n)n.get="hit";if(a){return e.__staleWhileFetching}this.#U(o);if(i){this.#V(o)}return e}}else if(n){n.get="miss"}}#tt(t,e){this.#E[e]=t;this.#x[t]=e}#U(t){if(t!==this.#T){if(t===this.#C){this.#C=this.#x[t]}else{this.#tt(this.#E[t],this.#x[t])}this.#tt(this.#T,t);this.#T=t}}delete(t){let e=false;if(this.#S!==0){const s=this.#k.get(t);if(s!==undefined){e=true;if(this.#S===1){this.clear()}else{this.#K(s);const e=this.#P[s];if(this.#I(e)){e.__abortController.abort(new Error("deleted"))}else if(this.#F||this.#B){if(this.#F){this.#w?.(e,t,"delete")}if(this.#B){this.#A?.push([e,t,"delete"])}}this.#k.delete(t);this.#O[s]=undefined;this.#P[s]=undefined;if(s===this.#T){this.#T=this.#E[s]}else if(s===this.#C){this.#C=this.#x[s]}else{const t=this.#E[s];this.#x[t]=this.#x[s];const e=this.#x[s];this.#E[e]=this.#E[s]}this.#S--;this.#R.push(s)}}}if(this.#B&&this.#A?.length){const t=this.#A;let e;while(e=t?.shift()){this.#b?.(...e)}}return e}clear(){for(const t of this.#q({allowStale:true})){const e=this.#P[t];if(this.#I(e)){e.__abortController.abort(new Error("deleted"))}else{const s=this.#O[t];if(this.#F){this.#w?.(e,s,"delete")}if(this.#B){this.#A?.push([e,s,"delete"])}}}this.#k.clear();this.#P.fill(undefined);this.#O.fill(undefined);if(this.#D&&this.#L){this.#D.fill(0);this.#L.fill(0)}if(this.#M){this.#M.fill(0)}this.#C=0;this.#T=0;this.#R.length=0;this.#_=0;this.#S=0;if(this.#B&&this.#A){const t=this.#A;let e;while(e=t?.shift()){this.#b?.(...e)}}}}e.LRUCache=LRUCache},903:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.assertValidPattern=void 0;const s=1024*64;const assertValidPattern=t=>{if(typeof t!=="string"){throw new TypeError("invalid pattern")}if(t.length>s){throw new TypeError("pattern is too long")}};e.assertValidPattern=assertValidPattern},3839:(t,e,s)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.AST=void 0;const i=s(5822);const r=s(7305);const n=new Set(["!","?","+","*","@"]);const isExtglobType=t=>n.has(t);const o="(?!\\.\\.?(?:$|/))";const a="(?!\\.)";const h=new Set(["[","."]);const l=new Set(["..","."]);const c=new Set("().*{}+?[]^$\\!");const regExpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const u="[^/]";const f=u+"*?";const d=u+"+?";class AST{type;#et;#st;#it=false;#rt=[];#nt;#ot;#at;#ht=false;#lt;#ct;#ut=false;constructor(t,e,s={}){this.type=t;if(t)this.#st=true;this.#nt=e;this.#et=this.#nt?this.#nt.#et:this;this.#lt=this.#et===this?s:this.#et.#lt;this.#at=this.#et===this?[]:this.#et.#at;if(t==="!"&&!this.#et.#ht)this.#at.push(this);this.#ot=this.#nt?this.#nt.#rt.length:0}get hasMagic(){if(this.#st!==undefined)return this.#st;for(const t of this.#rt){if(typeof t==="string")continue;if(t.type||t.hasMagic)return this.#st=true}return this.#st}toString(){if(this.#ct!==undefined)return this.#ct;if(!this.type){return this.#ct=this.#rt.map((t=>String(t))).join("")}else{return this.#ct=this.type+"("+this.#rt.map((t=>String(t))).join("|")+")"}}#ft(){if(this!==this.#et)throw new Error("should only call on root");if(this.#ht)return this;this.toString();this.#ht=true;let t;while(t=this.#at.pop()){if(t.type!=="!")continue;let e=t;let s=e.#nt;while(s){for(let i=e.#ot+1;!s.type&&itypeof t==="string"?t:t.toJSON())):[this.type,...this.#rt.map((t=>t.toJSON()))];if(this.isStart()&&!this.type)t.unshift([]);if(this.isEnd()&&(this===this.#et||this.#et.#ht&&this.#nt?.type==="!")){t.push({})}return t}isStart(){if(this.#et===this)return true;if(!this.#nt?.isStart())return false;if(this.#ot===0)return true;const t=this.#nt;for(let e=0;e{const[s,i,r,n]=typeof e==="string"?AST.#pt(e,this.#st,t):e.toRegExpSource();this.#st=this.#st||r;this.#it=this.#it||n;return s})).join("");let s="";if(this.isStart()){if(typeof this.#rt[0]==="string"){const t=this.#rt.length===1&&l.has(this.#rt[0]);if(!t){const t=h;const i=this.#lt.dot&&t.has(e.charAt(0))||e.startsWith("\\.")&&t.has(e.charAt(2))||e.startsWith("\\.\\.")&&t.has(e.charAt(4));const r=!this.#lt.dot&&t.has(e.charAt(0));s=i?o:r?a:""}}}let i="";if(this.isEnd()&&this.#et.#ht&&this.#nt?.type==="!"){i="(?:$|\\/)"}const n=s+e+i;return[n,(0,r.unescape)(e),this.#st=!!this.#st,this.#it]}const t=this.type==="!"?"(?:(?!(?:":"(?:";const e=this.#rt.map((t=>{if(typeof t==="string"){throw new Error("string type in extglob ast??")}const[e,s,i,r]=t.toRegExpSource();this.#it=this.#it||r;return e})).filter((t=>!(this.isStart()&&this.isEnd())||!!t)).join("|");if(this.isStart()&&this.isEnd()&&!e&&this.type!=="!"){const t=this.toString();this.#rt=[t];this.type=null;this.#st=undefined;return[t,(0,r.unescape)(this.toString()),false,false]}let s="";if(this.type==="!"&&this.#ut){s=(this.isStart()&&!this.#lt.dot?a:"")+d}else{const i=this.type==="!"?"))"+(this.isStart()&&!this.#lt.dot?a:"")+f+")":this.type==="@"?")":`)${this.type}`;s=t+e+i}return[s,(0,r.unescape)(e),this.#st=!!this.#st,this.#it]}static#pt(t,e,s=false){let n=false;let o="";let a=false;for(let r=0;r{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.parseClass=void 0;const s={"[: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=t=>t.replace(/[[\]\\-]/g,"\\$&");const regexpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const rangesToString=t=>t.join("");const parseClass=(t,e)=>{const i=e;if(t.charAt(i)!=="["){throw new Error("not in a brace expression")}const r=[];const n=[];let o=i+1;let a=false;let h=false;let l=false;let c=false;let u=i;let f="";t:while(of){r.push(braceEscape(f)+"-"+braceEscape(e))}else if(e===f){r.push(braceEscape(e))}f="";o++;continue}if(t.startsWith("-]",o+1)){r.push(braceEscape(e+"-"));o+=2;continue}if(t.startsWith("-",o+1)){f=e;o+=2;continue}r.push(braceEscape(e));o++}if(u{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.escape=void 0;const escape=(t,{windowsPathsNoEscape:e=false}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");e.escape=escape},1953:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;const r=i(s(3717));const n=s(903);const o=s(3839);const a=s(9004);const h=s(7305);const minimatch=(t,e,s={})=>{(0,n.assertValidPattern)(e);if(!s.nocomment&&e.charAt(0)==="#"){return false}return new Minimatch(e,s).match(t)};e.minimatch=minimatch;const l=/^\*+([^+@!?\*\[\(]*)$/;const starDotExtTest=t=>e=>!e.startsWith(".")&&e.endsWith(t);const starDotExtTestDot=t=>e=>e.endsWith(t);const starDotExtTestNocase=t=>{t=t.toLowerCase();return e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)};const starDotExtTestNocaseDot=t=>{t=t.toLowerCase();return e=>e.toLowerCase().endsWith(t)};const c=/^\*+\.\*+$/;const starDotStarTest=t=>!t.startsWith(".")&&t.includes(".");const starDotStarTestDot=t=>t!=="."&&t!==".."&&t.includes(".");const u=/^\.\*+$/;const dotStarTest=t=>t!=="."&&t!==".."&&t.startsWith(".");const f=/^\*+$/;const starTest=t=>t.length!==0&&!t.startsWith(".");const starTestDot=t=>t.length!==0&&t!=="."&&t!=="..";const d=/^\?+([^+@!?\*\[\(]*)?$/;const qmarksTestNocase=([t,e=""])=>{const s=qmarksTestNoExt([t]);if(!e)return s;e=e.toLowerCase();return t=>s(t)&&t.toLowerCase().endsWith(e)};const qmarksTestNocaseDot=([t,e=""])=>{const s=qmarksTestNoExtDot([t]);if(!e)return s;e=e.toLowerCase();return t=>s(t)&&t.toLowerCase().endsWith(e)};const qmarksTestDot=([t,e=""])=>{const s=qmarksTestNoExtDot([t]);return!e?s:t=>s(t)&&t.endsWith(e)};const qmarksTest=([t,e=""])=>{const s=qmarksTestNoExt([t]);return!e?s:t=>s(t)&&t.endsWith(e)};const qmarksTestNoExt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")};const qmarksTestNoExtDot=([t])=>{const e=t.length;return t=>t.length===e&&t!=="."&&t!==".."};const p=typeof process==="object"&&process?typeof process.env==="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";const g={win32:{sep:"\\"},posix:{sep:"/"}};e.sep=p==="win32"?g.win32.sep:g.posix.sep;e.minimatch.sep=e.sep;e.GLOBSTAR=Symbol("globstar **");e.minimatch.GLOBSTAR=e.GLOBSTAR;const y="[^/]";const w=y+"*?";const b="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";const v="(?:(?!(?:\\/|^)\\.).)*?";const filter=(t,s={})=>i=>(0,e.minimatch)(i,t,s);e.filter=filter;e.minimatch.filter=e.filter;const ext=(t,e={})=>Object.assign({},t,e);const defaults=t=>{if(!t||typeof t!=="object"||!Object.keys(t).length){return e.minimatch}const s=e.minimatch;const m=(e,i,r={})=>s(e,i,ext(t,r));return Object.assign(m,{Minimatch:class Minimatch extends s.Minimatch{constructor(e,s={}){super(e,ext(t,s))}static defaults(e){return s.defaults(ext(t,e)).Minimatch}},AST:class AST extends s.AST{constructor(e,s,i={}){super(e,s,ext(t,i))}static fromGlob(e,i={}){return s.AST.fromGlob(e,ext(t,i))}},unescape:(e,i={})=>s.unescape(e,ext(t,i)),escape:(e,i={})=>s.escape(e,ext(t,i)),filter:(e,i={})=>s.filter(e,ext(t,i)),defaults:e=>s.defaults(ext(t,e)),makeRe:(e,i={})=>s.makeRe(e,ext(t,i)),braceExpand:(e,i={})=>s.braceExpand(e,ext(t,i)),match:(e,i,r={})=>s.match(e,i,ext(t,r)),sep:s.sep,GLOBSTAR:e.GLOBSTAR})};e.defaults=defaults;e.minimatch.defaults=e.defaults;const braceExpand=(t,e={})=>{(0,n.assertValidPattern)(t);if(e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)){return[t]}return(0,r.default)(t)};e.braceExpand=braceExpand;e.minimatch.braceExpand=e.braceExpand;const makeRe=(t,e={})=>new Minimatch(t,e).makeRe();e.makeRe=makeRe;e.minimatch.makeRe=e.makeRe;const match=(t,e,s={})=>{const i=new Minimatch(e,s);t=t.filter((t=>i.match(t)));if(i.options.nonull&&!t.length){t.push(e)}return t};e.match=match;e.minimatch.match=e.match;const S=/[?*]|[+@!]\(.*?\)|\[|\]/;const regExpEscape=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Minimatch{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){(0,n.assertValidPattern)(t);e=e||{};this.options=e;this.pattern=t;this.platform=e.platform||p;this.isWindows=this.platform==="win32";this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===false;if(this.windowsPathsNoEscape){this.pattern=this.pattern.replace(/\\/g,"/")}this.preserveMultipleSlashes=!!e.preserveMultipleSlashes;this.regexp=null;this.negate=false;this.nonegate=!!e.nonegate;this.comment=false;this.empty=false;this.partial=!!e.partial;this.nocase=!!this.options.nocase;this.windowsNoMagicRoot=e.windowsNoMagicRoot!==undefined?e.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 t of this.set){for(const e of t){if(typeof e!=="string")return true}}return false}debug(...t){}make(){const t=this.pattern;const e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();this.globSet=[...new Set(this.braceExpand())];if(e.debug){this.debug=(...t)=>console.error(...t)}this.debug(this.pattern,this.globSet);const s=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(s);this.debug(this.pattern,this.globParts);let i=this.globParts.map(((t,e,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=t[0]===""&&t[1]===""&&(t[2]==="?"||!S.test(t[2]))&&!S.test(t[3]);const s=/^[a-z]:/i.test(t[0]);if(e){return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))]}else if(s){return[t[0],...t.slice(1).map((t=>this.parse(t)))]}}return t.map((t=>this.parse(t)))}));this.debug(this.pattern,i);this.set=i.filter((t=>t.indexOf(false)===-1));if(this.isWindows){for(let t=0;t=2){t=this.firstPhasePreProcess(t);t=this.secondPhasePreProcess(t)}else if(e>=1){t=this.levelOneOptimize(t)}else{t=this.adjascentGlobstarOptimize(t)}return t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;while(-1!==(e=t.indexOf("**",e+1))){let s=e;while(t[s+1]==="**"){s++}if(s!==e){t.splice(e,s-e)}}return t}))}levelOneOptimize(t){return t.map((t=>{t=t.reduce(((t,e)=>{const s=t[t.length-1];if(e==="**"&&s==="**"){return t}if(e===".."){if(s&&s!==".."&&s!=="."&&s!=="**"){t.pop();return t}}t.push(e);return t}),[]);return t.length===0?[""]:t}))}levelTwoFileOptimize(t){if(!Array.isArray(t)){t=this.slashSplit(t)}let e=false;do{e=false;if(!this.preserveMultipleSlashes){for(let s=1;si){s.splice(i+1,r-i)}let n=s[i+1];const o=s[i+2];const a=s[i+3];if(n!=="..")continue;if(!o||o==="."||o===".."||!a||a==="."||a===".."){continue}e=true;s.splice(i,1);const h=s.slice(0);h[i]="**";t.push(h);i--}if(!this.preserveMultipleSlashes){for(let t=1;tt.length))}partsMatch(t,e,s=false){let i=0;let r=0;let n=[];let o="";while(io){s=s.slice(a)}else if(o>a){t=t.slice(o)}}}}const{optimizationLevel:n=1}=this.options;if(n>=2){t=this.levelTwoFileOptimize(t)}this.debug("matchOne",this,{file:t,pattern:s});this.debug("matchOne",t.length,s.length);for(var o=0,a=0,h=t.length,l=s.length;o>> no match, partial?",t,f,s,d);if(f===h){return true}}return false}let n;if(typeof c==="string"){n=u===c;this.debug("string match",c,u,n)}else{n=c.test(u);this.debug("pattern match",c,u,n)}if(!n)return false}if(o===h&&a===l){return true}else if(o===h){return i}else if(a===l){return o===h-1&&t[o]===""}else{throw new Error("wtf?")}}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(t){(0,n.assertValidPattern)(t);const s=this.options;if(t==="**")return e.GLOBSTAR;if(t==="")return"";let i;let r=null;if(i=t.match(f)){r=s.dot?starTestDot:starTest}else if(i=t.match(l)){r=(s.nocase?s.dot?starDotExtTestNocaseDot:starDotExtTestNocase:s.dot?starDotExtTestDot:starDotExtTest)(i[1])}else if(i=t.match(d)){r=(s.nocase?s.dot?qmarksTestNocaseDot:qmarksTestNocase:s.dot?qmarksTestDot:qmarksTest)(i)}else if(i=t.match(c)){r=s.dot?starDotStarTestDot:starDotStarTest}else if(i=t.match(u)){r=dotStarTest}const a=o.AST.fromGlob(t,this.options).toMMPattern();return r?Object.assign(a,{test:r}):a}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;const t=this.set;if(!t.length){this.regexp=false;return this.regexp}const s=this.options;const i=s.noglobstar?w:s.dot?b:v;const r=new Set(s.nocase?["i"]:[]);let n=t.map((t=>{const s=t.map((t=>{if(t instanceof RegExp){for(const e of t.flags.split(""))r.add(e)}return typeof t==="string"?regExpEscape(t):t===e.GLOBSTAR?e.GLOBSTAR:t._src}));s.forEach(((t,r)=>{const n=s[r+1];const o=s[r-1];if(t!==e.GLOBSTAR||o===e.GLOBSTAR){return}if(o===undefined){if(n!==undefined&&n!==e.GLOBSTAR){s[r+1]="(?:\\/|"+i+"\\/)?"+n}else{s[r]=i}}else if(n===undefined){s[r-1]=o+"(?:\\/|"+i+")?"}else if(n!==e.GLOBSTAR){s[r-1]=o+"(?:\\/|\\/"+i+"\\/)"+n;s[r+1]=e.GLOBSTAR}}));return s.filter((t=>t!==e.GLOBSTAR)).join("/")})).join("|");const[o,a]=t.length>1?["(?:",")"]:["",""];n="^"+o+n+a+"$";if(this.negate)n="^(?!"+n+").+$";try{this.regexp=new RegExp(n,[...r].join(""))}catch(t){this.regexp=false}return this.regexp}slashSplit(t){if(this.preserveMultipleSlashes){return t.split("/")}else if(this.isWindows&&/^\/\/[^\/]+/.test(t)){return["",...t.split(/\/+/)]}else{return t.split(/\/+/)}}match(t,e=this.partial){this.debug("match",t,this.pattern);if(this.comment){return false}if(this.empty){return t===""}if(t==="/"&&e){return true}const s=this.options;if(this.isWindows){t=t.split("\\").join("/")}const i=this.slashSplit(t);this.debug(this.pattern,"split",i);const r=this.set;this.debug(this.pattern,"set",r);let n=i[i.length-1];if(!n){for(let t=i.length-2;!n&&t>=0;t--){n=i[t]}}for(let t=0;t{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.unescape=void 0;const unescape=(t,{windowsPathsNoEscape:e=false}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");e.unescape=unescape},4968:function(t,e,s){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:true});e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;const r=typeof process==="object"&&process?process:{stdout:null,stderr:null};const n=s(2361);const o=i(s(2781));const a=s(1576);const isStream=t=>!!t&&typeof t==="object"&&(t instanceof Minipass||t instanceof o.default||(0,e.isReadable)(t)||(0,e.isWritable)(t));e.isStream=isStream;const isReadable=t=>!!t&&typeof t==="object"&&t instanceof n.EventEmitter&&typeof t.pipe==="function"&&t.pipe!==o.default.Writable.prototype.pipe;e.isReadable=isReadable;const isWritable=t=>!!t&&typeof t==="object"&&t instanceof n.EventEmitter&&typeof t.write==="function"&&typeof t.end==="function";e.isWritable=isWritable;const h=Symbol("EOF");const l=Symbol("maybeEmitEnd");const c=Symbol("emittedEnd");const u=Symbol("emittingEnd");const f=Symbol("emittedError");const d=Symbol("closed");const p=Symbol("read");const g=Symbol("flush");const y=Symbol("flushChunk");const w=Symbol("encoding");const b=Symbol("decoder");const v=Symbol("flowing");const S=Symbol("paused");const _=Symbol("resume");const k=Symbol("buffer");const O=Symbol("pipes");const P=Symbol("bufferLength");const x=Symbol("bufferPush");const E=Symbol("bufferShift");const C=Symbol("objectMode");const T=Symbol("destroyed");const R=Symbol("error");const A=Symbol("emitData");const M=Symbol("emitEnd");const L=Symbol("emitEnd2");const D=Symbol("async");const F=Symbol("abort");const j=Symbol("aborted");const B=Symbol("signal");const I=Symbol("dataListeners");const N=Symbol("discarded");const defer=t=>Promise.resolve().then(t);const nodefer=t=>t();const isEndish=t=>t==="end"||t==="finish"||t==="prefinish";const isArrayBufferLike=t=>t instanceof ArrayBuffer||!!t&&typeof t==="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0;const isArrayBufferView=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t);class Pipe{src;dest;opts;ondrain;constructor(t,e,s){this.src=t;this.dest=e;this.opts=s;this.ondrain=()=>t[_]();this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe();if(this.opts.end)this.dest.end()}}class PipeProxyErrors extends Pipe{unpipe(){this.src.removeListener("error",this.proxyErrors);super.unpipe()}constructor(t,e,s){super(t,e,s);this.proxyErrors=t=>e.emit("error",t);t.on("error",this.proxyErrors)}}const isObjectModeOptions=t=>!!t.objectMode;const isEncodingOptions=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer";class Minipass extends n.EventEmitter{[v]=false;[S]=false;[O]=[];[k]=[];[C];[w];[D];[b];[h]=false;[c]=false;[u]=false;[d]=false;[f]=null;[P]=0;[T]=false;[B];[j]=false;[I]=0;[N]=false;writable=true;readable=true;constructor(...t){const e=t[0]||{};super();if(e.objectMode&&typeof e.encoding==="string"){throw new TypeError("Encoding and objectMode may not be used together")}if(isObjectModeOptions(e)){this[C]=true;this[w]=null}else if(isEncodingOptions(e)){this[w]=e.encoding;this[C]=false}else{this[C]=false;this[w]=null}this[D]=!!e.async;this[b]=this[w]?new a.StringDecoder(this[w]):null;if(e&&e.debugExposeBuffer===true){Object.defineProperty(this,"buffer",{get:()=>this[k]})}if(e&&e.debugExposePipes===true){Object.defineProperty(this,"pipes",{get:()=>this[O]})}const{signal:s}=e;if(s){this[B]=s;if(s.aborted){this[F]()}else{s.addEventListener("abort",(()=>this[F]()))}}}get bufferLength(){return this[P]}get encoding(){return this[w]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[C]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get["async"](){return this[D]}set["async"](t){this[D]=this[D]||!!t}[F](){this[j]=true;this.emit("abort",this[B]?.reason);this.destroy(this[B]?.reason)}get aborted(){return this[j]}set aborted(t){}write(t,e,s){if(this[j])return false;if(this[h])throw new Error("write after end");if(this[T]){this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"}));return true}if(typeof e==="function"){s=e;e="utf8"}if(!e)e="utf8";const i=this[D]?defer:nodefer;if(!this[C]&&!Buffer.isBuffer(t)){if(isArrayBufferView(t)){t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)}else if(isArrayBufferLike(t)){t=Buffer.from(t)}else if(typeof t!=="string"){throw new Error("Non-contiguous data written to non-objectMode stream")}}if(this[C]){if(this[v]&&this[P]!==0)this[g](true);if(this[v])this.emit("data",t);else this[x](t);if(this[P]!==0)this.emit("readable");if(s)i(s);return this[v]}if(!t.length){if(this[P]!==0)this.emit("readable");if(s)i(s);return this[v]}if(typeof t==="string"&&!(e===this[w]&&!this[b]?.lastNeed)){t=Buffer.from(t,e)}if(Buffer.isBuffer(t)&&this[w]){t=this[b].write(t)}if(this[v]&&this[P]!==0)this[g](true);if(this[v])this.emit("data",t);else this[x](t);if(this[P]!==0)this.emit("readable");if(s)i(s);return this[v]}read(t){if(this[T])return null;this[N]=false;if(this[P]===0||t===0||t&&t>this[P]){this[l]();return null}if(this[C])t=null;if(this[k].length>1&&!this[C]){this[k]=[this[w]?this[k].join(""):Buffer.concat(this[k],this[P])]}const e=this[p](t||null,this[k][0]);this[l]();return e}[p](t,e){if(this[C])this[E]();else{const s=e;if(t===s.length||t===null)this[E]();else if(typeof s==="string"){this[k][0]=s.slice(t);e=s.slice(0,t);this[P]-=t}else{this[k][0]=s.subarray(t);e=s.subarray(0,t);this[P]-=t}}this.emit("data",e);if(!this[k].length&&!this[h])this.emit("drain");return e}end(t,e,s){if(typeof t==="function"){s=t;t=undefined}if(typeof e==="function"){s=e;e="utf8"}if(t!==undefined)this.write(t,e);if(s)this.once("end",s);this[h]=true;this.writable=false;if(this[v]||!this[S])this[l]();return this}[_](){if(this[T])return;if(!this[I]&&!this[O].length){this[N]=true}this[S]=false;this[v]=true;this.emit("resume");if(this[k].length)this[g]();else if(this[h])this[l]();else this.emit("drain")}resume(){return this[_]()}pause(){this[v]=false;this[S]=true;this[N]=false}get destroyed(){return this[T]}get flowing(){return this[v]}get paused(){return this[S]}[x](t){if(this[C])this[P]+=1;else this[P]+=t.length;this[k].push(t)}[E](){if(this[C])this[P]-=1;else this[P]-=this[k][0].length;return this[k].shift()}[g](t=false){do{}while(this[y](this[E]())&&this[k].length);if(!t&&!this[k].length&&!this[h])this.emit("drain")}[y](t){this.emit("data",t);return this[v]}pipe(t,e){if(this[T])return t;this[N]=false;const s=this[c];e=e||{};if(t===r.stdout||t===r.stderr)e.end=false;else e.end=e.end!==false;e.proxyErrors=!!e.proxyErrors;if(s){if(e.end)t.end()}else{this[O].push(!e.proxyErrors?new Pipe(this,t,e):new PipeProxyErrors(this,t,e));if(this[D])defer((()=>this[_]()));else this[_]()}return t}unpipe(t){const e=this[O].find((e=>e.dest===t));if(e){if(this[O].length===1){if(this[v]&&this[I]===0){this[v]=false}this[O]=[]}else this[O].splice(this[O].indexOf(e),1);e.unpipe()}}addListener(t,e){return this.on(t,e)}on(t,e){const s=super.on(t,e);if(t==="data"){this[N]=false;this[I]++;if(!this[O].length&&!this[v]){this[_]()}}else if(t==="readable"&&this[P]!==0){super.emit("readable")}else if(isEndish(t)&&this[c]){super.emit(t);this.removeAllListeners(t)}else if(t==="error"&&this[f]){const t=e;if(this[D])defer((()=>t.call(this,this[f])));else t.call(this,this[f])}return s}removeListener(t,e){return this.off(t,e)}off(t,e){const s=super.off(t,e);if(t==="data"){this[I]=this.listeners("data").length;if(this[I]===0&&!this[N]&&!this[O].length){this[v]=false}}return s}removeAllListeners(t){const e=super.removeAllListeners(t);if(t==="data"||t===undefined){this[I]=0;if(!this[N]&&!this[O].length){this[v]=false}}return e}get emittedEnd(){return this[c]}[l](){if(!this[u]&&!this[c]&&!this[T]&&this[k].length===0&&this[h]){this[u]=true;this.emit("end");this.emit("prefinish");this.emit("finish");if(this[d])this.emit("close");this[u]=false}}emit(t,...e){const s=e[0];if(t!=="error"&&t!=="close"&&t!==T&&this[T]){return false}else if(t==="data"){return!this[C]&&!s?false:this[D]?(defer((()=>this[A](s))),true):this[A](s)}else if(t==="end"){return this[M]()}else if(t==="close"){this[d]=true;if(!this[c]&&!this[T])return false;const t=super.emit("close");this.removeAllListeners("close");return t}else if(t==="error"){this[f]=s;super.emit(R,s);const t=!this[B]||this.listeners("error").length?super.emit("error",s):false;this[l]();return t}else if(t==="resume"){const t=super.emit("resume");this[l]();return t}else if(t==="finish"||t==="prefinish"){const e=super.emit(t);this.removeAllListeners(t);return e}const i=super.emit(t,...e);this[l]();return i}[A](t){for(const e of this[O]){if(e.dest.write(t)===false)this.pause()}const e=this[N]?false:super.emit("data",t);this[l]();return e}[M](){if(this[c])return false;this[c]=true;this.readable=false;return this[D]?(defer((()=>this[L]())),true):this[L]()}[L](){if(this[b]){const t=this[b].end();if(t){for(const e of this[O]){e.dest.write(t)}if(!this[N])super.emit("data",t)}}for(const t of this[O]){t.end()}const t=super.emit("end");this.removeAllListeners("end");return t}async collect(){const t=Object.assign([],{dataLength:0});if(!this[C])t.dataLength=0;const e=this.promise();this.on("data",(e=>{t.push(e);if(!this[C])t.dataLength+=e.length}));await e;return t}async concat(){if(this[C]){throw new Error("cannot concat in objectMode")}const t=await this.collect();return this[w]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,e)=>{this.on(T,(()=>e(new Error("stream destroyed"))));this.on("error",(t=>e(t)));this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[N]=false;let t=false;const stop=async()=>{this.pause();t=true;return{value:undefined,done:true}};const next=()=>{if(t)return stop();const e=this.read();if(e!==null)return Promise.resolve({done:false,value:e});if(this[h])return stop();let s;let i;const onerr=t=>{this.off("data",ondata);this.off("end",onend);this.off(T,ondestroy);stop();i(t)};const ondata=t=>{this.off("error",onerr);this.off("end",onend);this.off(T,ondestroy);this.pause();s({value:t,done:!!this[h]})};const onend=()=>{this.off("error",onerr);this.off("data",ondata);this.off(T,ondestroy);stop();s({done:true,value:undefined})};const ondestroy=()=>onerr(new Error("stream destroyed"));return new Promise(((t,e)=>{i=e;s=t;this.once(T,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[N]=false;let t=false;const stop=()=>{this.pause();this.off(R,stop);this.off(T,stop);this.off("end",stop);t=true;return{done:true,value:undefined}};const next=()=>{if(t)return stop();const e=this.read();return e===null?stop():{done:false,value:e}};this.once("end",stop);this.once(R,stop);this.once(T,stop);return{next:next,throw:stop,return:stop,[Symbol.iterator](){return this}}}destroy(t){if(this[T]){if(t)this.emit("error",t);else this.emit(T);return this}this[T]=true;this[N]=true;this[k].length=0;this[P]=0;const e=this;if(typeof e.close==="function"&&!this[d])e.close();if(t)this.emit("error",t);else this.emit(T);return this}static get isStream(){return e.isStream}}e.Minipass=Minipass},1081:function(t,e,s){"use strict";var i=this&&this.__createBinding||(Object.create?function(t,e,s,i){if(i===undefined)i=s;var r=Object.getOwnPropertyDescriptor(e,s);if(!r||("get"in r?!e.__esModule:r.writable||r.configurable)){r={enumerable:true,get:function(){return e[s]}}}Object.defineProperty(t,i,r)}:function(t,e,s,i){if(i===undefined)i=s;t[i]=e[s]});var r=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}:function(t,e){t["default"]=e});var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)if(s!=="default"&&Object.prototype.hasOwnProperty.call(t,s))i(e,t,s);r(e,t);return e};Object.defineProperty(e,"__esModule",{value:true});e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;const o=s(3866);const a=s(1017);const h=s(7310);const l=n(s(7147));const c=s(7147);const u=c.realpathSync.native;const f=s(3292);const d=s(4968);const p={lstatSync:c.lstatSync,readdir:c.readdir,readdirSync:c.readdirSync,readlinkSync:c.readlinkSync,realpathSync:u,promises:{lstat:f.lstat,readdir:f.readdir,readlink:f.readlink,realpath:f.realpath}};const fsFromOption=t=>!t||t===p||t===l?p:{...p,...t,promises:{...p.promises,...t.promises||{}}};const g=/^\\\\\?\\([a-z]:)\\?$/i;const uncToDrive=t=>t.replace(/\//g,"\\").replace(g,"$1\\");const y=/[\\\/]/;const w=0;const b=1;const v=2;const S=4;const _=6;const k=8;const O=10;const P=12;const x=15;const E=~x;const C=16;const T=32;const R=64;const A=128;const M=256;const L=512;const D=R|A|L;const F=1023;const entToType=t=>t.isFile()?k:t.isDirectory()?S:t.isSymbolicLink()?O:t.isCharacterDevice()?v:t.isBlockDevice()?_:t.isSocket()?P:t.isFIFO()?b:w;const j=new Map;const normalize=t=>{const e=j.get(t);if(e)return e;const s=t.normalize("NFKD");j.set(t,s);return s};const B=new Map;const normalizeNocase=t=>{const e=B.get(t);if(e)return e;const s=normalize(t.toLowerCase());B.set(t,s);return s};class ResolveCache extends o.LRUCache{constructor(){super({max:256})}}e.ResolveCache=ResolveCache;class ChildrenCache extends o.LRUCache{constructor(t=16*1024){super({maxSize:t,sizeCalculation:t=>t.length+1})}}e.ChildrenCache=ChildrenCache;const I=Symbol("PathScurry setAsCwd");class PathBase{name;root;roots;parent;nocase;#mt;#gt;get dev(){return this.#gt}#yt;get mode(){return this.#yt}#wt;get nlink(){return this.#wt}#bt;get uid(){return this.#bt}#vt;get gid(){return this.#vt}#St;get rdev(){return this.#St}#_t;get blksize(){return this.#_t}#kt;get ino(){return this.#kt}#S;get size(){return this.#S}#Ot;get blocks(){return this.#Ot}#Pt;get atimeMs(){return this.#Pt}#xt;get mtimeMs(){return this.#xt}#Et;get ctimeMs(){return this.#Et}#Ct;get birthtimeMs(){return this.#Ct}#Tt;get atime(){return this.#Tt}#Rt;get mtime(){return this.#Rt}#At;get ctime(){return this.#At}#Mt;get birthtime(){return this.#Mt}#Lt;#Dt;#Ft;#jt;#Bt;#It;#Nt;#Ut;#zt;#qt;get path(){return(this.parent||this).fullpath()}constructor(t,e=w,s,i,r,n,o){this.name=t;this.#Lt=r?normalizeNocase(t):normalize(t);this.#Nt=e&F;this.nocase=r;this.roots=i;this.root=s||this;this.#Ut=n;this.#Ft=o.fullpath;this.#Bt=o.relative;this.#It=o.relativePosix;this.parent=o.parent;if(this.parent){this.#mt=this.parent.#mt}else{this.#mt=fsFromOption(o.fs)}}depth(){if(this.#Dt!==undefined)return this.#Dt;if(!this.parent)return this.#Dt=0;return this.#Dt=this.parent.depth()+1}childrenCache(){return this.#Ut}resolve(t){if(!t){return this}const e=this.getRootString(t);const s=t.substring(e.length);const i=s.split(this.splitSep);const r=e?this.getRoot(e).#Wt(i):this.#Wt(i);return r}#Wt(t){let e=this;for(const s of t){e=e.child(s)}return e}children(){const t=this.#Ut.get(this);if(t){return t}const e=Object.assign([],{provisional:0});this.#Ut.set(this,e);this.#Nt&=~C;return e}child(t,e){if(t===""||t==="."){return this}if(t===".."){return this.parent||this}const s=this.children();const i=this.nocase?normalizeNocase(t):normalize(t);for(const t of s){if(t.#Lt===i){return t}}const r=this.parent?this.sep:"";const n=this.#Ft?this.#Ft+r+t:undefined;const o=this.newChild(t,w,{...e,parent:this,fullpath:n});if(!this.canReaddir()){o.#Nt|=A}s.push(o);return o}relative(){if(this.#Bt!==undefined){return this.#Bt}const t=this.name;const e=this.parent;if(!e){return this.#Bt=this.name}const s=e.relative();return s+(!s||!e.parent?"":this.sep)+t}relativePosix(){if(this.sep==="/")return this.relative();if(this.#It!==undefined)return this.#It;const t=this.name;const e=this.parent;if(!e){return this.#It=this.fullpathPosix()}const s=e.relativePosix();return s+(!s||!e.parent?"":"/")+t}fullpath(){if(this.#Ft!==undefined){return this.#Ft}const t=this.name;const e=this.parent;if(!e){return this.#Ft=this.name}const s=e.fullpath();const i=s+(!e.parent?"":this.sep)+t;return this.#Ft=i}fullpathPosix(){if(this.#jt!==undefined)return this.#jt;if(this.sep==="/")return this.#jt=this.fullpath();if(!this.parent){const t=this.fullpath().replace(/\\/g,"/");if(/^[a-z]:\//i.test(t)){return this.#jt=`//?/${t}`}else{return this.#jt=t}}const t=this.parent;const e=t.fullpathPosix();const s=e+(!e||!t.parent?"":"/")+this.name;return this.#jt=s}isUnknown(){return(this.#Nt&x)===w}isType(t){return this[`is${t}`]()}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.#Nt&x)===k}isDirectory(){return(this.#Nt&x)===S}isCharacterDevice(){return(this.#Nt&x)===v}isBlockDevice(){return(this.#Nt&x)===_}isFIFO(){return(this.#Nt&x)===b}isSocket(){return(this.#Nt&x)===P}isSymbolicLink(){return(this.#Nt&O)===O}lstatCached(){return this.#Nt&T?this:undefined}readlinkCached(){return this.#zt}realpathCached(){return this.#qt}readdirCached(){const t=this.children();return t.slice(0,t.provisional)}canReadlink(){if(this.#zt)return true;if(!this.parent)return false;const t=this.#Nt&x;return!(t!==w&&t!==O||this.#Nt&M||this.#Nt&A)}calledReaddir(){return!!(this.#Nt&C)}isENOENT(){return!!(this.#Nt&A)}isNamed(t){return!this.nocase?this.#Lt===normalize(t):this.#Lt===normalizeNocase(t)}async readlink(){const t=this.#zt;if(t){return t}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const t=await this.#mt.promises.readlink(this.fullpath());const e=(await this.parent.realpath())?.resolve(t);if(e){return this.#zt=e}}catch(t){this.#Gt(t.code);return undefined}}readlinkSync(){const t=this.#zt;if(t){return t}if(!this.canReadlink()){return undefined}if(!this.parent){return undefined}try{const t=this.#mt.readlinkSync(this.fullpath());const e=this.parent.realpathSync()?.resolve(t);if(e){return this.#zt=e}}catch(t){this.#Gt(t.code);return undefined}}#$t(t){this.#Nt|=C;for(let e=t.provisional;ee(null,t)))}readdirCB(t,e=false){if(!this.canReaddir()){if(e)t(null,[]);else queueMicrotask((()=>t(null,[])));return}const s=this.children();if(this.calledReaddir()){const i=s.slice(0,s.provisional);if(e)t(null,i);else queueMicrotask((()=>t(null,i)));return}this.#ie.push(t);if(this.#re){return}this.#re=true;const i=this.fullpath();this.#mt.readdir(i,{withFileTypes:true},((t,e)=>{if(t){this.#Yt(t.code);s.provisional=0}else{for(const t of e){this.#Qt(t,s)}this.#$t(s)}this.#ne(s.slice(0,s.provisional));return}))}#oe;async readdir(){if(!this.canReaddir()){return[]}const t=this.children();if(this.calledReaddir()){return t.slice(0,t.provisional)}const e=this.fullpath();if(this.#oe){await this.#oe}else{let resolve=()=>{};this.#oe=new Promise((t=>resolve=t));try{for(const s of await this.#mt.promises.readdir(e,{withFileTypes:true})){this.#Qt(s,t)}this.#$t(t)}catch(e){this.#Yt(e.code);t.provisional=0}this.#oe=undefined;resolve()}return t.slice(0,t.provisional)}readdirSync(){if(!this.canReaddir()){return[]}const t=this.children();if(this.calledReaddir()){return t.slice(0,t.provisional)}const e=this.fullpath();try{for(const s of this.#mt.readdirSync(e,{withFileTypes:true})){this.#Qt(s,t)}this.#$t(t)}catch(e){this.#Yt(e.code);t.provisional=0}return t.slice(0,t.provisional)}canReaddir(){if(this.#Nt&D)return false;const t=x&this.#Nt;if(!(t===w||t===S||t===O)){return false}return true}shouldWalk(t,e){return(this.#Nt&S)===S&&!(this.#Nt&D)&&!t.has(this)&&(!e||e(this))}async realpath(){if(this.#qt)return this.#qt;if((L|M|A)&this.#Nt)return undefined;try{const t=await this.#mt.promises.realpath(this.fullpath());return this.#qt=this.resolve(t)}catch(t){this.#Jt()}}realpathSync(){if(this.#qt)return this.#qt;if((L|M|A)&this.#Nt)return undefined;try{const t=this.#mt.realpathSync(this.fullpath());return this.#qt=this.resolve(t)}catch(t){this.#Jt()}}[I](t){if(t===this)return;const e=new Set([]);let s=[];let i=this;while(i&&i.parent){e.add(i);i.#Bt=s.join(this.sep);i.#It=s.join("/");i=i.parent;s.push("..")}i=t;while(i&&i.parent&&!e.has(i)){i.#Bt=undefined;i.#It=undefined;i=i.parent}}}e.PathBase=PathBase;class PathWin32 extends PathBase{sep="\\";splitSep=y;constructor(t,e=w,s,i,r,n,o){super(t,e,s,i,r,n,o)}newChild(t,e=w,s={}){return new PathWin32(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(t){return a.win32.parse(t).root}getRoot(t){t=uncToDrive(t.toUpperCase());if(t===this.root.name){return this.root}for(const[e,s]of Object.entries(this.roots)){if(this.sameRoot(t,e)){return this.roots[t]=s}}return this.roots[t]=new PathScurryWin32(t,this).root}sameRoot(t,e=this.root.name){t=t.toUpperCase().replace(/\//g,"\\").replace(g,"$1\\");return t===e}}e.PathWin32=PathWin32;class PathPosix extends PathBase{splitSep="/";sep="/";constructor(t,e=w,s,i,r,n,o){super(t,e,s,i,r,n,o)}getRootString(t){return t.startsWith("/")?"/":""}getRoot(t){return this.root}newChild(t,e=w,s={}){return new PathPosix(t,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}}e.PathPosix=PathPosix;class PathScurryBase{root;rootPath;roots;cwd;#ae;#he;#Ut;nocase;#mt;constructor(t=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:n=p}={}){this.#mt=fsFromOption(n);if(t instanceof URL||t.startsWith("file://")){t=(0,h.fileURLToPath)(t)}const o=e.resolve(t);this.roots=Object.create(null);this.rootPath=this.parseRootPath(o);this.#ae=new ResolveCache;this.#he=new ResolveCache;this.#Ut=new ChildrenCache(r);const a=o.substring(this.rootPath.length).split(s);if(a.length===1&&!a[0]){a.pop()}if(i===undefined){throw new TypeError("must provide nocase setting to PathScurryBase ctor")}this.nocase=i;this.root=this.newRoot(this.#mt);this.roots[this.rootPath]=this.root;let l=this.root;let c=a.length-1;const u=e.sep;let f=this.rootPath;let d=false;for(const t of a){const e=c--;l=l.child(t,{relative:new Array(e).fill("..").join(u),relativePosix:new Array(e).fill("..").join("/"),fullpath:f+=(d?"":u)+t});d=true}this.cwd=l}depth(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.depth()}childrenCache(){return this.#Ut}resolve(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(!i||i===".")continue;e=e?`${i}/${e}`:i;if(this.isAbsolute(i)){break}}const s=this.#ae.get(e);if(s!==undefined){return s}const i=this.cwd.resolve(e).fullpath();this.#ae.set(e,i);return i}resolvePosix(...t){let e="";for(let s=t.length-1;s>=0;s--){const i=t[s];if(!i||i===".")continue;e=e?`${i}/${e}`:i;if(this.isAbsolute(i)){break}}const s=this.#he.get(e);if(s!==undefined){return s}const i=this.cwd.resolve(e).fullpathPosix();this.#he.set(e,i);return i}relative(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.relative()}relativePosix(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.relativePosix()}basename(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.name}dirname(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return(t.parent||t).fullpath()}async readdir(t=this.cwd,e={withFileTypes:true}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s}=e;if(!t.canReaddir()){return[]}else{const e=await t.readdir();return s?e:e.map((t=>t.name))}}readdirSync(t=this.cwd,e={withFileTypes:true}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true}=e;if(!t.canReaddir()){return[]}else if(s){return t.readdirSync()}else{return t.readdirSync().map((t=>t.name))}}async lstat(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.lstat()}lstatSync(t=this.cwd){if(typeof t==="string"){t=this.cwd.resolve(t)}return t.lstatSync()}async readlink(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=await t.readlink();return e?s:s?.fullpath()}readlinkSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=t.readlinkSync();return e?s:s?.fullpath()}async realpath(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=await t.realpath();return e?s:s?.fullpath()}realpathSync(t=this.cwd,{withFileTypes:e}={withFileTypes:false}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t.withFileTypes;t=this.cwd}const s=t.realpathSync();return e?s:s?.fullpath()}async walk(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=[];if(!r||r(t)){o.push(s?t:t.fullpath())}const a=new Set;const walk=(t,e)=>{a.add(t);t.readdirCB(((t,h)=>{if(t){return e(t)}let l=h.length;if(!l)return e();const next=()=>{if(--l===0){e()}};for(const t of h){if(!r||r(t)){o.push(s?t:t.fullpath())}if(i&&t.isSymbolicLink()){t.realpath().then((t=>t?.isUnknown()?t.lstat():t)).then((t=>t?.shouldWalk(a,n)?walk(t,next):next()))}else{if(t.shouldWalk(a,n)){walk(t,next)}else{next()}}}}),true)};const h=t;return new Promise(((t,e)=>{walk(h,(s=>{if(s)return e(s);t(o)}))}))}walkSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=[];if(!r||r(t)){o.push(s?t:t.fullpath())}const a=new Set([t]);for(const t of a){const e=t.readdirSync();for(const t of e){if(!r||r(t)){o.push(s?t:t.fullpath())}let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(a,n)){a.add(e)}}}return o}[Symbol.asyncIterator](){return this.iterate()}iterate(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}return this.stream(t,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;if(!r||r(t)){yield s?t:t.fullpath()}const o=new Set([t]);for(const t of o){const e=t.readdirSync();for(const t of e){if(!r||r(t)){yield s?t:t.fullpath()}let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(o,n)){o.add(e)}}}}stream(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=new d.Minipass({objectMode:true});if(!r||r(t)){o.write(s?t:t.fullpath())}const a=new Set;const h=[t];let l=0;const process=()=>{let t=false;while(!t){const e=h.shift();if(!e){if(l===0)o.end();return}l++;a.add(e);const onReaddir=(e,u,f=false)=>{if(e)return o.emit("error",e);if(i&&!f){const t=[];for(const e of u){if(e.isSymbolicLink()){t.push(e.realpath().then((t=>t?.isUnknown()?t.lstat():t)))}}if(t.length){Promise.all(t).then((()=>onReaddir(null,u,true)));return}}for(const e of u){if(e&&(!r||r(e))){if(!o.write(s?e:e.fullpath())){t=true}}}l--;for(const t of u){const e=t.realpathCached()||t;if(e.shouldWalk(a,n)){h.push(e)}}if(t&&!o.flowing){o.once("drain",process)}else if(!c){process()}};let c=true;e.readdirCB(onReaddir,true);c=false}};process();return o}streamSync(t=this.cwd,e={}){if(typeof t==="string"){t=this.cwd.resolve(t)}else if(!(t instanceof PathBase)){e=t;t=this.cwd}const{withFileTypes:s=true,follow:i=false,filter:r,walkFilter:n}=e;const o=new d.Minipass({objectMode:true});const a=new Set;if(!r||r(t)){o.write(s?t:t.fullpath())}const h=[t];let l=0;const process=()=>{let t=false;while(!t){const e=h.shift();if(!e){if(l===0)o.end();return}l++;a.add(e);const c=e.readdirSync();for(const e of c){if(!r||r(e)){if(!o.write(s?e:e.fullpath())){t=true}}}l--;for(const t of c){let e=t;if(t.isSymbolicLink()){if(!(i&&(e=t.realpathSync())))continue;if(e.isUnknown())e.lstatSync()}if(e.shouldWalk(a,n)){h.push(e)}}}if(t&&!o.flowing)o.once("drain",process)};process();return o}chdir(t=this.cwd){const e=this.cwd;this.cwd=typeof t==="string"?this.cwd.resolve(t):t;this.cwd[I](e)}}e.PathScurryBase=PathScurryBase;class PathScurryWin32 extends PathScurryBase{sep="\\";constructor(t=process.cwd(),e={}){const{nocase:s=true}=e;super(t,a.win32,"\\",{...e,nocase:s});this.nocase=s;for(let t=this.cwd;t;t=t.parent){t.nocase=this.nocase}}parseRootPath(t){return a.win32.parse(t).root.toUpperCase()}newRoot(t){return new PathWin32(this.rootPath,S,undefined,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")||t.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(t)}}e.PathScurryWin32=PathScurryWin32;class PathScurryPosix extends PathScurryBase{sep="/";constructor(t=process.cwd(),e={}){const{nocase:s=false}=e;super(t,a.posix,"/",{...e,nocase:s});this.nocase=s}parseRootPath(t){return"/"}newRoot(t){return new PathPosix(this.rootPath,S,undefined,this.roots,this.nocase,this.childrenCache(),{fs:t})}isAbsolute(t){return t.startsWith("/")}}e.PathScurryPosix=PathScurryPosix;class PathScurryDarwin extends PathScurryPosix{constructor(t=process.cwd(),e={}){const{nocase:s=true}=e;super(t,{...e,nocase:s})}}e.PathScurryDarwin=PathScurryDarwin;e.Path=process.platform==="win32"?PathWin32:PathPosix;e.PathScurry=process.platform==="win32"?PathScurryWin32:process.platform==="darwin"?PathScurryDarwin:PathScurryPosix}};var e={};function __nccwpck_require__(s){var i=e[s];if(i!==undefined){return i.exports}var r=e[s]={exports:{}};var n=true;try{t[s].call(r.exports,r,r.exports,__nccwpck_require__);n=false}finally{if(n)delete e[s]}return r.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var s={};(()=>{"use strict";var t=s;Object.defineProperty(t,"__esModule",{value:true});const e=__nccwpck_require__(399);(0,e.run)()})();module.exports=s})(); \ No newline at end of file diff --git a/package.json b/package.json index 7193f47..744d77e 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,9 @@ "description": "An Action to take info from kotlinx-benchmark outputs and display them in a table as a pull request comment", "main": "dist/index.js", "scripts": { - "build": "ncc build src/main.ts -m -o dist/", - "test": "npx jest" + "build": "npx ncc build src/index.ts -m -o dist/", + "test": "npx jest", + "all": "npm run test && npm run build" }, "repository": { "type": "git", @@ -40,7 +41,7 @@ "ts" ], "testMatch": [ - "__tests__/**/*.test.ts" + "**/*.test.ts" ], "testPathIgnorePatterns": [ "/node_modules/", @@ -50,4 +51,4 @@ "^.+\\.ts$": "ts-jest" } } -} +} \ No newline at end of file diff --git a/src/benchmark.ts b/src/benchmark.ts index b6d8588..fedd2f8 100644 --- a/src/benchmark.ts +++ b/src/benchmark.ts @@ -1,42 +1,42 @@ -import { readFileSync } from "fs"; +import { readFileSync } from "fs" export interface Benchmark { - jmhVersion: string; - benchmark: string; - mode: string; - threads: number; - forks: number; - jvm: string; - jvmArgs: string[]; - jdkVersion: string; - vmName: string; - vmVersion: string; - warmupIterations: number; - warmupTime: string; - warmupBatchSize: number; - measurementIterations: number; - measurementTime: string; - measurementBatchSize: number; - primaryMetric: PrimaryMetric; - secondaryMetrics: SecondaryMetrics; + jmhVersion: string + benchmark: string + mode: string + threads: number + forks: number + jvm: string + jvmArgs: string[] + jdkVersion: string + vmName: string + vmVersion: string + warmupIterations: number + warmupTime: string + warmupBatchSize: number + measurementIterations: number + measurementTime: string + measurementBatchSize: number + primaryMetric: PrimaryMetric + secondaryMetrics: SecondaryMetrics } export interface PrimaryMetric { - score: number; - scoreError: number; - scoreConfidence: number[]; - scorePercentiles: { [key: string]: number }; - scoreUnit: string; - rawData: Array; + score: number + scoreError: number + scoreConfidence: number[] + scorePercentiles: { [key: string]: number } + scoreUnit: string + rawData: Array } export interface SecondaryMetrics { } function benchmarksFromFile(filePath: string): Benchmark[] { - let rawData = readFileSync(filePath); - let benchmarks: Benchmark[] = JSON.parse(rawData.toString()); - return benchmarks; + let rawData = readFileSync(filePath) + let benchmarks: Benchmark[] = JSON.parse(rawData.toString()) + return benchmarks } export function mapFilesToBenchmarks(files: string[]): Benchmark[] { diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..0cf9cc5 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,7 @@ +/** + * The entrypoint for the action. + */ +import { run } from './main' + +// eslint-disable-next-line @typescript-eslint/no-floating-promises +run() \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 855861d..e5eff2a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,11 +1,11 @@ -import { getInput, setOutput, setFailed, exportVariable, debug, info } from '@actions/core'; -import { glob } from "glob"; -import { mapFilesToBenchmarks } from "./benchmark"; -import { buildBenchmarkTable } from "./tablebuilder"; +import { getInput, setOutput, setFailed, exportVariable, debug, info } from '@actions/core' +import { glob } from "glob" +import { mapFilesToBenchmarks } from "./benchmark" +import { buildBenchmarkTable } from "./tablebuilder" -function main() { +export function run() { // Get the result json path - var benchmarkResultPath = getInput("benchmark-results", { required: true }) + let benchmarkResultPath = getInput("benchmark-results", { required: true }) debug("Getting results matching path " + benchmarkResultPath) try { @@ -18,12 +18,10 @@ function main() { } // Build and output the table - let table = buildBenchmarkTable(benchmarks); + let table = buildBenchmarkTable(benchmarks) setOutput("benchmark-table", table); } catch { setFailed("Failed to get benchmarks") return } } - -main(); diff --git a/src/tablebuilder.ts b/src/tablebuilder.ts index 5986430..0316849 100644 --- a/src/tablebuilder.ts +++ b/src/tablebuilder.ts @@ -1,4 +1,4 @@ -import { Benchmark } from "./benchmark"; +import { Benchmark } from "./benchmark" function formattedScoreFor(benchmark: Benchmark): string { return benchmark.primaryMetric.score.toFixed(3) + benchmark.primaryMetric.scoreUnit @@ -9,13 +9,12 @@ function formattedErrorFor(benchmark: Benchmark): string { } export function buildBenchmarkTable(benchmarks: Benchmark[]): string { - var tableString = "| Benchmark | Score | Error |\n" + - "| --------- | ----- | ----- |\n"; - + let tableString = `| Benchmark | Score | Error |` + tableString += `\n` + tableString += `| --------- | ----- | ----- |` benchmarks.forEach(function (benchmark) { - tableString += - "| " + benchmark.benchmark + " | " + formattedScoreFor(benchmark) + " | " + formattedErrorFor(benchmark) + " |\n" - }); - - return tableString; + tableString += `\n` + tableString += `| ${benchmark.benchmark} | ${formattedScoreFor(benchmark)} | ${formattedErrorFor(benchmark)} |` + }) + return tableString } diff --git a/tsconfig.json b/tsconfig.json index 290067c..470f64a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,24 @@ { + "$schema": "https://json.schemastore.org/tsconfig", "compilerOptions": { - "target": "esnext", - "moduleResolution": "node" - } -} + "target": "ES2022", + "module": "NodeNext", + "rootDir": "./src", + "moduleResolution": "NodeNext", + "baseUrl": "./", + "sourceMap": true, + "outDir": "./dist", + "noImplicitAny": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "newLine": "lf", + "resolveJsonModule": true + }, + "exclude": [ + "./dist", + "./node_modules", + "./__tests__" + ] +} \ No newline at end of file