require('./sourcemap-register.js');module.exports=(()=>{var e={7351: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(2087));const o=r(5278);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+i.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const 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 o.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return o.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.__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(7351);const c=r(717);const s=r(5278);const a=i(r(2087));const u=i(r(5622));var f;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(f=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=s.toCommandValue(t);process.env[e]=r;const n=process.env["GITHUB_ENV"]||"";if(n){const t="_GitHubActionsFileCommandDelimeter_";const n=`${e}<<${t}${a.EOL}${r}${a.EOL}${t}`;c.issueCommand("ENV",n)}else{o.issueCommand("set-env",{name:e},r)}}t.exportVariable=exportVariable;function setSecret(e){o.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){c.issueCommand("PATH",e)}else{o.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${u.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}return r.trim()}t.getInput=getInput;function setOutput(e,t){o.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){o.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=f.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){o.issueCommand("debug",{},e)}t.debug=debug;function error(e){o.issue("error",e instanceof Error?e.toString():e)}t.error=error;function warning(e){o.issue("warning",e instanceof Error?e.toString():e)}t.warning=warning;function info(e){process.stdout.write(e+a.EOL)}t.info=info;function startGroup(e){o.issue("group",e)}t.startGroup=startGroup;function endGroup(){o.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return n(this,void 0,void 0,function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r})}t.group=group;function saveState(e,t){o.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState},717: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=n(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(!i.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}i.appendFileSync(r,`${c.toCommandValue(t)}${o.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},5278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue},5768:(e,t,r)=>{e.exports=r(6196)().Promise},4549:e=>{"use strict";var t="@@any-promise/REGISTRATION",r=null;e.exports=function(e,n){return function register(i,o){i=i||null;o=o||{};var c=o.global!==false;if(r===null&&c){r=e[t]||null}if(r!==null&&i!==null&&r.implementation!==i){throw new Error('any-promise already defined as "'+r.implementation+'". You can only register an implementation before the first '+' call to require("any-promise") and an implementation cannot be changed')}if(r===null){if(i!==null&&typeof o.Promise!=="undefined"){r={Promise:o.Promise,implementation:i}}else{r=n(i)}if(c){e[t]=r}}return r}}},6196:(e,t,r)=>{"use strict";e.exports=r(4549)(global,loadImplementation);function loadImplementation(e){var t=null;if(shouldPreferGlobalPromise(e)){t={Promise:global.Promise,implementation:"global.Promise"}}else if(e){var r=require(e);t={Promise:r.Promise||r,implementation:e}}else{t=tryAutoDetect()}if(t===null){throw new Error("Cannot find any-promise implementation nor"+" global.Promise. You must install polyfill or call"+' require("any-promise/register") with your preferred'+' implementation, e.g. require("any-promise/register/bluebird")'+' on application load prior to any require("any-promise").')}return t}function shouldPreferGlobalPromise(e){if(e){return e==="global.Promise"}else if(typeof global.Promise!=="undefined"){var t=/v(\d+)\.(\d+)\.(\d+)/.exec(process.version);return!(t&&+t[1]==0&&+t[2]<12)}return false}function tryAutoDetect(){var e=["es6-promise","promise","native-promise-only","bluebird","rsvp","when","q","pinkie","lie","vow"];var t=0,r=e.length;for(;te(...t,...r)}function initialParams(e){return function(...t){var r=t.pop();return e.call(this,t,r)}}var t=typeof setImmediate==="function"&&setImmediate;var r=typeof process==="object"&&typeof process.nextTick==="function";function fallback(e){setTimeout(e,0)}function wrap(e){return(t,...r)=>e(()=>t(...r))}var n;if(t){n=setImmediate}else if(r){n=process.nextTick}else{n=fallback}var i=wrap(n);function asyncify(e){if(isAsync(e)){return function(...t){const r=t.pop();const n=e.apply(this,t);return handlePromise(n,r)}}return initialParams(function(t,r){var n;try{n=e.apply(this,t)}catch(e){return r(e)}if(n&&typeof n.then==="function"){return handlePromise(n,r)}else{r(null,n)}})}function handlePromise(e,t){return e.then(e=>{invokeCallback(t,null,e)},e=>{invokeCallback(t,e&&e.message?e:new Error(e))})}function invokeCallback(e,t,r){try{e(t,r)}catch(e){i(e=>{throw e},e)}}function isAsync(e){return e[Symbol.toStringTag]==="AsyncFunction"}function isAsyncGenerator(e){return e[Symbol.toStringTag]==="AsyncGenerator"}function isAsyncIterable(e){return typeof e[Symbol.asyncIterator]==="function"}function wrapAsync(e){if(typeof e!=="function")throw new Error("expected a function");return isAsync(e)?asyncify(e):e}function awaitify(e,t=e.length){if(!t)throw new Error("arity is undefined");function awaitable(...r){if(typeof r[t-1]==="function"){return e.apply(this,r)}return new Promise((n,i)=>{r[t-1]=((e,...t)=>{if(e)return i(e);n(t.length>1?t:t[0])});e.apply(this,r)})}return awaitable}function applyEach(e){return function applyEach(t,...r){const n=awaitify(function(n){var i=this;return e(t,(e,t)=>{wrapAsync(e).apply(i,r.concat(t))},n)});return n}}function _asyncMap(e,t,r,n){t=t||[];var i=[];var o=0;var c=wrapAsync(r);return e(t,(e,t,r)=>{var n=o++;c(e,(e,t)=>{i[n]=t;r(e)})},e=>{n(e,i)})}function isArrayLike(e){return e&&typeof e.length==="number"&&e.length>=0&&e.length%1===0}const o={};function once(e){function wrapper(...t){if(e===null)return;var r=e;e=null;r.apply(this,t)}Object.assign(wrapper,e);return wrapper}function getIterator(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}function createArrayIterator(e){var t=-1;var r=e.length;return function next(){return++t=t||s||i)return;s=true;e.next().then(({value:e,done:t})=>{if(c||i)return;s=false;if(t){i=true;if(a<=0){n(null)}return}a++;r(e,u,iterateeCallback);u++;replenish()}).catch(handleError)}function iterateeCallback(e,t){a-=1;if(c)return;if(e)return handleError(e);if(e===false){i=true;c=true;return}if(t===o||i&&a<=0){i=true;return n(null)}replenish()}function handleError(e){if(c)return;s=false;i=true;n(e)}replenish()}var c=e=>{return(t,r,n)=>{n=once(n);if(e<=0){throw new RangeError("concurrency limit cannot be less than 1")}if(!t){return n(null)}if(isAsyncGenerator(t)){return asyncEachOfLimit(t,e,r,n)}if(isAsyncIterable(t)){return asyncEachOfLimit(t[Symbol.asyncIterator](),e,r,n)}var i=createIterator(t);var c=false;var s=false;var a=0;var u=false;function iterateeCallback(e,t){if(s)return;a-=1;if(e){c=true;n(e)}else if(e===false){c=true;s=true}else if(t===o||c&&a<=0){c=true;return n(null)}else if(!u){replenish()}}function replenish(){u=true;while(a1?n:n[0])}callback[m]=new Promise((r,n)=>{e=r,t=n});return callback}function auto(e,t,r){if(typeof t!=="number"){r=t;t=null}r=once(r||promiseCallback());var n=Object.keys(e).length;if(!n){return r(null)}if(!t){t=n}var i={};var o=0;var c=false;var s=false;var a=Object.create(null);var u=[];var f=[];var l={};Object.keys(e).forEach(t=>{var r=e[t];if(!Array.isArray(r)){enqueueTask(t,[r]);f.push(t);return}var n=r.slice(0,r.length-1);var i=n.length;if(i===0){enqueueTask(t,r);f.push(t);return}l[t]=i;n.forEach(o=>{if(!e[o]){throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+o+"` in "+n.join(", "))}addListener(o,()=>{i--;if(i===0){enqueueTask(t,r)}})})});checkForDeadlocks();processQueue();function enqueueTask(e,t){u.push(()=>runTask(e,t))}function processQueue(){if(c)return;if(u.length===0&&o===0){return r(null,i)}while(u.length&&oe());processQueue()}function runTask(e,t){if(s)return;var n=onlyOnce((t,...n)=>{o--;if(t===false){c=true;return}if(n.length<2){[n]=n}if(t){var u={};Object.keys(i).forEach(e=>{u[e]=i[e]});u[e]=n;s=true;a=Object.create(null);if(c)return;r(t,u)}else{i[e]=n;taskComplete(e)}});o++;var u=wrapAsync(t[t.length-1]);if(t.length>1){u(i,n)}else{u(n)}}function checkForDeadlocks(){var e;var t=0;while(f.length){e=f.pop();t++;getDependents(e).forEach(e=>{if(--l[e]===0){f.push(e)}})}if(t!==n){throw new Error("async.auto cannot execute tasks due to a recursive dependency")}}function getDependents(t){var r=[];Object.keys(e).forEach(n=>{const i=e[n];if(Array.isArray(i)&&i.indexOf(t)>=0){r.push(n)}});return r}return r[m]}var h=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/;var d=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/;var v=/,/;var S=/(=.+)?(\s*)$/;var w=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function parseParams(e){const t=e.toString().replace(w,"");let r=t.match(h);if(!r){r=t.match(d)}if(!r)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,n]=r;return n.replace(/\s/g,"").split(v).map(e=>e.replace(S,"").trim())}function autoInject(e,t){var r={};Object.keys(e).forEach(t=>{var n=e[t];var i;var o=isAsync(n);var c=!o&&n.length===1||o&&n.length===0;if(Array.isArray(n)){i=[...n];n=i.pop();r[t]=i.concat(i.length>0?newTask:n)}else if(c){r[t]=n}else{i=parseParams(n);if(n.length===0&&!o&&i.length===0){throw new Error("autoInject task functions require explicit parameters.")}if(!o)i.pop();r[t]=i.concat(newTask)}function newTask(e,t){var r=i.map(t=>e[t]);r.push(t);wrapAsync(n)(...r)}});return auto(r,t)}class DLL{constructor(){this.head=this.tail=null;this.length=0}removeLink(e){if(e.prev)e.prev.next=e.next;else this.head=e.next;if(e.next)e.next.prev=e.prev;else this.tail=e.prev;e.prev=e.next=null;this.length-=1;return e}empty(){while(this.head)this.shift();return this}insertAfter(e,t){t.prev=e;t.next=e.next;if(e.next)e.next.prev=t;else this.tail=t;e.next=t;this.length+=1}insertBefore(e,t){t.prev=e.prev;t.next=e;if(e.prev)e.prev.next=t;else this.head=t;e.prev=t;this.length+=1}unshift(e){if(this.head)this.insertBefore(this.head,e);else setInitial(this,e)}push(e){if(this.tail)this.insertAfter(this.tail,e);else setInitial(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){var e=this.head;while(e){yield e.data;e=e.next}}remove(e){var t=this.head;while(t){var{next:r}=t;if(e(t)){this.removeLink(t)}t=r}return this}}function setInitial(e,t){e.length=1;e.head=e.tail=t}function queue(e,t,r){if(t==null){t=1}else if(t===0){throw new RangeError("Concurrency must not be zero")}var n=wrapAsync(e);var o=0;var c=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function on(e,t){s[e].push(t)}function once(e,t){const r=(...n)=>{off(e,r);t(...n)};s[e].push(r)}function off(e,t){if(!e)return Object.keys(s).forEach(e=>s[e]=[]);if(!t)return s[e]=[];s[e]=s[e].filter(e=>e!==t)}function trigger(e,...t){s[e].forEach(e=>e(...t))}var a=false;function _insert(e,t,r,n){if(n!=null&&typeof n!=="function"){throw new Error("task callback must be a function")}l.started=true;var o,c;function promiseCallback(e,...t){if(e)return r?c(e):o();if(t.length<=1)return o(t[0]);o(t)}var s={data:e,callback:r?promiseCallback:n||promiseCallback};if(t){l._tasks.unshift(s)}else{l._tasks.push(s)}if(!a){a=true;i(()=>{a=false;l.process()})}if(r||!n){return new Promise((e,t)=>{o=e;c=t})}}function _createCB(e){return function(t,...r){o-=1;for(var n=0,i=e.length;n0){c.splice(a,1)}s.callback(t,...r);if(t!=null){trigger("error",t,s.data)}}if(o<=l.concurrency-l.buffer){trigger("unsaturated")}if(l.idle()){trigger("drain")}l.process()}}function _maybeDrain(e){if(e.length===0&&l.idle()){i(()=>trigger("drain"));return true}return false}const u=e=>t=>{if(!t){return new Promise((t,r)=>{once(e,(e,n)=>{if(e)return r(e);t(n)})})}off(e);on(e,t)};var f=false;var l={_tasks:new DLL,*[Symbol.iterator](){yield*l._tasks[Symbol.iterator]()},concurrency:t,payload:r,buffer:t/4,started:false,paused:false,push(e,t){if(Array.isArray(e)){if(_maybeDrain(e))return;return e.map(e=>_insert(e,false,false,t))}return _insert(e,false,false,t)},pushAsync(e,t){if(Array.isArray(e)){if(_maybeDrain(e))return;return e.map(e=>_insert(e,false,true,t))}return _insert(e,false,true,t)},kill(){off();l._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(_maybeDrain(e))return;return e.map(e=>_insert(e,true,false,t))}return _insert(e,true,false,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(_maybeDrain(e))return;return e.map(e=>_insert(e,true,true,t))}return _insert(e,true,true,t)},remove(e){l._tasks.remove(e)},process(){if(f){return}f=true;while(!l.paused&&o{i(t,e,(e,r)=>{t=r;n(e)})},e=>n(e,t))}var g=awaitify(reduce,4);function seq(...e){var t=e.map(wrapAsync);return function(...e){var r=this;var n=e[e.length-1];if(typeof n=="function"){e.pop()}else{n=promiseCallback()}g(t,e,(e,t,n)=>{t.apply(r,e.concat((e,...t)=>{n(e,t)}))},(e,t)=>n(e,...t));return n[m]}}function compose(...e){return seq(...e.reverse())}function mapLimit(e,t,r,n){return _asyncMap(c(t),e,r,n)}var E=awaitify(mapLimit,4);function concatLimit(e,t,r,n){var i=wrapAsync(r);return E(e,t,(e,t)=>{i(e,(e,...r)=>{if(e)return t(e);return t(e,r)})},(e,t)=>{var r=[];for(var i=0;i{var s=false;var a;const u=wrapAsync(i);r(n,(r,n,i)=>{u(r,(n,c)=>{if(n||n===false)return i(n);if(e(c)&&!a){s=true;a=t(true,r);return i(null,o)}i()})},e=>{if(e)return c(e);c(null,s?a:t(false))})}}function detect(e,t,r){return _createTester(e=>e,(e,t)=>t)(a,e,t,r)}var O=awaitify(detect,3);function detectLimit(e,t,r,n){return _createTester(e=>e,(e,t)=>t)(c(t),e,r,n)}var A=awaitify(detectLimit,4);function detectSeries(e,t,r){return _createTester(e=>e,(e,t)=>t)(c(1),e,t,r)}var F=awaitify(detectSeries,3);function consoleFunc(e){return(t,...r)=>wrapAsync(t)(...r,(t,...r)=>{if(typeof console==="object"){if(t){if(console.error){console.error(t)}}else if(console[e]){r.forEach(t=>console[e](t))}}})}var P=consoleFunc("dir");function doWhilst(e,t,r){r=onlyOnce(r);var n=wrapAsync(e);var i=wrapAsync(t);var o;function next(e,...t){if(e)return r(e);if(e===false)return;o=t;i(...t,check)}function check(e,t){if(e)return r(e);if(e===false)return;if(!t)return r(null,...o);n(next)}return check(null,true)}var _=awaitify(doWhilst,3);function doUntil(e,t,r){const n=wrapAsync(t);return _(e,(...e)=>{const t=e.pop();n(...e,(e,r)=>t(e,!r))},r)}function _withoutIndex(e){return(t,r,n)=>e(t,n)}function eachLimit(e,t,r){return a(e,_withoutIndex(wrapAsync(t)),r)}var L=awaitify(eachLimit,3);function eachLimit$1(e,t,r,n){return c(t)(e,_withoutIndex(wrapAsync(r)),n)}var C=awaitify(eachLimit$1,4);function eachSeries(e,t,r){return C(e,1,t,r)}var D=awaitify(eachSeries,3);function ensureAsync(e){if(isAsync(e))return e;return function(...t){var r=t.pop();var n=true;t.push((...e)=>{if(n){i(()=>r(...e))}else{r(...e)}});e.apply(this,t);n=false}}function every(e,t,r){return _createTester(e=>!e,e=>!e)(a,e,t,r)}var j=awaitify(every,3);function everyLimit(e,t,r,n){return _createTester(e=>!e,e=>!e)(c(t),e,r,n)}var T=awaitify(everyLimit,4);function everySeries(e,t,r){return _createTester(e=>!e,e=>!e)(l,e,t,r)}var I=awaitify(everySeries,3);function filterArray(e,t,r,n){var i=new Array(t.length);e(t,(e,t,n)=>{r(e,(e,r)=>{i[t]=!!r;n(e)})},e=>{if(e)return n(e);var r=[];for(var o=0;o{r(e,(r,o)=>{if(r)return n(r);if(o){i.push({index:t,value:e})}n(r)})},e=>{if(e)return n(e);n(null,i.sort((e,t)=>e.index-t.index).map(e=>e.value))})}function _filter(e,t,r,n){var i=isArrayLike(t)?filterArray:filterGeneric;return i(e,t,wrapAsync(r),n)}function filter(e,t,r){return _filter(a,e,t,r)}var N=awaitify(filter,3);function filterLimit(e,t,r,n){return _filter(c(t),e,r,n)}var M=awaitify(filterLimit,4);function filterSeries(e,t,r){return _filter(l,e,t,r)}var $=awaitify(filterSeries,3);function forever(e,t){var r=onlyOnce(t);var n=wrapAsync(ensureAsync(e));function next(e){if(e)return r(e);if(e===false)return;n(next)}return next()}var B=awaitify(forever,2);function groupByLimit(e,t,r,n){var i=wrapAsync(r);return E(e,t,(e,t)=>{i(e,(r,n)=>{if(r)return t(r);return t(r,{key:n,val:e})})},(e,t)=>{var r={};var{hasOwnProperty:i}=Object.prototype;for(var o=0;o{o(e,t,(e,n)=>{if(e)return r(e);i[t]=n;r(e)})},e=>n(e,i))}var q=awaitify(mapValuesLimit,4);function mapValues(e,t,r){return q(e,Infinity,t,r)}function mapValuesSeries(e,t,r){return q(e,1,t,r)}function memoize(e,t=(e=>e)){var r=Object.create(null);var n=Object.create(null);var o=wrapAsync(e);var c=initialParams((e,c)=>{var s=t(...e);if(s in r){i(()=>c(null,...r[s]))}else if(s in n){n[s].push(c)}else{n[s]=[c];o(...e,(e,...t)=>{if(!e){r[s]=t}var i=n[s];delete n[s];for(var o=0,c=i.length;o{var n=isArrayLike(t)?[]:{};e(t,(e,t,r)=>{wrapAsync(e)((e,...i)=>{if(i.length<2){[i]=i}n[t]=i;r(e)})},e=>r(e,n))},3);function parallel$1(e,t){return V(a,e,t)}function parallelLimit(e,t,r){return V(c(t),e,r)}function queue$1(e,t){var r=wrapAsync(e);return queue((e,t)=>{r(e[0],t)},t,1)}class Heap{constructor(){this.heap=[];this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){this.heap=[];return this}percUp(e){let t;while(e>0&&smaller(this.heap[e],this.heap[t=parent(e)])){let r=this.heap[e];this.heap[e]=this.heap[t];this.heap[t]=r;e=t}}percDown(e){let t;while((t=leftChi(e))=0;e--){this.percDown(e)}return this}}function leftChi(e){return(e<<1)+1}function parent(e){return(e+1>>1)-1}function smaller(e,t){if(e.priority!==t.priority){return e.priority{})){if(typeof n!=="function"){throw new Error("task callback must be a function")}r.started=true;if(!Array.isArray(e)){e=[e]}if(e.length===0&&r.idle()){return i(()=>r.drain())}for(var o=0,c=e.length;o{let n={};if(e){n.error=e}if(t.length>0){var i=t;if(t.length<=1){[i]=t}n.value=i}r(null,n)});return t.apply(this,e)})}function reflectAll(e){var t;if(Array.isArray(e)){t=e.map(reflect)}else{t={};Object.keys(e).forEach(r=>{t[r]=reflect.call(this,e[r])})}return t}function reject(e,t,r,n){const i=wrapAsync(r);return _filter(e,t,(e,t)=>{i(e,(e,r)=>{t(e,!r)})},n)}function reject$1(e,t,r){return reject(a,e,t,r)}var z=awaitify(reject$1,3);function rejectLimit(e,t,r,n){return reject(c(t),e,r,n)}var Y=awaitify(rejectLimit,4);function rejectSeries(e,t,r){return reject(l,e,t,r)}var Q=awaitify(rejectSeries,3);function constant$1(e){return function(){return e}}const H=5;const K=0;function retry(e,t,r){var n={times:H,intervalFunc:constant$1(K)};if(arguments.length<3&&typeof e==="function"){r=t||promiseCallback();t=e}else{parseTimes(n,e);r=r||promiseCallback()}if(typeof t!=="function"){throw new Error("Invalid arguments for async.retry")}var i=wrapAsync(t);var o=1;function retryAttempt(){i((e,...t)=>{if(e===false)return;if(e&&o++{if(t.lengthe)(a,e,t,r)}var X=awaitify(some,3);function someLimit(e,t,r,n){return _createTester(Boolean,e=>e)(c(t),e,r,n)}var Z=awaitify(someLimit,4);function someSeries(e,t,r){return _createTester(Boolean,e=>e)(l,e,t,r)}var ee=awaitify(someSeries,3);function sortBy(e,t,r){var n=wrapAsync(t);return u(e,(e,t)=>{n(e,(r,n)=>{if(r)return t(r);t(r,{value:e,criteria:n})})},(e,t)=>{if(e)return r(e);r(null,t.sort(comparator).map(e=>e.value))});function comparator(e,t){var r=e.criteria,n=t.criteria;return rn?1:0}}var te=awaitify(sortBy,3);function timeout(e,t,r){var n=wrapAsync(e);return initialParams((i,o)=>{var c=false;var s;function timeoutCallback(){var t=e.name||"anonymous";var n=new Error('Callback function "'+t+'" timed out.');n.code="ETIMEDOUT";if(r){n.info=r}c=true;o(n)}i.push((...e)=>{if(!c){o(...e);clearTimeout(s)}});s=setTimeout(timeoutCallback,t);n(...i)})}function range(e){var t=Array(e);while(e--){t[e]=e}return t}function timesLimit(e,t,r,n){var i=wrapAsync(r);return E(range(e),t,i,n)}function times(e,t,r){return timesLimit(e,Infinity,t,r)}function timesSeries(e,t,r){return timesLimit(e,1,t,r)}function transform(e,t,r,n){if(arguments.length<=3&&typeof t==="function"){n=r;r=t;t=Array.isArray(e)?[]:{}}n=once(n||promiseCallback());var i=wrapAsync(r);a(e,(e,r,n)=>{i(t,e,r,n)},e=>n(e,t));return n[m]}function tryEach(e,t){var r=null;var n;return D(e,(e,t)=>{wrapAsync(e)((e,...i)=>{if(e===false)return t(e);if(i.length<2){[n]=i}else{n=i}r=e;t(e?null:{})})},()=>t(r,n))}var re=awaitify(tryEach);function unmemoize(e){return(...t)=>{return(e.unmemoized||e)(...t)}}function whilst(e,t,r){r=onlyOnce(r);var n=wrapAsync(t);var i=wrapAsync(e);var o=[];function next(e,...t){if(e)return r(e);o=t;if(e===false)return;i(check)}function check(e,t){if(e)return r(e);if(e===false)return;if(!t)return r(null,...o);n(next)}return i(check)}var ne=awaitify(whilst,3);function until(e,t,r){const n=wrapAsync(e);return ne(e=>n((t,r)=>e(t,!r)),t,r)}function waterfall(e,t){t=once(t);if(!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function nextTask(t){var n=wrapAsync(e[r++]);n(...t,onlyOnce(next))}function next(n,...i){if(n===false)return;if(n||r===e.length){return t(n,...i)}nextTask(i)}nextTask([])}var ie=awaitify(waterfall);var oe={apply:apply,applyEach:f,applyEachSeries:y,asyncify:asyncify,auto:auto,autoInject:autoInject,cargo:cargo,cargoQueue:cargo$1,compose:compose,concat:b,concatLimit:k,concatSeries:x,constant:constant,detect:O,detectLimit:A,detectSeries:F,dir:P,doUntil:doUntil,doWhilst:_,each:L,eachLimit:C,eachOf:a,eachOfLimit:s,eachOfSeries:l,eachSeries:D,ensureAsync:ensureAsync,every:j,everyLimit:T,everySeries:I,filter:N,filterLimit:M,filterSeries:$,forever:B,groupBy:groupBy,groupByLimit:R,groupBySeries:groupBySeries,log:W,map:u,mapLimit:E,mapSeries:p,mapValues:mapValues,mapValuesLimit:q,mapValuesSeries:mapValuesSeries,memoize:memoize,nextTick:J,parallel:parallel$1,parallelLimit:parallelLimit,priorityQueue:priorityQueue,queue:queue$1,race:U,reduce:g,reduceRight:reduceRight,reflect:reflect,reflectAll:reflectAll,reject:z,rejectLimit:Y,rejectSeries:Q,retry:retry,retryable:retryable,seq:seq,series:series,setImmediate:i,some:X,someLimit:Z,someSeries:ee,sortBy:te,timeout:timeout,times:times,timesLimit:timesLimit,timesSeries:timesSeries,transform:transform,tryEach:re,unmemoize:unmemoize,until:until,waterfall:ie,whilst:ne,all:j,allLimit:T,allSeries:I,any:X,anyLimit:Z,anySeries:ee,find:O,findLimit:A,findSeries:F,flatMap:b,flatMapLimit:k,flatMapSeries:x,forEach:L,forEachSeries:D,forEachLimit:C,forEachOf:a,forEachOfSeries:l,forEachOfLimit:s,inject:g,foldl:g,foldr:reduceRight,select:N,selectLimit:M,selectSeries:$,wrapSync:asyncify,during:ne,doDuring:_};e.default=oe;e.apply=apply;e.applyEach=f;e.applyEachSeries=y;e.asyncify=asyncify;e.auto=auto;e.autoInject=autoInject;e.cargo=cargo;e.cargoQueue=cargo$1;e.compose=compose;e.concat=b;e.concatLimit=k;e.concatSeries=x;e.constant=constant;e.detect=O;e.detectLimit=A;e.detectSeries=F;e.dir=P;e.doUntil=doUntil;e.doWhilst=_;e.each=L;e.eachLimit=C;e.eachOf=a;e.eachOfLimit=s;e.eachOfSeries=l;e.eachSeries=D;e.ensureAsync=ensureAsync;e.every=j;e.everyLimit=T;e.everySeries=I;e.filter=N;e.filterLimit=M;e.filterSeries=$;e.forever=B;e.groupBy=groupBy;e.groupByLimit=R;e.groupBySeries=groupBySeries;e.log=W;e.map=u;e.mapLimit=E;e.mapSeries=p;e.mapValues=mapValues;e.mapValuesLimit=q;e.mapValuesSeries=mapValuesSeries;e.memoize=memoize;e.nextTick=J;e.parallel=parallel$1;e.parallelLimit=parallelLimit;e.priorityQueue=priorityQueue;e.queue=queue$1;e.race=U;e.reduce=g;e.reduceRight=reduceRight;e.reflect=reflect;e.reflectAll=reflectAll;e.reject=z;e.rejectLimit=Y;e.rejectSeries=Q;e.retry=retry;e.retryable=retryable;e.seq=seq;e.series=series;e.setImmediate=i;e.some=X;e.someLimit=Z;e.someSeries=ee;e.sortBy=te;e.timeout=timeout;e.times=times;e.timesLimit=timesLimit;e.timesSeries=timesSeries;e.transform=transform;e.tryEach=re;e.unmemoize=unmemoize;e.until=until;e.waterfall=ie;e.whilst=ne;e.all=j;e.allLimit=T;e.allSeries=I;e.any=X;e.anyLimit=Z;e.anySeries=ee;e.find=O;e.findLimit=A;e.findSeries=F;e.flatMap=b;e.flatMapLimit=k;e.flatMapSeries=x;e.forEach=L;e.forEachSeries=D;e.forEachLimit=C;e.forEachOf=a;e.forEachOfSeries=l;e.forEachOfLimit=s;e.inject=g;e.foldl=g;e.foldr=reduceRight;e.select=N;e.selectLimit=M;e.selectSeries=$;e.wrapSync=asyncify;e.during=ne;e.doDuring=_;Object.defineProperty(e,"__esModule",{value:true})})},5995:e=>{e.exports=(e=>{const t=process.versions.node.split(".").map(e=>parseInt(e,10));e=e.split(".").map(e=>parseInt(e,10));return t[0]>e[0]||t[0]===e[0]&&(t[1]>e[1]||t[1]===e[1]&&t[2]>=e[2])})},3338:(e,t,r)=>{"use strict";const n=r(7758);const i=r(5622);const o=r(8605).mkdirsSync;const c=r(2548).utimesMillisSync;const s=r(3901);function copySync(e,t,r){if(typeof r==="function"){r={filter:r}}r=r||{};r.clobber="clobber"in r?!!r.clobber:true;r.overwrite="overwrite"in r?!!r.overwrite:r.clobber;if(r.preserveTimestamps&&process.arch==="ia32"){console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`)}const{srcStat:n,destStat:i}=s.checkPathsSync(e,t,"copy");s.checkParentPathsSync(e,n,t,"copy");return handleFilterAndCopy(i,e,t,r)}function handleFilterAndCopy(e,t,r,c){if(c.filter&&!c.filter(t,r))return;const s=i.dirname(r);if(!n.existsSync(s))o(s);return startCopy(e,t,r,c)}function startCopy(e,t,r,n){if(n.filter&&!n.filter(t,r))return;return getStats(e,t,r,n)}function getStats(e,t,r,i){const o=i.dereference?n.statSync:n.lstatSync;const c=o(t);if(c.isDirectory())return onDir(c,e,t,r,i);else if(c.isFile()||c.isCharacterDevice()||c.isBlockDevice())return onFile(c,e,t,r,i);else if(c.isSymbolicLink())return onLink(e,t,r,i)}function onFile(e,t,r,n,i){if(!t)return copyFile(e,r,n,i);return mayCopyFile(e,r,n,i)}function mayCopyFile(e,t,r,i){if(i.overwrite){n.unlinkSync(r);return copyFile(e,t,r,i)}else if(i.errorOnExist){throw new Error(`'${r}' already exists`)}}function copyFile(e,t,r,i){n.copyFileSync(t,r);if(i.preserveTimestamps)handleTimestamps(e.mode,t,r);return setDestMode(r,e.mode)}function handleTimestamps(e,t,r){if(fileIsNotWritable(e))makeFileWritable(r,e);return setDestTimestamps(t,r)}function fileIsNotWritable(e){return(e&128)===0}function makeFileWritable(e,t){return setDestMode(e,t|128)}function setDestMode(e,t){return n.chmodSync(e,t)}function setDestTimestamps(e,t){const r=n.statSync(e);return c(t,r.atime,r.mtime)}function onDir(e,t,r,n,i){if(!t)return mkDirAndCopy(e.mode,r,n,i);if(t&&!t.isDirectory()){throw new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`)}return copyDir(r,n,i)}function mkDirAndCopy(e,t,r,i){n.mkdirSync(r);copyDir(t,r,i);return setDestMode(r,e)}function copyDir(e,t,r){n.readdirSync(e).forEach(n=>copyDirItem(n,e,t,r))}function copyDirItem(e,t,r,n){const o=i.join(t,e);const c=i.join(r,e);const{destStat:a}=s.checkPathsSync(o,c,"copy");return startCopy(a,o,c,n)}function onLink(e,t,r,o){let c=n.readlinkSync(t);if(o.dereference){c=i.resolve(process.cwd(),c)}if(!e){return n.symlinkSync(c,r)}else{let e;try{e=n.readlinkSync(r)}catch(e){if(e.code==="EINVAL"||e.code==="UNKNOWN")return n.symlinkSync(c,r);throw e}if(o.dereference){e=i.resolve(process.cwd(),e)}if(s.isSrcSubdir(c,e)){throw new Error(`Cannot copy '${c}' to a subdirectory of itself, '${e}'.`)}if(n.statSync(r).isDirectory()&&s.isSrcSubdir(e,c)){throw new Error(`Cannot overwrite '${e}' with '${c}'.`)}return copyLink(c,r)}}function copyLink(e,t){n.unlinkSync(t);return n.symlinkSync(e,t)}e.exports=copySync},1135:(e,t,r)=>{"use strict";e.exports={copySync:r(3338)}},8834:(e,t,r)=>{"use strict";const n=r(7758);const i=r(5622);const o=r(8605).mkdirs;const c=r(3835).pathExists;const s=r(2548).utimesMillis;const a=r(3901);function copy(e,t,r,n){if(typeof r==="function"&&!n){n=r;r={}}else if(typeof r==="function"){r={filter:r}}n=n||function(){};r=r||{};r.clobber="clobber"in r?!!r.clobber:true;r.overwrite="overwrite"in r?!!r.overwrite:r.clobber;if(r.preserveTimestamps&&process.arch==="ia32"){console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269`)}a.checkPaths(e,t,"copy",(i,o)=>{if(i)return n(i);const{srcStat:c,destStat:s}=o;a.checkParentPaths(e,c,t,"copy",i=>{if(i)return n(i);if(r.filter)return handleFilter(checkParentDir,s,e,t,r,n);return checkParentDir(s,e,t,r,n)})})}function checkParentDir(e,t,r,n,s){const a=i.dirname(r);c(a,(i,c)=>{if(i)return s(i);if(c)return startCopy(e,t,r,n,s);o(a,i=>{if(i)return s(i);return startCopy(e,t,r,n,s)})})}function handleFilter(e,t,r,n,i,o){Promise.resolve(i.filter(r,n)).then(c=>{if(c)return e(t,r,n,i,o);return o()},e=>o(e))}function startCopy(e,t,r,n,i){if(n.filter)return handleFilter(getStats,e,t,r,n,i);return getStats(e,t,r,n,i)}function getStats(e,t,r,i,o){const c=i.dereference?n.stat:n.lstat;c(t,(n,c)=>{if(n)return o(n);if(c.isDirectory())return onDir(c,e,t,r,i,o);else if(c.isFile()||c.isCharacterDevice()||c.isBlockDevice())return onFile(c,e,t,r,i,o);else if(c.isSymbolicLink())return onLink(e,t,r,i,o)})}function onFile(e,t,r,n,i,o){if(!t)return copyFile(e,r,n,i,o);return mayCopyFile(e,r,n,i,o)}function mayCopyFile(e,t,r,i,o){if(i.overwrite){n.unlink(r,n=>{if(n)return o(n);return copyFile(e,t,r,i,o)})}else if(i.errorOnExist){return o(new Error(`'${r}' already exists`))}else return o()}function copyFile(e,t,r,i,o){n.copyFile(t,r,n=>{if(n)return o(n);if(i.preserveTimestamps)return handleTimestampsAndMode(e.mode,t,r,o);return setDestMode(r,e.mode,o)})}function handleTimestampsAndMode(e,t,r,n){if(fileIsNotWritable(e)){return makeFileWritable(r,e,i=>{if(i)return n(i);return setDestTimestampsAndMode(e,t,r,n)})}return setDestTimestampsAndMode(e,t,r,n)}function fileIsNotWritable(e){return(e&128)===0}function makeFileWritable(e,t,r){return setDestMode(e,t|128,r)}function setDestTimestampsAndMode(e,t,r,n){setDestTimestamps(t,r,t=>{if(t)return n(t);return setDestMode(r,e,n)})}function setDestMode(e,t,r){return n.chmod(e,t,r)}function setDestTimestamps(e,t,r){n.stat(e,(e,n)=>{if(e)return r(e);return s(t,n.atime,n.mtime,r)})}function onDir(e,t,r,n,i,o){if(!t)return mkDirAndCopy(e.mode,r,n,i,o);if(t&&!t.isDirectory()){return o(new Error(`Cannot overwrite non-directory '${n}' with directory '${r}'.`))}return copyDir(r,n,i,o)}function mkDirAndCopy(e,t,r,i,o){n.mkdir(r,n=>{if(n)return o(n);copyDir(t,r,i,t=>{if(t)return o(t);return setDestMode(r,e,o)})})}function copyDir(e,t,r,i){n.readdir(e,(n,o)=>{if(n)return i(n);return copyDirItems(o,e,t,r,i)})}function copyDirItems(e,t,r,n,i){const o=e.pop();if(!o)return i();return copyDirItem(e,o,t,r,n,i)}function copyDirItem(e,t,r,n,o,c){const s=i.join(r,t);const u=i.join(n,t);a.checkPaths(s,u,"copy",(t,i)=>{if(t)return c(t);const{destStat:a}=i;startCopy(a,s,u,o,t=>{if(t)return c(t);return copyDirItems(e,r,n,o,c)})})}function onLink(e,t,r,o,c){n.readlink(t,(t,s)=>{if(t)return c(t);if(o.dereference){s=i.resolve(process.cwd(),s)}if(!e){return n.symlink(s,r,c)}else{n.readlink(r,(t,u)=>{if(t){if(t.code==="EINVAL"||t.code==="UNKNOWN")return n.symlink(s,r,c);return c(t)}if(o.dereference){u=i.resolve(process.cwd(),u)}if(a.isSrcSubdir(s,u)){return c(new Error(`Cannot copy '${s}' to a subdirectory of itself, '${u}'.`))}if(e.isDirectory()&&a.isSrcSubdir(u,s)){return c(new Error(`Cannot overwrite '${u}' with '${s}'.`))}return copyLink(s,r,c)})}})}function copyLink(e,t,r){n.unlink(t,i=>{if(i)return r(i);return n.symlink(e,t,r)})}e.exports=copy},1335:(e,t,r)=>{"use strict";const n=r(9046).E;e.exports={copy:n(r(8834))}},6970:(e,t,r)=>{"use strict";const n=r(9046).E;const i=r(7758);const o=r(5622);const c=r(8605);const s=r(7357);const a=n(function emptyDir(e,t){t=t||function(){};i.readdir(e,(r,n)=>{if(r)return c.mkdirs(e,t);n=n.map(t=>o.join(e,t));deleteItem();function deleteItem(){const e=n.pop();if(!e)return t();s.remove(e,e=>{if(e)return t(e);deleteItem()})}})});function emptyDirSync(e){let t;try{t=i.readdirSync(e)}catch{return c.mkdirsSync(e)}t.forEach(t=>{t=o.join(e,t);s.removeSync(t)})}e.exports={emptyDirSync:emptyDirSync,emptydirSync:emptyDirSync,emptyDir:a,emptydir:a}},2164:(e,t,r)=>{"use strict";const n=r(9046).E;const i=r(5622);const o=r(7758);const c=r(8605);function createFile(e,t){function makeFile(){o.writeFile(e,"",e=>{if(e)return t(e);t()})}o.stat(e,(r,n)=>{if(!r&&n.isFile())return t();const s=i.dirname(e);o.stat(s,(e,r)=>{if(e){if(e.code==="ENOENT"){return c.mkdirs(s,e=>{if(e)return t(e);makeFile()})}return t(e)}if(r.isDirectory())makeFile();else{o.readdir(s,e=>{if(e)return t(e)})}})})}function createFileSync(e){let t;try{t=o.statSync(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);try{if(!o.statSync(r).isDirectory()){o.readdirSync(r)}}catch(e){if(e&&e.code==="ENOENT")c.mkdirsSync(r);else throw e}o.writeFileSync(e,"")}e.exports={createFile:n(createFile),createFileSync:createFileSync}},55:(e,t,r)=>{"use strict";const n=r(2164);const i=r(3797);const o=r(2549);e.exports={createFile:n.createFile,createFileSync:n.createFileSync,ensureFile:n.createFile,ensureFileSync:n.createFileSync,createLink:i.createLink,createLinkSync:i.createLinkSync,ensureLink:i.createLink,ensureLinkSync:i.createLinkSync,createSymlink:o.createSymlink,createSymlinkSync:o.createSymlinkSync,ensureSymlink:o.createSymlink,ensureSymlinkSync:o.createSymlinkSync}},3797:(e,t,r)=>{"use strict";const n=r(9046).E;const i=r(5622);const o=r(7758);const c=r(8605);const s=r(3835).pathExists;function createLink(e,t,r){function makeLink(e,t){o.link(e,t,e=>{if(e)return r(e);r(null)})}s(t,(n,a)=>{if(n)return r(n);if(a)return r(null);o.lstat(e,n=>{if(n){n.message=n.message.replace("lstat","ensureLink");return r(n)}const o=i.dirname(t);s(o,(n,i)=>{if(n)return r(n);if(i)return makeLink(e,t);c.mkdirs(o,n=>{if(n)return r(n);makeLink(e,t)})})})})}function createLinkSync(e,t){const r=o.existsSync(t);if(r)return undefined;try{o.lstatSync(e)}catch(e){e.message=e.message.replace("lstat","ensureLink");throw e}const n=i.dirname(t);const s=o.existsSync(n);if(s)return o.linkSync(e,t);c.mkdirsSync(n);return o.linkSync(e,t)}e.exports={createLink:n(createLink),createLinkSync:createLinkSync}},3727:(e,t,r)=>{"use strict";const n=r(5622);const i=r(7758);const o=r(3835).pathExists;function symlinkPaths(e,t,r){if(n.isAbsolute(e)){return i.lstat(e,t=>{if(t){t.message=t.message.replace("lstat","ensureSymlink");return r(t)}return r(null,{toCwd:e,toDst:e})})}else{const c=n.dirname(t);const s=n.join(c,e);return o(s,(t,o)=>{if(t)return r(t);if(o){return r(null,{toCwd:s,toDst:e})}else{return i.lstat(e,t=>{if(t){t.message=t.message.replace("lstat","ensureSymlink");return r(t)}return r(null,{toCwd:e,toDst:n.relative(c,e)})})}})}}function symlinkPathsSync(e,t){let r;if(n.isAbsolute(e)){r=i.existsSync(e);if(!r)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}else{const o=n.dirname(t);const c=n.join(o,e);r=i.existsSync(c);if(r){return{toCwd:c,toDst:e}}else{r=i.existsSync(e);if(!r)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(o,e)}}}}e.exports={symlinkPaths:symlinkPaths,symlinkPathsSync:symlinkPathsSync}},8254:(e,t,r)=>{"use strict";const n=r(7758);function symlinkType(e,t,r){r=typeof t==="function"?t:r;t=typeof t==="function"?false:t;if(t)return r(null,t);n.lstat(e,(e,n)=>{if(e)return r(null,"file");t=n&&n.isDirectory()?"dir":"file";r(null,t)})}function symlinkTypeSync(e,t){let r;if(t)return t;try{r=n.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}e.exports={symlinkType:symlinkType,symlinkTypeSync:symlinkTypeSync}},2549:(e,t,r)=>{"use strict";const n=r(9046).E;const i=r(5622);const o=r(7758);const c=r(8605);const s=c.mkdirs;const a=c.mkdirsSync;const u=r(3727);const f=u.symlinkPaths;const l=u.symlinkPathsSync;const p=r(8254);const y=p.symlinkType;const m=p.symlinkTypeSync;const h=r(3835).pathExists;function createSymlink(e,t,r,n){n=typeof r==="function"?r:n;r=typeof r==="function"?false:r;h(t,(c,a)=>{if(c)return n(c);if(a)return n(null);f(e,t,(c,a)=>{if(c)return n(c);e=a.toDst;y(a.toCwd,r,(r,c)=>{if(r)return n(r);const a=i.dirname(t);h(a,(r,i)=>{if(r)return n(r);if(i)return o.symlink(e,t,c,n);s(a,r=>{if(r)return n(r);o.symlink(e,t,c,n)})})})})})}function createSymlinkSync(e,t,r){const n=o.existsSync(t);if(n)return undefined;const c=l(e,t);e=c.toDst;r=m(c.toCwd,r);const s=i.dirname(t);const u=o.existsSync(s);if(u)return o.symlinkSync(e,t,r);a(s);return o.symlinkSync(e,t,r)}e.exports={createSymlink:n(createSymlink),createSymlinkSync:createSymlinkSync}},1176:(e,t,r)=>{"use strict";const n=r(9046).E;const i=r(7758);const o=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(e=>{return typeof i[e]==="function"});Object.keys(i).forEach(e=>{if(e==="promises"){return}t[e]=i[e]});o.forEach(e=>{t[e]=n(i[e])});t.exists=function(e,t){if(typeof t==="function"){return i.exists(e,t)}return new Promise(t=>{return i.exists(e,t)})};t.read=function(e,t,r,n,o,c){if(typeof c==="function"){return i.read(e,t,r,n,o,c)}return new Promise((c,s)=>{i.read(e,t,r,n,o,(e,t,r)=>{if(e)return s(e);c({bytesRead:t,buffer:r})})})};t.write=function(e,t,...r){if(typeof r[r.length-1]==="function"){return i.write(e,t,...r)}return new Promise((n,o)=>{i.write(e,t,...r,(e,t,r)=>{if(e)return o(e);n({bytesWritten:t,buffer:r})})})};if(typeof i.writev==="function"){t.writev=function(e,t,...r){if(typeof r[r.length-1]==="function"){return i.writev(e,t,...r)}return new Promise((n,o)=>{i.writev(e,t,...r,(e,t,r)=>{if(e)return o(e);n({bytesWritten:t,buffers:r})})})}}if(typeof i.realpath.native==="function"){t.realpath.native=n(i.realpath.native)}},5630:(e,t,r)=>{"use strict";e.exports={...r(1176),...r(1135),...r(1335),...r(6970),...r(55),...r(213),...r(8605),...r(9665),...r(1497),...r(6570),...r(3835),...r(7357)};const n=r(5747);if(Object.getOwnPropertyDescriptor(n,"promises")){Object.defineProperty(e.exports,"promises",{get(){return n.promises}})}},213:(e,t,r)=>{"use strict";const n=r(9046).p;const i=r(8970);i.outputJson=n(r(531));i.outputJsonSync=r(9421);i.outputJSON=i.outputJson;i.outputJSONSync=i.outputJsonSync;i.writeJSON=i.writeJson;i.writeJSONSync=i.writeJsonSync;i.readJSON=i.readJson;i.readJSONSync=i.readJsonSync;e.exports=i},8970:(e,t,r)=>{"use strict";const n=r(6160);e.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}},9421:(e,t,r)=>{"use strict";const{stringify:n}=r(5902);const{outputFileSync:i}=r(6570);function outputJsonSync(e,t,r){const o=n(t,r);i(e,o,r)}e.exports=outputJsonSync},531:(e,t,r)=>{"use strict";const{stringify:n}=r(5902);const{outputFile:i}=r(6570);async function outputJson(e,t,r={}){const o=n(t,r);await i(e,o,r)}e.exports=outputJson},8605:(e,t,r)=>{"use strict";const n=r(9046).p;const{makeDir:i,makeDirSync:o}=r(2751);const c=n(i);e.exports={mkdirs:c,mkdirsSync:o,mkdirp:c,mkdirpSync:o,ensureDir:c,ensureDirSync:o}},2751:(e,t,r)=>{"use strict";const n=r(1176);const i=r(5622);const o=r(5995);const c=o("10.12.0");const s=e=>{if(process.platform==="win32"){const t=/[<>:"|?*]/.test(e.replace(i.parse(e).root,""));if(t){const t=new Error(`Path contains invalid characters: ${e}`);t.code="EINVAL";throw t}}};const a=e=>{const t={mode:511};if(typeof e==="number")e={mode:e};return{...t,...e}};const u=e=>{const t=new Error(`operation not permitted, mkdir '${e}'`);t.code="EPERM";t.errno=-4048;t.path=e;t.syscall="mkdir";return t};e.exports.makeDir=(async(e,t)=>{s(e);t=a(t);if(c){const r=i.resolve(e);return n.mkdir(r,{mode:t.mode,recursive:true})}const r=async e=>{try{await n.mkdir(e,t.mode)}catch(t){if(t.code==="EPERM"){throw t}if(t.code==="ENOENT"){if(i.dirname(e)===e){throw u(e)}if(t.message.includes("null bytes")){throw t}await r(i.dirname(e));return r(e)}try{const r=await n.stat(e);if(!r.isDirectory()){throw new Error("The path is not a directory")}}catch{throw t}}};return r(i.resolve(e))});e.exports.makeDirSync=((e,t)=>{s(e);t=a(t);if(c){const r=i.resolve(e);return n.mkdirSync(r,{mode:t.mode,recursive:true})}const r=e=>{try{n.mkdirSync(e,t.mode)}catch(t){if(t.code==="EPERM"){throw t}if(t.code==="ENOENT"){if(i.dirname(e)===e){throw u(e)}if(t.message.includes("null bytes")){throw t}r(i.dirname(e));return r(e)}try{if(!n.statSync(e).isDirectory()){throw new Error("The path is not a directory")}}catch{throw t}}};return r(i.resolve(e))})},9665:(e,t,r)=>{"use strict";e.exports={moveSync:r(6445)}},6445:(e,t,r)=>{"use strict";const n=r(7758);const i=r(5622);const o=r(1135).copySync;const c=r(7357).removeSync;const s=r(8605).mkdirpSync;const a=r(3901);function moveSync(e,t,r){r=r||{};const n=r.overwrite||r.clobber||false;const{srcStat:o}=a.checkPathsSync(e,t,"move");a.checkParentPathsSync(e,o,t,"move");s(i.dirname(t));return doRename(e,t,n)}function doRename(e,t,r){if(r){c(t);return rename(e,t,r)}if(n.existsSync(t))throw new Error("dest already exists.");return rename(e,t,r)}function rename(e,t,r){try{n.renameSync(e,t)}catch(n){if(n.code!=="EXDEV")throw n;return moveAcrossDevice(e,t,r)}}function moveAcrossDevice(e,t,r){const n={overwrite:r,errorOnExist:true};o(e,t,n);return c(e)}e.exports=moveSync},1497:(e,t,r)=>{"use strict";const n=r(9046).E;e.exports={move:n(r(2231))}},2231:(e,t,r)=>{"use strict";const n=r(7758);const i=r(5622);const o=r(1335).copy;const c=r(7357).remove;const s=r(8605).mkdirp;const a=r(3835).pathExists;const u=r(3901);function move(e,t,r,n){if(typeof r==="function"){n=r;r={}}const o=r.overwrite||r.clobber||false;u.checkPaths(e,t,"move",(r,c)=>{if(r)return n(r);const{srcStat:a}=c;u.checkParentPaths(e,a,t,"move",r=>{if(r)return n(r);s(i.dirname(t),r=>{if(r)return n(r);return doRename(e,t,o,n)})})})}function doRename(e,t,r,n){if(r){return c(t,i=>{if(i)return n(i);return rename(e,t,r,n)})}a(t,(i,o)=>{if(i)return n(i);if(o)return n(new Error("dest already exists."));return rename(e,t,r,n)})}function rename(e,t,r,i){n.rename(e,t,n=>{if(!n)return i();if(n.code!=="EXDEV")return i(n);return moveAcrossDevice(e,t,r,i)})}function moveAcrossDevice(e,t,r,n){const i={overwrite:r,errorOnExist:true};o(e,t,i,t=>{if(t)return n(t);return c(e,n)})}e.exports=move},6570:(e,t,r)=>{"use strict";const n=r(9046).E;const i=r(7758);const o=r(5622);const c=r(8605);const s=r(3835).pathExists;function outputFile(e,t,r,n){if(typeof r==="function"){n=r;r="utf8"}const a=o.dirname(e);s(a,(o,s)=>{if(o)return n(o);if(s)return i.writeFile(e,t,r,n);c.mkdirs(a,o=>{if(o)return n(o);i.writeFile(e,t,r,n)})})}function outputFileSync(e,...t){const r=o.dirname(e);if(i.existsSync(r)){return i.writeFileSync(e,...t)}c.mkdirsSync(r);i.writeFileSync(e,...t)}e.exports={outputFile:n(outputFile),outputFileSync:outputFileSync}},3835:(e,t,r)=>{"use strict";const n=r(9046).p;const i=r(1176);function pathExists(e){return i.access(e).then(()=>true).catch(()=>false)}e.exports={pathExists:n(pathExists),pathExistsSync:i.existsSync}},7357:(e,t,r)=>{"use strict";const n=r(9046).E;const i=r(8761);e.exports={remove:n(i),removeSync:i.sync}},8761:(e,t,r)=>{"use strict";const n=r(7758);const i=r(5622);const o=r(2357);const c=process.platform==="win32";function defaults(e){const t=["unlink","chmod","stat","lstat","rmdir","readdir"];t.forEach(t=>{e[t]=e[t]||n[t];t=t+"Sync";e[t]=e[t]||n[t]});e.maxBusyTries=e.maxBusyTries||3}function rimraf(e,t,r){let n=0;if(typeof t==="function"){r=t;t={}}o(e,"rimraf: missing path");o.strictEqual(typeof e,"string","rimraf: path should be a string");o.strictEqual(typeof r,"function","rimraf: callback function required");o(t,"rimraf: invalid options argument provided");o.strictEqual(typeof t,"object","rimraf: options should be object");defaults(t);rimraf_(e,t,function CB(i){if(i){if((i.code==="EBUSY"||i.code==="ENOTEMPTY"||i.code==="EPERM")&&nrimraf_(e,t,CB),r)}if(i.code==="ENOENT")i=null}r(i)})}function rimraf_(e,t,r){o(e);o(t);o(typeof r==="function");t.lstat(e,(n,i)=>{if(n&&n.code==="ENOENT"){return r(null)}if(n&&n.code==="EPERM"&&c){return fixWinEPERM(e,t,n,r)}if(i&&i.isDirectory()){return rmdir(e,t,n,r)}t.unlink(e,n=>{if(n){if(n.code==="ENOENT"){return r(null)}if(n.code==="EPERM"){return c?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,n){o(e);o(t);o(typeof n==="function");t.chmod(e,438,i=>{if(i){n(i.code==="ENOENT"?null:r)}else{t.stat(e,(i,o)=>{if(i){n(i.code==="ENOENT"?null:r)}else if(o.isDirectory()){rmdir(e,t,r,n)}else{t.unlink(e,n)}})}})}function fixWinEPERMSync(e,t,r){let n;o(e);o(t);try{t.chmodSync(e,438)}catch(e){if(e.code==="ENOENT"){return}else{throw r}}try{n=t.statSync(e)}catch(e){if(e.code==="ENOENT"){return}else{throw r}}if(n.isDirectory()){rmdirSync(e,t,r)}else{t.unlinkSync(e)}}function rmdir(e,t,r,n){o(e);o(t);o(typeof n==="function");t.rmdir(e,i=>{if(i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")){rmkids(e,t,n)}else if(i&&i.code==="ENOTDIR"){n(r)}else{n(i)}})}function rmkids(e,t,r){o(e);o(t);o(typeof r==="function");t.readdir(e,(n,o)=>{if(n)return r(n);let c=o.length;let s;if(c===0)return t.rmdir(e,r);o.forEach(n=>{rimraf(i.join(e,n),t,n=>{if(s){return}if(n)return r(s=n);if(--c===0){t.rmdir(e,r)}})})})}function rimrafSync(e,t){let r;t=t||{};defaults(t);o(e,"rimraf: missing path");o.strictEqual(typeof e,"string","rimraf: path should be a string");o(t,"rimraf: missing options");o.strictEqual(typeof t,"object","rimraf: options should be object");try{r=t.lstatSync(e)}catch(r){if(r.code==="ENOENT"){return}if(r.code==="EPERM"&&c){fixWinEPERMSync(e,t,r)}}try{if(r&&r.isDirectory()){rmdirSync(e,t,null)}else{t.unlinkSync(e)}}catch(r){if(r.code==="ENOENT"){return}else if(r.code==="EPERM"){return c?fixWinEPERMSync(e,t,r):rmdirSync(e,t,r)}else if(r.code!=="EISDIR"){throw r}rmdirSync(e,t,r)}}function rmdirSync(e,t,r){o(e);o(t);try{t.rmdirSync(e)}catch(n){if(n.code==="ENOTDIR"){throw r}else if(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM"){rmkidsSync(e,t)}else if(n.code!=="ENOENT"){throw n}}}function rmkidsSync(e,t){o(e);o(t);t.readdirSync(e).forEach(r=>rimrafSync(i.join(e,r),t));if(c){const r=Date.now();do{try{const r=t.rmdirSync(e,t);return r}catch{}}while(Date.now()-r<500)}else{const r=t.rmdirSync(e,t);return r}}e.exports=rimraf;rimraf.sync=rimrafSync},3901:(e,t,r)=>{"use strict";const n=r(1176);const i=r(5622);const o=r(1669);const c=r(5995);const s=c("10.5.0");const a=e=>s?n.stat(e,{bigint:true}):n.stat(e);const u=e=>s?n.statSync(e,{bigint:true}):n.statSync(e);function getStats(e,t){return Promise.all([a(e),a(t).catch(e=>{if(e.code==="ENOENT")return null;throw e})]).then(([e,t])=>({srcStat:e,destStat:t}))}function getStatsSync(e,t){let r;const n=u(e);try{r=u(t)}catch(e){if(e.code==="ENOENT")return{srcStat:n,destStat:null};throw e}return{srcStat:n,destStat:r}}function checkPaths(e,t,r,n){o.callbackify(getStats)(e,t,(i,o)=>{if(i)return n(i);const{srcStat:c,destStat:s}=o;if(s&&areIdentical(c,s)){return n(new Error("Source and destination must not be the same."))}if(c.isDirectory()&&isSrcSubdir(e,t)){return n(new Error(errMsg(e,t,r)))}return n(null,{srcStat:c,destStat:s})})}function checkPathsSync(e,t,r){const{srcStat:n,destStat:i}=getStatsSync(e,t);if(i&&areIdentical(n,i)){throw new Error("Source and destination must not be the same.")}if(n.isDirectory()&&isSrcSubdir(e,t)){throw new Error(errMsg(e,t,r))}return{srcStat:n,destStat:i}}function checkParentPaths(e,t,r,o,c){const a=i.resolve(i.dirname(e));const u=i.resolve(i.dirname(r));if(u===a||u===i.parse(u).root)return c();const f=(n,i)=>{if(n){if(n.code==="ENOENT")return c();return c(n)}if(areIdentical(t,i)){return c(new Error(errMsg(e,r,o)))}return checkParentPaths(e,t,u,o,c)};if(s)n.stat(u,{bigint:true},f);else n.stat(u,f)}function checkParentPathsSync(e,t,r,n){const o=i.resolve(i.dirname(e));const c=i.resolve(i.dirname(r));if(c===o||c===i.parse(c).root)return;let s;try{s=u(c)}catch(e){if(e.code==="ENOENT")return;throw e}if(areIdentical(t,s)){throw new Error(errMsg(e,r,n))}return checkParentPathsSync(e,t,c,n)}function areIdentical(e,t){if(t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev){if(s||t.inoe);const n=i.resolve(t).split(i.sep).filter(e=>e);return r.reduce((e,t,r)=>e&&n[r]===t,true)}function errMsg(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:checkPaths,checkPathsSync:checkPathsSync,checkParentPaths:checkParentPaths,checkParentPathsSync:checkParentPathsSync,isSrcSubdir:isSrcSubdir}},2548:(e,t,r)=>{"use strict";const n=r(7758);function utimesMillis(e,t,r,i){n.open(e,"r+",(e,o)=>{if(e)return i(e);n.futimes(o,t,r,e=>{n.close(o,t=>{if(i)i(e||t)})})})}function utimesMillisSync(e,t,r){const i=n.openSync(e,"r+");n.futimesSync(i,t,r);return n.closeSync(i)}e.exports={utimesMillis:utimesMillis,utimesMillisSync:utimesMillisSync}},7356:e=>{"use strict";e.exports=clone;function clone(e){if(e===null||typeof e!=="object")return e;if(e instanceof Object)var t={__proto__:e.__proto__};else var t=Object.create(null);Object.getOwnPropertyNames(e).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))});return t}},7758:(e,t,r)=>{var n=r(5747);var i=r(263);var o=r(3086);var c=r(7356);var s=r(1669);var a;var u;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){a=Symbol.for("graceful-fs.queue");u=Symbol.for("graceful-fs.previous")}else{a="___graceful-fs.queue";u="___graceful-fs.previous"}function noop(){}function publishQueue(e,t){Object.defineProperty(e,a,{get:function(){return t}})}var f=noop;if(s.debuglog)f=s.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))f=function(){var e=s.format.apply(s,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: ");console.error(e)};if(!n[a]){var l=global[a]||[];publishQueue(n,l);n.close=function(e){function close(t,r){return e.call(n,t,function(e){if(!e){retry()}if(typeof r==="function")r.apply(this,arguments)})}Object.defineProperty(close,u,{value:e});return close}(n.close);n.closeSync=function(e){function closeSync(t){e.apply(n,arguments);retry()}Object.defineProperty(closeSync,u,{value:e});return closeSync}(n.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",function(){f(n[a]);r(2357).equal(n[a].length,0)})}}if(!global[a]){publishQueue(global,n[a])}e.exports=patch(c(n));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!n.__patched){e.exports=patch(n);n.__patched=true}function patch(e){i(e);e.gracefulify=patch;e.createReadStream=createReadStream;e.createWriteStream=createWriteStream;var t=e.readFile;e.readFile=readFile;function readFile(e,r,n){if(typeof r==="function")n=r,r=null;return go$readFile(e,r,n);function go$readFile(e,r,n){return t(e,r,function(t){if(t&&(t.code==="EMFILE"||t.code==="ENFILE"))enqueue([go$readFile,[e,r,n]]);else{if(typeof n==="function")n.apply(this,arguments);retry()}})}}var r=e.writeFile;e.writeFile=writeFile;function writeFile(e,t,n,i){if(typeof n==="function")i=n,n=null;return go$writeFile(e,t,n,i);function go$writeFile(e,t,n,i){return r(e,t,n,function(r){if(r&&(r.code==="EMFILE"||r.code==="ENFILE"))enqueue([go$writeFile,[e,t,n,i]]);else{if(typeof i==="function")i.apply(this,arguments);retry()}})}}var n=e.appendFile;if(n)e.appendFile=appendFile;function appendFile(e,t,r,i){if(typeof r==="function")i=r,r=null;return go$appendFile(e,t,r,i);function go$appendFile(e,t,r,i){return n(e,t,r,function(n){if(n&&(n.code==="EMFILE"||n.code==="ENFILE"))enqueue([go$appendFile,[e,t,r,i]]);else{if(typeof i==="function")i.apply(this,arguments);retry()}})}}var c=e.readdir;e.readdir=readdir;function readdir(e,t,r){var n=[e];if(typeof t!=="function"){n.push(t)}else{r=t}n.push(go$readdir$cb);return go$readdir(n);function go$readdir$cb(e,t){if(t&&t.sort)t.sort();if(e&&(e.code==="EMFILE"||e.code==="ENFILE"))enqueue([go$readdir,[n]]);else{if(typeof r==="function")r.apply(this,arguments);retry()}}}function go$readdir(t){return c.apply(e,t)}if(process.version.substr(0,4)==="v0.8"){var s=o(e);ReadStream=s.ReadStream;WriteStream=s.WriteStream}var a=e.ReadStream;if(a){ReadStream.prototype=Object.create(a.prototype);ReadStream.prototype.open=ReadStream$open}var u=e.WriteStream;if(u){WriteStream.prototype=Object.create(u.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(e,"ReadStream",{get:function(){return ReadStream},set:function(e){ReadStream=e},enumerable:true,configurable:true});Object.defineProperty(e,"WriteStream",{get:function(){return WriteStream},set:function(e){WriteStream=e},enumerable:true,configurable:true});var f=ReadStream;Object.defineProperty(e,"FileReadStream",{get:function(){return f},set:function(e){f=e},enumerable:true,configurable:true});var l=WriteStream;Object.defineProperty(e,"FileWriteStream",{get:function(){return l},set:function(e){l=e},enumerable:true,configurable:true});function ReadStream(e,t){if(this instanceof ReadStream)return a.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var e=this;open(e.path,e.flags,e.mode,function(t,r){if(t){if(e.autoClose)e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r);e.read()}})}function WriteStream(e,t){if(this instanceof WriteStream)return u.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var e=this;open(e.path,e.flags,e.mode,function(t,r){if(t){e.destroy();e.emit("error",t)}else{e.fd=r;e.emit("open",r)}})}function createReadStream(t,r){return new e.ReadStream(t,r)}function createWriteStream(t,r){return new e.WriteStream(t,r)}var p=e.open;e.open=open;function open(e,t,r,n){if(typeof r==="function")n=r,r=null;return go$open(e,t,r,n);function go$open(e,t,r,n){return p(e,t,r,function(i,o){if(i&&(i.code==="EMFILE"||i.code==="ENFILE"))enqueue([go$open,[e,t,r,n]]);else{if(typeof n==="function")n.apply(this,arguments);retry()}})}}return e}function enqueue(e){f("ENQUEUE",e[0].name,e[1]);n[a].push(e)}function retry(){var e=n[a].shift();if(e){f("RETRY",e[0].name,e[1]);e[0].apply(null,e[1])}}},3086:(e,t,r)=>{var n=r(2413).Stream;e.exports=legacy;function legacy(e){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(t,r){if(!(this instanceof ReadStream))return new ReadStream(t,r);n.call(this);var i=this;this.path=t;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;r=r||{};var o=Object.keys(r);for(var c=0,s=o.length;cthis.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick(function(){i._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){i.emit("error",e);i.readable=false;return}i.fd=t;i.emit("open",t);i._read()})}function WriteStream(t,r){if(!(this instanceof WriteStream))return new WriteStream(t,r);n.call(this);this.path=t;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;r=r||{};var i=Object.keys(r);for(var o=0,c=i.length;o= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=e.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}},263:(e,t,r)=>{var n=r(7619);var i=process.cwd;var o=null;var c=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!o)o=i.call(process);return o};try{process.cwd()}catch(e){}var s=process.chdir;process.chdir=function(e){o=null;s.call(process,e)};e.exports=patch;function patch(e){if(n.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(e)}if(!e.lutimes){patchLutimes(e)}e.chown=chownFix(e.chown);e.fchown=chownFix(e.fchown);e.lchown=chownFix(e.lchown);e.chmod=chmodFix(e.chmod);e.fchmod=chmodFix(e.fchmod);e.lchmod=chmodFix(e.lchmod);e.chownSync=chownFixSync(e.chownSync);e.fchownSync=chownFixSync(e.fchownSync);e.lchownSync=chownFixSync(e.lchownSync);e.chmodSync=chmodFixSync(e.chmodSync);e.fchmodSync=chmodFixSync(e.fchmodSync);e.lchmodSync=chmodFixSync(e.lchmodSync);e.stat=statFix(e.stat);e.fstat=statFix(e.fstat);e.lstat=statFix(e.lstat);e.statSync=statFixSync(e.statSync);e.fstatSync=statFixSync(e.fstatSync);e.lstatSync=statFixSync(e.lstatSync);if(!e.lchmod){e.lchmod=function(e,t,r){if(r)process.nextTick(r)};e.lchmodSync=function(){}}if(!e.lchown){e.lchown=function(e,t,r,n){if(n)process.nextTick(n)};e.lchownSync=function(){}}if(c==="win32"){e.rename=function(t){return function(r,n,i){var o=Date.now();var c=0;t(r,n,function CB(s){if(s&&(s.code==="EACCES"||s.code==="EPERM")&&Date.now()-o<6e4){setTimeout(function(){e.stat(n,function(e,o){if(e&&e.code==="ENOENT")t(r,n,CB);else i(s)})},c);if(c<100)c+=10;return}if(i)i(s)})}}(e.rename)}e.read=function(t){function read(r,n,i,o,c,s){var a;if(s&&typeof s==="function"){var u=0;a=function(f,l,p){if(f&&f.code==="EAGAIN"&&u<10){u++;return t.call(e,r,n,i,o,c,a)}s.apply(this,arguments)}}return t.call(e,r,n,i,o,c,a)}read.__proto__=t;return read}(e.read);e.readSync=function(t){return function(r,n,i,o,c){var s=0;while(true){try{return t.call(e,r,n,i,o,c)}catch(e){if(e.code==="EAGAIN"&&s<10){s++;continue}throw e}}}}(e.readSync);function patchLchmod(e){e.lchmod=function(t,r,i){e.open(t,n.O_WRONLY|n.O_SYMLINK,r,function(t,n){if(t){if(i)i(t);return}e.fchmod(n,r,function(t){e.close(n,function(e){if(i)i(t||e)})})})};e.lchmodSync=function(t,r){var i=e.openSync(t,n.O_WRONLY|n.O_SYMLINK,r);var o=true;var c;try{c=e.fchmodSync(i,r);o=false}finally{if(o){try{e.closeSync(i)}catch(e){}}else{e.closeSync(i)}}return c}}function patchLutimes(e){if(n.hasOwnProperty("O_SYMLINK")){e.lutimes=function(t,r,i,o){e.open(t,n.O_SYMLINK,function(t,n){if(t){if(o)o(t);return}e.futimes(n,r,i,function(t){e.close(n,function(e){if(o)o(t||e)})})})};e.lutimesSync=function(t,r,i){var o=e.openSync(t,n.O_SYMLINK);var c;var s=true;try{c=e.futimesSync(o,r,i);s=false}finally{if(s){try{e.closeSync(o)}catch(e){}}else{e.closeSync(o)}}return c}}else{e.lutimes=function(e,t,r,n){if(n)process.nextTick(n)};e.lutimesSync=function(){}}}function chmodFix(t){if(!t)return t;return function(r,n,i){return t.call(e,r,n,function(e){if(chownErOk(e))e=null;if(i)i.apply(this,arguments)})}}function chmodFixSync(t){if(!t)return t;return function(r,n){try{return t.call(e,r,n)}catch(e){if(!chownErOk(e))throw e}}}function chownFix(t){if(!t)return t;return function(r,n,i,o){return t.call(e,r,n,i,function(e){if(chownErOk(e))e=null;if(o)o.apply(this,arguments)})}}function chownFixSync(t){if(!t)return t;return function(r,n,i){try{return t.call(e,r,n,i)}catch(e){if(!chownErOk(e))throw e}}}function statFix(t){if(!t)return t;return function(r,n,i){if(typeof n==="function"){i=n;n=null}function callback(e,t){if(t){if(t.uid<0)t.uid+=4294967296;if(t.gid<0)t.gid+=4294967296}if(i)i.apply(this,arguments)}return n?t.call(e,r,n,callback):t.call(e,r,callback)}}function statFixSync(t){if(!t)return t;return function(r,n){var i=n?t.call(e,r,n):t.call(e,r);if(i.uid<0)i.uid+=4294967296;if(i.gid<0)i.gid+=4294967296;return i}}function chownErOk(e){if(!e)return true;if(e.code==="ENOSYS")return true;var t=!process.getuid||process.getuid()!==0;if(t){if(e.code==="EINVAL"||e.code==="EPERM")return true}return false}}},6160:(e,t,r)=>{let n;try{n=r(7758)}catch(e){n=r(5747)}const i=r(7133);const{stringify:o,stripBom:c}=r(5902);async function _readFile(e,t={}){if(typeof t==="string"){t={encoding:t}}const r=t.fs||n;const o="throws"in t?t.throws:true;let s=await i.fromCallback(r.readFile)(e,t);s=c(s);let a;try{a=JSON.parse(s,t?t.reviver:null)}catch(t){if(o){t.message=`${e}: ${t.message}`;throw t}else{return null}}return a}const s=i.fromPromise(_readFile);function readFileSync(e,t={}){if(typeof t==="string"){t={encoding:t}}const r=t.fs||n;const i="throws"in t?t.throws:true;try{let n=r.readFileSync(e,t);n=c(n);return JSON.parse(n,t.reviver)}catch(t){if(i){t.message=`${e}: ${t.message}`;throw t}else{return null}}}async function _writeFile(e,t,r={}){const c=r.fs||n;const s=o(t,r);await i.fromCallback(c.writeFile)(e,s,r)}const a=i.fromPromise(_writeFile);function writeFileSync(e,t,r={}){const i=r.fs||n;const c=o(t,r);return i.writeFileSync(e,c,r)}const u={readFile:s,readFileSync:readFileSync,writeFile:a,writeFileSync:writeFileSync};e.exports=u},7133:(e,t)=>{"use strict";t.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]==="function")e.apply(this,t);else{return new Promise((r,n)=>{e.call(this,...t,(e,t)=>e!=null?n(e):r(t))})}},"name",{value:e.name})};t.fromPromise=function(e){return Object.defineProperty(function(...t){const r=t[t.length-1];if(typeof r!=="function")return e.apply(this,t);else e.apply(this,t.slice(0,-1)).then(e=>r(null,e),r)},"name",{value:e.name})}},5902:e=>{function stringify(e,{EOL:t="\n",finalEOL:r=true,replacer:n=null,spaces:i}={}){const o=r?t:"";const c=JSON.stringify(e,n,i);return c.replace(/\n/g,t)+o}function stripBom(e){if(Buffer.isBuffer(e))e=e.toString("utf8");return e.replace(/^\uFEFF/,"")}e.exports={stringify:stringify,stripBom:stripBom}},5573:(e,t,r)=>{var n=r(5768);var i;try{i=r(7758)}catch(e){i=r(5747)}var o=["appendFile","chmod","chown","close","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","link","lstat","mkdir","open","read","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","write","writeFile"];typeof i.access==="function"&&o.push("access");typeof i.copyFile==="function"&&o.push("copyFile");typeof i.mkdtemp==="function"&&o.push("mkdtemp");r(8690).withCallback(i,t,o);t.exists=function(e,t){if(typeof t==="function"){return i.stat(e,function(e){t(null,!e)})}return new n(function(t){i.stat(e,function(e){t(!e)})})}},6605:(e,t,r)=>{"use strict";var n=r(5573);e.exports={read:function f(e,t,r){var i=["\n"];null==r&&(r="utf8");var o=function(e,t,r){return n.read(t,Buffer.alloc(1),0,1,e.size-1-r).then(function(e){return String.fromCharCode(e[1][0])})};return new Promise(function(c,s){var a={stat:null,file:null};n.exists(e).then(function(e){if(!e)throw new Error("file does not exist")}).then(function(){var t=[n.stat(e).then(function(e){return a.stat=e}),n.open(e,"r").then(function(e){return a.file=e})];return Promise.all(t)}).then(function(){var e=0,s=0,u="",f=function(){return u.length>a.stat.size&&(u=u.substring(u.length-a.stat.size)),u.length>=a.stat.size||s>=t?(i.includes(u.substring(0,1))&&(u=u.substring(1)),n.close(a.file),"buffer"===r?c(Buffer.from(u,"binary")):c(Buffer.from(u,"binary").toString(r))):o(a.stat,a.file,e).then(function(t){u=t+u,i.includes(t)&&1{var n=r(4115);e.exports=thenifyAll;thenifyAll.withCallback=withCallback;thenifyAll.thenify=n;function thenifyAll(e,t,r){return promisifyAll(e,t,r,n)}function withCallback(e,t,r){return promisifyAll(e,t,r,n.withCallback)}function promisifyAll(e,t,r,n){if(!t){t={};r=Object.keys(e)}if(Array.isArray(t)){r=t;t={}}if(!r){r=Object.keys(e)}if(typeof e==="function")t=n(e);r.forEach(function(r){if(typeof e[r]==="function")t[r]=n(e[r])});Object.keys(e).forEach(function(r){if(deprecated(e,r))return;if(t[r])return;t[r]=e[r]});return t}function deprecated(e,t){var r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r.get)return false;if(r.get.name==="deprecated")return true;return false}},4115:(e,t,r)=>{var n=r(5768);var i=r(2357);e.exports=thenify;function thenify(e,t){i(typeof e==="function");return createWrapper(e,t)}thenify.withCallback=function(e,t){i(typeof e==="function");t=t||{};t.withCallback=true;return createWrapper(e,t)};function createCallback(e,t,r){if(r===undefined)r=true;return function(n,i){if(n)return t(n);var o=arguments.length;if(o<=2||!r)return e(i);if(Array.isArray(r)){var c={};for(var s=1;s{"use strict";t.E=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]==="function")e.apply(this,t);else{return new Promise((r,n)=>{e.apply(this,t.concat([(e,t)=>e?n(e):r(t)]))})}},"name",{value:e.name})};t.p=function(e){return Object.defineProperty(function(...t){const r=t[t.length-1];if(typeof r!=="function")return e.apply(this,t);else e.apply(this,t.slice(0,-1)).then(e=>r(null,e),r)},"name",{value:e.name})}},6144: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.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});const c=o(r(2186));const s=r(5622);const a=r(5630);const u=r(5747);const f=r(7888);const l=r(1314);const p=r(6605);const y={spraxdev:{url:"https://github.com/SpraxDev/Spigot-BuildTools/releases/latest/download/BuildTools.jar",prepareArgs:["--exit-after-fetch"]},spigotmc:{url:"https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar",prepareArgs:["--compile","None"]}};const m=(c.getInput("buildToolProvider")||"SpraxDev").toLowerCase();const h=l.fixArgArr((c.getInput("versions")||"latest").split(","));const d=l.fixArgArr((c.getInput("target")||"Spigot").toUpperCase().split(","));const v=c.getInput("generateSrc")=="true";const S=c.getInput("generateDoc")=="true";const w=c.getInput("disableJavaCheck")=="true";const g=c.getInput("forceRun")=="true";const E=l.isNumeric(c.getInput("threads"))?parseInt(c.getInput("threads")):l.cpuCount;const k=l.resetWorkingDir();async function run(){return new Promise(async(e,t)=>{try{if(h.length==0)return e({code:0,msg:"No version(s) provided to build"});if(d.length==0)return e({code:0,msg:"No target(s) provided to build"});if(!Object.keys(y).includes(m)){return t(new Error(`'${m}' is not a valid BuildTool-Provider (${Object.keys(y).join(", ")})`))}const r=y[m];const n=s.join(k.logs,"SpraxDev_Actions-SpigotMC.log");console.log("Installed Java-Version:");await l.runCmd("java",["-version"],k.base,n);console.log(`Downloading '${r.url}'...`);await l.downloadFile(r.url,s.join(k.cache,"BuildTools.jar"));const i=h.length!=1;if(i){console.log("Prepare for future tasks by running BuildTools...");try{await c.group("Prepare BuildTools",async()=>{return l.runCmd("java",["-jar","BuildTools.jar",w?"--disable-java-check":"",...r.prepareArgs],k.cache,n)})}catch(e){console.error(e);console.error(`\nPrinting last 25 lines from '${s.resolve(n)}':`);for(const e of await p.read(n,25)){console.error(e)}return l.exit(1)}}const o=["-jar","BuildTools.jar","--compile",d.join(",")];if(v){o.push("--generate-source")}if(S){o.push("--generate-docs")}if(w){o.push("--disable-java-check")}const g=[];for(const e of h){g.push(t=>{try{const r=Date.now();const n=s.join(k.logs,`${e}.log`);console.log(`Building version '${e}'...`);const c=i?s.join(k.base,`${e}`):k.cache;if(i){a.copy(k.cache,c).then(()=>{l.runCmd("java",[...o,"--rev",e],c,n,true).then(()=>{u.rmdirSync(c,{recursive:true});const n=Date.now();console.log(`Finished building '${e}' in ${(n-r)/6e4} minutes`);t()})}).catch(r=>{console.log(`An error occurred while building '${e}'`);console.error(r);console.error(`\nPrinting last 25 lines from '${s.resolve(n)}':`);p.read(n,25).then(e=>{for(const t of e){console.error(t)}}).catch(console.error).finally(()=>t(r))})}}catch(e){t(e)}})}f.parallelLimit(g,E,(r,n)=>{if(r)return t(r);e({code:0})})}catch(e){t(e)}})}run().then(e=>l.exit(e.code,e.msg)).catch(e=>l.exit(1,e))},1314:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.exit=t.resetWorkingDir=t.downloadFile=t.runCmd=t.isNumeric=t.fixArgArr=t.cpuCount=void 0;const n=r(3129);const i=r(5622);const o=r(5876);const c=r(7211);const s=r(2087);const a=r(5747);const u=JSON.parse(a.readFileSync(r.ab+"package.json","utf-8"));const f=`${u.name||"Action-SpigotMC"}/${u.version||"UNKNOWN_VERSION"} (+${u.homepage||"https://github.com/SpraxDev/"})`;t.cpuCount=s.cpus().length;function fixArgArr(e){const t=[];for(const r of e){const e=r.trim();if(e&&!t.includes(e)){t.push(e)}}return t}t.fixArgArr=fixArgArr;function isNumeric(e){return/^[0-9]+$/.test(e)}t.isNumeric=isNumeric;async function runCmd(e,t,r,i,o=false){return new Promise((c,s)=>{const u=a.createWriteStream(i,{encoding:"utf-8",flags:"a"});const f=n.spawn(e,t,{shell:true,cwd:r,env:process.env});f.stdout.on("data",e=>{u.write(e);if(!o){process.stdout.write(e)}});f.stderr.on("data",e=>{u.write(e);if(!o){process.stderr.write(e)}});f.on("close",t=>{u.close();if(t!=0){return s({err:new Error(`process exited with code ${t}`),cmd:e,workingDir:r})}c()})})}t.runCmd=runCmd;async function downloadFile(e,t,r=0){const n=e.toLowerCase().startsWith("http://")?o.get:c.get;return new Promise((i,o)=>{let c=null;const s=function(e){if(c){c.close();c=null;if(e){a.rmdirSync(t,{recursive:true})}}};n(e,{headers:{"User-Agent":f}},n=>{if(n.statusCode!=200){if(r<12&&(n.statusCode==301||n.statusCode==302||n.statusCode==303||n.statusCode==307||n.statusCode==308)){return downloadFile(e,t,++r).then(i).catch(o)}else{s(true);return o(new Error(`Server responded with ${n.statusCode}`))}}c=a.createWriteStream(t,{encoding:"binary"}).on("finish",()=>{s(false);return i()}).on("error",e=>{s(true);return o(e)});n.pipe(c)}).on("error",e=>{s(true);return o(e)})})}t.downloadFile=downloadFile;function resetWorkingDir(){const e=i.join(s.tmpdir(),"SpraxDev-Action-SpigotMC");const t=i.join(e,"cache");const r=i.join(e,"logs");a.rmdirSync(e,{recursive:true});a.mkdirSync(t,{recursive:true});a.mkdirSync(r);return{base:e,cache:t,logs:r}}t.resetWorkingDir=resetWorkingDir;function exit(e,t){if(t){if(typeof t=="string"){console.log(t)}else{console.error(t)}}return process.exit(e)}t.exit=exit},2357:e=>{"use strict";e.exports=require("assert")},3129:e=>{"use strict";e.exports=require("child_process")},7619:e=>{"use strict";e.exports=require("constants")},5747:e=>{"use strict";e.exports=require("fs")},5876:e=>{"use strict";e.exports=require("http")},7211:e=>{"use strict";e.exports=require("https")},2087:e=>{"use strict";e.exports=require("os")},5622:e=>{"use strict";e.exports=require("path")},2413:e=>{"use strict";e.exports=require("stream")},1669:e=>{"use strict";e.exports=require("util")}};var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var n=t[r]={exports:{}};var i=true;try{e[r].call(n.exports,n,n.exports,__webpack_require__);i=false}finally{if(i)delete t[r]}return n.exports}__webpack_require__.ab=__dirname+"/";return __webpack_require__(6144)})(); //# sourceMappingURL=index.js.map