mirror of
https://github.com/audacity/audacity-actions.git
synced 2025-12-10 21:08:33 -06:00
16 lines
128 KiB
JavaScript
16 lines
128 KiB
JavaScript
(()=>{var e={5008:(e,t,r)=>{const n=r(2186);const i=r(1514);const o=r(5622);const s=r(1711);const a=r(5747);const c=process.env["CI"];global.workspaceDir=process.env["GITHUB_WORKSPACE"];global.conanCachePath=o.join(workspaceDir,".conan");function log(e){if(c){n.info(e)}else{console.log(e)}}function error(e){if(c){n.error(e)}else{console.error(e)}}async function execWithLog(e,arguments){if(c){return i.exec(e,arguments)}else{return i.exec(e,arguments,{listeners:{stdout:e=>{log(e.toString())},stderr:e=>{error(e.toString())}}})}}async function getExecOutput(e,arguments){if(c){return i.getExecOutput(e,arguments)}else{return i.getExecOutput(e,arguments,{listeners:{stdout:e=>{log(e.toString())},stderr:e=>{error(e.toString())}}})}}async function awaitAll(e,t){return await Promise.all(e.map((async e=>t(e))))}async function getMD5(e){const t=await a.promises.readFile(e);return s(t)}function getDateString(){const e=new Date;return[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("")}const sleep=e=>new Promise((t=>setTimeout(t,e)));process.on("unhandledRejection",((e,t)=>{error(e);n.setFailed(e);process.exit(1)})).on("uncaughtException",(e=>{error(e);n.setFailed(e);process.exit(1)}));e.exports={log:log,error:error,execWithLog:execWithLog,getExecOutput:getExecOutput,sleep:sleep,awaitAll:awaitAll,getMD5:getMD5,getDateString:getDateString}},2605:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8802);function create(){return n.DefaultArtifactClient.create()}t.create=create},8802: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 o=i(r(2186));const s=r(183);const a=r(4354);const c=r(6327);const l=r(8538);const u=r(5686);const d=r(2222);const p=r(5622);class DefaultArtifactClient{static create(){return new DefaultArtifactClient}uploadArtifact(e,t,r,i){return n(this,void 0,void 0,(function*(){c.checkArtifactName(e);const n=s.getUploadSpecification(e,r,t);const l={artifactName:e,artifactItems:[],size:0,failedItems:[]};const u=new a.UploadHttpClient;if(n.length===0){o.warning(`No files found that can be uploaded`)}else{const t=yield u.createArtifactInFileContainer(e,i);if(!t.fileContainerResourceUrl){o.debug(t.toString());throw new Error("No URL provided by the Artifact Service to upload an artifact to")}o.debug(`Upload Resource URL: ${t.fileContainerResourceUrl}`);const r=yield u.uploadArtifactToFileContainer(t.fileContainerResourceUrl,n,i);yield u.patchArtifactSize(r.totalSize,e);o.info(`Finished uploading artifact ${e}. Reported size is ${r.uploadSize} bytes. There were ${r.failedItems.length} items that failed to upload`);l.artifactItems=n.map((e=>e.absoluteFilePath));l.size=r.uploadSize;l.failedItems=r.failedItems}return l}))}downloadArtifact(e,t,r){return n(this,void 0,void 0,(function*(){const n=new l.DownloadHttpClient;const i=yield n.listArtifacts();if(i.count===0){throw new Error(`Unable to find any artifacts for the associated workflow`)}const s=i.value.find((t=>t.name===e));if(!s){throw new Error(`Unable to find an artifact with the name: ${e}`)}const a=yield n.getContainerItems(s.name,s.fileContainerResourceUrl);if(!t){t=d.getWorkSpaceDirectory()}t=p.normalize(t);t=p.resolve(t);const h=u.getDownloadSpecification(e,a.value,t,(r===null||r===void 0?void 0:r.createArtifactFolder)||false);if(h.filesToDownload.length===0){o.info(`No downloadable files were found for the artifact: ${s.name}`)}else{yield c.createDirectoriesForArtifact(h.directoryStructure);o.info("Directory structure has been setup for the artifact");yield c.createEmptyFilesForArtifact(h.emptyFilesToCreate);yield n.downloadSingleArtifact(h.filesToDownload)}return{artifactName:e,downloadPath:h.rootDownloadLocation}}))}downloadAllArtifacts(e){return n(this,void 0,void 0,(function*(){const t=new l.DownloadHttpClient;const r=[];const n=yield t.listArtifacts();if(n.count===0){o.info("Unable to find any artifacts for the associated workflow");return r}if(!e){e=d.getWorkSpaceDirectory()}e=p.normalize(e);e=p.resolve(e);let i=0;while(i<n.count){const s=n.value[i];i+=1;const a=yield t.getContainerItems(s.name,s.fileContainerResourceUrl);const l=u.getDownloadSpecification(s.name,a.value,e,true);if(l.filesToDownload.length===0){o.info(`No downloadable files were found for any artifact ${s.name}`)}else{yield c.createDirectoriesForArtifact(l.directoryStructure);yield c.createEmptyFilesForArtifact(l.emptyFilesToCreate);yield t.downloadSingleArtifact(l.filesToDownload)}r.push({artifactName:s.name,downloadPath:l.rootDownloadLocation})}return r}))}}t.DefaultArtifactClient=DefaultArtifactClient},2222:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getUploadFileConcurrency(){return 2}t.getUploadFileConcurrency=getUploadFileConcurrency;function getUploadChunkSize(){return 8*1024*1024}t.getUploadChunkSize=getUploadChunkSize;function getRetryLimit(){return 5}t.getRetryLimit=getRetryLimit;function getRetryMultiplier(){return 1.5}t.getRetryMultiplier=getRetryMultiplier;function getInitialRetryIntervalInMilliseconds(){return 3e3}t.getInitialRetryIntervalInMilliseconds=getInitialRetryIntervalInMilliseconds;function getDownloadFileConcurrency(){return 2}t.getDownloadFileConcurrency=getDownloadFileConcurrency;function getRuntimeToken(){const e=process.env["ACTIONS_RUNTIME_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_RUNTIME_TOKEN env variable")}return e}t.getRuntimeToken=getRuntimeToken;function getRuntimeUrl(){const e=process.env["ACTIONS_RUNTIME_URL"];if(!e){throw new Error("Unable to get ACTIONS_RUNTIME_URL env variable")}return e}t.getRuntimeUrl=getRuntimeUrl;function getWorkFlowRunId(){const e=process.env["GITHUB_RUN_ID"];if(!e){throw new Error("Unable to get GITHUB_RUN_ID env variable")}return e}t.getWorkFlowRunId=getWorkFlowRunId;function getWorkSpaceDirectory(){const e=process.env["GITHUB_WORKSPACE"];if(!e){throw new Error("Unable to get GITHUB_WORKSPACE env variable")}return e}t.getWorkSpaceDirectory=getWorkSpaceDirectory;function getRetentionDays(){return process.env["GITHUB_RETENTION_DAYS"]}t.getRetentionDays=getRetentionDays},8538: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 o=i(r(5747));const s=i(r(2186));const a=i(r(8761));const c=r(6327);const l=r(8835);const u=r(9081);const d=r(630);const p=r(6527);const h=r(2222);const m=r(755);class DownloadHttpClient{constructor(){this.downloadHttpManager=new p.HttpManager(h.getDownloadFileConcurrency(),"@actions/artifact-download");this.statusReporter=new u.StatusReporter(1e3)}listArtifacts(){return n(this,void 0,void 0,(function*(){const e=c.getArtifactUrl();const t=this.downloadHttpManager.getClient(0);const r=c.getDownloadHeaders("application/json");const i=yield m.retryHttpClientRequest("List Artifacts",(()=>n(this,void 0,void 0,(function*(){return t.get(e,r)}))));const o=yield i.readBody();return JSON.parse(o)}))}getContainerItems(e,t){return n(this,void 0,void 0,(function*(){const r=new l.URL(t);r.searchParams.append("itemPath",e);const i=this.downloadHttpManager.getClient(0);const o=c.getDownloadHeaders("application/json");const s=yield m.retryHttpClientRequest("Get Container Items",(()=>n(this,void 0,void 0,(function*(){return i.get(r.toString(),o)}))));const a=yield s.readBody();return JSON.parse(a)}))}downloadSingleArtifact(e){return n(this,void 0,void 0,(function*(){const t=h.getDownloadFileConcurrency();s.debug(`Download file concurrency is set to ${t}`);const r=[...new Array(t).keys()];let i=0;let o=0;s.info(`Total number of files that will be downloaded: ${e.length}`);this.statusReporter.setTotalNumberOfFilesToProcess(e.length);this.statusReporter.start();yield Promise.all(r.map((t=>n(this,void 0,void 0,(function*(){while(i<e.length){const r=e[i];i+=1;const n=d.performance.now();yield this.downloadIndividualFile(t,r.sourceLocation,r.targetPath);if(s.isDebug()){s.debug(`File: ${++o}/${e.length}. ${r.targetPath} took ${(d.performance.now()-n).toFixed(3)} milliseconds to finish downloading`)}this.statusReporter.incrementProcessedCount()}}))))).catch((e=>{throw new Error(`Unable to download the artifact: ${e}`)})).finally((()=>{this.statusReporter.stop();this.downloadHttpManager.disposeAndReplaceAllClients()}))}))}downloadIndividualFile(e,t,r){return n(this,void 0,void 0,(function*(){let i=0;const a=h.getRetryLimit();let l=o.createWriteStream(r);const u=c.getDownloadHeaders("application/json",true,true);const makeDownloadRequest=()=>n(this,void 0,void 0,(function*(){const r=this.downloadHttpManager.getClient(e);return yield r.get(t,u)}));const isGzip=e=>"content-encoding"in e&&e["content-encoding"]==="gzip";const backOff=r=>n(this,void 0,void 0,(function*(){i++;if(i>a){return Promise.reject(new Error(`Retry limit has been reached. Unable to download ${t}`))}else{this.downloadHttpManager.disposeAndReplaceClient(e);if(r){s.info(`Backoff due to too many requests, retry #${i}. Waiting for ${r} milliseconds before continuing the download`);yield c.sleep(r)}else{const e=c.getExponentialRetryTimeInMilliseconds(i);s.info(`Exponential backoff for retry #${i}. Waiting for ${e} milliseconds before continuing the download`);yield c.sleep(e)}s.info(`Finished backoff for retry #${i}, continuing with download`)}}));const isAllBytesReceived=(e,t)=>{if(!e||!t||process.env["ACTIONS_ARTIFACT_SKIP_DOWNLOAD_VALIDATION"]){s.info("Skipping download validation.");return true}return parseInt(e)===t};const resetDestinationStream=e=>n(this,void 0,void 0,(function*(){l.close();yield c.rmFile(e);l=o.createWriteStream(e)}));while(i<=a){let e;try{e=yield makeDownloadRequest();if(s.isDebug()){c.displayHttpDiagnostics(e)}}catch(e){s.info("An error occurred while attempting to download a file");console.log(e);yield backOff();continue}let n=false;if(c.isSuccessStatusCode(e.message.statusCode)){try{const t=isGzip(e.message.headers);yield this.pipeResponseToFile(e,l,t);if(t||isAllBytesReceived(e.message.headers["content-length"],yield c.getFileSize(r))){return}else{n=true}}catch(e){n=true}}if(n||c.isRetryableStatusCode(e.message.statusCode)){s.info(`A ${e.message.statusCode} response code has been received while attempting to download an artifact`);resetDestinationStream(r);c.isThrottledStatusCode(e.message.statusCode)?yield backOff(c.tryGetRetryAfterValueTimeInMilliseconds(e.message.headers)):yield backOff()}else{c.displayHttpDiagnostics(e);return Promise.reject(new Error(`Unexpected http ${e.message.statusCode} during download for ${t}`))}}}))}pipeResponseToFile(e,t,r){return n(this,void 0,void 0,(function*(){yield new Promise(((n,i)=>{if(r){const r=a.createGunzip();e.message.on("error",(e=>{s.error(`An error occurred while attempting to read the response stream`);r.close();t.close();i(e)})).pipe(r).on("error",(e=>{s.error(`An error occurred while attempting to decompress the response stream`);t.close();i(e)})).pipe(t).on("close",(()=>{n()})).on("error",(e=>{s.error(`An error occurred while writing a downloaded file to ${t.path}`);i(e)}))}else{e.message.on("error",(e=>{s.error(`An error occurred while attempting to read the response stream`);t.close();i(e)})).pipe(t).on("close",(()=>{n()})).on("error",(e=>{s.error(`An error occurred while writing a downloaded file to ${t.path}`);i(e)}))}}));return}))}}t.DownloadHttpClient=DownloadHttpClient},5686: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(5622));function getDownloadSpecification(e,t,r,n){const o=new Set;const s={rootDownloadLocation:n?i.join(r,e):r,directoryStructure:[],emptyFilesToCreate:[],filesToDownload:[]};for(const a of t){if(a.path.startsWith(`${e}/`)||a.path.startsWith(`${e}\\`)){const t=i.normalize(a.path);const c=i.join(r,n?t:t.replace(e,""));if(a.itemType==="file"){o.add(i.dirname(c));if(a.fileLength===0){s.emptyFilesToCreate.push(c)}else{s.filesToDownload.push({sourceLocation:a.contentLocation,targetPath:c})}}}}s.directoryStructure=Array.from(o);return s}t.getDownloadSpecification=getDownloadSpecification},6527:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(6327);class HttpManager{constructor(e,t){if(e<1){throw new Error("There must be at least one client")}this.userAgent=t;this.clients=new Array(e).fill(n.createHttpClient(t))}getClient(e){return this.clients[e]}disposeAndReplaceClient(e){this.clients[e].dispose();this.clients[e]=n.createHttpClient(this.userAgent)}disposeAndReplaceAllClients(){for(const[e]of this.clients.entries()){this.disposeAndReplaceClient(e)}}}t.HttpManager=HttpManager},755: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 o=r(6327);const s=i(r(2186));const a=r(2222);function retry(e,t,r,i){return n(this,void 0,void 0,(function*(){let n=undefined;let a=undefined;let c=false;let l="";let u=undefined;let d=1;while(d<=i){try{n=yield t();a=n.message.statusCode;if(o.isSuccessStatusCode(a)){return n}if(a){u=r.get(a)}c=o.isRetryableStatusCode(a);l=`Artifact service responded with ${a}`}catch(e){c=true;l=e.message}if(!c){s.info(`${e} - Error is not retryable`);if(n){o.displayHttpDiagnostics(n)}break}s.info(`${e} - Attempt ${d} of ${i} failed with error: ${l}`);yield o.sleep(o.getExponentialRetryTimeInMilliseconds(d));d++}if(n){o.displayHttpDiagnostics(n)}if(u){throw Error(`${e} failed: ${u}`)}throw Error(`${e} failed: ${l}`)}))}t.retry=retry;function retryHttpClientRequest(e,t,r=new Map,i=a.getRetryLimit()){return n(this,void 0,void 0,(function*(){return yield retry(e,t,r,i)}))}t.retryHttpClientRequest=retryHttpClientRequest},9081:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(2186);class StatusReporter{constructor(e){this.totalNumberOfFilesToProcess=0;this.processedCount=0;this.largeFiles=new Map;this.totalFileStatus=undefined;this.largeFileStatus=undefined;this.displayFrequencyInMilliseconds=e}setTotalNumberOfFilesToProcess(e){this.totalNumberOfFilesToProcess=e}start(){this.totalFileStatus=setInterval((()=>{const e=this.formatPercentage(this.processedCount,this.totalNumberOfFilesToProcess);n.info(`Total file count: ${this.totalNumberOfFilesToProcess} ---- Processed file #${this.processedCount} (${e.slice(0,e.indexOf(".")+2)}%)`)}),this.displayFrequencyInMilliseconds);this.largeFileStatus=setInterval((()=>{for(const e of Array.from(this.largeFiles.values())){n.info(e)}this.largeFiles.clear()}),1e3)}updateLargeFileStatus(e,t,r){const n=this.formatPercentage(t,r);const i=`Uploading ${e} (${n.slice(0,n.indexOf(".")+2)}%)`;this.largeFiles.set(e,i)}stop(){if(this.totalFileStatus){clearInterval(this.totalFileStatus)}if(this.largeFileStatus){clearInterval(this.largeFileStatus)}}incrementProcessedCount(){this.processedCount++}formatPercentage(e,t){return(e/t*100).toFixed(4).toString()}}t.StatusReporter=StatusReporter},606: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.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),r={},verb("next"),verb("throw"),verb("return"),r[Symbol.asyncIterator]=function(){return this},r);function verb(t){r[t]=e[t]&&function(r){return new Promise((function(n,i){r=e[t](r),settle(n,i,r.done,r.value)}))}}function settle(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}};var o=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=o(r(5747));const a=o(r(8761));const c=r(1669);const l=c.promisify(s.stat);function createGZipFileOnDisk(e,t){return n(this,void 0,void 0,(function*(){return new Promise(((r,i)=>{const o=s.createReadStream(e);const c=a.createGzip();const u=s.createWriteStream(t);o.pipe(c).pipe(u);u.on("finish",(()=>n(this,void 0,void 0,(function*(){const e=(yield l(t)).size;r(e)}))));u.on("error",(e=>{console.log(e);i}))}))}))}t.createGZipFileOnDisk=createGZipFileOnDisk;function createGZipFileInBuffer(e){return n(this,void 0,void 0,(function*(){return new Promise((t=>n(this,void 0,void 0,(function*(){var r,n;const o=s.createReadStream(e);const c=a.createGzip();o.pipe(c);const l=[];try{for(var u=i(c),d;d=yield u.next(),!d.done;){const e=d.value;l.push(e)}}catch(e){r={error:e}}finally{try{if(d&&!d.done&&(n=u.return))yield n.call(u)}finally{if(r)throw r.error}}t(Buffer.concat(l))}))))}))}t.createGZipFileInBuffer=createGZipFileInBuffer},4354: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 o=i(r(5747));const s=i(r(2186));const a=i(r(8065));const c=i(r(2413));const l=r(6327);const u=r(2222);const d=r(1669);const p=r(8835);const h=r(630);const m=r(9081);const g=r(9925);const v=r(6527);const y=r(606);const b=r(755);const w=d.promisify(o.stat);class UploadHttpClient{constructor(){this.uploadHttpManager=new v.HttpManager(u.getUploadFileConcurrency(),"@actions/artifact-upload");this.statusReporter=new m.StatusReporter(1e4)}createArtifactInFileContainer(e,t){return n(this,void 0,void 0,(function*(){const r={Type:"actions_storage",Name:e};if(t&&t.retentionDays){const e=u.getRetentionDays();r.RetentionDays=l.getProperRetention(t.retentionDays,e)}const i=JSON.stringify(r,null,2);const o=l.getArtifactUrl();const s=this.uploadHttpManager.getClient(0);const a=l.getUploadHeaders("application/json",false);const c=new Map([[g.HttpCodes.Forbidden,"Artifact storage quota has been hit. Unable to upload any new artifacts"],[g.HttpCodes.BadRequest,`The artifact name ${e} is not valid. Request URL ${o}`]]);const d=yield b.retryHttpClientRequest("Create Artifact Container",(()=>n(this,void 0,void 0,(function*(){return s.post(o,i,a)}))),c);const p=yield d.readBody();return JSON.parse(p)}))}uploadArtifactToFileContainer(e,t,r){return n(this,void 0,void 0,(function*(){const i=u.getUploadFileConcurrency();const o=u.getUploadChunkSize();s.debug(`File Concurrency: ${i}, and Chunk Size: ${o}`);const a=[];let c=true;if(r){if(r.continueOnError===false){c=false}}for(const r of t){const t=new p.URL(e);t.searchParams.append("itemPath",r.uploadFilePath);a.push({file:r.absoluteFilePath,resourceUrl:t.toString(),maxChunkSize:o,continueOnError:c})}const l=[...new Array(i).keys()];const d=[];let m=0;let g=0;let v=0;let y=0;let b=false;this.statusReporter.setTotalNumberOfFilesToProcess(t.length);this.statusReporter.start();yield Promise.all(l.map((e=>n(this,void 0,void 0,(function*(){while(m<t.length){const r=a[m];m+=1;if(b){d.push(r.file);continue}const n=h.performance.now();const i=yield this.uploadFileAsync(e,r);if(s.isDebug()){s.debug(`File: ${++g}/${t.length}. ${r.file} took ${(h.performance.now()-n).toFixed(3)} milliseconds to finish upload`)}v+=i.successfulUploadSize;y+=i.totalSize;if(i.isSuccess===false){d.push(r.file);if(!c){s.error(`aborting artifact upload`);b=true}}this.statusReporter.incrementProcessedCount()}})))));this.statusReporter.stop();this.uploadHttpManager.disposeAndReplaceAllClients();s.info(`Total size of all the files uploaded is ${v} bytes`);return{uploadSize:v,totalSize:y,failedItems:d}}))}uploadFileAsync(e,t){return n(this,void 0,void 0,(function*(){const r=(yield w(t.file)).size;let n=0;let i=true;let l=0;let u=0;let d=true;if(r<65536){const n=yield y.createGZipFileInBuffer(t.file);let a;if(r<n.byteLength){a=()=>o.createReadStream(t.file);d=false;u=r}else{a=()=>{const e=new c.PassThrough;e.end(n);return e};u=n.byteLength}const p=yield this.uploadChunk(e,t.resourceUrl,a,0,u-1,u,d,r);if(!p){i=false;l+=u;s.warning(`Aborting upload for ${t.file} due to failure`)}return{isSuccess:i,successfulUploadSize:u-l,totalSize:r}}else{const c=yield a.file();u=yield y.createGZipFileOnDisk(t.file,c.path);let p=c.path;if(r<u){u=r;p=t.file;d=false}let h=false;while(n<u){const a=Math.min(u-n,t.maxChunkSize);if(u>104857600){this.statusReporter.updateLargeFileStatus(t.file,n,u)}const c=n;const m=n+a-1;n+=t.maxChunkSize;if(h){l+=a;continue}const g=yield this.uploadChunk(e,t.resourceUrl,(()=>o.createReadStream(p,{start:c,end:m,autoClose:false})),c,m,u,d,r);if(!g){i=false;l+=a;s.warning(`Aborting upload for ${t.file} due to failure`);h=true}}yield c.cleanup();return{isSuccess:i,successfulUploadSize:u-l,totalSize:r}}}))}uploadChunk(e,t,r,i,o,a,c,d){return n(this,void 0,void 0,(function*(){const p=l.getUploadHeaders("application/octet-stream",true,c,d,o-i+1,l.getContentRange(i,o,a));const uploadChunkRequest=()=>n(this,void 0,void 0,(function*(){const n=this.uploadHttpManager.getClient(e);return yield n.sendStream("PUT",t,r(),p)}));let h=0;const m=u.getRetryLimit();const incrementAndCheckRetryLimit=e=>{h++;if(h>m){if(e){l.displayHttpDiagnostics(e)}s.info(`Retry limit has been reached for chunk at offset ${i} to ${t}`);return true}return false};const backOff=t=>n(this,void 0,void 0,(function*(){this.uploadHttpManager.disposeAndReplaceClient(e);if(t){s.info(`Backoff due to too many requests, retry #${h}. Waiting for ${t} milliseconds before continuing the upload`);yield l.sleep(t)}else{const e=l.getExponentialRetryTimeInMilliseconds(h);s.info(`Exponential backoff for retry #${h}. Waiting for ${e} milliseconds before continuing the upload at offset ${i}`);yield l.sleep(e)}s.info(`Finished backoff for retry #${h}, continuing with upload`);return}));while(h<=m){let r;try{r=yield uploadChunkRequest()}catch(t){s.info(`An error has been caught http-client index ${e}, retrying the upload`);console.log(t);if(incrementAndCheckRetryLimit()){return false}yield backOff();continue}yield r.readBody();if(l.isSuccessStatusCode(r.message.statusCode)){return true}else if(l.isRetryableStatusCode(r.message.statusCode)){s.info(`A ${r.message.statusCode} status code has been received, will attempt to retry the upload`);if(incrementAndCheckRetryLimit(r)){return false}l.isThrottledStatusCode(r.message.statusCode)?yield backOff(l.tryGetRetryAfterValueTimeInMilliseconds(r.message.headers)):yield backOff()}else{s.error(`Unexpected response. Unable to upload chunk to ${t}`);l.displayHttpDiagnostics(r);return false}}return false}))}patchArtifactSize(e,t){return n(this,void 0,void 0,(function*(){const r=new p.URL(l.getArtifactUrl());r.searchParams.append("artifactName",t);const i={Size:e};const o=JSON.stringify(i,null,2);s.debug(`URL is ${r.toString()}`);const a=this.uploadHttpManager.getClient(0);const c=l.getUploadHeaders("application/json",false);const u=new Map([[g.HttpCodes.NotFound,`An Artifact with the name ${t} was not found`]]);const d=yield b.retryHttpClientRequest("Finalize artifact upload",(()=>n(this,void 0,void 0,(function*(){return a.patch(r.toString(),o,c)}))),u);yield d.readBody();s.debug(`Artifact ${t} has been successfully uploaded, total size in bytes: ${e}`)}))}}t.UploadHttpClient=UploadHttpClient},183: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(5747));const o=r(2186);const s=r(5622);const a=r(6327);function getUploadSpecification(e,t,r){a.checkArtifactName(e);const n=[];if(!i.existsSync(t)){throw new Error(`Provided rootDirectory ${t} does not exist`)}if(!i.lstatSync(t).isDirectory()){throw new Error(`Provided rootDirectory ${t} is not a valid directory`)}t=s.normalize(t);t=s.resolve(t);for(let c of r){if(!i.existsSync(c)){throw new Error(`File ${c} does not exist`)}if(!i.lstatSync(c).isDirectory()){c=s.normalize(c);c=s.resolve(c);if(!c.startsWith(t)){throw new Error(`The rootDirectory: ${t} is not a parent directory of the file: ${c}`)}const r=c.replace(t,"");a.checkArtifactFilePath(r);n.push({absoluteFilePath:c,uploadFilePath:s.join(e,r)})}else{o.debug(`Removing ${c} from rawSearchResults because it is a directory`)}}return n}t.getUploadSpecification=getUploadSpecification},6327: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(2186);const o=r(5747);const s=r(9925);const a=r(3702);const c=r(2222);function getExponentialRetryTimeInMilliseconds(e){if(e<0){throw new Error("RetryCount should not be negative")}else if(e===0){return c.getInitialRetryIntervalInMilliseconds()}const t=c.getInitialRetryIntervalInMilliseconds()*c.getRetryMultiplier()*e;const r=t*c.getRetryMultiplier();return Math.random()*(r-t)+t}t.getExponentialRetryTimeInMilliseconds=getExponentialRetryTimeInMilliseconds;function parseEnvNumber(e){const t=Number(process.env[e]);if(Number.isNaN(t)||t<0){return undefined}return t}t.parseEnvNumber=parseEnvNumber;function getApiVersion(){return"6.0-preview"}t.getApiVersion=getApiVersion;function isSuccessStatusCode(e){if(!e){return false}return e>=200&&e<300}t.isSuccessStatusCode=isSuccessStatusCode;function isForbiddenStatusCode(e){if(!e){return false}return e===s.HttpCodes.Forbidden}t.isForbiddenStatusCode=isForbiddenStatusCode;function isRetryableStatusCode(e){if(!e){return false}const t=[s.HttpCodes.BadGateway,s.HttpCodes.GatewayTimeout,s.HttpCodes.InternalServerError,s.HttpCodes.ServiceUnavailable,s.HttpCodes.TooManyRequests,413];return t.includes(e)}t.isRetryableStatusCode=isRetryableStatusCode;function isThrottledStatusCode(e){if(!e){return false}return e===s.HttpCodes.TooManyRequests}t.isThrottledStatusCode=isThrottledStatusCode;function tryGetRetryAfterValueTimeInMilliseconds(e){if(e["retry-after"]){const t=Number(e["retry-after"]);if(!isNaN(t)){i.info(`Retry-After header is present with a value of ${t}`);return t*1e3}i.info(`Returned retry-after header value: ${t} is non-numeric and cannot be used`);return undefined}i.info(`No retry-after header was found. Dumping all headers for diagnostic purposes`);console.log(e);return undefined}t.tryGetRetryAfterValueTimeInMilliseconds=tryGetRetryAfterValueTimeInMilliseconds;function getContentRange(e,t,r){return`bytes ${e}-${t}/${r}`}t.getContentRange=getContentRange;function getDownloadHeaders(e,t,r){const n={};if(e){n["Content-Type"]=e}if(t){n["Connection"]="Keep-Alive";n["Keep-Alive"]="10"}if(r){n["Accept-Encoding"]="gzip";n["Accept"]=`application/octet-stream;api-version=${getApiVersion()}`}else{n["Accept"]=`application/json;api-version=${getApiVersion()}`}return n}t.getDownloadHeaders=getDownloadHeaders;function getUploadHeaders(e,t,r,n,i,o){const s={};s["Accept"]=`application/json;api-version=${getApiVersion()}`;if(e){s["Content-Type"]=e}if(t){s["Connection"]="Keep-Alive";s["Keep-Alive"]="10"}if(r){s["Content-Encoding"]="gzip";s["x-tfs-filelength"]=n}if(i){s["Content-Length"]=i}if(o){s["Content-Range"]=o}return s}t.getUploadHeaders=getUploadHeaders;function createHttpClient(e){return new s.HttpClient(e,[new a.BearerCredentialHandler(c.getRuntimeToken())])}t.createHttpClient=createHttpClient;function getArtifactUrl(){const e=`${c.getRuntimeUrl()}_apis/pipelines/workflows/${c.getWorkFlowRunId()}/artifacts?api-version=${getApiVersion()}`;i.debug(`Artifact Url: ${e}`);return e}t.getArtifactUrl=getArtifactUrl;function displayHttpDiagnostics(e){i.info(`##### Begin Diagnostic HTTP information #####\nStatus Code: ${e.message.statusCode}\nStatus Message: ${e.message.statusMessage}\nHeader Information: ${JSON.stringify(e.message.headers,undefined,2)}\n###### End Diagnostic HTTP information ######`)}t.displayHttpDiagnostics=displayHttpDiagnostics;const l=['"',":","<",">","|","*","?"];const u=[...l,"\\","/"];function checkArtifactName(e){if(!e){throw new Error(`Artifact name: ${e}, is incorrectly provided`)}for(const t of u){if(e.includes(t)){throw new Error(`Artifact name is not valid: ${e}. Contains character: "${t}". Invalid artifact name characters include: ${u.toString()}.`)}}}t.checkArtifactName=checkArtifactName;function checkArtifactFilePath(e){if(!e){throw new Error(`Artifact path: ${e}, is incorrectly provided`)}for(const t of l){if(e.includes(t)){throw new Error(`Artifact path is not valid: ${e}. Contains character: "${t}". Invalid characters include: ${l.toString()}.`)}}}t.checkArtifactFilePath=checkArtifactFilePath;function createDirectoriesForArtifact(e){return n(this,void 0,void 0,(function*(){for(const t of e){yield o.promises.mkdir(t,{recursive:true})}}))}t.createDirectoriesForArtifact=createDirectoriesForArtifact;function createEmptyFilesForArtifact(e){return n(this,void 0,void 0,(function*(){for(const t of e){yield(yield o.promises.open(t,"w")).close()}}))}t.createEmptyFilesForArtifact=createEmptyFilesForArtifact;function getFileSize(e){return n(this,void 0,void 0,(function*(){const t=yield o.promises.stat(e);i.debug(`${e} size:(${t.size}) blksize:(${t.blksize}) blocks:(${t.blocks})`);return t.size}))}t.getFileSize=getFileSize;function rmFile(e){return n(this,void 0,void 0,(function*(){yield o.promises.unlink(e)}))}t.rmFile=rmFile;function getProperRetention(e,t){if(e<0){throw new Error("Invalid retention, minimum value is 1.")}let r=e;if(t){const e=parseInt(t);if(!isNaN(e)&&e<r){i.warning(`Retention days is greater than the max value allowed by the repository setting, reduce retention to ${e} days`);r=e}}return r}t.getProperRetention=getProperRetention;function sleep(e){return n(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,e)))}))}t.sleep=sleep},7351: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 o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const s=o(r(2087));const a=r(5278);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+s.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const c="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=c+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+=`${c}${escapeData(this.message)}`;return e}}function escapeData(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186: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 o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=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});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const a=r(7351);const c=r(717);const l=r(5278);const u=o(r(2087));const d=o(r(5622));const p=r(8041);var h;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(h=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=l.toCommandValue(t);process.env[e]=r;const n=process.env["GITHUB_ENV"]||"";if(n){const t="_GitHubActionsFileCommandDelimeter_";const n=`${e}<<${t}${u.EOL}${r}${u.EOL}${t}`;c.issueCommand("ENV",n)}else{a.issueCommand("set-env",{name:e},r)}}t.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){c.issueCommand("PATH",e)}else{a.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${d.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));return r}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const n=["false","False","FALSE"];const i=getInput(e,t);if(r.includes(i))return true;if(n.includes(i))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){process.stdout.write(u.EOL);a.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){a.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=h.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){a.issueCommand("debug",{},e)}t.debug=debug;function error(e,t={}){a.issueCommand("error",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.error=error;function warning(e,t={}){a.issueCommand("warning",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.warning=warning;function notice(e,t={}){a.issueCommand("notice",l.toCommandProperties(t),e instanceof Error?e.toString():e)}t.notice=notice;function info(e){process.stdout.write(e+u.EOL)}t.info=info;function startGroup(e){a.issue("group",e)}t.startGroup=startGroup;function endGroup(){a.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return s(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){a.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState;function getIDToken(e){return s(this,void 0,void 0,(function*(){return yield p.OidcClient.getIDToken(e)}))}t.getIDToken=getIDToken},717: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 o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issueCommand=void 0;const s=o(r(5747));const a=o(r(2087));const c=r(5278);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(!s.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}s.appendFileSync(r,`${c.toCommandValue(t)}${a.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},8041: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});t.OidcClient=void 0;const i=r(9925);const o=r(3702);const s=r(2186);class OidcClient{static createHttpClient(e=true,t=10){const r={allowRetries:e,maxRetries:t};return new i.HttpClient("actions/oidc-client",[new o.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var t;return n(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const n=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.result.message}`)}));const i=(t=n.result)===null||t===void 0?void 0:t.value;if(!i){throw new Error("Response json body do not have ID Token field")}return i}))}static getIDToken(e){return n(this,void 0,void 0,(function*(){try{let t=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);t=`${t}&audience=${r}`}s.debug(`ID token url is ${t}`);const r=yield OidcClient.getCall(t);s.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}t.OidcClient=OidcClient},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandProperties=t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}t.toCommandProperties=toCommandProperties},1514: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 o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=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});t.getExecOutput=t.exec=void 0;const a=r(4304);const c=o(r(8159));function exec(e,t,r){return s(this,void 0,void 0,(function*(){const n=c.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 c.ToolRunner(i,t,r);return o.exec()}))}t.exec=exec;function getExecOutput(e,t,r){var n,i;return s(this,void 0,void 0,(function*(){let o="";let s="";const c=new a.StringDecoder("utf8");const l=new a.StringDecoder("utf8");const u=(n=r===null||r===void 0?void 0:r.listeners)===null||n===void 0?void 0:n.stdout;const d=(i=r===null||r===void 0?void 0:r.listeners)===null||i===void 0?void 0:i.stderr;const stdErrListener=e=>{s+=l.write(e);if(d){d(e)}};const stdOutListener=e=>{o+=c.write(e);if(u){u(e)}};const p=Object.assign(Object.assign({},r===null||r===void 0?void 0:r.listeners),{stdout:stdOutListener,stderr:stdErrListener});const h=yield exec(e,t,Object.assign(Object.assign({},r),{listeners:p}));o+=c.end();s+=l.end();return{exitCode:h,stdout:o,stderr:s}}))}t.getExecOutput=getExecOutput},8159: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 o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=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});t.argStringToArray=t.ToolRunner=void 0;const a=o(r(2087));const c=o(r(8614));const l=o(r(3129));const u=o(r(5622));const d=o(r(7436));const p=o(r(1962));const h=r(8213);const m=process.platform==="win32";class ToolRunner extends c.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(m){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(a.EOL);while(i>-1){const e=n.substring(0,i);r(e);n=n.substring(i+a.EOL.length);i=n.indexOf(a.EOL)}return n}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(m){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(m){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 s(this,void 0,void 0,(function*(){if(!p.isRooted(this.toolPath)&&(this.toolPath.includes("/")||m&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield d.which(this.toolPath,true);return new Promise(((e,t)=>s(this,void 0,void 0,(function*(){this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+a.EOL)}const n=new ExecState(r,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield p.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const i=this._getSpawnFileName();const o=l.spawn(i,this._getSpawnArgs(r),this._getSpawnOptions(this.options,i));let s="";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)}s=this._processLineBuffer(e,s,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let 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)}c=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(s.length>0){this.emit("stdline",s)}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 o=0;o<e.length;o++){const s=e.charAt(o);if(s==='"'){if(!n){r=!r}else{append(s)}continue}if(s==="\\"&&n){append(s);continue}if(s==="\\"&&r){n=true;continue}if(s===" "&&!r){if(i.length>0){t.push(i);i=""}continue}append(s)}if(i.length>0){t.push(i.trim())}return t}t.argStringToArray=argStringToArray;class ExecState extends c.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=h.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()}}},3702:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class BasicCredentialHandler{constructor(e,t){this.username=e;this.password=t}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from(this.username+":"+this.password).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Bearer "+this.token}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,t,r){return null}}t.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},9925:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const n=r(8605);const i=r(7211);const o=r(6443);let s;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 c;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(c=t.Headers||(t.Headers={}));var l;(function(e){e["ApplicationJson"]="application/json"})(l=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){let t=o.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const u=[a.MovedPermanently,a.ResourceMoved,a.SeeOther,a.TemporaryRedirect,a.PermanentRedirect];const d=[a.BadGateway,a.ServiceUnavailable,a.GatewayTimeout];const p=["OPTIONS","GET","DELETE","HEAD"];const h=10;const m=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[c.Accept]=this._getExistingOrDefaultHeader(t,c.Accept,l.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[c.Accept]=this._getExistingOrDefaultHeader(r,c.Accept,l.ApplicationJson);r[c.ContentType]=this._getExistingOrDefaultHeader(r,c.ContentType,l.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[c.Accept]=this._getExistingOrDefaultHeader(r,c.Accept,l.ApplicationJson);r[c.ContentType]=this._getExistingOrDefaultHeader(r,c.ContentType,l.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[c.Accept]=this._getExistingOrDefaultHeader(r,c.Accept,l.ApplicationJson);r[c.ContentType]=this._getExistingOrDefaultHeader(r,c.ContentType,l.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 o=this._prepareRequest(e,i,n);let s=this._allowRetries&&p.indexOf(e)!=-1?this._maxRetries+1:1;let c=0;let l;while(c<s){l=await this.requestRaw(o,r);if(l&&l.message&&l.message.statusCode===a.Unauthorized){let e;for(let t=0;t<this.handlers.length;t++){if(this.handlers[t].canHandleAuthentication(l)){e=this.handlers[t];break}}if(e){return e.handleAuthentication(this,o,r)}else{return l}}let t=this._maxRedirects;while(u.indexOf(l.message.statusCode)!=-1&&this._allowRedirects&&t>0){const s=l.message.headers["location"];if(!s){break}let a=new URL(s);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 l.readBody();if(a.hostname!==i.hostname){for(let e in n){if(e.toLowerCase()==="authorization"){delete n[e]}}}o=this._prepareRequest(e,a,n);l=await this.requestRaw(o,r);t--}if(d.indexOf(l.message.statusCode)==-1){return l}c+=1;if(c<s){await l.readBody();await this._performExponentialBackoff(c)}}return l}dispose(){if(this._agent){this._agent.destroy()}this._disposed=true}requestRaw(e,t){return new Promise(((r,n)=>{let callbackForResult=function(e,t){if(e){n(e)}r(t)};this.requestRawWithCallback(e,t,callbackForResult)}))}requestRawWithCallback(e,t,r){let n;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let i=false;let handleResult=(e,t)=>{if(!i){i=true;r(e,t)}};let o=e.httpModule.request(e.options,(e=>{let t=new HttpClientResponse(e);handleResult(null,t)}));o.on("socket",(e=>{n=e}));o.setTimeout(this._socketTimeout||3*6e4,(()=>{if(n){n.end()}handleResult(new Error("Request timeout: "+e.options.path),null)}));o.on("error",(function(e){handleResult(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 o={};o.parsedUrl=t;const s=o.parsedUrl.protocol==="https:";o.httpModule=s?i:n;const a=s?443:80;o.options={};o.options.host=o.parsedUrl.hostname;o.options.port=o.parsedUrl.port?parseInt(o.parsedUrl.port):a;o.options.path=(o.parsedUrl.pathname||"")+(o.parsedUrl.search||"");o.options.method=e;o.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){o.options.headers["user-agent"]=this.userAgent}o.options.agent=this._getAgent(o.parsedUrl);if(this.handlers){this.handlers.forEach((e=>{e.prepareRequest(o.options)}))}return o}_mergeHeaders(e){const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});let n;if(this.requestOptions&&this.requestOptions.headers){n=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||n||r}_getAgent(e){let t;let a=o.getProxyUrl(e);let c=a&&a.hostname;if(this._keepAlive&&c){t=this._proxyAgent}if(this._keepAlive&&!c){t=this._agent}if(!!t){return t}const l=e.protocol==="https:";let u=100;if(!!this.requestOptions){u=this.requestOptions.maxSockets||n.globalAgent.maxSockets}if(c){if(!s){s=r(4294)}const e={maxSockets:u,keepAlive:this._keepAlive,proxy:{...(a.username||a.password)&&{proxyAuth:`${a.username}:${a.password}`},host:a.hostname,port:a.port}};let n;const i=a.protocol==="https:";if(l){n=i?s.httpsOverHttps:s.httpsOverHttp}else{n=i?s.httpOverHttps:s.httpOverHttp}t=n(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:u};t=l?new i.Agent(e):new n.Agent(e);this._agent=t}if(!t){t=l?i.globalAgent:n.globalAgent}if(l&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(h,e);const t=m*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 o={statusCode:i,result:null,headers:{}};if(i==a.NotFound){r(o)}let s;let c;try{c=await e.readBody();if(c&&c.length>0){if(t&&t.deserializeDates){s=JSON.parse(c,HttpClient.dateTimeDeserializer)}else{s=JSON.parse(c)}o.result=s}o.headers=e.message.headers}catch(e){}if(i>299){let e;if(s&&s.message){e=s.message}else if(c&&c.length>0){e=c}else{e="Failed request: ("+i+")"}let t=new HttpClientError(e,i);t.result=o.result;n(t)}else{r(o)}}))}}t.HttpClient=HttpClient},6443:(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},1962: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 o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=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;Object.defineProperty(t,"__esModule",{value:true});t.getCmdPath=t.tryGetExecutablePath=t.isRooted=t.isDirectory=t.exists=t.IS_WINDOWS=t.unlink=t.symlink=t.stat=t.rmdir=t.rename=t.readlink=t.readdir=t.mkdir=t.lstat=t.copyFile=t.chmod=void 0;const c=o(r(5747));const l=o(r(5622));a=c.promises,t.chmod=a.chmod,t.copyFile=a.copyFile,t.lstat=a.lstat,t.mkdir=a.mkdir,t.readdir=a.readdir,t.readlink=a.readlink,t.rename=a.rename,t.rmdir=a.rmdir,t.stat=a.stat,t.symlink=a.symlink,t.unlink=a.unlink;t.IS_WINDOWS=process.platform==="win32";function exists(e){return s(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 s(this,void 0,void 0,(function*(){const n=r?yield t.stat(e):yield t.lstat(e);return n.isDirectory()}))}t.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(t.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}t.isRooted=isRooted;function tryGetExecutablePath(e,r){return s(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=l.extname(e).toUpperCase();if(r.some((e=>e.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const i=e;for(const o of r){e=i+o;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=l.dirname(e);const n=l.basename(e).toUpperCase();for(const i of yield t.readdir(r)){if(n===i.toUpperCase()){e=l.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()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}t.getCmdPath=getCmdPath},7436: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 o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var s=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});t.findInPath=t.which=t.mkdirP=t.rmRF=t.mv=t.cp=void 0;const a=r(2357);const c=o(r(3129));const l=o(r(5622));const u=r(1669);const d=o(r(1962));const p=u.promisify(c.exec);const h=u.promisify(c.execFile);function cp(e,t,r={}){return s(this,void 0,void 0,(function*(){const{force:n,recursive:i,copySourceDirectory:o}=readCopyOptions(r);const s=(yield d.exists(t))?yield d.stat(t):null;if(s&&s.isFile()&&!n){return}const a=s&&s.isDirectory()&&o?l.join(t,l.basename(e)):t;if(!(yield d.exists(e))){throw new Error(`no such file or directory: ${e}`)}const c=yield d.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,a,0,n)}}else{if(l.relative(e,a)===""){throw new Error(`'${a}' and '${e}' are the same file`)}yield copyFile(e,a,n)}}))}t.cp=cp;function mv(e,t,r={}){return s(this,void 0,void 0,(function*(){if(yield d.exists(t)){let n=true;if(yield d.isDirectory(t)){t=l.join(t,l.basename(e));n=yield d.exists(t)}if(n){if(r.force==null||r.force){yield rmRF(t)}else{throw new Error("Destination already exists")}}}yield mkdirP(l.dirname(t));yield d.rename(e,t)}))}t.mv=mv;function rmRF(e){return s(this,void 0,void 0,(function*(){if(d.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}try{const t=d.getCmdPath();if(yield d.isDirectory(e,true)){yield p(`${t} /s /c "rd /s /q "%inputPath%""`,{env:{inputPath:e}})}else{yield p(`${t} /s /c "del /f /a "%inputPath%""`,{env:{inputPath:e}})}}catch(e){if(e.code!=="ENOENT")throw e}try{yield d.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let t=false;try{t=yield d.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(t){yield h(`rm`,[`-rf`,`${e}`])}else{yield d.unlink(e)}}}))}t.rmRF=rmRF;function mkdirP(e){return s(this,void 0,void 0,(function*(){a.ok(e,"a path argument must be provided");yield d.mkdir(e,{recursive:true})}))}t.mkdirP=mkdirP;function which(e,t){return s(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(d.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}return t}const r=yield findInPath(e);if(r&&r.length>0){return r[0]}return""}))}t.which=which;function findInPath(e){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(d.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(l.delimiter)){if(e){t.push(e)}}}if(d.isRooted(e)){const r=yield d.tryGetExecutablePath(e,t);if(r){return[r]}return[]}if(e.includes(l.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(l.delimiter)){if(e){r.push(e)}}}const n=[];for(const i of r){const r=yield d.tryGetExecutablePath(l.join(i,e),t);if(r){n.push(r)}}return n}))}t.findInPath=findInPath;function readCopyOptions(e){const t=e.force==null?true:e.force;const r=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:r,copySourceDirectory:n}}function cpDirRecursive(e,t,r,n){return s(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(t);const i=yield d.readdir(e);for(const o of i){const i=`${e}/${o}`;const s=`${t}/${o}`;const a=yield d.lstat(i);if(a.isDirectory()){yield cpDirRecursive(i,s,r,n)}else{yield copyFile(i,s,n)}}yield d.chmod(t,(yield d.stat(e)).mode)}))}function copyFile(e,t,r){return s(this,void 0,void 0,(function*(){if((yield d.lstat(e)).isSymbolicLink()){try{yield d.lstat(t);yield d.unlink(t)}catch(e){if(e.code==="EPERM"){yield d.chmod(t,"0666");yield d.unlink(t)}}const r=yield d.readlink(e);yield d.symlink(r,t,d.IS_WINDOWS?"junction":null)}else if(!(yield d.exists(t))||r){yield d.copyFile(e,t)}}))}},9417:e=>{"use strict";e.exports=balanced;function balanced(e,t,r){if(e instanceof RegExp)e=maybeMatch(e,r);if(t instanceof RegExp)t=maybeMatch(t,r);var n=range(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function maybeMatch(e,t){var r=t.match(e);return r?r[0]:null}balanced.range=range;function range(e,t,r){var n,i,o,s,a;var c=r.indexOf(e);var l=r.indexOf(t,c+1);var u=c;if(c>=0&&l>0){if(e===t){return[c,l]}n=[];o=r.length;while(u>=0&&!a){if(u==c){n.push(u);c=r.indexOf(e,u+1)}else if(n.length==1){a=[n.pop(),l]}else{i=n.pop();if(i<o){o=i;s=l}l=r.indexOf(t,u+1)}u=c<l&&c>=0?c:l}if(n.length){a=[o,s]}}return a}},3717:(e,t,r)=>{var n=r(6891);var i=r(9417);e.exports=expandTop;var o="\0SLASH"+Math.random()+"\0";var s="\0OPEN"+Math.random()+"\0";var a="\0CLOSE"+Math.random()+"\0";var c="\0COMMA"+Math.random()+"\0";var l="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(a).split("\\,").join(c).split("\\.").join(l)}function unescapeBraces(e){return e.split(o).join("\\").split(s).join("{").split(a).join("}").split(c).join(",").split(l).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[];var r=i("{","}",e);if(!r)return e.split(",");var n=r.pre;var o=r.body;var s=r.post;var a=n.split(",");a[a.length-1]+="{"+o+"}";var c=parseCommaParts(s);if(s.length){a[a.length-1]+=c.shift();a.push.apply(a,c)}t.push.apply(t,a);return t}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var r=[];var o=i("{","}",e);if(!o||/\$$/.test(o.pre))return[e];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body);var c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body);var l=s||c;var u=o.body.indexOf(",")>=0;if(!l&&!u){if(o.post.match(/,.*\}/)){e=o.pre+"{"+o.body+a+o.post;return expand(e)}return[e]}var d;if(l){d=o.body.split(/\.\./)}else{d=parseCommaParts(o.body);if(d.length===1){d=expand(d[0],false).map(embrace);if(d.length===1){var p=o.post.length?expand(o.post,false):[""];return p.map((function(e){return o.pre+d[0]+e}))}}}var h=o.pre;var p=o.post.length?expand(o.post,false):[""];var m;if(l){var g=numeric(d[0]);var v=numeric(d[1]);var y=Math.max(d[0].length,d[1].length);var b=d.length==3?Math.abs(numeric(d[2])):1;var w=lte;var _=v<g;if(_){b*=-1;w=gte}var S=d.some(isPadded);m=[];for(var E=g;w(E,v);E+=b){var C;if(c){C=String.fromCharCode(E);if(C==="\\")C=""}else{C=String(E);if(S){var O=y-C.length;if(O>0){var x=new Array(O+1).join("0");if(E<0)C="-"+x+C.slice(1);else C=x+C}}}m.push(C)}}else{m=n(d,(function(e){return expand(e,false)}))}for(var A=0;A<m.length;A++){for(var k=0;k<p.length;k++){var R=h+m[A]+p[k];if(!t||l||R)r.push(R)}}return r}},421:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],r=0;r<e.length;r++)t.push(e.charCodeAt(r)&255);return t},bytesToString:function(e){for(var t=[],r=0;r<e.length;r++)t.push(String.fromCharCode(e[r]));return t.join("")}}};e.exports=t},6891:e=>{e.exports=function(e,r){var n=[];for(var i=0;i<e.length;i++){var o=r(e[i],i);if(t(o))n.push.apply(n,o);else n.push(o)}return n};var t=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"}},7935:e=>{(function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number){return r.rotl(e,8)&16711935|r.rotl(e,24)&4278255360}for(var t=0;t<e.length;t++)e[t]=r.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(Math.random()*256));return t},bytesToWords:function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},wordsToBytes:function(e){for(var t=[],r=0;r<e.length*32;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},bytesToHex:function(e){for(var t=[],r=0;r<e.length;r++){t.push((e[r]>>>4).toString(16));t.push((e[r]&15).toString(16))}return t.join("")},hexToBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},bytesToBase64:function(e){for(var r=[],n=0;n<e.length;n+=3){var i=e[n]<<16|e[n+1]<<8|e[n+2];for(var o=0;o<4;o++)if(n*8+o*6<=e.length*8)r.push(t.charAt(i>>>6*(3-o)&63));else r.push("=")}return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,i=0;n<e.length;i=++n%4){if(i==0)continue;r.push((t.indexOf(e.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<i*2|t.indexOf(e.charAt(n))>>>6-i*2)}return r}};e.exports=r})()},6863:(e,t,r)=>{e.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var n=r(5747);var i=n.realpath;var o=n.realpathSync;var s=process.version;var a=/^v[0-5]\./.test(s);var c=r(1734);function newError(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function realpath(e,t,r){if(a){return i(e,t,r)}if(typeof t==="function"){r=t;t=null}i(e,t,(function(n,i){if(newError(n)){c.realpath(e,t,r)}else{r(n,i)}}))}function realpathSync(e,t){if(a){return o(e,t)}try{return o(e,t)}catch(r){if(newError(r)){return c.realpathSync(e,t)}else{throw r}}}function monkeypatch(){n.realpath=realpath;n.realpathSync=realpathSync}function unmonkeypatch(){n.realpath=i;n.realpathSync=o}},1734:(e,t,r)=>{var n=r(5622);var i=process.platform==="win32";var o=r(5747);var s=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function rethrow(){var e;if(s){var t=new Error;e=debugCallback}else e=missingCallback;return e;function debugCallback(e){if(e){t.message=e.message;e=t;missingCallback(e)}}function missingCallback(e){if(e){if(process.throwDeprecation)throw e;else if(!process.noDeprecation){var t="fs: missing callback "+(e.stack||e.message);if(process.traceDeprecation)console.trace(t);else console.error(t)}}}}function maybeCallback(e){return typeof e==="function"?e:rethrow()}var a=n.normalize;if(i){var c=/(.*?)(?:[\/\\]+|$)/g}else{var c=/(.*?)(?:[\/]+|$)/g}if(i){var l=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{var l=/^[\/]*/}t.realpathSync=function realpathSync(e,t){e=n.resolve(e);if(t&&Object.prototype.hasOwnProperty.call(t,e)){return t[e]}var r=e,s={},a={};var u;var d;var p;var h;start();function start(){var t=l.exec(e);u=t[0].length;d=t[0];p=t[0];h="";if(i&&!a[p]){o.lstatSync(p);a[p]=true}}while(u<e.length){c.lastIndex=u;var m=c.exec(e);h=d;d+=m[0];p=h+m[1];u=c.lastIndex;if(a[p]||t&&t[p]===p){continue}var g;if(t&&Object.prototype.hasOwnProperty.call(t,p)){g=t[p]}else{var v=o.lstatSync(p);if(!v.isSymbolicLink()){a[p]=true;if(t)t[p]=p;continue}var y=null;if(!i){var b=v.dev.toString(32)+":"+v.ino.toString(32);if(s.hasOwnProperty(b)){y=s[b]}}if(y===null){o.statSync(p);y=o.readlinkSync(p)}g=n.resolve(h,y);if(t)t[p]=g;if(!i)s[b]=y}e=n.resolve(g,e.slice(u));start()}if(t)t[r]=e;return e};t.realpath=function realpath(e,t,r){if(typeof r!=="function"){r=maybeCallback(t);t=null}e=n.resolve(e);if(t&&Object.prototype.hasOwnProperty.call(t,e)){return process.nextTick(r.bind(null,null,t[e]))}var s=e,a={},u={};var d;var p;var h;var m;start();function start(){var t=l.exec(e);d=t[0].length;p=t[0];h=t[0];m="";if(i&&!u[h]){o.lstat(h,(function(e){if(e)return r(e);u[h]=true;LOOP()}))}else{process.nextTick(LOOP)}}function LOOP(){if(d>=e.length){if(t)t[s]=e;return r(null,e)}c.lastIndex=d;var n=c.exec(e);m=p;p+=n[0];h=m+n[1];d=c.lastIndex;if(u[h]||t&&t[h]===h){return process.nextTick(LOOP)}if(t&&Object.prototype.hasOwnProperty.call(t,h)){return gotResolvedLink(t[h])}return o.lstat(h,gotStat)}function gotStat(e,n){if(e)return r(e);if(!n.isSymbolicLink()){u[h]=true;if(t)t[h]=h;return process.nextTick(LOOP)}if(!i){var s=n.dev.toString(32)+":"+n.ino.toString(32);if(a.hasOwnProperty(s)){return gotTarget(null,a[s],h)}}o.stat(h,(function(e){if(e)return r(e);o.readlink(h,(function(e,t){if(!i)a[s]=t;gotTarget(e,t)}))}))}function gotTarget(e,i,o){if(e)return r(e);var s=n.resolve(m,i);if(t)t[o]=s;gotResolvedLink(s)}function gotResolvedLink(t){e=n.resolve(t,e.slice(d));start()}}},7625:(e,t,r)=>{t.setopts=setopts;t.ownProp=ownProp;t.makeAbs=makeAbs;t.finish=finish;t.mark=mark;t.isIgnored=isIgnored;t.childrenIgnored=childrenIgnored;function ownProp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var n=r(5747);var i=r(5622);var o=r(3973);var s=r(8714);var a=o.Minimatch;function alphasort(e,t){return e.localeCompare(t,"en")}function setupIgnores(e,t){e.ignore=t.ignore||[];if(!Array.isArray(e.ignore))e.ignore=[e.ignore];if(e.ignore.length){e.ignore=e.ignore.map(ignoreMap)}}function ignoreMap(e){var t=null;if(e.slice(-3)==="/**"){var r=e.replace(/(\/\*\*)+$/,"");t=new a(r,{dot:true})}return{matcher:new a(e,{dot:true}),gmatcher:t}}function setopts(e,t,r){if(!r)r={};if(r.matchBase&&-1===t.indexOf("/")){if(r.noglobstar){throw new Error("base matching requires globstar")}t="**/"+t}e.silent=!!r.silent;e.pattern=t;e.strict=r.strict!==false;e.realpath=!!r.realpath;e.realpathCache=r.realpathCache||Object.create(null);e.follow=!!r.follow;e.dot=!!r.dot;e.mark=!!r.mark;e.nodir=!!r.nodir;if(e.nodir)e.mark=true;e.sync=!!r.sync;e.nounique=!!r.nounique;e.nonull=!!r.nonull;e.nosort=!!r.nosort;e.nocase=!!r.nocase;e.stat=!!r.stat;e.noprocess=!!r.noprocess;e.absolute=!!r.absolute;e.fs=r.fs||n;e.maxLength=r.maxLength||Infinity;e.cache=r.cache||Object.create(null);e.statCache=r.statCache||Object.create(null);e.symlinks=r.symlinks||Object.create(null);setupIgnores(e,r);e.changedCwd=false;var o=process.cwd();if(!ownProp(r,"cwd"))e.cwd=o;else{e.cwd=i.resolve(r.cwd);e.changedCwd=e.cwd!==o}e.root=r.root||i.resolve(e.cwd,"/");e.root=i.resolve(e.root);if(process.platform==="win32")e.root=e.root.replace(/\\/g,"/");e.cwdAbs=s(e.cwd)?e.cwd:makeAbs(e,e.cwd);if(process.platform==="win32")e.cwdAbs=e.cwdAbs.replace(/\\/g,"/");e.nomount=!!r.nomount;r.nonegate=true;r.nocomment=true;e.minimatch=new a(t,r);e.options=e.minimatch.options}function finish(e){var t=e.nounique;var r=t?[]:Object.create(null);for(var n=0,i=e.matches.length;n<i;n++){var o=e.matches[n];if(!o||Object.keys(o).length===0){if(e.nonull){var s=e.minimatch.globSet[n];if(t)r.push(s);else r[s]=true}}else{var a=Object.keys(o);if(t)r.push.apply(r,a);else a.forEach((function(e){r[e]=true}))}}if(!t)r=Object.keys(r);if(!e.nosort)r=r.sort(alphasort);if(e.mark){for(var n=0;n<r.length;n++){r[n]=e._mark(r[n])}if(e.nodir){r=r.filter((function(t){var r=!/\/$/.test(t);var n=e.cache[t]||e.cache[makeAbs(e,t)];if(r&&n)r=n!=="DIR"&&!Array.isArray(n);return r}))}}if(e.ignore.length)r=r.filter((function(t){return!isIgnored(e,t)}));e.found=r}function mark(e,t){var r=makeAbs(e,t);var n=e.cache[r];var i=t;if(n){var o=n==="DIR"||Array.isArray(n);var s=t.slice(-1)==="/";if(o&&!s)i+="/";else if(!o&&s)i=i.slice(0,-1);if(i!==t){var a=makeAbs(e,i);e.statCache[a]=e.statCache[r];e.cache[a]=e.cache[r]}}return i}function makeAbs(e,t){var r=t;if(t.charAt(0)==="/"){r=i.join(e.root,t)}else if(s(t)||t===""){r=t}else if(e.changedCwd){r=i.resolve(e.cwd,t)}else{r=i.resolve(t)}if(process.platform==="win32")r=r.replace(/\\/g,"/");return r}function isIgnored(e,t){if(!e.ignore.length)return false;return e.ignore.some((function(e){return e.matcher.match(t)||!!(e.gmatcher&&e.gmatcher.match(t))}))}function childrenIgnored(e,t){if(!e.ignore.length)return false;return e.ignore.some((function(e){return!!(e.gmatcher&&e.gmatcher.match(t))}))}},1957:(e,t,r)=>{e.exports=glob;var n=r(6863);var i=r(3973);var o=i.Minimatch;var s=r(4124);var a=r(8614).EventEmitter;var c=r(5622);var l=r(2357);var u=r(8714);var d=r(9010);var p=r(7625);var h=p.setopts;var m=p.ownProp;var g=r(2492);var v=r(1669);var y=p.childrenIgnored;var b=p.isIgnored;var w=r(1223);function glob(e,t,r){if(typeof t==="function")r=t,t={};if(!t)t={};if(t.sync){if(r)throw new TypeError("callback provided to sync glob");return d(e,t)}return new Glob(e,t,r)}glob.sync=d;var _=glob.GlobSync=d.GlobSync;glob.glob=glob;function extend(e,t){if(t===null||typeof t!=="object"){return e}var r=Object.keys(t);var n=r.length;while(n--){e[r[n]]=t[r[n]]}return e}glob.hasMagic=function(e,t){var r=extend({},t);r.noprocess=true;var n=new Glob(e,r);var i=n.minimatch.set;if(!e)return false;if(i.length>1)return true;for(var o=0;o<i[0].length;o++){if(typeof i[0][o]!=="string")return true}return false};glob.Glob=Glob;s(Glob,a);function Glob(e,t,r){if(typeof t==="function"){r=t;t=null}if(t&&t.sync){if(r)throw new TypeError("callback provided to sync glob");return new _(e,t)}if(!(this instanceof Glob))return new Glob(e,t,r);h(this,e,t);this._didRealPath=false;var n=this.minimatch.set.length;this.matches=new Array(n);if(typeof r==="function"){r=w(r);this.on("error",r);this.on("end",(function(e){r(null,e)}))}var i=this;this._processing=0;this._emitQueue=[];this._processQueue=[];this.paused=false;if(this.noprocess)return this;if(n===0)return done();var o=true;for(var s=0;s<n;s++){this._process(this.minimatch.set[s],s,false,done)}o=false;function done(){--i._processing;if(i._processing<=0){if(o){process.nextTick((function(){i._finish()}))}else{i._finish()}}}}Glob.prototype._finish=function(){l(this instanceof Glob);if(this.aborted)return;if(this.realpath&&!this._didRealpath)return this._realpath();p.finish(this);this.emit("end",this.found)};Glob.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=true;var e=this.matches.length;if(e===0)return this._finish();var t=this;for(var r=0;r<this.matches.length;r++)this._realpathSet(r,next);function next(){if(--e===0)t._finish()}};Glob.prototype._realpathSet=function(e,t){var r=this.matches[e];if(!r)return t();var i=Object.keys(r);var o=this;var s=i.length;if(s===0)return t();var a=this.matches[e]=Object.create(null);i.forEach((function(r,i){r=o._makeAbs(r);n.realpath(r,o.realpathCache,(function(n,i){if(!n)a[i]=true;else if(n.syscall==="stat")a[r]=true;else o.emit("error",n);if(--s===0){o.matches[e]=a;t()}}))}))};Glob.prototype._mark=function(e){return p.mark(this,e)};Glob.prototype._makeAbs=function(e){return p.makeAbs(this,e)};Glob.prototype.abort=function(){this.aborted=true;this.emit("abort")};Glob.prototype.pause=function(){if(!this.paused){this.paused=true;this.emit("pause")}};Glob.prototype.resume=function(){if(this.paused){this.emit("resume");this.paused=false;if(this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var r=e[t];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(var t=0;t<n.length;t++){var i=n[t];this._processing--;this._process(i[0],i[1],i[2],i[3])}}}};Glob.prototype._process=function(e,t,r,n){l(this instanceof Glob);l(typeof n==="function");if(this.aborted)return;this._processing++;if(this.paused){this._processQueue.push([e,t,r,n]);return}var o=0;while(typeof e[o]==="string"){o++}var s;switch(o){case e.length:this._processSimple(e.join("/"),t,n);return;case 0:s=null;break;default:s=e.slice(0,o).join("/");break}var a=e.slice(o);var c;if(s===null)c=".";else if(u(s)||u(e.join("/"))){if(!s||!u(s))s="/"+s;c=s}else c=s;var d=this._makeAbs(c);if(y(this,c))return n();var p=a[0]===i.GLOBSTAR;if(p)this._processGlobStar(s,c,d,a,t,r,n);else this._processReaddir(s,c,d,a,t,r,n)};Glob.prototype._processReaddir=function(e,t,r,n,i,o,s){var a=this;this._readdir(r,o,(function(c,l){return a._processReaddir2(e,t,r,n,i,o,l,s)}))};Glob.prototype._processReaddir2=function(e,t,r,n,i,o,s,a){if(!s)return a();var l=n[0];var u=!!this.minimatch.negate;var d=l._glob;var p=this.dot||d.charAt(0)===".";var h=[];for(var m=0;m<s.length;m++){var g=s[m];if(g.charAt(0)!=="."||p){var v;if(u&&!e){v=!g.match(l)}else{v=g.match(l)}if(v)h.push(g)}}var y=h.length;if(y===0)return a();if(n.length===1&&!this.mark&&!this.stat){if(!this.matches[i])this.matches[i]=Object.create(null);for(var m=0;m<y;m++){var g=h[m];if(e){if(e!=="/")g=e+"/"+g;else g=e+g}if(g.charAt(0)==="/"&&!this.nomount){g=c.join(this.root,g)}this._emitMatch(i,g)}return a()}n.shift();for(var m=0;m<y;m++){var g=h[m];var b;if(e){if(e!=="/")g=e+"/"+g;else g=e+g}this._process([g].concat(n),i,o,a)}a()};Glob.prototype._emitMatch=function(e,t){if(this.aborted)return;if(b(this,t))return;if(this.paused){this._emitQueue.push([e,t]);return}var r=u(t)?t:this._makeAbs(t);if(this.mark)t=this._mark(t);if(this.absolute)t=r;if(this.matches[e][t])return;if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[e][t]=true;var i=this.statCache[r];if(i)this.emit("stat",t,i);this.emit("match",t)};Glob.prototype._readdirInGlobStar=function(e,t){if(this.aborted)return;if(this.follow)return this._readdir(e,false,t);var r="lstat\0"+e;var n=this;var i=g(r,lstatcb_);if(i)n.fs.lstat(e,i);function lstatcb_(r,i){if(r&&r.code==="ENOENT")return t();var o=i&&i.isSymbolicLink();n.symlinks[e]=o;if(!o&&i&&!i.isDirectory()){n.cache[e]="FILE";t()}else n._readdir(e,false,t)}};Glob.prototype._readdir=function(e,t,r){if(this.aborted)return;r=g("readdir\0"+e+"\0"+t,r);if(!r)return;if(t&&!m(this.symlinks,e))return this._readdirInGlobStar(e,r);if(m(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return r();if(Array.isArray(n))return r(null,n)}var i=this;i.fs.readdir(e,readdirCb(this,e,r))};function readdirCb(e,t,r){return function(n,i){if(n)e._readdirError(t,n,r);else e._readdirEntries(t,i,r)}}Glob.prototype._readdirEntries=function(e,t,r){if(this.aborted)return;if(!this.mark&&!this.stat){for(var n=0;n<t.length;n++){var i=t[n];if(e==="/")i=e+i;else i=e+"/"+i;this.cache[i]=true}}this.cache[e]=t;return r(null,t)};Glob.prototype._readdirError=function(e,t,r){if(this.aborted)return;switch(t.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);this.cache[n]="FILE";if(n===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);i.path=this.cwd;i.code=t.code;this.emit("error",i);this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=false;break;default:this.cache[this._makeAbs(e)]=false;if(this.strict){this.emit("error",t);this.abort()}if(!this.silent)console.error("glob error",t);break}return r()};Glob.prototype._processGlobStar=function(e,t,r,n,i,o,s){var a=this;this._readdir(r,o,(function(c,l){a._processGlobStar2(e,t,r,n,i,o,l,s)}))};Glob.prototype._processGlobStar2=function(e,t,r,n,i,o,s,a){if(!s)return a();var c=n.slice(1);var l=e?[e]:[];var u=l.concat(c);this._process(u,i,false,a);var d=this.symlinks[r];var p=s.length;if(d&&o)return a();for(var h=0;h<p;h++){var m=s[h];if(m.charAt(0)==="."&&!this.dot)continue;var g=l.concat(s[h],c);this._process(g,i,true,a);var v=l.concat(s[h],n);this._process(v,i,true,a)}a()};Glob.prototype._processSimple=function(e,t,r){var n=this;this._stat(e,(function(i,o){n._processSimple2(e,t,i,o,r)}))};Glob.prototype._processSimple2=function(e,t,r,n,i){if(!this.matches[t])this.matches[t]=Object.create(null);if(!n)return i();if(e&&u(e)&&!this.nomount){var o=/[\/\\]$/.test(e);if(e.charAt(0)==="/"){e=c.join(this.root,e)}else{e=c.resolve(this.root,e);if(o)e+="/"}}if(process.platform==="win32")e=e.replace(/\\/g,"/");this._emitMatch(t,e);i()};Glob.prototype._stat=function(e,t){var r=this._makeAbs(e);var n=e.slice(-1)==="/";if(e.length>this.maxLength)return t();if(!this.stat&&m(this.cache,r)){var i=this.cache[r];if(Array.isArray(i))i="DIR";if(!n||i==="DIR")return t(null,i);if(n&&i==="FILE")return t()}var o;var s=this.statCache[r];if(s!==undefined){if(s===false)return t(null,s);else{var a=s.isDirectory()?"DIR":"FILE";if(n&&a==="FILE")return t();else return t(null,a,s)}}var c=this;var l=g("stat\0"+r,lstatcb_);if(l)c.fs.lstat(r,l);function lstatcb_(n,i){if(i&&i.isSymbolicLink()){return c.fs.stat(r,(function(n,o){if(n)c._stat2(e,r,null,i,t);else c._stat2(e,r,n,o,t)}))}else{c._stat2(e,r,n,i,t)}}};Glob.prototype._stat2=function(e,t,r,n,i){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[t]=false;return i()}var o=e.slice(-1)==="/";this.statCache[t]=n;if(t.slice(-1)==="/"&&n&&!n.isDirectory())return i(null,false,n);var s=true;if(n)s=n.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||s;if(o&&s==="FILE")return i();return i(null,s,n)}},9010:(e,t,r)=>{e.exports=globSync;globSync.GlobSync=GlobSync;var n=r(6863);var i=r(3973);var o=i.Minimatch;var s=r(1957).Glob;var a=r(1669);var c=r(5622);var l=r(2357);var u=r(8714);var d=r(7625);var p=d.setopts;var h=d.ownProp;var m=d.childrenIgnored;var g=d.isIgnored;function globSync(e,t){if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(e,t).found}function GlobSync(e,t){if(!e)throw new Error("must provide pattern");if(typeof t==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(e,t);p(this,e,t);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++){this._process(this.minimatch.set[n],n,false)}this._finish()}GlobSync.prototype._finish=function(){l(this instanceof GlobSync);if(this.realpath){var e=this;this.matches.forEach((function(t,r){var i=e.matches[r]=Object.create(null);for(var o in t){try{o=e._makeAbs(o);var s=n.realpathSync(o,e.realpathCache);i[s]=true}catch(t){if(t.syscall==="stat")i[e._makeAbs(o)]=true;else throw t}}}))}d.finish(this)};GlobSync.prototype._process=function(e,t,r){l(this instanceof GlobSync);var n=0;while(typeof e[n]==="string"){n++}var o;switch(n){case e.length:this._processSimple(e.join("/"),t);return;case 0:o=null;break;default:o=e.slice(0,n).join("/");break}var s=e.slice(n);var a;if(o===null)a=".";else if(u(o)||u(e.join("/"))){if(!o||!u(o))o="/"+o;a=o}else a=o;var c=this._makeAbs(a);if(m(this,a))return;var d=s[0]===i.GLOBSTAR;if(d)this._processGlobStar(o,a,c,s,t,r);else this._processReaddir(o,a,c,s,t,r)};GlobSync.prototype._processReaddir=function(e,t,r,n,i,o){var s=this._readdir(r,o);if(!s)return;var a=n[0];var l=!!this.minimatch.negate;var u=a._glob;var d=this.dot||u.charAt(0)===".";var p=[];for(var h=0;h<s.length;h++){var m=s[h];if(m.charAt(0)!=="."||d){var g;if(l&&!e){g=!m.match(a)}else{g=m.match(a)}if(g)p.push(m)}}var v=p.length;if(v===0)return;if(n.length===1&&!this.mark&&!this.stat){if(!this.matches[i])this.matches[i]=Object.create(null);for(var h=0;h<v;h++){var m=p[h];if(e){if(e.slice(-1)!=="/")m=e+"/"+m;else m=e+m}if(m.charAt(0)==="/"&&!this.nomount){m=c.join(this.root,m)}this._emitMatch(i,m)}return}n.shift();for(var h=0;h<v;h++){var m=p[h];var y;if(e)y=[e,m];else y=[m];this._process(y.concat(n),i,o)}};GlobSync.prototype._emitMatch=function(e,t){if(g(this,t))return;var r=this._makeAbs(t);if(this.mark)t=this._mark(t);if(this.absolute){t=r}if(this.matches[e][t])return;if(this.nodir){var n=this.cache[r];if(n==="DIR"||Array.isArray(n))return}this.matches[e][t]=true;if(this.stat)this._stat(t)};GlobSync.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,false);var t;var r;var n;try{r=this.fs.lstatSync(e)}catch(e){if(e.code==="ENOENT"){return null}}var i=r&&r.isSymbolicLink();this.symlinks[e]=i;if(!i&&r&&!r.isDirectory())this.cache[e]="FILE";else t=this._readdir(e,false);return t};GlobSync.prototype._readdir=function(e,t){var r;if(t&&!h(this.symlinks,e))return this._readdirInGlobStar(e);if(h(this.cache,e)){var n=this.cache[e];if(!n||n==="FILE")return null;if(Array.isArray(n))return n}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(t){this._readdirError(e,t);return null}};GlobSync.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat){for(var r=0;r<t.length;r++){var n=t[r];if(e==="/")n=e+n;else n=e+"/"+n;this.cache[n]=true}}this.cache[e]=t;return t};GlobSync.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);this.cache[r]="FILE";if(r===this.cwdAbs){var n=new Error(t.code+" invalid cwd "+this.cwd);n.path=this.cwd;n.code=t.code;throw n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=false;break;default:this.cache[this._makeAbs(e)]=false;if(this.strict)throw t;if(!this.silent)console.error("glob error",t);break}};GlobSync.prototype._processGlobStar=function(e,t,r,n,i,o){var s=this._readdir(r,o);if(!s)return;var a=n.slice(1);var c=e?[e]:[];var l=c.concat(a);this._process(l,i,false);var u=s.length;var d=this.symlinks[r];if(d&&o)return;for(var p=0;p<u;p++){var h=s[p];if(h.charAt(0)==="."&&!this.dot)continue;var m=c.concat(s[p],a);this._process(m,i,true);var g=c.concat(s[p],n);this._process(g,i,true)}};GlobSync.prototype._processSimple=function(e,t){var r=this._stat(e);if(!this.matches[t])this.matches[t]=Object.create(null);if(!r)return;if(e&&u(e)&&!this.nomount){var n=/[\/\\]$/.test(e);if(e.charAt(0)==="/"){e=c.join(this.root,e)}else{e=c.resolve(this.root,e);if(n)e+="/"}}if(process.platform==="win32")e=e.replace(/\\/g,"/");this._emitMatch(t,e)};GlobSync.prototype._stat=function(e){var t=this._makeAbs(e);var r=e.slice(-1)==="/";if(e.length>this.maxLength)return false;if(!this.stat&&h(this.cache,t)){var n=this.cache[t];if(Array.isArray(n))n="DIR";if(!r||n==="DIR")return n;if(r&&n==="FILE")return false}var i;var o=this.statCache[t];if(!o){var s;try{s=this.fs.lstatSync(t)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR")){this.statCache[t]=false;return false}}if(s&&s.isSymbolicLink()){try{o=this.fs.statSync(t)}catch(e){o=s}}else{o=s}}this.statCache[t]=o;var n=true;if(o)n=o.isDirectory()?"DIR":"FILE";this.cache[t]=this.cache[t]||n;if(r&&n==="FILE")return false;return n};GlobSync.prototype._mark=function(e){return d.mark(this,e)};GlobSync.prototype._makeAbs=function(e){return d.makeAbs(this,e)}},2492:(e,t,r)=>{var n=r(2940);var i=Object.create(null);var o=r(1223);e.exports=n(inflight);function inflight(e,t){if(i[e]){i[e].push(t);return null}else{i[e]=[t];return makeres(e)}}function makeres(e){return o((function RES(){var t=i[e];var r=t.length;var n=slice(arguments);try{for(var o=0;o<r;o++){t[o].apply(null,n)}}finally{if(t.length>r){t.splice(0,r);process.nextTick((function(){RES.apply(null,n)}))}else{delete i[e]}}}))}function slice(e){var t=e.length;var r=[];for(var n=0;n<t;n++)r[n]=e[n];return r}},4124:(e,t,r)=>{try{var n=r(1669);if(typeof n.inherits!=="function")throw"";e.exports=n.inherits}catch(t){e.exports=r(8544)}},8544:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}}}},5625:e=>{
|
|
/*!
|
|
* Determine if an object is a Buffer
|
|
*
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
* @license MIT
|
|
*/
|
|
e.exports=function(e){return e!=null&&(isBuffer(e)||isSlowBuffer(e)||!!e._isBuffer)};function isBuffer(e){return!!e.constructor&&typeof e.constructor.isBuffer==="function"&&e.constructor.isBuffer(e)}function isSlowBuffer(e){return typeof e.readFloatLE==="function"&&typeof e.slice==="function"&&isBuffer(e.slice(0,0))}},1711:(e,t,r)=>{(function(){var t=r(7935),n=r(421).utf8,i=r(5625),o=r(421).bin,md5=function(e,r){if(e.constructor==String)if(r&&r.encoding==="binary")e=o.stringToBytes(e);else e=n.stringToBytes(e);else if(i(e))e=Array.prototype.slice.call(e,0);else if(!Array.isArray(e)&&e.constructor!==Uint8Array)e=e.toString();var s=t.bytesToWords(e),a=e.length*8,c=1732584193,l=-271733879,u=-1732584194,d=271733878;for(var p=0;p<s.length;p++){s[p]=(s[p]<<8|s[p]>>>24)&16711935|(s[p]<<24|s[p]>>>8)&4278255360}s[a>>>5]|=128<<a%32;s[(a+64>>>9<<4)+14]=a;var h=md5._ff,m=md5._gg,g=md5._hh,v=md5._ii;for(var p=0;p<s.length;p+=16){var y=c,b=l,w=u,_=d;c=h(c,l,u,d,s[p+0],7,-680876936);d=h(d,c,l,u,s[p+1],12,-389564586);u=h(u,d,c,l,s[p+2],17,606105819);l=h(l,u,d,c,s[p+3],22,-1044525330);c=h(c,l,u,d,s[p+4],7,-176418897);d=h(d,c,l,u,s[p+5],12,1200080426);u=h(u,d,c,l,s[p+6],17,-1473231341);l=h(l,u,d,c,s[p+7],22,-45705983);c=h(c,l,u,d,s[p+8],7,1770035416);d=h(d,c,l,u,s[p+9],12,-1958414417);u=h(u,d,c,l,s[p+10],17,-42063);l=h(l,u,d,c,s[p+11],22,-1990404162);c=h(c,l,u,d,s[p+12],7,1804603682);d=h(d,c,l,u,s[p+13],12,-40341101);u=h(u,d,c,l,s[p+14],17,-1502002290);l=h(l,u,d,c,s[p+15],22,1236535329);c=m(c,l,u,d,s[p+1],5,-165796510);d=m(d,c,l,u,s[p+6],9,-1069501632);u=m(u,d,c,l,s[p+11],14,643717713);l=m(l,u,d,c,s[p+0],20,-373897302);c=m(c,l,u,d,s[p+5],5,-701558691);d=m(d,c,l,u,s[p+10],9,38016083);u=m(u,d,c,l,s[p+15],14,-660478335);l=m(l,u,d,c,s[p+4],20,-405537848);c=m(c,l,u,d,s[p+9],5,568446438);d=m(d,c,l,u,s[p+14],9,-1019803690);u=m(u,d,c,l,s[p+3],14,-187363961);l=m(l,u,d,c,s[p+8],20,1163531501);c=m(c,l,u,d,s[p+13],5,-1444681467);d=m(d,c,l,u,s[p+2],9,-51403784);u=m(u,d,c,l,s[p+7],14,1735328473);l=m(l,u,d,c,s[p+12],20,-1926607734);c=g(c,l,u,d,s[p+5],4,-378558);d=g(d,c,l,u,s[p+8],11,-2022574463);u=g(u,d,c,l,s[p+11],16,1839030562);l=g(l,u,d,c,s[p+14],23,-35309556);c=g(c,l,u,d,s[p+1],4,-1530992060);d=g(d,c,l,u,s[p+4],11,1272893353);u=g(u,d,c,l,s[p+7],16,-155497632);l=g(l,u,d,c,s[p+10],23,-1094730640);c=g(c,l,u,d,s[p+13],4,681279174);d=g(d,c,l,u,s[p+0],11,-358537222);u=g(u,d,c,l,s[p+3],16,-722521979);l=g(l,u,d,c,s[p+6],23,76029189);c=g(c,l,u,d,s[p+9],4,-640364487);d=g(d,c,l,u,s[p+12],11,-421815835);u=g(u,d,c,l,s[p+15],16,530742520);l=g(l,u,d,c,s[p+2],23,-995338651);c=v(c,l,u,d,s[p+0],6,-198630844);d=v(d,c,l,u,s[p+7],10,1126891415);u=v(u,d,c,l,s[p+14],15,-1416354905);l=v(l,u,d,c,s[p+5],21,-57434055);c=v(c,l,u,d,s[p+12],6,1700485571);d=v(d,c,l,u,s[p+3],10,-1894986606);u=v(u,d,c,l,s[p+10],15,-1051523);l=v(l,u,d,c,s[p+1],21,-2054922799);c=v(c,l,u,d,s[p+8],6,1873313359);d=v(d,c,l,u,s[p+15],10,-30611744);u=v(u,d,c,l,s[p+6],15,-1560198380);l=v(l,u,d,c,s[p+13],21,1309151649);c=v(c,l,u,d,s[p+4],6,-145523070);d=v(d,c,l,u,s[p+11],10,-1120210379);u=v(u,d,c,l,s[p+2],15,718787259);l=v(l,u,d,c,s[p+9],21,-343485551);c=c+y>>>0;l=l+b>>>0;u=u+w>>>0;d=d+_>>>0}return t.endian([c,l,u,d])};md5._ff=function(e,t,r,n,i,o,s){var a=e+(t&r|~t&n)+(i>>>0)+s;return(a<<o|a>>>32-o)+t};md5._gg=function(e,t,r,n,i,o,s){var a=e+(t&n|r&~n)+(i>>>0)+s;return(a<<o|a>>>32-o)+t};md5._hh=function(e,t,r,n,i,o,s){var a=e+(t^r^n)+(i>>>0)+s;return(a<<o|a>>>32-o)+t};md5._ii=function(e,t,r,n,i,o,s){var a=e+(r^(t|~n))+(i>>>0)+s;return(a<<o|a>>>32-o)+t};md5._blocksize=16;md5._digestsize=16;e.exports=function(e,r){if(e===undefined||e===null)throw new Error("Illegal argument "+e);var n=t.wordsToBytes(md5(e,r));return r&&r.asBytes?n:r&&r.asString?o.bytesToString(n):t.bytesToHex(n)}})()},3973:(e,t,r)=>{e.exports=minimatch;minimatch.Minimatch=Minimatch;var n={sep:"/"};try{n=r(5622)}catch(e){}var i=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var o=r(3717);var s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var a="[^/]";var c=a+"*?";var l="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var u="(?:(?!(?:\\/|^)\\.).)*?";var d=charSet("().*{}+?[]^$\\!");function charSet(e){return e.split("").reduce((function(e,t){e[t]=true;return e}),{})}var p=/\/+/;minimatch.filter=filter;function filter(e,t){t=t||{};return function(r,n,i){return minimatch(r,e,t)}}function ext(e,t){e=e||{};t=t||{};var r={};Object.keys(t).forEach((function(e){r[e]=t[e]}));Object.keys(e).forEach((function(t){r[t]=e[t]}));return r}minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return minimatch;var t=minimatch;var r=function minimatch(r,n,i){return t.minimatch(r,n,ext(e,i))};r.Minimatch=function Minimatch(r,n){return new t.Minimatch(r,ext(e,n))};return r};Minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return Minimatch;return minimatch.defaults(e).Minimatch};function minimatch(e,t,r){if(typeof t!=="string"){throw new TypeError("glob pattern string required")}if(!r)r={};if(!r.nocomment&&t.charAt(0)==="#"){return false}if(t.trim()==="")return e==="";return new Minimatch(t,r).match(e)}function Minimatch(e,t){if(!(this instanceof Minimatch)){return new Minimatch(e,t)}if(typeof e!=="string"){throw new TypeError("glob pattern string required")}if(!t)t={};e=e.trim();if(n.sep!=="/"){e=e.split(n.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){if(this._made)return;var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var r=this.globSet=this.braceExpand();if(t.debug)this.debug=console.error;this.debug(this.pattern,r);r=this.globParts=r.map((function(e){return e.split(p)}));this.debug(this.pattern,r);r=r.map((function(e,t,r){return e.map(this.parse,this)}),this);this.debug(this.pattern,r);r=r.filter((function(e){return e.indexOf(false)===-1}));this.debug(this.pattern,r);this.set=r}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var e=this.pattern;var t=false;var r=this.options;var n=0;if(r.nonegate)return;for(var i=0,o=e.length;i<o&&e.charAt(i)==="!";i++){t=!t;n++}if(n)this.pattern=e.substr(n);this.negate=t}minimatch.braceExpand=function(e,t){return braceExpand(e,t)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(e,t){if(!t){if(this instanceof Minimatch){t=this.options}else{t={}}}e=typeof e==="undefined"?this.pattern:e;if(typeof e==="undefined"){throw new TypeError("undefined pattern")}if(t.nobrace||!e.match(/\{.*\}/)){return[e]}return o(e)}Minimatch.prototype.parse=parse;var h={};function parse(e,t){if(e.length>1024*64){throw new TypeError("pattern is too long")}var r=this.options;if(!r.noglobstar&&e==="**")return i;if(e==="")return"";var n="";var o=!!r.nocase;var l=false;var u=[];var p=[];var m;var g=false;var v=-1;var y=-1;var b=e.charAt(0)==="."?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var w=this;function clearStateChar(){if(m){switch(m){case"*":n+=c;o=true;break;case"?":n+=a;o=true;break;default:n+="\\"+m;break}w.debug("clearStateChar %j %j",m,n);m=false}}for(var _=0,S=e.length,E;_<S&&(E=e.charAt(_));_++){this.debug("%s\t%s %s %j",e,_,n,E);if(l&&d[E]){n+="\\"+E;l=false;continue}switch(E){case"/":return false;case"\\":clearStateChar();l=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",e,_,n,E);if(g){this.debug(" in class");if(E==="!"&&_===y+1)E="^";n+=E;continue}w.debug("call clearStateChar %j",m);clearStateChar();m=E;if(r.noext)clearStateChar();continue;case"(":if(g){n+="(";continue}if(!m){n+="\\(";continue}u.push({type:m,start:_-1,reStart:n.length,open:s[m].open,close:s[m].close});n+=m==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",m,n);m=false;continue;case")":if(g||!u.length){n+="\\)";continue}clearStateChar();o=true;var C=u.pop();n+=C.close;if(C.type==="!"){p.push(C)}C.reEnd=n.length;continue;case"|":if(g||!u.length||l){n+="\\|";l=false;continue}clearStateChar();n+="|";continue;case"[":clearStateChar();if(g){n+="\\"+E;continue}g=true;y=_;v=n.length;n+=E;continue;case"]":if(_===y+1||!g){n+="\\"+E;l=false;continue}if(g){var O=e.substring(y+1,_);try{RegExp("["+O+"]")}catch(e){var x=this.parse(O,h);n=n.substr(0,v)+"\\["+x[0]+"\\]";o=o||x[1];g=false;continue}}o=true;g=false;n+=E;continue;default:clearStateChar();if(l){l=false}else if(d[E]&&!(E==="^"&&g)){n+="\\"}n+=E}}if(g){O=e.substr(y+1);x=this.parse(O,h);n=n.substr(0,v)+"\\["+x[0];o=o||x[1]}for(C=u.pop();C;C=u.pop()){var A=n.slice(C.reStart+C.open.length);this.debug("setting tail",n,C);A=A.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(e,t,r){if(!r){r="\\"}return t+t+r+"|"}));this.debug("tail=%j\n %s",A,A,C,n);var k=C.type==="*"?c:C.type==="?"?a:"\\"+C.type;o=true;n=n.slice(0,C.reStart)+k+"\\("+A}clearStateChar();if(l){n+="\\\\"}var R=false;switch(n.charAt(0)){case".":case"[":case"(":R=true}for(var T=p.length-1;T>-1;T--){var P=p[T];var D=n.slice(0,P.reStart);var N=n.slice(P.reStart,P.reEnd-8);var I=n.slice(P.reEnd-8,P.reEnd);var j=n.slice(P.reEnd);I+=j;var M=D.split("(").length-1;var $=j;for(_=0;_<M;_++){$=$.replace(/\)[+*?]?/,"")}j=$;var F="";if(j===""&&t!==h){F="$"}var U=D+N+j+F+I;n=U}if(n!==""&&o){n="(?=.)"+n}if(R){n=b+n}if(t===h){return[n,o]}if(!o){return globUnescape(e)}var H=r.nocase?"i":"";try{var G=new RegExp("^"+n+"$",H)}catch(e){return new RegExp("$.")}G._glob=e;G._src=n;return G}minimatch.makeRe=function(e,t){return new Minimatch(e,t||{}).makeRe()};Minimatch.prototype.makeRe=makeRe;function makeRe(){if(this.regexp||this.regexp===false)return this.regexp;var e=this.set;if(!e.length){this.regexp=false;return this.regexp}var t=this.options;var r=t.noglobstar?c:t.dot?l:u;var n=t.nocase?"i":"";var o=e.map((function(e){return e.map((function(e){return e===i?r:typeof e==="string"?regExpEscape(e):e._src})).join("\\/")})).join("|");o="^(?:"+o+")$";if(this.negate)o="^(?!"+o+").*$";try{this.regexp=new RegExp(o,n)}catch(e){this.regexp=false}return this.regexp}minimatch.match=function(e,t,r){r=r||{};var n=new Minimatch(t,r);e=e.filter((function(e){return n.match(e)}));if(n.options.nonull&&!e.length){e.push(t)}return e};Minimatch.prototype.match=match;function match(e,t){this.debug("match",e,this.pattern);if(this.comment)return false;if(this.empty)return e==="";if(e==="/"&&t)return true;var r=this.options;if(n.sep!=="/"){e=e.split(n.sep).join("/")}e=e.split(p);this.debug(this.pattern,"split",e);var i=this.set;this.debug(this.pattern,"set",i);var o;var s;for(s=e.length-1;s>=0;s--){o=e[s];if(o)break}for(s=0;s<i.length;s++){var a=i[s];var c=e;if(r.matchBase&&a.length===1){c=[o]}var l=this.matchOne(c,a,t);if(l){if(r.flipNegate)return true;return!this.negate}}if(r.flipNegate)return false;return this.negate}Minimatch.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:t});this.debug("matchOne",e.length,t.length);for(var o=0,s=0,a=e.length,c=t.length;o<a&&s<c;o++,s++){this.debug("matchOne loop");var l=t[s];var u=e[o];this.debug(t,l,u);if(l===false)return false;if(l===i){this.debug("GLOBSTAR",[t,l,u]);var d=o;var p=s+1;if(p===c){this.debug("** at the end");for(;o<a;o++){if(e[o]==="."||e[o]===".."||!n.dot&&e[o].charAt(0)===".")return false}return true}while(d<a){var h=e[d];this.debug("\nglobstar while",e,d,t,p,h);if(this.matchOne(e.slice(d),t.slice(p),r)){this.debug("globstar found match!",d,a,h);return true}else{if(h==="."||h===".."||!n.dot&&h.charAt(0)==="."){this.debug("dot detected!",e,d,t,p);break}this.debug("globstar swallow a segment, and continue");d++}}if(r){this.debug("\n>>> no match, partial?",e,d,t,p);if(d===a)return true}return false}var m;if(typeof l==="string"){if(n.nocase){m=u.toLowerCase()===l.toLowerCase()}else{m=u===l}this.debug("string match",l,u,m)}else{m=u.match(l);this.debug("pattern match",l,u,m)}if(!m)return false}if(o===a&&s===c){return true}else if(o===a){return r}else if(s===c){var g=o===a-1&&e[o]==="";return g}throw new Error("wtf?")};function globUnescape(e){return e.replace(/\\(.)/g,"$1")}function regExpEscape(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},1223:(e,t,r)=>{var n=r(2940);e.exports=n(once);e.exports.strict=n(onceStrict);once.proto=once((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})}));function once(e){var f=function(){if(f.called)return f.value;f.called=true;return f.value=e.apply(this,arguments)};f.called=false;return f}function onceStrict(e){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";f.onceError=t+" shouldn't be called more than once";f.called=false;return f}},8714:e=>{"use strict";function posix(e){return e.charAt(0)==="/"}function win32(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var r=t.exec(e);var n=r[1]||"";var i=Boolean(n&&n.charAt(1)!==":");return Boolean(r[2]||i)}e.exports=process.platform==="win32"?win32:posix;e.exports.posix=posix;e.exports.win32=win32},8065:(e,t,r)=>{const{promisify:n}=r(1669);const i=r(8517);e.exports.fileSync=i.fileSync;const o=n(((e,t)=>i.file(e,((e,r,i,o)=>e?t(e):t(undefined,{path:r,fd:i,cleanup:n(o)})))));e.exports.file=async e=>o(e);e.exports.withFile=async function withFile(t,r){const{path:n,fd:i,cleanup:o}=await e.exports.file(r);try{return await t({path:n,fd:i})}finally{await o()}};e.exports.dirSync=i.dirSync;const s=n(((e,t)=>i.dir(e,((e,r,i)=>e?t(e):t(undefined,{path:r,cleanup:n(i)})))));e.exports.dir=async e=>s(e);e.exports.withDir=async function withDir(t,r){const{path:n,cleanup:i}=await e.exports.dir(r);try{return await t({path:n})}finally{await i()}};e.exports.tmpNameSync=i.tmpNameSync;e.exports.tmpName=n(i.tmpName);e.exports.tmpdir=i.tmpdir;e.exports.setGracefulCleanup=i.setGracefulCleanup},8517:(e,t,r)=>{
|
|
/*!
|
|
* Tmp
|
|
*
|
|
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
|
|
*
|
|
* MIT Licensed
|
|
*/
|
|
const n=r(5747);const i=r(2087);const o=r(5622);const s=r(6417);const a=n.constants&&i.constants?{fs:n.constants,os:i.constants}:process.binding("constants");const c=r(2371);const l="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",u=/XXXXXX/,d=3,p=(a.O_CREAT||a.fs.O_CREAT)|(a.O_EXCL||a.fs.O_EXCL)|(a.O_RDWR||a.fs.O_RDWR),h=a.EBADF||a.os.errno.EBADF,m=a.ENOENT||a.os.errno.ENOENT,g=448,v=384,y="exit",b="SIGINT",w=[];var _=false;function _randomChars(e){var t=[],r=null;try{r=s.randomBytes(e)}catch(t){r=s.pseudoRandomBytes(e)}for(var n=0;n<e;n++){t.push(l[r[n]%l.length])}return t.join("")}function _isUndefined(e){return typeof e==="undefined"}function _parseArguments(e,t){if(typeof e==="function"){return[{},e]}if(_isUndefined(e)){return[{},t]}return[e,t]}function _generateTmpName(e){const t=_getTmpDir();if(isBlank(e.dir)&&isBlank(t)){throw new Error("No tmp dir specified")}if(!isBlank(e.name)){return o.join(e.dir||t,e.name)}if(e.template){var r=e.template;if(o.basename(r)===r)r=o.join(e.dir||t,r);return r.replace(u,_randomChars(6))}const n=[isBlank(e.prefix)?"tmp-":e.prefix,process.pid,_randomChars(12),e.postfix?e.postfix:""].join("");return o.join(e.dir||t,n)}function tmpName(e,t){var r=_parseArguments(e,t),i=r[0],o=r[1],s=!isBlank(i.name)?1:i.tries||d;if(isNaN(s)||s<0)return o(new Error("Invalid tries"));if(i.template&&!i.template.match(u))return o(new Error("Invalid template provided"));(function _getUniqueName(){try{const e=_generateTmpName(i);n.stat(e,(function(t){if(!t){if(s-- >0)return _getUniqueName();return o(new Error("Could not get a unique tmp filename, max tries reached "+e))}o(null,e)}))}catch(e){o(e)}})()}function tmpNameSync(e){var t=_parseArguments(e),r=t[0],i=!isBlank(r.name)?1:r.tries||d;if(isNaN(i)||i<0)throw new Error("Invalid tries");if(r.template&&!r.template.match(u))throw new Error("Invalid template provided");do{const e=_generateTmpName(r);try{n.statSync(e)}catch(t){return e}}while(i-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function file(e,t){var r=_parseArguments(e,t),i=r[0],o=r[1];tmpName(i,(function _tmpNameCreated(e,t){if(e)return o(e);n.open(t,p,i.mode||v,(function _fileCreated(e,r){if(e)return o(e);if(i.discardDescriptor){return n.close(r,(function _discardCallback(e){if(e){try{n.unlinkSync(t)}catch(t){if(!isENOENT(t)){e=t}}return o(e)}o(null,t,undefined,_prepareTmpFileRemoveCallback(t,-1,i))}))}if(i.detachDescriptor){return o(null,t,r,_prepareTmpFileRemoveCallback(t,-1,i))}o(null,t,r,_prepareTmpFileRemoveCallback(t,r,i))}))}))}function fileSync(e){var t=_parseArguments(e),r=t[0];const i=r.discardDescriptor||r.detachDescriptor;const o=tmpNameSync(r);var s=n.openSync(o,p,r.mode||v);if(r.discardDescriptor){n.closeSync(s);s=undefined}return{name:o,fd:s,removeCallback:_prepareTmpFileRemoveCallback(o,i?-1:s,r)}}function dir(e,t){var r=_parseArguments(e,t),i=r[0],o=r[1];tmpName(i,(function _tmpNameCreated(e,t){if(e)return o(e);n.mkdir(t,i.mode||g,(function _dirCreated(e){if(e)return o(e);o(null,t,_prepareTmpDirRemoveCallback(t,i))}))}))}function dirSync(e){var t=_parseArguments(e),r=t[0];const i=tmpNameSync(r);n.mkdirSync(i,r.mode||g);return{name:i,removeCallback:_prepareTmpDirRemoveCallback(i,r)}}function _removeFileAsync(e,t){const _handler=function(e){if(e&&!isENOENT(e)){return t(e)}t()};if(0<=e[0])n.close(e[0],(function(t){n.unlink(e[1],_handler)}));else n.unlink(e[1],_handler)}function _removeFileSync(e){try{if(0<=e[0])n.closeSync(e[0])}catch(e){if(!isEBADF(e)&&!isENOENT(e))throw e}finally{try{n.unlinkSync(e[1])}catch(e){if(!isENOENT(e))throw e}}}function _prepareTmpFileRemoveCallback(e,t,r){const n=_prepareRemoveCallback(_removeFileSync,[t,e]);const i=_prepareRemoveCallback(_removeFileAsync,[t,e],n);if(!r.keep)w.unshift(n);return i}function _rimrafRemoveDirWrapper(e,t){c(e,t)}function _rimrafRemoveDirSyncWrapper(e,t){try{return t(null,c.sync(e))}catch(e){return t(e)}}function _prepareTmpDirRemoveCallback(e,t){const r=t.unsafeCleanup?_rimrafRemoveDirWrapper:n.rmdir.bind(n);const i=t.unsafeCleanup?_rimrafRemoveDirSyncWrapper:n.rmdirSync.bind(n);const o=_prepareRemoveCallback(i,e);const s=_prepareRemoveCallback(r,e,o);if(!t.keep)w.unshift(o);return s}function _prepareRemoveCallback(e,t,r){var n=false;return function _cleanupCallback(i){i=i||function(){};if(!n){const o=r||_cleanupCallback;const s=w.indexOf(o);if(s>=0)w.splice(s,1);n=true;if(e.length===1){try{e(t);return i(null)}catch(e){return i(e)}}else return e(t,i)}else return i(new Error("cleanup callback has already been called"))}}function _garbageCollector(){if(!_)return;while(w.length){try{w[0]()}catch(e){}}}function isEBADF(e){return isExpectedError(e,-h,"EBADF")}function isENOENT(e){return isExpectedError(e,-m,"ENOENT")}function isExpectedError(e,t,r){return e.code===t||e.code===r}function isBlank(e){return e===null||e===undefined||!e.trim()}function setGracefulCleanup(){_=true}function _getTmpDir(){return i.tmpdir()}function _is_legacy_listener(e){return(e.name==="_exit"||e.name==="_uncaughtExceptionThrown")&&e.toString().indexOf("_garbageCollector();")>-1}function _safely_install_sigint_listener(){const e=process.listeners(b);const t=[];for(let r=0,n=e.length;r<n;r++){const n=e[r];if(n.name==="_tmp$sigint_listener"){t.push(n);process.removeListener(b,n)}}process.on(b,(function _tmp$sigint_listener(e){for(let e=0,r=t.length;e<r;e++){try{t[e](false)}catch(e){}}try{_garbageCollector()}finally{if(!!e){process.exit(0)}}}))}function _safely_install_exit_listener(){const e=process.listeners(y);const t=[];for(let r=0,n=e.length;r<n;r++){const n=e[r];if(n.name==="_tmp$safe_listener"||_is_legacy_listener(n)){if(n.name!=="_uncaughtExceptionThrown"){t.push(n)}process.removeListener(y,n)}}process.addListener(y,(function _tmp$safe_listener(e){for(let r=0,n=t.length;r<n;r++){try{t[r](e)}catch(e){}}_garbageCollector()}))}_safely_install_exit_listener();_safely_install_sigint_listener();Object.defineProperty(e.exports,"tmpdir",{enumerable:true,configurable:false,get:function(){return _getTmpDir()}});e.exports.dir=dir;e.exports.dirSync=dirSync;e.exports.file=file;e.exports.fileSync=fileSync;e.exports.tmpName=tmpName;e.exports.tmpNameSync=tmpNameSync;e.exports.setGracefulCleanup=setGracefulCleanup},2371:(e,t,r)=>{e.exports=rimraf;rimraf.sync=rimrafSync;var n=r(2357);var i=r(5622);var o=r(5747);var s=undefined;try{s=r(1957)}catch(e){}var a=parseInt("666",8);var c={nosort:true,silent:true};var l=0;var u=process.platform==="win32";function defaults(e){var t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach((function(t){e[t]=e[t]||o[t];t=t+"Sync";e[t]=e[t]||o[t]}));e.maxBusyTries=e.maxBusyTries||3;e.emfileWait=e.emfileWait||1e3;if(e.glob===false){e.disableGlob=true}if(e.disableGlob!==true&&s===undefined){throw Error("glob dependency not found, set `options.disableGlob = true` if intentional")}e.disableGlob=e.disableGlob||false;e.glob=e.glob||c}function rimraf(e,t,r){if(typeof t==="function"){r=t;t={}}n(e,"rimraf: missing path");n.equal(typeof e,"string","rimraf: path should be a string");n.equal(typeof r,"function","rimraf: callback function required");n(t,"rimraf: invalid options argument provided");n.equal(typeof t,"object","rimraf: options should be object");defaults(t);var i=0;var o=null;var a=0;if(t.disableGlob||!s.hasMagic(e))return afterGlob(null,[e]);t.lstat(e,(function(r,n){if(!r)return afterGlob(null,[e]);s(e,t.glob,afterGlob)}));function next(e){o=o||e;if(--a===0)r(o)}function afterGlob(e,n){if(e)return r(e);a=n.length;if(a===0)return r();n.forEach((function(e){rimraf_(e,t,(function CB(r){if(r){if((r.code==="EBUSY"||r.code==="ENOTEMPTY"||r.code==="EPERM")&&i<t.maxBusyTries){i++;var n=i*100;return setTimeout((function(){rimraf_(e,t,CB)}),n)}if(r.code==="EMFILE"&&l<t.emfileWait){return setTimeout((function(){rimraf_(e,t,CB)}),l++)}if(r.code==="ENOENT")r=null}l=0;next(r)}))}))}}function rimraf_(e,t,r){n(e);n(t);n(typeof r==="function");t.lstat(e,(function(n,i){if(n&&n.code==="ENOENT")return r(null);if(n&&n.code==="EPERM"&&u)fixWinEPERM(e,t,n,r);if(i&&i.isDirectory())return rmdir(e,t,n,r);t.unlink(e,(function(n){if(n){if(n.code==="ENOENT")return r(null);if(n.code==="EPERM")return u?fixWinEPERM(e,t,n,r):rmdir(e,t,n,r);if(n.code==="EISDIR")return rmdir(e,t,n,r)}return r(n)}))}))}function fixWinEPERM(e,t,r,i){n(e);n(t);n(typeof i==="function");if(r)n(r instanceof Error);t.chmod(e,a,(function(n){if(n)i(n.code==="ENOENT"?null:r);else t.stat(e,(function(n,o){if(n)i(n.code==="ENOENT"?null:r);else if(o.isDirectory())rmdir(e,t,r,i);else t.unlink(e,i)}))}))}function fixWinEPERMSync(e,t,r){n(e);n(t);if(r)n(r instanceof Error);try{t.chmodSync(e,a)}catch(e){if(e.code==="ENOENT")return;else throw r}try{var i=t.statSync(e)}catch(e){if(e.code==="ENOENT")return;else throw r}if(i.isDirectory())rmdirSync(e,t,r);else t.unlinkSync(e)}function rmdir(e,t,r,i){n(e);n(t);if(r)n(r instanceof Error);n(typeof i==="function");t.rmdir(e,(function(n){if(n&&(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM"))rmkids(e,t,i);else if(n&&n.code==="ENOTDIR")i(r);else i(n)}))}function rmkids(e,t,r){n(e);n(t);n(typeof r==="function");t.readdir(e,(function(n,o){if(n)return r(n);var s=o.length;if(s===0)return t.rmdir(e,r);var a;o.forEach((function(n){rimraf(i.join(e,n),t,(function(n){if(a)return;if(n)return r(a=n);if(--s===0)t.rmdir(e,r)}))}))}))}function rimrafSync(e,t){t=t||{};defaults(t);n(e,"rimraf: missing path");n.equal(typeof e,"string","rimraf: path should be a string");n(t,"rimraf: missing options");n.equal(typeof t,"object","rimraf: options should be object");var r;if(t.disableGlob||!s.hasMagic(e)){r=[e]}else{try{t.lstatSync(e);r=[e]}catch(n){r=s.sync(e,t.glob)}}if(!r.length)return;for(var i=0;i<r.length;i++){var e=r[i];try{var o=t.lstatSync(e)}catch(r){if(r.code==="ENOENT")return;if(r.code==="EPERM"&&u)fixWinEPERMSync(e,t,r)}try{if(o&&o.isDirectory())rmdirSync(e,t,null);else t.unlinkSync(e)}catch(r){if(r.code==="ENOENT")return;if(r.code==="EPERM")return u?fixWinEPERMSync(e,t,r):rmdirSync(e,t,r);if(r.code!=="EISDIR")throw r;rmdirSync(e,t,r)}}}function rmdirSync(e,t,r){n(e);n(t);if(r)n(r instanceof Error);try{t.rmdirSync(e)}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR")throw r;if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")rmkidsSync(e,t)}}function rmkidsSync(e,t){n(e);n(t);t.readdirSync(e).forEach((function(r){rimrafSync(i.join(e,r),t)}));var r=u?100:1;var o=0;do{var s=true;try{var a=t.rmdirSync(e,t);s=false;return a}finally{if(++o<r&&s)continue}}while(true)}},4294:(e,t,r)=>{e.exports=r(4219)},4219:(e,t,r)=>{"use strict";var n=r(1631);var i=r(4016);var o=r(8605);var s=r(7211);var a=r(8614);var c=r(2357);var l=r(1669);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=o.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=s.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=s.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||o.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,n,i){var o=toOptions(r,n,i);for(var s=0,a=t.requests.length;s<a;++s){var c=t.requests[s];if(c.host===o.host&&c.port===o.port){t.requests.splice(s,1);c.request.onSocket(e);return}}e.destroy();t.removeSocket(e)}))}l.inherits(TunnelingAgent,a.EventEmitter);TunnelingAgent.prototype.addRequest=function addRequest(e,t,r,n){var i=this;var o=mergeOptions({request:e},i.options,toOptions(t,r,n));if(i.sockets.length>=this.maxSockets){i.requests.push(o);return}i.createSocket(o,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){i.emit("free",t,o)}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 o=r.request(i);o.useChunkedEncodingByDefault=false;o.once("response",onResponse);o.once("upgrade",onUpgrade);o.once("connect",onConnect);o.once("error",onError);o.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(i,s,a){o.removeAllListeners();s.removeAllListeners();if(i.statusCode!==200){u("tunneling socket could not be established, statusCode=%d",i.statusCode);s.destroy();var c=new Error("tunneling socket could not be established, "+"statusCode="+i.statusCode);c.code="ECONNRESET";e.request.emit("error",c);r.removeSocket(n);return}if(a.length>0){u("got illegal response body from proxy");s.destroy();var c=new Error("got illegal response body from proxy");c.code="ECONNRESET";e.request.emit("error",c);r.removeSocket(n);return}u("tunneling connection has established");r.sockets[r.sockets.indexOf(n)]=s;return t(s)}function onError(t){o.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 o=e.request.getHeader("host");var s=mergeOptions({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):e.host});var a=i.connect(0,s);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<r;++t){var n=arguments[t];if(typeof n==="object"){var i=Object.keys(n);for(var o=0,s=i.length;o<s;++o){var a=i[o];if(n[a]!==undefined){e[a]=n[a]}}}}return e}var u;if(process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)){u=function(){var e=Array.prototype.slice.call(arguments);if(typeof e[0]==="string"){e[0]="TUNNEL: "+e[0]}else{e.unshift("TUNNEL:")}console.error.apply(console,e)}}else{u=function(){}}t.debug=u},2940:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r<t.length;r++){t[r]=arguments[r]}var n=e.apply(this,t);var i=t[t.length-1];if(typeof n==="function"&&n!==i){Object.keys(i).forEach((function(e){n[e]=i[e]}))}return n}}},2357:e=>{"use strict";e.exports=require("assert")},3129:e=>{"use strict";e.exports=require("child_process")},6417:e=>{"use strict";e.exports=require("crypto")},8614:e=>{"use strict";e.exports=require("events")},5747:e=>{"use strict";e.exports=require("fs")},8605:e=>{"use strict";e.exports=require("http")},7211:e=>{"use strict";e.exports=require("https")},1631:e=>{"use strict";e.exports=require("net")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},630:e=>{"use strict";e.exports=require("perf_hooks")},2413:e=>{"use strict";e.exports=require("stream")},4304:e=>{"use strict";e.exports=require("string_decoder")},8213:e=>{"use strict";e.exports=require("timers")},4016:e=>{"use strict";e.exports=require("tls")},8835:e=>{"use strict";e.exports=require("url")},1669:e=>{"use strict";e.exports=require("util")},8761:e=>{"use strict";e.exports=require("zlib")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var o=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{const e=__nccwpck_require__(2605);const t=__nccwpck_require__(5008);async function run(){const r=(await t.getExecOutput("git",["show","-s","--format=%h"])).stdout.trim();const n=`audacity-dependencies-${t.getDateString()}+${r}`;const i=`${n}.tar.gz`;await t.execWithLog("tar",["czf",i,"-C",workspaceDir,".offline"]);const o=e.create();await o.uploadArtifact(n,[i])}run()})();module.exports=r})(); |