diff --git a/__tests__/version.test.ts b/__tests__/version.test.ts index 462a2a2..a5badb0 100644 --- a/__tests__/version.test.ts +++ b/__tests__/version.test.ts @@ -4,7 +4,7 @@ const dataPath = path.join(__dirname, 'data'); import * as version from '../src/version'; -describe('When a version is needed', () => { +describe('Pulling from multipage results with Link header', () => { beforeEach(() => { nock.disableNetConnect(); // Releases file contains version info for: @@ -14,11 +14,10 @@ describe('When a version is needed', () => { // 3.13.5 nock('https://api.github.com') .get('/repos/Kitware/CMake/releases') - .query({ page: 1 }) .replyWithFile(200, path.join(dataPath, 'releases.json'), { 'Content-Type': 'application/json', Link: - '<...releases?page=2>; rel="next", <...releases?page=2>; rel="last"', + '; rel="next", ; rel="last"', }); // Releases file 2 contains version info for: // 2.4.8, 2.6.4, 2.8.10.2, 2.8.12.2 @@ -30,62 +29,106 @@ describe('When a version is needed', () => { .replyWithFile(200, path.join(dataPath, 'releases2.json'), { 'Content-Type': 'application/json', Link: - '<...releases?page=1>; rel="prev", <...releases?page=2>; rel="last"', + '; rel="first", ; rel="prev"', }); }); afterEach(() => { nock.cleanAll(); nock.enableNetConnect(); }); - it('latest version is correctly parsed', async () => { + it('parses the latest version', async () => { const version_info = await version.getAllVersionInfo(); - const latest = await version.getLatestMatching('', version_info); + const latest = version.getLatestMatching('', version_info); expect(latest.name).toMatch(/3.16.2/); }); - it('exact version is selected', async () => { + it('selects an exact version for full release', async () => { const version_info = await version.getAllVersionInfo(); - const selected = await version.getLatestMatching('3.15.5', version_info); + const selected = version.getLatestMatching('3.15.5', version_info); expect(selected.name).toMatch(/3.15.5/); }); - it('latest version is selected for provided minor release', async () => { + it('selects the latest version for provided minor release', async () => { const version_info = await version.getAllVersionInfo(); - const selected = await version.getLatestMatching('3.15', version_info); + const selected = version.getLatestMatching('3.15', version_info); expect(selected.name).toMatch(/3.15.6/); }); - it('latest version is selected for provided minor release with x', async () => { + it('selects the latest version for provided minor release with x', async () => { const version_info = await version.getAllVersionInfo(); - const selected = await version.getLatestMatching('3.15.x', version_info); + const selected = version.getLatestMatching('3.15.x', version_info); expect(selected.name).toMatch(/3.15.6/); }); - it('latest version is selected for provided major release with x', async () => { + it('selects the latest version for provided major release with x', async () => { const version_info = await version.getAllVersionInfo(); - const selected = await version.getLatestMatching('3.x', version_info); + const selected = version.getLatestMatching('3.x', version_info); expect(selected.name).toMatch(/3.16.2/); }); - it('non-existent full version throws', async () => { + it('throws on non-existent full version', async () => { const version_info = await version.getAllVersionInfo(); expect(() => { version.getLatestMatching('100.0.0', version_info); }).toThrow('Unable to find version matching 100.0.0'); }); - it('non-existent part version throws', async () => { + it('throws on non-existent part version', async () => { const version_info = await version.getAllVersionInfo(); expect(() => { version.getLatestMatching('100.0.x', version_info); }).toThrow('Unable to find version matching 100.0'); }); - it('versions on second page get chosen', async () => { + it('select versions on second page', async () => { const version_info = await version.getAllVersionInfo(); - const selected = await version.getLatestMatching('2.x', version_info); + const selected = version.getLatestMatching('2.x', version_info); expect(selected.name).toMatch(/2.8.12/); }); - it('extra numbers in version get ignored', async () => { + it('ignores extra numbers in version', async () => { const version_info = await version.getAllVersionInfo(); - const selected = await version.getLatestMatching('2.8.10', version_info); + const selected = version.getLatestMatching('2.8.10', version_info); expect(selected.name).toMatch(/2.8.10/); }); }); +describe('Pulling from multipage results without Link header', () => { + // When the Link header is not available, we still want to be able to parse + // all pages. This could be done by iterating over all possible pages until + // we get no further results. + beforeEach(() => { + nock.disableNetConnect(); + nock('https://api.github.com') + .get('/repos/Kitware/CMake/releases') + .replyWithFile(200, path.join(dataPath, 'releases.json'), { + 'Content-Type': 'application/json', + }); + nock('https://api.github.com') + .get('/repos/Kitware/CMake/releases') + .query({ page: 2 }) + .replyWithFile(200, path.join(dataPath, 'releases2.json'), { + 'Content-Type': 'application/json', + }); + nock('https://api.github.com') + .get('/repos/Kitware/CMake/releases') + .query({ page: 3 }) + .reply(200, []); + }); + afterEach(() => { + nock.cleanAll(); + nock.enableNetConnect(); + }); + it('selects exact version from first page', async () => { + const version_info = await version.getAllVersionInfo(); + const selected = version.getLatestMatching('3.15.5', version_info); + expect(selected.name).toMatch(/3.15.5/); + }); + it('throws on non-existent full version', async () => { + const version_info = await version.getAllVersionInfo(); + expect(() => { + version.getLatestMatching('100.0.0', version_info); + }).toThrow('Unable to find version matching 100.0.0'); + }); + it('selects versions on second page', async () => { + const version_info = await version.getAllVersionInfo(); + const selected = version.getLatestMatching('2.x', version_info); + expect(selected.name).toMatch(/2.8.12/); + }); +}); + describe('When api token is required', () => { beforeEach(() => { nock('https://api.github.com', { @@ -94,14 +137,16 @@ describe('When api token is required', () => { }, }) .get('/repos/Kitware/CMake/releases') - .query({ page: 1 }) .replyWithFile(200, path.join(dataPath, 'releases.json'), { 'Content-Type': 'application/json', }); nock('https://api.github.com') .get('/repos/Kitware/CMake/releases') - .query({ page: 1 }) .replyWithError('Invalid API token'); + nock('https://api.github.com') + .get('/repos/Kitware/CMake/releases') + .query({ page: 2 }) + .reply(200, []); }); afterEach(() => { nock.cleanAll(); @@ -124,33 +169,38 @@ describe('When api token is required', () => { }); describe('When using macos 3.19.2 release', () => { - const releases = { - tag_name: 'v3.19.2', - assets: [ - { - name: 'cmake-3.19.2-Linux-x86_64.tar.gz', - browser_download_url: - 'https://fakeaddress/cmake-3.19.2-Linux-x86_64.tar.gz', - }, - { - name: 'cmake-3.19.2-macos-universal.dmg', - browser_download_url: - 'https://fakeaddress.com/cmake-3.19.2-macos-universal.dmg', - }, - { - name: 'cmake-3.19.2-macos-universal.tar.gz', - browser_download_url: - 'https://fakeaddress.com/cmake-3.19.2-macos-universal.tar.gz', - }, - ], - }; + const releases = [ + { + tag_name: 'v3.19.2', + assets: [ + { + name: 'cmake-3.19.2-Linux-x86_64.tar.gz', + browser_download_url: + 'https://fakeaddress/cmake-3.19.2-Linux-x86_64.tar.gz', + }, + { + name: 'cmake-3.19.2-macos-universal.dmg', + browser_download_url: + 'https://fakeaddress.com/cmake-3.19.2-macos-universal.dmg', + }, + { + name: 'cmake-3.19.2-macos-universal.tar.gz', + browser_download_url: + 'https://fakeaddress.com/cmake-3.19.2-macos-universal.tar.gz', + }, + ], + }, + ]; beforeEach(() => { nock.disableNetConnect(); nock('https://api.github.com') .get('/repos/Kitware/CMake/releases') - .query({ page: 1 }) .reply(200, releases); + nock('https://api.github.com') + .get('/repos/Kitware/CMake/releases') + .query({ page: 2 }) + .reply(200, []); }); afterEach(() => { @@ -184,28 +234,33 @@ describe('When using macos 3.19.2 release', () => { }); describe('When providing multiple different archs', () => { - const releases = { - tag_name: 'v3.19.3', - assets: [ - { - name: 'cmake-3.19.3-Linux-aarch64.tar.gz', - browser_download_url: - 'https://fakeaddress.com/cmake-3.19.3-Linux-aarch64.tar.gz', - }, - { - name: 'cmake-3.19.3-Linux-x86_64.tar.gz', - browser_download_url: - 'https://fakeaddress.com/cmake-3.19.3-Linux-x86_64.tar.gz', - }, - ], - }; + const releases = [ + { + tag_name: 'v3.19.3', + assets: [ + { + name: 'cmake-3.19.3-Linux-aarch64.tar.gz', + browser_download_url: + 'https://fakeaddress.com/cmake-3.19.3-Linux-aarch64.tar.gz', + }, + { + name: 'cmake-3.19.3-Linux-x86_64.tar.gz', + browser_download_url: + 'https://fakeaddress.com/cmake-3.19.3-Linux-x86_64.tar.gz', + }, + ], + }, + ]; beforeEach(() => { nock.disableNetConnect(); nock('https://api.github.com') .get('/repos/Kitware/CMake/releases') - .query({ page: 1 }) .reply(200, releases); + nock('https://api.github.com') + .get('/repos/Kitware/CMake/releases') + .query({ page: 2 }) + .reply(200, []); }); afterEach(() => { diff --git a/dist/index.js b/dist/index.js index de44445..029c229 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -module.exports=function(e,t){"use strict";var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var n=r[t]={i:t,l:false,exports:{}};var i=true;try{e[t].call(n.exports,n,n.exports,__webpack_require__);i=false}finally{if(i)delete r[t]}n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(325)}return startup()}({1:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const i=r(129);const s=r(622);const o=r(669);const a=r(672);const l=o.promisify(i.exec);function cp(e,t,r={}){return n(this,void 0,void 0,function*(){const{force:n,recursive:i}=readCopyOptions(r);const o=(yield a.exists(t))?yield a.stat(t):null;if(o&&o.isFile()&&!n){return}const l=o&&o.isDirectory()?s.join(t,s.basename(e)):t;if(!(yield a.exists(e))){throw new Error(`no such file or directory: ${e}`)}const c=yield a.stat(e);if(c.isDirectory()){if(!i){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,l,0,n)}}else{if(s.relative(e,l)===""){throw new Error(`'${l}' and '${e}' are the same file`)}yield copyFile(e,l,n)}})}t.cp=cp;function mv(e,t,r={}){return n(this,void 0,void 0,function*(){if(yield a.exists(t)){let n=true;if(yield a.isDirectory(t)){t=s.join(t,s.basename(e));n=yield a.exists(t)}if(n){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(s.dirname(t));yield a.rename(e,t)})}t.mv=mv;function rmRF(e){return n(this,void 0,void 0,function*(){if(a.IS_WINDOWS){try{if(yield a.isDirectory(e,true)){yield l(`rd /s /q "${e}"`)}else{yield l(`del /f /a "${e}"`)}}catch(e){if(e.code!=="ENOENT")throw e}try{yield a.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield a.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield l(`rm -rf "${e}"`)}else{yield a.unlink(e)}}})}t.rmRF=rmRF;function mkdirP(e){return n(this,void 0,void 0,function*(){yield a.mkdirP(e)})}t.mkdirP=mkdirP;function which(e,t){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(a.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}}try{const t=[];if(a.IS_WINDOWS&&process.env.PATHEXT){for(const e of process.env.PATHEXT.split(s.delimiter)){if(e){t.push(e)}}}if(a.isRooted(e)){const r=yield a.tryGetExecutablePath(e,t);if(r){return r}return""}if(e.includes("/")||a.IS_WINDOWS&&e.includes("\\")){return""}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(s.delimiter)){if(e){r.push(e)}}}for(const n of r){const r=yield a.tryGetExecutablePath(n+s.sep+e,t);if(r){return r}}return""}catch(e){throw new Error(`which failed with message ${e.message}`)}})}t.which=which;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);return{force:t,recursive:r}}function cpDirRecursive(e,t,r,i){return n(this,void 0,void 0,function*(){if(r>=255)return;r++;yield mkdirP(t);const n=yield a.readdir(e);for(const s of n){const n=`${e}/${s}`;const o=`${t}/${s}`;const l=yield a.lstat(n);if(l.isDirectory()){yield cpDirRecursive(n,o,r,i)}else{yield copyFile(n,o,i)}}yield a.chmod(t,(yield a.stat(e)).mode)})}function copyFile(e,t,r){return n(this,void 0,void 0,function*(){if((yield a.lstat(e)).isSymbolicLink()){try{yield a.lstat(t);yield a.unlink(t)}catch(e){if(e.code==="EPERM"){yield a.chmod(t,"0666");yield a.unlink(t)}}const r=yield a.readlink(e);yield a.symlink(r,t,a.IS_WINDOWS?"junction":null)}else if(!(yield a.exists(t))||r){yield a.copyFile(e,t)}})}},9:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=i(r(87));const o=i(r(614));const a=i(r(129));const l=i(r(622));const c=i(r(1));const u=i(r(672));const f=process.platform==="win32";class ToolRunner extends o.EventEmitter{constructor(e,t,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const r=this._getSpawnFileName();const n=this._getSpawnArgs(e);let i=t?"":"[command]";if(f){if(this._isCmdFile()){i+=r;for(const e of n){i+=` ${e}`}}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(const e of n){i+=` ${e}`}}else{i+=this._windowsQuoteCmdArg(r);for(const e of n){i+=` ${this._windowsQuoteCmdArg(e)}`}}}else{i+=r;for(const e of n){i+=` ${e}`}}return i}_processLineBuffer(e,t,r){try{let n=t+e.toString();let i=n.indexOf(s.EOL);while(i>-1){const e=n.substring(0,i);r(e);n=n.substring(i+s.EOL.length);i=n.indexOf(s.EOL)}t=n}catch(e){this._debug(`error processing line. Failed with error ${e}`)}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){t+=" ";t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const n of e){if(t.some(e=>e===n)){r=true;break}}if(!r){return e}let n='"';let i=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(i&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){i=true;n+='"'}else{i=false}}n+='"';return n.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let t='"';let r=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(r&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){r=true;t+="\\"}else{r=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${t}"`}return r}exec(){return n(this,void 0,void 0,function*(){if(!u.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=l.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield c.which(this.toolPath,true);return new Promise((e,t)=>{this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+s.EOL)}const n=new ExecState(r,this.toolPath);n.on("debug",e=>{this._debug(e)});const i=this._getSpawnFileName();const o=a.spawn(i,this._getSpawnArgs(r),this._getSpawnOptions(this.options,i));const l="";if(o.stdout){o.stdout.on("data",e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}this._processLineBuffer(e,l,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}const c="";if(o.stderr){o.stderr.on("data",e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const t=r.failOnStdErr?r.errStream:r.outStream;t.write(e)}this._processLineBuffer(e,c,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}o.on("error",e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()});o.on("exit",e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()});o.on("close",e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()});n.on("done",(r,n)=>{if(l.length>0){this.emit("stdline",l)}if(c.length>0){this.emit("errline",c)}o.removeAllListeners();if(r){t(r)}else{e(n)}});if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}})})}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let r=false;let n=false;let i="";function append(e){if(n&&e!=='"'){i+="\\"}i+=e;n=false}for(let s=0;s0){t.push(i);i=""}continue}append(o)}if(i.length>0){t.push(i.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends o.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}},13:function(e){"use strict";var t=String.prototype.replace;var r=/%20/g;var n={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports={default:n.RFC3986,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986}},16:function(e){e.exports=require("tls")},31:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=i(r(550));const o=r(470);const a=r(87);const l=r(129);const c=r(747);function _findMatch(t,r,i,l){return n(this,void 0,void 0,function*(){const n=a.platform();let c;let u;let f;for(const a of i){const i=a.version;o.debug(`check ${i} satisfies ${t}`);if(s.satisfies(i,t)&&(!r||a.stable===r)){f=a.files.find(t=>{o.debug(`${t.arch}===${l} && ${t.platform}===${n}`);let r=t.arch===l&&t.platform===n;if(r&&t.platform_version){const n=e.exports._getOsVersion();if(n===t.platform_version){r=true}else{r=s.satisfies(n,t.platform_version)}}return r});if(f){o.debug(`matched ${a.version}`);u=a;break}}}if(u&&f){c=Object.assign({},u);c.files=[f]}return c})}t._findMatch=_findMatch;function _getOsVersion(){const t=a.platform();let r="";if(t==="darwin"){r=l.execSync("sw_vers -productVersion").toString()}else if(t==="linux"){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(e.length===2&&e[0].trim()==="DISTRIB_RELEASE"){r=e[1].trim();break}}}}return r}t._getOsVersion=_getOsVersion;function _readLinuxVersionFile(){const e="/etc/lsb-release";let t="";if(c.existsSync(e)){t=c.readFileSync(e).toString()}return t}t._readLinuxVersionFile=_readLinuxVersionFile},52:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var a=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(t){return step([e,t])}}function step(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(s=o[0]&2?i["return"]:o[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;if(i=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;i=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]i){throw new TypeError(`version is longer than ${i} characters`)}n("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>s||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>s||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>s||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0){if(typeof this.prerelease[e]==="number"){this.prerelease[e]++;e=-2}}if(e===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error(`invalid increment argument: ${e}`)}this.format();this.raw=this.version;return this}}e.exports=SemVer},82:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue},87:function(e){e.exports=require("os")},92:function(e,t,r){const n=r(65);const i=(e,t,r)=>new n(e,r).compare(new n(t,r));e.exports=i},102:function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(747));const s=n(r(87));const o=r(82);function issueCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!i.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}i.appendFileSync(r,`${o.toCommandValue(t)}${s.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},105:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const i=r(874);const s=r(729);class RestClient{constructor(e,t,r,n){this.client=new i.HttpClient(e,r,n);if(t){this._baseUrl=t}}options(e,t){return n(this,void 0,void 0,function*(){let r=s.getUrl(e,this._baseUrl);let n=yield this.client.options(r,this._headersFromOptions(t));return this.processResponse(n,t)})}get(e,t){return n(this,void 0,void 0,function*(){let r=s.getUrl(e,this._baseUrl,(t||{}).queryParameters);let n=yield this.client.get(r,this._headersFromOptions(t));return this.processResponse(n,t)})}del(e,t){return n(this,void 0,void 0,function*(){let r=s.getUrl(e,this._baseUrl,(t||{}).queryParameters);let n=yield this.client.del(r,this._headersFromOptions(t));return this.processResponse(n,t)})}create(e,t,r){return n(this,void 0,void 0,function*(){let n=s.getUrl(e,this._baseUrl);let i=this._headersFromOptions(r,true);let o=JSON.stringify(t,null,2);let a=yield this.client.post(n,o,i);return this.processResponse(a,r)})}update(e,t,r){return n(this,void 0,void 0,function*(){let n=s.getUrl(e,this._baseUrl);let i=this._headersFromOptions(r,true);let o=JSON.stringify(t,null,2);let a=yield this.client.patch(n,o,i);return this.processResponse(a,r)})}replace(e,t,r){return n(this,void 0,void 0,function*(){let n=s.getUrl(e,this._baseUrl);let i=this._headersFromOptions(r,true);let o=JSON.stringify(t,null,2);let a=yield this.client.put(n,o,i);return this.processResponse(a,r)})}uploadStream(e,t,r,i){return n(this,void 0,void 0,function*(){let n=s.getUrl(t,this._baseUrl);let o=this._headersFromOptions(i,true);let a=yield this.client.sendStream(e,n,r,o);return this.processResponse(a,i)})}_headersFromOptions(e,t){e=e||{};let r=e.additionalHeaders||{};r["Accept"]=e.acceptHeader||"application/json";if(t){let e=false;for(let t in r){if(t.toLowerCase()=="content-type"){e=true}}if(!e){r["Content-Type"]="application/json; charset=utf-8"}}return r}static dateTimeDeserializer(e,t){if(typeof t==="string"){let e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}processResponse(e,t){return n(this,void 0,void 0,function*(){return new Promise((r,s)=>n(this,void 0,void 0,function*(){const n=e.message.statusCode;const o={statusCode:n,result:null,headers:{}};if(n==i.HttpCodes.NotFound){r(o)}let a;let l;try{l=yield e.readBody();if(l&&l.length>0){if(t&&t.deserializeDates){a=JSON.parse(l,RestClient.dateTimeDeserializer)}else{a=JSON.parse(l)}if(t&&t.responseProcessor){o.result=t.responseProcessor(a)}else{o.result=a}}o.headers=e.message.headers}catch(e){}if(n>299){let e;if(a&&a.message){e=a.message}else if(l&&l.length>0){e=l}else{e="Failed request: ("+n+")"}let t=new Error(e);t["statusCode"]=n;if(o.result){t["result"]=o.result}s(t)}else{r(o)}}))})}}t.RestClient=RestClient},120:function(e,t,r){const n=r(465);const i=(e,t)=>e.sort((e,r)=>n(e,r,t));e.exports=i},124:function(e,t,r){class Range{constructor(e,t){t=s(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof o){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length);if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${e}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter(e=>!d(e[0]));if(this.set.length===0)this.set=[e];else if(this.set.length>1){for(const e of this.set){if(e.length===1&&v(e[0])){this.set=[e];break}}}}this.format()}format(){this.range=this.set.map(e=>{return e.join(" ").trim()}).join("||").trim();return this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=Object.keys(this.options).join(",");const r=`parseRange:${t}:${e}`;const n=i.get(r);if(n)return n;const s=this.options.loose;const l=s?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(l,_(this.options.includePrerelease));a("hyphen replace",e);e=e.replace(c[u.COMPARATORTRIM],f);a("comparator trim",e,c[u.COMPARATORTRIM]);e=e.replace(c[u.TILDETRIM],h);e=e.replace(c[u.CARETTRIM],p);e=e.split(/\s+/).join(" ");const v=s?c[u.COMPARATORLOOSE]:c[u.COMPARATOR];const E=e.split(" ").map(e=>y(e,this.options)).join(" ").split(/\s+/).map(e=>A(e,this.options)).filter(this.options.loose?e=>!!e.match(v):()=>true).map(e=>new o(e,this.options));const g=E.length;const R=new Map;for(const e of E){if(d(e))return[e];R.set(e.value,e)}if(R.size>1&&R.has(""))R.delete("");const w=[...R.values()];i.set(r,w);return w}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(r=>{return E(r,t)&&e.set.some(e=>{return E(e,t)&&r.every(r=>{return e.every(e=>{return r.intersects(e,t)})})})})}test(e){if(!e){return false}if(typeof e==="string"){try{e=new l(e,this.options)}catch(e){return false}}for(let t=0;te.value==="<0.0.0-0";const v=e=>e.value==="";const E=(e,t)=>{let r=true;const n=e.slice();let i=n.pop();while(r&&n.length){r=n.every(e=>{return i.intersects(e,t)});i=n.pop()}return r};const y=(e,t)=>{a("comp",e,t);e=m(e,t);a("caret",e);e=R(e,t);a("tildes",e);e=S(e,t);a("xrange",e);e=I(e,t);a("stars",e);return e};const g=e=>!e||e.toLowerCase()==="x"||e==="*";const R=(e,t)=>e.trim().split(/\s+/).map(e=>{return w(e,t)}).join(" ");const w=(e,t)=>{const r=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(r,(t,r,n,i,s)=>{a("tilde",e,t,r,n,i,s);let o;if(g(r)){o=""}else if(g(n)){o=`>=${r}.0.0 <${+r+1}.0.0-0`}else if(g(i)){o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`}else if(s){a("replaceTilde pr",s);o=`>=${r}.${n}.${i}-${s} <${r}.${+n+1}.0-0`}else{o=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`}a("tilde return",o);return o})};const m=(e,t)=>e.trim().split(/\s+/).map(e=>{return O(e,t)}).join(" ");const O=(e,t)=>{a("caret",e,t);const r=t.loose?c[u.CARETLOOSE]:c[u.CARET];const n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,s,o)=>{a("caret",e,t,r,i,s,o);let l;if(g(r)){l=""}else if(g(i)){l=`>=${r}.0.0${n} <${+r+1}.0.0-0`}else if(g(s)){if(r==="0"){l=`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`}else{l=`>=${r}.${i}.0${n} <${+r+1}.0.0-0`}}else if(o){a("replaceCaret pr",o);if(r==="0"){if(i==="0"){l=`>=${r}.${i}.${s}-${o} <${r}.${i}.${+s+1}-0`}else{l=`>=${r}.${i}.${s}-${o} <${r}.${+i+1}.0-0`}}else{l=`>=${r}.${i}.${s}-${o} <${+r+1}.0.0-0`}}else{a("no pr");if(r==="0"){if(i==="0"){l=`>=${r}.${i}.${s}${n} <${r}.${i}.${+s+1}-0`}else{l=`>=${r}.${i}.${s}${n} <${r}.${+i+1}.0-0`}}else{l=`>=${r}.${i}.${s} <${+r+1}.0.0-0`}}a("caret return",l);return l})};const S=(e,t)=>{a("replaceXRanges",e,t);return e.split(/\s+/).map(e=>{return T(e,t)}).join(" ")};const T=(e,t)=>{e=e.trim();const r=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(r,(r,n,i,s,o,l)=>{a("xRange",e,r,n,i,s,o,l);const c=g(i);const u=c||g(s);const f=u||g(o);const h=f;if(n==="="&&h){n=""}l=t.includePrerelease?"-0":"";if(c){if(n===">"||n==="<"){r="<0.0.0-0"}else{r="*"}}else if(n&&h){if(u){s=0}o=0;if(n===">"){n=">=";if(u){i=+i+1;s=0;o=0}else{s=+s+1;o=0}}else if(n==="<="){n="<";if(u){i=+i+1}else{s=+s+1}}if(n==="<")l="-0";r=`${n+i}.${s}.${o}${l}`}else if(u){r=`>=${i}.0.0${l} <${+i+1}.0.0-0`}else if(f){r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`}a("xRange return",r);return r})};const I=(e,t)=>{a("replaceStars",e,t);return e.trim().replace(c[u.STAR],"")};const A=(e,t)=>{a("replaceGTE0",e,t);return e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")};const _=e=>(t,r,n,i,s,o,a,l,c,u,f,h,p)=>{if(g(n)){r=""}else if(g(i)){r=`>=${n}.0.0${e?"-0":""}`}else if(g(s)){r=`>=${n}.${i}.0${e?"-0":""}`}else if(o){r=`>=${r}`}else{r=`>=${r}${e?"-0":""}`}if(g(c)){l=""}else if(g(u)){l=`<${+c+1}.0.0-0`}else if(g(f)){l=`<${c}.${+u+1}.0-0`}else if(h){l=`<=${c}.${u}.${f}-${h}`}else if(e){l=`<${c}.${u}.${+f+1}-0`}else{l=`<=${l}`}return`${r} ${l}`.trim()};const x=(e,t,r)=>{for(let r=0;r0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch){return true}}}return false}return true}},129:function(e){e.exports=require("child_process")},139:function(e,t,r){var n=r(417);e.exports=function nodeRNG(){return n.randomBytes(16)}},141:function(e,t,r){"use strict";var n=r(631);var i=r(16);var s=r(605);var o=r(211);var a=r(614);var l=r(357);var c=r(669);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||s.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",function onFree(e,r,n,i){var s=toOptions(r,n,i);for(var o=0,a=t.requests.length;o=this.maxSockets){i.requests.push(s);return}i.createSocket(s,function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){i.emit("free",t,s)}function onCloseOrRemove(e){i.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}})};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var n={};r.sockets.push(n);var i=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){i.localAddress=e.localAddress}if(i.proxyAuth){i.headers=i.headers||{};i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")}u("making CONNECT request");var s=r.request(i);s.useChunkedEncodingByDefault=false;s.once("response",onResponse);s.once("upgrade",onUpgrade);s.once("connect",onConnect);s.once("error",onError);s.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick(function(){onConnect(e,t,r)})}function onConnect(i,o,a){s.removeAllListeners();o.removeAllListeners();if(i.statusCode!==200){u("tunneling socket could not be established, statusCode=%d",i.statusCode);o.destroy();var l=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);l.code="ECONNRESET";e.request.emit("error",l);r.removeSocket(n);return}if(a.length>0){u("got illegal response body from proxy");o.destroy();var l=new Error("got illegal response body from proxy");l.code="ECONNRESET";e.request.emit("error",l);r.removeSocket(n);return}u("tunneling connection has established");r.sockets[r.sockets.indexOf(n)]=o;return t(o)}function onError(t){s.removeAllListeners();u("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, "+"cause="+t.message);i.code="ECONNRESET";e.request.emit("error",i);r.removeSocket(n)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,function(e){r.request.onSocket(e)})}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,function(n){var s=e.request.getHeader("host");var o=mergeOptions({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):e.host});var a=i.connect(0,o);r.sockets[r.sockets.indexOf(n)]=a;t(a)})}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t!e?{}:typeof e!=="object"?{loose:true}:t.filter(t=>e[t]).reduce((e,t)=>{e[t]=true;return e},{});e.exports=r},164:function(e,t,r){const n=r(65);const i=r(124);const s=r(486);const o=(e,t)=>{e=new i(e,t);let r=new n("0.0.0");if(e.test(r)){return r}r=new n("0.0.0-0");if(e.test(r)){return r}r=null;for(let t=0;t{const t=new n(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!o||s(t,o)){o=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}});if(o&&(!r||s(r,o)))r=o}if(r&&e.test(r)){return r}return null};e.exports=o},167:function(e,t,r){const n=r(92);const i=(e,t,r)=>n(e,t,r)>=0;e.exports=i},174:function(e,t,r){const n=Symbol("SemVer ANY");class Comparator{static get ANY(){return n}constructor(e,t){t=i(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}l("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===n){this.value=""}else{this.value=this.operator+this.semver.version}l("comp",this)}parse(e){const t=this.options.loose?s[o.COMPARATORLOOSE]:s[o.COMPARATOR];const r=e.match(t);if(!r){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=n}else{this.semver=new c(r[2],this.options.loose)}}toString(){return this.value}test(e){l("Comparator.test",e,this.options.loose);if(this.semver===n||e===n){return true}if(typeof e==="string"){try{e=new c(e,this.options)}catch(e){return false}}return a(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new u(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new u(this.value,t).test(e.semver)}const r=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");const n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");const i=this.semver.version===e.semver.version;const s=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");const o=a(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<");const l=a(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||n||i&&s||o||l}}e.exports=Comparator;const i=r(143);const{re:s,t:o}=r(976);const a=r(752);const l=r(548);const c=r(65);const u=r(124)},181:function(e){const t="2.0.0";const r=256;const n=Number.MAX_SAFE_INTEGER||9007199254740991;const i=16;e.exports={SEMVER_SPEC_VERSION:t,MAX_LENGTH:r,MAX_SAFE_INTEGER:n,MAX_SAFE_COMPONENT_LENGTH:i}},211:function(e){e.exports=require("https")},219:function(e,t,r){const n=r(124);const i=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "));e.exports=i},259:function(e,t,r){const n=r(124);const i=(e,t,r)=>{e=new n(e,r);t=new n(t,r);return e.intersects(t)};e.exports=i},283:function(e,t,r){const n=r(92);const i=(e,t)=>n(e,t,true);e.exports=i},298:function(e,t,r){const n=r(92);const i=(e,t,r)=>n(e,t,r)===0;e.exports=i},310:function(e,t,r){const n=r(124);const i=(e,t,r)=>{try{t=new n(t,r)}catch(e){return false}return t.test(e)};e.exports=i},323:function(e,t,r){const n=r(462);const i=(e,t,r)=>n(e,t,"<",r);e.exports=i},325:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var a=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(t){return step([e,t])}}function step(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(s=o[0]&2?i["return"]:o[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;if(i=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;i=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]1){c.warning("Found "+r.length+" matching packages.");var n=r.filter(function(e){return e.url.match("64")});if(n.length>0){r=n}}var i=r[0].url;var s=r.length;c.debug("Found "+s+" assets for "+process.platform+" with version "+e.name);c.debug("Using asset url "+i);return i}function getArchive(e){return o(this,void 0,void 0,function(){var t;return a(this,function(r){switch(r.label){case 0:return[4,l.downloadTool(e)];case 1:t=r.sent();if(!e.endsWith("zip"))return[3,3];return[4,l.extractZip(t)];case 2:return[2,r.sent()];case 3:if(!e.endsWith("tar.gz"))return[3,5];return[4,l.extractTar(t)];case 4:return[2,r.sent()];case 5:throw new Error("Could not determine filetype of "+e)}})})}function addCMakeToToolCache(e){return o(this,void 0,void 0,function(){var t;return a(this,function(r){switch(r.label){case 0:return[4,getArchive(getURL(e))];case 1:t=r.sent();return[4,l.cacheDir(t,h,e.name)];case 2:return[2,r.sent()]}})})}t.addCMakeToToolCache=addCMakeToToolCache;function getBinDirectoryFrom(e){return o(this,void 0,void 0,function(){var t,r,n;return a(this,function(i){switch(i.label){case 0:return[4,u.promises.readdir(e)];case 1:t=i.sent();if(t.length!=1){throw new Error("Archive does not have expected layout.")}if(!(process.platform==="darwin"))return[3,3];r=f.join(e,t[0]);return[4,u.promises.readdir(r)];case 2:n=i.sent();return[2,f.join(r,n[0],"Contents","bin")];case 3:return[2,f.join(e,t[0],"bin")]}})})}function addCMakeToPath(e){return o(this,void 0,void 0,function(){var t,r,n;return a(this,function(i){switch(i.label){case 0:t=l.find(h,e.name);if(!!t)return[3,2];return[4,addCMakeToToolCache(e)];case 1:t=i.sent();i.label=2;case 2:n=(r=c).addPath;return[4,getBinDirectoryFrom(t)];case 3:return[4,n.apply(r,[i.sent()])];case 4:i.sent();return[2]}})})}t.addCMakeToPath=addCMakeToPath},386:function(e,t,r){"use strict";var n=r(897);var i=r(755);var s=r(13);e.exports={formats:s,parse:i,stringify:n}},396:function(e){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},413:function(e,t,r){e.exports=r(141)},417:function(e){e.exports=require("crypto")},431:function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(87));const s=r(82);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+i.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const o="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=o+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${o}${escapeData(this.message)}`;return e}}function escapeData(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},462:function(e,t,r){const n=r(65);const i=r(174);const{ANY:s}=i;const o=r(124);const a=r(310);const l=r(486);const c=r(586);const u=r(898);const f=r(167);const h=(e,t,r,h)=>{e=new n(e,h);t=new o(t,h);let p,d,v,E,y;switch(r){case">":p=l;d=u;v=c;E=">";y=">=";break;case"<":p=c;d=f;v=l;E="<";y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h)){return false}for(let r=0;r{if(e.semver===s){e=new i(">=0.0.0")}o=o||e;a=a||e;if(p(e.semver,o.semver,h)){o=e}else if(v(e.semver,a.semver,h)){a=e}});if(o.operator===E||o.operator===y){return false}if((!a.operator||a.operator===E)&&d(e,a.semver)){return false}else if(a.operator===y&&v(e,a.semver)){return false}}return true};e.exports=h},465:function(e,t,r){const n=r(65);const i=(e,t,r)=>{const i=new n(e,r);const s=new n(t,r);return i.compare(s)||i.compareBuild(s)};e.exports=i},470:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=r(431);const o=r(102);const a=r(82);const l=i(r(87));const c=i(r(622));var u;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(u=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=a.toCommandValue(t);process.env[e]=r;const n=process.env["GITHUB_ENV"]||"";if(n){const t="_GitHubActionsFileCommandDelimeter_";const n=`${e}<<${t}${l.EOL}${r}${l.EOL}${t}`;o.issueCommand("ENV",n)}else{s.issueCommand("set-env",{name:e},r)}}t.exportVariable=exportVariable;function setSecret(e){s.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){o.issueCommand("PATH",e)}else{s.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${c.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}return r.trim()}t.getInput=getInput;function setOutput(e,t){s.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){s.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=u.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){s.issueCommand("debug",{},e)}t.debug=debug;function error(e){s.issue("error",e instanceof Error?e.toString():e)}t.error=error;function warning(e){s.issue("warning",e instanceof Error?e.toString():e)}t.warning=warning;function info(e){process.stdout.write(e+l.EOL)}t.info=info;function startGroup(e){s.issue("group",e)}t.startGroup=startGroup;function endGroup(){s.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return n(this,void 0,void 0,function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r})}t.group=group;function saveState(e,t){s.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState},480:function(e,t,r){const n=r(124);const i=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}};e.exports=i},486:function(e,t,r){const n=r(92);const i=(e,t,r)=>n(e,t,r)>0;e.exports=i},489:function(e,t,r){const n=r(65);const i=(e,t)=>new n(e,t).patch;e.exports=i},499:function(e,t,r){const n=r(65);const i=r(830);const{re:s,t:o}=r(976);const a=(e,t)=>{if(e instanceof n){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let r=null;if(!t.rtl){r=e.match(s[o.COERCE])}else{let t;while((t=s[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||t.index+t[0].length!==r.index+r[0].length){r=t}s[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length}s[o.COERCERTL].lastIndex=-1}if(r===null)return null;return i(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};e.exports=a},503:function(e,t,r){const n=r(830);const i=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};e.exports=i},531:function(e,t,r){const n=r(462);const i=(e,t,r)=>n(e,t,">",r);e.exports=i},533:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(470));const a=i(r(1));const l=i(r(747));const c=i(r(31));const u=i(r(87));const f=i(r(622));const h=i(r(539));const p=i(r(550));const d=i(r(794));const v=i(r(669));const E=s(r(826));const y=r(986);const g=r(357);const R=r(979);class HTTPError extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`);this.httpStatusCode=e;Object.setPrototypeOf(this,new.target.prototype)}}t.HTTPError=HTTPError;const w=process.platform==="win32";const m=process.platform==="darwin";const O="actions/tool-cache";function downloadTool(e,t,r){return n(this,void 0,void 0,function*(){t=t||f.join(_getTempDirectory(),E.default());yield a.mkdirP(f.dirname(t));o.debug(`Downloading ${e}`);o.debug(`Destination ${t}`);const i=3;const s=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10);const l=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);const c=new R.RetryHelper(i,s,l);return yield c.execute(()=>n(this,void 0,void 0,function*(){return yield downloadToolAttempt(e,t||"",r)}),e=>{if(e instanceof HTTPError&&e.httpStatusCode){if(e.httpStatusCode<500&&e.httpStatusCode!==408&&e.httpStatusCode!==429){return false}}return true})})}t.downloadTool=downloadTool;function downloadToolAttempt(e,t,r){return n(this,void 0,void 0,function*(){if(l.existsSync(t)){throw new Error(`Destination file path ${t} already exists`)}const n=new h.HttpClient(O,[],{allowRetries:false});let i;if(r){o.debug("set auth");i={authorization:r}}const s=yield n.get(e,i);if(s.message.statusCode!==200){const t=new HTTPError(s.message.statusCode);o.debug(`Failed to download from "${e}". Code(${s.message.statusCode}) Message(${s.message.statusMessage})`);throw t}const c=v.promisify(d.pipeline);const u=_getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>s.message);const f=u();let p=false;try{yield c(f,l.createWriteStream(t));o.debug("download complete");p=true;return t}finally{if(!p){o.debug("download failed");try{yield a.rmRF(t)}catch(e){o.debug(`Failed to delete '${t}'. ${e.message}`)}}}})}function extract7z(e,t,r){return n(this,void 0,void 0,function*(){g.ok(w,"extract7z() not supported on current OS");g.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);const n=process.cwd();process.chdir(t);if(r){try{const t=o.isDebug()?"-bb1":"-bb0";const i=["x",t,"-bd","-sccUTF-8",e];const s={silent:true};yield y.exec(`"${r}"`,i,s)}finally{process.chdir(n)}}else{const r=f.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const s=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const o=`& '${r}' -Source '${i}' -Target '${s}'`;const l=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",o];const c={silent:true};try{const e=yield a.which("powershell",true);yield y.exec(`"${e}"`,l,c)}finally{process.chdir(n)}}return t})}t.extract7z=extract7z;function extractTar(e,t,r="xz"){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);o.debug("Checking tar --version");let n="";yield y.exec("tar --version",[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>n+=e.toString(),stderr:e=>n+=e.toString()}});o.debug(n.trim());const i=n.toUpperCase().includes("GNU TAR");let s;if(r instanceof Array){s=r}else{s=[r]}if(o.isDebug()&&!r.includes("v")){s.push("-v")}let a=t;let l=e;if(w&&i){s.push("--force-local");a=t.replace(/\\/g,"/");l=e.replace(/\\/g,"/")}if(i){s.push("--warning=no-unknown-keyword")}s.push("-C",a,"-f",l);yield y.exec(`tar`,s);return t})}t.extractTar=extractTar;function extractXar(e,t,r=[]){return n(this,void 0,void 0,function*(){g.ok(m,"extractXar() not supported on current OS");g.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);let n;if(r instanceof Array){n=r}else{n=[r]}n.push("-x","-C",t,"-f",e);if(o.isDebug()){n.push("-v")}const i=yield a.which("xar",true);yield y.exec(`"${i}"`,_unique(n));return t})}t.extractXar=extractXar;function extractZip(e,t){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);if(w){yield extractZipWin(e,t)}else{yield extractZipNix(e,t)}return t})}t.extractZip=extractZip;function extractZipWin(e,t){return n(this,void 0,void 0,function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=`$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}')`;const s=yield a.which("powershell",true);const o=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",i];yield y.exec(`"${s}"`,o)})}function extractZipNix(e,t){return n(this,void 0,void 0,function*(){const r=yield a.which("unzip",true);const n=[e];if(!o.isDebug()){n.unshift("-q")}yield y.exec(`"${r}"`,n,{cwd:t})})}function cacheDir(e,t,r,i){return n(this,void 0,void 0,function*(){r=p.clean(r)||r;i=i||u.arch();o.debug(`Caching tool ${t} ${r} ${i}`);o.debug(`source dir: ${e}`);if(!l.statSync(e).isDirectory()){throw new Error("sourceDir is not a directory")}const n=yield _createToolPath(t,r,i);for(const t of l.readdirSync(e)){const r=f.join(e,t);yield a.cp(r,n,{recursive:true})}_completeToolPath(t,r,i);return n})}t.cacheDir=cacheDir;function cacheFile(e,t,r,i,s){return n(this,void 0,void 0,function*(){i=p.clean(i)||i;s=s||u.arch();o.debug(`Caching tool ${r} ${i} ${s}`);o.debug(`source file: ${e}`);if(!l.statSync(e).isFile()){throw new Error("sourceFile is not a file")}const n=yield _createToolPath(r,i,s);const c=f.join(n,t);o.debug(`destination file ${c}`);yield a.cp(e,c);_completeToolPath(r,i,s);return n})}t.cacheFile=cacheFile;function find(e,t,r){if(!e){throw new Error("toolName parameter is required")}if(!t){throw new Error("versionSpec parameter is required")}r=r||u.arch();if(!_isExplicitVersion(t)){const n=findAllVersions(e,r);const i=_evaluateVersions(n,t);t=i}let n="";if(t){t=p.clean(t)||"";const i=f.join(_getCacheDirectory(),e,t,r);o.debug(`checking cache: ${i}`);if(l.existsSync(i)&&l.existsSync(`${i}.complete`)){o.debug(`Found tool in cache ${e} ${t} ${r}`);n=i}else{o.debug("not found")}}return n}t.find=find;function findAllVersions(e,t){const r=[];t=t||u.arch();const n=f.join(_getCacheDirectory(),e);if(l.existsSync(n)){const e=l.readdirSync(n);for(const i of e){if(_isExplicitVersion(i)){const e=f.join(n,i,t||"");if(l.existsSync(e)&&l.existsSync(`${e}.complete`)){r.push(i)}}}}return r}t.findAllVersions=findAllVersions;function getManifestFromRepo(e,t,r,i="master"){return n(this,void 0,void 0,function*(){let n=[];const s=`https://api.github.com/repos/${e}/${t}/git/trees/${i}`;const a=new h.HttpClient("tool-cache");const l={};if(r){o.debug("set auth");l.authorization=r}const c=yield a.getJson(s,l);if(!c.result){return n}let u="";for(const e of c.result.tree){if(e.path==="versions-manifest.json"){u=e.url;break}}l["accept"]="application/vnd.github.VERSION.raw";let f=yield(yield a.get(u,l)).readBody();if(f){f=f.replace(/^\uFEFF/,"");try{n=JSON.parse(f)}catch(e){o.debug("Invalid json")}}return n})}t.getManifestFromRepo=getManifestFromRepo;function findFromManifest(e,t,r,i=u.arch()){return n(this,void 0,void 0,function*(){const n=yield c._findMatch(e,t,r,i);return n})}t.findFromManifest=findFromManifest;function _createExtractFolder(e){return n(this,void 0,void 0,function*(){if(!e){e=f.join(_getTempDirectory(),E.default())}yield a.mkdirP(e);return e})}function _createToolPath(e,t,r){return n(this,void 0,void 0,function*(){const n=f.join(_getCacheDirectory(),e,p.clean(t)||t,r||"");o.debug(`destination ${n}`);const i=`${n}.complete`;yield a.rmRF(n);yield a.rmRF(i);yield a.mkdirP(n);return n})}function _completeToolPath(e,t,r){const n=f.join(_getCacheDirectory(),e,p.clean(t)||t,r||"");const i=`${n}.complete`;l.writeFileSync(i,"");o.debug("finished caching tool")}function _isExplicitVersion(e){const t=p.clean(e)||"";o.debug(`isExplicit: ${t}`);const r=p.valid(t)!=null;o.debug(`explicit? ${r}`);return r}function _evaluateVersions(e,t){let r="";o.debug(`evaluating ${e.length} versions`);e=e.sort((e,t)=>{if(p.gt(e,t)){return 1}return-1});for(let n=e.length-1;n>=0;n--){const i=e[n];const s=p.satisfies(i,t);if(s){r=i;break}}if(r){o.debug(`matched: ${r}`)}else{o.debug("match not found")}return r}function _getCacheDirectory(){const e=process.env["RUNNER_TOOL_CACHE"]||"";g.ok(e,"Expected RUNNER_TOOL_CACHE to be defined");return e}function _getTempDirectory(){const e=process.env["RUNNER_TEMP"]||"";g.ok(e,"Expected RUNNER_TEMP to be defined");return e}function _getGlobal(e,t){const r=global[e];return r!==undefined?r:t}function _unique(e){return Array.from(new Set(e))}},539:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(605);const i=r(211);const s=r(950);let o;var a;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(a=t.HttpCodes||(t.HttpCodes={}));var l;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(l=t.Headers||(t.Headers={}));var c;(function(e){e["ApplicationJson"]="application/json"})(c=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){let t=s.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const u=[a.MovedPermanently,a.ResourceMoved,a.SeeOther,a.TemporaryRedirect,a.PermanentRedirect];const f=[a.BadGateway,a.ServiceUnavailable,a.GatewayTimeout];const h=["OPTIONS","GET","DELETE","HEAD"];const p=10;const d=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise(async(e,t)=>{let r=Buffer.alloc(0);this.message.on("data",e=>{r=Buffer.concat([r,e])});this.message.on("end",()=>{e(r.toString())})})}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,n){return this.request(e,t,r,n)}async getJson(e,t={}){t[l.Accept]=this._getExistingOrDefaultHeader(t,l.Accept,c.ApplicationJson);let r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,c.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,c.ApplicationJson);let i=await this.post(e,n,r);return this._processResponse(i,this.requestOptions)}async putJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,c.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,c.ApplicationJson);let i=await this.put(e,n,r);return this._processResponse(i,this.requestOptions)}async patchJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,c.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,c.ApplicationJson);let i=await this.patch(e,n,r);return this._processResponse(i,this.requestOptions)}async request(e,t,r,n){if(this._disposed){throw new Error("Client has already been disposed.")}let i=new URL(t);let s=this._prepareRequest(e,i,n);let o=this._allowRetries&&h.indexOf(e)!=-1?this._maxRetries+1:1;let l=0;let c;while(l0){const o=c.message.headers["location"];if(!o){break}let a=new URL(o);if(i.protocol=="https:"&&i.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.")}await c.readBody();if(a.hostname!==i.hostname){for(let e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}s=this._prepareRequest(e,a,n);c=await this.requestRaw(s,r);t--}if(f.indexOf(c.message.statusCode)==-1){return c}l+=1;if(l{let i=function(e,t){if(e){n(e)}r(t)};this.requestRawWithCallback(e,t,i)})}requestRawWithCallback(e,t,r){let n;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;let s=(e,t)=>{if(!i){i=true;r(e,t)}};let o=e.httpModule.request(e.options,e=>{let t=new HttpClientResponse(e);s(null,t)});o.on("socket",e=>{n=e});o.setTimeout(this._socketTimeout||3*6e4,()=>{if(n){n.end()}s(new Error("Request timeout: "+e.options.path),null)});o.on("error",function(e){s(e,null)});if(t&&typeof t==="string"){o.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",function(){o.end()});t.pipe(o)}else{o.end()}}getAgent(e){let t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const s={};s.parsedUrl=t;const o=s.parsedUrl.protocol==="https:";s.httpModule=o?i:n;const a=o?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):a;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){this.handlers.forEach(e=>{e.prepareRequest(s.options)})}return s}_mergeHeaders(e){const t=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},t(this.requestOptions.headers),t(e))}return t(e||{})}_getExistingOrDefaultHeader(e,t,r){const n=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});let i;if(this.requestOptions&&this.requestOptions.headers){i=n(this.requestOptions.headers)[t]}return e[t]||i||r}_getAgent(e){let t;let a=s.getProxyUrl(e);let l=a&&a.hostname;if(this._keepAlive&&l){t=this._proxyAgent}if(this._keepAlive&&!l){t=this._agent}if(!!t){return t}const c=e.protocol==="https:";let u=100;if(!!this.requestOptions){u=this.requestOptions.maxSockets||n.globalAgent.maxSockets}if(l){if(!o){o=r(413)}const e={maxSockets:u,keepAlive:this._keepAlive,proxy:{proxyAuth:`${a.username}:${a.password}`,host:a.hostname,port:a.port}};let n;const i=a.protocol==="https:";if(c){n=i?o.httpsOverHttps:o.httpsOverHttp}else{n=i?o.httpOverHttps:o.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:u};t=c?new i.Agent(e):new n.Agent(e);this._agent=t}if(!t){t=c?i.globalAgent:n.globalAgent}if(c&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(p,e);const t=d*Math.pow(2,e);return new Promise(e=>setTimeout(()=>e(),t))}static dateTimeDeserializer(e,t){if(typeof t==="string"){let e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}async _processResponse(e,t){return new Promise(async(r,n)=>{const i=e.message.statusCode;const s={statusCode:i,result:null,headers:{}};if(i==a.NotFound){r(s)}let o;let l;try{l=await e.readBody();if(l&&l.length>0){if(t&&t.deserializeDates){o=JSON.parse(l,HttpClient.dateTimeDeserializer)}else{o=JSON.parse(l)}s.result=o}s.headers=e.message.headers}catch(e){}if(i>299){let e;if(o&&o.message){e=o.message}else if(l&&l.length>0){e=l}else{e="Failed request: ("+i+")"}let t=new HttpClientError(e,i);t.result=s.result;n(t)}else{r(s)}})}}t.HttpClient=HttpClient},548:function(e){const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},550:function(e,t){t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var n=256;var i=Number.MAX_SAFE_INTEGER||9007199254740991;var s=16;var o=t.re=[];var a=t.src=[];var l=t.tokens={};var c=0;function tok(e){l[e]=c++}tok("NUMERICIDENTIFIER");a[l.NUMERICIDENTIFIER]="0|[1-9]\\d*";tok("NUMERICIDENTIFIERLOOSE");a[l.NUMERICIDENTIFIERLOOSE]="[0-9]+";tok("NONNUMERICIDENTIFIER");a[l.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";tok("MAINVERSION");a[l.MAINVERSION]="("+a[l.NUMERICIDENTIFIER]+")\\."+"("+a[l.NUMERICIDENTIFIER]+")\\."+"("+a[l.NUMERICIDENTIFIER]+")";tok("MAINVERSIONLOOSE");a[l.MAINVERSIONLOOSE]="("+a[l.NUMERICIDENTIFIERLOOSE]+")\\."+"("+a[l.NUMERICIDENTIFIERLOOSE]+")\\."+"("+a[l.NUMERICIDENTIFIERLOOSE]+")";tok("PRERELEASEIDENTIFIER");a[l.PRERELEASEIDENTIFIER]="(?:"+a[l.NUMERICIDENTIFIER]+"|"+a[l.NONNUMERICIDENTIFIER]+")";tok("PRERELEASEIDENTIFIERLOOSE");a[l.PRERELEASEIDENTIFIERLOOSE]="(?:"+a[l.NUMERICIDENTIFIERLOOSE]+"|"+a[l.NONNUMERICIDENTIFIER]+")";tok("PRERELEASE");a[l.PRERELEASE]="(?:-("+a[l.PRERELEASEIDENTIFIER]+"(?:\\."+a[l.PRERELEASEIDENTIFIER]+")*))";tok("PRERELEASELOOSE");a[l.PRERELEASELOOSE]="(?:-?("+a[l.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+a[l.PRERELEASEIDENTIFIERLOOSE]+")*))";tok("BUILDIDENTIFIER");a[l.BUILDIDENTIFIER]="[0-9A-Za-z-]+";tok("BUILD");a[l.BUILD]="(?:\\+("+a[l.BUILDIDENTIFIER]+"(?:\\."+a[l.BUILDIDENTIFIER]+")*))";tok("FULL");tok("FULLPLAIN");a[l.FULLPLAIN]="v?"+a[l.MAINVERSION]+a[l.PRERELEASE]+"?"+a[l.BUILD]+"?";a[l.FULL]="^"+a[l.FULLPLAIN]+"$";tok("LOOSEPLAIN");a[l.LOOSEPLAIN]="[v=\\s]*"+a[l.MAINVERSIONLOOSE]+a[l.PRERELEASELOOSE]+"?"+a[l.BUILD]+"?";tok("LOOSE");a[l.LOOSE]="^"+a[l.LOOSEPLAIN]+"$";tok("GTLT");a[l.GTLT]="((?:<|>)?=?)";tok("XRANGEIDENTIFIERLOOSE");a[l.XRANGEIDENTIFIERLOOSE]=a[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");a[l.XRANGEIDENTIFIER]=a[l.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");a[l.XRANGEPLAIN]="[v=\\s]*("+a[l.XRANGEIDENTIFIER]+")"+"(?:\\.("+a[l.XRANGEIDENTIFIER]+")"+"(?:\\.("+a[l.XRANGEIDENTIFIER]+")"+"(?:"+a[l.PRERELEASE]+")?"+a[l.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");a[l.XRANGEPLAINLOOSE]="[v=\\s]*("+a[l.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+a[l.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+a[l.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+a[l.PRERELEASELOOSE]+")?"+a[l.BUILD]+"?"+")?)?";tok("XRANGE");a[l.XRANGE]="^"+a[l.GTLT]+"\\s*"+a[l.XRANGEPLAIN]+"$";tok("XRANGELOOSE");a[l.XRANGELOOSE]="^"+a[l.GTLT]+"\\s*"+a[l.XRANGEPLAINLOOSE]+"$";tok("COERCE");a[l.COERCE]="(^|[^\\d])"+"(\\d{1,"+s+"})"+"(?:\\.(\\d{1,"+s+"}))?"+"(?:\\.(\\d{1,"+s+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");o[l.COERCERTL]=new RegExp(a[l.COERCE],"g");tok("LONETILDE");a[l.LONETILDE]="(?:~>?)";tok("TILDETRIM");a[l.TILDETRIM]="(\\s*)"+a[l.LONETILDE]+"\\s+";o[l.TILDETRIM]=new RegExp(a[l.TILDETRIM],"g");var u="$1~";tok("TILDE");a[l.TILDE]="^"+a[l.LONETILDE]+a[l.XRANGEPLAIN]+"$";tok("TILDELOOSE");a[l.TILDELOOSE]="^"+a[l.LONETILDE]+a[l.XRANGEPLAINLOOSE]+"$";tok("LONECARET");a[l.LONECARET]="(?:\\^)";tok("CARETTRIM");a[l.CARETTRIM]="(\\s*)"+a[l.LONECARET]+"\\s+";o[l.CARETTRIM]=new RegExp(a[l.CARETTRIM],"g");var f="$1^";tok("CARET");a[l.CARET]="^"+a[l.LONECARET]+a[l.XRANGEPLAIN]+"$";tok("CARETLOOSE");a[l.CARETLOOSE]="^"+a[l.LONECARET]+a[l.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");a[l.COMPARATORLOOSE]="^"+a[l.GTLT]+"\\s*("+a[l.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");a[l.COMPARATOR]="^"+a[l.GTLT]+"\\s*("+a[l.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");a[l.COMPARATORTRIM]="(\\s*)"+a[l.GTLT]+"\\s*("+a[l.LOOSEPLAIN]+"|"+a[l.XRANGEPLAIN]+")";o[l.COMPARATORTRIM]=new RegExp(a[l.COMPARATORTRIM],"g");var h="$1$2$3";tok("HYPHENRANGE");a[l.HYPHENRANGE]="^\\s*("+a[l.XRANGEPLAIN]+")"+"\\s+-\\s+"+"("+a[l.XRANGEPLAIN]+")"+"\\s*$";tok("HYPHENRANGELOOSE");a[l.HYPHENRANGELOOSE]="^\\s*("+a[l.XRANGEPLAINLOOSE]+")"+"\\s+-\\s+"+"("+a[l.XRANGEPLAINLOOSE]+")"+"\\s*$";tok("STAR");a[l.STAR]="(<|>)?=?\\s*\\*";for(var p=0;pn){return null}var r=t.loose?o[l.LOOSE]:o[l.FULL];if(!r.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var r=parse(e,t);return r?r.version:null}t.clean=clean;function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}t.SemVer=SemVer;function SemVer(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===t.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>n){throw new TypeError("version is longer than "+n+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}r("SemVer",e,t);this.options=t;this.loose=!!t.loose;var s=e.trim().match(t.loose?o[l.LOOSE]:o[l.FULL]);if(!s){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+s[1];this.minor=+s[2];this.patch=+s[3];if(this.major>i||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>i||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>i||this.patch<0){throw new TypeError("Invalid patch version")}if(!s[4]){this.prerelease=[]}else{this.prerelease=s[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,n){if(typeof r==="string"){n=r;r=undefined}try{return new SemVer(e,r).inc(t,n).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var n=parse(t);var i="";if(r.prerelease.length||n.prerelease.length){i="pre";var s="prerelease"}for(var o in r){if(o==="major"||o==="minor"||o==="patch"){if(r[o]!==n[o]){return i+o}}}return s}}t.compareIdentifiers=compareIdentifiers;var d=/^[0-9]+$/;function compareIdentifiers(e,t){var r=d.test(e);var n=d.test(t);if(r&&n){e=+e;t=+t}return e===t?0:r&&!n?-1:n&&!r?1:e0}t.lt=lt;function lt(e,t,r){return compare(e,t,r)<0}t.eq=eq;function eq(e,t,r){return compare(e,t,r)===0}t.neq=neq;function neq(e,t,r){return compare(e,t,r)!==0}t.gte=gte;function gte(e,t,r){return compare(e,t,r)>=0}t.lte=lte;function lte(e,t,r){return compare(e,t,r)<=0}t.cmp=cmp;function cmp(e,t,r,n){switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return eq(e,r,n);case"!=":return neq(e,r,n);case">":return gt(e,r,n);case">=":return gte(e,r,n);case"<":return lt(e,r,n);case"<=":return lte(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}t.Comparator=Comparator;function Comparator(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}if(!(this instanceof Comparator)){return new Comparator(e,t)}r("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===v){this.value=""}else{this.value=this.operator+this.semver.version}r("comp",this)}var v={};Comparator.prototype.parse=function(e){var t=this.options.loose?o[l.COMPARATORLOOSE]:o[l.COMPARATOR];var r=e.match(t);if(!r){throw new TypeError("Invalid comparator: "+e)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=v}else{this.semver=new SemVer(r[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){r("Comparator.test",e,this.options.loose);if(this.semver===v||e===v){return true}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}return cmp(e,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}var r;if(this.operator===""){if(this.value===""){return true}r=new Range(e.value,t);return satisfies(this.value,r,t)}else if(e.operator===""){if(e.value===""){return true}r=new Range(this.value,t);return satisfies(e.semver,r,t)}var n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var s=this.semver.version===e.semver.version;var o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var a=cmp(this.semver,"<",e.semver,t)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var l=cmp(this.semver,">",e.semver,t)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return n||i||s&&o||a||l};t.Range=Range;function Range(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof Comparator){return new Range(e.value,t)}if(!(this instanceof Range)){return new Range(e,t)}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}Range.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?o[l.HYPHENRANGELOOSE]:o[l.HYPHENRANGE];e=e.replace(n,hyphenReplace);r("hyphen replace",e);e=e.replace(o[l.COMPARATORTRIM],h);r("comparator trim",e,o[l.COMPARATORTRIM]);e=e.replace(o[l.TILDETRIM],u);e=e.replace(o[l.CARETTRIM],f);e=e.split(/\s+/).join(" ");var i=t?o[l.COMPARATORLOOSE]:o[l.COMPARATOR];var s=e.split(" ").map(function(e){return parseComparator(e,this.options)},this).join(" ").split(/\s+/);if(this.options.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new Comparator(e,this.options)},this);return s};Range.prototype.intersects=function(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(function(r){return isSatisfiable(r,t)&&e.set.some(function(e){return isSatisfiable(e,t)&&r.every(function(r){return e.every(function(e){return r.intersects(e,t)})})})})};function isSatisfiable(e,t){var r=true;var n=e.slice();var i=n.pop();while(r&&n.length){r=n.every(function(e){return i.intersects(e,t)});i=n.pop()}return r}t.toComparators=toComparators;function toComparators(e,t){return new Range(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function parseComparator(e,t){r("comp",e,t);e=replaceCarets(e,t);r("caret",e);e=replaceTildes(e,t);r("tildes",e);e=replaceXRanges(e,t);r("xrange",e);e=replaceStars(e,t);r("stars",e);return e}function isX(e){return!e||e.toLowerCase()==="x"||e==="*"}function replaceTildes(e,t){return e.trim().split(/\s+/).map(function(e){return replaceTilde(e,t)}).join(" ")}function replaceTilde(e,t){var n=t.loose?o[l.TILDELOOSE]:o[l.TILDE];return e.replace(n,function(t,n,i,s,o){r("tilde",e,t,n,i,s,o);var a;if(isX(n)){a=""}else if(isX(i)){a=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(s)){a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"}else if(o){r("replaceTilde pr",o);a=">="+n+"."+i+"."+s+"-"+o+" <"+n+"."+(+i+1)+".0"}else{a=">="+n+"."+i+"."+s+" <"+n+"."+(+i+1)+".0"}r("tilde return",a);return a})}function replaceCarets(e,t){return e.trim().split(/\s+/).map(function(e){return replaceCaret(e,t)}).join(" ")}function replaceCaret(e,t){r("caret",e,t);var n=t.loose?o[l.CARETLOOSE]:o[l.CARET];return e.replace(n,function(t,n,i,s,o){r("caret",e,t,n,i,s,o);var a;if(isX(n)){a=""}else if(isX(i)){a=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(s)){if(n==="0"){a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"}else{a=">="+n+"."+i+".0 <"+(+n+1)+".0.0"}}else if(o){r("replaceCaret pr",o);if(n==="0"){if(i==="0"){a=">="+n+"."+i+"."+s+"-"+o+" <"+n+"."+i+"."+(+s+1)}else{a=">="+n+"."+i+"."+s+"-"+o+" <"+n+"."+(+i+1)+".0"}}else{a=">="+n+"."+i+"."+s+"-"+o+" <"+(+n+1)+".0.0"}}else{r("no pr");if(n==="0"){if(i==="0"){a=">="+n+"."+i+"."+s+" <"+n+"."+i+"."+(+s+1)}else{a=">="+n+"."+i+"."+s+" <"+n+"."+(+i+1)+".0"}}else{a=">="+n+"."+i+"."+s+" <"+(+n+1)+".0.0"}}r("caret return",a);return a})}function replaceXRanges(e,t){r("replaceXRanges",e,t);return e.split(/\s+/).map(function(e){return replaceXRange(e,t)}).join(" ")}function replaceXRange(e,t){e=e.trim();var n=t.loose?o[l.XRANGELOOSE]:o[l.XRANGE];return e.replace(n,function(n,i,s,o,a,l){r("xRange",e,n,i,s,o,a,l);var c=isX(s);var u=c||isX(o);var f=u||isX(a);var h=f;if(i==="="&&h){i=""}l=t.includePrerelease?"-0":"";if(c){if(i===">"||i==="<"){n="<0.0.0-0"}else{n="*"}}else if(i&&h){if(u){o=0}a=0;if(i===">"){i=">=";if(u){s=+s+1;o=0;a=0}else{o=+o+1;a=0}}else if(i==="<="){i="<";if(u){s=+s+1}else{o=+o+1}}n=i+s+"."+o+"."+a+l}else if(u){n=">="+s+".0.0"+l+" <"+(+s+1)+".0.0"+l}else if(f){n=">="+s+"."+o+".0"+l+" <"+s+"."+(+o+1)+".0"+l}r("xRange return",n);return n})}function replaceStars(e,t){r("replaceStars",e,t);return e.trim().replace(o[l.STAR],"")}function hyphenReplace(e,t,r,n,i,s,o,a,l,c,u,f,h){if(isX(r)){t=""}else if(isX(n)){t=">="+r+".0.0"}else if(isX(i)){t=">="+r+"."+n+".0"}else{t=">="+t}if(isX(l)){a=""}else if(isX(c)){a="<"+(+l+1)+".0.0"}else if(isX(u)){a="<"+l+"."+(+c+1)+".0"}else if(f){a="<="+l+"."+c+"."+u+"-"+f}else{a="<="+a}return(t+" "+a).trim()}Range.prototype.test=function(e){if(!e){return false}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}for(var t=0;t0){var s=e[i].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch){return true}}}return false}return true}t.satisfies=satisfies;function satisfies(e,t,r){try{t=new Range(t,r)}catch(e){return false}return t.test(e)}t.maxSatisfying=maxSatisfying;function maxSatisfying(e,t,r){var n=null;var i=null;try{var s=new Range(t,r)}catch(e){return null}e.forEach(function(e){if(s.test(e)){if(!n||i.compare(e)===-1){n=e;i=new SemVer(n,r)}}});return n}t.minSatisfying=minSatisfying;function minSatisfying(e,t,r){var n=null;var i=null;try{var s=new Range(t,r)}catch(e){return null}e.forEach(function(e){if(s.test(e)){if(!n||i.compare(e)===1){n=e;i=new SemVer(n,r)}}});return n}t.minVersion=minVersion;function minVersion(e,t){e=new Range(e,t);var r=new SemVer("0.0.0");if(e.test(r)){return r}r=new SemVer("0.0.0-0");if(e.test(r)){return r}r=null;for(var n=0;n":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!r||gt(r,t)){r=t}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}if(r&&e.test(r)){return r}return null}t.validRange=validRange;function validRange(e,t){try{return new Range(e,t).range||"*"}catch(e){return null}}t.ltr=ltr;function ltr(e,t,r){return outside(e,t,"<",r)}t.gtr=gtr;function gtr(e,t,r){return outside(e,t,">",r)}t.outside=outside;function outside(e,t,r,n){e=new SemVer(e,n);t=new Range(t,n);var i,s,o,a,l;switch(r){case">":i=gt;s=lte;o=lt;a=">";l=">=";break;case"<":i=lt;s=gte;o=gt;a="<";l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,n)){return false}for(var c=0;c=0.0.0")}f=f||e;h=h||e;if(i(e.semver,f.semver,n)){f=e}else if(o(e.semver,h.semver,n)){h=e}});if(f.operator===a||f.operator===l){return false}if((!h.operator||h.operator===a)&&s(e,h.semver)){return false}else if(h.operator===l&&o(e,h.semver)){return false}}return true}t.prerelease=prerelease;function prerelease(e,t){var r=parse(e,t);return r&&r.prerelease.length?r.prerelease:null}t.intersects=intersects;function intersects(e,t,r){e=new Range(e,r);t=new Range(t,r);return e.intersects(t)}t.coerce=coerce;function coerce(e,t){if(e instanceof SemVer){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};var r=null;if(!t.rtl){r=e.match(o[l.COERCE])}else{var n;while((n=o[l.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||n.index+n[0].length!==r.index+r[0].length){r=n}o[l.COERCERTL].lastIndex=n.index+n[1].length+n[2].length}o[l.COERCERTL].lastIndex=-1}if(r===null){return null}return parse(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}},581:function(e,t,r){"use strict";var n=r(13);var i=Object.prototype.hasOwnProperty;var s=Array.isArray;var o=function(){var e=[];for(var t=0;t<256;++t){e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase())}return e}();var a=function compactQueue(e){while(e.length>1){var t=e.pop();var r=t.obj[t.prop];if(s(r)){var n=[];for(var i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||s===n.RFC1738&&(u===40||u===41)){l+=a.charAt(c);continue}if(u<128){l=l+o[u];continue}if(u<2048){l=l+(o[192|u>>6]+o[128|u&63]);continue}if(u<55296||u>=57344){l=l+(o[224|u>>12]+o[128|u>>6&63]+o[128|u&63]);continue}c+=1;u=65536+((u&1023)<<10|a.charCodeAt(c)&1023);l+=o[240|u>>18]+o[128|u>>12&63]+o[128|u>>6&63]+o[128|u&63]}return l};var p=function compact(e){var t=[{obj:{o:e},prop:"o"}];var r=[];for(var n=0;nn(e,t,r)<0;e.exports=i},593:function(e,t,r){const n=r(465);const i=(e,t)=>e.sort((e,r)=>n(r,e,t));e.exports=i},605:function(e){e.exports=require("http")},612:function(e,t,r){"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach(function(e){t.push(e)})}else if(arguments.length>0){for(var r=0,n=arguments.length;r1){r=t}else if(this.head){n=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=0;n!==null;i++){r=e(r,n.value,i);n=n.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var n=this.tail;if(arguments.length>1){r=t}else if(this.tail){n=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=this.length-1;n!==null;i--){r=e(r,n.value,i);n=n.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(tthis.length){t=this.length}for(var n=0,i=this.head;i!==null&&nthis.length){t=this.length}for(var n=this.length,i=this.tail;i!==null&&n>t;n--){i=i.prev}for(;i!==null&&n>e;n--,i=i.prev){r.push(i.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var n=0,i=this.head;i!==null&&nn(t,e,r);e.exports=i},631:function(e){e.exports=require("net")},669:function(e){e.exports=require("util")},672:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i;Object.defineProperty(t,"__esModule",{value:true});const s=r(357);const o=r(747);const a=r(622);i=o.promises,t.chmod=i.chmod,t.copyFile=i.copyFile,t.lstat=i.lstat,t.mkdir=i.mkdir,t.readdir=i.readdir,t.readlink=i.readlink,t.rename=i.rename,t.rmdir=i.rmdir,t.stat=i.stat,t.symlink=i.symlink,t.unlink=i.unlink;t.IS_WINDOWS=process.platform==="win32";function exists(e){return n(this,void 0,void 0,function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true})}t.exists=exists;function isDirectory(e,r=false){return n(this,void 0,void 0,function*(){const n=r?yield t.stat(e):yield t.lstat(e);return n.isDirectory()})}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function mkdirP(e,r=1e3,i=1){return n(this,void 0,void 0,function*(){s.ok(e,"a path argument must be provided");e=a.resolve(e);if(i>=r)return t.mkdir(e);try{yield t.mkdir(e);return}catch(n){switch(n.code){case"ENOENT":{yield mkdirP(a.dirname(e),r,i+1);yield t.mkdir(e);return}default:{let r;try{r=yield t.stat(e)}catch(e){throw n}if(!r.isDirectory())throw n}}}})}t.mkdirP=mkdirP;function tryGetExecutablePath(e,r){return n(this,void 0,void 0,function*(){let n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){const t=a.extname(e).toUpperCase();if(r.some(e=>e.toUpperCase()===t)){return e}}else{if(isUnixExecutable(n)){return e}}}const i=e;for(const s of r){e=i+s;n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){try{const r=a.dirname(e);const n=a.basename(e).toUpperCase();for(const i of yield t.readdir(r)){if(n===i.toUpperCase()){e=a.join(r,i);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""})}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}},702:function(e,t,r){"use strict";const n=r(612);const i=Symbol("max");const s=Symbol("length");const o=Symbol("lengthCalculator");const a=Symbol("allowStale");const l=Symbol("maxAge");const c=Symbol("dispose");const u=Symbol("noDisposeOnSet");const f=Symbol("lruList");const h=Symbol("cache");const p=Symbol("updateAgeOnGet");const d=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[i]=e.max||Infinity;const r=e.length||d;this[o]=typeof r!=="function"?d:r;this[a]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0;this[c]=e.dispose;this[u]=e.noDisposeOnSet||false;this[p]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||Infinity;y(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[l]=e;y(this)}get maxAge(){return this[l]}set lengthCalculator(e){if(typeof e!=="function")e=d;if(e!==this[o]){this[o]=e;this[s]=0;this[f].forEach(e=>{e.length=this[o](e.value,e.key);this[s]+=e.length})}y(this)}get lengthCalculator(){return this[o]}get length(){return this[s]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;r!==null;){const n=r.prev;R(this,e,r,t);r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;r!==null;){const n=r.next;R(this,e,r,t);r=n}}keys(){return this[f].toArray().map(e=>e.key)}values(){return this[f].toArray().map(e=>e.value)}reset(){if(this[c]&&this[f]&&this[f].length){this[f].forEach(e=>this[c](e.key,e.value))}this[h]=new Map;this[f]=new n;this[s]=0}dump(){return this[f].map(e=>E(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[f]}set(e,t,r){r=r||this[l];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const n=r?Date.now():0;const a=this[o](t,e);if(this[h].has(e)){if(a>this[i]){g(this,this[h].get(e));return false}const o=this[h].get(e);const l=o.value;if(this[c]){if(!this[u])this[c](e,l.value)}l.now=n;l.maxAge=r;l.value=t;this[s]+=a-l.length;l.length=a;this.get(e);y(this);return true}const p=new Entry(e,t,a,n,r);if(p.length>this[i]){if(this[c])this[c](e,t);return false}this[s]+=p.length;this[f].unshift(p);this[h].set(e,this[f].head);y(this);return true}has(e){if(!this[h].has(e))return false;const t=this[h].get(e).value;return!E(this,t)}get(e){return v(this,e,true)}peek(e){return v(this,e,false)}pop(){const e=this[f].tail;if(!e)return null;g(this,e);return e.value}del(e){g(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r];const i=n.e||0;if(i===0)this.set(n.k,n.v);else{const e=i-t;if(e>0){this.set(n.k,n.v,e)}}}}prune(){this[h].forEach((e,t)=>v(this,t,false))}}const v=(e,t,r)=>{const n=e[h].get(t);if(n){const t=n.value;if(E(e,t)){g(e,n);if(!e[a])return undefined}else{if(r){if(e[p])n.value.now=Date.now();e[f].unshiftNode(n)}}return t.value}};const E=(e,t)=>{if(!t||!t.maxAge&&!e[l])return false;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[l]&&r>e[l]};const y=e=>{if(e[s]>e[i]){for(let t=e[f].tail;e[s]>e[i]&&t!==null;){const r=t.prev;g(e,t);t=r}}};const g=(e,t)=>{if(t){const r=t.value;if(e[c])e[c](r.key,r.value);e[s]-=r.length;e[h].delete(r.key);e[f].removeNode(t)}};class Entry{constructor(e,t,r,n,i){this.key=e;this.value=t;this.length=r;this.now=n;this.maxAge=i||0}}const R=(e,t,r,n)=>{let i=r.value;if(E(e,i)){g(e,r);if(!e[a])i=undefined}if(i)t.call(n,i.value,i.key,e)};e.exports=LRUCache},714:function(e,t,r){const n=r(830);const i=(e,t)=>{const r=n(e,t);return r?r.version:null};e.exports=i},722:function(e){var t=[];for(var r=0;r<256;++r){t[r]=(r+256).toString(16).substr(1)}function bytesToUuid(e,r){var n=r||0;var i=t;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}e.exports=bytesToUuid},729:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const i=r(386);const s=r(835);const o=r(622);const a=r(761);function getUrl(e,t,r){const n=o.posix||o;let i="";if(!t){i=e}else if(!e){i=t}else{const r=s.parse(t);const o=s.parse(e);o.protocol=o.protocol||r.protocol;o.auth=o.auth||r.auth;o.host=o.host||r.host;o.pathname=n.resolve(r.pathname,o.pathname);if(!o.pathname.endsWith("/")&&e.endsWith("/")){o.pathname+="/"}i=s.format(o)}return r?getUrlWithParsedQueryParams(i,r):i}t.getUrl=getUrl;function getUrlWithParsedQueryParams(e,t){const r=e.replace(/\?$/g,"");const n=i.stringify(t.params,buildParamsStringifyOptions(t));return`${r}${n}`}function buildParamsStringifyOptions(e){let t={addQueryPrefix:true,delimiter:(e.options||{}).separator||"&",allowDots:(e.options||{}).shouldAllowDots||false,arrayFormat:(e.options||{}).arrayFormat||"repeat",encodeValuesOnly:(e.options||{}).shouldOnlyEncodeValues||true};return t}function decompressGzippedContent(e,t){return n(this,void 0,void 0,function*(){return new Promise((r,i)=>n(this,void 0,void 0,function*(){a.gunzip(e,function(e,n){if(e){i(e)}r(n.toString(t||"utf-8"))})}))})}t.decompressGzippedContent=decompressGzippedContent;function obtainContentCharset(e){const t=["ascii","utf8","utf16le","ucs2","base64","binary","hex"];const r=e.message.headers["content-type"]||"";const n=r.match(/charset=([^;,\r\n]+)/i);return n&&n[1]&&t.indexOf(n[1])!=-1?n[1]:"utf-8"}t.obtainContentCharset=obtainContentCharset},740:function(e,t,r){const n=r(65);const i=r(124);const s=(e,t,r)=>{let s=null;let o=null;let a=null;try{a=new i(t,r)}catch(e){return null}e.forEach(e=>{if(a.test(e)){if(!s||o.compare(e)===1){s=e;o=new n(s,r)}}});return s};e.exports=s},744:function(e,t,r){const n=r(65);const i=(e,t)=>new n(e,t).major;e.exports=i},747:function(e){e.exports=require("fs")},752:function(e,t,r){const n=r(298);const i=r(873);const s=r(486);const o=r(167);const a=r(586);const l=r(898);const c=(e,t,r,c)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return n(e,r,c);case"!=":return i(e,r,c);case">":return s(e,r,c);case">=":return o(e,r,c);case"<":return a(e,r,c);case"<=":return l(e,r,c);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=c},755:function(e,t,r){"use strict";var n=r(581);var i=Object.prototype.hasOwnProperty;var s=Array.isArray;var o={allowDots:false,allowPrototypes:false,arrayLimit:20,charset:"utf-8",charsetSentinel:false,comma:false,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:false,interpretNumericEntities:false,parameterLimit:1e3,parseArrays:true,plainObjects:false,strictNullHandling:false};var a=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})};var l=function(e,t){if(e&&typeof e==="string"&&t.comma&&e.indexOf(",")>-1){return e.split(",")}return e};var c="utf8=%26%2310003%3B";var u="utf8=%E2%9C%93";var f=function parseQueryStringValues(e,t){var r={};var f=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;var h=t.parameterLimit===Infinity?undefined:t.parameterLimit;var p=f.split(t.delimiter,h);var d=-1;var v;var E=t.charset;if(t.charsetSentinel){for(v=0;v-1){m=s(m)?[m]:m}if(i.call(r,w)){r[w]=n.combine(r[w],m)}else{r[w]=m}}return r};var h=function(e,t,r,n){var i=n?t:l(t,r);for(var s=e.length-1;s>=0;--s){var o;var a=e[s];if(a==="[]"&&r.parseArrays){o=[].concat(i)}else{o=r.plainObjects?Object.create(null):{};var c=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a;var u=parseInt(c,10);if(!r.parseArrays&&c===""){o={0:i}}else if(!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&(r.parseArrays&&u<=r.arrayLimit)){o=[];o[u]=i}else{o[c]=i}}i=o}return i};var p=function parseQueryStringKeys(e,t,r,n){if(!e){return}var s=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;var o=/(\[[^[\]]*])/;var a=/(\[[^[\]]*])/g;var l=r.depth>0&&o.exec(s);var c=l?s.slice(0,l.index):s;var u=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)){if(!r.allowPrototypes){return}}u.push(c)}var f=0;while(r.depth>0&&(l=a.exec(s))!==null&&f{const n=t.test(e);const i=t.test(r);if(n&&i){e=+e;r=+r}return e===r?0:n&&!i?-1:i&&!n?1:er(t,e);e.exports={compareIdentifiers:r,rcompareIdentifiers:n}},761:function(e){e.exports=require("zlib")},794:function(e){e.exports=require("stream")},803:function(e,t,r){const n=r(65);const i=(e,t)=>new n(e,t).minor;e.exports=i},811:function(e,t,r){const n=r(65);const i=r(124);const s=(e,t,r)=>{let s=null;let o=null;let a=null;try{a=new i(t,r)}catch(e){return null}e.forEach(e=>{if(a.test(e)){if(!s||o.compare(e)===-1){s=e;o=new n(s,r)}}});return s};e.exports=s},822:function(e,t,r){const n=r(830);const i=r(298);const s=(e,t)=>{if(i(e,t)){return null}else{const r=n(e);const i=n(t);const s=r.prerelease.length||i.prerelease.length;const o=s?"pre":"";const a=s?"prerelease":"";for(const e in r){if(e==="major"||e==="minor"||e==="patch"){if(r[e]!==i[e]){return o+e}}}return a}};e.exports=s},826:function(e,t,r){var n=r(139);var i=r(722);function v4(e,t,r){var s=t&&r||0;if(typeof e=="string"){t=e==="binary"?new Array(16):null;e=null}e=e||{};var o=e.random||(e.rng||n)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){for(var a=0;a<16;++a){t[s+a]=o[a]}}return t||i(o)}e.exports=v4},830:function(e,t,r){const{MAX_LENGTH:n}=r(181);const{re:i,t:s}=r(976);const o=r(65);const a=r(143);const l=(e,t)=>{t=a(t);if(e instanceof o){return e}if(typeof e!=="string"){return null}if(e.length>n){return null}const r=t.loose?i[s.LOOSE]:i[s.FULL];if(!r.test(e)){return null}try{return new o(e,t)}catch(e){return null}};e.exports=l},835:function(e){e.exports=require("url")},873:function(e,t,r){const n=r(92);const i=(e,t,r)=>n(e,t,r)!==0;e.exports=i},874:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const i=r(835);const s=r(605);const o=r(211);const a=r(729);let l;let c;var u;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(u=t.HttpCodes||(t.HttpCodes={}));const f=[u.MovedPermanently,u.ResourceMoved,u.SeeOther,u.TemporaryRedirect,u.PermanentRedirect];const h=[u.BadGateway,u.ServiceUnavailable,u.GatewayTimeout];const p=["ECONNRESET","ENOTFOUND","ESOCKETTIMEDOUT","ETIMEDOUT","ECONNREFUSED"];const d=["OPTIONS","GET","DELETE","HEAD"];const v=10;const E=5;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise((e,t)=>n(this,void 0,void 0,function*(){let r=Buffer.alloc(0);const i=a.obtainContentCharset(this);const s=this.message.headers["content-encoding"]||"";const o=new RegExp("(gzip$)|(gzip, *deflate)").test(s);this.message.on("data",function(e){const t=typeof e==="string"?Buffer.from(e,i):e;r=Buffer.concat([r,t])}).on("end",function(){return n(this,void 0,void 0,function*(){if(o){const t=yield a.decompressGzippedContent(r,i);e(t)}else{e(r.toString(i))}})}).on("error",function(e){t(e)})}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=i.parse(e);return t.protocol==="https:"}t.isHttps=isHttps;var y;(function(e){e["HTTP_PROXY"]="HTTP_PROXY";e["HTTPS_PROXY"]="HTTPS_PROXY";e["NO_PROXY"]="NO_PROXY"})(y||(y={}));class HttpClient{constructor(e,t,n){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];let i=process.env[y.NO_PROXY];if(i){this._httpProxyBypassHosts=[];i.split(",").forEach(e=>{this._httpProxyBypassHosts.push(new RegExp(e,"i"))})}this.requestOptions=n;if(n){if(n.ignoreSslError!=null){this._ignoreSslError=n.ignoreSslError}this._socketTimeout=n.socketTimeout;this._httpProxy=n.proxy;if(n.proxy&&n.proxy.proxyBypassHosts){this._httpProxyBypassHosts=[];n.proxy.proxyBypassHosts.forEach(e=>{this._httpProxyBypassHosts.push(new RegExp(e,"i"))})}this._certConfig=n.cert;if(this._certConfig){l=r(747);if(this._certConfig.caFile&&l.existsSync(this._certConfig.caFile)){this._ca=l.readFileSync(this._certConfig.caFile,"utf8")}if(this._certConfig.certFile&&l.existsSync(this._certConfig.certFile)){this._cert=l.readFileSync(this._certConfig.certFile,"utf8")}if(this._certConfig.keyFile&&l.existsSync(this._certConfig.keyFile)){this._key=l.readFileSync(this._certConfig.keyFile,"utf8")}}if(n.allowRedirects!=null){this._allowRedirects=n.allowRedirects}if(n.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=n.allowRedirectDowngrade}if(n.maxRedirects!=null){this._maxRedirects=Math.max(n.maxRedirects,0)}if(n.keepAlive!=null){this._keepAlive=n.keepAlive}if(n.allowRetries!=null){this._allowRetries=n.allowRetries}if(n.maxRetries!=null){this._maxRetries=n.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,n){return this.request(e,t,r,n)}request(e,t,r,s){return n(this,void 0,void 0,function*(){if(this._disposed){throw new Error("Client has already been disposed.")}let n=i.parse(t);let o=this._prepareRequest(e,n,s);let a=this._allowRetries&&d.indexOf(e)!=-1?this._maxRetries+1:1;let l=0;let c;while(l-1){continue}throw e}if(c&&c.message&&c.message.statusCode===u.Unauthorized){let e;for(let t=0;t0){const a=c.message.headers["location"];if(!a){break}let l=i.parse(a);if(n.protocol=="https:"&&n.protocol!=l.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 c.readBody();o=this._prepareRequest(e,l,s);c=yield this.requestRaw(o,r);t--}if(h.indexOf(c.message.statusCode)==-1){return c}l+=1;if(l{let i=function(e,t){if(e){n(e)}r(t)};this.requestRawWithCallback(e,t,i)})}requestRawWithCallback(e,t,r){let n;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;let s=(e,t)=>{if(!i){i=true;r(e,t)}};let o=e.httpModule.request(e.options,e=>{let t=new HttpClientResponse(e);s(null,t)});o.on("socket",e=>{n=e});o.setTimeout(this._socketTimeout||3*6e4,()=>{if(n){n.destroy()}s(new Error("Request timeout: "+e.options.path),null)});o.on("error",function(e){s(e,null)});if(t&&typeof t==="string"){o.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",function(){o.end()});t.pipe(o)}else{o.end()}}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const a=n.parsedUrl.protocol==="https:";n.httpModule=a?o:s;const l=a?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):l;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers&&!this._isPresigned(i.format(t))){this.handlers.forEach(e=>{e.prepareRequest(n.options)})}return n}_isPresigned(e){if(this.requestOptions&&this.requestOptions.presignedUrlPatterns){const t=this.requestOptions.presignedUrlPatterns;for(let r=0;rObject.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},t(this.requestOptions.headers),t(e))}return t(e||{})}_getAgent(e){let t;let n=this._getProxy(e);let i=n.proxyUrl&&n.proxyUrl.hostname&&!this._isMatchInBypassProxyList(e);if(this._keepAlive&&i){t=this._proxyAgent}if(this._keepAlive&&!i){t=this._agent}if(!!t){return t}const a=e.protocol==="https:";let l=100;if(!!this.requestOptions){l=this.requestOptions.maxSockets||s.globalAgent.maxSockets}if(i){if(!c){c=r(413)}const e={maxSockets:l,keepAlive:this._keepAlive,proxy:{proxyAuth:n.proxyAuth,host:n.proxyUrl.hostname,port:n.proxyUrl.port}};let i;const s=n.proxyUrl.protocol==="https:";if(a){i=s?c.httpsOverHttps:c.httpsOverHttp}else{i=s?c.httpOverHttps:c.httpOverHttp}t=i(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:l};t=a?new o.Agent(e):new s.Agent(e);this._agent=t}if(!t){t=a?o.globalAgent:s.globalAgent}if(a&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}if(a&&this._certConfig){t.options=Object.assign(t.options||{},{ca:this._ca,cert:this._cert,key:this._key,passphrase:this._certConfig.passphrase})}return t}_getProxy(e){let t=e.protocol==="https:";let r=this._httpProxy;let n=process.env[y.HTTPS_PROXY];let s=process.env[y.HTTP_PROXY];if(!r){if(n&&t){r={proxyUrl:n}}else if(s){r={proxyUrl:s}}}let o;let a;if(r){if(r.proxyUrl.length>0){o=i.parse(r.proxyUrl)}if(r.proxyUsername||r.proxyPassword){a=r.proxyUsername+":"+r.proxyPassword}}return{proxyUrl:o,proxyAuth:a}}_isMatchInBypassProxyList(e){if(!this._httpProxyBypassHosts){return false}let t=false;this._httpProxyBypassHosts.forEach(r=>{if(r.test(e.href)){t=true}});return t}_performExponentialBackoff(e){e=Math.min(v,e);const t=E*Math.pow(2,e);return new Promise(e=>setTimeout(()=>e(),t))}}t.HttpClient=HttpClient},876:function(e,t,r){const n=r(976);e.exports={re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r(181).SEMVER_SPEC_VERSION,SemVer:r(65),compareIdentifiers:r(760).compareIdentifiers,rcompareIdentifiers:r(760).rcompareIdentifiers,parse:r(830),valid:r(714),clean:r(503),inc:r(928),diff:r(822),major:r(744),minor:r(803),patch:r(489),prerelease:r(968),compare:r(92),rcompare:r(630),compareLoose:r(283),compareBuild:r(465),sort:r(120),rsort:r(593),gt:r(486),lt:r(586),eq:r(298),neq:r(873),gte:r(167),lte:r(898),cmp:r(752),coerce:r(499),Comparator:r(174),Range:r(124),satisfies:r(310),toComparators:r(219),maxSatisfying:r(811),minSatisfying:r(740),minVersion:r(164),validRange:r(480),outside:r(462),gtr:r(531),ltr:r(323),intersects:r(259),simplifyRange:r(877),subset:r(999)}},877:function(e,t,r){const n=r(310);const i=r(92);e.exports=((e,t,r)=>{const s=[];let o=null;let a=null;const l=e.sort((e,t)=>i(e,t,r));for(const e of l){const i=n(e,t,r);if(i){a=e;if(!o)o=e}else{if(a){s.push([o,a])}a=null;o=null}}if(o)s.push([o,null]);const c=[];for(const[e,t]of s){if(e===t)c.push(e);else if(!t&&e===l[0])c.push("*");else if(!t)c.push(`>=${e}`);else if(e===l[0])c.push(`<=${t}`);else c.push(`${e} - ${t}`)}const u=c.join(" || ");const f=typeof t.raw==="string"?t.raw:String(t);return u.length0?R.join(",")||null:undefined}]}else if(a(l)){O=l}else{var S=Object.keys(R);O=u?S.sort(u):S}for(var T=0;T0?y+E:""}},898:function(e,t,r){const n=r(92);const i=(e,t,r)=>n(e,t,r)<=0;e.exports=i},928:function(e,t,r){const n=r(65);const i=(e,t,r,i)=>{if(typeof r==="string"){i=r;r=undefined}try{return new n(e,r).inc(t,i).version}catch(e){return null}};e.exports=i},950:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function getProxyUrl(e){let t=e.protocol==="https:";let r;if(checkBypass(e)){return r}let n;if(t){n=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{n=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(n){r=new URL(n)}return r}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}let t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let r;if(e.port){r=Number(e.port)}else if(e.protocol==="http:"){r=80}else if(e.protocol==="https:"){r=443}let n=[e.hostname.toUpperCase()];if(typeof r==="number"){n.push(`${n[0]}:${r}`)}for(let e of t.split(",").map(e=>e.trim().toUpperCase()).filter(e=>e)){if(n.some(t=>t===e)){return true}}return false}t.checkBypass=checkBypass},968:function(e,t,r){const n=r(830);const i=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null};e.exports=i},976:function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n}=r(181);const i=r(548);t=e.exports={};const s=t.re=[];const o=t.src=[];const a=t.t={};let l=0;const c=(e,t,r)=>{const n=l++;i(n,t);a[e]=n;o[n]=t;s[n]=new RegExp(t,r?"g":undefined)};c("NUMERICIDENTIFIER","0|[1-9]\\d*");c("NUMERICIDENTIFIERLOOSE","[0-9]+");c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");c("MAINVERSION",`(${o[a.NUMERICIDENTIFIER]})\\.`+`(${o[a.NUMERICIDENTIFIER]})\\.`+`(${o[a.NUMERICIDENTIFIER]})`);c("MAINVERSIONLOOSE",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[a.NUMERICIDENTIFIERLOOSE]})`);c("PRERELEASEIDENTIFIER",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`);c("PRERELEASEIDENTIFIERLOOSE",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`);c("PRERELEASE",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\.${o[a.PRERELEASEIDENTIFIER]})*))`);c("PRERELEASELOOSE",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`);c("BUILDIDENTIFIER","[0-9A-Za-z-]+");c("BUILD",`(?:\\+(${o[a.BUILDIDENTIFIER]}(?:\\.${o[a.BUILDIDENTIFIER]})*))`);c("FULLPLAIN",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`);c("FULL",`^${o[a.FULLPLAIN]}$`);c("LOOSEPLAIN",`[v=\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`);c("LOOSE",`^${o[a.LOOSEPLAIN]}$`);c("GTLT","((?:<|>)?=?)");c("XRANGEIDENTIFIERLOOSE",`${o[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);c("XRANGEIDENTIFIER",`${o[a.NUMERICIDENTIFIER]}|x|X|\\*`);c("XRANGEPLAIN",`[v=\\s]*(${o[a.XRANGEIDENTIFIER]})`+`(?:\\.(${o[a.XRANGEIDENTIFIER]})`+`(?:\\.(${o[a.XRANGEIDENTIFIER]})`+`(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?`+`)?)?`);c("XRANGEPLAINLOOSE",`[v=\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?`+`)?)?`);c("XRANGE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAIN]}$`);c("XRANGELOOSE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAINLOOSE]}$`);c("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${n}})`+`(?:\\.(\\d{1,${n}}))?`+`(?:\\.(\\d{1,${n}}))?`+`(?:$|[^\\d])`);c("COERCERTL",o[a.COERCE],true);c("LONETILDE","(?:~>?)");c("TILDETRIM",`(\\s*)${o[a.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";c("TILDE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`);c("TILDELOOSE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`);c("LONECARET","(?:\\^)");c("CARETTRIM",`(\\s*)${o[a.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";c("CARET",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`);c("CARETLOOSE",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`);c("COMPARATORLOOSE",`^${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]})$|^$`);c("COMPARATOR",`^${o[a.GTLT]}\\s*(${o[a.FULLPLAIN]})$|^$`);c("COMPARATORTRIM",`(\\s*)${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";c("HYPHENRANGE",`^\\s*(${o[a.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${o[a.XRANGEPLAIN]})`+`\\s*$`);c("HYPHENRANGELOOSE",`^\\s*(${o[a.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${o[a.XRANGEPLAINLOOSE]})`+`\\s*$`);c("STAR","(<|>)?=?\\s*\\*");c("GTE0","^\\s*>=\\s*0.0.0\\s*$");c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},979:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=i(r(470));class RetryHelper{constructor(e,t,r){if(e<1){throw new Error("max attempts should be greater than or equal to 1")}this.maxAttempts=e;this.minSeconds=Math.floor(t);this.maxSeconds=Math.floor(r);if(this.minSeconds>this.maxSeconds){throw new Error("min seconds should be less than or equal to max seconds")}}execute(e,t){return n(this,void 0,void 0,function*(){let r=1;while(rsetTimeout(t,e*1e3))})}}t.RetryHelper=RetryHelper},986:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=i(r(9));function exec(e,t,r){return n(this,void 0,void 0,function*(){const n=s.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const i=n[0];t=n.slice(1).concat(t||[]);const o=new s.ToolRunner(i,t,r);return o.exec()})}t.exec=exec},999:function(e,t,r){const n=r(124);const{ANY:i}=r(174);const s=r(310);const o=r(92);const a=(e,t,r)=>{if(e===t)return true;e=new n(e,r);t=new n(t,r);let i=false;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);i=i||t!==null;if(t)continue e}if(i)return false}return true};const l=(e,t,r)=>{if(e===t)return true;if(e.length===1&&e[0].semver===i)return t.length===1&&t[0].semver===i;const n=new Set;let a,l;for(const t of e){if(t.operator===">"||t.operator===">=")a=c(a,t,r);else if(t.operator==="<"||t.operator==="<=")l=u(l,t,r);else n.add(t.semver)}if(n.size>1)return null;let f;if(a&&l){f=o(a.semver,l.semver,r);if(f>0)return null;else if(f===0&&(a.operator!==">="||l.operator!=="<="))return null}for(const e of n){if(a&&!s(e,String(a),r))return null;if(l&&!s(e,String(l),r))return null;for(const n of t){if(!s(e,String(n),r))return false}return true}let h,p;let d,v;for(const e of t){v=v||e.operator===">"||e.operator===">=";d=d||e.operator==="<"||e.operator==="<=";if(a){if(e.operator===">"||e.operator===">="){h=c(a,e,r);if(h===e&&h!==a)return false}else if(a.operator===">="&&!s(a.semver,String(e),r))return false}if(l){if(e.operator==="<"||e.operator==="<="){p=u(l,e,r);if(p===e&&p!==l)return false}else if(l.operator==="<="&&!s(l.semver,String(e),r))return false}if(!e.operator&&(l||a)&&f!==0)return false}if(a&&d&&!l&&f!==0)return false;if(l&&v&&!a&&f!==0)return false;return true};const c=(e,t,r)=>{if(!e)return t;const n=o(e.semver,t.semver,r);return n>0?e:n<0?t:t.operator===">"&&e.operator===">="?t:e};const u=(e,t,r)=>{if(!e)return t;const n=o(e.semver,t.semver,r);return n<0?e:n>0?t:t.operator==="<"&&e.operator==="<="?t:e};e.exports=a}}); \ No newline at end of file +module.exports=function(e,t){"use strict";var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var n=r[t]={i:t,l:false,exports:{}};var i=true;try{e[t].call(n.exports,n,n.exports,__webpack_require__);i=false}finally{if(i)delete r[t]}n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(325)}return startup()}({1:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const i=r(129);const s=r(622);const o=r(669);const a=r(672);const l=o.promisify(i.exec);function cp(e,t,r={}){return n(this,void 0,void 0,function*(){const{force:n,recursive:i}=readCopyOptions(r);const o=(yield a.exists(t))?yield a.stat(t):null;if(o&&o.isFile()&&!n){return}const l=o&&o.isDirectory()?s.join(t,s.basename(e)):t;if(!(yield a.exists(e))){throw new Error(`no such file or directory: ${e}`)}const c=yield a.stat(e);if(c.isDirectory()){if(!i){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,l,0,n)}}else{if(s.relative(e,l)===""){throw new Error(`'${l}' and '${e}' are the same file`)}yield copyFile(e,l,n)}})}t.cp=cp;function mv(e,t,r={}){return n(this,void 0,void 0,function*(){if(yield a.exists(t)){let n=true;if(yield a.isDirectory(t)){t=s.join(t,s.basename(e));n=yield a.exists(t)}if(n){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(s.dirname(t));yield a.rename(e,t)})}t.mv=mv;function rmRF(e){return n(this,void 0,void 0,function*(){if(a.IS_WINDOWS){try{if(yield a.isDirectory(e,true)){yield l(`rd /s /q "${e}"`)}else{yield l(`del /f /a "${e}"`)}}catch(e){if(e.code!=="ENOENT")throw e}try{yield a.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield a.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield l(`rm -rf "${e}"`)}else{yield a.unlink(e)}}})}t.rmRF=rmRF;function mkdirP(e){return n(this,void 0,void 0,function*(){yield a.mkdirP(e)})}t.mkdirP=mkdirP;function which(e,t){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(a.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}}try{const t=[];if(a.IS_WINDOWS&&process.env.PATHEXT){for(const e of process.env.PATHEXT.split(s.delimiter)){if(e){t.push(e)}}}if(a.isRooted(e)){const r=yield a.tryGetExecutablePath(e,t);if(r){return r}return""}if(e.includes("/")||a.IS_WINDOWS&&e.includes("\\")){return""}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(s.delimiter)){if(e){r.push(e)}}}for(const n of r){const r=yield a.tryGetExecutablePath(n+s.sep+e,t);if(r){return r}}return""}catch(e){throw new Error(`which failed with message ${e.message}`)}})}t.which=which;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);return{force:t,recursive:r}}function cpDirRecursive(e,t,r,i){return n(this,void 0,void 0,function*(){if(r>=255)return;r++;yield mkdirP(t);const n=yield a.readdir(e);for(const s of n){const n=`${e}/${s}`;const o=`${t}/${s}`;const l=yield a.lstat(n);if(l.isDirectory()){yield cpDirRecursive(n,o,r,i)}else{yield copyFile(n,o,i)}}yield a.chmod(t,(yield a.stat(e)).mode)})}function copyFile(e,t,r){return n(this,void 0,void 0,function*(){if((yield a.lstat(e)).isSymbolicLink()){try{yield a.lstat(t);yield a.unlink(t)}catch(e){if(e.code==="EPERM"){yield a.chmod(t,"0666");yield a.unlink(t)}}const r=yield a.readlink(e);yield a.symlink(r,t,a.IS_WINDOWS?"junction":null)}else if(!(yield a.exists(t))||r){yield a.copyFile(e,t)}})}},9:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=i(r(87));const o=i(r(614));const a=i(r(129));const l=i(r(622));const c=i(r(1));const u=i(r(672));const f=process.platform==="win32";class ToolRunner extends o.EventEmitter{constructor(e,t,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=t||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,t){const r=this._getSpawnFileName();const n=this._getSpawnArgs(e);let i=t?"":"[command]";if(f){if(this._isCmdFile()){i+=r;for(const e of n){i+=` ${e}`}}else if(e.windowsVerbatimArguments){i+=`"${r}"`;for(const e of n){i+=` ${e}`}}else{i+=this._windowsQuoteCmdArg(r);for(const e of n){i+=` ${this._windowsQuoteCmdArg(e)}`}}}else{i+=r;for(const e of n){i+=` ${e}`}}return i}_processLineBuffer(e,t,r){try{let n=t+e.toString();let i=n.indexOf(s.EOL);while(i>-1){const e=n.substring(0,i);r(e);n=n.substring(i+s.EOL.length);i=n.indexOf(s.EOL)}t=n}catch(e){this._debug(`error processing line. Failed with error ${e}`)}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){t+=" ";t+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}t+='"';return[t]}}return this.args}_endsWith(e,t){return e.endsWith(t)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const t=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const n of e){if(t.some(e=>e===n)){r=true;break}}if(!r){return e}let n='"';let i=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(i&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){i=true;n+='"'}else{i=false}}n+='"';return n.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let t='"';let r=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(r&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){r=true;t+="\\"}else{r=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${t}"`}return r}exec(){return n(this,void 0,void 0,function*(){if(!u.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=l.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield c.which(this.toolPath,true);return new Promise((e,t)=>{this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+s.EOL)}const n=new ExecState(r,this.toolPath);n.on("debug",e=>{this._debug(e)});const i=this._getSpawnFileName();const o=a.spawn(i,this._getSpawnArgs(r),this._getSpawnOptions(this.options,i));const l="";if(o.stdout){o.stdout.on("data",e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}this._processLineBuffer(e,l,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}const c="";if(o.stderr){o.stderr.on("data",e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const t=r.failOnStdErr?r.errStream:r.outStream;t.write(e)}this._processLineBuffer(e,c,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}o.on("error",e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()});o.on("exit",e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()});o.on("close",e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()});n.on("done",(r,n)=>{if(l.length>0){this.emit("stdline",l)}if(c.length>0){this.emit("errline",c)}o.removeAllListeners();if(r){t(r)}else{e(n)}});if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}})})}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let r=false;let n=false;let i="";function append(e){if(n&&e!=='"'){i+="\\"}i+=e;n=false}for(let s=0;s0){t.push(i);i=""}continue}append(o)}if(i.length>0){t.push(i.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends o.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(t)}e._setResult()}}},13:function(e){"use strict";var t=String.prototype.replace;var r=/%20/g;var n={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports={default:n.RFC3986,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986}},16:function(e){e.exports=require("tls")},31:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=i(r(550));const o=r(470);const a=r(87);const l=r(129);const c=r(747);function _findMatch(t,r,i,l){return n(this,void 0,void 0,function*(){const n=a.platform();let c;let u;let f;for(const a of i){const i=a.version;o.debug(`check ${i} satisfies ${t}`);if(s.satisfies(i,t)&&(!r||a.stable===r)){f=a.files.find(t=>{o.debug(`${t.arch}===${l} && ${t.platform}===${n}`);let r=t.arch===l&&t.platform===n;if(r&&t.platform_version){const n=e.exports._getOsVersion();if(n===t.platform_version){r=true}else{r=s.satisfies(n,t.platform_version)}}return r});if(f){o.debug(`matched ${a.version}`);u=a;break}}}if(u&&f){c=Object.assign({},u);c.files=[f]}return c})}t._findMatch=_findMatch;function _getOsVersion(){const t=a.platform();let r="";if(t==="darwin"){r=l.execSync("sw_vers -productVersion").toString()}else if(t==="linux"){const t=e.exports._readLinuxVersionFile();if(t){const e=t.split("\n");for(const t of e){const e=t.split("=");if(e.length===2&&e[0].trim()==="DISTRIB_RELEASE"){r=e[1].trim();break}}}}return r}t._getOsVersion=_getOsVersion;function _readLinuxVersionFile(){const e="/etc/lsb-release";let t="";if(c.existsSync(e)){t=c.readFileSync(e).toString()}return t}t._readLinuxVersionFile=_readLinuxVersionFile},52:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var a=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(t){return step([e,t])}}function step(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(s=o[0]&2?i["return"]:o[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;if(i=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;i=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]i){throw new TypeError(`version is longer than ${i} characters`)}n("SemVer",e,t);this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!r){throw new TypeError(`Invalid Version: ${e}`)}this.raw=e;this.major=+r[1];this.minor=+r[2];this.patch=+r[3];if(this.major>s||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>s||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>s||this.patch<0){throw new TypeError("Invalid patch version")}if(!r[4]){this.prerelease=[]}else{this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0){if(typeof this.prerelease[e]==="number"){this.prerelease[e]++;e=-2}}if(e===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error(`invalid increment argument: ${e}`)}this.format();this.raw=this.version;return this}}e.exports=SemVer},82:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue},87:function(e){e.exports=require("os")},92:function(e,t,r){const n=r(65);const i=(e,t,r)=>new n(e,r).compare(new n(t,r));e.exports=i},102:function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(747));const s=n(r(87));const o=r(82);function issueCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!i.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}i.appendFileSync(r,`${o.toCommandValue(t)}${s.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},105:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const i=r(874);const s=r(729);class RestClient{constructor(e,t,r,n){this.client=new i.HttpClient(e,r,n);if(t){this._baseUrl=t}}options(e,t){return n(this,void 0,void 0,function*(){let r=s.getUrl(e,this._baseUrl);let n=yield this.client.options(r,this._headersFromOptions(t));return this.processResponse(n,t)})}get(e,t){return n(this,void 0,void 0,function*(){let r=s.getUrl(e,this._baseUrl,(t||{}).queryParameters);let n=yield this.client.get(r,this._headersFromOptions(t));return this.processResponse(n,t)})}del(e,t){return n(this,void 0,void 0,function*(){let r=s.getUrl(e,this._baseUrl,(t||{}).queryParameters);let n=yield this.client.del(r,this._headersFromOptions(t));return this.processResponse(n,t)})}create(e,t,r){return n(this,void 0,void 0,function*(){let n=s.getUrl(e,this._baseUrl);let i=this._headersFromOptions(r,true);let o=JSON.stringify(t,null,2);let a=yield this.client.post(n,o,i);return this.processResponse(a,r)})}update(e,t,r){return n(this,void 0,void 0,function*(){let n=s.getUrl(e,this._baseUrl);let i=this._headersFromOptions(r,true);let o=JSON.stringify(t,null,2);let a=yield this.client.patch(n,o,i);return this.processResponse(a,r)})}replace(e,t,r){return n(this,void 0,void 0,function*(){let n=s.getUrl(e,this._baseUrl);let i=this._headersFromOptions(r,true);let o=JSON.stringify(t,null,2);let a=yield this.client.put(n,o,i);return this.processResponse(a,r)})}uploadStream(e,t,r,i){return n(this,void 0,void 0,function*(){let n=s.getUrl(t,this._baseUrl);let o=this._headersFromOptions(i,true);let a=yield this.client.sendStream(e,n,r,o);return this.processResponse(a,i)})}_headersFromOptions(e,t){e=e||{};let r=e.additionalHeaders||{};r["Accept"]=e.acceptHeader||"application/json";if(t){let e=false;for(let t in r){if(t.toLowerCase()=="content-type"){e=true}}if(!e){r["Content-Type"]="application/json; charset=utf-8"}}return r}static dateTimeDeserializer(e,t){if(typeof t==="string"){let e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}processResponse(e,t){return n(this,void 0,void 0,function*(){return new Promise((r,s)=>n(this,void 0,void 0,function*(){const n=e.message.statusCode;const o={statusCode:n,result:null,headers:{}};if(n==i.HttpCodes.NotFound){r(o)}let a;let l;try{l=yield e.readBody();if(l&&l.length>0){if(t&&t.deserializeDates){a=JSON.parse(l,RestClient.dateTimeDeserializer)}else{a=JSON.parse(l)}if(t&&t.responseProcessor){o.result=t.responseProcessor(a)}else{o.result=a}}o.headers=e.message.headers}catch(e){}if(n>299){let e;if(a&&a.message){e=a.message}else if(l&&l.length>0){e=l}else{e="Failed request: ("+n+")"}let t=new Error(e);t["statusCode"]=n;if(o.result){t["result"]=o.result}s(t)}else{r(o)}}))})}}t.RestClient=RestClient},120:function(e,t,r){const n=r(465);const i=(e,t)=>e.sort((e,r)=>n(e,r,t));e.exports=i},124:function(e,t,r){class Range{constructor(e,t){t=s(t);if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof o){this.raw=e.value;this.set=[[e]];this.format();return this}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length);if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${e}`)}if(this.set.length>1){const e=this.set[0];this.set=this.set.filter(e=>!d(e[0]));if(this.set.length===0)this.set=[e];else if(this.set.length>1){for(const e of this.set){if(e.length===1&&v(e[0])){this.set=[e];break}}}}this.format()}format(){this.range=this.set.map(e=>{return e.join(" ").trim()}).join("||").trim();return this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=Object.keys(this.options).join(",");const r=`parseRange:${t}:${e}`;const n=i.get(r);if(n)return n;const s=this.options.loose;const l=s?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(l,_(this.options.includePrerelease));a("hyphen replace",e);e=e.replace(c[u.COMPARATORTRIM],f);a("comparator trim",e,c[u.COMPARATORTRIM]);e=e.replace(c[u.TILDETRIM],h);e=e.replace(c[u.CARETTRIM],p);e=e.split(/\s+/).join(" ");const v=s?c[u.COMPARATORLOOSE]:c[u.COMPARATOR];const E=e.split(" ").map(e=>y(e,this.options)).join(" ").split(/\s+/).map(e=>A(e,this.options)).filter(this.options.loose?e=>!!e.match(v):()=>true).map(e=>new o(e,this.options));const g=E.length;const R=new Map;for(const e of E){if(d(e))return[e];R.set(e.value,e)}if(R.size>1&&R.has(""))R.delete("");const w=[...R.values()];i.set(r,w);return w}intersects(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(r=>{return E(r,t)&&e.set.some(e=>{return E(e,t)&&r.every(r=>{return e.every(e=>{return r.intersects(e,t)})})})})}test(e){if(!e){return false}if(typeof e==="string"){try{e=new l(e,this.options)}catch(e){return false}}for(let t=0;te.value==="<0.0.0-0";const v=e=>e.value==="";const E=(e,t)=>{let r=true;const n=e.slice();let i=n.pop();while(r&&n.length){r=n.every(e=>{return i.intersects(e,t)});i=n.pop()}return r};const y=(e,t)=>{a("comp",e,t);e=m(e,t);a("caret",e);e=R(e,t);a("tildes",e);e=S(e,t);a("xrange",e);e=I(e,t);a("stars",e);return e};const g=e=>!e||e.toLowerCase()==="x"||e==="*";const R=(e,t)=>e.trim().split(/\s+/).map(e=>{return w(e,t)}).join(" ");const w=(e,t)=>{const r=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(r,(t,r,n,i,s)=>{a("tilde",e,t,r,n,i,s);let o;if(g(r)){o=""}else if(g(n)){o=`>=${r}.0.0 <${+r+1}.0.0-0`}else if(g(i)){o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`}else if(s){a("replaceTilde pr",s);o=`>=${r}.${n}.${i}-${s} <${r}.${+n+1}.0-0`}else{o=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`}a("tilde return",o);return o})};const m=(e,t)=>e.trim().split(/\s+/).map(e=>{return O(e,t)}).join(" ");const O=(e,t)=>{a("caret",e,t);const r=t.loose?c[u.CARETLOOSE]:c[u.CARET];const n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,s,o)=>{a("caret",e,t,r,i,s,o);let l;if(g(r)){l=""}else if(g(i)){l=`>=${r}.0.0${n} <${+r+1}.0.0-0`}else if(g(s)){if(r==="0"){l=`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`}else{l=`>=${r}.${i}.0${n} <${+r+1}.0.0-0`}}else if(o){a("replaceCaret pr",o);if(r==="0"){if(i==="0"){l=`>=${r}.${i}.${s}-${o} <${r}.${i}.${+s+1}-0`}else{l=`>=${r}.${i}.${s}-${o} <${r}.${+i+1}.0-0`}}else{l=`>=${r}.${i}.${s}-${o} <${+r+1}.0.0-0`}}else{a("no pr");if(r==="0"){if(i==="0"){l=`>=${r}.${i}.${s}${n} <${r}.${i}.${+s+1}-0`}else{l=`>=${r}.${i}.${s}${n} <${r}.${+i+1}.0-0`}}else{l=`>=${r}.${i}.${s} <${+r+1}.0.0-0`}}a("caret return",l);return l})};const S=(e,t)=>{a("replaceXRanges",e,t);return e.split(/\s+/).map(e=>{return T(e,t)}).join(" ")};const T=(e,t)=>{e=e.trim();const r=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(r,(r,n,i,s,o,l)=>{a("xRange",e,r,n,i,s,o,l);const c=g(i);const u=c||g(s);const f=u||g(o);const h=f;if(n==="="&&h){n=""}l=t.includePrerelease?"-0":"";if(c){if(n===">"||n==="<"){r="<0.0.0-0"}else{r="*"}}else if(n&&h){if(u){s=0}o=0;if(n===">"){n=">=";if(u){i=+i+1;s=0;o=0}else{s=+s+1;o=0}}else if(n==="<="){n="<";if(u){i=+i+1}else{s=+s+1}}if(n==="<")l="-0";r=`${n+i}.${s}.${o}${l}`}else if(u){r=`>=${i}.0.0${l} <${+i+1}.0.0-0`}else if(f){r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`}a("xRange return",r);return r})};const I=(e,t)=>{a("replaceStars",e,t);return e.trim().replace(c[u.STAR],"")};const A=(e,t)=>{a("replaceGTE0",e,t);return e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")};const _=e=>(t,r,n,i,s,o,a,l,c,u,f,h,p)=>{if(g(n)){r=""}else if(g(i)){r=`>=${n}.0.0${e?"-0":""}`}else if(g(s)){r=`>=${n}.${i}.0${e?"-0":""}`}else if(o){r=`>=${r}`}else{r=`>=${r}${e?"-0":""}`}if(g(c)){l=""}else if(g(u)){l=`<${+c+1}.0.0-0`}else if(g(f)){l=`<${c}.${+u+1}.0-0`}else if(h){l=`<=${c}.${u}.${f}-${h}`}else if(e){l=`<${c}.${u}.${+f+1}-0`}else{l=`<=${l}`}return`${r} ${l}`.trim()};const x=(e,t,r)=>{for(let r=0;r0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch){return true}}}return false}return true}},129:function(e){e.exports=require("child_process")},139:function(e,t,r){var n=r(417);e.exports=function nodeRNG(){return n.randomBytes(16)}},141:function(e,t,r){"use strict";var n=r(631);var i=r(16);var s=r(605);var o=r(211);var a=r(614);var l=r(357);var c=r(669);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=s.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||s.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",function onFree(e,r,n,i){var s=toOptions(r,n,i);for(var o=0,a=t.requests.length;o=this.maxSockets){i.requests.push(s);return}i.createSocket(s,function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){i.emit("free",t,s)}function onCloseOrRemove(e){i.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}})};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var n={};r.sockets.push(n);var i=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){i.localAddress=e.localAddress}if(i.proxyAuth){i.headers=i.headers||{};i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")}u("making CONNECT request");var s=r.request(i);s.useChunkedEncodingByDefault=false;s.once("response",onResponse);s.once("upgrade",onUpgrade);s.once("connect",onConnect);s.once("error",onError);s.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick(function(){onConnect(e,t,r)})}function onConnect(i,o,a){s.removeAllListeners();o.removeAllListeners();if(i.statusCode!==200){u("tunneling socket could not be established, statusCode=%d",i.statusCode);o.destroy();var l=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);l.code="ECONNRESET";e.request.emit("error",l);r.removeSocket(n);return}if(a.length>0){u("got illegal response body from proxy");o.destroy();var l=new Error("got illegal response body from proxy");l.code="ECONNRESET";e.request.emit("error",l);r.removeSocket(n);return}u("tunneling connection has established");r.sockets[r.sockets.indexOf(n)]=o;return t(o)}function onError(t){s.removeAllListeners();u("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var i=new Error("tunneling socket could not be established, "+"cause="+t.message);i.code="ECONNRESET";e.request.emit("error",i);r.removeSocket(n)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,function(e){r.request.onSocket(e)})}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,function(n){var s=e.request.getHeader("host");var o=mergeOptions({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):e.host});var a=i.connect(0,o);r.sockets[r.sockets.indexOf(n)]=a;t(a)})}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t!e?{}:typeof e!=="object"?{loose:true}:t.filter(t=>e[t]).reduce((e,t)=>{e[t]=true;return e},{});e.exports=r},164:function(e,t,r){const n=r(65);const i=r(124);const s=r(486);const o=(e,t)=>{e=new i(e,t);let r=new n("0.0.0");if(e.test(r)){return r}r=new n("0.0.0-0");if(e.test(r)){return r}r=null;for(let t=0;t{const t=new n(e.semver.version);switch(e.operator){case">":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!o||s(t,o)){o=t}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}});if(o&&(!r||s(r,o)))r=o}if(r&&e.test(r)){return r}return null};e.exports=o},167:function(e,t,r){const n=r(92);const i=(e,t,r)=>n(e,t,r)>=0;e.exports=i},174:function(e,t,r){const n=Symbol("SemVer ANY");class Comparator{static get ANY(){return n}constructor(e,t){t=i(t);if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}l("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===n){this.value=""}else{this.value=this.operator+this.semver.version}l("comp",this)}parse(e){const t=this.options.loose?s[o.COMPARATORLOOSE]:s[o.COMPARATOR];const r=e.match(t);if(!r){throw new TypeError(`Invalid comparator: ${e}`)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=n}else{this.semver=new c(r[2],this.options.loose)}}toString(){return this.value}test(e){l("Comparator.test",e,this.options.loose);if(this.semver===n||e===n){return true}if(typeof e==="string"){try{e=new c(e,this.options)}catch(e){return false}}return a(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new u(e.value,t).test(this.value)}else if(e.operator===""){if(e.value===""){return true}return new u(this.value,t).test(e.semver)}const r=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");const n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");const i=this.semver.version===e.semver.version;const s=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");const o=a(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<");const l=a(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||n||i&&s||o||l}}e.exports=Comparator;const i=r(143);const{re:s,t:o}=r(976);const a=r(752);const l=r(548);const c=r(65);const u=r(124)},181:function(e){const t="2.0.0";const r=256;const n=Number.MAX_SAFE_INTEGER||9007199254740991;const i=16;e.exports={SEMVER_SPEC_VERSION:t,MAX_LENGTH:r,MAX_SAFE_INTEGER:n,MAX_SAFE_COMPONENT_LENGTH:i}},211:function(e){e.exports=require("https")},219:function(e,t,r){const n=r(124);const i=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "));e.exports=i},259:function(e,t,r){const n=r(124);const i=(e,t,r)=>{e=new n(e,r);t=new n(t,r);return e.intersects(t)};e.exports=i},283:function(e,t,r){const n=r(92);const i=(e,t)=>n(e,t,true);e.exports=i},298:function(e,t,r){const n=r(92);const i=(e,t,r)=>n(e,t,r)===0;e.exports=i},310:function(e,t,r){const n=r(124);const i=(e,t,r)=>{try{t=new n(t,r)}catch(e){return false}return t.test(e)};e.exports=i},323:function(e,t,r){const n=r(462);const i=(e,t,r)=>n(e,t,"<",r);e.exports=i},325:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var a=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function verb(e){return function(t){return step([e,t])}}function step(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(s=o[0]&2?i["return"]:o[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;if(i=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;i=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]1){c.warning("Found "+r.length+" matching packages.");var n=r.filter(function(e){return e.url.match("64")});if(n.length>0){r=n}}var i=r[0].url;var s=r.length;c.debug("Found "+s+" assets for "+process.platform+" with version "+e.name);c.debug("Using asset url "+i);return i}function getArchive(e){return o(this,void 0,void 0,function(){var t;return a(this,function(r){switch(r.label){case 0:return[4,l.downloadTool(e)];case 1:t=r.sent();if(!e.endsWith("zip"))return[3,3];return[4,l.extractZip(t)];case 2:return[2,r.sent()];case 3:if(!e.endsWith("tar.gz"))return[3,5];return[4,l.extractTar(t)];case 4:return[2,r.sent()];case 5:throw new Error("Could not determine filetype of "+e)}})})}function addCMakeToToolCache(e){return o(this,void 0,void 0,function(){var t;return a(this,function(r){switch(r.label){case 0:return[4,getArchive(getURL(e))];case 1:t=r.sent();return[4,l.cacheDir(t,h,e.name)];case 2:return[2,r.sent()]}})})}t.addCMakeToToolCache=addCMakeToToolCache;function getBinDirectoryFrom(e){return o(this,void 0,void 0,function(){var t,r,n;return a(this,function(i){switch(i.label){case 0:return[4,u.promises.readdir(e)];case 1:t=i.sent();if(t.length!=1){throw new Error("Archive does not have expected layout.")}if(!(process.platform==="darwin"))return[3,3];r=f.join(e,t[0]);return[4,u.promises.readdir(r)];case 2:n=i.sent();return[2,f.join(r,n[0],"Contents","bin")];case 3:return[2,f.join(e,t[0],"bin")]}})})}function addCMakeToPath(e){return o(this,void 0,void 0,function(){var t,r,n;return a(this,function(i){switch(i.label){case 0:t=l.find(h,e.name);if(!!t)return[3,2];return[4,addCMakeToToolCache(e)];case 1:t=i.sent();i.label=2;case 2:n=(r=c).addPath;return[4,getBinDirectoryFrom(t)];case 3:return[4,n.apply(r,[i.sent()])];case 4:i.sent();return[2]}})})}t.addCMakeToPath=addCMakeToPath},386:function(e,t,r){"use strict";var n=r(897);var i=r(755);var s=r(13);e.exports={formats:s,parse:i,stringify:n}},396:function(e){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next){yield e.value}}}},413:function(e,t,r){e.exports=r(141)},417:function(e){e.exports=require("crypto")},431:function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const i=n(r(87));const s=r(82);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+i.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const o="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=o+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${o}${escapeData(this.message)}`;return e}}function escapeData(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return s.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},462:function(e,t,r){const n=r(65);const i=r(174);const{ANY:s}=i;const o=r(124);const a=r(310);const l=r(486);const c=r(586);const u=r(898);const f=r(167);const h=(e,t,r,h)=>{e=new n(e,h);t=new o(t,h);let p,d,v,E,y;switch(r){case">":p=l;d=u;v=c;E=">";y=">=";break;case"<":p=c;d=f;v=l;E="<";y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,h)){return false}for(let r=0;r{if(e.semver===s){e=new i(">=0.0.0")}o=o||e;a=a||e;if(p(e.semver,o.semver,h)){o=e}else if(v(e.semver,a.semver,h)){a=e}});if(o.operator===E||o.operator===y){return false}if((!a.operator||a.operator===E)&&d(e,a.semver)){return false}else if(a.operator===y&&v(e,a.semver)){return false}}return true};e.exports=h},465:function(e,t,r){const n=r(65);const i=(e,t,r)=>{const i=new n(e,r);const s=new n(t,r);return i.compare(s)||i.compareBuild(s)};e.exports=i},470:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=r(431);const o=r(102);const a=r(82);const l=i(r(87));const c=i(r(622));var u;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(u=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=a.toCommandValue(t);process.env[e]=r;const n=process.env["GITHUB_ENV"]||"";if(n){const t="_GitHubActionsFileCommandDelimeter_";const n=`${e}<<${t}${l.EOL}${r}${l.EOL}${t}`;o.issueCommand("ENV",n)}else{s.issueCommand("set-env",{name:e},r)}}t.exportVariable=exportVariable;function setSecret(e){s.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){o.issueCommand("PATH",e)}else{s.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${c.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}return r.trim()}t.getInput=getInput;function setOutput(e,t){s.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){s.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=u.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){s.issueCommand("debug",{},e)}t.debug=debug;function error(e){s.issue("error",e instanceof Error?e.toString():e)}t.error=error;function warning(e){s.issue("warning",e instanceof Error?e.toString():e)}t.warning=warning;function info(e){process.stdout.write(e+l.EOL)}t.info=info;function startGroup(e){s.issue("group",e)}t.startGroup=startGroup;function endGroup(){s.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return n(this,void 0,void 0,function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r})}t.group=group;function saveState(e,t){s.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState},480:function(e,t,r){const n=r(124);const i=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}};e.exports=i},486:function(e,t,r){const n=r(92);const i=(e,t,r)=>n(e,t,r)>0;e.exports=i},489:function(e,t,r){const n=r(65);const i=(e,t)=>new n(e,t).patch;e.exports=i},499:function(e,t,r){const n=r(65);const i=r(830);const{re:s,t:o}=r(976);const a=(e,t)=>{if(e instanceof n){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};let r=null;if(!t.rtl){r=e.match(s[o.COERCE])}else{let t;while((t=s[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||t.index+t[0].length!==r.index+r[0].length){r=t}s[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length}s[o.COERCERTL].lastIndex=-1}if(r===null)return null;return i(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};e.exports=a},503:function(e,t,r){const n=r(830);const i=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};e.exports=i},531:function(e,t,r){const n=r(462);const i=(e,t,r)=>n(e,t,">",r);e.exports=i},533:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});const o=i(r(470));const a=i(r(1));const l=i(r(747));const c=i(r(31));const u=i(r(87));const f=i(r(622));const h=i(r(539));const p=i(r(550));const d=i(r(794));const v=i(r(669));const E=s(r(826));const y=r(986);const g=r(357);const R=r(979);class HTTPError extends Error{constructor(e){super(`Unexpected HTTP response: ${e}`);this.httpStatusCode=e;Object.setPrototypeOf(this,new.target.prototype)}}t.HTTPError=HTTPError;const w=process.platform==="win32";const m=process.platform==="darwin";const O="actions/tool-cache";function downloadTool(e,t,r){return n(this,void 0,void 0,function*(){t=t||f.join(_getTempDirectory(),E.default());yield a.mkdirP(f.dirname(t));o.debug(`Downloading ${e}`);o.debug(`Destination ${t}`);const i=3;const s=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10);const l=_getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);const c=new R.RetryHelper(i,s,l);return yield c.execute(()=>n(this,void 0,void 0,function*(){return yield downloadToolAttempt(e,t||"",r)}),e=>{if(e instanceof HTTPError&&e.httpStatusCode){if(e.httpStatusCode<500&&e.httpStatusCode!==408&&e.httpStatusCode!==429){return false}}return true})})}t.downloadTool=downloadTool;function downloadToolAttempt(e,t,r){return n(this,void 0,void 0,function*(){if(l.existsSync(t)){throw new Error(`Destination file path ${t} already exists`)}const n=new h.HttpClient(O,[],{allowRetries:false});let i;if(r){o.debug("set auth");i={authorization:r}}const s=yield n.get(e,i);if(s.message.statusCode!==200){const t=new HTTPError(s.message.statusCode);o.debug(`Failed to download from "${e}". Code(${s.message.statusCode}) Message(${s.message.statusMessage})`);throw t}const c=v.promisify(d.pipeline);const u=_getGlobal("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>s.message);const f=u();let p=false;try{yield c(f,l.createWriteStream(t));o.debug("download complete");p=true;return t}finally{if(!p){o.debug("download failed");try{yield a.rmRF(t)}catch(e){o.debug(`Failed to delete '${t}'. ${e.message}`)}}}})}function extract7z(e,t,r){return n(this,void 0,void 0,function*(){g.ok(w,"extract7z() not supported on current OS");g.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);const n=process.cwd();process.chdir(t);if(r){try{const t=o.isDebug()?"-bb1":"-bb0";const i=["x",t,"-bd","-sccUTF-8",e];const s={silent:true};yield y.exec(`"${r}"`,i,s)}finally{process.chdir(n)}}else{const r=f.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const s=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const o=`& '${r}' -Source '${i}' -Target '${s}'`;const l=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",o];const c={silent:true};try{const e=yield a.which("powershell",true);yield y.exec(`"${e}"`,l,c)}finally{process.chdir(n)}}return t})}t.extract7z=extract7z;function extractTar(e,t,r="xz"){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);o.debug("Checking tar --version");let n="";yield y.exec("tar --version",[],{ignoreReturnCode:true,silent:true,listeners:{stdout:e=>n+=e.toString(),stderr:e=>n+=e.toString()}});o.debug(n.trim());const i=n.toUpperCase().includes("GNU TAR");let s;if(r instanceof Array){s=r}else{s=[r]}if(o.isDebug()&&!r.includes("v")){s.push("-v")}let a=t;let l=e;if(w&&i){s.push("--force-local");a=t.replace(/\\/g,"/");l=e.replace(/\\/g,"/")}if(i){s.push("--warning=no-unknown-keyword")}s.push("-C",a,"-f",l);yield y.exec(`tar`,s);return t})}t.extractTar=extractTar;function extractXar(e,t,r=[]){return n(this,void 0,void 0,function*(){g.ok(m,"extractXar() not supported on current OS");g.ok(e,'parameter "file" is required');t=yield _createExtractFolder(t);let n;if(r instanceof Array){n=r}else{n=[r]}n.push("-x","-C",t,"-f",e);if(o.isDebug()){n.push("-v")}const i=yield a.which("xar",true);yield y.exec(`"${i}"`,_unique(n));return t})}t.extractXar=extractXar;function extractZip(e,t){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'file' is required")}t=yield _createExtractFolder(t);if(w){yield extractZipWin(e,t)}else{yield extractZipNix(e,t)}return t})}t.extractZip=extractZip;function extractZipWin(e,t){return n(this,void 0,void 0,function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,"");const n=t.replace(/'/g,"''").replace(/"|\n|\r/g,"");const i=`$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}')`;const s=yield a.which("powershell",true);const o=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",i];yield y.exec(`"${s}"`,o)})}function extractZipNix(e,t){return n(this,void 0,void 0,function*(){const r=yield a.which("unzip",true);const n=[e];if(!o.isDebug()){n.unshift("-q")}yield y.exec(`"${r}"`,n,{cwd:t})})}function cacheDir(e,t,r,i){return n(this,void 0,void 0,function*(){r=p.clean(r)||r;i=i||u.arch();o.debug(`Caching tool ${t} ${r} ${i}`);o.debug(`source dir: ${e}`);if(!l.statSync(e).isDirectory()){throw new Error("sourceDir is not a directory")}const n=yield _createToolPath(t,r,i);for(const t of l.readdirSync(e)){const r=f.join(e,t);yield a.cp(r,n,{recursive:true})}_completeToolPath(t,r,i);return n})}t.cacheDir=cacheDir;function cacheFile(e,t,r,i,s){return n(this,void 0,void 0,function*(){i=p.clean(i)||i;s=s||u.arch();o.debug(`Caching tool ${r} ${i} ${s}`);o.debug(`source file: ${e}`);if(!l.statSync(e).isFile()){throw new Error("sourceFile is not a file")}const n=yield _createToolPath(r,i,s);const c=f.join(n,t);o.debug(`destination file ${c}`);yield a.cp(e,c);_completeToolPath(r,i,s);return n})}t.cacheFile=cacheFile;function find(e,t,r){if(!e){throw new Error("toolName parameter is required")}if(!t){throw new Error("versionSpec parameter is required")}r=r||u.arch();if(!_isExplicitVersion(t)){const n=findAllVersions(e,r);const i=_evaluateVersions(n,t);t=i}let n="";if(t){t=p.clean(t)||"";const i=f.join(_getCacheDirectory(),e,t,r);o.debug(`checking cache: ${i}`);if(l.existsSync(i)&&l.existsSync(`${i}.complete`)){o.debug(`Found tool in cache ${e} ${t} ${r}`);n=i}else{o.debug("not found")}}return n}t.find=find;function findAllVersions(e,t){const r=[];t=t||u.arch();const n=f.join(_getCacheDirectory(),e);if(l.existsSync(n)){const e=l.readdirSync(n);for(const i of e){if(_isExplicitVersion(i)){const e=f.join(n,i,t||"");if(l.existsSync(e)&&l.existsSync(`${e}.complete`)){r.push(i)}}}}return r}t.findAllVersions=findAllVersions;function getManifestFromRepo(e,t,r,i="master"){return n(this,void 0,void 0,function*(){let n=[];const s=`https://api.github.com/repos/${e}/${t}/git/trees/${i}`;const a=new h.HttpClient("tool-cache");const l={};if(r){o.debug("set auth");l.authorization=r}const c=yield a.getJson(s,l);if(!c.result){return n}let u="";for(const e of c.result.tree){if(e.path==="versions-manifest.json"){u=e.url;break}}l["accept"]="application/vnd.github.VERSION.raw";let f=yield(yield a.get(u,l)).readBody();if(f){f=f.replace(/^\uFEFF/,"");try{n=JSON.parse(f)}catch(e){o.debug("Invalid json")}}return n})}t.getManifestFromRepo=getManifestFromRepo;function findFromManifest(e,t,r,i=u.arch()){return n(this,void 0,void 0,function*(){const n=yield c._findMatch(e,t,r,i);return n})}t.findFromManifest=findFromManifest;function _createExtractFolder(e){return n(this,void 0,void 0,function*(){if(!e){e=f.join(_getTempDirectory(),E.default())}yield a.mkdirP(e);return e})}function _createToolPath(e,t,r){return n(this,void 0,void 0,function*(){const n=f.join(_getCacheDirectory(),e,p.clean(t)||t,r||"");o.debug(`destination ${n}`);const i=`${n}.complete`;yield a.rmRF(n);yield a.rmRF(i);yield a.mkdirP(n);return n})}function _completeToolPath(e,t,r){const n=f.join(_getCacheDirectory(),e,p.clean(t)||t,r||"");const i=`${n}.complete`;l.writeFileSync(i,"");o.debug("finished caching tool")}function _isExplicitVersion(e){const t=p.clean(e)||"";o.debug(`isExplicit: ${t}`);const r=p.valid(t)!=null;o.debug(`explicit? ${r}`);return r}function _evaluateVersions(e,t){let r="";o.debug(`evaluating ${e.length} versions`);e=e.sort((e,t)=>{if(p.gt(e,t)){return 1}return-1});for(let n=e.length-1;n>=0;n--){const i=e[n];const s=p.satisfies(i,t);if(s){r=i;break}}if(r){o.debug(`matched: ${r}`)}else{o.debug("match not found")}return r}function _getCacheDirectory(){const e=process.env["RUNNER_TOOL_CACHE"]||"";g.ok(e,"Expected RUNNER_TOOL_CACHE to be defined");return e}function _getTempDirectory(){const e=process.env["RUNNER_TEMP"]||"";g.ok(e,"Expected RUNNER_TEMP to be defined");return e}function _getGlobal(e,t){const r=global[e];return r!==undefined?r:t}function _unique(e){return Array.from(new Set(e))}},539:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(605);const i=r(211);const s=r(950);let o;var a;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(a=t.HttpCodes||(t.HttpCodes={}));var l;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(l=t.Headers||(t.Headers={}));var c;(function(e){e["ApplicationJson"]="application/json"})(c=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){let t=s.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const u=[a.MovedPermanently,a.ResourceMoved,a.SeeOther,a.TemporaryRedirect,a.PermanentRedirect];const f=[a.BadGateway,a.ServiceUnavailable,a.GatewayTimeout];const h=["OPTIONS","GET","DELETE","HEAD"];const p=10;const d=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise(async(e,t)=>{let r=Buffer.alloc(0);this.message.on("data",e=>{r=Buffer.concat([r,e])});this.message.on("end",()=>{e(r.toString())})})}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,n){return this.request(e,t,r,n)}async getJson(e,t={}){t[l.Accept]=this._getExistingOrDefaultHeader(t,l.Accept,c.ApplicationJson);let r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,c.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,c.ApplicationJson);let i=await this.post(e,n,r);return this._processResponse(i,this.requestOptions)}async putJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,c.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,c.ApplicationJson);let i=await this.put(e,n,r);return this._processResponse(i,this.requestOptions)}async patchJson(e,t,r={}){let n=JSON.stringify(t,null,2);r[l.Accept]=this._getExistingOrDefaultHeader(r,l.Accept,c.ApplicationJson);r[l.ContentType]=this._getExistingOrDefaultHeader(r,l.ContentType,c.ApplicationJson);let i=await this.patch(e,n,r);return this._processResponse(i,this.requestOptions)}async request(e,t,r,n){if(this._disposed){throw new Error("Client has already been disposed.")}let i=new URL(t);let s=this._prepareRequest(e,i,n);let o=this._allowRetries&&h.indexOf(e)!=-1?this._maxRetries+1:1;let l=0;let c;while(l0){const o=c.message.headers["location"];if(!o){break}let a=new URL(o);if(i.protocol=="https:"&&i.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.")}await c.readBody();if(a.hostname!==i.hostname){for(let e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}s=this._prepareRequest(e,a,n);c=await this.requestRaw(s,r);t--}if(f.indexOf(c.message.statusCode)==-1){return c}l+=1;if(l{let i=function(e,t){if(e){n(e)}r(t)};this.requestRawWithCallback(e,t,i)})}requestRawWithCallback(e,t,r){let n;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;let s=(e,t)=>{if(!i){i=true;r(e,t)}};let o=e.httpModule.request(e.options,e=>{let t=new HttpClientResponse(e);s(null,t)});o.on("socket",e=>{n=e});o.setTimeout(this._socketTimeout||3*6e4,()=>{if(n){n.end()}s(new Error("Request timeout: "+e.options.path),null)});o.on("error",function(e){s(e,null)});if(t&&typeof t==="string"){o.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",function(){o.end()});t.pipe(o)}else{o.end()}}getAgent(e){let t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const s={};s.parsedUrl=t;const o=s.parsedUrl.protocol==="https:";s.httpModule=o?i:n;const a=o?443:80;s.options={};s.options.host=s.parsedUrl.hostname;s.options.port=s.parsedUrl.port?parseInt(s.parsedUrl.port):a;s.options.path=(s.parsedUrl.pathname||"")+(s.parsedUrl.search||"");s.options.method=e;s.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){s.options.headers["user-agent"]=this.userAgent}s.options.agent=this._getAgent(s.parsedUrl);if(this.handlers){this.handlers.forEach(e=>{e.prepareRequest(s.options)})}return s}_mergeHeaders(e){const t=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},t(this.requestOptions.headers),t(e))}return t(e||{})}_getExistingOrDefaultHeader(e,t,r){const n=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});let i;if(this.requestOptions&&this.requestOptions.headers){i=n(this.requestOptions.headers)[t]}return e[t]||i||r}_getAgent(e){let t;let a=s.getProxyUrl(e);let l=a&&a.hostname;if(this._keepAlive&&l){t=this._proxyAgent}if(this._keepAlive&&!l){t=this._agent}if(!!t){return t}const c=e.protocol==="https:";let u=100;if(!!this.requestOptions){u=this.requestOptions.maxSockets||n.globalAgent.maxSockets}if(l){if(!o){o=r(413)}const e={maxSockets:u,keepAlive:this._keepAlive,proxy:{proxyAuth:`${a.username}:${a.password}`,host:a.hostname,port:a.port}};let n;const i=a.protocol==="https:";if(c){n=i?o.httpsOverHttps:o.httpsOverHttp}else{n=i?o.httpOverHttps:o.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:u};t=c?new i.Agent(e):new n.Agent(e);this._agent=t}if(!t){t=c?i.globalAgent:n.globalAgent}if(c&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(p,e);const t=d*Math.pow(2,e);return new Promise(e=>setTimeout(()=>e(),t))}static dateTimeDeserializer(e,t){if(typeof t==="string"){let e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}async _processResponse(e,t){return new Promise(async(r,n)=>{const i=e.message.statusCode;const s={statusCode:i,result:null,headers:{}};if(i==a.NotFound){r(s)}let o;let l;try{l=await e.readBody();if(l&&l.length>0){if(t&&t.deserializeDates){o=JSON.parse(l,HttpClient.dateTimeDeserializer)}else{o=JSON.parse(l)}s.result=o}s.headers=e.message.headers}catch(e){}if(i>299){let e;if(o&&o.message){e=o.message}else if(l&&l.length>0){e=l}else{e="Failed request: ("+i+")"}let t=new HttpClientError(e,i);t.result=s.result;n(t)}else{r(s)}})}}t.HttpClient=HttpClient},548:function(e){const t=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},550:function(e,t){t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var n=256;var i=Number.MAX_SAFE_INTEGER||9007199254740991;var s=16;var o=t.re=[];var a=t.src=[];var l=t.tokens={};var c=0;function tok(e){l[e]=c++}tok("NUMERICIDENTIFIER");a[l.NUMERICIDENTIFIER]="0|[1-9]\\d*";tok("NUMERICIDENTIFIERLOOSE");a[l.NUMERICIDENTIFIERLOOSE]="[0-9]+";tok("NONNUMERICIDENTIFIER");a[l.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";tok("MAINVERSION");a[l.MAINVERSION]="("+a[l.NUMERICIDENTIFIER]+")\\."+"("+a[l.NUMERICIDENTIFIER]+")\\."+"("+a[l.NUMERICIDENTIFIER]+")";tok("MAINVERSIONLOOSE");a[l.MAINVERSIONLOOSE]="("+a[l.NUMERICIDENTIFIERLOOSE]+")\\."+"("+a[l.NUMERICIDENTIFIERLOOSE]+")\\."+"("+a[l.NUMERICIDENTIFIERLOOSE]+")";tok("PRERELEASEIDENTIFIER");a[l.PRERELEASEIDENTIFIER]="(?:"+a[l.NUMERICIDENTIFIER]+"|"+a[l.NONNUMERICIDENTIFIER]+")";tok("PRERELEASEIDENTIFIERLOOSE");a[l.PRERELEASEIDENTIFIERLOOSE]="(?:"+a[l.NUMERICIDENTIFIERLOOSE]+"|"+a[l.NONNUMERICIDENTIFIER]+")";tok("PRERELEASE");a[l.PRERELEASE]="(?:-("+a[l.PRERELEASEIDENTIFIER]+"(?:\\."+a[l.PRERELEASEIDENTIFIER]+")*))";tok("PRERELEASELOOSE");a[l.PRERELEASELOOSE]="(?:-?("+a[l.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+a[l.PRERELEASEIDENTIFIERLOOSE]+")*))";tok("BUILDIDENTIFIER");a[l.BUILDIDENTIFIER]="[0-9A-Za-z-]+";tok("BUILD");a[l.BUILD]="(?:\\+("+a[l.BUILDIDENTIFIER]+"(?:\\."+a[l.BUILDIDENTIFIER]+")*))";tok("FULL");tok("FULLPLAIN");a[l.FULLPLAIN]="v?"+a[l.MAINVERSION]+a[l.PRERELEASE]+"?"+a[l.BUILD]+"?";a[l.FULL]="^"+a[l.FULLPLAIN]+"$";tok("LOOSEPLAIN");a[l.LOOSEPLAIN]="[v=\\s]*"+a[l.MAINVERSIONLOOSE]+a[l.PRERELEASELOOSE]+"?"+a[l.BUILD]+"?";tok("LOOSE");a[l.LOOSE]="^"+a[l.LOOSEPLAIN]+"$";tok("GTLT");a[l.GTLT]="((?:<|>)?=?)";tok("XRANGEIDENTIFIERLOOSE");a[l.XRANGEIDENTIFIERLOOSE]=a[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";tok("XRANGEIDENTIFIER");a[l.XRANGEIDENTIFIER]=a[l.NUMERICIDENTIFIER]+"|x|X|\\*";tok("XRANGEPLAIN");a[l.XRANGEPLAIN]="[v=\\s]*("+a[l.XRANGEIDENTIFIER]+")"+"(?:\\.("+a[l.XRANGEIDENTIFIER]+")"+"(?:\\.("+a[l.XRANGEIDENTIFIER]+")"+"(?:"+a[l.PRERELEASE]+")?"+a[l.BUILD]+"?"+")?)?";tok("XRANGEPLAINLOOSE");a[l.XRANGEPLAINLOOSE]="[v=\\s]*("+a[l.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+a[l.XRANGEIDENTIFIERLOOSE]+")"+"(?:\\.("+a[l.XRANGEIDENTIFIERLOOSE]+")"+"(?:"+a[l.PRERELEASELOOSE]+")?"+a[l.BUILD]+"?"+")?)?";tok("XRANGE");a[l.XRANGE]="^"+a[l.GTLT]+"\\s*"+a[l.XRANGEPLAIN]+"$";tok("XRANGELOOSE");a[l.XRANGELOOSE]="^"+a[l.GTLT]+"\\s*"+a[l.XRANGEPLAINLOOSE]+"$";tok("COERCE");a[l.COERCE]="(^|[^\\d])"+"(\\d{1,"+s+"})"+"(?:\\.(\\d{1,"+s+"}))?"+"(?:\\.(\\d{1,"+s+"}))?"+"(?:$|[^\\d])";tok("COERCERTL");o[l.COERCERTL]=new RegExp(a[l.COERCE],"g");tok("LONETILDE");a[l.LONETILDE]="(?:~>?)";tok("TILDETRIM");a[l.TILDETRIM]="(\\s*)"+a[l.LONETILDE]+"\\s+";o[l.TILDETRIM]=new RegExp(a[l.TILDETRIM],"g");var u="$1~";tok("TILDE");a[l.TILDE]="^"+a[l.LONETILDE]+a[l.XRANGEPLAIN]+"$";tok("TILDELOOSE");a[l.TILDELOOSE]="^"+a[l.LONETILDE]+a[l.XRANGEPLAINLOOSE]+"$";tok("LONECARET");a[l.LONECARET]="(?:\\^)";tok("CARETTRIM");a[l.CARETTRIM]="(\\s*)"+a[l.LONECARET]+"\\s+";o[l.CARETTRIM]=new RegExp(a[l.CARETTRIM],"g");var f="$1^";tok("CARET");a[l.CARET]="^"+a[l.LONECARET]+a[l.XRANGEPLAIN]+"$";tok("CARETLOOSE");a[l.CARETLOOSE]="^"+a[l.LONECARET]+a[l.XRANGEPLAINLOOSE]+"$";tok("COMPARATORLOOSE");a[l.COMPARATORLOOSE]="^"+a[l.GTLT]+"\\s*("+a[l.LOOSEPLAIN]+")$|^$";tok("COMPARATOR");a[l.COMPARATOR]="^"+a[l.GTLT]+"\\s*("+a[l.FULLPLAIN]+")$|^$";tok("COMPARATORTRIM");a[l.COMPARATORTRIM]="(\\s*)"+a[l.GTLT]+"\\s*("+a[l.LOOSEPLAIN]+"|"+a[l.XRANGEPLAIN]+")";o[l.COMPARATORTRIM]=new RegExp(a[l.COMPARATORTRIM],"g");var h="$1$2$3";tok("HYPHENRANGE");a[l.HYPHENRANGE]="^\\s*("+a[l.XRANGEPLAIN]+")"+"\\s+-\\s+"+"("+a[l.XRANGEPLAIN]+")"+"\\s*$";tok("HYPHENRANGELOOSE");a[l.HYPHENRANGELOOSE]="^\\s*("+a[l.XRANGEPLAINLOOSE]+")"+"\\s+-\\s+"+"("+a[l.XRANGEPLAINLOOSE]+")"+"\\s*$";tok("STAR");a[l.STAR]="(<|>)?=?\\s*\\*";for(var p=0;pn){return null}var r=t.loose?o[l.LOOSE]:o[l.FULL];if(!r.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var r=parse(e,t);return r?r.version:null}t.clean=clean;function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}t.SemVer=SemVer;function SemVer(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===t.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>n){throw new TypeError("version is longer than "+n+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}r("SemVer",e,t);this.options=t;this.loose=!!t.loose;var s=e.trim().match(t.loose?o[l.LOOSE]:o[l.FULL]);if(!s){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+s[1];this.minor=+s[2];this.patch=+s[3];if(this.major>i||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>i||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>i||this.patch<0){throw new TypeError("Invalid patch version")}if(!s[4]){this.prerelease=[]}else{this.prerelease=s[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,n){if(typeof r==="string"){n=r;r=undefined}try{return new SemVer(e,r).inc(t,n).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var n=parse(t);var i="";if(r.prerelease.length||n.prerelease.length){i="pre";var s="prerelease"}for(var o in r){if(o==="major"||o==="minor"||o==="patch"){if(r[o]!==n[o]){return i+o}}}return s}}t.compareIdentifiers=compareIdentifiers;var d=/^[0-9]+$/;function compareIdentifiers(e,t){var r=d.test(e);var n=d.test(t);if(r&&n){e=+e;t=+t}return e===t?0:r&&!n?-1:n&&!r?1:e0}t.lt=lt;function lt(e,t,r){return compare(e,t,r)<0}t.eq=eq;function eq(e,t,r){return compare(e,t,r)===0}t.neq=neq;function neq(e,t,r){return compare(e,t,r)!==0}t.gte=gte;function gte(e,t,r){return compare(e,t,r)>=0}t.lte=lte;function lte(e,t,r){return compare(e,t,r)<=0}t.cmp=cmp;function cmp(e,t,r,n){switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return eq(e,r,n);case"!=":return neq(e,r,n);case">":return gt(e,r,n);case">=":return gte(e,r,n);case"<":return lt(e,r,n);case"<=":return lte(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}t.Comparator=Comparator;function Comparator(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}if(!(this instanceof Comparator)){return new Comparator(e,t)}r("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===v){this.value=""}else{this.value=this.operator+this.semver.version}r("comp",this)}var v={};Comparator.prototype.parse=function(e){var t=this.options.loose?o[l.COMPARATORLOOSE]:o[l.COMPARATOR];var r=e.match(t);if(!r){throw new TypeError("Invalid comparator: "+e)}this.operator=r[1]!==undefined?r[1]:"";if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=v}else{this.semver=new SemVer(r[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){r("Comparator.test",e,this.options.loose);if(this.semver===v||e===v){return true}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}return cmp(e,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}var r;if(this.operator===""){if(this.value===""){return true}r=new Range(e.value,t);return satisfies(this.value,r,t)}else if(e.operator===""){if(e.value===""){return true}r=new Range(this.value,t);return satisfies(e.semver,r,t)}var n=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var s=this.semver.version===e.semver.version;var o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var a=cmp(this.semver,"<",e.semver,t)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var l=cmp(this.semver,">",e.semver,t)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return n||i||s&&o||a||l};t.Range=Range;function Range(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof Comparator){return new Range(e.value,t)}if(!(this instanceof Range)){return new Range(e,t)}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}Range.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?o[l.HYPHENRANGELOOSE]:o[l.HYPHENRANGE];e=e.replace(n,hyphenReplace);r("hyphen replace",e);e=e.replace(o[l.COMPARATORTRIM],h);r("comparator trim",e,o[l.COMPARATORTRIM]);e=e.replace(o[l.TILDETRIM],u);e=e.replace(o[l.CARETTRIM],f);e=e.split(/\s+/).join(" ");var i=t?o[l.COMPARATORLOOSE]:o[l.COMPARATOR];var s=e.split(" ").map(function(e){return parseComparator(e,this.options)},this).join(" ").split(/\s+/);if(this.options.loose){s=s.filter(function(e){return!!e.match(i)})}s=s.map(function(e){return new Comparator(e,this.options)},this);return s};Range.prototype.intersects=function(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(function(r){return isSatisfiable(r,t)&&e.set.some(function(e){return isSatisfiable(e,t)&&r.every(function(r){return e.every(function(e){return r.intersects(e,t)})})})})};function isSatisfiable(e,t){var r=true;var n=e.slice();var i=n.pop();while(r&&n.length){r=n.every(function(e){return i.intersects(e,t)});i=n.pop()}return r}t.toComparators=toComparators;function toComparators(e,t){return new Range(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function parseComparator(e,t){r("comp",e,t);e=replaceCarets(e,t);r("caret",e);e=replaceTildes(e,t);r("tildes",e);e=replaceXRanges(e,t);r("xrange",e);e=replaceStars(e,t);r("stars",e);return e}function isX(e){return!e||e.toLowerCase()==="x"||e==="*"}function replaceTildes(e,t){return e.trim().split(/\s+/).map(function(e){return replaceTilde(e,t)}).join(" ")}function replaceTilde(e,t){var n=t.loose?o[l.TILDELOOSE]:o[l.TILDE];return e.replace(n,function(t,n,i,s,o){r("tilde",e,t,n,i,s,o);var a;if(isX(n)){a=""}else if(isX(i)){a=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(s)){a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"}else if(o){r("replaceTilde pr",o);a=">="+n+"."+i+"."+s+"-"+o+" <"+n+"."+(+i+1)+".0"}else{a=">="+n+"."+i+"."+s+" <"+n+"."+(+i+1)+".0"}r("tilde return",a);return a})}function replaceCarets(e,t){return e.trim().split(/\s+/).map(function(e){return replaceCaret(e,t)}).join(" ")}function replaceCaret(e,t){r("caret",e,t);var n=t.loose?o[l.CARETLOOSE]:o[l.CARET];return e.replace(n,function(t,n,i,s,o){r("caret",e,t,n,i,s,o);var a;if(isX(n)){a=""}else if(isX(i)){a=">="+n+".0.0 <"+(+n+1)+".0.0"}else if(isX(s)){if(n==="0"){a=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"}else{a=">="+n+"."+i+".0 <"+(+n+1)+".0.0"}}else if(o){r("replaceCaret pr",o);if(n==="0"){if(i==="0"){a=">="+n+"."+i+"."+s+"-"+o+" <"+n+"."+i+"."+(+s+1)}else{a=">="+n+"."+i+"."+s+"-"+o+" <"+n+"."+(+i+1)+".0"}}else{a=">="+n+"."+i+"."+s+"-"+o+" <"+(+n+1)+".0.0"}}else{r("no pr");if(n==="0"){if(i==="0"){a=">="+n+"."+i+"."+s+" <"+n+"."+i+"."+(+s+1)}else{a=">="+n+"."+i+"."+s+" <"+n+"."+(+i+1)+".0"}}else{a=">="+n+"."+i+"."+s+" <"+(+n+1)+".0.0"}}r("caret return",a);return a})}function replaceXRanges(e,t){r("replaceXRanges",e,t);return e.split(/\s+/).map(function(e){return replaceXRange(e,t)}).join(" ")}function replaceXRange(e,t){e=e.trim();var n=t.loose?o[l.XRANGELOOSE]:o[l.XRANGE];return e.replace(n,function(n,i,s,o,a,l){r("xRange",e,n,i,s,o,a,l);var c=isX(s);var u=c||isX(o);var f=u||isX(a);var h=f;if(i==="="&&h){i=""}l=t.includePrerelease?"-0":"";if(c){if(i===">"||i==="<"){n="<0.0.0-0"}else{n="*"}}else if(i&&h){if(u){o=0}a=0;if(i===">"){i=">=";if(u){s=+s+1;o=0;a=0}else{o=+o+1;a=0}}else if(i==="<="){i="<";if(u){s=+s+1}else{o=+o+1}}n=i+s+"."+o+"."+a+l}else if(u){n=">="+s+".0.0"+l+" <"+(+s+1)+".0.0"+l}else if(f){n=">="+s+"."+o+".0"+l+" <"+s+"."+(+o+1)+".0"+l}r("xRange return",n);return n})}function replaceStars(e,t){r("replaceStars",e,t);return e.trim().replace(o[l.STAR],"")}function hyphenReplace(e,t,r,n,i,s,o,a,l,c,u,f,h){if(isX(r)){t=""}else if(isX(n)){t=">="+r+".0.0"}else if(isX(i)){t=">="+r+"."+n+".0"}else{t=">="+t}if(isX(l)){a=""}else if(isX(c)){a="<"+(+l+1)+".0.0"}else if(isX(u)){a="<"+l+"."+(+c+1)+".0"}else if(f){a="<="+l+"."+c+"."+u+"-"+f}else{a="<="+a}return(t+" "+a).trim()}Range.prototype.test=function(e){if(!e){return false}if(typeof e==="string"){try{e=new SemVer(e,this.options)}catch(e){return false}}for(var t=0;t0){var s=e[i].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch){return true}}}return false}return true}t.satisfies=satisfies;function satisfies(e,t,r){try{t=new Range(t,r)}catch(e){return false}return t.test(e)}t.maxSatisfying=maxSatisfying;function maxSatisfying(e,t,r){var n=null;var i=null;try{var s=new Range(t,r)}catch(e){return null}e.forEach(function(e){if(s.test(e)){if(!n||i.compare(e)===-1){n=e;i=new SemVer(n,r)}}});return n}t.minSatisfying=minSatisfying;function minSatisfying(e,t,r){var n=null;var i=null;try{var s=new Range(t,r)}catch(e){return null}e.forEach(function(e){if(s.test(e)){if(!n||i.compare(e)===1){n=e;i=new SemVer(n,r)}}});return n}t.minVersion=minVersion;function minVersion(e,t){e=new Range(e,t);var r=new SemVer("0.0.0");if(e.test(r)){return r}r=new SemVer("0.0.0-0");if(e.test(r)){return r}r=null;for(var n=0;n":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!r||gt(r,t)){r=t}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}if(r&&e.test(r)){return r}return null}t.validRange=validRange;function validRange(e,t){try{return new Range(e,t).range||"*"}catch(e){return null}}t.ltr=ltr;function ltr(e,t,r){return outside(e,t,"<",r)}t.gtr=gtr;function gtr(e,t,r){return outside(e,t,">",r)}t.outside=outside;function outside(e,t,r,n){e=new SemVer(e,n);t=new Range(t,n);var i,s,o,a,l;switch(r){case">":i=gt;s=lte;o=lt;a=">";l=">=";break;case"<":i=lt;s=gte;o=gt;a="<";l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,n)){return false}for(var c=0;c=0.0.0")}f=f||e;h=h||e;if(i(e.semver,f.semver,n)){f=e}else if(o(e.semver,h.semver,n)){h=e}});if(f.operator===a||f.operator===l){return false}if((!h.operator||h.operator===a)&&s(e,h.semver)){return false}else if(h.operator===l&&o(e,h.semver)){return false}}return true}t.prerelease=prerelease;function prerelease(e,t){var r=parse(e,t);return r&&r.prerelease.length?r.prerelease:null}t.intersects=intersects;function intersects(e,t,r){e=new Range(e,r);t=new Range(t,r);return e.intersects(t)}t.coerce=coerce;function coerce(e,t){if(e instanceof SemVer){return e}if(typeof e==="number"){e=String(e)}if(typeof e!=="string"){return null}t=t||{};var r=null;if(!t.rtl){r=e.match(o[l.COERCE])}else{var n;while((n=o[l.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length)){if(!r||n.index+n[0].length!==r.index+r[0].length){r=n}o[l.COERCERTL].lastIndex=n.index+n[1].length+n[2].length}o[l.COERCERTL].lastIndex=-1}if(r===null){return null}return parse(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}},581:function(e,t,r){"use strict";var n=r(13);var i=Object.prototype.hasOwnProperty;var s=Array.isArray;var o=function(){var e=[];for(var t=0;t<256;++t){e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase())}return e}();var a=function compactQueue(e){while(e.length>1){var t=e.pop();var r=t.obj[t.prop];if(s(r)){var n=[];for(var i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||s===n.RFC1738&&(u===40||u===41)){l+=a.charAt(c);continue}if(u<128){l=l+o[u];continue}if(u<2048){l=l+(o[192|u>>6]+o[128|u&63]);continue}if(u<55296||u>=57344){l=l+(o[224|u>>12]+o[128|u>>6&63]+o[128|u&63]);continue}c+=1;u=65536+((u&1023)<<10|a.charCodeAt(c)&1023);l+=o[240|u>>18]+o[128|u>>12&63]+o[128|u>>6&63]+o[128|u&63]}return l};var p=function compact(e){var t=[{obj:{o:e},prop:"o"}];var r=[];for(var n=0;nn(e,t,r)<0;e.exports=i},593:function(e,t,r){const n=r(465);const i=(e,t)=>e.sort((e,r)=>n(r,e,t));e.exports=i},605:function(e){e.exports=require("http")},612:function(e,t,r){"use strict";e.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(e){var t=this;if(!(t instanceof Yallist)){t=new Yallist}t.tail=null;t.head=null;t.length=0;if(e&&typeof e.forEach==="function"){e.forEach(function(e){t.push(e)})}else if(arguments.length>0){for(var r=0,n=arguments.length;r1){r=t}else if(this.head){n=this.head.next;r=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=0;n!==null;i++){r=e(r,n.value,i);n=n.next}return r};Yallist.prototype.reduceReverse=function(e,t){var r;var n=this.tail;if(arguments.length>1){r=t}else if(this.tail){n=this.tail.prev;r=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=this.length-1;n!==null;i--){r=e(r,n.value,i);n=n.prev}return r};Yallist.prototype.toArray=function(){var e=new Array(this.length);for(var t=0,r=this.head;r!==null;t++){e[t]=r.value;r=r.next}return e};Yallist.prototype.toArrayReverse=function(){var e=new Array(this.length);for(var t=0,r=this.tail;r!==null;t++){e[t]=r.value;r=r.prev}return e};Yallist.prototype.slice=function(e,t){t=t||this.length;if(t<0){t+=this.length}e=e||0;if(e<0){e+=this.length}var r=new Yallist;if(tthis.length){t=this.length}for(var n=0,i=this.head;i!==null&&nthis.length){t=this.length}for(var n=this.length,i=this.tail;i!==null&&n>t;n--){i=i.prev}for(;i!==null&&n>e;n--,i=i.prev){r.push(i.value)}return r};Yallist.prototype.splice=function(e,t,...r){if(e>this.length){e=this.length-1}if(e<0){e=this.length+e}for(var n=0,i=this.head;i!==null&&nn(t,e,r);e.exports=i},631:function(e){e.exports=require("net")},669:function(e){e.exports=require("util")},672:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i;Object.defineProperty(t,"__esModule",{value:true});const s=r(357);const o=r(747);const a=r(622);i=o.promises,t.chmod=i.chmod,t.copyFile=i.copyFile,t.lstat=i.lstat,t.mkdir=i.mkdir,t.readdir=i.readdir,t.readlink=i.readlink,t.rename=i.rename,t.rmdir=i.rmdir,t.stat=i.stat,t.symlink=i.symlink,t.unlink=i.unlink;t.IS_WINDOWS=process.platform==="win32";function exists(e){return n(this,void 0,void 0,function*(){try{yield t.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true})}t.exists=exists;function isDirectory(e,r=false){return n(this,void 0,void 0,function*(){const n=r?yield t.stat(e):yield t.lstat(e);return n.isDirectory()})}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function mkdirP(e,r=1e3,i=1){return n(this,void 0,void 0,function*(){s.ok(e,"a path argument must be provided");e=a.resolve(e);if(i>=r)return t.mkdir(e);try{yield t.mkdir(e);return}catch(n){switch(n.code){case"ENOENT":{yield mkdirP(a.dirname(e),r,i+1);yield t.mkdir(e);return}default:{let r;try{r=yield t.stat(e)}catch(e){throw n}if(!r.isDirectory())throw n}}}})}t.mkdirP=mkdirP;function tryGetExecutablePath(e,r){return n(this,void 0,void 0,function*(){let n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){const t=a.extname(e).toUpperCase();if(r.some(e=>e.toUpperCase()===t)){return e}}else{if(isUnixExecutable(n)){return e}}}const i=e;for(const s of r){e=i+s;n=undefined;try{n=yield t.stat(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){try{const r=a.dirname(e);const n=a.basename(e).toUpperCase();for(const i of yield t.readdir(r)){if(n===i.toUpperCase()){e=a.join(r,i);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""})}t.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}},702:function(e,t,r){"use strict";const n=r(612);const i=Symbol("max");const s=Symbol("length");const o=Symbol("lengthCalculator");const a=Symbol("allowStale");const l=Symbol("maxAge");const c=Symbol("dispose");const u=Symbol("noDisposeOnSet");const f=Symbol("lruList");const h=Symbol("cache");const p=Symbol("updateAgeOnGet");const d=()=>1;class LRUCache{constructor(e){if(typeof e==="number")e={max:e};if(!e)e={};if(e.max&&(typeof e.max!=="number"||e.max<0))throw new TypeError("max must be a non-negative number");const t=this[i]=e.max||Infinity;const r=e.length||d;this[o]=typeof r!=="function"?d:r;this[a]=e.stale||false;if(e.maxAge&&typeof e.maxAge!=="number")throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0;this[c]=e.dispose;this[u]=e.noDisposeOnSet||false;this[p]=e.updateAgeOnGet||false;this.reset()}set max(e){if(typeof e!=="number"||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||Infinity;y(this)}get max(){return this[i]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if(typeof e!=="number")throw new TypeError("maxAge must be a non-negative number");this[l]=e;y(this)}get maxAge(){return this[l]}set lengthCalculator(e){if(typeof e!=="function")e=d;if(e!==this[o]){this[o]=e;this[s]=0;this[f].forEach(e=>{e.length=this[o](e.value,e.key);this[s]+=e.length})}y(this)}get lengthCalculator(){return this[o]}get length(){return this[s]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;r!==null;){const n=r.prev;R(this,e,r,t);r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;r!==null;){const n=r.next;R(this,e,r,t);r=n}}keys(){return this[f].toArray().map(e=>e.key)}values(){return this[f].toArray().map(e=>e.value)}reset(){if(this[c]&&this[f]&&this[f].length){this[f].forEach(e=>this[c](e.key,e.value))}this[h]=new Map;this[f]=new n;this[s]=0}dump(){return this[f].map(e=>E(this,e)?false:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[f]}set(e,t,r){r=r||this[l];if(r&&typeof r!=="number")throw new TypeError("maxAge must be a number");const n=r?Date.now():0;const a=this[o](t,e);if(this[h].has(e)){if(a>this[i]){g(this,this[h].get(e));return false}const o=this[h].get(e);const l=o.value;if(this[c]){if(!this[u])this[c](e,l.value)}l.now=n;l.maxAge=r;l.value=t;this[s]+=a-l.length;l.length=a;this.get(e);y(this);return true}const p=new Entry(e,t,a,n,r);if(p.length>this[i]){if(this[c])this[c](e,t);return false}this[s]+=p.length;this[f].unshift(p);this[h].set(e,this[f].head);y(this);return true}has(e){if(!this[h].has(e))return false;const t=this[h].get(e).value;return!E(this,t)}get(e){return v(this,e,true)}peek(e){return v(this,e,false)}pop(){const e=this[f].tail;if(!e)return null;g(this,e);return e.value}del(e){g(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r];const i=n.e||0;if(i===0)this.set(n.k,n.v);else{const e=i-t;if(e>0){this.set(n.k,n.v,e)}}}}prune(){this[h].forEach((e,t)=>v(this,t,false))}}const v=(e,t,r)=>{const n=e[h].get(t);if(n){const t=n.value;if(E(e,t)){g(e,n);if(!e[a])return undefined}else{if(r){if(e[p])n.value.now=Date.now();e[f].unshiftNode(n)}}return t.value}};const E=(e,t)=>{if(!t||!t.maxAge&&!e[l])return false;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[l]&&r>e[l]};const y=e=>{if(e[s]>e[i]){for(let t=e[f].tail;e[s]>e[i]&&t!==null;){const r=t.prev;g(e,t);t=r}}};const g=(e,t)=>{if(t){const r=t.value;if(e[c])e[c](r.key,r.value);e[s]-=r.length;e[h].delete(r.key);e[f].removeNode(t)}};class Entry{constructor(e,t,r,n,i){this.key=e;this.value=t;this.length=r;this.now=n;this.maxAge=i||0}}const R=(e,t,r,n)=>{let i=r.value;if(E(e,i)){g(e,r);if(!e[a])i=undefined}if(i)t.call(n,i.value,i.key,e)};e.exports=LRUCache},714:function(e,t,r){const n=r(830);const i=(e,t)=>{const r=n(e,t);return r?r.version:null};e.exports=i},722:function(e){var t=[];for(var r=0;r<256;++r){t[r]=(r+256).toString(16).substr(1)}function bytesToUuid(e,r){var n=r||0;var i=t;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}e.exports=bytesToUuid},729:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const i=r(386);const s=r(835);const o=r(622);const a=r(761);function getUrl(e,t,r){const n=o.posix||o;let i="";if(!t){i=e}else if(!e){i=t}else{const r=s.parse(t);const o=s.parse(e);o.protocol=o.protocol||r.protocol;o.auth=o.auth||r.auth;o.host=o.host||r.host;o.pathname=n.resolve(r.pathname,o.pathname);if(!o.pathname.endsWith("/")&&e.endsWith("/")){o.pathname+="/"}i=s.format(o)}return r?getUrlWithParsedQueryParams(i,r):i}t.getUrl=getUrl;function getUrlWithParsedQueryParams(e,t){const r=e.replace(/\?$/g,"");const n=i.stringify(t.params,buildParamsStringifyOptions(t));return`${r}${n}`}function buildParamsStringifyOptions(e){let t={addQueryPrefix:true,delimiter:(e.options||{}).separator||"&",allowDots:(e.options||{}).shouldAllowDots||false,arrayFormat:(e.options||{}).arrayFormat||"repeat",encodeValuesOnly:(e.options||{}).shouldOnlyEncodeValues||true};return t}function decompressGzippedContent(e,t){return n(this,void 0,void 0,function*(){return new Promise((r,i)=>n(this,void 0,void 0,function*(){a.gunzip(e,function(e,n){if(e){i(e)}r(n.toString(t||"utf-8"))})}))})}t.decompressGzippedContent=decompressGzippedContent;function obtainContentCharset(e){const t=["ascii","utf8","utf16le","ucs2","base64","binary","hex"];const r=e.message.headers["content-type"]||"";const n=r.match(/charset=([^;,\r\n]+)/i);return n&&n[1]&&t.indexOf(n[1])!=-1?n[1]:"utf-8"}t.obtainContentCharset=obtainContentCharset},740:function(e,t,r){const n=r(65);const i=r(124);const s=(e,t,r)=>{let s=null;let o=null;let a=null;try{a=new i(t,r)}catch(e){return null}e.forEach(e=>{if(a.test(e)){if(!s||o.compare(e)===1){s=e;o=new n(s,r)}}});return s};e.exports=s},744:function(e,t,r){const n=r(65);const i=(e,t)=>new n(e,t).major;e.exports=i},747:function(e){e.exports=require("fs")},752:function(e,t,r){const n=r(298);const i=r(873);const s=r(486);const o=r(167);const a=r(586);const l=r(898);const c=(e,t,r,c)=>{switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return n(e,r,c);case"!=":return i(e,r,c);case">":return s(e,r,c);case">=":return o(e,r,c);case"<":return a(e,r,c);case"<=":return l(e,r,c);default:throw new TypeError(`Invalid operator: ${t}`)}};e.exports=c},755:function(e,t,r){"use strict";var n=r(581);var i=Object.prototype.hasOwnProperty;var s=Array.isArray;var o={allowDots:false,allowPrototypes:false,arrayLimit:20,charset:"utf-8",charsetSentinel:false,comma:false,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:false,interpretNumericEntities:false,parameterLimit:1e3,parseArrays:true,plainObjects:false,strictNullHandling:false};var a=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})};var l=function(e,t){if(e&&typeof e==="string"&&t.comma&&e.indexOf(",")>-1){return e.split(",")}return e};var c="utf8=%26%2310003%3B";var u="utf8=%E2%9C%93";var f=function parseQueryStringValues(e,t){var r={};var f=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;var h=t.parameterLimit===Infinity?undefined:t.parameterLimit;var p=f.split(t.delimiter,h);var d=-1;var v;var E=t.charset;if(t.charsetSentinel){for(v=0;v-1){m=s(m)?[m]:m}if(i.call(r,w)){r[w]=n.combine(r[w],m)}else{r[w]=m}}return r};var h=function(e,t,r,n){var i=n?t:l(t,r);for(var s=e.length-1;s>=0;--s){var o;var a=e[s];if(a==="[]"&&r.parseArrays){o=[].concat(i)}else{o=r.plainObjects?Object.create(null):{};var c=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a;var u=parseInt(c,10);if(!r.parseArrays&&c===""){o={0:i}}else if(!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&(r.parseArrays&&u<=r.arrayLimit)){o=[];o[u]=i}else{o[c]=i}}i=o}return i};var p=function parseQueryStringKeys(e,t,r,n){if(!e){return}var s=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;var o=/(\[[^[\]]*])/;var a=/(\[[^[\]]*])/g;var l=r.depth>0&&o.exec(s);var c=l?s.slice(0,l.index):s;var u=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)){if(!r.allowPrototypes){return}}u.push(c)}var f=0;while(r.depth>0&&(l=a.exec(s))!==null&&f{const n=t.test(e);const i=t.test(r);if(n&&i){e=+e;r=+r}return e===r?0:n&&!i?-1:i&&!n?1:er(t,e);e.exports={compareIdentifiers:r,rcompareIdentifiers:n}},761:function(e){e.exports=require("zlib")},794:function(e){e.exports=require("stream")},803:function(e,t,r){const n=r(65);const i=(e,t)=>new n(e,t).minor;e.exports=i},811:function(e,t,r){const n=r(65);const i=r(124);const s=(e,t,r)=>{let s=null;let o=null;let a=null;try{a=new i(t,r)}catch(e){return null}e.forEach(e=>{if(a.test(e)){if(!s||o.compare(e)===-1){s=e;o=new n(s,r)}}});return s};e.exports=s},822:function(e,t,r){const n=r(830);const i=r(298);const s=(e,t)=>{if(i(e,t)){return null}else{const r=n(e);const i=n(t);const s=r.prerelease.length||i.prerelease.length;const o=s?"pre":"";const a=s?"prerelease":"";for(const e in r){if(e==="major"||e==="minor"||e==="patch"){if(r[e]!==i[e]){return o+e}}}return a}};e.exports=s},826:function(e,t,r){var n=r(139);var i=r(722);function v4(e,t,r){var s=t&&r||0;if(typeof e=="string"){t=e==="binary"?new Array(16):null;e=null}e=e||{};var o=e.random||(e.rng||n)();o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){for(var a=0;a<16;++a){t[s+a]=o[a]}}return t||i(o)}e.exports=v4},830:function(e,t,r){const{MAX_LENGTH:n}=r(181);const{re:i,t:s}=r(976);const o=r(65);const a=r(143);const l=(e,t)=>{t=a(t);if(e instanceof o){return e}if(typeof e!=="string"){return null}if(e.length>n){return null}const r=t.loose?i[s.LOOSE]:i[s.FULL];if(!r.test(e)){return null}try{return new o(e,t)}catch(e){return null}};e.exports=l},835:function(e){e.exports=require("url")},873:function(e,t,r){const n=r(92);const i=(e,t,r)=>n(e,t,r)!==0;e.exports=i},874:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function fulfilled(e){try{step(n.next(e))}catch(e){s(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){s(e)}}function step(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:true});const i=r(835);const s=r(605);const o=r(211);const a=r(729);let l;let c;var u;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(u=t.HttpCodes||(t.HttpCodes={}));const f=[u.MovedPermanently,u.ResourceMoved,u.SeeOther,u.TemporaryRedirect,u.PermanentRedirect];const h=[u.BadGateway,u.ServiceUnavailable,u.GatewayTimeout];const p=["ECONNRESET","ENOTFOUND","ESOCKETTIMEDOUT","ETIMEDOUT","ECONNREFUSED"];const d=["OPTIONS","GET","DELETE","HEAD"];const v=10;const E=5;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise((e,t)=>n(this,void 0,void 0,function*(){let r=Buffer.alloc(0);const i=a.obtainContentCharset(this);const s=this.message.headers["content-encoding"]||"";const o=new RegExp("(gzip$)|(gzip, *deflate)").test(s);this.message.on("data",function(e){const t=typeof e==="string"?Buffer.from(e,i):e;r=Buffer.concat([r,t])}).on("end",function(){return n(this,void 0,void 0,function*(){if(o){const t=yield a.decompressGzippedContent(r,i);e(t)}else{e(r.toString(i))}})}).on("error",function(e){t(e)})}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=i.parse(e);return t.protocol==="https:"}t.isHttps=isHttps;var y;(function(e){e["HTTP_PROXY"]="HTTP_PROXY";e["HTTPS_PROXY"]="HTTPS_PROXY";e["NO_PROXY"]="NO_PROXY"})(y||(y={}));class HttpClient{constructor(e,t,n){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];let i=process.env[y.NO_PROXY];if(i){this._httpProxyBypassHosts=[];i.split(",").forEach(e=>{this._httpProxyBypassHosts.push(new RegExp(e,"i"))})}this.requestOptions=n;if(n){if(n.ignoreSslError!=null){this._ignoreSslError=n.ignoreSslError}this._socketTimeout=n.socketTimeout;this._httpProxy=n.proxy;if(n.proxy&&n.proxy.proxyBypassHosts){this._httpProxyBypassHosts=[];n.proxy.proxyBypassHosts.forEach(e=>{this._httpProxyBypassHosts.push(new RegExp(e,"i"))})}this._certConfig=n.cert;if(this._certConfig){l=r(747);if(this._certConfig.caFile&&l.existsSync(this._certConfig.caFile)){this._ca=l.readFileSync(this._certConfig.caFile,"utf8")}if(this._certConfig.certFile&&l.existsSync(this._certConfig.certFile)){this._cert=l.readFileSync(this._certConfig.certFile,"utf8")}if(this._certConfig.keyFile&&l.existsSync(this._certConfig.keyFile)){this._key=l.readFileSync(this._certConfig.keyFile,"utf8")}}if(n.allowRedirects!=null){this._allowRedirects=n.allowRedirects}if(n.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=n.allowRedirectDowngrade}if(n.maxRedirects!=null){this._maxRedirects=Math.max(n.maxRedirects,0)}if(n.keepAlive!=null){this._keepAlive=n.keepAlive}if(n.allowRetries!=null){this._allowRetries=n.allowRetries}if(n.maxRetries!=null){this._maxRetries=n.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,n){return this.request(e,t,r,n)}request(e,t,r,s){return n(this,void 0,void 0,function*(){if(this._disposed){throw new Error("Client has already been disposed.")}let n=i.parse(t);let o=this._prepareRequest(e,n,s);let a=this._allowRetries&&d.indexOf(e)!=-1?this._maxRetries+1:1;let l=0;let c;while(l-1){continue}throw e}if(c&&c.message&&c.message.statusCode===u.Unauthorized){let e;for(let t=0;t0){const a=c.message.headers["location"];if(!a){break}let l=i.parse(a);if(n.protocol=="https:"&&n.protocol!=l.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 c.readBody();o=this._prepareRequest(e,l,s);c=yield this.requestRaw(o,r);t--}if(h.indexOf(c.message.statusCode)==-1){return c}l+=1;if(l{let i=function(e,t){if(e){n(e)}r(t)};this.requestRawWithCallback(e,t,i)})}requestRawWithCallback(e,t,r){let n;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;let s=(e,t)=>{if(!i){i=true;r(e,t)}};let o=e.httpModule.request(e.options,e=>{let t=new HttpClientResponse(e);s(null,t)});o.on("socket",e=>{n=e});o.setTimeout(this._socketTimeout||3*6e4,()=>{if(n){n.destroy()}s(new Error("Request timeout: "+e.options.path),null)});o.on("error",function(e){s(e,null)});if(t&&typeof t==="string"){o.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",function(){o.end()});t.pipe(o)}else{o.end()}}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const a=n.parsedUrl.protocol==="https:";n.httpModule=a?o:s;const l=a?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):l;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers&&!this._isPresigned(i.format(t))){this.handlers.forEach(e=>{e.prepareRequest(n.options)})}return n}_isPresigned(e){if(this.requestOptions&&this.requestOptions.presignedUrlPatterns){const t=this.requestOptions.presignedUrlPatterns;for(let r=0;rObject.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},t(this.requestOptions.headers),t(e))}return t(e||{})}_getAgent(e){let t;let n=this._getProxy(e);let i=n.proxyUrl&&n.proxyUrl.hostname&&!this._isMatchInBypassProxyList(e);if(this._keepAlive&&i){t=this._proxyAgent}if(this._keepAlive&&!i){t=this._agent}if(!!t){return t}const a=e.protocol==="https:";let l=100;if(!!this.requestOptions){l=this.requestOptions.maxSockets||s.globalAgent.maxSockets}if(i){if(!c){c=r(413)}const e={maxSockets:l,keepAlive:this._keepAlive,proxy:{proxyAuth:n.proxyAuth,host:n.proxyUrl.hostname,port:n.proxyUrl.port}};let i;const s=n.proxyUrl.protocol==="https:";if(a){i=s?c.httpsOverHttps:c.httpsOverHttp}else{i=s?c.httpOverHttps:c.httpOverHttp}t=i(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:l};t=a?new o.Agent(e):new s.Agent(e);this._agent=t}if(!t){t=a?o.globalAgent:s.globalAgent}if(a&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}if(a&&this._certConfig){t.options=Object.assign(t.options||{},{ca:this._ca,cert:this._cert,key:this._key,passphrase:this._certConfig.passphrase})}return t}_getProxy(e){let t=e.protocol==="https:";let r=this._httpProxy;let n=process.env[y.HTTPS_PROXY];let s=process.env[y.HTTP_PROXY];if(!r){if(n&&t){r={proxyUrl:n}}else if(s){r={proxyUrl:s}}}let o;let a;if(r){if(r.proxyUrl.length>0){o=i.parse(r.proxyUrl)}if(r.proxyUsername||r.proxyPassword){a=r.proxyUsername+":"+r.proxyPassword}}return{proxyUrl:o,proxyAuth:a}}_isMatchInBypassProxyList(e){if(!this._httpProxyBypassHosts){return false}let t=false;this._httpProxyBypassHosts.forEach(r=>{if(r.test(e.href)){t=true}});return t}_performExponentialBackoff(e){e=Math.min(v,e);const t=E*Math.pow(2,e);return new Promise(e=>setTimeout(()=>e(),t))}}t.HttpClient=HttpClient},876:function(e,t,r){const n=r(976);e.exports={re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r(181).SEMVER_SPEC_VERSION,SemVer:r(65),compareIdentifiers:r(760).compareIdentifiers,rcompareIdentifiers:r(760).rcompareIdentifiers,parse:r(830),valid:r(714),clean:r(503),inc:r(928),diff:r(822),major:r(744),minor:r(803),patch:r(489),prerelease:r(968),compare:r(92),rcompare:r(630),compareLoose:r(283),compareBuild:r(465),sort:r(120),rsort:r(593),gt:r(486),lt:r(586),eq:r(298),neq:r(873),gte:r(167),lte:r(898),cmp:r(752),coerce:r(499),Comparator:r(174),Range:r(124),satisfies:r(310),toComparators:r(219),maxSatisfying:r(811),minSatisfying:r(740),minVersion:r(164),validRange:r(480),outside:r(462),gtr:r(531),ltr:r(323),intersects:r(259),simplifyRange:r(877),subset:r(999)}},877:function(e,t,r){const n=r(310);const i=r(92);e.exports=((e,t,r)=>{const s=[];let o=null;let a=null;const l=e.sort((e,t)=>i(e,t,r));for(const e of l){const i=n(e,t,r);if(i){a=e;if(!o)o=e}else{if(a){s.push([o,a])}a=null;o=null}}if(o)s.push([o,null]);const c=[];for(const[e,t]of s){if(e===t)c.push(e);else if(!t&&e===l[0])c.push("*");else if(!t)c.push(`>=${e}`);else if(e===l[0])c.push(`<=${t}`);else c.push(`${e} - ${t}`)}const u=c.join(" || ");const f=typeof t.raw==="string"?t.raw:String(t);return u.length0?R.join(",")||null:undefined}]}else if(a(l)){O=l}else{var S=Object.keys(R);O=u?S.sort(u):S}for(var T=0;T0?y+E:""}},898:function(e,t,r){const n=r(92);const i=(e,t,r)=>n(e,t,r)<=0;e.exports=i},928:function(e,t,r){const n=r(65);const i=(e,t,r,i)=>{if(typeof r==="string"){i=r;r=undefined}try{return new n(e,r).inc(t,i).version}catch(e){return null}};e.exports=i},950:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});function getProxyUrl(e){let t=e.protocol==="https:";let r;if(checkBypass(e)){return r}let n;if(t){n=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{n=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(n){r=new URL(n)}return r}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}let t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let r;if(e.port){r=Number(e.port)}else if(e.protocol==="http:"){r=80}else if(e.protocol==="https:"){r=443}let n=[e.hostname.toUpperCase()];if(typeof r==="number"){n.push(`${n[0]}:${r}`)}for(let e of t.split(",").map(e=>e.trim().toUpperCase()).filter(e=>e)){if(n.some(t=>t===e)){return true}}return false}t.checkBypass=checkBypass},968:function(e,t,r){const n=r(830);const i=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null};e.exports=i},976:function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n}=r(181);const i=r(548);t=e.exports={};const s=t.re=[];const o=t.src=[];const a=t.t={};let l=0;const c=(e,t,r)=>{const n=l++;i(n,t);a[e]=n;o[n]=t;s[n]=new RegExp(t,r?"g":undefined)};c("NUMERICIDENTIFIER","0|[1-9]\\d*");c("NUMERICIDENTIFIERLOOSE","[0-9]+");c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");c("MAINVERSION",`(${o[a.NUMERICIDENTIFIER]})\\.`+`(${o[a.NUMERICIDENTIFIER]})\\.`+`(${o[a.NUMERICIDENTIFIER]})`);c("MAINVERSIONLOOSE",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.`+`(${o[a.NUMERICIDENTIFIERLOOSE]})`);c("PRERELEASEIDENTIFIER",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`);c("PRERELEASEIDENTIFIERLOOSE",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`);c("PRERELEASE",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\.${o[a.PRERELEASEIDENTIFIER]})*))`);c("PRERELEASELOOSE",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`);c("BUILDIDENTIFIER","[0-9A-Za-z-]+");c("BUILD",`(?:\\+(${o[a.BUILDIDENTIFIER]}(?:\\.${o[a.BUILDIDENTIFIER]})*))`);c("FULLPLAIN",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`);c("FULL",`^${o[a.FULLPLAIN]}$`);c("LOOSEPLAIN",`[v=\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`);c("LOOSE",`^${o[a.LOOSEPLAIN]}$`);c("GTLT","((?:<|>)?=?)");c("XRANGEIDENTIFIERLOOSE",`${o[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);c("XRANGEIDENTIFIER",`${o[a.NUMERICIDENTIFIER]}|x|X|\\*`);c("XRANGEPLAIN",`[v=\\s]*(${o[a.XRANGEIDENTIFIER]})`+`(?:\\.(${o[a.XRANGEIDENTIFIER]})`+`(?:\\.(${o[a.XRANGEIDENTIFIER]})`+`(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?`+`)?)?`);c("XRANGEPLAINLOOSE",`[v=\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})`+`(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?`+`)?)?`);c("XRANGE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAIN]}$`);c("XRANGELOOSE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAINLOOSE]}$`);c("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${n}})`+`(?:\\.(\\d{1,${n}}))?`+`(?:\\.(\\d{1,${n}}))?`+`(?:$|[^\\d])`);c("COERCERTL",o[a.COERCE],true);c("LONETILDE","(?:~>?)");c("TILDETRIM",`(\\s*)${o[a.LONETILDE]}\\s+`,true);t.tildeTrimReplace="$1~";c("TILDE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`);c("TILDELOOSE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`);c("LONECARET","(?:\\^)");c("CARETTRIM",`(\\s*)${o[a.LONECARET]}\\s+`,true);t.caretTrimReplace="$1^";c("CARET",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`);c("CARETLOOSE",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`);c("COMPARATORLOOSE",`^${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]})$|^$`);c("COMPARATOR",`^${o[a.GTLT]}\\s*(${o[a.FULLPLAIN]})$|^$`);c("COMPARATORTRIM",`(\\s*)${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,true);t.comparatorTrimReplace="$1$2$3";c("HYPHENRANGE",`^\\s*(${o[a.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${o[a.XRANGEPLAIN]})`+`\\s*$`);c("HYPHENRANGELOOSE",`^\\s*(${o[a.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${o[a.XRANGEPLAINLOOSE]})`+`\\s*$`);c("STAR","(<|>)?=?\\s*\\*");c("GTE0","^\\s*>=\\s*0.0.0\\s*$");c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},979:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=i(r(470));class RetryHelper{constructor(e,t,r){if(e<1){throw new Error("max attempts should be greater than or equal to 1")}this.maxAttempts=e;this.minSeconds=Math.floor(t);this.maxSeconds=Math.floor(r);if(this.minSeconds>this.maxSeconds){throw new Error("min seconds should be less than or equal to max seconds")}}execute(e,t){return n(this,void 0,void 0,function*(){let r=1;while(rsetTimeout(t,e*1e3))})}}t.RetryHelper=RetryHelper},986:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=i(r(9));function exec(e,t,r){return n(this,void 0,void 0,function*(){const n=s.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const i=n[0];t=n.slice(1).concat(t||[]);const o=new s.ToolRunner(i,t,r);return o.exec()})}t.exec=exec},999:function(e,t,r){const n=r(124);const{ANY:i}=r(174);const s=r(310);const o=r(92);const a=(e,t,r)=>{if(e===t)return true;e=new n(e,r);t=new n(t,r);let i=false;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);i=i||t!==null;if(t)continue e}if(i)return false}return true};const l=(e,t,r)=>{if(e===t)return true;if(e.length===1&&e[0].semver===i)return t.length===1&&t[0].semver===i;const n=new Set;let a,l;for(const t of e){if(t.operator===">"||t.operator===">=")a=c(a,t,r);else if(t.operator==="<"||t.operator==="<=")l=u(l,t,r);else n.add(t.semver)}if(n.size>1)return null;let f;if(a&&l){f=o(a.semver,l.semver,r);if(f>0)return null;else if(f===0&&(a.operator!==">="||l.operator!=="<="))return null}for(const e of n){if(a&&!s(e,String(a),r))return null;if(l&&!s(e,String(l),r))return null;for(const n of t){if(!s(e,String(n),r))return false}return true}let h,p;let d,v;for(const e of t){v=v||e.operator===">"||e.operator===">=";d=d||e.operator==="<"||e.operator==="<=";if(a){if(e.operator===">"||e.operator===">="){h=c(a,e,r);if(h===e&&h!==a)return false}else if(a.operator===">="&&!s(a.semver,String(e),r))return false}if(l){if(e.operator==="<"||e.operator==="<="){p=u(l,e,r);if(p===e&&p!==l)return false}else if(l.operator==="<="&&!s(l.semver,String(e),r))return false}if(!e.operator&&(l||a)&&f!==0)return false}if(a&&d&&!l&&f!==0)return false;if(l&&v&&!a&&f!==0)return false;return true};const c=(e,t,r)=>{if(!e)return t;const n=o(e.semver,t.semver,r);return n>0?e:n<0?t:t.operator===">"&&e.operator===">="?t:e};const u=(e,t,r)=>{if(!e)return t;const n=o(e.semver,t.semver,r);return n<0?e:n>0?t:t.operator==="<"&&e.operator==="<="?t:e};e.exports=a}}); \ No newline at end of file diff --git a/src/version.ts b/src/version.ts index 5347519..af3f64d 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,4 +1,5 @@ import * as rest from 'typed-rest-client/RestClient'; +import * as core from '@actions/core'; import * as semver from 'semver'; import * as vi from './version-info'; @@ -94,44 +95,86 @@ function convertToVersionInfo(versions: GitHubVersion[]): vi.VersionInfo[] { function getHttpOptions( api_token: string, - page_number: number + page_number: number = 1 ): rest.IRequestOptions { - let options: rest.IRequestOptions = { - queryParameters: { - params: { page: page_number }, - }, - }; + let options: rest.IRequestOptions = {}; options.additionalHeaders = { Accept: 'application/vnd.github.v3+json' }; + if (page_number > 1) { + options.queryParameters = { params: { page: page_number } }; + } if (api_token) { options.additionalHeaders.Authorization = 'token ' + api_token; } return options; } +// Parse the pagination Link header to get the next url. +// The header has the form <...url...>; rel="...", <...>; rel="..." +function getNextFromLink(link: string): string | undefined { + const rLink = /<(?[A-Za-z0-9_?=.\/:-]*?)>; rel="(?\w*?)"/g; + let match; + while ((match = rLink.exec(link)) != null) { + if (match.groups && /next/.test(match.groups.rel)) { + return match.groups.url; + } + } + return; +} + export async function getAllVersionInfo( api_token: string = '' ): Promise { const client = new rest.RestClient(USER_AGENT); - let cur_page = 1; - let raw_versions: GitHubVersion[] = []; - let has_next_page = true; - while (has_next_page) { - const options = getHttpOptions(api_token, cur_page); - const version_response = await client.get( - VERSION_URL, - options - ); - const headers: { link?: string } = version_response.headers; - if (headers.link && headers.link.match(/rel="next"/)) { - has_next_page = true; - } else { - has_next_page = false; + + // Fetch the first page of releases and use that to select the pagination + // method to use for all other pages. + const options = getHttpOptions(api_token); + const version_response = await client.get( + VERSION_URL, + options + ); + if (version_response.statusCode != 200 || !version_response.result) { + return []; + } + let raw_versions = version_response.result; + // Try to use the Link headers for pagination. If these are not available, + // then fall back to checking all pages until an empty page of results is + // returned. + let headers: { link?: string } = version_response.headers; + if (headers.link) { + core.debug(`Using link headers for pagination`); + let next = getNextFromLink(headers.link); + while (next) { + const options = getHttpOptions(api_token); + const version_response = await client.get(next, options); + if (version_response.statusCode != 200 || !version_response.result) { + break; + } + raw_versions = raw_versions.concat(version_response.result); + headers = version_response.headers; + if (!headers.link) { + break; + } + next = getNextFromLink(headers.link); } - if (version_response.result) { + } else { + core.debug(`Using page count for pagination`); + const max_pages = 20; + let cur_page = 2; + while (cur_page <= max_pages) { + const options = getHttpOptions(api_token, cur_page); + const version_response = await client.get( + VERSION_URL, + options + ); + if (!version_response.result || version_response.result.length == 0) { + break; + } raw_versions = raw_versions.concat(version_response.result); + cur_page++; } - cur_page++; } + core.debug(`overall got ${raw_versions.length} versions`); const versions: vi.VersionInfo[] = convertToVersionInfo(raw_versions); return versions; }