hyperbook 0.8.8 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ var o=i(9796);var a=i(9093);var l=i(1246);var Tar=function(t){if(!(this instance
47
47
  * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
48
48
  * @copyright (c) 2012-2014 Chris Talkington, contributors.
49
49
  */
50
- var o=i(8700);var a=i(1246);var Zip=function(t){if(!(this instanceof Zip)){return new Zip(t)}t=this.options=a.defaults(t,{comment:"",forceUTC:false,namePrependSlash:false,store:false});this.supports={directory:true,symlink:true};this.engine=new o(t)};Zip.prototype.append=function(t,r,i){this.engine.entry(t,r,i)};Zip.prototype.finalize=function(){this.engine.finalize()};Zip.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};Zip.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)};Zip.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)};t.exports=Zip},8718:function(t,r){(function(t,i){true?i(r):0})(this,(function(t){"use strict";function apply(t,...r){return(...i)=>t(...r,...i)}function initialParams(t){return function(...r){var i=r.pop();return t.call(this,r,i)}}var r=typeof queueMicrotask==="function"&&queueMicrotask;var i=typeof setImmediate==="function"&&setImmediate;var o=typeof process==="object"&&typeof process.nextTick==="function";function fallback(t){setTimeout(t,0)}function wrap(t){return(r,...i)=>t((()=>r(...i)))}var a;if(r){a=queueMicrotask}else if(i){a=setImmediate}else if(o){a=process.nextTick}else{a=fallback}var l=wrap(a);function asyncify(t){if(isAsync(t)){return function(...r){const i=r.pop();const o=t.apply(this,r);return handlePromise(o,i)}}return initialParams((function(r,i){var o;try{o=t.apply(this,r)}catch(t){return i(t)}if(o&&typeof o.then==="function"){return handlePromise(o,i)}else{i(null,o)}}))}function handlePromise(t,r){return t.then((t=>{invokeCallback(r,null,t)}),(t=>{invokeCallback(r,t&&t.message?t:new Error(t))}))}function invokeCallback(t,r,i){try{t(r,i)}catch(t){l((t=>{throw t}),t)}}function isAsync(t){return t[Symbol.toStringTag]==="AsyncFunction"}function isAsyncGenerator(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function isAsyncIterable(t){return typeof t[Symbol.asyncIterator]==="function"}function wrapAsync(t){if(typeof t!=="function")throw new Error("expected a function");return isAsync(t)?asyncify(t):t}function awaitify(t,r=t.length){if(!r)throw new Error("arity is undefined");function awaitable(...i){if(typeof i[r-1]==="function"){return t.apply(this,i)}return new Promise(((o,a)=>{i[r-1]=(t,...r)=>{if(t)return a(t);o(r.length>1?r:r[0])};t.apply(this,i)}))}return awaitable}function applyEach(t){return function applyEach(r,...i){const o=awaitify((function(o){var a=this;return t(r,((t,r)=>{wrapAsync(t).apply(a,i.concat(r))}),o)}));return o}}function _asyncMap(t,r,i,o){r=r||[];var a=[];var l=0;var u=wrapAsync(i);return t(r,((t,r,i)=>{var o=l++;u(t,((t,r)=>{a[o]=r;i(t)}))}),(t=>{o(t,a)}))}function isArrayLike(t){return t&&typeof t.length==="number"&&t.length>=0&&t.length%1===0}const u={};function once(t){function wrapper(...r){if(t===null)return;var i=t;t=null;i.apply(this,r)}Object.assign(wrapper,t);return wrapper}function getIterator(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}function createArrayIterator(t){var r=-1;var i=t.length;return function next(){return++r<i?{value:t[r],key:r}:null}}function createES2015Iterator(t){var r=-1;return function next(){var i=t.next();if(i.done)return null;r++;return{value:i.value,key:r}}}function createObjectIterator(t){var r=t?Object.keys(t):[];var i=-1;var o=r.length;return function next(){var a=r[++i];if(a==="__proto__"){return next()}return i<o?{value:t[a],key:a}:null}}function createIterator(t){if(isArrayLike(t)){return createArrayIterator(t)}var r=getIterator(t);return r?createES2015Iterator(r):createObjectIterator(t)}function onlyOnce(t){return function(...r){if(t===null)throw new Error("Callback was already called.");var i=t;t=null;i.apply(this,r)}}function asyncEachOfLimit(t,r,i,o){let a=false;let l=false;let c=false;let h=0;let p=0;function replenish(){if(h>=r||c||a)return;c=true;t.next().then((({value:t,done:r})=>{if(l||a)return;c=false;if(r){a=true;if(h<=0){o(null)}return}h++;i(t,p,iterateeCallback);p++;replenish()})).catch(handleError)}function iterateeCallback(t,r){h-=1;if(l)return;if(t)return handleError(t);if(t===false){a=true;l=true;return}if(r===u||a&&h<=0){a=true;return o(null)}replenish()}function handleError(t){if(l)return;c=false;a=true;o(t)}replenish()}var eachOfLimit=t=>(r,i,o)=>{o=once(o);if(t<=0){throw new RangeError("concurrency limit cannot be less than 1")}if(!r){return o(null)}if(isAsyncGenerator(r)){return asyncEachOfLimit(r,t,i,o)}if(isAsyncIterable(r)){return asyncEachOfLimit(r[Symbol.asyncIterator](),t,i,o)}var a=createIterator(r);var l=false;var c=false;var h=0;var p=false;function iterateeCallback(t,r){if(c)return;h-=1;if(t){l=true;o(t)}else if(t===false){l=true;c=true}else if(r===u||l&&h<=0){l=true;return o(null)}else if(!p){replenish()}}function replenish(){p=true;while(h<t&&!l){var r=a();if(r===null){l=true;if(h<=0){o(null)}return}h+=1;i(r.value,r.key,onlyOnce(iterateeCallback))}p=false}replenish()};function eachOfLimit$1(t,r,i,o){return eachOfLimit(r)(t,wrapAsync(i),o)}var c=awaitify(eachOfLimit$1,4);function eachOfArrayLike(t,r,i){i=once(i);var o=0,a=0,{length:l}=t,c=false;if(l===0){i(null)}function iteratorCallback(t,r){if(t===false){c=true}if(c===true)return;if(t){i(t)}else if(++a===l||r===u){i(null)}}for(;o<l;o++){r(t[o],o,onlyOnce(iteratorCallback))}}function eachOfGeneric(t,r,i){return c(t,Infinity,r,i)}function eachOf(t,r,i){var o=isArrayLike(t)?eachOfArrayLike:eachOfGeneric;return o(t,wrapAsync(r),i)}var h=awaitify(eachOf,3);function map(t,r,i){return _asyncMap(h,t,r,i)}var p=awaitify(map,3);var d=applyEach(p);function eachOfSeries(t,r,i){return c(t,1,r,i)}var m=awaitify(eachOfSeries,3);function mapSeries(t,r,i){return _asyncMap(m,t,r,i)}var g=awaitify(mapSeries,3);var y=applyEach(g);const v=Symbol("promiseCallback");function promiseCallback(){let t,r;function callback(i,...o){if(i)return r(i);t(o.length>1?o:o[0])}callback[v]=new Promise(((i,o)=>{t=i,r=o}));return callback}function auto(t,r,i){if(typeof r!=="number"){i=r;r=null}i=once(i||promiseCallback());var o=Object.keys(t).length;if(!o){return i(null)}if(!r){r=o}var a={};var l=0;var u=false;var c=false;var h=Object.create(null);var p=[];var d=[];var m={};Object.keys(t).forEach((r=>{var i=t[r];if(!Array.isArray(i)){enqueueTask(r,[i]);d.push(r);return}var o=i.slice(0,i.length-1);var a=o.length;if(a===0){enqueueTask(r,i);d.push(r);return}m[r]=a;o.forEach((l=>{if(!t[l]){throw new Error("async.auto task `"+r+"` has a non-existent dependency `"+l+"` in "+o.join(", "))}addListener(l,(()=>{a--;if(a===0){enqueueTask(r,i)}}))}))}));checkForDeadlocks();processQueue();function enqueueTask(t,r){p.push((()=>runTask(t,r)))}function processQueue(){if(u)return;if(p.length===0&&l===0){return i(null,a)}while(p.length&&l<r){var t=p.shift();t()}}function addListener(t,r){var i=h[t];if(!i){i=h[t]=[]}i.push(r)}function taskComplete(t){var r=h[t]||[];r.forEach((t=>t()));processQueue()}function runTask(t,r){if(c)return;var o=onlyOnce(((r,...o)=>{l--;if(r===false){u=true;return}if(o.length<2){[o]=o}if(r){var p={};Object.keys(a).forEach((t=>{p[t]=a[t]}));p[t]=o;c=true;h=Object.create(null);if(u)return;i(r,p)}else{a[t]=o;taskComplete(t)}}));l++;var p=wrapAsync(r[r.length-1]);if(r.length>1){p(a,o)}else{p(o)}}function checkForDeadlocks(){var t;var r=0;while(d.length){t=d.pop();r++;getDependents(t).forEach((t=>{if(--m[t]===0){d.push(t)}}))}if(r!==o){throw new Error("async.auto cannot execute tasks due to a recursive dependency")}}function getDependents(r){var i=[];Object.keys(t).forEach((o=>{const a=t[o];if(Array.isArray(a)&&a.indexOf(r)>=0){i.push(o)}}));return i}return i[v]}var b=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/;var _=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/;var w=/,/;var S=/(=.+)?(\s*)$/;function stripComments(t){let r="";let i=0;let o=t.indexOf("*/");while(i<t.length){if(t[i]==="/"&&t[i+1]==="/"){let r=t.indexOf("\n",i);i=r===-1?t.length:r}else if(o!==-1&&t[i]==="/"&&t[i+1]==="*"){let a=t.indexOf("*/",i);if(a!==-1){i=a+2;o=t.indexOf("*/",i)}else{r+=t[i];i++}}else{r+=t[i];i++}}return r}function parseParams(t){const r=stripComments(t.toString());let i=r.match(b);if(!i){i=r.match(_)}if(!i)throw new Error("could not parse args in autoInject\nSource:\n"+r);let[,o]=i;return o.replace(/\s/g,"").split(w).map((t=>t.replace(S,"").trim()))}function autoInject(t,r){var i={};Object.keys(t).forEach((r=>{var o=t[r];var a;var l=isAsync(o);var u=!l&&o.length===1||l&&o.length===0;if(Array.isArray(o)){a=[...o];o=a.pop();i[r]=a.concat(a.length>0?newTask:o)}else if(u){i[r]=o}else{a=parseParams(o);if(o.length===0&&!l&&a.length===0){throw new Error("autoInject task functions require explicit parameters.")}if(!l)a.pop();i[r]=a.concat(newTask)}function newTask(t,r){var i=a.map((r=>t[r]));i.push(r);wrapAsync(o)(...i)}}));return auto(i,r)}class DLL{constructor(){this.head=this.tail=null;this.length=0}removeLink(t){if(t.prev)t.prev.next=t.next;else this.head=t.next;if(t.next)t.next.prev=t.prev;else this.tail=t.prev;t.prev=t.next=null;this.length-=1;return t}empty(){while(this.head)this.shift();return this}insertAfter(t,r){r.prev=t;r.next=t.next;if(t.next)t.next.prev=r;else this.tail=r;t.next=r;this.length+=1}insertBefore(t,r){r.prev=t.prev;r.next=t;if(t.prev)t.prev.next=r;else this.head=r;t.prev=r;this.length+=1}unshift(t){if(this.head)this.insertBefore(this.head,t);else setInitial(this,t)}push(t){if(this.tail)this.insertAfter(this.tail,t);else setInitial(this,t)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){var t=this.head;while(t){yield t.data;t=t.next}}remove(t){var r=this.head;while(r){var{next:i}=r;if(t(r)){this.removeLink(r)}r=i}return this}}function setInitial(t,r){t.length=1;t.head=t.tail=r}function queue(t,r,i){if(r==null){r=1}else if(r===0){throw new RangeError("Concurrency must not be zero")}var o=wrapAsync(t);var a=0;var u=[];const c={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function on(t,r){c[t].push(r)}function once(t,r){const handleAndRemove=(...i)=>{off(t,handleAndRemove);r(...i)};c[t].push(handleAndRemove)}function off(t,r){if(!t)return Object.keys(c).forEach((t=>c[t]=[]));if(!r)return c[t]=[];c[t]=c[t].filter((t=>t!==r))}function trigger(t,...r){c[t].forEach((t=>t(...r)))}var h=false;function _insert(t,r,i,o){if(o!=null&&typeof o!=="function"){throw new Error("task callback must be a function")}d.started=true;var a,u;function promiseCallback(t,...r){if(t)return i?u(t):a();if(r.length<=1)return a(r[0]);a(r)}var c={data:t,callback:i?promiseCallback:o||promiseCallback};if(r){d._tasks.unshift(c)}else{d._tasks.push(c)}if(!h){h=true;l((()=>{h=false;d.process()}))}if(i||!o){return new Promise(((t,r)=>{a=t;u=r}))}}function _createCB(t){return function(r,...i){a-=1;for(var o=0,l=t.length;o<l;o++){var c=t[o];var h=u.indexOf(c);if(h===0){u.shift()}else if(h>0){u.splice(h,1)}c.callback(r,...i);if(r!=null){trigger("error",r,c.data)}}if(a<=d.concurrency-d.buffer){trigger("unsaturated")}if(d.idle()){trigger("drain")}d.process()}}function _maybeDrain(t){if(t.length===0&&d.idle()){l((()=>trigger("drain")));return true}return false}const eventMethod=t=>r=>{if(!r){return new Promise(((r,i)=>{once(t,((t,o)=>{if(t)return i(t);r(o)}))}))}off(t);on(t,r)};var p=false;var d={_tasks:new DLL,*[Symbol.iterator](){yield*d._tasks[Symbol.iterator]()},concurrency:r,payload:i,buffer:r/4,started:false,paused:false,push(t,r){if(Array.isArray(t)){if(_maybeDrain(t))return;return t.map((t=>_insert(t,false,false,r)))}return _insert(t,false,false,r)},pushAsync(t,r){if(Array.isArray(t)){if(_maybeDrain(t))return;return t.map((t=>_insert(t,false,true,r)))}return _insert(t,false,true,r)},kill(){off();d._tasks.empty()},unshift(t,r){if(Array.isArray(t)){if(_maybeDrain(t))return;return t.map((t=>_insert(t,true,false,r)))}return _insert(t,true,false,r)},unshiftAsync(t,r){if(Array.isArray(t)){if(_maybeDrain(t))return;return t.map((t=>_insert(t,true,true,r)))}return _insert(t,true,true,r)},remove(t){d._tasks.remove(t)},process(){if(p){return}p=true;while(!d.paused&&a<d.concurrency&&d._tasks.length){var t=[],r=[];var i=d._tasks.length;if(d.payload)i=Math.min(i,d.payload);for(var l=0;l<i;l++){var c=d._tasks.shift();t.push(c);u.push(c);r.push(c.data)}a+=1;if(d._tasks.length===0){trigger("empty")}if(a===d.concurrency){trigger("saturated")}var h=onlyOnce(_createCB(t));o(r,h)}p=false},length(){return d._tasks.length},running(){return a},workersList(){return u},idle(){return d._tasks.length+a===0},pause(){d.paused=true},resume(){if(d.paused===false){return}d.paused=false;l(d.process)}};Object.defineProperties(d,{saturated:{writable:false,value:eventMethod("saturated")},unsaturated:{writable:false,value:eventMethod("unsaturated")},empty:{writable:false,value:eventMethod("empty")},drain:{writable:false,value:eventMethod("drain")},error:{writable:false,value:eventMethod("error")}});return d}function cargo(t,r){return queue(t,1,r)}function cargo$1(t,r,i){return queue(t,r,i)}function reduce(t,r,i,o){o=once(o);var a=wrapAsync(i);return m(t,((t,i,o)=>{a(r,t,((t,i)=>{r=i;o(t)}))}),(t=>o(t,r)))}var E=awaitify(reduce,4);function seq(...t){var r=t.map(wrapAsync);return function(...t){var i=this;var o=t[t.length-1];if(typeof o=="function"){t.pop()}else{o=promiseCallback()}E(r,t,((t,r,o)=>{r.apply(i,t.concat(((t,...r)=>{o(t,r)})))}),((t,r)=>o(t,...r)));return o[v]}}function compose(...t){return seq(...t.reverse())}function mapLimit(t,r,i,o){return _asyncMap(eachOfLimit(r),t,i,o)}var x=awaitify(mapLimit,4);function concatLimit(t,r,i,o){var a=wrapAsync(i);return x(t,r,((t,r)=>{a(t,((t,...i)=>{if(t)return r(t);return r(t,i)}))}),((t,r)=>{var i=[];for(var a=0;a<r.length;a++){if(r[a]){i=i.concat(...r[a])}}return o(t,i)}))}var A=awaitify(concatLimit,4);function concat(t,r,i){return A(t,Infinity,r,i)}var O=awaitify(concat,3);function concatSeries(t,r,i){return A(t,1,r,i)}var k=awaitify(concatSeries,3);function constant(...t){return function(...r){var i=r.pop();return i(null,...t)}}function _createTester(t,r){return(i,o,a,l)=>{var c=false;var h;const p=wrapAsync(a);i(o,((i,o,a)=>{p(i,((o,l)=>{if(o||o===false)return a(o);if(t(l)&&!h){c=true;h=r(true,i);return a(null,u)}a()}))}),(t=>{if(t)return l(t);l(null,c?h:r(false))}))}}function detect(t,r,i){return _createTester((t=>t),((t,r)=>r))(h,t,r,i)}var R=awaitify(detect,3);function detectLimit(t,r,i,o){return _createTester((t=>t),((t,r)=>r))(eachOfLimit(r),t,i,o)}var T=awaitify(detectLimit,4);function detectSeries(t,r,i){return _createTester((t=>t),((t,r)=>r))(eachOfLimit(1),t,r,i)}var C=awaitify(detectSeries,3);function consoleFunc(t){return(r,...i)=>wrapAsync(r)(...i,((r,...i)=>{if(typeof console==="object"){if(r){if(console.error){console.error(r)}}else if(console[t]){i.forEach((r=>console[t](r)))}}}))}var P=consoleFunc("dir");function doWhilst(t,r,i){i=onlyOnce(i);var o=wrapAsync(t);var a=wrapAsync(r);var l;function next(t,...r){if(t)return i(t);if(t===false)return;l=r;a(...r,check)}function check(t,r){if(t)return i(t);if(t===false)return;if(!r)return i(null,...l);o(next)}return check(null,true)}var I=awaitify(doWhilst,3);function doUntil(t,r,i){const o=wrapAsync(r);return I(t,((...t)=>{const r=t.pop();o(...t,((t,i)=>r(t,!i)))}),i)}function _withoutIndex(t){return(r,i,o)=>t(r,o)}function eachLimit(t,r,i){return h(t,_withoutIndex(wrapAsync(r)),i)}var L=awaitify(eachLimit,3);function eachLimit$1(t,r,i,o){return eachOfLimit(r)(t,_withoutIndex(wrapAsync(i)),o)}var M=awaitify(eachLimit$1,4);function eachSeries(t,r,i){return M(t,1,r,i)}var N=awaitify(eachSeries,3);function ensureAsync(t){if(isAsync(t))return t;return function(...r){var i=r.pop();var o=true;r.push(((...t)=>{if(o){l((()=>i(...t)))}else{i(...t)}}));t.apply(this,r);o=false}}function every(t,r,i){return _createTester((t=>!t),(t=>!t))(h,t,r,i)}var D=awaitify(every,3);function everyLimit(t,r,i,o){return _createTester((t=>!t),(t=>!t))(eachOfLimit(r),t,i,o)}var j=awaitify(everyLimit,4);function everySeries(t,r,i){return _createTester((t=>!t),(t=>!t))(m,t,r,i)}var $=awaitify(everySeries,3);function filterArray(t,r,i,o){var a=new Array(r.length);t(r,((t,r,o)=>{i(t,((t,i)=>{a[r]=!!i;o(t)}))}),(t=>{if(t)return o(t);var i=[];for(var l=0;l<r.length;l++){if(a[l])i.push(r[l])}o(null,i)}))}function filterGeneric(t,r,i,o){var a=[];t(r,((t,r,o)=>{i(t,((i,l)=>{if(i)return o(i);if(l){a.push({index:r,value:t})}o(i)}))}),(t=>{if(t)return o(t);o(null,a.sort(((t,r)=>t.index-r.index)).map((t=>t.value)))}))}function _filter(t,r,i,o){var a=isArrayLike(r)?filterArray:filterGeneric;return a(t,r,wrapAsync(i),o)}function filter(t,r,i){return _filter(h,t,r,i)}var B=awaitify(filter,3);function filterLimit(t,r,i,o){return _filter(eachOfLimit(r),t,i,o)}var H=awaitify(filterLimit,4);function filterSeries(t,r,i){return _filter(m,t,r,i)}var W=awaitify(filterSeries,3);function forever(t,r){var i=onlyOnce(r);var o=wrapAsync(ensureAsync(t));function next(t){if(t)return i(t);if(t===false)return;o(next)}return next()}var G=awaitify(forever,2);function groupByLimit(t,r,i,o){var a=wrapAsync(i);return x(t,r,((t,r)=>{a(t,((i,o)=>{if(i)return r(i);return r(i,{key:o,val:t})}))}),((t,r)=>{var i={};var{hasOwnProperty:a}=Object.prototype;for(var l=0;l<r.length;l++){if(r[l]){var{key:u}=r[l];var{val:c}=r[l];if(a.call(i,u)){i[u].push(c)}else{i[u]=[c]}}}return o(t,i)}))}var U=awaitify(groupByLimit,4);function groupBy(t,r,i){return U(t,Infinity,r,i)}function groupBySeries(t,r,i){return U(t,1,r,i)}var V=consoleFunc("log");function mapValuesLimit(t,r,i,o){o=once(o);var a={};var l=wrapAsync(i);return eachOfLimit(r)(t,((t,r,i)=>{l(t,r,((t,o)=>{if(t)return i(t);a[r]=o;i(t)}))}),(t=>o(t,a)))}var q=awaitify(mapValuesLimit,4);function mapValues(t,r,i){return q(t,Infinity,r,i)}function mapValuesSeries(t,r,i){return q(t,1,r,i)}function memoize(t,r=(t=>t)){var i=Object.create(null);var o=Object.create(null);var a=wrapAsync(t);var u=initialParams(((t,u)=>{var c=r(...t);if(c in i){l((()=>u(null,...i[c])))}else if(c in o){o[c].push(u)}else{o[c]=[u];a(...t,((t,...r)=>{if(!t){i[c]=r}var a=o[c];delete o[c];for(var l=0,u=a.length;l<u;l++){a[l](t,...r)}}))}}));u.memo=i;u.unmemoized=t;return u}var z;if(o){z=process.nextTick}else if(i){z=setImmediate}else{z=fallback}var Y=wrap(z);var K=awaitify(((t,r,i)=>{var o=isArrayLike(r)?[]:{};t(r,((t,r,i)=>{wrapAsync(t)(((t,...a)=>{if(a.length<2){[a]=a}o[r]=a;i(t)}))}),(t=>i(t,o)))}),3);function parallel(t,r){return K(h,t,r)}function parallelLimit(t,r,i){return K(eachOfLimit(r),t,i)}function queue$1(t,r){var i=wrapAsync(t);return queue(((t,r)=>{i(t[0],r)}),r,1)}class Heap{constructor(){this.heap=[];this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){this.heap=[];return this}percUp(t){let r;while(t>0&&smaller(this.heap[t],this.heap[r=parent(t)])){let i=this.heap[t];this.heap[t]=this.heap[r];this.heap[r]=i;t=r}}percDown(t){let r;while((r=leftChi(t))<this.heap.length){if(r+1<this.heap.length&&smaller(this.heap[r+1],this.heap[r])){r=r+1}if(smaller(this.heap[t],this.heap[r])){break}let i=this.heap[t];this.heap[t]=this.heap[r];this.heap[r]=i;t=r}}push(t){t.pushCount=++this.pushCount;this.heap.push(t);this.percUp(this.heap.length-1)}unshift(t){return this.heap.push(t)}shift(){let[t]=this.heap;this.heap[0]=this.heap[this.heap.length-1];this.heap.pop();this.percDown(0);return t}toArray(){return[...this]}*[Symbol.iterator](){for(let t=0;t<this.heap.length;t++){yield this.heap[t].data}}remove(t){let r=0;for(let i=0;i<this.heap.length;i++){if(!t(this.heap[i])){this.heap[r]=this.heap[i];r++}}this.heap.splice(r);for(let t=parent(this.heap.length-1);t>=0;t--){this.percDown(t)}return this}}function leftChi(t){return(t<<1)+1}function parent(t){return(t+1>>1)-1}function smaller(t,r){if(t.priority!==r.priority){return t.priority<r.priority}else{return t.pushCount<r.pushCount}}function priorityQueue(t,r){var i=queue$1(t,r);var o=false;i._tasks=new Heap;i.push=function(t,r=0,a=(()=>{})){if(typeof a!=="function"){throw new Error("task callback must be a function")}i.started=true;if(!Array.isArray(t)){t=[t]}if(t.length===0&&i.idle()){return l((()=>i.drain()))}for(var u=0,c=t.length;u<c;u++){var h={data:t[u],priority:r,callback:a};i._tasks.push(h)}if(!o){o=true;l((()=>{o=false;i.process()}))}};delete i.unshift;return i}function race(t,r){r=once(r);if(!Array.isArray(t))return r(new TypeError("First argument to race must be an array of functions"));if(!t.length)return r();for(var i=0,o=t.length;i<o;i++){wrapAsync(t[i])(r)}}var Q=awaitify(race,2);function reduceRight(t,r,i,o){var a=[...t].reverse();return E(a,r,i,o)}function reflect(t){var r=wrapAsync(t);return initialParams((function reflectOn(t,i){t.push(((t,...r)=>{let o={};if(t){o.error=t}if(r.length>0){var a=r;if(r.length<=1){[a]=r}o.value=a}i(null,o)}));return r.apply(this,t)}))}function reflectAll(t){var r;if(Array.isArray(t)){r=t.map(reflect)}else{r={};Object.keys(t).forEach((i=>{r[i]=reflect.call(this,t[i])}))}return r}function reject(t,r,i,o){const a=wrapAsync(i);return _filter(t,r,((t,r)=>{a(t,((t,i)=>{r(t,!i)}))}),o)}function reject$1(t,r,i){return reject(h,t,r,i)}var Z=awaitify(reject$1,3);function rejectLimit(t,r,i,o){return reject(eachOfLimit(r),t,i,o)}var X=awaitify(rejectLimit,4);function rejectSeries(t,r,i){return reject(m,t,r,i)}var J=awaitify(rejectSeries,3);function constant$1(t){return function(){return t}}const ee=5;const te=0;function retry(t,r,i){var o={times:ee,intervalFunc:constant$1(te)};if(arguments.length<3&&typeof t==="function"){i=r||promiseCallback();r=t}else{parseTimes(o,t);i=i||promiseCallback()}if(typeof r!=="function"){throw new Error("Invalid arguments for async.retry")}var a=wrapAsync(r);var l=1;function retryAttempt(){a(((t,...r)=>{if(t===false)return;if(t&&l++<o.times&&(typeof o.errorFilter!="function"||o.errorFilter(t))){setTimeout(retryAttempt,o.intervalFunc(l-1))}else{i(t,...r)}}))}retryAttempt();return i[v]}function parseTimes(t,r){if(typeof r==="object"){t.times=+r.times||ee;t.intervalFunc=typeof r.interval==="function"?r.interval:constant$1(+r.interval||te);t.errorFilter=r.errorFilter}else if(typeof r==="number"||typeof r==="string"){t.times=+r||ee}else{throw new Error("Invalid arguments for async.retry")}}function retryable(t,r){if(!r){r=t;t=null}let i=t&&t.arity||r.length;if(isAsync(r)){i+=1}var o=wrapAsync(r);return initialParams(((r,a)=>{if(r.length<i-1||a==null){r.push(a);a=promiseCallback()}function taskFn(t){o(...r,t)}if(t)retry(t,taskFn,a);else retry(taskFn,a);return a[v]}))}function series(t,r){return K(m,t,r)}function some(t,r,i){return _createTester(Boolean,(t=>t))(h,t,r,i)}var re=awaitify(some,3);function someLimit(t,r,i,o){return _createTester(Boolean,(t=>t))(eachOfLimit(r),t,i,o)}var ne=awaitify(someLimit,4);function someSeries(t,r,i){return _createTester(Boolean,(t=>t))(m,t,r,i)}var ie=awaitify(someSeries,3);function sortBy(t,r,i){var o=wrapAsync(r);return p(t,((t,r)=>{o(t,((i,o)=>{if(i)return r(i);r(i,{value:t,criteria:o})}))}),((t,r)=>{if(t)return i(t);i(null,r.sort(comparator).map((t=>t.value)))}));function comparator(t,r){var i=t.criteria,o=r.criteria;return i<o?-1:i>o?1:0}}var se=awaitify(sortBy,3);function timeout(t,r,i){var o=wrapAsync(t);return initialParams(((a,l)=>{var u=false;var c;function timeoutCallback(){var r=t.name||"anonymous";var o=new Error('Callback function "'+r+'" timed out.');o.code="ETIMEDOUT";if(i){o.info=i}u=true;l(o)}a.push(((...t)=>{if(!u){l(...t);clearTimeout(c)}}));c=setTimeout(timeoutCallback,r);o(...a)}))}function range(t){var r=Array(t);while(t--){r[t]=t}return r}function timesLimit(t,r,i,o){var a=wrapAsync(i);return x(range(t),r,a,o)}function times(t,r,i){return timesLimit(t,Infinity,r,i)}function timesSeries(t,r,i){return timesLimit(t,1,r,i)}function transform(t,r,i,o){if(arguments.length<=3&&typeof r==="function"){o=i;i=r;r=Array.isArray(t)?[]:{}}o=once(o||promiseCallback());var a=wrapAsync(i);h(t,((t,i,o)=>{a(r,t,i,o)}),(t=>o(t,r)));return o[v]}function tryEach(t,r){var i=null;var o;return N(t,((t,r)=>{wrapAsync(t)(((t,...a)=>{if(t===false)return r(t);if(a.length<2){[o]=a}else{o=a}i=t;r(t?null:{})}))}),(()=>r(i,o)))}var oe=awaitify(tryEach);function unmemoize(t){return(...r)=>(t.unmemoized||t)(...r)}function whilst(t,r,i){i=onlyOnce(i);var o=wrapAsync(r);var a=wrapAsync(t);var l=[];function next(t,...r){if(t)return i(t);l=r;if(t===false)return;a(check)}function check(t,r){if(t)return i(t);if(t===false)return;if(!r)return i(null,...l);o(next)}return a(check)}var ae=awaitify(whilst,3);function until(t,r,i){const o=wrapAsync(t);return ae((t=>o(((r,i)=>t(r,!i)))),r,i)}function waterfall(t,r){r=once(r);if(!Array.isArray(t))return r(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return r();var i=0;function nextTask(r){var o=wrapAsync(t[i++]);o(...r,onlyOnce(next))}function next(o,...a){if(o===false)return;if(o||i===t.length){return r(o,...a)}nextTask(a)}nextTask([])}var le=awaitify(waterfall);var ue={apply:apply,applyEach:d,applyEachSeries:y,asyncify:asyncify,auto:auto,autoInject:autoInject,cargo:cargo,cargoQueue:cargo$1,compose:compose,concat:O,concatLimit:A,concatSeries:k,constant:constant,detect:R,detectLimit:T,detectSeries:C,dir:P,doUntil:doUntil,doWhilst:I,each:L,eachLimit:M,eachOf:h,eachOfLimit:c,eachOfSeries:m,eachSeries:N,ensureAsync:ensureAsync,every:D,everyLimit:j,everySeries:$,filter:B,filterLimit:H,filterSeries:W,forever:G,groupBy:groupBy,groupByLimit:U,groupBySeries:groupBySeries,log:V,map:p,mapLimit:x,mapSeries:g,mapValues:mapValues,mapValuesLimit:q,mapValuesSeries:mapValuesSeries,memoize:memoize,nextTick:Y,parallel:parallel,parallelLimit:parallelLimit,priorityQueue:priorityQueue,queue:queue$1,race:Q,reduce:E,reduceRight:reduceRight,reflect:reflect,reflectAll:reflectAll,reject:Z,rejectLimit:X,rejectSeries:J,retry:retry,retryable:retryable,seq:seq,series:series,setImmediate:l,some:re,someLimit:ne,someSeries:ie,sortBy:se,timeout:timeout,times:times,timesLimit:timesLimit,timesSeries:timesSeries,transform:transform,tryEach:oe,unmemoize:unmemoize,until:until,waterfall:le,whilst:ae,all:D,allLimit:j,allSeries:$,any:re,anyLimit:ne,anySeries:ie,find:R,findLimit:T,findSeries:C,flatMap:O,flatMapLimit:A,flatMapSeries:k,forEach:L,forEachSeries:N,forEachLimit:M,forEachOf:h,forEachOfSeries:m,forEachOfLimit:c,inject:E,foldl:E,foldr:reduceRight,select:B,selectLimit:H,selectSeries:W,wrapSync:asyncify,during:ae,doDuring:I};t.default=ue;t.apply=apply;t.applyEach=d;t.applyEachSeries=y;t.asyncify=asyncify;t.auto=auto;t.autoInject=autoInject;t.cargo=cargo;t.cargoQueue=cargo$1;t.compose=compose;t.concat=O;t.concatLimit=A;t.concatSeries=k;t.constant=constant;t.detect=R;t.detectLimit=T;t.detectSeries=C;t.dir=P;t.doUntil=doUntil;t.doWhilst=I;t.each=L;t.eachLimit=M;t.eachOf=h;t.eachOfLimit=c;t.eachOfSeries=m;t.eachSeries=N;t.ensureAsync=ensureAsync;t.every=D;t.everyLimit=j;t.everySeries=$;t.filter=B;t.filterLimit=H;t.filterSeries=W;t.forever=G;t.groupBy=groupBy;t.groupByLimit=U;t.groupBySeries=groupBySeries;t.log=V;t.map=p;t.mapLimit=x;t.mapSeries=g;t.mapValues=mapValues;t.mapValuesLimit=q;t.mapValuesSeries=mapValuesSeries;t.memoize=memoize;t.nextTick=Y;t.parallel=parallel;t.parallelLimit=parallelLimit;t.priorityQueue=priorityQueue;t.queue=queue$1;t.race=Q;t.reduce=E;t.reduceRight=reduceRight;t.reflect=reflect;t.reflectAll=reflectAll;t.reject=Z;t.rejectLimit=X;t.rejectSeries=J;t.retry=retry;t.retryable=retryable;t.seq=seq;t.series=series;t.setImmediate=l;t.some=re;t.someLimit=ne;t.someSeries=ie;t.sortBy=se;t.timeout=timeout;t.times=times;t.timesLimit=timesLimit;t.timesSeries=timesSeries;t.transform=transform;t.tryEach=oe;t.unmemoize=unmemoize;t.until=until;t.waterfall=le;t.whilst=ae;t.all=D;t.allLimit=j;t.allSeries=$;t.any=re;t.anyLimit=ne;t.anySeries=ie;t.find=R;t.findLimit=T;t.findSeries=C;t.flatMap=O;t.flatMapLimit=A;t.flatMapSeries=k;t.forEach=L;t.forEachSeries=N;t.forEachLimit=M;t.forEachOf=h;t.forEachOfSeries=m;t.forEachOfLimit=c;t.inject=E;t.foldl=E;t.foldr=reduceRight;t.select=B;t.selectLimit=H;t.selectSeries=W;t.wrapSync=asyncify;t.during=ae;t.doDuring=I;Object.defineProperty(t,"__esModule",{value:true})}))},5218:t=>{"use strict";t.exports=balanced;function balanced(t,r,i){if(t instanceof RegExp)t=maybeMatch(t,i);if(r instanceof RegExp)r=maybeMatch(r,i);var o=range(t,r,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+t.length,o[1]),post:i.slice(o[1]+r.length)}}function maybeMatch(t,r){var i=r.match(t);return i?i[0]:null}balanced.range=range;function range(t,r,i){var o,a,l,u,c;var h=i.indexOf(t);var p=i.indexOf(r,h+1);var d=h;if(h>=0&&p>0){if(t===r){return[h,p]}o=[];l=i.length;while(d>=0&&!c){if(d==h){o.push(d);h=i.indexOf(t,d+1)}else if(o.length==1){c=[o.pop(),p]}else{a=o.pop();if(a<l){l=a;u=p}p=i.indexOf(r,d+1)}d=h<p&&h>=0?h:p}if(o.length){c=[l,u]}}return c}},5603:(t,r,i)=>{"use strict";const{Buffer:o}=i(4300);const a=Symbol.for("BufferList");function BufferList(t){if(!(this instanceof BufferList)){return new BufferList(t)}BufferList._init.call(this,t)}BufferList._init=function _init(t){Object.defineProperty(this,a,{value:true});this._bufs=[];this.length=0;if(t){this.append(t)}};BufferList.prototype._new=function _new(t){return new BufferList(t)};BufferList.prototype._offset=function _offset(t){if(t===0){return[0,0]}let r=0;for(let i=0;i<this._bufs.length;i++){const o=r+this._bufs[i].length;if(t<o||i===this._bufs.length-1){return[i,t-r]}r=o}};BufferList.prototype._reverseOffset=function(t){const r=t[0];let i=t[1];for(let t=0;t<r;t++){i+=this._bufs[t].length}return i};BufferList.prototype.get=function get(t){if(t>this.length||t<0){return undefined}const r=this._offset(t);return this._bufs[r[0]][r[1]]};BufferList.prototype.slice=function slice(t,r){if(typeof t==="number"&&t<0){t+=this.length}if(typeof r==="number"&&r<0){r+=this.length}return this.copy(null,0,t,r)};BufferList.prototype.copy=function copy(t,r,i,a){if(typeof i!=="number"||i<0){i=0}if(typeof a!=="number"||a>this.length){a=this.length}if(i>=this.length){return t||o.alloc(0)}if(a<=0){return t||o.alloc(0)}const copy=!!t;const l=this._offset(i);const u=a-i;let c=u;let h=copy&&r||0;let p=l[1];if(i===0&&a===this.length){if(!copy){return this._bufs.length===1?this._bufs[0]:o.concat(this._bufs,this.length)}for(let r=0;r<this._bufs.length;r++){this._bufs[r].copy(t,h);h+=this._bufs[r].length}return t}if(c<=this._bufs[l[0]].length-p){return copy?this._bufs[l[0]].copy(t,r,p,p+c):this._bufs[l[0]].slice(p,p+c)}if(!copy){t=o.allocUnsafe(u)}for(let r=l[0];r<this._bufs.length;r++){const i=this._bufs[r].length-p;if(c>i){this._bufs[r].copy(t,h,p);h+=i}else{this._bufs[r].copy(t,h,p,p+c);h+=i;break}c-=i;if(p){p=0}}if(t.length>h)return t.slice(0,h);return t};BufferList.prototype.shallowSlice=function shallowSlice(t,r){t=t||0;r=typeof r!=="number"?this.length:r;if(t<0){t+=this.length}if(r<0){r+=this.length}if(t===r){return this._new()}const i=this._offset(t);const o=this._offset(r);const a=this._bufs.slice(i[0],o[0]+1);if(o[1]===0){a.pop()}else{a[a.length-1]=a[a.length-1].slice(0,o[1])}if(i[1]!==0){a[0]=a[0].slice(i[1])}return this._new(a)};BufferList.prototype.toString=function toString(t,r,i){return this.slice(r,i).toString(t)};BufferList.prototype.consume=function consume(t){t=Math.trunc(t);if(Number.isNaN(t)||t<=0)return this;while(this._bufs.length){if(t>=this._bufs[0].length){t-=this._bufs[0].length;this.length-=this._bufs[0].length;this._bufs.shift()}else{this._bufs[0]=this._bufs[0].slice(t);this.length-=t;break}}return this};BufferList.prototype.duplicate=function duplicate(){const t=this._new();for(let r=0;r<this._bufs.length;r++){t.append(this._bufs[r])}return t};BufferList.prototype.append=function append(t){if(t==null){return this}if(t.buffer){this._appendBuffer(o.from(t.buffer,t.byteOffset,t.byteLength))}else if(Array.isArray(t)){for(let r=0;r<t.length;r++){this.append(t[r])}}else if(this._isBufferList(t)){for(let r=0;r<t._bufs.length;r++){this.append(t._bufs[r])}}else{if(typeof t==="number"){t=t.toString()}this._appendBuffer(o.from(t))}return this};BufferList.prototype._appendBuffer=function appendBuffer(t){this._bufs.push(t);this.length+=t.length};BufferList.prototype.indexOf=function(t,r,i){if(i===undefined&&typeof r==="string"){i=r;r=undefined}if(typeof t==="function"||Array.isArray(t)){throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.')}else if(typeof t==="number"){t=o.from([t])}else if(typeof t==="string"){t=o.from(t,i)}else if(this._isBufferList(t)){t=t.slice()}else if(Array.isArray(t.buffer)){t=o.from(t.buffer,t.byteOffset,t.byteLength)}else if(!o.isBuffer(t)){t=o.from(t)}r=Number(r||0);if(isNaN(r)){r=0}if(r<0){r=this.length+r}if(r<0){r=0}if(t.length===0){return r>this.length?this.length:r}const a=this._offset(r);let l=a[0];let u=a[1];for(;l<this._bufs.length;l++){const r=this._bufs[l];while(u<r.length){const i=r.length-u;if(i>=t.length){const i=r.indexOf(t,u);if(i!==-1){return this._reverseOffset([l,i])}u=r.length-t.length+1}else{const r=this._reverseOffset([l,u]);if(this._match(r,t)){return r}u++}}u=0}return-1};BufferList.prototype._match=function(t,r){if(this.length-t<r.length){return false}for(let i=0;i<r.length;i++){if(this.get(t+i)!==r[i]){return false}}return true};(function(){const t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const r in t){(function(r){if(t[r]===null){BufferList.prototype[r]=function(t,i){return this.slice(t,t+i)[r](0,i)}}else{BufferList.prototype[r]=function(i=0){return this.slice(i,i+t[r])[r](0)}}})(r)}})();BufferList.prototype._isBufferList=function _isBufferList(t){return t instanceof BufferList||BufferList.isBufferList(t)};BufferList.isBufferList=function isBufferList(t){return t!=null&&t[a]};t.exports=BufferList},3428:(t,r,i)=>{"use strict";const o=i(3726).Duplex;const a=i(2842);const l=i(5603);function BufferListStream(t){if(!(this instanceof BufferListStream)){return new BufferListStream(t)}if(typeof t==="function"){this._callback=t;const r=function piper(t){if(this._callback){this._callback(t);this._callback=null}}.bind(this);this.on("pipe",(function onPipe(t){t.on("error",r)}));this.on("unpipe",(function onUnpipe(t){t.removeListener("error",r)}));t=null}l._init.call(this,t);o.call(this)}a(BufferListStream,o);Object.assign(BufferListStream.prototype,l.prototype);BufferListStream.prototype._new=function _new(t){return new BufferListStream(t)};BufferListStream.prototype._write=function _write(t,r,i){this._appendBuffer(t);if(typeof i==="function"){i()}};BufferListStream.prototype._read=function _read(t){if(!this.length){return this.push(null)}t=Math.min(t,this.length);this.push(this.slice(0,t));this.consume(t)};BufferListStream.prototype.end=function end(t){o.prototype.end.call(this,t);if(this._callback){this._callback(null,this.slice());this._callback=null}};BufferListStream.prototype._destroy=function _destroy(t,r){this._bufs.length=0;this.length=0;r(t)};BufferListStream.prototype._isBufferList=function _isBufferList(t){return t instanceof BufferListStream||t instanceof l||BufferListStream.isBufferList(t)};BufferListStream.isBufferList=l.isBufferList;t.exports=BufferListStream;t.exports.BufferListStream=BufferListStream;t.exports.BufferList=l},4800:(t,r,i)=>{var o=i(7381);var a=i(5218);t.exports=expandTop;var l="\0SLASH"+Math.random()+"\0";var u="\0OPEN"+Math.random()+"\0";var c="\0CLOSE"+Math.random()+"\0";var h="\0COMMA"+Math.random()+"\0";var p="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(l).split("\\{").join(u).split("\\}").join(c).split("\\,").join(h).split("\\.").join(p)}function unescapeBraces(t){return t.split(l).join("\\").split(u).join("{").split(c).join("}").split(h).join(",").split(p).join(".")}function parseCommaParts(t){if(!t)return[""];var r=[];var i=a("{","}",t);if(!i)return t.split(",");var o=i.pre;var l=i.body;var u=i.post;var c=o.split(",");c[c.length-1]+="{"+l+"}";var h=parseCommaParts(u);if(u.length){c[c.length-1]+=h.shift();c.push.apply(c,h)}r.push.apply(r,c);return r}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function identity(t){return t}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,r){return t<=r}function gte(t,r){return t>=r}function expand(t,r){var i=[];var l=a("{","}",t);if(!l||/\$$/.test(l.pre))return[t];var u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body);var h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body);var p=u||h;var d=l.body.indexOf(",")>=0;if(!p&&!d){if(l.post.match(/,.*\}/)){t=l.pre+"{"+l.body+c+l.post;return expand(t)}return[t]}var m;if(p){m=l.body.split(/\.\./)}else{m=parseCommaParts(l.body);if(m.length===1){m=expand(m[0],false).map(embrace);if(m.length===1){var g=l.post.length?expand(l.post,false):[""];return g.map((function(t){return l.pre+m[0]+t}))}}}var y=l.pre;var g=l.post.length?expand(l.post,false):[""];var v;if(p){var b=numeric(m[0]);var _=numeric(m[1]);var w=Math.max(m[0].length,m[1].length);var S=m.length==3?Math.abs(numeric(m[2])):1;var E=lte;var x=_<b;if(x){S*=-1;E=gte}var A=m.some(isPadded);v=[];for(var O=b;E(O,_);O+=S){var k;if(h){k=String.fromCharCode(O);if(k==="\\")k=""}else{k=String(O);if(A){var R=w-k.length;if(R>0){var T=new Array(R+1).join("0");if(O<0)k="-"+T+k.slice(1);else k=T+k}}}v.push(k)}}else{v=o(m,(function(t){return expand(t,false)}))}for(var C=0;C<v.length;C++){for(var P=0;P<g.length;P++){var I=y+v[C]+g[P];if(!r||p||I)i.push(I)}}return i}},8333:(t,r,i)=>{"use strict";const o=i(8137);const a=i(8179);const l=i(3013);const u=i(5719);const braces=(t,r={})=>{let i=[];if(Array.isArray(t)){for(let o of t){let t=braces.create(o,r);if(Array.isArray(t)){i.push(...t)}else{i.push(t)}}}else{i=[].concat(braces.create(t,r))}if(r&&r.expand===true&&r.nodupes===true){i=[...new Set(i)]}return i};braces.parse=(t,r={})=>u(t,r);braces.stringify=(t,r={})=>{if(typeof t==="string"){return o(braces.parse(t,r),r)}return o(t,r)};braces.compile=(t,r={})=>{if(typeof t==="string"){t=braces.parse(t,r)}return a(t,r)};braces.expand=(t,r={})=>{if(typeof t==="string"){t=braces.parse(t,r)}let i=l(t,r);if(r.noempty===true){i=i.filter(Boolean)}if(r.nodupes===true){i=[...new Set(i)]}return i};braces.create=(t,r={})=>{if(t===""||t.length<3){return[t]}return r.expand!==true?braces.compile(t,r):braces.expand(t,r)};t.exports=braces},8179:(t,r,i)=>{"use strict";const o=i(7783);const a=i(5617);const compile=(t,r={})=>{let walk=(t,i={})=>{let l=a.isInvalidBrace(i);let u=t.invalid===true&&r.escapeInvalid===true;let c=l===true||u===true;let h=r.escapeInvalid===true?"\\":"";let p="";if(t.isOpen===true){return h+t.value}if(t.isClose===true){return h+t.value}if(t.type==="open"){return c?h+t.value:"("}if(t.type==="close"){return c?h+t.value:")"}if(t.type==="comma"){return t.prev.type==="comma"?"":c?t.value:"|"}if(t.value){return t.value}if(t.nodes&&t.ranges>0){let i=a.reduce(t.nodes);let l=o(...i,{...r,wrap:false,toRegex:true});if(l.length!==0){return i.length>1&&l.length>1?`(${l})`:l}}if(t.nodes){for(let r of t.nodes){p+=walk(r,t)}}return p};return walk(t)};t.exports=compile},5457:t=>{"use strict";t.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},3013:(t,r,i)=>{"use strict";const o=i(7783);const a=i(8137);const l=i(5617);const append=(t="",r="",i=false)=>{let o=[];t=[].concat(t);r=[].concat(r);if(!r.length)return t;if(!t.length){return i?l.flatten(r).map((t=>`{${t}}`)):r}for(let a of t){if(Array.isArray(a)){for(let t of a){o.push(append(t,r,i))}}else{for(let t of r){if(i===true&&typeof t==="string")t=`{${t}}`;o.push(Array.isArray(t)?append(a,t,i):a+t)}}}return l.flatten(o)};const expand=(t,r={})=>{let i=r.rangeLimit===void 0?1e3:r.rangeLimit;let walk=(t,u={})=>{t.queue=[];let c=u;let h=u.queue;while(c.type!=="brace"&&c.type!=="root"&&c.parent){c=c.parent;h=c.queue}if(t.invalid||t.dollar){h.push(append(h.pop(),a(t,r)));return}if(t.type==="brace"&&t.invalid!==true&&t.nodes.length===2){h.push(append(h.pop(),["{}"]));return}if(t.nodes&&t.ranges>0){let u=l.reduce(t.nodes);if(l.exceedsLimit(...u,r.step,i)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let c=o(...u,r);if(c.length===0){c=a(t,r)}h.push(append(h.pop(),c));t.nodes=[];return}let p=l.encloseBrace(t);let d=t.queue;let m=t;while(m.type!=="brace"&&m.type!=="root"&&m.parent){m=m.parent;d=m.queue}for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r];if(i.type==="comma"&&t.type==="brace"){if(r===1)d.push("");d.push("");continue}if(i.type==="close"){h.push(append(h.pop(),d,p));continue}if(i.value&&i.type!=="open"){d.push(append(d.pop(),i.value));continue}if(i.nodes){walk(i,t)}}return d};return l.flatten(walk(t))};t.exports=expand},5719:(t,r,i)=>{"use strict";const o=i(8137);const{MAX_LENGTH:a,CHAR_BACKSLASH:l,CHAR_BACKTICK:u,CHAR_COMMA:c,CHAR_DOT:h,CHAR_LEFT_PARENTHESES:p,CHAR_RIGHT_PARENTHESES:d,CHAR_LEFT_CURLY_BRACE:m,CHAR_RIGHT_CURLY_BRACE:g,CHAR_LEFT_SQUARE_BRACKET:y,CHAR_RIGHT_SQUARE_BRACKET:v,CHAR_DOUBLE_QUOTE:b,CHAR_SINGLE_QUOTE:_,CHAR_NO_BREAK_SPACE:w,CHAR_ZERO_WIDTH_NOBREAK_SPACE:S}=i(5457);const parse=(t,r={})=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}let i=r||{};let E=typeof i.maxLength==="number"?Math.min(a,i.maxLength):a;if(t.length>E){throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${E})`)}let x={type:"root",input:t,nodes:[]};let A=[x];let O=x;let k=x;let R=0;let T=t.length;let C=0;let P=0;let I;let L={};const advance=()=>t[C++];const push=t=>{if(t.type==="text"&&k.type==="dot"){k.type="text"}if(k&&k.type==="text"&&t.type==="text"){k.value+=t.value;return}O.nodes.push(t);t.parent=O;t.prev=k;k=t;return t};push({type:"bos"});while(C<T){O=A[A.length-1];I=advance();if(I===S||I===w){continue}if(I===l){push({type:"text",value:(r.keepEscaping?I:"")+advance()});continue}if(I===v){push({type:"text",value:"\\"+I});continue}if(I===y){R++;let t=true;let r;while(C<T&&(r=advance())){I+=r;if(r===y){R++;continue}if(r===l){I+=advance();continue}if(r===v){R--;if(R===0){break}}}push({type:"text",value:I});continue}if(I===p){O=push({type:"paren",nodes:[]});A.push(O);push({type:"text",value:I});continue}if(I===d){if(O.type!=="paren"){push({type:"text",value:I});continue}O=A.pop();push({type:"text",value:I});O=A[A.length-1];continue}if(I===b||I===_||I===u){let t=I;let i;if(r.keepQuotes!==true){I=""}while(C<T&&(i=advance())){if(i===l){I+=i+advance();continue}if(i===t){if(r.keepQuotes===true)I+=i;break}I+=i}push({type:"text",value:I});continue}if(I===m){P++;let t=k.value&&k.value.slice(-1)==="$"||O.dollar===true;let r={type:"brace",open:true,close:false,dollar:t,depth:P,commas:0,ranges:0,nodes:[]};O=push(r);A.push(O);push({type:"open",value:I});continue}if(I===g){if(O.type!=="brace"){push({type:"text",value:I});continue}let t="close";O=A.pop();O.close=true;push({type:t,value:I});P--;O=A[A.length-1];continue}if(I===c&&P>0){if(O.ranges>0){O.ranges=0;let t=O.nodes.shift();O.nodes=[t,{type:"text",value:o(O)}]}push({type:"comma",value:I});O.commas++;continue}if(I===h&&P>0&&O.commas===0){let t=O.nodes;if(P===0||t.length===0){push({type:"text",value:I});continue}if(k.type==="dot"){O.range=[];k.value+=I;k.type="range";if(O.nodes.length!==3&&O.nodes.length!==5){O.invalid=true;O.ranges=0;k.type="text";continue}O.ranges++;O.args=[];continue}if(k.type==="range"){t.pop();let r=t[t.length-1];r.value+=k.value+I;k=r;O.ranges--;continue}push({type:"dot",value:I});continue}push({type:"text",value:I})}do{O=A.pop();if(O.type!=="root"){O.nodes.forEach((t=>{if(!t.nodes){if(t.type==="open")t.isOpen=true;if(t.type==="close")t.isClose=true;if(!t.nodes)t.type="text";t.invalid=true}}));let t=A[A.length-1];let r=t.nodes.indexOf(O);t.nodes.splice(r,1,...O.nodes)}}while(A.length>0);push({type:"eos"});return x};t.exports=parse},8137:(t,r,i)=>{"use strict";const o=i(5617);t.exports=(t,r={})=>{let stringify=(t,i={})=>{let a=r.escapeInvalid&&o.isInvalidBrace(i);let l=t.invalid===true&&r.escapeInvalid===true;let u="";if(t.value){if((a||l)&&o.isOpenOrClose(t)){return"\\"+t.value}return t.value}if(t.value){return t.value}if(t.nodes){for(let r of t.nodes){u+=stringify(r)}}return u};return stringify(t)}},5617:(t,r)=>{"use strict";r.isInteger=t=>{if(typeof t==="number"){return Number.isInteger(t)}if(typeof t==="string"&&t.trim()!==""){return Number.isInteger(Number(t))}return false};r.find=(t,r)=>t.nodes.find((t=>t.type===r));r.exceedsLimit=(t,i,o=1,a)=>{if(a===false)return false;if(!r.isInteger(t)||!r.isInteger(i))return false;return(Number(i)-Number(t))/Number(o)>=a};r.escapeNode=(t,r=0,i)=>{let o=t.nodes[r];if(!o)return;if(i&&o.type===i||o.type==="open"||o.type==="close"){if(o.escaped!==true){o.value="\\"+o.value;o.escaped=true}}};r.encloseBrace=t=>{if(t.type!=="brace")return false;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}return false};r.isInvalidBrace=t=>{if(t.type!=="brace")return false;if(t.invalid===true||t.dollar)return true;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}if(t.open!==true||t.close!==true){t.invalid=true;return true}return false};r.isOpenOrClose=t=>{if(t.type==="open"||t.type==="close"){return true}return t.open===true||t.close===true};r.reduce=t=>t.reduce(((t,r)=>{if(r.type==="text")t.push(r.value);if(r.type==="range")r.type="text";return t}),[]);r.flatten=(...t)=>{const r=[];const flat=t=>{for(let i=0;i<t.length;i++){let o=t[i];Array.isArray(o)?flat(o,r):o!==void 0&&r.push(o)}return r};flat(t);return r}},3050:(t,r,i)=>{var o=i(4300).Buffer;var a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];if(typeof Int32Array!=="undefined"){a=new Int32Array(a)}function ensureBuffer(t){if(o.isBuffer(t)){return t}var r=typeof o.alloc==="function"&&typeof o.from==="function";if(typeof t==="number"){return r?o.alloc(t):new o(t)}else if(typeof t==="string"){return r?o.from(t):new o(t)}else{throw new Error("input must be buffer, number, or string, received "+typeof t)}}function bufferizeInt(t){var r=ensureBuffer(4);r.writeInt32BE(t,0);return r}function _crc32(t,r){t=ensureBuffer(t);if(o.isBuffer(r)){r=r.readUInt32BE(0)}var i=~~r^-1;for(var l=0;l<t.length;l++){i=a[(i^t[l])&255]^i>>>8}return i^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.apply(null,arguments)};crc32.unsigned=function(){return _crc32.apply(null,arguments)>>>0};t.exports=crc32},8050:t=>{var r=t.exports=function(){};r.prototype.getName=function(){};r.prototype.getSize=function(){};r.prototype.getLastModifiedDate=function(){};r.prototype.isDirectory=function(){}},6286:(t,r,i)=>{var o=i(3837).inherits;var a=i(3726).Transform;var l=i(8050);var u=i(5219);var c=t.exports=function(t){if(!(this instanceof c)){return new c(t)}a.call(this,t);this.offset=0;this._archive={finish:false,finished:false,processing:false}};o(c,a);c.prototype._appendBuffer=function(t,r,i){};c.prototype._appendStream=function(t,r,i){};c.prototype._emitErrorCallback=function(t){if(t){this.emit("error",t)}};c.prototype._finish=function(t){};c.prototype._normalizeEntry=function(t){};c.prototype._transform=function(t,r,i){i(null,t)};c.prototype.entry=function(t,r,i){r=r||null;if(typeof i!=="function"){i=this._emitErrorCallback.bind(this)}if(!(t instanceof l)){i(new Error("not a valid instance of ArchiveEntry"));return}if(this._archive.finish||this._archive.finished){i(new Error("unacceptable entry after finish"));return}if(this._archive.processing){i(new Error("already processing an entry"));return}this._archive.processing=true;this._normalizeEntry(t);this._entry=t;r=u.normalizeInputSource(r);if(Buffer.isBuffer(r)){this._appendBuffer(t,r,i)}else if(u.isStream(r)){this._appendStream(t,r,i)}else{this._archive.processing=false;i(new Error("input source must be valid Stream or Buffer instance"));return}return this};c.prototype.finish=function(){if(this._archive.processing){this._archive.finish=true;return}this._finish()};c.prototype.getBytesWritten=function(){return this.offset};c.prototype.write=function(t,r){if(t){this.offset+=t.length}return a.prototype.write.call(this,t,r)}},3031:t=>{t.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1}},9341:(t,r,i)=>{var o=i(6730);var a=1<<3;var l=1<<0;var u=1<<2;var c=1<<1;var h=1<<6;var p=1<<11;var d=t.exports=function(){if(!(this instanceof d)){return new d}this.descriptor=false;this.encryption=false;this.utf8=false;this.numberOfShannonFanoTrees=0;this.strongEncryption=false;this.slidingDictionarySize=0;return this};d.prototype.encode=function(){return o.getShortBytes((this.descriptor?a:0)|(this.utf8?p:0)|(this.encryption?l:0)|(this.strongEncryption?h:0))};d.prototype.parse=function(t,r){var i=o.getShortBytesValue(t,r);var m=new d;m.useDataDescriptor((i&a)!==0);m.useUTF8ForNames((i&p)!==0);m.useStrongEncryption((i&h)!==0);m.useEncryption((i&l)!==0);m.setSlidingDictionarySize((i&c)!==0?8192:4096);m.setNumberOfShannonFanoTrees((i&u)!==0?3:2);return m};d.prototype.setNumberOfShannonFanoTrees=function(t){this.numberOfShannonFanoTrees=t};d.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees};d.prototype.setSlidingDictionarySize=function(t){this.slidingDictionarySize=t};d.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize};d.prototype.useDataDescriptor=function(t){this.descriptor=t};d.prototype.usesDataDescriptor=function(){return this.descriptor};d.prototype.useEncryption=function(t){this.encryption=t};d.prototype.usesEncryption=function(){return this.encryption};d.prototype.useStrongEncryption=function(t){this.strongEncryption=t};d.prototype.usesStrongEncryption=function(){return this.strongEncryption};d.prototype.useUTF8ForNames=function(t){this.utf8=t};d.prototype.usesUTF8ForNames=function(){return this.utf8}},4623:t=>{t.exports={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}},6730:t=>{var r=t.exports={};r.dateToDos=function(t,r){r=r||false;var i=r?t.getFullYear():t.getUTCFullYear();if(i<1980){return 2162688}else if(i>=2044){return 2141175677}var o={year:i,month:r?t.getMonth():t.getUTCMonth(),date:r?t.getDate():t.getUTCDate(),hours:r?t.getHours():t.getUTCHours(),minutes:r?t.getMinutes():t.getUTCMinutes(),seconds:r?t.getSeconds():t.getUTCSeconds()};return o.year-1980<<25|o.month+1<<21|o.date<<16|o.hours<<11|o.minutes<<5|o.seconds/2};r.dosToDate=function(t){return new Date((t>>25&127)+1980,(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(t&31)<<1)};r.fromDosTime=function(t){return r.dosToDate(t.readUInt32LE(0))};r.getEightBytes=function(t){var r=Buffer.alloc(8);r.writeUInt32LE(t%4294967296,0);r.writeUInt32LE(t/4294967296|0,4);return r};r.getShortBytes=function(t){var r=Buffer.alloc(2);r.writeUInt16LE((t&65535)>>>0,0);return r};r.getShortBytesValue=function(t,r){return t.readUInt16LE(r)};r.getLongBytes=function(t){var r=Buffer.alloc(4);r.writeUInt32LE((t&4294967295)>>>0,0);return r};r.getLongBytesValue=function(t,r){return t.readUInt32LE(r)};r.toDosTime=function(t){return r.getLongBytes(r.dateToDos(t))}},5756:(t,r,i)=>{var o=i(3837).inherits;var a=i(4119);var l=i(8050);var u=i(9341);var c=i(4623);var h=i(3031);var p=i(6730);var d=t.exports=function(t){if(!(this instanceof d)){return new d(t)}l.call(this);this.platform=h.PLATFORM_FAT;this.method=-1;this.name=null;this.size=0;this.csize=0;this.gpb=new u;this.crc=0;this.time=-1;this.minver=h.MIN_VERSION_INITIAL;this.mode=-1;this.extra=null;this.exattr=0;this.inattr=0;this.comment=null;if(t){this.setName(t)}};o(d,l);d.prototype.getCentralDirectoryExtra=function(){return this.getExtra()};d.prototype.getComment=function(){return this.comment!==null?this.comment:""};d.prototype.getCompressedSize=function(){return this.csize};d.prototype.getCrc=function(){return this.crc};d.prototype.getExternalAttributes=function(){return this.exattr};d.prototype.getExtra=function(){return this.extra!==null?this.extra:h.EMPTY};d.prototype.getGeneralPurposeBit=function(){return this.gpb};d.prototype.getInternalAttributes=function(){return this.inattr};d.prototype.getLastModifiedDate=function(){return this.getTime()};d.prototype.getLocalFileDataExtra=function(){return this.getExtra()};d.prototype.getMethod=function(){return this.method};d.prototype.getName=function(){return this.name};d.prototype.getPlatform=function(){return this.platform};d.prototype.getSize=function(){return this.size};d.prototype.getTime=function(){return this.time!==-1?p.dosToDate(this.time):-1};d.prototype.getTimeDos=function(){return this.time!==-1?this.time:0};d.prototype.getUnixMode=function(){return this.platform!==h.PLATFORM_UNIX?0:this.getExternalAttributes()>>h.SHORT_SHIFT&h.SHORT_MASK};d.prototype.getVersionNeededToExtract=function(){return this.minver};d.prototype.setComment=function(t){if(Buffer.byteLength(t)!==t.length){this.getGeneralPurposeBit().useUTF8ForNames(true)}this.comment=t};d.prototype.setCompressedSize=function(t){if(t<0){throw new Error("invalid entry compressed size")}this.csize=t};d.prototype.setCrc=function(t){if(t<0){throw new Error("invalid entry crc32")}this.crc=t};d.prototype.setExternalAttributes=function(t){this.exattr=t>>>0};d.prototype.setExtra=function(t){this.extra=t};d.prototype.setGeneralPurposeBit=function(t){if(!(t instanceof u)){throw new Error("invalid entry GeneralPurposeBit")}this.gpb=t};d.prototype.setInternalAttributes=function(t){this.inattr=t};d.prototype.setMethod=function(t){if(t<0){throw new Error("invalid entry compression method")}this.method=t};d.prototype.setName=function(t,r=false){t=a(t,false).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"");if(r){t=`/${t}`}if(Buffer.byteLength(t)!==t.length){this.getGeneralPurposeBit().useUTF8ForNames(true)}this.name=t};d.prototype.setPlatform=function(t){this.platform=t};d.prototype.setSize=function(t){if(t<0){throw new Error("invalid entry size")}this.size=t};d.prototype.setTime=function(t,r){if(!(t instanceof Date)){throw new Error("invalid entry time")}this.time=p.dateToDos(t,r)};d.prototype.setUnixMode=function(t){t|=this.isDirectory()?h.S_IFDIR:h.S_IFREG;var r=0;r|=t<<h.SHORT_SHIFT|(this.isDirectory()?h.S_DOS_D:h.S_DOS_A);this.setExternalAttributes(r);this.mode=t&h.MODE_MASK;this.platform=h.PLATFORM_UNIX};d.prototype.setVersionNeededToExtract=function(t){this.minver=t};d.prototype.isDirectory=function(){return this.getName().slice(-1)==="/"};d.prototype.isUnixSymlink=function(){return(this.getUnixMode()&c.FILE_TYPE_FLAG)===c.LINK_FLAG};d.prototype.isZip64=function(){return this.csize>h.ZIP64_MAGIC||this.size>h.ZIP64_MAGIC}},8486:(t,r,i)=>{var o=i(3837).inherits;var a=i(3050);var{CRC32Stream:l}=i(1817);var{DeflateCRC32Stream:u}=i(1817);var c=i(6286);var h=i(5756);var p=i(9341);var d=i(3031);var m=i(5219);var g=i(6730);var y=t.exports=function(t){if(!(this instanceof y)){return new y(t)}t=this.options=this._defaults(t);c.call(this,t);this._entry=null;this._entries=[];this._archive={centralLength:0,centralOffset:0,comment:"",finish:false,finished:false,processing:false,forceZip64:t.forceZip64,forceLocalTime:t.forceLocalTime}};o(y,c);y.prototype._afterAppend=function(t){this._entries.push(t);if(t.getGeneralPurposeBit().usesDataDescriptor()){this._writeDataDescriptor(t)}this._archive.processing=false;this._entry=null;if(this._archive.finish&&!this._archive.finished){this._finish()}};y.prototype._appendBuffer=function(t,r,i){if(r.length===0){t.setMethod(d.METHOD_STORED)}var o=t.getMethod();if(o===d.METHOD_STORED){t.setSize(r.length);t.setCompressedSize(r.length);t.setCrc(a.unsigned(r))}this._writeLocalFileHeader(t);if(o===d.METHOD_STORED){this.write(r);this._afterAppend(t);i(null,t);return}else if(o===d.METHOD_DEFLATED){this._smartStream(t,i).end(r);return}else{i(new Error("compression method "+o+" not implemented"));return}};y.prototype._appendStream=function(t,r,i){t.getGeneralPurposeBit().useDataDescriptor(true);t.setVersionNeededToExtract(d.MIN_VERSION_DATA_DESCRIPTOR);this._writeLocalFileHeader(t);var o=this._smartStream(t,i);r.once("error",(function(t){o.emit("error",t);o.end()}));r.pipe(o)};y.prototype._defaults=function(t){if(typeof t!=="object"){t={}}if(typeof t.zlib!=="object"){t.zlib={}}if(typeof t.zlib.level!=="number"){t.zlib.level=d.ZLIB_BEST_SPEED}t.forceZip64=!!t.forceZip64;t.forceLocalTime=!!t.forceLocalTime;return t};y.prototype._finish=function(){this._archive.centralOffset=this.offset;this._entries.forEach(function(t){this._writeCentralFileHeader(t)}.bind(this));this._archive.centralLength=this.offset-this._archive.centralOffset;if(this.isZip64()){this._writeCentralDirectoryZip64()}this._writeCentralDirectoryEnd();this._archive.processing=false;this._archive.finish=true;this._archive.finished=true;this.end()};y.prototype._normalizeEntry=function(t){if(t.getMethod()===-1){t.setMethod(d.METHOD_DEFLATED)}if(t.getMethod()===d.METHOD_DEFLATED){t.getGeneralPurposeBit().useDataDescriptor(true);t.setVersionNeededToExtract(d.MIN_VERSION_DATA_DESCRIPTOR)}if(t.getTime()===-1){t.setTime(new Date,this._archive.forceLocalTime)}t._offsets={file:0,data:0,contents:0}};y.prototype._smartStream=function(t,r){var i=t.getMethod()===d.METHOD_DEFLATED;var o=i?new u(this.options.zlib):new l;var a=null;function handleStuff(){var i=o.digest().readUInt32BE(0);t.setCrc(i);t.setSize(o.size());t.setCompressedSize(o.size(true));this._afterAppend(t);r(a,t)}o.once("end",handleStuff.bind(this));o.once("error",(function(t){a=t}));o.pipe(this,{end:false});return o};y.prototype._writeCentralDirectoryEnd=function(){var t=this._entries.length;var r=this._archive.centralLength;var i=this._archive.centralOffset;if(this.isZip64()){t=d.ZIP64_MAGIC_SHORT;r=d.ZIP64_MAGIC;i=d.ZIP64_MAGIC}this.write(g.getLongBytes(d.SIG_EOCD));this.write(d.SHORT_ZERO);this.write(d.SHORT_ZERO);this.write(g.getShortBytes(t));this.write(g.getShortBytes(t));this.write(g.getLongBytes(r));this.write(g.getLongBytes(i));var o=this.getComment();var a=Buffer.byteLength(o);this.write(g.getShortBytes(a));this.write(o)};y.prototype._writeCentralDirectoryZip64=function(){this.write(g.getLongBytes(d.SIG_ZIP64_EOCD));this.write(g.getEightBytes(44));this.write(g.getShortBytes(d.MIN_VERSION_ZIP64));this.write(g.getShortBytes(d.MIN_VERSION_ZIP64));this.write(d.LONG_ZERO);this.write(d.LONG_ZERO);this.write(g.getEightBytes(this._entries.length));this.write(g.getEightBytes(this._entries.length));this.write(g.getEightBytes(this._archive.centralLength));this.write(g.getEightBytes(this._archive.centralOffset));this.write(g.getLongBytes(d.SIG_ZIP64_EOCD_LOC));this.write(d.LONG_ZERO);this.write(g.getEightBytes(this._archive.centralOffset+this._archive.centralLength));this.write(g.getLongBytes(1))};y.prototype._writeCentralFileHeader=function(t){var r=t.getGeneralPurposeBit();var i=t.getMethod();var o=t._offsets;var a=t.getSize();var l=t.getCompressedSize();if(t.isZip64()||o.file>d.ZIP64_MAGIC){a=d.ZIP64_MAGIC;l=d.ZIP64_MAGIC;t.setVersionNeededToExtract(d.MIN_VERSION_ZIP64);var u=Buffer.concat([g.getShortBytes(d.ZIP64_EXTRA_ID),g.getShortBytes(24),g.getEightBytes(t.getSize()),g.getEightBytes(t.getCompressedSize()),g.getEightBytes(o.file)],28);t.setExtra(u)}this.write(g.getLongBytes(d.SIG_CFH));this.write(g.getShortBytes(t.getPlatform()<<8|d.VERSION_MADEBY));this.write(g.getShortBytes(t.getVersionNeededToExtract()));this.write(r.encode());this.write(g.getShortBytes(i));this.write(g.getLongBytes(t.getTimeDos()));this.write(g.getLongBytes(t.getCrc()));this.write(g.getLongBytes(l));this.write(g.getLongBytes(a));var c=t.getName();var h=t.getComment();var p=t.getCentralDirectoryExtra();if(r.usesUTF8ForNames()){c=Buffer.from(c);h=Buffer.from(h)}this.write(g.getShortBytes(c.length));this.write(g.getShortBytes(p.length));this.write(g.getShortBytes(h.length));this.write(d.SHORT_ZERO);this.write(g.getShortBytes(t.getInternalAttributes()));this.write(g.getLongBytes(t.getExternalAttributes()));if(o.file>d.ZIP64_MAGIC){this.write(g.getLongBytes(d.ZIP64_MAGIC))}else{this.write(g.getLongBytes(o.file))}this.write(c);this.write(p);this.write(h)};y.prototype._writeDataDescriptor=function(t){this.write(g.getLongBytes(d.SIG_DD));this.write(g.getLongBytes(t.getCrc()));if(t.isZip64()){this.write(g.getEightBytes(t.getCompressedSize()));this.write(g.getEightBytes(t.getSize()))}else{this.write(g.getLongBytes(t.getCompressedSize()));this.write(g.getLongBytes(t.getSize()))}};y.prototype._writeLocalFileHeader=function(t){var r=t.getGeneralPurposeBit();var i=t.getMethod();var o=t.getName();var a=t.getLocalFileDataExtra();if(t.isZip64()){r.useDataDescriptor(true);t.setVersionNeededToExtract(d.MIN_VERSION_ZIP64)}if(r.usesUTF8ForNames()){o=Buffer.from(o)}t._offsets.file=this.offset;this.write(g.getLongBytes(d.SIG_LFH));this.write(g.getShortBytes(t.getVersionNeededToExtract()));this.write(r.encode());this.write(g.getShortBytes(i));this.write(g.getLongBytes(t.getTimeDos()));t._offsets.data=this.offset;if(r.usesDataDescriptor()){this.write(d.LONG_ZERO);this.write(d.LONG_ZERO);this.write(d.LONG_ZERO)}else{this.write(g.getLongBytes(t.getCrc()));this.write(g.getLongBytes(t.getCompressedSize()));this.write(g.getLongBytes(t.getSize()))}this.write(g.getShortBytes(o.length));this.write(g.getShortBytes(a.length));this.write(o);this.write(a);t._offsets.contents=this.offset};y.prototype.getComment=function(t){return this._archive.comment!==null?this._archive.comment:""};y.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>d.ZIP64_MAGIC_SHORT||this._archive.centralLength>d.ZIP64_MAGIC||this._archive.centralOffset>d.ZIP64_MAGIC};y.prototype.setComment=function(t){this._archive.comment=t}},2096:(t,r,i)=>{t.exports={ArchiveEntry:i(8050),ZipArchiveEntry:i(5756),ArchiveOutputStream:i(6286),ZipArchiveOutputStream:i(8486)}},5219:(t,r,i)=>{var o=i(2781).Stream;var a=i(3726).PassThrough;var l=t.exports={};l.isStream=function(t){return t instanceof o};l.normalizeInputSource=function(t){if(t===null){return Buffer.alloc(0)}else if(typeof t==="string"){return Buffer.from(t)}else if(l.isStream(t)&&!t._readableState){var r=new a;t.pipe(r);return r}return t}},7381:t=>{t.exports=function(t,i){var o=[];for(var a=0;a<t.length;a++){var l=i(t[a],a);if(r(l))o.push.apply(o,l);else o.push(l)}return o};var r=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"}},642:(t,r,i)=>{function isArray(t){if(Array.isArray){return Array.isArray(t)}return objectToString(t)==="[object Array]"}r.isArray=isArray;function isBoolean(t){return typeof t==="boolean"}r.isBoolean=isBoolean;function isNull(t){return t===null}r.isNull=isNull;function isNullOrUndefined(t){return t==null}r.isNullOrUndefined=isNullOrUndefined;function isNumber(t){return typeof t==="number"}r.isNumber=isNumber;function isString(t){return typeof t==="string"}r.isString=isString;function isSymbol(t){return typeof t==="symbol"}r.isSymbol=isSymbol;function isUndefined(t){return t===void 0}r.isUndefined=isUndefined;function isRegExp(t){return objectToString(t)==="[object RegExp]"}r.isRegExp=isRegExp;function isObject(t){return typeof t==="object"&&t!==null}r.isObject=isObject;function isDate(t){return objectToString(t)==="[object Date]"}r.isDate=isDate;function isError(t){return objectToString(t)==="[object Error]"||t instanceof Error}r.isError=isError;function isFunction(t){return typeof t==="function"}r.isFunction=isFunction;function isPrimitive(t){return t===null||typeof t==="boolean"||typeof t==="number"||typeof t==="string"||typeof t==="symbol"||typeof t==="undefined"}r.isPrimitive=isPrimitive;r.isBuffer=i(4300).Buffer.isBuffer;function objectToString(t){return Object.prototype.toString.call(t)}},1535:(t,r,i)=>{"use strict";const o=i(3134);class CpFileError extends o{constructor(t,r){super(t,r);Object.assign(this,r);this.name="CpFileError"}}t.exports=CpFileError},1902:(t,r,i)=>{"use strict";const{promisify:o}=i(3837);const a=i(9165);const l=i(5940);const u=i(6415);const c=i(1535);const h=o(a.stat);const p=o(a.lstat);const d=o(a.utimes);const m=o(a.chmod);r.closeSync=a.closeSync.bind(a);r.createWriteStream=a.createWriteStream.bind(a);r.createReadStream=async(t,r)=>{const i=a.createReadStream(t,r);try{await u(i,["readable","end"])}catch(r){throw new c(`Cannot read from \`${t}\`: ${r.message}`,r)}return i};r.stat=t=>h(t).catch((r=>{throw new c(`Cannot stat path \`${t}\`: ${r.message}`,r)}));r.lstat=t=>p(t).catch((r=>{throw new c(`lstat \`${t}\` failed: ${r.message}`,r)}));r.utimes=(t,r,i)=>d(t,r,i).catch((r=>{throw new c(`utimes \`${t}\` failed: ${r.message}`,r)}));r.chmod=(t,r)=>m(t,r).catch((r=>{throw new c(`chmod \`${t}\` failed: ${r.message}`,r)}));r.statSync=t=>{try{return a.statSync(t)}catch(r){throw new c(`stat \`${t}\` failed: ${r.message}`,r)}};r.utimesSync=(t,r,i)=>{try{return a.utimesSync(t,r,i)}catch(r){throw new c(`utimes \`${t}\` failed: ${r.message}`,r)}};r.makeDir=(t,r)=>l(t,{...r,fs:a}).catch((r=>{throw new c(`Cannot create directory \`${t}\`: ${r.message}`,r)}));r.makeDirSync=(t,r)=>{try{l.sync(t,{...r,fs:a})}catch(r){throw new c(`Cannot create directory \`${t}\`: ${r.message}`,r)}};r.copyFileSync=(t,r,i)=>{try{a.copyFileSync(t,r,i)}catch(i){throw new c(`Cannot copy from \`${t}\` to \`${r}\`: ${i.message}`,i)}}},8174:(t,r,i)=>{"use strict";const o=i(1017);const{constants:a}=i(7147);const l=i(6415);const u=i(1535);const c=i(1902);const h=i(9390);const cpFileAsync=async(t,r,i,a)=>{let h;const p=await c.stat(t);a.size=p.size;const d=await c.createReadStream(t);await c.makeDir(o.dirname(r),{mode:i.directoryMode});const m=c.createWriteStream(r,{flags:i.overwrite?"w":"wx"});d.on("data",(()=>{a.writtenBytes=m.bytesWritten}));d.once("error",(r=>{h=new u(`Cannot read from \`${t}\`: ${r.message}`,r);m.end()}));let g=false;try{const t=l(m,"close");d.pipe(m);await t;a.writtenBytes=a.size;g=true}catch(t){throw new u(`Cannot write to \`${r}\`: ${t.message}`,t)}if(h){throw h}if(g){const i=await c.lstat(t);return Promise.all([c.utimes(r,i.atime,i.mtime),c.chmod(r,i.mode)])}};const cpFile=(t,r,i)=>{if(!t||!r){return Promise.reject(new u("`source` and `destination` required"))}i={overwrite:true,...i};const a=new h(o.resolve(t),o.resolve(r));const l=cpFileAsync(t,r,i,a);l.on=(...t)=>{a.on(...t);return l};return l};t.exports=cpFile;const checkSourceIsFile=(t,r)=>{if(t.isDirectory()){throw Object.assign(new u(`EISDIR: illegal operation on a directory '${r}'`),{errno:-21,code:"EISDIR",source:r})}};t.exports.sync=(t,r,i)=>{if(!t||!r){throw new u("`source` and `destination` required")}i={overwrite:true,...i};const l=c.statSync(t);checkSourceIsFile(l,t);c.makeDirSync(o.dirname(r),{mode:i.directoryMode});const h=i.overwrite?null:a.COPYFILE_EXCL;try{c.copyFileSync(t,r,h)}catch(t){if(!i.overwrite&&t.code==="EEXIST"){return}throw t}c.utimesSync(r,l.atime,l.mtime)}},9390:(t,r,i)=>{"use strict";const o=i(2361);const a=new WeakMap;class ProgressEmitter extends o{constructor(t,r){super();this._sourcePath=t;this._destinationPath=r}get writtenBytes(){return a.get(this)}set writtenBytes(t){a.set(this,t);this.emitProgress()}emitProgress(){const{size:t,writtenBytes:r}=this;this.emit("progress",{sourcePath:this._sourcePath,destinationPath:this._destinationPath,size:t,writtenBytes:r,percent:r===t?1:r/t})}}t.exports=ProgressEmitter},4082:(t,r)=>{
50
+ var o=i(8700);var a=i(1246);var Zip=function(t){if(!(this instanceof Zip)){return new Zip(t)}t=this.options=a.defaults(t,{comment:"",forceUTC:false,namePrependSlash:false,store:false});this.supports={directory:true,symlink:true};this.engine=new o(t)};Zip.prototype.append=function(t,r,i){this.engine.entry(t,r,i)};Zip.prototype.finalize=function(){this.engine.finalize()};Zip.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};Zip.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)};Zip.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)};t.exports=Zip},8718:function(t,r){(function(t,i){true?i(r):0})(this,(function(t){"use strict";function apply(t,...r){return(...i)=>t(...r,...i)}function initialParams(t){return function(...r){var i=r.pop();return t.call(this,r,i)}}var r=typeof queueMicrotask==="function"&&queueMicrotask;var i=typeof setImmediate==="function"&&setImmediate;var o=typeof process==="object"&&typeof process.nextTick==="function";function fallback(t){setTimeout(t,0)}function wrap(t){return(r,...i)=>t((()=>r(...i)))}var a;if(r){a=queueMicrotask}else if(i){a=setImmediate}else if(o){a=process.nextTick}else{a=fallback}var l=wrap(a);function asyncify(t){if(isAsync(t)){return function(...r){const i=r.pop();const o=t.apply(this,r);return handlePromise(o,i)}}return initialParams((function(r,i){var o;try{o=t.apply(this,r)}catch(t){return i(t)}if(o&&typeof o.then==="function"){return handlePromise(o,i)}else{i(null,o)}}))}function handlePromise(t,r){return t.then((t=>{invokeCallback(r,null,t)}),(t=>{invokeCallback(r,t&&t.message?t:new Error(t))}))}function invokeCallback(t,r,i){try{t(r,i)}catch(t){l((t=>{throw t}),t)}}function isAsync(t){return t[Symbol.toStringTag]==="AsyncFunction"}function isAsyncGenerator(t){return t[Symbol.toStringTag]==="AsyncGenerator"}function isAsyncIterable(t){return typeof t[Symbol.asyncIterator]==="function"}function wrapAsync(t){if(typeof t!=="function")throw new Error("expected a function");return isAsync(t)?asyncify(t):t}function awaitify(t,r=t.length){if(!r)throw new Error("arity is undefined");function awaitable(...i){if(typeof i[r-1]==="function"){return t.apply(this,i)}return new Promise(((o,a)=>{i[r-1]=(t,...r)=>{if(t)return a(t);o(r.length>1?r:r[0])};t.apply(this,i)}))}return awaitable}function applyEach(t){return function applyEach(r,...i){const o=awaitify((function(o){var a=this;return t(r,((t,r)=>{wrapAsync(t).apply(a,i.concat(r))}),o)}));return o}}function _asyncMap(t,r,i,o){r=r||[];var a=[];var l=0;var u=wrapAsync(i);return t(r,((t,r,i)=>{var o=l++;u(t,((t,r)=>{a[o]=r;i(t)}))}),(t=>{o(t,a)}))}function isArrayLike(t){return t&&typeof t.length==="number"&&t.length>=0&&t.length%1===0}const u={};function once(t){function wrapper(...r){if(t===null)return;var i=t;t=null;i.apply(this,r)}Object.assign(wrapper,t);return wrapper}function getIterator(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}function createArrayIterator(t){var r=-1;var i=t.length;return function next(){return++r<i?{value:t[r],key:r}:null}}function createES2015Iterator(t){var r=-1;return function next(){var i=t.next();if(i.done)return null;r++;return{value:i.value,key:r}}}function createObjectIterator(t){var r=t?Object.keys(t):[];var i=-1;var o=r.length;return function next(){var a=r[++i];if(a==="__proto__"){return next()}return i<o?{value:t[a],key:a}:null}}function createIterator(t){if(isArrayLike(t)){return createArrayIterator(t)}var r=getIterator(t);return r?createES2015Iterator(r):createObjectIterator(t)}function onlyOnce(t){return function(...r){if(t===null)throw new Error("Callback was already called.");var i=t;t=null;i.apply(this,r)}}function asyncEachOfLimit(t,r,i,o){let a=false;let l=false;let c=false;let h=0;let p=0;function replenish(){if(h>=r||c||a)return;c=true;t.next().then((({value:t,done:r})=>{if(l||a)return;c=false;if(r){a=true;if(h<=0){o(null)}return}h++;i(t,p,iterateeCallback);p++;replenish()})).catch(handleError)}function iterateeCallback(t,r){h-=1;if(l)return;if(t)return handleError(t);if(t===false){a=true;l=true;return}if(r===u||a&&h<=0){a=true;return o(null)}replenish()}function handleError(t){if(l)return;c=false;a=true;o(t)}replenish()}var eachOfLimit=t=>(r,i,o)=>{o=once(o);if(t<=0){throw new RangeError("concurrency limit cannot be less than 1")}if(!r){return o(null)}if(isAsyncGenerator(r)){return asyncEachOfLimit(r,t,i,o)}if(isAsyncIterable(r)){return asyncEachOfLimit(r[Symbol.asyncIterator](),t,i,o)}var a=createIterator(r);var l=false;var c=false;var h=0;var p=false;function iterateeCallback(t,r){if(c)return;h-=1;if(t){l=true;o(t)}else if(t===false){l=true;c=true}else if(r===u||l&&h<=0){l=true;return o(null)}else if(!p){replenish()}}function replenish(){p=true;while(h<t&&!l){var r=a();if(r===null){l=true;if(h<=0){o(null)}return}h+=1;i(r.value,r.key,onlyOnce(iterateeCallback))}p=false}replenish()};function eachOfLimit$1(t,r,i,o){return eachOfLimit(r)(t,wrapAsync(i),o)}var c=awaitify(eachOfLimit$1,4);function eachOfArrayLike(t,r,i){i=once(i);var o=0,a=0,{length:l}=t,c=false;if(l===0){i(null)}function iteratorCallback(t,r){if(t===false){c=true}if(c===true)return;if(t){i(t)}else if(++a===l||r===u){i(null)}}for(;o<l;o++){r(t[o],o,onlyOnce(iteratorCallback))}}function eachOfGeneric(t,r,i){return c(t,Infinity,r,i)}function eachOf(t,r,i){var o=isArrayLike(t)?eachOfArrayLike:eachOfGeneric;return o(t,wrapAsync(r),i)}var h=awaitify(eachOf,3);function map(t,r,i){return _asyncMap(h,t,r,i)}var p=awaitify(map,3);var d=applyEach(p);function eachOfSeries(t,r,i){return c(t,1,r,i)}var m=awaitify(eachOfSeries,3);function mapSeries(t,r,i){return _asyncMap(m,t,r,i)}var g=awaitify(mapSeries,3);var y=applyEach(g);const v=Symbol("promiseCallback");function promiseCallback(){let t,r;function callback(i,...o){if(i)return r(i);t(o.length>1?o:o[0])}callback[v]=new Promise(((i,o)=>{t=i,r=o}));return callback}function auto(t,r,i){if(typeof r!=="number"){i=r;r=null}i=once(i||promiseCallback());var o=Object.keys(t).length;if(!o){return i(null)}if(!r){r=o}var a={};var l=0;var u=false;var c=false;var h=Object.create(null);var p=[];var d=[];var m={};Object.keys(t).forEach((r=>{var i=t[r];if(!Array.isArray(i)){enqueueTask(r,[i]);d.push(r);return}var o=i.slice(0,i.length-1);var a=o.length;if(a===0){enqueueTask(r,i);d.push(r);return}m[r]=a;o.forEach((l=>{if(!t[l]){throw new Error("async.auto task `"+r+"` has a non-existent dependency `"+l+"` in "+o.join(", "))}addListener(l,(()=>{a--;if(a===0){enqueueTask(r,i)}}))}))}));checkForDeadlocks();processQueue();function enqueueTask(t,r){p.push((()=>runTask(t,r)))}function processQueue(){if(u)return;if(p.length===0&&l===0){return i(null,a)}while(p.length&&l<r){var t=p.shift();t()}}function addListener(t,r){var i=h[t];if(!i){i=h[t]=[]}i.push(r)}function taskComplete(t){var r=h[t]||[];r.forEach((t=>t()));processQueue()}function runTask(t,r){if(c)return;var o=onlyOnce(((r,...o)=>{l--;if(r===false){u=true;return}if(o.length<2){[o]=o}if(r){var p={};Object.keys(a).forEach((t=>{p[t]=a[t]}));p[t]=o;c=true;h=Object.create(null);if(u)return;i(r,p)}else{a[t]=o;taskComplete(t)}}));l++;var p=wrapAsync(r[r.length-1]);if(r.length>1){p(a,o)}else{p(o)}}function checkForDeadlocks(){var t;var r=0;while(d.length){t=d.pop();r++;getDependents(t).forEach((t=>{if(--m[t]===0){d.push(t)}}))}if(r!==o){throw new Error("async.auto cannot execute tasks due to a recursive dependency")}}function getDependents(r){var i=[];Object.keys(t).forEach((o=>{const a=t[o];if(Array.isArray(a)&&a.indexOf(r)>=0){i.push(o)}}));return i}return i[v]}var b=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/;var _=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/;var w=/,/;var S=/(=.+)?(\s*)$/;function stripComments(t){let r="";let i=0;let o=t.indexOf("*/");while(i<t.length){if(t[i]==="/"&&t[i+1]==="/"){let r=t.indexOf("\n",i);i=r===-1?t.length:r}else if(o!==-1&&t[i]==="/"&&t[i+1]==="*"){let a=t.indexOf("*/",i);if(a!==-1){i=a+2;o=t.indexOf("*/",i)}else{r+=t[i];i++}}else{r+=t[i];i++}}return r}function parseParams(t){const r=stripComments(t.toString());let i=r.match(b);if(!i){i=r.match(_)}if(!i)throw new Error("could not parse args in autoInject\nSource:\n"+r);let[,o]=i;return o.replace(/\s/g,"").split(w).map((t=>t.replace(S,"").trim()))}function autoInject(t,r){var i={};Object.keys(t).forEach((r=>{var o=t[r];var a;var l=isAsync(o);var u=!l&&o.length===1||l&&o.length===0;if(Array.isArray(o)){a=[...o];o=a.pop();i[r]=a.concat(a.length>0?newTask:o)}else if(u){i[r]=o}else{a=parseParams(o);if(o.length===0&&!l&&a.length===0){throw new Error("autoInject task functions require explicit parameters.")}if(!l)a.pop();i[r]=a.concat(newTask)}function newTask(t,r){var i=a.map((r=>t[r]));i.push(r);wrapAsync(o)(...i)}}));return auto(i,r)}class DLL{constructor(){this.head=this.tail=null;this.length=0}removeLink(t){if(t.prev)t.prev.next=t.next;else this.head=t.next;if(t.next)t.next.prev=t.prev;else this.tail=t.prev;t.prev=t.next=null;this.length-=1;return t}empty(){while(this.head)this.shift();return this}insertAfter(t,r){r.prev=t;r.next=t.next;if(t.next)t.next.prev=r;else this.tail=r;t.next=r;this.length+=1}insertBefore(t,r){r.prev=t.prev;r.next=t;if(t.prev)t.prev.next=r;else this.head=r;t.prev=r;this.length+=1}unshift(t){if(this.head)this.insertBefore(this.head,t);else setInitial(this,t)}push(t){if(this.tail)this.insertAfter(this.tail,t);else setInitial(this,t)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){var t=this.head;while(t){yield t.data;t=t.next}}remove(t){var r=this.head;while(r){var{next:i}=r;if(t(r)){this.removeLink(r)}r=i}return this}}function setInitial(t,r){t.length=1;t.head=t.tail=r}function queue(t,r,i){if(r==null){r=1}else if(r===0){throw new RangeError("Concurrency must not be zero")}var o=wrapAsync(t);var a=0;var u=[];const c={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function on(t,r){c[t].push(r)}function once(t,r){const handleAndRemove=(...i)=>{off(t,handleAndRemove);r(...i)};c[t].push(handleAndRemove)}function off(t,r){if(!t)return Object.keys(c).forEach((t=>c[t]=[]));if(!r)return c[t]=[];c[t]=c[t].filter((t=>t!==r))}function trigger(t,...r){c[t].forEach((t=>t(...r)))}var h=false;function _insert(t,r,i,o){if(o!=null&&typeof o!=="function"){throw new Error("task callback must be a function")}d.started=true;var a,u;function promiseCallback(t,...r){if(t)return i?u(t):a();if(r.length<=1)return a(r[0]);a(r)}var c={data:t,callback:i?promiseCallback:o||promiseCallback};if(r){d._tasks.unshift(c)}else{d._tasks.push(c)}if(!h){h=true;l((()=>{h=false;d.process()}))}if(i||!o){return new Promise(((t,r)=>{a=t;u=r}))}}function _createCB(t){return function(r,...i){a-=1;for(var o=0,l=t.length;o<l;o++){var c=t[o];var h=u.indexOf(c);if(h===0){u.shift()}else if(h>0){u.splice(h,1)}c.callback(r,...i);if(r!=null){trigger("error",r,c.data)}}if(a<=d.concurrency-d.buffer){trigger("unsaturated")}if(d.idle()){trigger("drain")}d.process()}}function _maybeDrain(t){if(t.length===0&&d.idle()){l((()=>trigger("drain")));return true}return false}const eventMethod=t=>r=>{if(!r){return new Promise(((r,i)=>{once(t,((t,o)=>{if(t)return i(t);r(o)}))}))}off(t);on(t,r)};var p=false;var d={_tasks:new DLL,*[Symbol.iterator](){yield*d._tasks[Symbol.iterator]()},concurrency:r,payload:i,buffer:r/4,started:false,paused:false,push(t,r){if(Array.isArray(t)){if(_maybeDrain(t))return;return t.map((t=>_insert(t,false,false,r)))}return _insert(t,false,false,r)},pushAsync(t,r){if(Array.isArray(t)){if(_maybeDrain(t))return;return t.map((t=>_insert(t,false,true,r)))}return _insert(t,false,true,r)},kill(){off();d._tasks.empty()},unshift(t,r){if(Array.isArray(t)){if(_maybeDrain(t))return;return t.map((t=>_insert(t,true,false,r)))}return _insert(t,true,false,r)},unshiftAsync(t,r){if(Array.isArray(t)){if(_maybeDrain(t))return;return t.map((t=>_insert(t,true,true,r)))}return _insert(t,true,true,r)},remove(t){d._tasks.remove(t)},process(){if(p){return}p=true;while(!d.paused&&a<d.concurrency&&d._tasks.length){var t=[],r=[];var i=d._tasks.length;if(d.payload)i=Math.min(i,d.payload);for(var l=0;l<i;l++){var c=d._tasks.shift();t.push(c);u.push(c);r.push(c.data)}a+=1;if(d._tasks.length===0){trigger("empty")}if(a===d.concurrency){trigger("saturated")}var h=onlyOnce(_createCB(t));o(r,h)}p=false},length(){return d._tasks.length},running(){return a},workersList(){return u},idle(){return d._tasks.length+a===0},pause(){d.paused=true},resume(){if(d.paused===false){return}d.paused=false;l(d.process)}};Object.defineProperties(d,{saturated:{writable:false,value:eventMethod("saturated")},unsaturated:{writable:false,value:eventMethod("unsaturated")},empty:{writable:false,value:eventMethod("empty")},drain:{writable:false,value:eventMethod("drain")},error:{writable:false,value:eventMethod("error")}});return d}function cargo(t,r){return queue(t,1,r)}function cargo$1(t,r,i){return queue(t,r,i)}function reduce(t,r,i,o){o=once(o);var a=wrapAsync(i);return m(t,((t,i,o)=>{a(r,t,((t,i)=>{r=i;o(t)}))}),(t=>o(t,r)))}var E=awaitify(reduce,4);function seq(...t){var r=t.map(wrapAsync);return function(...t){var i=this;var o=t[t.length-1];if(typeof o=="function"){t.pop()}else{o=promiseCallback()}E(r,t,((t,r,o)=>{r.apply(i,t.concat(((t,...r)=>{o(t,r)})))}),((t,r)=>o(t,...r)));return o[v]}}function compose(...t){return seq(...t.reverse())}function mapLimit(t,r,i,o){return _asyncMap(eachOfLimit(r),t,i,o)}var x=awaitify(mapLimit,4);function concatLimit(t,r,i,o){var a=wrapAsync(i);return x(t,r,((t,r)=>{a(t,((t,...i)=>{if(t)return r(t);return r(t,i)}))}),((t,r)=>{var i=[];for(var a=0;a<r.length;a++){if(r[a]){i=i.concat(...r[a])}}return o(t,i)}))}var A=awaitify(concatLimit,4);function concat(t,r,i){return A(t,Infinity,r,i)}var O=awaitify(concat,3);function concatSeries(t,r,i){return A(t,1,r,i)}var k=awaitify(concatSeries,3);function constant(...t){return function(...r){var i=r.pop();return i(null,...t)}}function _createTester(t,r){return(i,o,a,l)=>{var c=false;var h;const p=wrapAsync(a);i(o,((i,o,a)=>{p(i,((o,l)=>{if(o||o===false)return a(o);if(t(l)&&!h){c=true;h=r(true,i);return a(null,u)}a()}))}),(t=>{if(t)return l(t);l(null,c?h:r(false))}))}}function detect(t,r,i){return _createTester((t=>t),((t,r)=>r))(h,t,r,i)}var R=awaitify(detect,3);function detectLimit(t,r,i,o){return _createTester((t=>t),((t,r)=>r))(eachOfLimit(r),t,i,o)}var T=awaitify(detectLimit,4);function detectSeries(t,r,i){return _createTester((t=>t),((t,r)=>r))(eachOfLimit(1),t,r,i)}var C=awaitify(detectSeries,3);function consoleFunc(t){return(r,...i)=>wrapAsync(r)(...i,((r,...i)=>{if(typeof console==="object"){if(r){if(console.error){console.error(r)}}else if(console[t]){i.forEach((r=>console[t](r)))}}}))}var P=consoleFunc("dir");function doWhilst(t,r,i){i=onlyOnce(i);var o=wrapAsync(t);var a=wrapAsync(r);var l;function next(t,...r){if(t)return i(t);if(t===false)return;l=r;a(...r,check)}function check(t,r){if(t)return i(t);if(t===false)return;if(!r)return i(null,...l);o(next)}return check(null,true)}var I=awaitify(doWhilst,3);function doUntil(t,r,i){const o=wrapAsync(r);return I(t,((...t)=>{const r=t.pop();o(...t,((t,i)=>r(t,!i)))}),i)}function _withoutIndex(t){return(r,i,o)=>t(r,o)}function eachLimit(t,r,i){return h(t,_withoutIndex(wrapAsync(r)),i)}var L=awaitify(eachLimit,3);function eachLimit$1(t,r,i,o){return eachOfLimit(r)(t,_withoutIndex(wrapAsync(i)),o)}var M=awaitify(eachLimit$1,4);function eachSeries(t,r,i){return M(t,1,r,i)}var N=awaitify(eachSeries,3);function ensureAsync(t){if(isAsync(t))return t;return function(...r){var i=r.pop();var o=true;r.push(((...t)=>{if(o){l((()=>i(...t)))}else{i(...t)}}));t.apply(this,r);o=false}}function every(t,r,i){return _createTester((t=>!t),(t=>!t))(h,t,r,i)}var j=awaitify(every,3);function everyLimit(t,r,i,o){return _createTester((t=>!t),(t=>!t))(eachOfLimit(r),t,i,o)}var D=awaitify(everyLimit,4);function everySeries(t,r,i){return _createTester((t=>!t),(t=>!t))(m,t,r,i)}var $=awaitify(everySeries,3);function filterArray(t,r,i,o){var a=new Array(r.length);t(r,((t,r,o)=>{i(t,((t,i)=>{a[r]=!!i;o(t)}))}),(t=>{if(t)return o(t);var i=[];for(var l=0;l<r.length;l++){if(a[l])i.push(r[l])}o(null,i)}))}function filterGeneric(t,r,i,o){var a=[];t(r,((t,r,o)=>{i(t,((i,l)=>{if(i)return o(i);if(l){a.push({index:r,value:t})}o(i)}))}),(t=>{if(t)return o(t);o(null,a.sort(((t,r)=>t.index-r.index)).map((t=>t.value)))}))}function _filter(t,r,i,o){var a=isArrayLike(r)?filterArray:filterGeneric;return a(t,r,wrapAsync(i),o)}function filter(t,r,i){return _filter(h,t,r,i)}var B=awaitify(filter,3);function filterLimit(t,r,i,o){return _filter(eachOfLimit(r),t,i,o)}var H=awaitify(filterLimit,4);function filterSeries(t,r,i){return _filter(m,t,r,i)}var W=awaitify(filterSeries,3);function forever(t,r){var i=onlyOnce(r);var o=wrapAsync(ensureAsync(t));function next(t){if(t)return i(t);if(t===false)return;o(next)}return next()}var G=awaitify(forever,2);function groupByLimit(t,r,i,o){var a=wrapAsync(i);return x(t,r,((t,r)=>{a(t,((i,o)=>{if(i)return r(i);return r(i,{key:o,val:t})}))}),((t,r)=>{var i={};var{hasOwnProperty:a}=Object.prototype;for(var l=0;l<r.length;l++){if(r[l]){var{key:u}=r[l];var{val:c}=r[l];if(a.call(i,u)){i[u].push(c)}else{i[u]=[c]}}}return o(t,i)}))}var U=awaitify(groupByLimit,4);function groupBy(t,r,i){return U(t,Infinity,r,i)}function groupBySeries(t,r,i){return U(t,1,r,i)}var V=consoleFunc("log");function mapValuesLimit(t,r,i,o){o=once(o);var a={};var l=wrapAsync(i);return eachOfLimit(r)(t,((t,r,i)=>{l(t,r,((t,o)=>{if(t)return i(t);a[r]=o;i(t)}))}),(t=>o(t,a)))}var q=awaitify(mapValuesLimit,4);function mapValues(t,r,i){return q(t,Infinity,r,i)}function mapValuesSeries(t,r,i){return q(t,1,r,i)}function memoize(t,r=(t=>t)){var i=Object.create(null);var o=Object.create(null);var a=wrapAsync(t);var u=initialParams(((t,u)=>{var c=r(...t);if(c in i){l((()=>u(null,...i[c])))}else if(c in o){o[c].push(u)}else{o[c]=[u];a(...t,((t,...r)=>{if(!t){i[c]=r}var a=o[c];delete o[c];for(var l=0,u=a.length;l<u;l++){a[l](t,...r)}}))}}));u.memo=i;u.unmemoized=t;return u}var z;if(o){z=process.nextTick}else if(i){z=setImmediate}else{z=fallback}var Y=wrap(z);var K=awaitify(((t,r,i)=>{var o=isArrayLike(r)?[]:{};t(r,((t,r,i)=>{wrapAsync(t)(((t,...a)=>{if(a.length<2){[a]=a}o[r]=a;i(t)}))}),(t=>i(t,o)))}),3);function parallel(t,r){return K(h,t,r)}function parallelLimit(t,r,i){return K(eachOfLimit(r),t,i)}function queue$1(t,r){var i=wrapAsync(t);return queue(((t,r)=>{i(t[0],r)}),r,1)}class Heap{constructor(){this.heap=[];this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){this.heap=[];return this}percUp(t){let r;while(t>0&&smaller(this.heap[t],this.heap[r=parent(t)])){let i=this.heap[t];this.heap[t]=this.heap[r];this.heap[r]=i;t=r}}percDown(t){let r;while((r=leftChi(t))<this.heap.length){if(r+1<this.heap.length&&smaller(this.heap[r+1],this.heap[r])){r=r+1}if(smaller(this.heap[t],this.heap[r])){break}let i=this.heap[t];this.heap[t]=this.heap[r];this.heap[r]=i;t=r}}push(t){t.pushCount=++this.pushCount;this.heap.push(t);this.percUp(this.heap.length-1)}unshift(t){return this.heap.push(t)}shift(){let[t]=this.heap;this.heap[0]=this.heap[this.heap.length-1];this.heap.pop();this.percDown(0);return t}toArray(){return[...this]}*[Symbol.iterator](){for(let t=0;t<this.heap.length;t++){yield this.heap[t].data}}remove(t){let r=0;for(let i=0;i<this.heap.length;i++){if(!t(this.heap[i])){this.heap[r]=this.heap[i];r++}}this.heap.splice(r);for(let t=parent(this.heap.length-1);t>=0;t--){this.percDown(t)}return this}}function leftChi(t){return(t<<1)+1}function parent(t){return(t+1>>1)-1}function smaller(t,r){if(t.priority!==r.priority){return t.priority<r.priority}else{return t.pushCount<r.pushCount}}function priorityQueue(t,r){var i=queue$1(t,r);var o=false;i._tasks=new Heap;i.push=function(t,r=0,a=(()=>{})){if(typeof a!=="function"){throw new Error("task callback must be a function")}i.started=true;if(!Array.isArray(t)){t=[t]}if(t.length===0&&i.idle()){return l((()=>i.drain()))}for(var u=0,c=t.length;u<c;u++){var h={data:t[u],priority:r,callback:a};i._tasks.push(h)}if(!o){o=true;l((()=>{o=false;i.process()}))}};delete i.unshift;return i}function race(t,r){r=once(r);if(!Array.isArray(t))return r(new TypeError("First argument to race must be an array of functions"));if(!t.length)return r();for(var i=0,o=t.length;i<o;i++){wrapAsync(t[i])(r)}}var Q=awaitify(race,2);function reduceRight(t,r,i,o){var a=[...t].reverse();return E(a,r,i,o)}function reflect(t){var r=wrapAsync(t);return initialParams((function reflectOn(t,i){t.push(((t,...r)=>{let o={};if(t){o.error=t}if(r.length>0){var a=r;if(r.length<=1){[a]=r}o.value=a}i(null,o)}));return r.apply(this,t)}))}function reflectAll(t){var r;if(Array.isArray(t)){r=t.map(reflect)}else{r={};Object.keys(t).forEach((i=>{r[i]=reflect.call(this,t[i])}))}return r}function reject(t,r,i,o){const a=wrapAsync(i);return _filter(t,r,((t,r)=>{a(t,((t,i)=>{r(t,!i)}))}),o)}function reject$1(t,r,i){return reject(h,t,r,i)}var Z=awaitify(reject$1,3);function rejectLimit(t,r,i,o){return reject(eachOfLimit(r),t,i,o)}var X=awaitify(rejectLimit,4);function rejectSeries(t,r,i){return reject(m,t,r,i)}var J=awaitify(rejectSeries,3);function constant$1(t){return function(){return t}}const ee=5;const te=0;function retry(t,r,i){var o={times:ee,intervalFunc:constant$1(te)};if(arguments.length<3&&typeof t==="function"){i=r||promiseCallback();r=t}else{parseTimes(o,t);i=i||promiseCallback()}if(typeof r!=="function"){throw new Error("Invalid arguments for async.retry")}var a=wrapAsync(r);var l=1;function retryAttempt(){a(((t,...r)=>{if(t===false)return;if(t&&l++<o.times&&(typeof o.errorFilter!="function"||o.errorFilter(t))){setTimeout(retryAttempt,o.intervalFunc(l-1))}else{i(t,...r)}}))}retryAttempt();return i[v]}function parseTimes(t,r){if(typeof r==="object"){t.times=+r.times||ee;t.intervalFunc=typeof r.interval==="function"?r.interval:constant$1(+r.interval||te);t.errorFilter=r.errorFilter}else if(typeof r==="number"||typeof r==="string"){t.times=+r||ee}else{throw new Error("Invalid arguments for async.retry")}}function retryable(t,r){if(!r){r=t;t=null}let i=t&&t.arity||r.length;if(isAsync(r)){i+=1}var o=wrapAsync(r);return initialParams(((r,a)=>{if(r.length<i-1||a==null){r.push(a);a=promiseCallback()}function taskFn(t){o(...r,t)}if(t)retry(t,taskFn,a);else retry(taskFn,a);return a[v]}))}function series(t,r){return K(m,t,r)}function some(t,r,i){return _createTester(Boolean,(t=>t))(h,t,r,i)}var re=awaitify(some,3);function someLimit(t,r,i,o){return _createTester(Boolean,(t=>t))(eachOfLimit(r),t,i,o)}var ne=awaitify(someLimit,4);function someSeries(t,r,i){return _createTester(Boolean,(t=>t))(m,t,r,i)}var ie=awaitify(someSeries,3);function sortBy(t,r,i){var o=wrapAsync(r);return p(t,((t,r)=>{o(t,((i,o)=>{if(i)return r(i);r(i,{value:t,criteria:o})}))}),((t,r)=>{if(t)return i(t);i(null,r.sort(comparator).map((t=>t.value)))}));function comparator(t,r){var i=t.criteria,o=r.criteria;return i<o?-1:i>o?1:0}}var se=awaitify(sortBy,3);function timeout(t,r,i){var o=wrapAsync(t);return initialParams(((a,l)=>{var u=false;var c;function timeoutCallback(){var r=t.name||"anonymous";var o=new Error('Callback function "'+r+'" timed out.');o.code="ETIMEDOUT";if(i){o.info=i}u=true;l(o)}a.push(((...t)=>{if(!u){l(...t);clearTimeout(c)}}));c=setTimeout(timeoutCallback,r);o(...a)}))}function range(t){var r=Array(t);while(t--){r[t]=t}return r}function timesLimit(t,r,i,o){var a=wrapAsync(i);return x(range(t),r,a,o)}function times(t,r,i){return timesLimit(t,Infinity,r,i)}function timesSeries(t,r,i){return timesLimit(t,1,r,i)}function transform(t,r,i,o){if(arguments.length<=3&&typeof r==="function"){o=i;i=r;r=Array.isArray(t)?[]:{}}o=once(o||promiseCallback());var a=wrapAsync(i);h(t,((t,i,o)=>{a(r,t,i,o)}),(t=>o(t,r)));return o[v]}function tryEach(t,r){var i=null;var o;return N(t,((t,r)=>{wrapAsync(t)(((t,...a)=>{if(t===false)return r(t);if(a.length<2){[o]=a}else{o=a}i=t;r(t?null:{})}))}),(()=>r(i,o)))}var oe=awaitify(tryEach);function unmemoize(t){return(...r)=>(t.unmemoized||t)(...r)}function whilst(t,r,i){i=onlyOnce(i);var o=wrapAsync(r);var a=wrapAsync(t);var l=[];function next(t,...r){if(t)return i(t);l=r;if(t===false)return;a(check)}function check(t,r){if(t)return i(t);if(t===false)return;if(!r)return i(null,...l);o(next)}return a(check)}var ae=awaitify(whilst,3);function until(t,r,i){const o=wrapAsync(t);return ae((t=>o(((r,i)=>t(r,!i)))),r,i)}function waterfall(t,r){r=once(r);if(!Array.isArray(t))return r(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return r();var i=0;function nextTask(r){var o=wrapAsync(t[i++]);o(...r,onlyOnce(next))}function next(o,...a){if(o===false)return;if(o||i===t.length){return r(o,...a)}nextTask(a)}nextTask([])}var le=awaitify(waterfall);var ue={apply:apply,applyEach:d,applyEachSeries:y,asyncify:asyncify,auto:auto,autoInject:autoInject,cargo:cargo,cargoQueue:cargo$1,compose:compose,concat:O,concatLimit:A,concatSeries:k,constant:constant,detect:R,detectLimit:T,detectSeries:C,dir:P,doUntil:doUntil,doWhilst:I,each:L,eachLimit:M,eachOf:h,eachOfLimit:c,eachOfSeries:m,eachSeries:N,ensureAsync:ensureAsync,every:j,everyLimit:D,everySeries:$,filter:B,filterLimit:H,filterSeries:W,forever:G,groupBy:groupBy,groupByLimit:U,groupBySeries:groupBySeries,log:V,map:p,mapLimit:x,mapSeries:g,mapValues:mapValues,mapValuesLimit:q,mapValuesSeries:mapValuesSeries,memoize:memoize,nextTick:Y,parallel:parallel,parallelLimit:parallelLimit,priorityQueue:priorityQueue,queue:queue$1,race:Q,reduce:E,reduceRight:reduceRight,reflect:reflect,reflectAll:reflectAll,reject:Z,rejectLimit:X,rejectSeries:J,retry:retry,retryable:retryable,seq:seq,series:series,setImmediate:l,some:re,someLimit:ne,someSeries:ie,sortBy:se,timeout:timeout,times:times,timesLimit:timesLimit,timesSeries:timesSeries,transform:transform,tryEach:oe,unmemoize:unmemoize,until:until,waterfall:le,whilst:ae,all:j,allLimit:D,allSeries:$,any:re,anyLimit:ne,anySeries:ie,find:R,findLimit:T,findSeries:C,flatMap:O,flatMapLimit:A,flatMapSeries:k,forEach:L,forEachSeries:N,forEachLimit:M,forEachOf:h,forEachOfSeries:m,forEachOfLimit:c,inject:E,foldl:E,foldr:reduceRight,select:B,selectLimit:H,selectSeries:W,wrapSync:asyncify,during:ae,doDuring:I};t.default=ue;t.apply=apply;t.applyEach=d;t.applyEachSeries=y;t.asyncify=asyncify;t.auto=auto;t.autoInject=autoInject;t.cargo=cargo;t.cargoQueue=cargo$1;t.compose=compose;t.concat=O;t.concatLimit=A;t.concatSeries=k;t.constant=constant;t.detect=R;t.detectLimit=T;t.detectSeries=C;t.dir=P;t.doUntil=doUntil;t.doWhilst=I;t.each=L;t.eachLimit=M;t.eachOf=h;t.eachOfLimit=c;t.eachOfSeries=m;t.eachSeries=N;t.ensureAsync=ensureAsync;t.every=j;t.everyLimit=D;t.everySeries=$;t.filter=B;t.filterLimit=H;t.filterSeries=W;t.forever=G;t.groupBy=groupBy;t.groupByLimit=U;t.groupBySeries=groupBySeries;t.log=V;t.map=p;t.mapLimit=x;t.mapSeries=g;t.mapValues=mapValues;t.mapValuesLimit=q;t.mapValuesSeries=mapValuesSeries;t.memoize=memoize;t.nextTick=Y;t.parallel=parallel;t.parallelLimit=parallelLimit;t.priorityQueue=priorityQueue;t.queue=queue$1;t.race=Q;t.reduce=E;t.reduceRight=reduceRight;t.reflect=reflect;t.reflectAll=reflectAll;t.reject=Z;t.rejectLimit=X;t.rejectSeries=J;t.retry=retry;t.retryable=retryable;t.seq=seq;t.series=series;t.setImmediate=l;t.some=re;t.someLimit=ne;t.someSeries=ie;t.sortBy=se;t.timeout=timeout;t.times=times;t.timesLimit=timesLimit;t.timesSeries=timesSeries;t.transform=transform;t.tryEach=oe;t.unmemoize=unmemoize;t.until=until;t.waterfall=le;t.whilst=ae;t.all=j;t.allLimit=D;t.allSeries=$;t.any=re;t.anyLimit=ne;t.anySeries=ie;t.find=R;t.findLimit=T;t.findSeries=C;t.flatMap=O;t.flatMapLimit=A;t.flatMapSeries=k;t.forEach=L;t.forEachSeries=N;t.forEachLimit=M;t.forEachOf=h;t.forEachOfSeries=m;t.forEachOfLimit=c;t.inject=E;t.foldl=E;t.foldr=reduceRight;t.select=B;t.selectLimit=H;t.selectSeries=W;t.wrapSync=asyncify;t.during=ae;t.doDuring=I;Object.defineProperty(t,"__esModule",{value:true})}))},5218:t=>{"use strict";t.exports=balanced;function balanced(t,r,i){if(t instanceof RegExp)t=maybeMatch(t,i);if(r instanceof RegExp)r=maybeMatch(r,i);var o=range(t,r,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+t.length,o[1]),post:i.slice(o[1]+r.length)}}function maybeMatch(t,r){var i=r.match(t);return i?i[0]:null}balanced.range=range;function range(t,r,i){var o,a,l,u,c;var h=i.indexOf(t);var p=i.indexOf(r,h+1);var d=h;if(h>=0&&p>0){if(t===r){return[h,p]}o=[];l=i.length;while(d>=0&&!c){if(d==h){o.push(d);h=i.indexOf(t,d+1)}else if(o.length==1){c=[o.pop(),p]}else{a=o.pop();if(a<l){l=a;u=p}p=i.indexOf(r,d+1)}d=h<p&&h>=0?h:p}if(o.length){c=[l,u]}}return c}},5603:(t,r,i)=>{"use strict";const{Buffer:o}=i(4300);const a=Symbol.for("BufferList");function BufferList(t){if(!(this instanceof BufferList)){return new BufferList(t)}BufferList._init.call(this,t)}BufferList._init=function _init(t){Object.defineProperty(this,a,{value:true});this._bufs=[];this.length=0;if(t){this.append(t)}};BufferList.prototype._new=function _new(t){return new BufferList(t)};BufferList.prototype._offset=function _offset(t){if(t===0){return[0,0]}let r=0;for(let i=0;i<this._bufs.length;i++){const o=r+this._bufs[i].length;if(t<o||i===this._bufs.length-1){return[i,t-r]}r=o}};BufferList.prototype._reverseOffset=function(t){const r=t[0];let i=t[1];for(let t=0;t<r;t++){i+=this._bufs[t].length}return i};BufferList.prototype.get=function get(t){if(t>this.length||t<0){return undefined}const r=this._offset(t);return this._bufs[r[0]][r[1]]};BufferList.prototype.slice=function slice(t,r){if(typeof t==="number"&&t<0){t+=this.length}if(typeof r==="number"&&r<0){r+=this.length}return this.copy(null,0,t,r)};BufferList.prototype.copy=function copy(t,r,i,a){if(typeof i!=="number"||i<0){i=0}if(typeof a!=="number"||a>this.length){a=this.length}if(i>=this.length){return t||o.alloc(0)}if(a<=0){return t||o.alloc(0)}const copy=!!t;const l=this._offset(i);const u=a-i;let c=u;let h=copy&&r||0;let p=l[1];if(i===0&&a===this.length){if(!copy){return this._bufs.length===1?this._bufs[0]:o.concat(this._bufs,this.length)}for(let r=0;r<this._bufs.length;r++){this._bufs[r].copy(t,h);h+=this._bufs[r].length}return t}if(c<=this._bufs[l[0]].length-p){return copy?this._bufs[l[0]].copy(t,r,p,p+c):this._bufs[l[0]].slice(p,p+c)}if(!copy){t=o.allocUnsafe(u)}for(let r=l[0];r<this._bufs.length;r++){const i=this._bufs[r].length-p;if(c>i){this._bufs[r].copy(t,h,p);h+=i}else{this._bufs[r].copy(t,h,p,p+c);h+=i;break}c-=i;if(p){p=0}}if(t.length>h)return t.slice(0,h);return t};BufferList.prototype.shallowSlice=function shallowSlice(t,r){t=t||0;r=typeof r!=="number"?this.length:r;if(t<0){t+=this.length}if(r<0){r+=this.length}if(t===r){return this._new()}const i=this._offset(t);const o=this._offset(r);const a=this._bufs.slice(i[0],o[0]+1);if(o[1]===0){a.pop()}else{a[a.length-1]=a[a.length-1].slice(0,o[1])}if(i[1]!==0){a[0]=a[0].slice(i[1])}return this._new(a)};BufferList.prototype.toString=function toString(t,r,i){return this.slice(r,i).toString(t)};BufferList.prototype.consume=function consume(t){t=Math.trunc(t);if(Number.isNaN(t)||t<=0)return this;while(this._bufs.length){if(t>=this._bufs[0].length){t-=this._bufs[0].length;this.length-=this._bufs[0].length;this._bufs.shift()}else{this._bufs[0]=this._bufs[0].slice(t);this.length-=t;break}}return this};BufferList.prototype.duplicate=function duplicate(){const t=this._new();for(let r=0;r<this._bufs.length;r++){t.append(this._bufs[r])}return t};BufferList.prototype.append=function append(t){if(t==null){return this}if(t.buffer){this._appendBuffer(o.from(t.buffer,t.byteOffset,t.byteLength))}else if(Array.isArray(t)){for(let r=0;r<t.length;r++){this.append(t[r])}}else if(this._isBufferList(t)){for(let r=0;r<t._bufs.length;r++){this.append(t._bufs[r])}}else{if(typeof t==="number"){t=t.toString()}this._appendBuffer(o.from(t))}return this};BufferList.prototype._appendBuffer=function appendBuffer(t){this._bufs.push(t);this.length+=t.length};BufferList.prototype.indexOf=function(t,r,i){if(i===undefined&&typeof r==="string"){i=r;r=undefined}if(typeof t==="function"||Array.isArray(t)){throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.')}else if(typeof t==="number"){t=o.from([t])}else if(typeof t==="string"){t=o.from(t,i)}else if(this._isBufferList(t)){t=t.slice()}else if(Array.isArray(t.buffer)){t=o.from(t.buffer,t.byteOffset,t.byteLength)}else if(!o.isBuffer(t)){t=o.from(t)}r=Number(r||0);if(isNaN(r)){r=0}if(r<0){r=this.length+r}if(r<0){r=0}if(t.length===0){return r>this.length?this.length:r}const a=this._offset(r);let l=a[0];let u=a[1];for(;l<this._bufs.length;l++){const r=this._bufs[l];while(u<r.length){const i=r.length-u;if(i>=t.length){const i=r.indexOf(t,u);if(i!==-1){return this._reverseOffset([l,i])}u=r.length-t.length+1}else{const r=this._reverseOffset([l,u]);if(this._match(r,t)){return r}u++}}u=0}return-1};BufferList.prototype._match=function(t,r){if(this.length-t<r.length){return false}for(let i=0;i<r.length;i++){if(this.get(t+i)!==r[i]){return false}}return true};(function(){const t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const r in t){(function(r){if(t[r]===null){BufferList.prototype[r]=function(t,i){return this.slice(t,t+i)[r](0,i)}}else{BufferList.prototype[r]=function(i=0){return this.slice(i,i+t[r])[r](0)}}})(r)}})();BufferList.prototype._isBufferList=function _isBufferList(t){return t instanceof BufferList||BufferList.isBufferList(t)};BufferList.isBufferList=function isBufferList(t){return t!=null&&t[a]};t.exports=BufferList},3428:(t,r,i)=>{"use strict";const o=i(3726).Duplex;const a=i(2842);const l=i(5603);function BufferListStream(t){if(!(this instanceof BufferListStream)){return new BufferListStream(t)}if(typeof t==="function"){this._callback=t;const r=function piper(t){if(this._callback){this._callback(t);this._callback=null}}.bind(this);this.on("pipe",(function onPipe(t){t.on("error",r)}));this.on("unpipe",(function onUnpipe(t){t.removeListener("error",r)}));t=null}l._init.call(this,t);o.call(this)}a(BufferListStream,o);Object.assign(BufferListStream.prototype,l.prototype);BufferListStream.prototype._new=function _new(t){return new BufferListStream(t)};BufferListStream.prototype._write=function _write(t,r,i){this._appendBuffer(t);if(typeof i==="function"){i()}};BufferListStream.prototype._read=function _read(t){if(!this.length){return this.push(null)}t=Math.min(t,this.length);this.push(this.slice(0,t));this.consume(t)};BufferListStream.prototype.end=function end(t){o.prototype.end.call(this,t);if(this._callback){this._callback(null,this.slice());this._callback=null}};BufferListStream.prototype._destroy=function _destroy(t,r){this._bufs.length=0;this.length=0;r(t)};BufferListStream.prototype._isBufferList=function _isBufferList(t){return t instanceof BufferListStream||t instanceof l||BufferListStream.isBufferList(t)};BufferListStream.isBufferList=l.isBufferList;t.exports=BufferListStream;t.exports.BufferListStream=BufferListStream;t.exports.BufferList=l},4800:(t,r,i)=>{var o=i(7381);var a=i(5218);t.exports=expandTop;var l="\0SLASH"+Math.random()+"\0";var u="\0OPEN"+Math.random()+"\0";var c="\0CLOSE"+Math.random()+"\0";var h="\0COMMA"+Math.random()+"\0";var p="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(l).split("\\{").join(u).split("\\}").join(c).split("\\,").join(h).split("\\.").join(p)}function unescapeBraces(t){return t.split(l).join("\\").split(u).join("{").split(c).join("}").split(h).join(",").split(p).join(".")}function parseCommaParts(t){if(!t)return[""];var r=[];var i=a("{","}",t);if(!i)return t.split(",");var o=i.pre;var l=i.body;var u=i.post;var c=o.split(",");c[c.length-1]+="{"+l+"}";var h=parseCommaParts(u);if(u.length){c[c.length-1]+=h.shift();c.push.apply(c,h)}r.push.apply(r,c);return r}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function identity(t){return t}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,r){return t<=r}function gte(t,r){return t>=r}function expand(t,r){var i=[];var l=a("{","}",t);if(!l||/\$$/.test(l.pre))return[t];var u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(l.body);var h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(l.body);var p=u||h;var d=l.body.indexOf(",")>=0;if(!p&&!d){if(l.post.match(/,.*\}/)){t=l.pre+"{"+l.body+c+l.post;return expand(t)}return[t]}var m;if(p){m=l.body.split(/\.\./)}else{m=parseCommaParts(l.body);if(m.length===1){m=expand(m[0],false).map(embrace);if(m.length===1){var g=l.post.length?expand(l.post,false):[""];return g.map((function(t){return l.pre+m[0]+t}))}}}var y=l.pre;var g=l.post.length?expand(l.post,false):[""];var v;if(p){var b=numeric(m[0]);var _=numeric(m[1]);var w=Math.max(m[0].length,m[1].length);var S=m.length==3?Math.abs(numeric(m[2])):1;var E=lte;var x=_<b;if(x){S*=-1;E=gte}var A=m.some(isPadded);v=[];for(var O=b;E(O,_);O+=S){var k;if(h){k=String.fromCharCode(O);if(k==="\\")k=""}else{k=String(O);if(A){var R=w-k.length;if(R>0){var T=new Array(R+1).join("0");if(O<0)k="-"+T+k.slice(1);else k=T+k}}}v.push(k)}}else{v=o(m,(function(t){return expand(t,false)}))}for(var C=0;C<v.length;C++){for(var P=0;P<g.length;P++){var I=y+v[C]+g[P];if(!r||p||I)i.push(I)}}return i}},8333:(t,r,i)=>{"use strict";const o=i(8137);const a=i(8179);const l=i(3013);const u=i(5719);const braces=(t,r={})=>{let i=[];if(Array.isArray(t)){for(let o of t){let t=braces.create(o,r);if(Array.isArray(t)){i.push(...t)}else{i.push(t)}}}else{i=[].concat(braces.create(t,r))}if(r&&r.expand===true&&r.nodupes===true){i=[...new Set(i)]}return i};braces.parse=(t,r={})=>u(t,r);braces.stringify=(t,r={})=>{if(typeof t==="string"){return o(braces.parse(t,r),r)}return o(t,r)};braces.compile=(t,r={})=>{if(typeof t==="string"){t=braces.parse(t,r)}return a(t,r)};braces.expand=(t,r={})=>{if(typeof t==="string"){t=braces.parse(t,r)}let i=l(t,r);if(r.noempty===true){i=i.filter(Boolean)}if(r.nodupes===true){i=[...new Set(i)]}return i};braces.create=(t,r={})=>{if(t===""||t.length<3){return[t]}return r.expand!==true?braces.compile(t,r):braces.expand(t,r)};t.exports=braces},8179:(t,r,i)=>{"use strict";const o=i(7783);const a=i(5617);const compile=(t,r={})=>{let walk=(t,i={})=>{let l=a.isInvalidBrace(i);let u=t.invalid===true&&r.escapeInvalid===true;let c=l===true||u===true;let h=r.escapeInvalid===true?"\\":"";let p="";if(t.isOpen===true){return h+t.value}if(t.isClose===true){return h+t.value}if(t.type==="open"){return c?h+t.value:"("}if(t.type==="close"){return c?h+t.value:")"}if(t.type==="comma"){return t.prev.type==="comma"?"":c?t.value:"|"}if(t.value){return t.value}if(t.nodes&&t.ranges>0){let i=a.reduce(t.nodes);let l=o(...i,{...r,wrap:false,toRegex:true});if(l.length!==0){return i.length>1&&l.length>1?`(${l})`:l}}if(t.nodes){for(let r of t.nodes){p+=walk(r,t)}}return p};return walk(t)};t.exports=compile},5457:t=>{"use strict";t.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},3013:(t,r,i)=>{"use strict";const o=i(7783);const a=i(8137);const l=i(5617);const append=(t="",r="",i=false)=>{let o=[];t=[].concat(t);r=[].concat(r);if(!r.length)return t;if(!t.length){return i?l.flatten(r).map((t=>`{${t}}`)):r}for(let a of t){if(Array.isArray(a)){for(let t of a){o.push(append(t,r,i))}}else{for(let t of r){if(i===true&&typeof t==="string")t=`{${t}}`;o.push(Array.isArray(t)?append(a,t,i):a+t)}}}return l.flatten(o)};const expand=(t,r={})=>{let i=r.rangeLimit===void 0?1e3:r.rangeLimit;let walk=(t,u={})=>{t.queue=[];let c=u;let h=u.queue;while(c.type!=="brace"&&c.type!=="root"&&c.parent){c=c.parent;h=c.queue}if(t.invalid||t.dollar){h.push(append(h.pop(),a(t,r)));return}if(t.type==="brace"&&t.invalid!==true&&t.nodes.length===2){h.push(append(h.pop(),["{}"]));return}if(t.nodes&&t.ranges>0){let u=l.reduce(t.nodes);if(l.exceedsLimit(...u,r.step,i)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let c=o(...u,r);if(c.length===0){c=a(t,r)}h.push(append(h.pop(),c));t.nodes=[];return}let p=l.encloseBrace(t);let d=t.queue;let m=t;while(m.type!=="brace"&&m.type!=="root"&&m.parent){m=m.parent;d=m.queue}for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r];if(i.type==="comma"&&t.type==="brace"){if(r===1)d.push("");d.push("");continue}if(i.type==="close"){h.push(append(h.pop(),d,p));continue}if(i.value&&i.type!=="open"){d.push(append(d.pop(),i.value));continue}if(i.nodes){walk(i,t)}}return d};return l.flatten(walk(t))};t.exports=expand},5719:(t,r,i)=>{"use strict";const o=i(8137);const{MAX_LENGTH:a,CHAR_BACKSLASH:l,CHAR_BACKTICK:u,CHAR_COMMA:c,CHAR_DOT:h,CHAR_LEFT_PARENTHESES:p,CHAR_RIGHT_PARENTHESES:d,CHAR_LEFT_CURLY_BRACE:m,CHAR_RIGHT_CURLY_BRACE:g,CHAR_LEFT_SQUARE_BRACKET:y,CHAR_RIGHT_SQUARE_BRACKET:v,CHAR_DOUBLE_QUOTE:b,CHAR_SINGLE_QUOTE:_,CHAR_NO_BREAK_SPACE:w,CHAR_ZERO_WIDTH_NOBREAK_SPACE:S}=i(5457);const parse=(t,r={})=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}let i=r||{};let E=typeof i.maxLength==="number"?Math.min(a,i.maxLength):a;if(t.length>E){throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${E})`)}let x={type:"root",input:t,nodes:[]};let A=[x];let O=x;let k=x;let R=0;let T=t.length;let C=0;let P=0;let I;let L={};const advance=()=>t[C++];const push=t=>{if(t.type==="text"&&k.type==="dot"){k.type="text"}if(k&&k.type==="text"&&t.type==="text"){k.value+=t.value;return}O.nodes.push(t);t.parent=O;t.prev=k;k=t;return t};push({type:"bos"});while(C<T){O=A[A.length-1];I=advance();if(I===S||I===w){continue}if(I===l){push({type:"text",value:(r.keepEscaping?I:"")+advance()});continue}if(I===v){push({type:"text",value:"\\"+I});continue}if(I===y){R++;let t=true;let r;while(C<T&&(r=advance())){I+=r;if(r===y){R++;continue}if(r===l){I+=advance();continue}if(r===v){R--;if(R===0){break}}}push({type:"text",value:I});continue}if(I===p){O=push({type:"paren",nodes:[]});A.push(O);push({type:"text",value:I});continue}if(I===d){if(O.type!=="paren"){push({type:"text",value:I});continue}O=A.pop();push({type:"text",value:I});O=A[A.length-1];continue}if(I===b||I===_||I===u){let t=I;let i;if(r.keepQuotes!==true){I=""}while(C<T&&(i=advance())){if(i===l){I+=i+advance();continue}if(i===t){if(r.keepQuotes===true)I+=i;break}I+=i}push({type:"text",value:I});continue}if(I===m){P++;let t=k.value&&k.value.slice(-1)==="$"||O.dollar===true;let r={type:"brace",open:true,close:false,dollar:t,depth:P,commas:0,ranges:0,nodes:[]};O=push(r);A.push(O);push({type:"open",value:I});continue}if(I===g){if(O.type!=="brace"){push({type:"text",value:I});continue}let t="close";O=A.pop();O.close=true;push({type:t,value:I});P--;O=A[A.length-1];continue}if(I===c&&P>0){if(O.ranges>0){O.ranges=0;let t=O.nodes.shift();O.nodes=[t,{type:"text",value:o(O)}]}push({type:"comma",value:I});O.commas++;continue}if(I===h&&P>0&&O.commas===0){let t=O.nodes;if(P===0||t.length===0){push({type:"text",value:I});continue}if(k.type==="dot"){O.range=[];k.value+=I;k.type="range";if(O.nodes.length!==3&&O.nodes.length!==5){O.invalid=true;O.ranges=0;k.type="text";continue}O.ranges++;O.args=[];continue}if(k.type==="range"){t.pop();let r=t[t.length-1];r.value+=k.value+I;k=r;O.ranges--;continue}push({type:"dot",value:I});continue}push({type:"text",value:I})}do{O=A.pop();if(O.type!=="root"){O.nodes.forEach((t=>{if(!t.nodes){if(t.type==="open")t.isOpen=true;if(t.type==="close")t.isClose=true;if(!t.nodes)t.type="text";t.invalid=true}}));let t=A[A.length-1];let r=t.nodes.indexOf(O);t.nodes.splice(r,1,...O.nodes)}}while(A.length>0);push({type:"eos"});return x};t.exports=parse},8137:(t,r,i)=>{"use strict";const o=i(5617);t.exports=(t,r={})=>{let stringify=(t,i={})=>{let a=r.escapeInvalid&&o.isInvalidBrace(i);let l=t.invalid===true&&r.escapeInvalid===true;let u="";if(t.value){if((a||l)&&o.isOpenOrClose(t)){return"\\"+t.value}return t.value}if(t.value){return t.value}if(t.nodes){for(let r of t.nodes){u+=stringify(r)}}return u};return stringify(t)}},5617:(t,r)=>{"use strict";r.isInteger=t=>{if(typeof t==="number"){return Number.isInteger(t)}if(typeof t==="string"&&t.trim()!==""){return Number.isInteger(Number(t))}return false};r.find=(t,r)=>t.nodes.find((t=>t.type===r));r.exceedsLimit=(t,i,o=1,a)=>{if(a===false)return false;if(!r.isInteger(t)||!r.isInteger(i))return false;return(Number(i)-Number(t))/Number(o)>=a};r.escapeNode=(t,r=0,i)=>{let o=t.nodes[r];if(!o)return;if(i&&o.type===i||o.type==="open"||o.type==="close"){if(o.escaped!==true){o.value="\\"+o.value;o.escaped=true}}};r.encloseBrace=t=>{if(t.type!=="brace")return false;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}return false};r.isInvalidBrace=t=>{if(t.type!=="brace")return false;if(t.invalid===true||t.dollar)return true;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}if(t.open!==true||t.close!==true){t.invalid=true;return true}return false};r.isOpenOrClose=t=>{if(t.type==="open"||t.type==="close"){return true}return t.open===true||t.close===true};r.reduce=t=>t.reduce(((t,r)=>{if(r.type==="text")t.push(r.value);if(r.type==="range")r.type="text";return t}),[]);r.flatten=(...t)=>{const r=[];const flat=t=>{for(let i=0;i<t.length;i++){let o=t[i];Array.isArray(o)?flat(o,r):o!==void 0&&r.push(o)}return r};flat(t);return r}},3050:(t,r,i)=>{var o=i(4300).Buffer;var a=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];if(typeof Int32Array!=="undefined"){a=new Int32Array(a)}function ensureBuffer(t){if(o.isBuffer(t)){return t}var r=typeof o.alloc==="function"&&typeof o.from==="function";if(typeof t==="number"){return r?o.alloc(t):new o(t)}else if(typeof t==="string"){return r?o.from(t):new o(t)}else{throw new Error("input must be buffer, number, or string, received "+typeof t)}}function bufferizeInt(t){var r=ensureBuffer(4);r.writeInt32BE(t,0);return r}function _crc32(t,r){t=ensureBuffer(t);if(o.isBuffer(r)){r=r.readUInt32BE(0)}var i=~~r^-1;for(var l=0;l<t.length;l++){i=a[(i^t[l])&255]^i>>>8}return i^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.apply(null,arguments)};crc32.unsigned=function(){return _crc32.apply(null,arguments)>>>0};t.exports=crc32},8050:t=>{var r=t.exports=function(){};r.prototype.getName=function(){};r.prototype.getSize=function(){};r.prototype.getLastModifiedDate=function(){};r.prototype.isDirectory=function(){}},6286:(t,r,i)=>{var o=i(3837).inherits;var a=i(3726).Transform;var l=i(8050);var u=i(5219);var c=t.exports=function(t){if(!(this instanceof c)){return new c(t)}a.call(this,t);this.offset=0;this._archive={finish:false,finished:false,processing:false}};o(c,a);c.prototype._appendBuffer=function(t,r,i){};c.prototype._appendStream=function(t,r,i){};c.prototype._emitErrorCallback=function(t){if(t){this.emit("error",t)}};c.prototype._finish=function(t){};c.prototype._normalizeEntry=function(t){};c.prototype._transform=function(t,r,i){i(null,t)};c.prototype.entry=function(t,r,i){r=r||null;if(typeof i!=="function"){i=this._emitErrorCallback.bind(this)}if(!(t instanceof l)){i(new Error("not a valid instance of ArchiveEntry"));return}if(this._archive.finish||this._archive.finished){i(new Error("unacceptable entry after finish"));return}if(this._archive.processing){i(new Error("already processing an entry"));return}this._archive.processing=true;this._normalizeEntry(t);this._entry=t;r=u.normalizeInputSource(r);if(Buffer.isBuffer(r)){this._appendBuffer(t,r,i)}else if(u.isStream(r)){this._appendStream(t,r,i)}else{this._archive.processing=false;i(new Error("input source must be valid Stream or Buffer instance"));return}return this};c.prototype.finish=function(){if(this._archive.processing){this._archive.finish=true;return}this._finish()};c.prototype.getBytesWritten=function(){return this.offset};c.prototype.write=function(t,r){if(t){this.offset+=t.length}return a.prototype.write.call(this,t,r)}},3031:t=>{t.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1}},9341:(t,r,i)=>{var o=i(6730);var a=1<<3;var l=1<<0;var u=1<<2;var c=1<<1;var h=1<<6;var p=1<<11;var d=t.exports=function(){if(!(this instanceof d)){return new d}this.descriptor=false;this.encryption=false;this.utf8=false;this.numberOfShannonFanoTrees=0;this.strongEncryption=false;this.slidingDictionarySize=0;return this};d.prototype.encode=function(){return o.getShortBytes((this.descriptor?a:0)|(this.utf8?p:0)|(this.encryption?l:0)|(this.strongEncryption?h:0))};d.prototype.parse=function(t,r){var i=o.getShortBytesValue(t,r);var m=new d;m.useDataDescriptor((i&a)!==0);m.useUTF8ForNames((i&p)!==0);m.useStrongEncryption((i&h)!==0);m.useEncryption((i&l)!==0);m.setSlidingDictionarySize((i&c)!==0?8192:4096);m.setNumberOfShannonFanoTrees((i&u)!==0?3:2);return m};d.prototype.setNumberOfShannonFanoTrees=function(t){this.numberOfShannonFanoTrees=t};d.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees};d.prototype.setSlidingDictionarySize=function(t){this.slidingDictionarySize=t};d.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize};d.prototype.useDataDescriptor=function(t){this.descriptor=t};d.prototype.usesDataDescriptor=function(){return this.descriptor};d.prototype.useEncryption=function(t){this.encryption=t};d.prototype.usesEncryption=function(){return this.encryption};d.prototype.useStrongEncryption=function(t){this.strongEncryption=t};d.prototype.usesStrongEncryption=function(){return this.strongEncryption};d.prototype.useUTF8ForNames=function(t){this.utf8=t};d.prototype.usesUTF8ForNames=function(){return this.utf8}},4623:t=>{t.exports={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}},6730:t=>{var r=t.exports={};r.dateToDos=function(t,r){r=r||false;var i=r?t.getFullYear():t.getUTCFullYear();if(i<1980){return 2162688}else if(i>=2044){return 2141175677}var o={year:i,month:r?t.getMonth():t.getUTCMonth(),date:r?t.getDate():t.getUTCDate(),hours:r?t.getHours():t.getUTCHours(),minutes:r?t.getMinutes():t.getUTCMinutes(),seconds:r?t.getSeconds():t.getUTCSeconds()};return o.year-1980<<25|o.month+1<<21|o.date<<16|o.hours<<11|o.minutes<<5|o.seconds/2};r.dosToDate=function(t){return new Date((t>>25&127)+1980,(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(t&31)<<1)};r.fromDosTime=function(t){return r.dosToDate(t.readUInt32LE(0))};r.getEightBytes=function(t){var r=Buffer.alloc(8);r.writeUInt32LE(t%4294967296,0);r.writeUInt32LE(t/4294967296|0,4);return r};r.getShortBytes=function(t){var r=Buffer.alloc(2);r.writeUInt16LE((t&65535)>>>0,0);return r};r.getShortBytesValue=function(t,r){return t.readUInt16LE(r)};r.getLongBytes=function(t){var r=Buffer.alloc(4);r.writeUInt32LE((t&4294967295)>>>0,0);return r};r.getLongBytesValue=function(t,r){return t.readUInt32LE(r)};r.toDosTime=function(t){return r.getLongBytes(r.dateToDos(t))}},5756:(t,r,i)=>{var o=i(3837).inherits;var a=i(4119);var l=i(8050);var u=i(9341);var c=i(4623);var h=i(3031);var p=i(6730);var d=t.exports=function(t){if(!(this instanceof d)){return new d(t)}l.call(this);this.platform=h.PLATFORM_FAT;this.method=-1;this.name=null;this.size=0;this.csize=0;this.gpb=new u;this.crc=0;this.time=-1;this.minver=h.MIN_VERSION_INITIAL;this.mode=-1;this.extra=null;this.exattr=0;this.inattr=0;this.comment=null;if(t){this.setName(t)}};o(d,l);d.prototype.getCentralDirectoryExtra=function(){return this.getExtra()};d.prototype.getComment=function(){return this.comment!==null?this.comment:""};d.prototype.getCompressedSize=function(){return this.csize};d.prototype.getCrc=function(){return this.crc};d.prototype.getExternalAttributes=function(){return this.exattr};d.prototype.getExtra=function(){return this.extra!==null?this.extra:h.EMPTY};d.prototype.getGeneralPurposeBit=function(){return this.gpb};d.prototype.getInternalAttributes=function(){return this.inattr};d.prototype.getLastModifiedDate=function(){return this.getTime()};d.prototype.getLocalFileDataExtra=function(){return this.getExtra()};d.prototype.getMethod=function(){return this.method};d.prototype.getName=function(){return this.name};d.prototype.getPlatform=function(){return this.platform};d.prototype.getSize=function(){return this.size};d.prototype.getTime=function(){return this.time!==-1?p.dosToDate(this.time):-1};d.prototype.getTimeDos=function(){return this.time!==-1?this.time:0};d.prototype.getUnixMode=function(){return this.platform!==h.PLATFORM_UNIX?0:this.getExternalAttributes()>>h.SHORT_SHIFT&h.SHORT_MASK};d.prototype.getVersionNeededToExtract=function(){return this.minver};d.prototype.setComment=function(t){if(Buffer.byteLength(t)!==t.length){this.getGeneralPurposeBit().useUTF8ForNames(true)}this.comment=t};d.prototype.setCompressedSize=function(t){if(t<0){throw new Error("invalid entry compressed size")}this.csize=t};d.prototype.setCrc=function(t){if(t<0){throw new Error("invalid entry crc32")}this.crc=t};d.prototype.setExternalAttributes=function(t){this.exattr=t>>>0};d.prototype.setExtra=function(t){this.extra=t};d.prototype.setGeneralPurposeBit=function(t){if(!(t instanceof u)){throw new Error("invalid entry GeneralPurposeBit")}this.gpb=t};d.prototype.setInternalAttributes=function(t){this.inattr=t};d.prototype.setMethod=function(t){if(t<0){throw new Error("invalid entry compression method")}this.method=t};d.prototype.setName=function(t,r=false){t=a(t,false).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"");if(r){t=`/${t}`}if(Buffer.byteLength(t)!==t.length){this.getGeneralPurposeBit().useUTF8ForNames(true)}this.name=t};d.prototype.setPlatform=function(t){this.platform=t};d.prototype.setSize=function(t){if(t<0){throw new Error("invalid entry size")}this.size=t};d.prototype.setTime=function(t,r){if(!(t instanceof Date)){throw new Error("invalid entry time")}this.time=p.dateToDos(t,r)};d.prototype.setUnixMode=function(t){t|=this.isDirectory()?h.S_IFDIR:h.S_IFREG;var r=0;r|=t<<h.SHORT_SHIFT|(this.isDirectory()?h.S_DOS_D:h.S_DOS_A);this.setExternalAttributes(r);this.mode=t&h.MODE_MASK;this.platform=h.PLATFORM_UNIX};d.prototype.setVersionNeededToExtract=function(t){this.minver=t};d.prototype.isDirectory=function(){return this.getName().slice(-1)==="/"};d.prototype.isUnixSymlink=function(){return(this.getUnixMode()&c.FILE_TYPE_FLAG)===c.LINK_FLAG};d.prototype.isZip64=function(){return this.csize>h.ZIP64_MAGIC||this.size>h.ZIP64_MAGIC}},8486:(t,r,i)=>{var o=i(3837).inherits;var a=i(3050);var{CRC32Stream:l}=i(1817);var{DeflateCRC32Stream:u}=i(1817);var c=i(6286);var h=i(5756);var p=i(9341);var d=i(3031);var m=i(5219);var g=i(6730);var y=t.exports=function(t){if(!(this instanceof y)){return new y(t)}t=this.options=this._defaults(t);c.call(this,t);this._entry=null;this._entries=[];this._archive={centralLength:0,centralOffset:0,comment:"",finish:false,finished:false,processing:false,forceZip64:t.forceZip64,forceLocalTime:t.forceLocalTime}};o(y,c);y.prototype._afterAppend=function(t){this._entries.push(t);if(t.getGeneralPurposeBit().usesDataDescriptor()){this._writeDataDescriptor(t)}this._archive.processing=false;this._entry=null;if(this._archive.finish&&!this._archive.finished){this._finish()}};y.prototype._appendBuffer=function(t,r,i){if(r.length===0){t.setMethod(d.METHOD_STORED)}var o=t.getMethod();if(o===d.METHOD_STORED){t.setSize(r.length);t.setCompressedSize(r.length);t.setCrc(a.unsigned(r))}this._writeLocalFileHeader(t);if(o===d.METHOD_STORED){this.write(r);this._afterAppend(t);i(null,t);return}else if(o===d.METHOD_DEFLATED){this._smartStream(t,i).end(r);return}else{i(new Error("compression method "+o+" not implemented"));return}};y.prototype._appendStream=function(t,r,i){t.getGeneralPurposeBit().useDataDescriptor(true);t.setVersionNeededToExtract(d.MIN_VERSION_DATA_DESCRIPTOR);this._writeLocalFileHeader(t);var o=this._smartStream(t,i);r.once("error",(function(t){o.emit("error",t);o.end()}));r.pipe(o)};y.prototype._defaults=function(t){if(typeof t!=="object"){t={}}if(typeof t.zlib!=="object"){t.zlib={}}if(typeof t.zlib.level!=="number"){t.zlib.level=d.ZLIB_BEST_SPEED}t.forceZip64=!!t.forceZip64;t.forceLocalTime=!!t.forceLocalTime;return t};y.prototype._finish=function(){this._archive.centralOffset=this.offset;this._entries.forEach(function(t){this._writeCentralFileHeader(t)}.bind(this));this._archive.centralLength=this.offset-this._archive.centralOffset;if(this.isZip64()){this._writeCentralDirectoryZip64()}this._writeCentralDirectoryEnd();this._archive.processing=false;this._archive.finish=true;this._archive.finished=true;this.end()};y.prototype._normalizeEntry=function(t){if(t.getMethod()===-1){t.setMethod(d.METHOD_DEFLATED)}if(t.getMethod()===d.METHOD_DEFLATED){t.getGeneralPurposeBit().useDataDescriptor(true);t.setVersionNeededToExtract(d.MIN_VERSION_DATA_DESCRIPTOR)}if(t.getTime()===-1){t.setTime(new Date,this._archive.forceLocalTime)}t._offsets={file:0,data:0,contents:0}};y.prototype._smartStream=function(t,r){var i=t.getMethod()===d.METHOD_DEFLATED;var o=i?new u(this.options.zlib):new l;var a=null;function handleStuff(){var i=o.digest().readUInt32BE(0);t.setCrc(i);t.setSize(o.size());t.setCompressedSize(o.size(true));this._afterAppend(t);r(a,t)}o.once("end",handleStuff.bind(this));o.once("error",(function(t){a=t}));o.pipe(this,{end:false});return o};y.prototype._writeCentralDirectoryEnd=function(){var t=this._entries.length;var r=this._archive.centralLength;var i=this._archive.centralOffset;if(this.isZip64()){t=d.ZIP64_MAGIC_SHORT;r=d.ZIP64_MAGIC;i=d.ZIP64_MAGIC}this.write(g.getLongBytes(d.SIG_EOCD));this.write(d.SHORT_ZERO);this.write(d.SHORT_ZERO);this.write(g.getShortBytes(t));this.write(g.getShortBytes(t));this.write(g.getLongBytes(r));this.write(g.getLongBytes(i));var o=this.getComment();var a=Buffer.byteLength(o);this.write(g.getShortBytes(a));this.write(o)};y.prototype._writeCentralDirectoryZip64=function(){this.write(g.getLongBytes(d.SIG_ZIP64_EOCD));this.write(g.getEightBytes(44));this.write(g.getShortBytes(d.MIN_VERSION_ZIP64));this.write(g.getShortBytes(d.MIN_VERSION_ZIP64));this.write(d.LONG_ZERO);this.write(d.LONG_ZERO);this.write(g.getEightBytes(this._entries.length));this.write(g.getEightBytes(this._entries.length));this.write(g.getEightBytes(this._archive.centralLength));this.write(g.getEightBytes(this._archive.centralOffset));this.write(g.getLongBytes(d.SIG_ZIP64_EOCD_LOC));this.write(d.LONG_ZERO);this.write(g.getEightBytes(this._archive.centralOffset+this._archive.centralLength));this.write(g.getLongBytes(1))};y.prototype._writeCentralFileHeader=function(t){var r=t.getGeneralPurposeBit();var i=t.getMethod();var o=t._offsets;var a=t.getSize();var l=t.getCompressedSize();if(t.isZip64()||o.file>d.ZIP64_MAGIC){a=d.ZIP64_MAGIC;l=d.ZIP64_MAGIC;t.setVersionNeededToExtract(d.MIN_VERSION_ZIP64);var u=Buffer.concat([g.getShortBytes(d.ZIP64_EXTRA_ID),g.getShortBytes(24),g.getEightBytes(t.getSize()),g.getEightBytes(t.getCompressedSize()),g.getEightBytes(o.file)],28);t.setExtra(u)}this.write(g.getLongBytes(d.SIG_CFH));this.write(g.getShortBytes(t.getPlatform()<<8|d.VERSION_MADEBY));this.write(g.getShortBytes(t.getVersionNeededToExtract()));this.write(r.encode());this.write(g.getShortBytes(i));this.write(g.getLongBytes(t.getTimeDos()));this.write(g.getLongBytes(t.getCrc()));this.write(g.getLongBytes(l));this.write(g.getLongBytes(a));var c=t.getName();var h=t.getComment();var p=t.getCentralDirectoryExtra();if(r.usesUTF8ForNames()){c=Buffer.from(c);h=Buffer.from(h)}this.write(g.getShortBytes(c.length));this.write(g.getShortBytes(p.length));this.write(g.getShortBytes(h.length));this.write(d.SHORT_ZERO);this.write(g.getShortBytes(t.getInternalAttributes()));this.write(g.getLongBytes(t.getExternalAttributes()));if(o.file>d.ZIP64_MAGIC){this.write(g.getLongBytes(d.ZIP64_MAGIC))}else{this.write(g.getLongBytes(o.file))}this.write(c);this.write(p);this.write(h)};y.prototype._writeDataDescriptor=function(t){this.write(g.getLongBytes(d.SIG_DD));this.write(g.getLongBytes(t.getCrc()));if(t.isZip64()){this.write(g.getEightBytes(t.getCompressedSize()));this.write(g.getEightBytes(t.getSize()))}else{this.write(g.getLongBytes(t.getCompressedSize()));this.write(g.getLongBytes(t.getSize()))}};y.prototype._writeLocalFileHeader=function(t){var r=t.getGeneralPurposeBit();var i=t.getMethod();var o=t.getName();var a=t.getLocalFileDataExtra();if(t.isZip64()){r.useDataDescriptor(true);t.setVersionNeededToExtract(d.MIN_VERSION_ZIP64)}if(r.usesUTF8ForNames()){o=Buffer.from(o)}t._offsets.file=this.offset;this.write(g.getLongBytes(d.SIG_LFH));this.write(g.getShortBytes(t.getVersionNeededToExtract()));this.write(r.encode());this.write(g.getShortBytes(i));this.write(g.getLongBytes(t.getTimeDos()));t._offsets.data=this.offset;if(r.usesDataDescriptor()){this.write(d.LONG_ZERO);this.write(d.LONG_ZERO);this.write(d.LONG_ZERO)}else{this.write(g.getLongBytes(t.getCrc()));this.write(g.getLongBytes(t.getCompressedSize()));this.write(g.getLongBytes(t.getSize()))}this.write(g.getShortBytes(o.length));this.write(g.getShortBytes(a.length));this.write(o);this.write(a);t._offsets.contents=this.offset};y.prototype.getComment=function(t){return this._archive.comment!==null?this._archive.comment:""};y.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>d.ZIP64_MAGIC_SHORT||this._archive.centralLength>d.ZIP64_MAGIC||this._archive.centralOffset>d.ZIP64_MAGIC};y.prototype.setComment=function(t){this._archive.comment=t}},2096:(t,r,i)=>{t.exports={ArchiveEntry:i(8050),ZipArchiveEntry:i(5756),ArchiveOutputStream:i(6286),ZipArchiveOutputStream:i(8486)}},5219:(t,r,i)=>{var o=i(2781).Stream;var a=i(3726).PassThrough;var l=t.exports={};l.isStream=function(t){return t instanceof o};l.normalizeInputSource=function(t){if(t===null){return Buffer.alloc(0)}else if(typeof t==="string"){return Buffer.from(t)}else if(l.isStream(t)&&!t._readableState){var r=new a;t.pipe(r);return r}return t}},7381:t=>{t.exports=function(t,i){var o=[];for(var a=0;a<t.length;a++){var l=i(t[a],a);if(r(l))o.push.apply(o,l);else o.push(l)}return o};var r=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"}},642:(t,r,i)=>{function isArray(t){if(Array.isArray){return Array.isArray(t)}return objectToString(t)==="[object Array]"}r.isArray=isArray;function isBoolean(t){return typeof t==="boolean"}r.isBoolean=isBoolean;function isNull(t){return t===null}r.isNull=isNull;function isNullOrUndefined(t){return t==null}r.isNullOrUndefined=isNullOrUndefined;function isNumber(t){return typeof t==="number"}r.isNumber=isNumber;function isString(t){return typeof t==="string"}r.isString=isString;function isSymbol(t){return typeof t==="symbol"}r.isSymbol=isSymbol;function isUndefined(t){return t===void 0}r.isUndefined=isUndefined;function isRegExp(t){return objectToString(t)==="[object RegExp]"}r.isRegExp=isRegExp;function isObject(t){return typeof t==="object"&&t!==null}r.isObject=isObject;function isDate(t){return objectToString(t)==="[object Date]"}r.isDate=isDate;function isError(t){return objectToString(t)==="[object Error]"||t instanceof Error}r.isError=isError;function isFunction(t){return typeof t==="function"}r.isFunction=isFunction;function isPrimitive(t){return t===null||typeof t==="boolean"||typeof t==="number"||typeof t==="string"||typeof t==="symbol"||typeof t==="undefined"}r.isPrimitive=isPrimitive;r.isBuffer=i(4300).Buffer.isBuffer;function objectToString(t){return Object.prototype.toString.call(t)}},1535:(t,r,i)=>{"use strict";const o=i(3134);class CpFileError extends o{constructor(t,r){super(t,r);Object.assign(this,r);this.name="CpFileError"}}t.exports=CpFileError},1902:(t,r,i)=>{"use strict";const{promisify:o}=i(3837);const a=i(9165);const l=i(5940);const u=i(6415);const c=i(1535);const h=o(a.stat);const p=o(a.lstat);const d=o(a.utimes);const m=o(a.chmod);r.closeSync=a.closeSync.bind(a);r.createWriteStream=a.createWriteStream.bind(a);r.createReadStream=async(t,r)=>{const i=a.createReadStream(t,r);try{await u(i,["readable","end"])}catch(r){throw new c(`Cannot read from \`${t}\`: ${r.message}`,r)}return i};r.stat=t=>h(t).catch((r=>{throw new c(`Cannot stat path \`${t}\`: ${r.message}`,r)}));r.lstat=t=>p(t).catch((r=>{throw new c(`lstat \`${t}\` failed: ${r.message}`,r)}));r.utimes=(t,r,i)=>d(t,r,i).catch((r=>{throw new c(`utimes \`${t}\` failed: ${r.message}`,r)}));r.chmod=(t,r)=>m(t,r).catch((r=>{throw new c(`chmod \`${t}\` failed: ${r.message}`,r)}));r.statSync=t=>{try{return a.statSync(t)}catch(r){throw new c(`stat \`${t}\` failed: ${r.message}`,r)}};r.utimesSync=(t,r,i)=>{try{return a.utimesSync(t,r,i)}catch(r){throw new c(`utimes \`${t}\` failed: ${r.message}`,r)}};r.makeDir=(t,r)=>l(t,{...r,fs:a}).catch((r=>{throw new c(`Cannot create directory \`${t}\`: ${r.message}`,r)}));r.makeDirSync=(t,r)=>{try{l.sync(t,{...r,fs:a})}catch(r){throw new c(`Cannot create directory \`${t}\`: ${r.message}`,r)}};r.copyFileSync=(t,r,i)=>{try{a.copyFileSync(t,r,i)}catch(i){throw new c(`Cannot copy from \`${t}\` to \`${r}\`: ${i.message}`,i)}}},8174:(t,r,i)=>{"use strict";const o=i(1017);const{constants:a}=i(7147);const l=i(6415);const u=i(1535);const c=i(1902);const h=i(9390);const cpFileAsync=async(t,r,i,a)=>{let h;const p=await c.stat(t);a.size=p.size;const d=await c.createReadStream(t);await c.makeDir(o.dirname(r),{mode:i.directoryMode});const m=c.createWriteStream(r,{flags:i.overwrite?"w":"wx"});d.on("data",(()=>{a.writtenBytes=m.bytesWritten}));d.once("error",(r=>{h=new u(`Cannot read from \`${t}\`: ${r.message}`,r);m.end()}));let g=false;try{const t=l(m,"close");d.pipe(m);await t;a.writtenBytes=a.size;g=true}catch(t){throw new u(`Cannot write to \`${r}\`: ${t.message}`,t)}if(h){throw h}if(g){const i=await c.lstat(t);return Promise.all([c.utimes(r,i.atime,i.mtime),c.chmod(r,i.mode)])}};const cpFile=(t,r,i)=>{if(!t||!r){return Promise.reject(new u("`source` and `destination` required"))}i={overwrite:true,...i};const a=new h(o.resolve(t),o.resolve(r));const l=cpFileAsync(t,r,i,a);l.on=(...t)=>{a.on(...t);return l};return l};t.exports=cpFile;const checkSourceIsFile=(t,r)=>{if(t.isDirectory()){throw Object.assign(new u(`EISDIR: illegal operation on a directory '${r}'`),{errno:-21,code:"EISDIR",source:r})}};t.exports.sync=(t,r,i)=>{if(!t||!r){throw new u("`source` and `destination` required")}i={overwrite:true,...i};const l=c.statSync(t);checkSourceIsFile(l,t);c.makeDirSync(o.dirname(r),{mode:i.directoryMode});const h=i.overwrite?null:a.COPYFILE_EXCL;try{c.copyFileSync(t,r,h)}catch(t){if(!i.overwrite&&t.code==="EEXIST"){return}throw t}c.utimesSync(r,l.atime,l.mtime)}},9390:(t,r,i)=>{"use strict";const o=i(2361);const a=new WeakMap;class ProgressEmitter extends o{constructor(t,r){super();this._sourcePath=t;this._destinationPath=r}get writtenBytes(){return a.get(this)}set writtenBytes(t){a.set(this,t);this.emitProgress()}emitProgress(){const{size:t,writtenBytes:r}=this;this.emit("progress",{sourcePath:this._sourcePath,destinationPath:this._destinationPath,size:t,writtenBytes:r,percent:r===t?1:r/t})}}t.exports=ProgressEmitter},4082:(t,r)=>{
51
51
  /*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */
52
52
  var i;(function(t){if(typeof DO_NOT_EXPORT_CRC==="undefined"){if(true){t(r)}else{}}else{t(i={})}})((function(t){t.version="1.2.2";function signed_crc_table(){var t=0,r=new Array(256);for(var i=0;i!=256;++i){t=i;t=t&1?-306674912^t>>>1:t>>>1;t=t&1?-306674912^t>>>1:t>>>1;t=t&1?-306674912^t>>>1:t>>>1;t=t&1?-306674912^t>>>1:t>>>1;t=t&1?-306674912^t>>>1:t>>>1;t=t&1?-306674912^t>>>1:t>>>1;t=t&1?-306674912^t>>>1:t>>>1;t=t&1?-306674912^t>>>1:t>>>1;r[i]=t}return typeof Int32Array!=="undefined"?new Int32Array(r):r}var r=signed_crc_table();function slice_by_16_tables(t){var r=0,i=0,o=0,a=typeof Int32Array!=="undefined"?new Int32Array(4096):new Array(4096);for(o=0;o!=256;++o)a[o]=t[o];for(o=0;o!=256;++o){i=t[o];for(r=256+o;r<4096;r+=256)i=a[r]=i>>>8^t[i&255]}var l=[];for(o=1;o!=16;++o)l[o-1]=typeof Int32Array!=="undefined"?a.subarray(o*256,o*256+256):a.slice(o*256,o*256+256);return l}var i=slice_by_16_tables(r);var o=i[0],a=i[1],l=i[2],u=i[3],c=i[4];var h=i[5],p=i[6],d=i[7],m=i[8],g=i[9];var y=i[10],v=i[11],b=i[12],_=i[13],w=i[14];function crc32_bstr(t,i){var o=i^-1;for(var a=0,l=t.length;a<l;)o=o>>>8^r[(o^t.charCodeAt(a++))&255];return~o}function crc32_buf(t,i){var S=i^-1,E=t.length-15,x=0;for(;x<E;)S=w[t[x++]^S&255]^_[t[x++]^S>>8&255]^b[t[x++]^S>>16&255]^v[t[x++]^S>>>24]^y[t[x++]]^g[t[x++]]^m[t[x++]]^d[t[x++]]^p[t[x++]]^h[t[x++]]^c[t[x++]]^u[t[x++]]^l[t[x++]]^a[t[x++]]^o[t[x++]]^r[t[x++]];E+=15;while(x<E)S=S>>>8^r[(S^t[x++])&255];return~S}function crc32_str(t,i){var o=i^-1;for(var a=0,l=t.length,u=0,c=0;a<l;){u=t.charCodeAt(a++);if(u<128){o=o>>>8^r[(o^u)&255]}else if(u<2048){o=o>>>8^r[(o^(192|u>>6&31))&255];o=o>>>8^r[(o^(128|u&63))&255]}else if(u>=55296&&u<57344){u=(u&1023)+64;c=t.charCodeAt(a++)&1023;o=o>>>8^r[(o^(240|u>>8&7))&255];o=o>>>8^r[(o^(128|u>>2&63))&255];o=o>>>8^r[(o^(128|c>>6&15|(u&3)<<4))&255];o=o>>>8^r[(o^(128|c&63))&255]}else{o=o>>>8^r[(o^(224|u>>12&15))&255];o=o>>>8^r[(o^(128|u>>6&63))&255];o=o>>>8^r[(o^(128|u&63))&255]}}return~o}t.table=r;t.bstr=crc32_bstr;t.buf=crc32_buf;t.str=crc32_str}))},3481:(t,r,i)=>{"use strict";const{Transform:o}=i(3726);const a=i(4082);class CRC32Stream extends o{constructor(t){super(t);this.checksum=Buffer.allocUnsafe(4);this.checksum.writeInt32BE(0,0);this.rawSize=0}_transform(t,r,i){if(t){this.checksum=a.buf(t,this.checksum)>>>0;this.rawSize+=t.length}i(null,t)}digest(t){const r=Buffer.allocUnsafe(4);r.writeUInt32BE(this.checksum>>>0,0);return t?r.toString(t):r}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}}t.exports=CRC32Stream},2371:(t,r,i)=>{"use strict";const{DeflateRaw:o}=i(9796);const a=i(4082);class DeflateCRC32Stream extends o{constructor(t){super(t);this.checksum=Buffer.allocUnsafe(4);this.checksum.writeInt32BE(0,0);this.rawSize=0;this.compressedSize=0}push(t,r){if(t){this.compressedSize+=t.length}return super.push(t,r)}_transform(t,r,i){if(t){this.checksum=a.buf(t,this.checksum)>>>0;this.rawSize+=t.length}super._transform(t,r,i)}digest(t){const r=Buffer.allocUnsafe(4);r.writeUInt32BE(this.checksum>>>0,0);return t?r.toString(t):r}hex(){return this.digest("hex").toUpperCase()}size(t=false){if(t){return this.compressedSize}else{return this.rawSize}}}t.exports=DeflateCRC32Stream},1817:(t,r,i)=>{"use strict";t.exports={CRC32Stream:i(3481),DeflateCRC32Stream:i(2371)}},4488:(t,r,i)=>{"use strict";const o=i(2081);const a=i(8423);const l=i(9449);function spawn(t,r,i){const u=a(t,r,i);const c=o.spawn(u.command,u.args,u.options);l.hookChildProcess(c,u);return c}function spawnSync(t,r,i){const u=a(t,r,i);const c=o.spawnSync(u.command,u.args,u.options);c.error=c.error||l.verifyENOENTSync(c.status,u);return c}t.exports=spawn;t.exports.spawn=spawn;t.exports.sync=spawnSync;t.exports._parse=a;t.exports._enoent=l},9449:t=>{"use strict";const r=process.platform==="win32";function notFoundError(t,r){return Object.assign(new Error(`${r} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${r} ${t.command}`,path:t.command,spawnargs:t.args})}function hookChildProcess(t,i){if(!r){return}const o=t.emit;t.emit=function(r,a){if(r==="exit"){const r=verifyENOENT(a,i,"spawn");if(r){return o.call(t,"error",r)}}return o.apply(t,arguments)}}function verifyENOENT(t,i){if(r&&t===1&&!i.file){return notFoundError(i.original,"spawn")}return null}function verifyENOENTSync(t,i){if(r&&t===1&&!i.file){return notFoundError(i.original,"spawnSync")}return null}t.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},8423:(t,r,i)=>{"use strict";const o=i(1017);const a=i(5907);const l=i(8268);const u=i(7408);const c=process.platform==="win32";const h=/\.(?:com|exe)$/i;const p=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(t){t.file=a(t);const r=t.file&&u(t.file);if(r){t.args.unshift(t.file);t.command=r;return a(t)}return t.file}function parseNonShell(t){if(!c){return t}const r=detectShebang(t);const i=!h.test(r);if(t.options.forceShell||i){const i=p.test(r);t.command=o.normalize(t.command);t.command=l.command(t.command);t.args=t.args.map((t=>l.argument(t,i)));const a=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${a}"`];t.command=process.env.comspec||"cmd.exe";t.options.windowsVerbatimArguments=true}return t}function parse(t,r,i){if(r&&!Array.isArray(r)){i=r;r=null}r=r?r.slice(0):[];i=Object.assign({},i);const o={command:t,args:r,options:i,file:undefined,original:{command:t,args:r}};return i.shell?o:parseNonShell(o)}t.exports=parse},8268:t=>{"use strict";const r=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(t){t=t.replace(r,"^$1");return t}function escapeArgument(t,i){t=`${t}`;t=t.replace(/(\\*)"/g,'$1$1\\"');t=t.replace(/(\\*)$/,"$1$1");t=`"${t}"`;t=t.replace(r,"^$1");if(i){t=t.replace(r,"^$1")}return t}t.exports.command=escapeCommand;t.exports.argument=escapeArgument},7408:(t,r,i)=>{"use strict";const o=i(7147);const a=i(530);function readShebang(t){const r=150;const i=Buffer.alloc(r);let l;try{l=o.openSync(t,"r");o.readSync(l,i,0,r,0);o.closeSync(l)}catch(t){}return a(i.toString())}t.exports=readShebang},5907:(t,r,i)=>{"use strict";const o=i(1017);const a=i(7200);const l=i(2799);function resolveCommandAttempt(t,r){const i=t.options.env||process.env;const u=process.cwd();const c=t.options.cwd!=null;const h=c&&process.chdir!==undefined&&!process.chdir.disabled;if(h){try{process.chdir(t.options.cwd)}catch(t){}}let p;try{p=a.sync(t.command,{path:i[l({env:i})],pathExt:r?o.delimiter:undefined})}catch(t){}finally{if(h){process.chdir(u)}}if(p){p=o.resolve(c?t.options.cwd:"",p)}return p}function resolveCommand(t){return resolveCommandAttempt(t)||resolveCommandAttempt(t,true)}t.exports=resolveCommand},7360:t=>{"use strict";
53
53
  /*!
@@ -107,14 +107,14 @@ var o=i(9999);var a={"{":"}","(":")","[":"]"};var strictCheck=function(t){if(t[0
107
107
  *
108
108
  * Copyright (c) 2014-present, Jon Schlinkert.
109
109
  * Released under the MIT License.
110
- */t.exports=function(t){if(typeof t==="number"){return t-t===0}if(typeof t==="string"&&t.trim()!==""){return Number.isFinite?Number.isFinite(+t):isFinite(+t)}return false}},1551:t=>{var r={}.toString;t.exports=Array.isArray||function(t){return r.call(t)=="[object Array]"}},7745:(t,r,i)=>{var o=i(7147);var a;if(process.platform==="win32"||global.TESTING_WINDOWS){a=i(8554)}else{a=i(7138)}t.exports=isexe;isexe.sync=sync;function isexe(t,r,i){if(typeof r==="function"){i=r;r={}}if(!i){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(i,o){isexe(t,r||{},(function(t,r){if(t){o(t)}else{i(r)}}))}))}a(t,r||{},(function(t,o){if(t){if(t.code==="EACCES"||r&&r.ignoreErrors){t=null;o=false}}i(t,o)}))}function sync(t,r){try{return a.sync(t,r||{})}catch(t){if(r&&r.ignoreErrors||t.code==="EACCES"){return false}else{throw t}}}},7138:(t,r,i)=>{t.exports=isexe;isexe.sync=sync;var o=i(7147);function isexe(t,r,i){o.stat(t,(function(t,o){i(t,t?false:checkStat(o,r))}))}function sync(t,r){return checkStat(o.statSync(t),r)}function checkStat(t,r){return t.isFile()&&checkMode(t,r)}function checkMode(t,r){var i=t.mode;var o=t.uid;var a=t.gid;var l=r.uid!==undefined?r.uid:process.getuid&&process.getuid();var u=r.gid!==undefined?r.gid:process.getgid&&process.getgid();var c=parseInt("100",8);var h=parseInt("010",8);var p=parseInt("001",8);var d=c|h;var m=i&p||i&h&&a===u||i&c&&o===l||i&d&&l===0;return m}},8554:(t,r,i)=>{t.exports=isexe;isexe.sync=sync;var o=i(7147);function checkPathExt(t,r){var i=r.pathExt!==undefined?r.pathExt:process.env.PATHEXT;if(!i){return true}i=i.split(";");if(i.indexOf("")!==-1){return true}for(var o=0;o<i.length;o++){var a=i[o].toLowerCase();if(a&&t.substr(-a.length).toLowerCase()===a){return true}}return false}function checkStat(t,r,i){if(!t.isSymbolicLink()&&!t.isFile()){return false}return checkPathExt(r,i)}function isexe(t,r,i){o.stat(t,(function(o,a){i(o,o?false:checkStat(a,t,r))}))}function sync(t,r){return checkStat(o.statSync(t),t,r)}},5585:(t,r,i)=>{"use strict";var o=i(6882);t.exports=o},6882:(t,r,i)=>{"use strict";var o=i(3760);var a=i(6642);function deprecated(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}t.exports.Type=i(7457);t.exports.Schema=i(6433);t.exports.FAILSAFE_SCHEMA=i(7637);t.exports.JSON_SCHEMA=i(9980);t.exports.CORE_SCHEMA=i(6678);t.exports.DEFAULT_SAFE_SCHEMA=i(5817);t.exports.DEFAULT_FULL_SCHEMA=i(4795);t.exports.load=o.load;t.exports.loadAll=o.loadAll;t.exports.safeLoad=o.safeLoad;t.exports.safeLoadAll=o.safeLoadAll;t.exports.dump=a.dump;t.exports.safeDump=a.safeDump;t.exports.YAMLException=i(909);t.exports.MINIMAL_SCHEMA=i(7637);t.exports.SAFE_SCHEMA=i(5817);t.exports.DEFAULT_SCHEMA=i(4795);t.exports.scan=deprecated("scan");t.exports.parse=deprecated("parse");t.exports.compose=deprecated("compose");t.exports.addConstructor=deprecated("addConstructor")},975:t=>{"use strict";function isNothing(t){return typeof t==="undefined"||t===null}function isObject(t){return typeof t==="object"&&t!==null}function toArray(t){if(Array.isArray(t))return t;else if(isNothing(t))return[];return[t]}function extend(t,r){var i,o,a,l;if(r){l=Object.keys(r);for(i=0,o=l.length;i<o;i+=1){a=l[i];t[a]=r[a]}}return t}function repeat(t,r){var i="",o;for(o=0;o<r;o+=1){i+=t}return i}function isNegativeZero(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}t.exports.isNothing=isNothing;t.exports.isObject=isObject;t.exports.toArray=toArray;t.exports.repeat=repeat;t.exports.isNegativeZero=isNegativeZero;t.exports.extend=extend},6642:(t,r,i)=>{"use strict";var o=i(975);var a=i(909);var l=i(4795);var u=i(5817);var c=Object.prototype.toString;var h=Object.prototype.hasOwnProperty;var p=9;var d=10;var m=13;var g=32;var y=33;var v=34;var b=35;var _=37;var w=38;var S=39;var E=42;var x=44;var A=45;var O=58;var k=61;var R=62;var T=63;var C=64;var P=91;var I=93;var L=96;var M=123;var N=124;var D=125;var j={};j[0]="\\0";j[7]="\\a";j[8]="\\b";j[9]="\\t";j[10]="\\n";j[11]="\\v";j[12]="\\f";j[13]="\\r";j[27]="\\e";j[34]='\\"';j[92]="\\\\";j[133]="\\N";j[160]="\\_";j[8232]="\\L";j[8233]="\\P";var $=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function compileStyleMap(t,r){var i,o,a,l,u,c,p;if(r===null)return{};i={};o=Object.keys(r);for(a=0,l=o.length;a<l;a+=1){u=o[a];c=String(r[u]);if(u.slice(0,2)==="!!"){u="tag:yaml.org,2002:"+u.slice(2)}p=t.compiledTypeMap["fallback"][u];if(p&&h.call(p.styleAliases,c)){c=p.styleAliases[c]}i[u]=c}return i}function encodeHex(t){var r,i,l;r=t.toString(16).toUpperCase();if(t<=255){i="x";l=2}else if(t<=65535){i="u";l=4}else if(t<=4294967295){i="U";l=8}else{throw new a("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+i+o.repeat("0",l-r.length)+r}function State(t){this.schema=t["schema"]||l;this.indent=Math.max(1,t["indent"]||2);this.noArrayIndent=t["noArrayIndent"]||false;this.skipInvalid=t["skipInvalid"]||false;this.flowLevel=o.isNothing(t["flowLevel"])?-1:t["flowLevel"];this.styleMap=compileStyleMap(this.schema,t["styles"]||null);this.sortKeys=t["sortKeys"]||false;this.lineWidth=t["lineWidth"]||80;this.noRefs=t["noRefs"]||false;this.noCompatMode=t["noCompatMode"]||false;this.condenseFlow=t["condenseFlow"]||false;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}function indentString(t,r){var i=o.repeat(" ",r),a=0,l=-1,u="",c,h=t.length;while(a<h){l=t.indexOf("\n",a);if(l===-1){c=t.slice(a);a=h}else{c=t.slice(a,l+1);a=l+1}if(c.length&&c!=="\n")u+=i;u+=c}return u}function generateNextLine(t,r){return"\n"+o.repeat(" ",t.indent*r)}function testImplicitResolving(t,r){var i,o,a;for(i=0,o=t.implicitTypes.length;i<o;i+=1){a=t.implicitTypes[i];if(a.resolve(r)){return true}}return false}function isWhitespace(t){return t===g||t===p}function isPrintable(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function isNsChar(t){return isPrintable(t)&&!isWhitespace(t)&&t!==65279&&t!==m&&t!==d}function isPlainSafe(t,r){return isPrintable(t)&&t!==65279&&t!==x&&t!==P&&t!==I&&t!==M&&t!==D&&t!==O&&(t!==b||r&&isNsChar(r))}function isPlainSafeFirst(t){return isPrintable(t)&&t!==65279&&!isWhitespace(t)&&t!==A&&t!==T&&t!==O&&t!==x&&t!==P&&t!==I&&t!==M&&t!==D&&t!==b&&t!==w&&t!==E&&t!==y&&t!==N&&t!==k&&t!==R&&t!==S&&t!==v&&t!==_&&t!==C&&t!==L}function needIndentIndicator(t){var r=/^\n* /;return r.test(t)}var B=1,H=2,W=3,G=4,U=5;function chooseScalarStyle(t,r,i,o,a){var l;var u,c;var h=false;var p=false;var m=o!==-1;var g=-1;var y=isPlainSafeFirst(t.charCodeAt(0))&&!isWhitespace(t.charCodeAt(t.length-1));if(r){for(l=0;l<t.length;l++){u=t.charCodeAt(l);if(!isPrintable(u)){return U}c=l>0?t.charCodeAt(l-1):null;y=y&&isPlainSafe(u,c)}}else{for(l=0;l<t.length;l++){u=t.charCodeAt(l);if(u===d){h=true;if(m){p=p||l-g-1>o&&t[g+1]!==" ";g=l}}else if(!isPrintable(u)){return U}c=l>0?t.charCodeAt(l-1):null;y=y&&isPlainSafe(u,c)}p=p||m&&(l-g-1>o&&t[g+1]!==" ")}if(!h&&!p){return y&&!a(t)?B:H}if(i>9&&needIndentIndicator(t)){return U}return p?G:W}function writeScalar(t,r,i,o){t.dump=function(){if(r.length===0){return"''"}if(!t.noCompatMode&&$.indexOf(r)!==-1){return"'"+r+"'"}var l=t.indent*Math.max(1,i);var u=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-l);var c=o||t.flowLevel>-1&&i>=t.flowLevel;function testAmbiguity(r){return testImplicitResolving(t,r)}switch(chooseScalarStyle(r,c,t.indent,u,testAmbiguity)){case B:return r;case H:return"'"+r.replace(/'/g,"''")+"'";case W:return"|"+blockHeader(r,t.indent)+dropEndingNewline(indentString(r,l));case G:return">"+blockHeader(r,t.indent)+dropEndingNewline(indentString(foldString(r,u),l));case U:return'"'+escapeString(r,u)+'"';default:throw new a("impossible error: invalid scalar style")}}()}function blockHeader(t,r){var i=needIndentIndicator(t)?String(r):"";var o=t[t.length-1]==="\n";var a=o&&(t[t.length-2]==="\n"||t==="\n");var l=a?"+":o?"":"-";return i+l+"\n"}function dropEndingNewline(t){return t[t.length-1]==="\n"?t.slice(0,-1):t}function foldString(t,r){var i=/(\n+)([^\n]*)/g;var o=function(){var o=t.indexOf("\n");o=o!==-1?o:t.length;i.lastIndex=o;return foldLine(t.slice(0,o),r)}();var a=t[0]==="\n"||t[0]===" ";var l;var u;while(u=i.exec(t)){var c=u[1],h=u[2];l=h[0]===" ";o+=c+(!a&&!l&&h!==""?"\n":"")+foldLine(h,r);a=l}return o}function foldLine(t,r){if(t===""||t[0]===" ")return t;var i=/ [^ ]/g;var o;var a=0,l,u=0,c=0;var h="";while(o=i.exec(t)){c=o.index;if(c-a>r){l=u>a?u:c;h+="\n"+t.slice(a,l);a=l+1}u=c}h+="\n";if(t.length-a>r&&u>a){h+=t.slice(a,u)+"\n"+t.slice(u+1)}else{h+=t.slice(a)}return h.slice(1)}function escapeString(t){var r="";var i,o;var a;for(var l=0;l<t.length;l++){i=t.charCodeAt(l);if(i>=55296&&i<=56319){o=t.charCodeAt(l+1);if(o>=56320&&o<=57343){r+=encodeHex((i-55296)*1024+o-56320+65536);l++;continue}}a=j[i];r+=!a&&isPrintable(i)?t[l]:a||encodeHex(i)}return r}function writeFlowSequence(t,r,i){var o="",a=t.tag,l,u;for(l=0,u=i.length;l<u;l+=1){if(writeNode(t,r,i[l],false,false)){if(l!==0)o+=","+(!t.condenseFlow?" ":"");o+=t.dump}}t.tag=a;t.dump="["+o+"]"}function writeBlockSequence(t,r,i,o){var a="",l=t.tag,u,c;for(u=0,c=i.length;u<c;u+=1){if(writeNode(t,r+1,i[u],true,true)){if(!o||u!==0){a+=generateNextLine(t,r)}if(t.dump&&d===t.dump.charCodeAt(0)){a+="-"}else{a+="- "}a+=t.dump}}t.tag=l;t.dump=a||"[]"}function writeFlowMapping(t,r,i){var o="",a=t.tag,l=Object.keys(i),u,c,h,p,d;for(u=0,c=l.length;u<c;u+=1){d="";if(u!==0)d+=", ";if(t.condenseFlow)d+='"';h=l[u];p=i[h];if(!writeNode(t,r,h,false,false)){continue}if(t.dump.length>1024)d+="? ";d+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" ");if(!writeNode(t,r,p,false,false)){continue}d+=t.dump;o+=d}t.tag=a;t.dump="{"+o+"}"}function writeBlockMapping(t,r,i,o){var l="",u=t.tag,c=Object.keys(i),h,p,m,g,y,v;if(t.sortKeys===true){c.sort()}else if(typeof t.sortKeys==="function"){c.sort(t.sortKeys)}else if(t.sortKeys){throw new a("sortKeys must be a boolean or a function")}for(h=0,p=c.length;h<p;h+=1){v="";if(!o||h!==0){v+=generateNextLine(t,r)}m=c[h];g=i[m];if(!writeNode(t,r+1,m,true,true,true)){continue}y=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024;if(y){if(t.dump&&d===t.dump.charCodeAt(0)){v+="?"}else{v+="? "}}v+=t.dump;if(y){v+=generateNextLine(t,r)}if(!writeNode(t,r+1,g,true,y)){continue}if(t.dump&&d===t.dump.charCodeAt(0)){v+=":"}else{v+=": "}v+=t.dump;l+=v}t.tag=u;t.dump=l||"{}"}function detectType(t,r,i){var o,l,u,p,d,m;l=i?t.explicitTypes:t.implicitTypes;for(u=0,p=l.length;u<p;u+=1){d=l[u];if((d.instanceOf||d.predicate)&&(!d.instanceOf||typeof r==="object"&&r instanceof d.instanceOf)&&(!d.predicate||d.predicate(r))){t.tag=i?d.tag:"?";if(d.represent){m=t.styleMap[d.tag]||d.defaultStyle;if(c.call(d.represent)==="[object Function]"){o=d.represent(r,m)}else if(h.call(d.represent,m)){o=d.represent[m](r,m)}else{throw new a("!<"+d.tag+'> tag resolver accepts not "'+m+'" style')}t.dump=o}return true}}return false}function writeNode(t,r,i,o,l,u){t.tag=null;t.dump=i;if(!detectType(t,i,false)){detectType(t,i,true)}var h=c.call(t.dump);if(o){o=t.flowLevel<0||t.flowLevel>r}var p=h==="[object Object]"||h==="[object Array]",d,m;if(p){d=t.duplicates.indexOf(i);m=d!==-1}if(t.tag!==null&&t.tag!=="?"||m||t.indent!==2&&r>0){l=false}if(m&&t.usedDuplicates[d]){t.dump="*ref_"+d}else{if(p&&m&&!t.usedDuplicates[d]){t.usedDuplicates[d]=true}if(h==="[object Object]"){if(o&&Object.keys(t.dump).length!==0){writeBlockMapping(t,r,t.dump,l);if(m){t.dump="&ref_"+d+t.dump}}else{writeFlowMapping(t,r,t.dump);if(m){t.dump="&ref_"+d+" "+t.dump}}}else if(h==="[object Array]"){var g=t.noArrayIndent&&r>0?r-1:r;if(o&&t.dump.length!==0){writeBlockSequence(t,g,t.dump,l);if(m){t.dump="&ref_"+d+t.dump}}else{writeFlowSequence(t,g,t.dump);if(m){t.dump="&ref_"+d+" "+t.dump}}}else if(h==="[object String]"){if(t.tag!=="?"){writeScalar(t,t.dump,r,u)}}else{if(t.skipInvalid)return false;throw new a("unacceptable kind of an object to dump "+h)}if(t.tag!==null&&t.tag!=="?"){t.dump="!<"+t.tag+"> "+t.dump}}return true}function getDuplicateReferences(t,r){var i=[],o=[],a,l;inspectNode(t,i,o);for(a=0,l=o.length;a<l;a+=1){r.duplicates.push(i[o[a]])}r.usedDuplicates=new Array(l)}function inspectNode(t,r,i){var o,a,l;if(t!==null&&typeof t==="object"){a=r.indexOf(t);if(a!==-1){if(i.indexOf(a)===-1){i.push(a)}}else{r.push(t);if(Array.isArray(t)){for(a=0,l=t.length;a<l;a+=1){inspectNode(t[a],r,i)}}else{o=Object.keys(t);for(a=0,l=o.length;a<l;a+=1){inspectNode(t[o[a]],r,i)}}}}}function dump(t,r){r=r||{};var i=new State(r);if(!i.noRefs)getDuplicateReferences(t,i);if(writeNode(i,0,t,true,true))return i.dump+"\n";return""}function safeDump(t,r){return dump(t,o.extend({schema:u},r))}t.exports.dump=dump;t.exports.safeDump=safeDump},909:t=>{"use strict";function YAMLException(t,r){Error.call(this);this.name="YAMLException";this.reason=t;this.mark=r;this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"");if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(t){var r=this.name+": ";r+=this.reason||"(unknown reason)";if(!t&&this.mark){r+=" "+this.mark.toString()}return r};t.exports=YAMLException},3760:(t,r,i)=>{"use strict";var o=i(975);var a=i(909);var l=i(7091);var u=i(5817);var c=i(4795);var h=Object.prototype.hasOwnProperty;var p=1;var d=2;var m=3;var g=4;var y=1;var v=2;var b=3;var _=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var w=/[\x85\u2028\u2029]/;var S=/[,\[\]\{\}]/;var E=/^(?:!|!!|![a-z\-]+!)$/i;var x=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(t){return Object.prototype.toString.call(t)}function is_EOL(t){return t===10||t===13}function is_WHITE_SPACE(t){return t===9||t===32}function is_WS_OR_EOL(t){return t===9||t===32||t===10||t===13}function is_FLOW_INDICATOR(t){return t===44||t===91||t===93||t===123||t===125}function fromHexCode(t){var r;if(48<=t&&t<=57){return t-48}r=t|32;if(97<=r&&r<=102){return r-97+10}return-1}function escapedHexLen(t){if(t===120){return 2}if(t===117){return 4}if(t===85){return 8}return 0}function fromDecimalCode(t){if(48<=t&&t<=57){return t-48}return-1}function simpleEscapeSequence(t){return t===48?"\0":t===97?"":t===98?"\b":t===116?"\t":t===9?"\t":t===110?"\n":t===118?"\v":t===102?"\f":t===114?"\r":t===101?"":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function charFromCodepoint(t){if(t<=65535){return String.fromCharCode(t)}return String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var A=new Array(256);var O=new Array(256);for(var k=0;k<256;k++){A[k]=simpleEscapeSequence(k)?1:0;O[k]=simpleEscapeSequence(k)}function State(t,r){this.input=t;this.filename=r["filename"]||null;this.schema=r["schema"]||c;this.onWarning=r["onWarning"]||null;this.legacy=r["legacy"]||false;this.json=r["json"]||false;this.listener=r["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=t.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}function generateError(t,r){return new a(r,new l(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function throwError(t,r){throw generateError(t,r)}function throwWarning(t,r){if(t.onWarning){t.onWarning.call(null,generateError(t,r))}}var R={YAML:function handleYamlDirective(t,r,i){var o,a,l;if(t.version!==null){throwError(t,"duplication of %YAML directive")}if(i.length!==1){throwError(t,"YAML directive accepts exactly one argument")}o=/^([0-9]+)\.([0-9]+)$/.exec(i[0]);if(o===null){throwError(t,"ill-formed argument of the YAML directive")}a=parseInt(o[1],10);l=parseInt(o[2],10);if(a!==1){throwError(t,"unacceptable YAML version of the document")}t.version=i[0];t.checkLineBreaks=l<2;if(l!==1&&l!==2){throwWarning(t,"unsupported YAML version of the document")}},TAG:function handleTagDirective(t,r,i){var o,a;if(i.length!==2){throwError(t,"TAG directive accepts exactly two arguments")}o=i[0];a=i[1];if(!E.test(o)){throwError(t,"ill-formed tag handle (first argument) of the TAG directive")}if(h.call(t.tagMap,o)){throwError(t,'there is a previously declared suffix for "'+o+'" tag handle')}if(!x.test(a)){throwError(t,"ill-formed tag prefix (second argument) of the TAG directive")}t.tagMap[o]=a}};function captureSegment(t,r,i,o){var a,l,u,c;if(r<i){c=t.input.slice(r,i);if(o){for(a=0,l=c.length;a<l;a+=1){u=c.charCodeAt(a);if(!(u===9||32<=u&&u<=1114111)){throwError(t,"expected valid JSON character")}}}else if(_.test(c)){throwError(t,"the stream contains non-printable characters")}t.result+=c}}function mergeMappings(t,r,i,a){var l,u,c,p;if(!o.isObject(i)){throwError(t,"cannot merge mappings; the provided source object is unacceptable")}l=Object.keys(i);for(c=0,p=l.length;c<p;c+=1){u=l[c];if(!h.call(r,u)){r[u]=i[u];a[u]=true}}}function storeMappingPair(t,r,i,o,a,l,u,c){var p,d;if(Array.isArray(a)){a=Array.prototype.slice.call(a);for(p=0,d=a.length;p<d;p+=1){if(Array.isArray(a[p])){throwError(t,"nested arrays are not supported inside keys")}if(typeof a==="object"&&_class(a[p])==="[object Object]"){a[p]="[object Object]"}}}if(typeof a==="object"&&_class(a)==="[object Object]"){a="[object Object]"}a=String(a);if(r===null){r={}}if(o==="tag:yaml.org,2002:merge"){if(Array.isArray(l)){for(p=0,d=l.length;p<d;p+=1){mergeMappings(t,r,l[p],i)}}else{mergeMappings(t,r,l,i)}}else{if(!t.json&&!h.call(i,a)&&h.call(r,a)){t.line=u||t.line;t.position=c||t.position;throwError(t,"duplicated mapping key")}r[a]=l;delete i[a]}return r}function readLineBreak(t){var r;r=t.input.charCodeAt(t.position);if(r===10){t.position++}else if(r===13){t.position++;if(t.input.charCodeAt(t.position)===10){t.position++}}else{throwError(t,"a line break is expected")}t.line+=1;t.lineStart=t.position}function skipSeparationSpace(t,r,i){var o=0,a=t.input.charCodeAt(t.position);while(a!==0){while(is_WHITE_SPACE(a)){a=t.input.charCodeAt(++t.position)}if(r&&a===35){do{a=t.input.charCodeAt(++t.position)}while(a!==10&&a!==13&&a!==0)}if(is_EOL(a)){readLineBreak(t);a=t.input.charCodeAt(t.position);o++;t.lineIndent=0;while(a===32){t.lineIndent++;a=t.input.charCodeAt(++t.position)}}else{break}}if(i!==-1&&o!==0&&t.lineIndent<i){throwWarning(t,"deficient indentation")}return o}function testDocumentSeparator(t){var r=t.position,i;i=t.input.charCodeAt(r);if((i===45||i===46)&&i===t.input.charCodeAt(r+1)&&i===t.input.charCodeAt(r+2)){r+=3;i=t.input.charCodeAt(r);if(i===0||is_WS_OR_EOL(i)){return true}}return false}function writeFoldedLines(t,r){if(r===1){t.result+=" "}else if(r>1){t.result+=o.repeat("\n",r-1)}}function readPlainScalar(t,r,i){var o,a,l,u,c,h,p,d,m=t.kind,g=t.result,y;y=t.input.charCodeAt(t.position);if(is_WS_OR_EOL(y)||is_FLOW_INDICATOR(y)||y===35||y===38||y===42||y===33||y===124||y===62||y===39||y===34||y===37||y===64||y===96){return false}if(y===63||y===45){a=t.input.charCodeAt(t.position+1);if(is_WS_OR_EOL(a)||i&&is_FLOW_INDICATOR(a)){return false}}t.kind="scalar";t.result="";l=u=t.position;c=false;while(y!==0){if(y===58){a=t.input.charCodeAt(t.position+1);if(is_WS_OR_EOL(a)||i&&is_FLOW_INDICATOR(a)){break}}else if(y===35){o=t.input.charCodeAt(t.position-1);if(is_WS_OR_EOL(o)){break}}else if(t.position===t.lineStart&&testDocumentSeparator(t)||i&&is_FLOW_INDICATOR(y)){break}else if(is_EOL(y)){h=t.line;p=t.lineStart;d=t.lineIndent;skipSeparationSpace(t,false,-1);if(t.lineIndent>=r){c=true;y=t.input.charCodeAt(t.position);continue}else{t.position=u;t.line=h;t.lineStart=p;t.lineIndent=d;break}}if(c){captureSegment(t,l,u,false);writeFoldedLines(t,t.line-h);l=u=t.position;c=false}if(!is_WHITE_SPACE(y)){u=t.position+1}y=t.input.charCodeAt(++t.position)}captureSegment(t,l,u,false);if(t.result){return true}t.kind=m;t.result=g;return false}function readSingleQuotedScalar(t,r){var i,o,a;i=t.input.charCodeAt(t.position);if(i!==39){return false}t.kind="scalar";t.result="";t.position++;o=a=t.position;while((i=t.input.charCodeAt(t.position))!==0){if(i===39){captureSegment(t,o,t.position,true);i=t.input.charCodeAt(++t.position);if(i===39){o=t.position;t.position++;a=t.position}else{return true}}else if(is_EOL(i)){captureSegment(t,o,a,true);writeFoldedLines(t,skipSeparationSpace(t,false,r));o=a=t.position}else if(t.position===t.lineStart&&testDocumentSeparator(t)){throwError(t,"unexpected end of the document within a single quoted scalar")}else{t.position++;a=t.position}}throwError(t,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(t,r){var i,o,a,l,u,c;c=t.input.charCodeAt(t.position);if(c!==34){return false}t.kind="scalar";t.result="";t.position++;i=o=t.position;while((c=t.input.charCodeAt(t.position))!==0){if(c===34){captureSegment(t,i,t.position,true);t.position++;return true}else if(c===92){captureSegment(t,i,t.position,true);c=t.input.charCodeAt(++t.position);if(is_EOL(c)){skipSeparationSpace(t,false,r)}else if(c<256&&A[c]){t.result+=O[c];t.position++}else if((u=escapedHexLen(c))>0){a=u;l=0;for(;a>0;a--){c=t.input.charCodeAt(++t.position);if((u=fromHexCode(c))>=0){l=(l<<4)+u}else{throwError(t,"expected hexadecimal character")}}t.result+=charFromCodepoint(l);t.position++}else{throwError(t,"unknown escape sequence")}i=o=t.position}else if(is_EOL(c)){captureSegment(t,i,o,true);writeFoldedLines(t,skipSeparationSpace(t,false,r));i=o=t.position}else if(t.position===t.lineStart&&testDocumentSeparator(t)){throwError(t,"unexpected end of the document within a double quoted scalar")}else{t.position++;o=t.position}}throwError(t,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(t,r){var i=true,o,a=t.tag,l,u=t.anchor,c,h,d,m,g,y={},v,b,_,w;w=t.input.charCodeAt(t.position);if(w===91){h=93;g=false;l=[]}else if(w===123){h=125;g=true;l={}}else{return false}if(t.anchor!==null){t.anchorMap[t.anchor]=l}w=t.input.charCodeAt(++t.position);while(w!==0){skipSeparationSpace(t,true,r);w=t.input.charCodeAt(t.position);if(w===h){t.position++;t.tag=a;t.anchor=u;t.kind=g?"mapping":"sequence";t.result=l;return true}else if(!i){throwError(t,"missed comma between flow collection entries")}b=v=_=null;d=m=false;if(w===63){c=t.input.charCodeAt(t.position+1);if(is_WS_OR_EOL(c)){d=m=true;t.position++;skipSeparationSpace(t,true,r)}}o=t.line;composeNode(t,r,p,false,true);b=t.tag;v=t.result;skipSeparationSpace(t,true,r);w=t.input.charCodeAt(t.position);if((m||t.line===o)&&w===58){d=true;w=t.input.charCodeAt(++t.position);skipSeparationSpace(t,true,r);composeNode(t,r,p,false,true);_=t.result}if(g){storeMappingPair(t,l,y,b,v,_)}else if(d){l.push(storeMappingPair(t,null,y,b,v,_))}else{l.push(v)}skipSeparationSpace(t,true,r);w=t.input.charCodeAt(t.position);if(w===44){i=true;w=t.input.charCodeAt(++t.position)}else{i=false}}throwError(t,"unexpected end of the stream within a flow collection")}function readBlockScalar(t,r){var i,a,l=y,u=false,c=false,h=r,p=0,d=false,m,g;g=t.input.charCodeAt(t.position);if(g===124){a=false}else if(g===62){a=true}else{return false}t.kind="scalar";t.result="";while(g!==0){g=t.input.charCodeAt(++t.position);if(g===43||g===45){if(y===l){l=g===43?b:v}else{throwError(t,"repeat of a chomping mode identifier")}}else if((m=fromDecimalCode(g))>=0){if(m===0){throwError(t,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!c){h=r+m-1;c=true}else{throwError(t,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(g)){do{g=t.input.charCodeAt(++t.position)}while(is_WHITE_SPACE(g));if(g===35){do{g=t.input.charCodeAt(++t.position)}while(!is_EOL(g)&&g!==0)}}while(g!==0){readLineBreak(t);t.lineIndent=0;g=t.input.charCodeAt(t.position);while((!c||t.lineIndent<h)&&g===32){t.lineIndent++;g=t.input.charCodeAt(++t.position)}if(!c&&t.lineIndent>h){h=t.lineIndent}if(is_EOL(g)){p++;continue}if(t.lineIndent<h){if(l===b){t.result+=o.repeat("\n",u?1+p:p)}else if(l===y){if(u){t.result+="\n"}}break}if(a){if(is_WHITE_SPACE(g)){d=true;t.result+=o.repeat("\n",u?1+p:p)}else if(d){d=false;t.result+=o.repeat("\n",p+1)}else if(p===0){if(u){t.result+=" "}}else{t.result+=o.repeat("\n",p)}}else{t.result+=o.repeat("\n",u?1+p:p)}u=true;c=true;p=0;i=t.position;while(!is_EOL(g)&&g!==0){g=t.input.charCodeAt(++t.position)}captureSegment(t,i,t.position,false)}return true}function readBlockSequence(t,r){var i,o=t.tag,a=t.anchor,l=[],u,c=false,h;if(t.anchor!==null){t.anchorMap[t.anchor]=l}h=t.input.charCodeAt(t.position);while(h!==0){if(h!==45){break}u=t.input.charCodeAt(t.position+1);if(!is_WS_OR_EOL(u)){break}c=true;t.position++;if(skipSeparationSpace(t,true,-1)){if(t.lineIndent<=r){l.push(null);h=t.input.charCodeAt(t.position);continue}}i=t.line;composeNode(t,r,m,false,true);l.push(t.result);skipSeparationSpace(t,true,-1);h=t.input.charCodeAt(t.position);if((t.line===i||t.lineIndent>r)&&h!==0){throwError(t,"bad indentation of a sequence entry")}else if(t.lineIndent<r){break}}if(c){t.tag=o;t.anchor=a;t.kind="sequence";t.result=l;return true}return false}function readBlockMapping(t,r,i){var o,a,l,u,c=t.tag,h=t.anchor,p={},m={},y=null,v=null,b=null,_=false,w=false,S;if(t.anchor!==null){t.anchorMap[t.anchor]=p}S=t.input.charCodeAt(t.position);while(S!==0){o=t.input.charCodeAt(t.position+1);l=t.line;u=t.position;if((S===63||S===58)&&is_WS_OR_EOL(o)){if(S===63){if(_){storeMappingPair(t,p,m,y,v,null);y=v=b=null}w=true;_=true;a=true}else if(_){_=false;a=true}else{throwError(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line")}t.position+=1;S=o}else if(composeNode(t,i,d,false,true)){if(t.line===l){S=t.input.charCodeAt(t.position);while(is_WHITE_SPACE(S)){S=t.input.charCodeAt(++t.position)}if(S===58){S=t.input.charCodeAt(++t.position);if(!is_WS_OR_EOL(S)){throwError(t,"a whitespace character is expected after the key-value separator within a block mapping")}if(_){storeMappingPair(t,p,m,y,v,null);y=v=b=null}w=true;_=false;a=false;y=t.tag;v=t.result}else if(w){throwError(t,"can not read an implicit mapping pair; a colon is missed")}else{t.tag=c;t.anchor=h;return true}}else if(w){throwError(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}else{t.tag=c;t.anchor=h;return true}}else{break}if(t.line===l||t.lineIndent>r){if(composeNode(t,r,g,true,a)){if(_){v=t.result}else{b=t.result}}if(!_){storeMappingPair(t,p,m,y,v,b,l,u);y=v=b=null}skipSeparationSpace(t,true,-1);S=t.input.charCodeAt(t.position)}if(t.lineIndent>r&&S!==0){throwError(t,"bad indentation of a mapping entry")}else if(t.lineIndent<r){break}}if(_){storeMappingPair(t,p,m,y,v,null)}if(w){t.tag=c;t.anchor=h;t.kind="mapping";t.result=p}return w}function readTagProperty(t){var r,i=false,o=false,a,l,u;u=t.input.charCodeAt(t.position);if(u!==33)return false;if(t.tag!==null){throwError(t,"duplication of a tag property")}u=t.input.charCodeAt(++t.position);if(u===60){i=true;u=t.input.charCodeAt(++t.position)}else if(u===33){o=true;a="!!";u=t.input.charCodeAt(++t.position)}else{a="!"}r=t.position;if(i){do{u=t.input.charCodeAt(++t.position)}while(u!==0&&u!==62);if(t.position<t.length){l=t.input.slice(r,t.position);u=t.input.charCodeAt(++t.position)}else{throwError(t,"unexpected end of the stream within a verbatim tag")}}else{while(u!==0&&!is_WS_OR_EOL(u)){if(u===33){if(!o){a=t.input.slice(r-1,t.position+1);if(!E.test(a)){throwError(t,"named tag handle cannot contain such characters")}o=true;r=t.position+1}else{throwError(t,"tag suffix cannot contain exclamation marks")}}u=t.input.charCodeAt(++t.position)}l=t.input.slice(r,t.position);if(S.test(l)){throwError(t,"tag suffix cannot contain flow indicator characters")}}if(l&&!x.test(l)){throwError(t,"tag name cannot contain such characters: "+l)}if(i){t.tag=l}else if(h.call(t.tagMap,a)){t.tag=t.tagMap[a]+l}else if(a==="!"){t.tag="!"+l}else if(a==="!!"){t.tag="tag:yaml.org,2002:"+l}else{throwError(t,'undeclared tag handle "'+a+'"')}return true}function readAnchorProperty(t){var r,i;i=t.input.charCodeAt(t.position);if(i!==38)return false;if(t.anchor!==null){throwError(t,"duplication of an anchor property")}i=t.input.charCodeAt(++t.position);r=t.position;while(i!==0&&!is_WS_OR_EOL(i)&&!is_FLOW_INDICATOR(i)){i=t.input.charCodeAt(++t.position)}if(t.position===r){throwError(t,"name of an anchor node must contain at least one character")}t.anchor=t.input.slice(r,t.position);return true}function readAlias(t){var r,i,o;o=t.input.charCodeAt(t.position);if(o!==42)return false;o=t.input.charCodeAt(++t.position);r=t.position;while(o!==0&&!is_WS_OR_EOL(o)&&!is_FLOW_INDICATOR(o)){o=t.input.charCodeAt(++t.position)}if(t.position===r){throwError(t,"name of an alias node must contain at least one character")}i=t.input.slice(r,t.position);if(!h.call(t.anchorMap,i)){throwError(t,'unidentified alias "'+i+'"')}t.result=t.anchorMap[i];skipSeparationSpace(t,true,-1);return true}function composeNode(t,r,i,o,a){var l,u,c,y=1,v=false,b=false,_,w,S,E,x;if(t.listener!==null){t.listener("open",t)}t.tag=null;t.anchor=null;t.kind=null;t.result=null;l=u=c=g===i||m===i;if(o){if(skipSeparationSpace(t,true,-1)){v=true;if(t.lineIndent>r){y=1}else if(t.lineIndent===r){y=0}else if(t.lineIndent<r){y=-1}}}if(y===1){while(readTagProperty(t)||readAnchorProperty(t)){if(skipSeparationSpace(t,true,-1)){v=true;c=l;if(t.lineIndent>r){y=1}else if(t.lineIndent===r){y=0}else if(t.lineIndent<r){y=-1}}else{c=false}}}if(c){c=v||a}if(y===1||g===i){if(p===i||d===i){E=r}else{E=r+1}x=t.position-t.lineStart;if(y===1){if(c&&(readBlockSequence(t,x)||readBlockMapping(t,x,E))||readFlowCollection(t,E)){b=true}else{if(u&&readBlockScalar(t,E)||readSingleQuotedScalar(t,E)||readDoubleQuotedScalar(t,E)){b=true}else if(readAlias(t)){b=true;if(t.tag!==null||t.anchor!==null){throwError(t,"alias node should not have any properties")}}else if(readPlainScalar(t,E,p===i)){b=true;if(t.tag===null){t.tag="?"}}if(t.anchor!==null){t.anchorMap[t.anchor]=t.result}}}else if(y===0){b=c&&readBlockSequence(t,x)}}if(t.tag!==null&&t.tag!=="!"){if(t.tag==="?"){if(t.result!==null&&t.kind!=="scalar"){throwError(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"')}for(_=0,w=t.implicitTypes.length;_<w;_+=1){S=t.implicitTypes[_];if(S.resolve(t.result)){t.result=S.construct(t.result);t.tag=S.tag;if(t.anchor!==null){t.anchorMap[t.anchor]=t.result}break}}}else if(h.call(t.typeMap[t.kind||"fallback"],t.tag)){S=t.typeMap[t.kind||"fallback"][t.tag];if(t.result!==null&&S.kind!==t.kind){throwError(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+S.kind+'", not "'+t.kind+'"')}if(!S.resolve(t.result)){throwError(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}else{t.result=S.construct(t.result);if(t.anchor!==null){t.anchorMap[t.anchor]=t.result}}}else{throwError(t,"unknown tag !<"+t.tag+">")}}if(t.listener!==null){t.listener("close",t)}return t.tag!==null||t.anchor!==null||b}function readDocument(t){var r=t.position,i,o,a,l=false,u;t.version=null;t.checkLineBreaks=t.legacy;t.tagMap={};t.anchorMap={};while((u=t.input.charCodeAt(t.position))!==0){skipSeparationSpace(t,true,-1);u=t.input.charCodeAt(t.position);if(t.lineIndent>0||u!==37){break}l=true;u=t.input.charCodeAt(++t.position);i=t.position;while(u!==0&&!is_WS_OR_EOL(u)){u=t.input.charCodeAt(++t.position)}o=t.input.slice(i,t.position);a=[];if(o.length<1){throwError(t,"directive name must not be less than one character in length")}while(u!==0){while(is_WHITE_SPACE(u)){u=t.input.charCodeAt(++t.position)}if(u===35){do{u=t.input.charCodeAt(++t.position)}while(u!==0&&!is_EOL(u));break}if(is_EOL(u))break;i=t.position;while(u!==0&&!is_WS_OR_EOL(u)){u=t.input.charCodeAt(++t.position)}a.push(t.input.slice(i,t.position))}if(u!==0)readLineBreak(t);if(h.call(R,o)){R[o](t,o,a)}else{throwWarning(t,'unknown document directive "'+o+'"')}}skipSeparationSpace(t,true,-1);if(t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45){t.position+=3;skipSeparationSpace(t,true,-1)}else if(l){throwError(t,"directives end mark is expected")}composeNode(t,t.lineIndent-1,g,false,true);skipSeparationSpace(t,true,-1);if(t.checkLineBreaks&&w.test(t.input.slice(r,t.position))){throwWarning(t,"non-ASCII line breaks are interpreted as content")}t.documents.push(t.result);if(t.position===t.lineStart&&testDocumentSeparator(t)){if(t.input.charCodeAt(t.position)===46){t.position+=3;skipSeparationSpace(t,true,-1)}return}if(t.position<t.length-1){throwError(t,"end of the stream or a document separator is expected")}else{return}}function loadDocuments(t,r){t=String(t);r=r||{};if(t.length!==0){if(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13){t+="\n"}if(t.charCodeAt(0)===65279){t=t.slice(1)}}var i=new State(t,r);var o=t.indexOf("\0");if(o!==-1){i.position=o;throwError(i,"null byte is not allowed in input")}i.input+="\0";while(i.input.charCodeAt(i.position)===32){i.lineIndent+=1;i.position+=1}while(i.position<i.length-1){readDocument(i)}return i.documents}function loadAll(t,r,i){if(r!==null&&typeof r==="object"&&typeof i==="undefined"){i=r;r=null}var o=loadDocuments(t,i);if(typeof r!=="function"){return o}for(var a=0,l=o.length;a<l;a+=1){r(o[a])}}function load(t,r){var i=loadDocuments(t,r);if(i.length===0){return undefined}else if(i.length===1){return i[0]}throw new a("expected a single document in the stream, but found more")}function safeLoadAll(t,r,i){if(typeof r==="object"&&r!==null&&typeof i==="undefined"){i=r;r=null}return loadAll(t,r,o.extend({schema:u},i))}function safeLoad(t,r){return load(t,o.extend({schema:u},r))}t.exports.loadAll=loadAll;t.exports.load=load;t.exports.safeLoadAll=safeLoadAll;t.exports.safeLoad=safeLoad},7091:(t,r,i)=>{"use strict";var o=i(975);function Mark(t,r,i,o,a){this.name=t;this.buffer=r;this.position=i;this.line=o;this.column=a}Mark.prototype.getSnippet=function getSnippet(t,r){var i,a,l,u,c;if(!this.buffer)return null;t=t||4;r=r||75;i="";a=this.position;while(a>0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(a-1))===-1){a-=1;if(this.position-a>r/2-1){i=" ... ";a+=5;break}}l="";u=this.position;while(u<this.buffer.length&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(u))===-1){u+=1;if(u-this.position>r/2-1){l=" ... ";u-=5;break}}c=this.buffer.slice(a,u);return o.repeat(" ",t)+i+c+l+"\n"+o.repeat(" ",t+this.position-a+i.length)+"^"};Mark.prototype.toString=function toString(t){var r,i="";if(this.name){i+='in "'+this.name+'" '}i+="at line "+(this.line+1)+", column "+(this.column+1);if(!t){r=this.getSnippet();if(r){i+=":\n"+r}}return i};t.exports=Mark},6433:(t,r,i)=>{"use strict";var o=i(975);var a=i(909);var l=i(7457);function compileList(t,r,i){var o=[];t.include.forEach((function(t){i=compileList(t,r,i)}));t[r].forEach((function(t){i.forEach((function(r,i){if(r.tag===t.tag&&r.kind===t.kind){o.push(i)}}));i.push(t)}));return i.filter((function(t,r){return o.indexOf(r)===-1}))}function compileMap(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},r,i;function collectType(r){t[r.kind][r.tag]=t["fallback"][r.tag]=r}for(r=0,i=arguments.length;r<i;r+=1){arguments[r].forEach(collectType)}return t}function Schema(t){this.include=t.include||[];this.implicit=t.implicit||[];this.explicit=t.explicit||[];this.implicit.forEach((function(t){if(t.loadKind&&t.loadKind!=="scalar"){throw new a("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}}));this.compiledImplicit=compileList(this,"implicit",[]);this.compiledExplicit=compileList(this,"explicit",[]);this.compiledTypeMap=compileMap(this.compiledImplicit,this.compiledExplicit)}Schema.DEFAULT=null;Schema.create=function createSchema(){var t,r;switch(arguments.length){case 1:t=Schema.DEFAULT;r=arguments[0];break;case 2:t=arguments[0];r=arguments[1];break;default:throw new a("Wrong number of arguments for Schema.create function")}t=o.toArray(t);r=o.toArray(r);if(!t.every((function(t){return t instanceof Schema}))){throw new a("Specified list of super schemas (or a single Schema object) contains a non-Schema object.")}if(!r.every((function(t){return t instanceof l}))){throw new a("Specified list of YAML types (or a single Type object) contains a non-Type object.")}return new Schema({include:t,explicit:r})};t.exports=Schema},6678:(t,r,i)=>{"use strict";var o=i(6433);t.exports=new o({include:[i(9980)]})},4795:(t,r,i)=>{"use strict";var o=i(6433);t.exports=o.DEFAULT=new o({include:[i(5817)],explicit:[i(6407),i(8230),i(2085)]})},5817:(t,r,i)=>{"use strict";var o=i(6433);t.exports=new o({include:[i(6678)],implicit:[i(5934),i(4831)],explicit:[i(3099),i(3893),i(5979),i(2086)]})},7637:(t,r,i)=>{"use strict";var o=i(6433);t.exports=new o({explicit:[i(6582),i(5319),i(650)]})},9980:(t,r,i)=>{"use strict";var o=i(6433);t.exports=new o({include:[i(7637)],implicit:[i(6357),i(4939),i(3905),i(2448)]})},7457:(t,r,i)=>{"use strict";var o=i(909);var a=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var l=["scalar","sequence","mapping"];function compileStyleAliases(t){var r={};if(t!==null){Object.keys(t).forEach((function(i){t[i].forEach((function(t){r[String(t)]=i}))}))}return r}function Type(t,r){r=r||{};Object.keys(r).forEach((function(r){if(a.indexOf(r)===-1){throw new o('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}}));this.tag=t;this.kind=r["kind"]||null;this.resolve=r["resolve"]||function(){return true};this.construct=r["construct"]||function(t){return t};this.instanceOf=r["instanceOf"]||null;this.predicate=r["predicate"]||null;this.represent=r["represent"]||null;this.defaultStyle=r["defaultStyle"]||null;this.styleAliases=compileStyleAliases(r["styleAliases"]||null);if(l.indexOf(this.kind)===-1){throw new o('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}}t.exports=Type},3099:(t,r,i)=>{"use strict";var o;try{var a=require;o=a("buffer").Buffer}catch(t){}var l=i(7457);var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(t){if(t===null)return false;var r,i,o=0,a=t.length,l=u;for(i=0;i<a;i++){r=l.indexOf(t.charAt(i));if(r>64)continue;if(r<0)return false;o+=6}return o%8===0}function constructYamlBinary(t){var r,i,a=t.replace(/[\r\n=]/g,""),l=a.length,c=u,h=0,p=[];for(r=0;r<l;r++){if(r%4===0&&r){p.push(h>>16&255);p.push(h>>8&255);p.push(h&255)}h=h<<6|c.indexOf(a.charAt(r))}i=l%4*6;if(i===0){p.push(h>>16&255);p.push(h>>8&255);p.push(h&255)}else if(i===18){p.push(h>>10&255);p.push(h>>2&255)}else if(i===12){p.push(h>>4&255)}if(o){return o.from?o.from(p):new o(p)}return p}function representYamlBinary(t){var r="",i=0,o,a,l=t.length,c=u;for(o=0;o<l;o++){if(o%3===0&&o){r+=c[i>>18&63];r+=c[i>>12&63];r+=c[i>>6&63];r+=c[i&63]}i=(i<<8)+t[o]}a=l%3;if(a===0){r+=c[i>>18&63];r+=c[i>>12&63];r+=c[i>>6&63];r+=c[i&63]}else if(a===2){r+=c[i>>10&63];r+=c[i>>4&63];r+=c[i<<2&63];r+=c[64]}else if(a===1){r+=c[i>>2&63];r+=c[i<<4&63];r+=c[64];r+=c[64]}return r}function isBinary(t){return o&&o.isBuffer(t)}t.exports=new l("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},4939:(t,r,i)=>{"use strict";var o=i(7457);function resolveYamlBoolean(t){if(t===null)return false;var r=t.length;return r===4&&(t==="true"||t==="True"||t==="TRUE")||r===5&&(t==="false"||t==="False"||t==="FALSE")}function constructYamlBoolean(t){return t==="true"||t==="True"||t==="TRUE"}function isBoolean(t){return Object.prototype.toString.call(t)==="[object Boolean]"}t.exports=new o("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})},2448:(t,r,i)=>{"use strict";var o=i(975);var a=i(7457);var l=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(t){if(t===null)return false;if(!l.test(t)||t[t.length-1]==="_"){return false}return true}function constructYamlFloat(t){var r,i,o,a;r=t.replace(/_/g,"").toLowerCase();i=r[0]==="-"?-1:1;a=[];if("+-".indexOf(r[0])>=0){r=r.slice(1)}if(r===".inf"){return i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(r===".nan"){return NaN}else if(r.indexOf(":")>=0){r.split(":").forEach((function(t){a.unshift(parseFloat(t,10))}));r=0;o=1;a.forEach((function(t){r+=t*o;o*=60}));return i*r}return i*parseFloat(r,10)}var u=/^[-+]?[0-9]+e/;function representYamlFloat(t,r){var i;if(isNaN(t)){switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===t){switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===t){switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(o.isNegativeZero(t)){return"-0.0"}i=t.toString(10);return u.test(i)?i.replace("e",".e"):i}function isFloat(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||o.isNegativeZero(t))}t.exports=new a("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},3905:(t,r,i)=>{"use strict";var o=i(975);var a=i(7457);function isHexCode(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function isOctCode(t){return 48<=t&&t<=55}function isDecCode(t){return 48<=t&&t<=57}function resolveYamlInteger(t){if(t===null)return false;var r=t.length,i=0,o=false,a;if(!r)return false;a=t[i];if(a==="-"||a==="+"){a=t[++i]}if(a==="0"){if(i+1===r)return true;a=t[++i];if(a==="b"){i++;for(;i<r;i++){a=t[i];if(a==="_")continue;if(a!=="0"&&a!=="1")return false;o=true}return o&&a!=="_"}if(a==="x"){i++;for(;i<r;i++){a=t[i];if(a==="_")continue;if(!isHexCode(t.charCodeAt(i)))return false;o=true}return o&&a!=="_"}for(;i<r;i++){a=t[i];if(a==="_")continue;if(!isOctCode(t.charCodeAt(i)))return false;o=true}return o&&a!=="_"}if(a==="_")return false;for(;i<r;i++){a=t[i];if(a==="_")continue;if(a===":")break;if(!isDecCode(t.charCodeAt(i))){return false}o=true}if(!o||a==="_")return false;if(a!==":")return true;return/^(:[0-5]?[0-9])+$/.test(t.slice(i))}function constructYamlInteger(t){var r=t,i=1,o,a,l=[];if(r.indexOf("_")!==-1){r=r.replace(/_/g,"")}o=r[0];if(o==="-"||o==="+"){if(o==="-")i=-1;r=r.slice(1);o=r[0]}if(r==="0")return 0;if(o==="0"){if(r[1]==="b")return i*parseInt(r.slice(2),2);if(r[1]==="x")return i*parseInt(r,16);return i*parseInt(r,8)}if(r.indexOf(":")!==-1){r.split(":").forEach((function(t){l.unshift(parseInt(t,10))}));r=0;a=1;l.forEach((function(t){r+=t*a;a*=60}));return i*r}return i*parseInt(r,10)}function isInteger(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1===0&&!o.isNegativeZero(t))}t.exports=new a("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0"+t.toString(8):"-0"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},2085:(t,r,i)=>{"use strict";var o;try{var a=require;o=a("esprima")}catch(t){if(typeof window!=="undefined")o=window.esprima}var l=i(7457);function resolveJavascriptFunction(t){if(t===null)return false;try{var r="("+t+")",i=o.parse(r,{range:true});if(i.type!=="Program"||i.body.length!==1||i.body[0].type!=="ExpressionStatement"||i.body[0].expression.type!=="ArrowFunctionExpression"&&i.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(t){return false}}function constructJavascriptFunction(t){var r="("+t+")",i=o.parse(r,{range:true}),a=[],l;if(i.type!=="Program"||i.body.length!==1||i.body[0].type!=="ExpressionStatement"||i.body[0].expression.type!=="ArrowFunctionExpression"&&i.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}i.body[0].expression.params.forEach((function(t){a.push(t.name)}));l=i.body[0].expression.body.range;if(i.body[0].expression.body.type==="BlockStatement"){return new Function(a,r.slice(l[0]+1,l[1]-1))}return new Function(a,"return "+r.slice(l[0],l[1]))}function representJavascriptFunction(t){return t.toString()}function isFunction(t){return Object.prototype.toString.call(t)==="[object Function]"}t.exports=new l("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},8230:(t,r,i)=>{"use strict";var o=i(7457);function resolveJavascriptRegExp(t){if(t===null)return false;if(t.length===0)return false;var r=t,i=/\/([gim]*)$/.exec(t),o="";if(r[0]==="/"){if(i)o=i[1];if(o.length>3)return false;if(r[r.length-o.length-1]!=="/")return false}return true}function constructJavascriptRegExp(t){var r=t,i=/\/([gim]*)$/.exec(t),o="";if(r[0]==="/"){if(i)o=i[1];r=r.slice(1,r.length-o.length-1)}return new RegExp(r,o)}function representJavascriptRegExp(t){var r="/"+t.source+"/";if(t.global)r+="g";if(t.multiline)r+="m";if(t.ignoreCase)r+="i";return r}function isRegExp(t){return Object.prototype.toString.call(t)==="[object RegExp]"}t.exports=new o("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},6407:(t,r,i)=>{"use strict";var o=i(7457);function resolveJavascriptUndefined(){return true}function constructJavascriptUndefined(){return undefined}function representJavascriptUndefined(){return""}function isUndefined(t){return typeof t==="undefined"}t.exports=new o("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined})},650:(t,r,i)=>{"use strict";var o=i(7457);t.exports=new o("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})},4831:(t,r,i)=>{"use strict";var o=i(7457);function resolveYamlMerge(t){return t==="<<"||t===null}t.exports=new o("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},6357:(t,r,i)=>{"use strict";var o=i(7457);function resolveYamlNull(t){if(t===null)return true;var r=t.length;return r===1&&t==="~"||r===4&&(t==="null"||t==="Null"||t==="NULL")}function constructYamlNull(){return null}function isNull(t){return t===null}t.exports=new o("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},3893:(t,r,i)=>{"use strict";var o=i(7457);var a=Object.prototype.hasOwnProperty;var l=Object.prototype.toString;function resolveYamlOmap(t){if(t===null)return true;var r=[],i,o,u,c,h,p=t;for(i=0,o=p.length;i<o;i+=1){u=p[i];h=false;if(l.call(u)!=="[object Object]")return false;for(c in u){if(a.call(u,c)){if(!h)h=true;else return false}}if(!h)return false;if(r.indexOf(c)===-1)r.push(c);else return false}return true}function constructYamlOmap(t){return t!==null?t:[]}t.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap})},5979:(t,r,i)=>{"use strict";var o=i(7457);var a=Object.prototype.toString;function resolveYamlPairs(t){if(t===null)return true;var r,i,o,l,u,c=t;u=new Array(c.length);for(r=0,i=c.length;r<i;r+=1){o=c[r];if(a.call(o)!=="[object Object]")return false;l=Object.keys(o);if(l.length!==1)return false;u[r]=[l[0],o[l[0]]]}return true}function constructYamlPairs(t){if(t===null)return[];var r,i,o,a,l,u=t;l=new Array(u.length);for(r=0,i=u.length;r<i;r+=1){o=u[r];a=Object.keys(o);l[r]=[a[0],o[a[0]]]}return l}t.exports=new o("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs})},5319:(t,r,i)=>{"use strict";var o=i(7457);t.exports=new o("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})},2086:(t,r,i)=>{"use strict";var o=i(7457);var a=Object.prototype.hasOwnProperty;function resolveYamlSet(t){if(t===null)return true;var r,i=t;for(r in i){if(a.call(i,r)){if(i[r]!==null)return false}}return true}function constructYamlSet(t){return t!==null?t:{}}t.exports=new o("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},6582:(t,r,i)=>{"use strict";var o=i(7457);t.exports=new o("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})},5934:(t,r,i)=>{"use strict";var o=i(7457);var a=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var l=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(t){if(t===null)return false;if(a.exec(t)!==null)return true;if(l.exec(t)!==null)return true;return false}function constructYamlTimestamp(t){var r,i,o,u,c,h,p,d=0,m=null,g,y,v;r=a.exec(t);if(r===null)r=l.exec(t);if(r===null)throw new Error("Date resolve error");i=+r[1];o=+r[2]-1;u=+r[3];if(!r[4]){return new Date(Date.UTC(i,o,u))}c=+r[4];h=+r[5];p=+r[6];if(r[7]){d=r[7].slice(0,3);while(d.length<3){d+="0"}d=+d}if(r[9]){g=+r[10];y=+(r[11]||0);m=(g*60+y)*6e4;if(r[9]==="-")m=-m}v=new Date(Date.UTC(i,o,u,c,h,p,d));if(m)v.setTime(v.getTime()-m);return v}function representYamlTimestamp(t){return t.toISOString()}t.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},4824:t=>{var r=Object.prototype.toString;t.exports=function kindOf(t){if(t===void 0)return"undefined";if(t===null)return"null";var i=typeof t;if(i==="boolean")return"boolean";if(i==="string")return"string";if(i==="number")return"number";if(i==="symbol")return"symbol";if(i==="function"){return isGeneratorFn(t)?"generatorfunction":"function"}if(isArray(t))return"array";if(isBuffer(t))return"buffer";if(isArguments(t))return"arguments";if(isDate(t))return"date";if(isError(t))return"error";if(isRegexp(t))return"regexp";switch(ctorName(t)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(isGeneratorObj(t)){return"generator"}i=r.call(t);switch(i){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return i.slice(8,-1).toLowerCase().replace(/\s/g,"")};function ctorName(t){return typeof t.constructor==="function"?t.constructor.name:null}function isArray(t){if(Array.isArray)return Array.isArray(t);return t instanceof Array}function isError(t){return t instanceof Error||typeof t.message==="string"&&t.constructor&&typeof t.constructor.stackTraceLimit==="number"}function isDate(t){if(t instanceof Date)return true;return typeof t.toDateString==="function"&&typeof t.getDate==="function"&&typeof t.setDate==="function"}function isRegexp(t){if(t instanceof RegExp)return true;return typeof t.flags==="string"&&typeof t.ignoreCase==="boolean"&&typeof t.multiline==="boolean"&&typeof t.global==="boolean"}function isGeneratorFn(t,r){return ctorName(t)==="GeneratorFunction"}function isGeneratorObj(t){return typeof t.throw==="function"&&typeof t.return==="function"&&typeof t.next==="function"}function isArguments(t){try{if(typeof t.length==="number"&&typeof t.callee==="function"){return true}}catch(t){if(t.message.indexOf("callee")!==-1){return true}}return false}function isBuffer(t){if(t.constructor&&typeof t.constructor.isBuffer==="function"){return t.constructor.isBuffer(t)}return false}},7836:t=>{"use strict";const{FORCE_COLOR:r,NODE_DISABLE_COLORS:i,TERM:o}=process.env;const a={enabled:!i&&o!=="dumb"&&r!=="0",reset:init(0,0),bold:init(1,22),dim:init(2,22),italic:init(3,23),underline:init(4,24),inverse:init(7,27),hidden:init(8,28),strikethrough:init(9,29),black:init(30,39),red:init(31,39),green:init(32,39),yellow:init(33,39),blue:init(34,39),magenta:init(35,39),cyan:init(36,39),white:init(37,39),gray:init(90,39),grey:init(90,39),bgBlack:init(40,49),bgRed:init(41,49),bgGreen:init(42,49),bgYellow:init(43,49),bgBlue:init(44,49),bgMagenta:init(45,49),bgCyan:init(46,49),bgWhite:init(47,49)};function run(t,r){let i=0,o,a="",l="";for(;i<t.length;i++){o=t[i];a+=o.open;l+=o.close;if(r.includes(o.close)){r=r.replace(o.rgx,o.close+o.open)}}return a+r+l}function chain(t,r){let i={has:t,keys:r};i.reset=a.reset.bind(i);i.bold=a.bold.bind(i);i.dim=a.dim.bind(i);i.italic=a.italic.bind(i);i.underline=a.underline.bind(i);i.inverse=a.inverse.bind(i);i.hidden=a.hidden.bind(i);i.strikethrough=a.strikethrough.bind(i);i.black=a.black.bind(i);i.red=a.red.bind(i);i.green=a.green.bind(i);i.yellow=a.yellow.bind(i);i.blue=a.blue.bind(i);i.magenta=a.magenta.bind(i);i.cyan=a.cyan.bind(i);i.white=a.white.bind(i);i.gray=a.gray.bind(i);i.grey=a.grey.bind(i);i.bgBlack=a.bgBlack.bind(i);i.bgRed=a.bgRed.bind(i);i.bgGreen=a.bgGreen.bind(i);i.bgYellow=a.bgYellow.bind(i);i.bgBlue=a.bgBlue.bind(i);i.bgMagenta=a.bgMagenta.bind(i);i.bgCyan=a.bgCyan.bind(i);i.bgWhite=a.bgWhite.bind(i);return i}function init(t,r){let i={open:`[${t}m`,close:`[${r}m`,rgx:new RegExp(`\\x1b\\[${r}m`,"g")};return function(r){if(this!==void 0&&this.has!==void 0){this.has.includes(t)||(this.has.push(t),this.keys.push(i));return r===void 0?this:a.enabled?run(this.keys,r+""):r+""}return r===void 0?chain([t],[i]):a.enabled?run([i],r+""):r+""}}t.exports=a},9544:(t,r,i)=>{var o=i(3837);var a=i(4088);t.exports={Readable:Readable,Writable:Writable};o.inherits(Readable,a);o.inherits(Writable,a);function beforeFirstCall(t,r,i){t[r]=function(){delete t[r];i.apply(this,arguments);return this[r].apply(this,arguments)}}function Readable(t,r){if(!(this instanceof Readable))return new Readable(t,r);a.call(this,r);beforeFirstCall(this,"_read",(function(){var i=t.call(this,r);var o=this.emit.bind(this,"error");i.on("error",o);i.pipe(this)}));this.emit("readable")}function Writable(t,r){if(!(this instanceof Writable))return new Writable(t,r);a.call(this,r);beforeFirstCall(this,"_write",(function(){var i=t.call(this,r);var o=this.emit.bind(this,"error");i.on("error",o);this.pipe(i)}));this.emit("writable")}},9297:t=>{var r=9007199254740991;var i="[object Arguments]",o="[object Function]",a="[object GeneratorFunction]";var l=/^(?:0|[1-9]\d*)$/;function apply(t,r,i){switch(i.length){case 0:return t.call(r);case 1:return t.call(r,i[0]);case 2:return t.call(r,i[0],i[1]);case 3:return t.call(r,i[0],i[1],i[2])}return t.apply(r,i)}function baseTimes(t,r){var i=-1,o=Array(t);while(++i<t){o[i]=r(i)}return o}var u=Object.prototype;var c=u.hasOwnProperty;var h=u.toString;var p=u.propertyIsEnumerable;var d=Math.max;function arrayLikeKeys(t,r){var i=m(t)||isArguments(t)?baseTimes(t.length,String):[];var o=i.length,a=!!o;for(var l in t){if((r||c.call(t,l))&&!(a&&(l=="length"||isIndex(l,o)))){i.push(l)}}return i}function assignInDefaults(t,r,i,o){if(t===undefined||eq(t,u[i])&&!c.call(o,i)){return r}return t}function assignValue(t,r,i){var o=t[r];if(!(c.call(t,r)&&eq(o,i))||i===undefined&&!(r in t)){t[r]=i}}function baseKeysIn(t){if(!isObject(t)){return nativeKeysIn(t)}var r=isPrototype(t),i=[];for(var o in t){if(!(o=="constructor"&&(r||!c.call(t,o)))){i.push(o)}}return i}function baseRest(t,r){r=d(r===undefined?t.length-1:r,0);return function(){var i=arguments,o=-1,a=d(i.length-r,0),l=Array(a);while(++o<a){l[o]=i[r+o]}o=-1;var u=Array(r+1);while(++o<r){u[o]=i[o]}u[r]=l;return apply(t,this,u)}}function copyObject(t,r,i,o){i||(i={});var a=-1,l=r.length;while(++a<l){var u=r[a];var c=o?o(i[u],t[u],u,i,t):undefined;assignValue(i,u,c===undefined?t[u]:c)}return i}function createAssigner(t){return baseRest((function(r,i){var o=-1,a=i.length,l=a>1?i[a-1]:undefined,u=a>2?i[2]:undefined;l=t.length>3&&typeof l=="function"?(a--,l):undefined;if(u&&isIterateeCall(i[0],i[1],u)){l=a<3?undefined:l;a=1}r=Object(r);while(++o<a){var c=i[o];if(c){t(r,c,o,l)}}return r}))}function isIndex(t,i){i=i==null?r:i;return!!i&&(typeof t=="number"||l.test(t))&&(t>-1&&t%1==0&&t<i)}function isIterateeCall(t,r,i){if(!isObject(i)){return false}var o=typeof r;if(o=="number"?isArrayLike(i)&&isIndex(r,i.length):o=="string"&&r in i){return eq(i[r],t)}return false}function isPrototype(t){var r=t&&t.constructor,i=typeof r=="function"&&r.prototype||u;return t===i}function nativeKeysIn(t){var r=[];if(t!=null){for(var i in Object(t)){r.push(i)}}return r}function eq(t,r){return t===r||t!==t&&r!==r}function isArguments(t){return isArrayLikeObject(t)&&c.call(t,"callee")&&(!p.call(t,"callee")||h.call(t)==i)}var m=Array.isArray;function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}function isArrayLikeObject(t){return isObjectLike(t)&&isArrayLike(t)}function isFunction(t){var r=isObject(t)?h.call(t):"";return r==o||r==a}function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=r}function isObject(t){var r=typeof t;return!!t&&(r=="object"||r=="function")}function isObjectLike(t){return!!t&&typeof t=="object"}var g=createAssigner((function(t,r,i,o){copyObject(r,keysIn(r),t,o)}));var y=baseRest((function(t){t.push(undefined,assignInDefaults);return apply(g,undefined,t)}));function keysIn(t){return isArrayLike(t)?arrayLikeKeys(t,true):baseKeysIn(t)}t.exports=y},7843:t=>{var r=200;var i="__lodash_hash_undefined__";var o=9007199254740991;var a="[object Arguments]",l="[object Function]",u="[object GeneratorFunction]";var c=/[\\^$.*+?()[\]{}|]/g;var h=/^\[object .+?Constructor\]$/;var p=typeof global=="object"&&global&&global.Object===Object&&global;var d=typeof self=="object"&&self&&self.Object===Object&&self;var m=p||d||Function("return this")();function apply(t,r,i){switch(i.length){case 0:return t.call(r);case 1:return t.call(r,i[0]);case 2:return t.call(r,i[0],i[1]);case 3:return t.call(r,i[0],i[1],i[2])}return t.apply(r,i)}function arrayIncludes(t,r){var i=t?t.length:0;return!!i&&baseIndexOf(t,r,0)>-1}function arrayIncludesWith(t,r,i){var o=-1,a=t?t.length:0;while(++o<a){if(i(r,t[o])){return true}}return false}function arrayMap(t,r){var i=-1,o=t?t.length:0,a=Array(o);while(++i<o){a[i]=r(t[i],i,t)}return a}function arrayPush(t,r){var i=-1,o=r.length,a=t.length;while(++i<o){t[a+i]=r[i]}return t}function baseFindIndex(t,r,i,o){var a=t.length,l=i+(o?1:-1);while(o?l--:++l<a){if(r(t[l],l,t)){return l}}return-1}function baseIndexOf(t,r,i){if(r!==r){return baseFindIndex(t,baseIsNaN,i)}var o=i-1,a=t.length;while(++o<a){if(t[o]===r){return o}}return-1}function baseIsNaN(t){return t!==t}function baseUnary(t){return function(r){return t(r)}}function cacheHas(t,r){return t.has(r)}function getValue(t,r){return t==null?undefined:t[r]}function isHostObject(t){var r=false;if(t!=null&&typeof t.toString!="function"){try{r=!!(t+"")}catch(t){}}return r}var g=Array.prototype,y=Function.prototype,v=Object.prototype;var b=m["__core-js_shared__"];var _=function(){var t=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var w=y.toString;var S=v.hasOwnProperty;var E=v.toString;var x=RegExp("^"+w.call(S).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var A=m.Symbol,O=v.propertyIsEnumerable,k=g.splice,R=A?A.isConcatSpreadable:undefined;var T=Math.max;var C=getNative(m,"Map"),P=getNative(Object,"create");function Hash(t){var r=-1,i=t?t.length:0;this.clear();while(++r<i){var o=t[r];this.set(o[0],o[1])}}function hashClear(){this.__data__=P?P(null):{}}function hashDelete(t){return this.has(t)&&delete this.__data__[t]}function hashGet(t){var r=this.__data__;if(P){var o=r[t];return o===i?undefined:o}return S.call(r,t)?r[t]:undefined}function hashHas(t){var r=this.__data__;return P?r[t]!==undefined:S.call(r,t)}function hashSet(t,r){var o=this.__data__;o[t]=P&&r===undefined?i:r;return this}Hash.prototype.clear=hashClear;Hash.prototype["delete"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function ListCache(t){var r=-1,i=t?t.length:0;this.clear();while(++r<i){var o=t[r];this.set(o[0],o[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(t){var r=this.__data__,i=assocIndexOf(r,t);if(i<0){return false}var o=r.length-1;if(i==o){r.pop()}else{k.call(r,i,1)}return true}function listCacheGet(t){var r=this.__data__,i=assocIndexOf(r,t);return i<0?undefined:r[i][1]}function listCacheHas(t){return assocIndexOf(this.__data__,t)>-1}function listCacheSet(t,r){var i=this.__data__,o=assocIndexOf(i,t);if(o<0){i.push([t,r])}else{i[o][1]=r}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(t){var r=-1,i=t?t.length:0;this.clear();while(++r<i){var o=t[r];this.set(o[0],o[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(C||ListCache),string:new Hash}}function mapCacheDelete(t){return getMapData(this,t)["delete"](t)}function mapCacheGet(t){return getMapData(this,t).get(t)}function mapCacheHas(t){return getMapData(this,t).has(t)}function mapCacheSet(t,r){getMapData(this,t).set(t,r);return this}MapCache.prototype.clear=mapCacheClear;MapCache.prototype["delete"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;function SetCache(t){var r=-1,i=t?t.length:0;this.__data__=new MapCache;while(++r<i){this.add(t[r])}}function setCacheAdd(t){this.__data__.set(t,i);return this}function setCacheHas(t){return this.__data__.has(t)}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd;SetCache.prototype.has=setCacheHas;function assocIndexOf(t,r){var i=t.length;while(i--){if(eq(t[i][0],r)){return i}}return-1}function baseDifference(t,i,o,a){var l=-1,u=arrayIncludes,c=true,h=t.length,p=[],d=i.length;if(!h){return p}if(o){i=arrayMap(i,baseUnary(o))}if(a){u=arrayIncludesWith;c=false}else if(i.length>=r){u=cacheHas;c=false;i=new SetCache(i)}e:while(++l<h){var m=t[l],g=o?o(m):m;m=a||m!==0?m:0;if(c&&g===g){var y=d;while(y--){if(i[y]===g){continue e}}p.push(m)}else if(!u(i,g,a)){p.push(m)}}return p}function baseFlatten(t,r,i,o,a){var l=-1,u=t.length;i||(i=isFlattenable);a||(a=[]);while(++l<u){var c=t[l];if(r>0&&i(c)){if(r>1){baseFlatten(c,r-1,i,o,a)}else{arrayPush(a,c)}}else if(!o){a[a.length]=c}}return a}function baseIsNative(t){if(!isObject(t)||isMasked(t)){return false}var r=isFunction(t)||isHostObject(t)?x:h;return r.test(toSource(t))}function baseRest(t,r){r=T(r===undefined?t.length-1:r,0);return function(){var i=arguments,o=-1,a=T(i.length-r,0),l=Array(a);while(++o<a){l[o]=i[r+o]}o=-1;var u=Array(r+1);while(++o<r){u[o]=i[o]}u[r]=l;return apply(t,this,u)}}function getMapData(t,r){var i=t.__data__;return isKeyable(r)?i[typeof r=="string"?"string":"hash"]:i.map}function getNative(t,r){var i=getValue(t,r);return baseIsNative(i)?i:undefined}function isFlattenable(t){return L(t)||isArguments(t)||!!(R&&t&&t[R])}function isKeyable(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}function isMasked(t){return!!_&&_ in t}function toSource(t){if(t!=null){try{return w.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var I=baseRest((function(t,r){return isArrayLikeObject(t)?baseDifference(t,baseFlatten(r,1,isArrayLikeObject,true)):[]}));function eq(t,r){return t===r||t!==t&&r!==r}function isArguments(t){return isArrayLikeObject(t)&&S.call(t,"callee")&&(!O.call(t,"callee")||E.call(t)==a)}var L=Array.isArray;function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}function isArrayLikeObject(t){return isObjectLike(t)&&isArrayLike(t)}function isFunction(t){var r=isObject(t)?E.call(t):"";return r==l||r==u}function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=o}function isObject(t){var r=typeof t;return!!t&&(r=="object"||r=="function")}function isObjectLike(t){return!!t&&typeof t=="object"}t.exports=I},4332:t=>{var r=9007199254740991;var i="[object Arguments]",o="[object Function]",a="[object GeneratorFunction]";var l=typeof global=="object"&&global&&global.Object===Object&&global;var u=typeof self=="object"&&self&&self.Object===Object&&self;var c=l||u||Function("return this")();function arrayPush(t,r){var i=-1,o=r.length,a=t.length;while(++i<o){t[a+i]=r[i]}return t}var h=Object.prototype;var p=h.hasOwnProperty;var d=h.toString;var m=c.Symbol,g=h.propertyIsEnumerable,y=m?m.isConcatSpreadable:undefined;function baseFlatten(t,r,i,o,a){var l=-1,u=t.length;i||(i=isFlattenable);a||(a=[]);while(++l<u){var c=t[l];if(r>0&&i(c)){if(r>1){baseFlatten(c,r-1,i,o,a)}else{arrayPush(a,c)}}else if(!o){a[a.length]=c}}return a}function isFlattenable(t){return v(t)||isArguments(t)||!!(y&&t&&t[y])}function flatten(t){var r=t?t.length:0;return r?baseFlatten(t,1):[]}function isArguments(t){return isArrayLikeObject(t)&&p.call(t,"callee")&&(!g.call(t,"callee")||d.call(t)==i)}var v=Array.isArray;function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}function isArrayLikeObject(t){return isObjectLike(t)&&isArrayLike(t)}function isFunction(t){var r=isObject(t)?d.call(t):"";return r==o||r==a}function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=r}function isObject(t){var r=typeof t;return!!t&&(r=="object"||r=="function")}function isObjectLike(t){return!!t&&typeof t=="object"}t.exports=flatten},3443:t=>{var r="[object Object]";function isHostObject(t){var r=false;if(t!=null&&typeof t.toString!="function"){try{r=!!(t+"")}catch(t){}}return r}function overArg(t,r){return function(i){return t(r(i))}}var i=Function.prototype,o=Object.prototype;var a=i.toString;var l=o.hasOwnProperty;var u=a.call(Object);var c=o.toString;var h=overArg(Object.getPrototypeOf,Object);function isObjectLike(t){return!!t&&typeof t=="object"}function isPlainObject(t){if(!isObjectLike(t)||c.call(t)!=r||isHostObject(t)){return false}var i=h(t);if(i===null){return true}var o=l.call(i,"constructor")&&i.constructor;return typeof o=="function"&&o instanceof o&&a.call(o)==u}t.exports=isPlainObject},1418:t=>{var r=200;var i="__lodash_hash_undefined__";var o=1/0,a=9007199254740991;var l="[object Arguments]",u="[object Function]",c="[object GeneratorFunction]";var h=/[\\^$.*+?()[\]{}|]/g;var p=/^\[object .+?Constructor\]$/;var d=typeof global=="object"&&global&&global.Object===Object&&global;var m=typeof self=="object"&&self&&self.Object===Object&&self;var g=d||m||Function("return this")();function apply(t,r,i){switch(i.length){case 0:return t.call(r);case 1:return t.call(r,i[0]);case 2:return t.call(r,i[0],i[1]);case 3:return t.call(r,i[0],i[1],i[2])}return t.apply(r,i)}function arrayIncludes(t,r){var i=t?t.length:0;return!!i&&baseIndexOf(t,r,0)>-1}function arrayIncludesWith(t,r,i){var o=-1,a=t?t.length:0;while(++o<a){if(i(r,t[o])){return true}}return false}function arrayPush(t,r){var i=-1,o=r.length,a=t.length;while(++i<o){t[a+i]=r[i]}return t}function baseFindIndex(t,r,i,o){var a=t.length,l=i+(o?1:-1);while(o?l--:++l<a){if(r(t[l],l,t)){return l}}return-1}function baseIndexOf(t,r,i){if(r!==r){return baseFindIndex(t,baseIsNaN,i)}var o=i-1,a=t.length;while(++o<a){if(t[o]===r){return o}}return-1}function baseIsNaN(t){return t!==t}function cacheHas(t,r){return t.has(r)}function getValue(t,r){return t==null?undefined:t[r]}function isHostObject(t){var r=false;if(t!=null&&typeof t.toString!="function"){try{r=!!(t+"")}catch(t){}}return r}function setToArray(t){var r=-1,i=Array(t.size);t.forEach((function(t){i[++r]=t}));return i}var y=Array.prototype,v=Function.prototype,b=Object.prototype;var _=g["__core-js_shared__"];var w=function(){var t=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var S=v.toString;var E=b.hasOwnProperty;var x=b.toString;var A=RegExp("^"+S.call(E).replace(h,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var O=g.Symbol,k=b.propertyIsEnumerable,R=y.splice,T=O?O.isConcatSpreadable:undefined;var C=Math.max;var P=getNative(g,"Map"),I=getNative(g,"Set"),L=getNative(Object,"create");function Hash(t){var r=-1,i=t?t.length:0;this.clear();while(++r<i){var o=t[r];this.set(o[0],o[1])}}function hashClear(){this.__data__=L?L(null):{}}function hashDelete(t){return this.has(t)&&delete this.__data__[t]}function hashGet(t){var r=this.__data__;if(L){var o=r[t];return o===i?undefined:o}return E.call(r,t)?r[t]:undefined}function hashHas(t){var r=this.__data__;return L?r[t]!==undefined:E.call(r,t)}function hashSet(t,r){var o=this.__data__;o[t]=L&&r===undefined?i:r;return this}Hash.prototype.clear=hashClear;Hash.prototype["delete"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function ListCache(t){var r=-1,i=t?t.length:0;this.clear();while(++r<i){var o=t[r];this.set(o[0],o[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(t){var r=this.__data__,i=assocIndexOf(r,t);if(i<0){return false}var o=r.length-1;if(i==o){r.pop()}else{R.call(r,i,1)}return true}function listCacheGet(t){var r=this.__data__,i=assocIndexOf(r,t);return i<0?undefined:r[i][1]}function listCacheHas(t){return assocIndexOf(this.__data__,t)>-1}function listCacheSet(t,r){var i=this.__data__,o=assocIndexOf(i,t);if(o<0){i.push([t,r])}else{i[o][1]=r}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(t){var r=-1,i=t?t.length:0;this.clear();while(++r<i){var o=t[r];this.set(o[0],o[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(P||ListCache),string:new Hash}}function mapCacheDelete(t){return getMapData(this,t)["delete"](t)}function mapCacheGet(t){return getMapData(this,t).get(t)}function mapCacheHas(t){return getMapData(this,t).has(t)}function mapCacheSet(t,r){getMapData(this,t).set(t,r);return this}MapCache.prototype.clear=mapCacheClear;MapCache.prototype["delete"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;function SetCache(t){var r=-1,i=t?t.length:0;this.__data__=new MapCache;while(++r<i){this.add(t[r])}}function setCacheAdd(t){this.__data__.set(t,i);return this}function setCacheHas(t){return this.__data__.has(t)}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd;SetCache.prototype.has=setCacheHas;function assocIndexOf(t,r){var i=t.length;while(i--){if(eq(t[i][0],r)){return i}}return-1}function baseFlatten(t,r,i,o,a){var l=-1,u=t.length;i||(i=isFlattenable);a||(a=[]);while(++l<u){var c=t[l];if(r>0&&i(c)){if(r>1){baseFlatten(c,r-1,i,o,a)}else{arrayPush(a,c)}}else if(!o){a[a.length]=c}}return a}function baseIsNative(t){if(!isObject(t)||isMasked(t)){return false}var r=isFunction(t)||isHostObject(t)?A:p;return r.test(toSource(t))}function baseRest(t,r){r=C(r===undefined?t.length-1:r,0);return function(){var i=arguments,o=-1,a=C(i.length-r,0),l=Array(a);while(++o<a){l[o]=i[r+o]}o=-1;var u=Array(r+1);while(++o<r){u[o]=i[o]}u[r]=l;return apply(t,this,u)}}function baseUniq(t,i,o){var a=-1,l=arrayIncludes,u=t.length,c=true,h=[],p=h;if(o){c=false;l=arrayIncludesWith}else if(u>=r){var d=i?null:M(t);if(d){return setToArray(d)}c=false;l=cacheHas;p=new SetCache}else{p=i?[]:h}e:while(++a<u){var m=t[a],g=i?i(m):m;m=o||m!==0?m:0;if(c&&g===g){var y=p.length;while(y--){if(p[y]===g){continue e}}if(i){p.push(g)}h.push(m)}else if(!l(p,g,o)){if(p!==h){p.push(g)}h.push(m)}}return h}var M=!(I&&1/setToArray(new I([,-0]))[1]==o)?noop:function(t){return new I(t)};function getMapData(t,r){var i=t.__data__;return isKeyable(r)?i[typeof r=="string"?"string":"hash"]:i.map}function getNative(t,r){var i=getValue(t,r);return baseIsNative(i)?i:undefined}function isFlattenable(t){return D(t)||isArguments(t)||!!(T&&t&&t[T])}function isKeyable(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}function isMasked(t){return!!w&&w in t}function toSource(t){if(t!=null){try{return S.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var N=baseRest((function(t){return baseUniq(baseFlatten(t,1,isArrayLikeObject,true))}));function eq(t,r){return t===r||t!==t&&r!==r}function isArguments(t){return isArrayLikeObject(t)&&E.call(t,"callee")&&(!k.call(t,"callee")||x.call(t)==l)}var D=Array.isArray;function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}function isArrayLikeObject(t){return isObjectLike(t)&&isArrayLike(t)}function isFunction(t){var r=isObject(t)?x.call(t):"";return r==u||r==c}function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=a}function isObject(t){var r=typeof t;return!!t&&(r=="object"||r=="function")}function isObjectLike(t){return!!t&&typeof t=="object"}function noop(){}t.exports=N},5940:(t,r,i)=>{"use strict";const o=i(7147);const a=i(1017);const{promisify:l}=i(3837);const u=i(9005);const c=u.satisfies(process.version,">=10.12.0");const checkPath=t=>{if(process.platform==="win32"){const r=/[<>:"|?*]/.test(t.replace(a.parse(t).root,""));if(r){const r=new Error(`Path contains invalid characters: ${t}`);r.code="EINVAL";throw r}}};const processOptions=t=>{const r={mode:511,fs:o};return{...r,...t}};const permissionError=t=>{const r=new Error(`operation not permitted, mkdir '${t}'`);r.code="EPERM";r.errno=-4048;r.path=t;r.syscall="mkdir";return r};const makeDir=async(t,r)=>{checkPath(t);r=processOptions(r);const i=l(r.fs.mkdir);const u=l(r.fs.stat);if(c&&r.fs.mkdir===o.mkdir){const o=a.resolve(t);await i(o,{mode:r.mode,recursive:true});return o}const make=async t=>{try{await i(t,r.mode);return t}catch(r){if(r.code==="EPERM"){throw r}if(r.code==="ENOENT"){if(a.dirname(t)===t){throw permissionError(t)}if(r.message.includes("null bytes")){throw r}await make(a.dirname(t));return make(t)}try{const r=await u(t);if(!r.isDirectory()){throw new Error("The path is not a directory")}}catch(t){throw r}return t}};return make(a.resolve(t))};t.exports=makeDir;t.exports.sync=(t,r)=>{checkPath(t);r=processOptions(r);if(c&&r.fs.mkdirSync===o.mkdirSync){const i=a.resolve(t);o.mkdirSync(i,{mode:r.mode,recursive:true});return i}const make=t=>{try{r.fs.mkdirSync(t,r.mode)}catch(i){if(i.code==="EPERM"){throw i}if(i.code==="ENOENT"){if(a.dirname(t)===t){throw permissionError(t)}if(i.message.includes("null bytes")){throw i}make(a.dirname(t));return make(t)}try{if(!r.fs.statSync(t).isDirectory()){throw new Error("The path is not a directory")}}catch(t){throw i}}return t};return make(a.resolve(t))}},9117:(t,r,i)=>{"use strict";const o=i(2781);const a=o.PassThrough;const l=Array.prototype.slice;t.exports=merge2;function merge2(){const t=[];const r=l.call(arguments);let i=false;let o=r[r.length-1];if(o&&!Array.isArray(o)&&o.pipe==null){r.pop()}else{o={}}const u=o.end!==false;const c=o.pipeError===true;if(o.objectMode==null){o.objectMode=true}if(o.highWaterMark==null){o.highWaterMark=64*1024}const h=a(o);function addStream(){for(let r=0,i=arguments.length;r<i;r++){t.push(pauseStreams(arguments[r],o))}mergeStream();return this}function mergeStream(){if(i){return}i=true;let r=t.shift();if(!r){process.nextTick(endStream);return}if(!Array.isArray(r)){r=[r]}let o=r.length+1;function next(){if(--o>0){return}i=false;mergeStream()}function pipe(t){function onend(){t.removeListener("merge2UnpipeEnd",onend);t.removeListener("end",onend);if(c){t.removeListener("error",onerror)}next()}function onerror(t){h.emit("error",t)}if(t._readableState.endEmitted){return next()}t.on("merge2UnpipeEnd",onend);t.on("end",onend);if(c){t.on("error",onerror)}t.pipe(h,{end:false});t.resume()}for(let t=0;t<r.length;t++){pipe(r[t])}next()}function endStream(){i=false;h.emit("queueDrain");if(u){h.end()}}h.setMaxListeners(0);h.add=addStream;h.on("unpipe",(function(t){t.emit("merge2UnpipeEnd")}));if(r.length){addStream.apply(null,r)}return h}function pauseStreams(t,r){if(!Array.isArray(t)){if(!t._readableState&&t.pipe){t=t.pipe(a(r))}if(!t._readableState||!t.pause||!t.pipe){throw new Error("Only readable stream can be merged.")}t.pause()}else{for(let i=0,o=t.length;i<o;i++){t[i]=pauseStreams(t[i],r)}}return t}},7971:(t,r,i)=>{"use strict";const o=i(3837);const a=i(8333);const l=i(3846);const u=i(5502);const isEmptyString=t=>t===""||t==="./";const micromatch=(t,r,i)=>{r=[].concat(r);t=[].concat(t);let o=new Set;let a=new Set;let u=new Set;let c=0;let onResult=t=>{u.add(t.output);if(i&&i.onResult){i.onResult(t)}};for(let u=0;u<r.length;u++){let h=l(String(r[u]),{...i,onResult:onResult},true);let p=h.state.negated||h.state.negatedExtglob;if(p)c++;for(let r of t){let t=h(r,true);let i=p?!t.isMatch:t.isMatch;if(!i)continue;if(p){o.add(t.output)}else{o.delete(t.output);a.add(t.output)}}}let h=c===r.length?[...u]:[...a];let p=h.filter((t=>!o.has(t)));if(i&&p.length===0){if(i.failglob===true){throw new Error(`No matches found for "${r.join(", ")}"`)}if(i.nonull===true||i.nullglob===true){return i.unescape?r.map((t=>t.replace(/\\/g,""))):r}}return p};micromatch.match=micromatch;micromatch.matcher=(t,r)=>l(t,r);micromatch.isMatch=(t,r,i)=>l(r,i)(t);micromatch.any=micromatch.isMatch;micromatch.not=(t,r,i={})=>{r=[].concat(r).map(String);let o=new Set;let a=[];let onResult=t=>{if(i.onResult)i.onResult(t);a.push(t.output)};let l=micromatch(t,r,{...i,onResult:onResult});for(let t of a){if(!l.includes(t)){o.add(t)}}return[...o]};micromatch.contains=(t,r,i)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${o.inspect(t)}"`)}if(Array.isArray(r)){return r.some((r=>micromatch.contains(t,r,i)))}if(typeof r==="string"){if(isEmptyString(t)||isEmptyString(r)){return false}if(t.includes(r)||t.startsWith("./")&&t.slice(2).includes(r)){return true}}return micromatch.isMatch(t,r,{...i,contains:true})};micromatch.matchKeys=(t,r,i)=>{if(!u.isObject(t)){throw new TypeError("Expected the first argument to be an object")}let o=micromatch(Object.keys(t),r,i);let a={};for(let r of o)a[r]=t[r];return a};micromatch.some=(t,r,i)=>{let o=[].concat(t);for(let t of[].concat(r)){let r=l(String(t),i);if(o.some((t=>r(t)))){return true}}return false};micromatch.every=(t,r,i)=>{let o=[].concat(t);for(let t of[].concat(r)){let r=l(String(t),i);if(!o.every((t=>r(t)))){return false}}return true};micromatch.all=(t,r,i)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${o.inspect(t)}"`)}return[].concat(r).every((r=>l(r,i)(t)))};micromatch.capture=(t,r,i)=>{let o=u.isWindows(i);let a=l.makeRe(String(t),{...i,capture:true});let c=a.exec(o?u.toPosixSlashes(r):r);if(c){return c.slice(1).map((t=>t===void 0?"":t))}};micromatch.makeRe=(...t)=>l.makeRe(...t);micromatch.scan=(...t)=>l.scan(...t);micromatch.parse=(t,r)=>{let i=[];for(let o of[].concat(t||[])){for(let t of a(String(o),r)){i.push(l.parse(t,r))}}return i};micromatch.braces=(t,r)=>{if(typeof t!=="string")throw new TypeError("Expected a string");if(r&&r.nobrace===true||!/\{.*\}/.test(t)){return[t]}return a(t,r)};micromatch.braceExpand=(t,r)=>{if(typeof t!=="string")throw new TypeError("Expected a string");return micromatch.braces(t,{...r,expand:true})};t.exports=micromatch},1065:(t,r,i)=>{"use strict";const o=i(3837);const a=i(8333);const l=i(3846);const u=i(5502);const isEmptyString=t=>t===""||t==="./";const micromatch=(t,r,i)=>{r=[].concat(r);t=[].concat(t);let o=new Set;let a=new Set;let u=new Set;let c=0;let onResult=t=>{u.add(t.output);if(i&&i.onResult){i.onResult(t)}};for(let u=0;u<r.length;u++){let h=l(String(r[u]),{...i,onResult:onResult},true);let p=h.state.negated||h.state.negatedExtglob;if(p)c++;for(let r of t){let t=h(r,true);let i=p?!t.isMatch:t.isMatch;if(!i)continue;if(p){o.add(t.output)}else{o.delete(t.output);a.add(t.output)}}}let h=c===r.length?[...u]:[...a];let p=h.filter((t=>!o.has(t)));if(i&&p.length===0){if(i.failglob===true){throw new Error(`No matches found for "${r.join(", ")}"`)}if(i.nonull===true||i.nullglob===true){return i.unescape?r.map((t=>t.replace(/\\/g,""))):r}}return p};micromatch.match=micromatch;micromatch.matcher=(t,r)=>l(t,r);micromatch.isMatch=(t,r,i)=>l(r,i)(t);micromatch.any=micromatch.isMatch;micromatch.not=(t,r,i={})=>{r=[].concat(r).map(String);let o=new Set;let a=[];let onResult=t=>{if(i.onResult)i.onResult(t);a.push(t.output)};let l=new Set(micromatch(t,r,{...i,onResult:onResult}));for(let t of a){if(!l.has(t)){o.add(t)}}return[...o]};micromatch.contains=(t,r,i)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${o.inspect(t)}"`)}if(Array.isArray(r)){return r.some((r=>micromatch.contains(t,r,i)))}if(typeof r==="string"){if(isEmptyString(t)||isEmptyString(r)){return false}if(t.includes(r)||t.startsWith("./")&&t.slice(2).includes(r)){return true}}return micromatch.isMatch(t,r,{...i,contains:true})};micromatch.matchKeys=(t,r,i)=>{if(!u.isObject(t)){throw new TypeError("Expected the first argument to be an object")}let o=micromatch(Object.keys(t),r,i);let a={};for(let r of o)a[r]=t[r];return a};micromatch.some=(t,r,i)=>{let o=[].concat(t);for(let t of[].concat(r)){let r=l(String(t),i);if(o.some((t=>r(t)))){return true}}return false};micromatch.every=(t,r,i)=>{let o=[].concat(t);for(let t of[].concat(r)){let r=l(String(t),i);if(!o.every((t=>r(t)))){return false}}return true};micromatch.all=(t,r,i)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${o.inspect(t)}"`)}return[].concat(r).every((r=>l(r,i)(t)))};micromatch.capture=(t,r,i)=>{let o=u.isWindows(i);let a=l.makeRe(String(t),{...i,capture:true});let c=a.exec(o?u.toPosixSlashes(r):r);if(c){return c.slice(1).map((t=>t===void 0?"":t))}};micromatch.makeRe=(...t)=>l.makeRe(...t);micromatch.scan=(...t)=>l.scan(...t);micromatch.parse=(t,r)=>{let i=[];for(let o of[].concat(t||[])){for(let t of a(String(o),r)){i.push(l.parse(t,r))}}return i};micromatch.braces=(t,r)=>{if(typeof t!=="string")throw new TypeError("Expected a string");if(r&&r.nobrace===true||!/\{.*\}/.test(t)){return[t]}return a(t,r)};micromatch.braceExpand=(t,r)=>{if(typeof t!=="string")throw new TypeError("Expected a string");return micromatch.braces(t,{...r,expand:true})};t.exports=micromatch},8923:(t,r,i)=>{t.exports=minimatch;minimatch.Minimatch=Minimatch;var o=function(){try{return i(1017)}catch(t){}}()||{sep:"/"};minimatch.sep=o.sep;var a=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var l=i(4800);var u={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var c="[^/]";var h=c+"*?";var p="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var d="(?:(?!(?:\\/|^)\\.).)*?";var m=charSet("().*{}+?[]^$\\!");function charSet(t){return t.split("").reduce((function(t,r){t[r]=true;return t}),{})}var g=/\/+/;minimatch.filter=filter;function filter(t,r){r=r||{};return function(i,o,a){return minimatch(i,t,r)}}function ext(t,r){r=r||{};var i={};Object.keys(t).forEach((function(r){i[r]=t[r]}));Object.keys(r).forEach((function(t){i[t]=r[t]}));return i}minimatch.defaults=function(t){if(!t||typeof t!=="object"||!Object.keys(t).length){return minimatch}var r=minimatch;var i=function minimatch(i,o,a){return r(i,o,ext(t,a))};i.Minimatch=function Minimatch(i,o){return new r.Minimatch(i,ext(t,o))};i.Minimatch.defaults=function defaults(i){return r.defaults(ext(t,i)).Minimatch};i.filter=function filter(i,o){return r.filter(i,ext(t,o))};i.defaults=function defaults(i){return r.defaults(ext(t,i))};i.makeRe=function makeRe(i,o){return r.makeRe(i,ext(t,o))};i.braceExpand=function braceExpand(i,o){return r.braceExpand(i,ext(t,o))};i.match=function(i,o,a){return r.match(i,o,ext(t,a))};return i};Minimatch.defaults=function(t){return minimatch.defaults(t).Minimatch};function minimatch(t,r,i){assertValidPattern(r);if(!i)i={};if(!i.nocomment&&r.charAt(0)==="#"){return false}return new Minimatch(r,i).match(t)}function Minimatch(t,r){if(!(this instanceof Minimatch)){return new Minimatch(t,r)}assertValidPattern(t);if(!r)r={};t=t.trim();if(!r.allowWindowsEscape&&o.sep!=="/"){t=t.split(o.sep).join("/")}this.options=r;this.set=[];this.pattern=t;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!r.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var t=this.pattern;var r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();var i=this.globSet=this.braceExpand();if(r.debug)this.debug=function debug(){console.error.apply(console,arguments)};this.debug(this.pattern,i);i=this.globParts=i.map((function(t){return t.split(g)}));this.debug(this.pattern,i);i=i.map((function(t,r,i){return t.map(this.parse,this)}),this);this.debug(this.pattern,i);i=i.filter((function(t){return t.indexOf(false)===-1}));this.debug(this.pattern,i);this.set=i}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var t=this.pattern;var r=false;var i=this.options;var o=0;if(i.nonegate)return;for(var a=0,l=t.length;a<l&&t.charAt(a)==="!";a++){r=!r;o++}if(o)this.pattern=t.substr(o);this.negate=r}minimatch.braceExpand=function(t,r){return braceExpand(t,r)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(t,r){if(!r){if(this instanceof Minimatch){r=this.options}else{r={}}}t=typeof t==="undefined"?this.pattern:t;assertValidPattern(t);if(r.nobrace||!/\{(?:(?!\{).)*\}/.test(t)){return[t]}return l(t)}var y=1024*64;var assertValidPattern=function(t){if(typeof t!=="string"){throw new TypeError("invalid pattern")}if(t.length>y){throw new TypeError("pattern is too long")}};Minimatch.prototype.parse=parse;var v={};function parse(t,r){assertValidPattern(t);var i=this.options;if(t==="**"){if(!i.noglobstar)return a;else t="*"}if(t==="")return"";var o="";var l=!!i.nocase;var p=false;var d=[];var g=[];var y;var b=false;var _=-1;var w=-1;var S=t.charAt(0)==="."?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var E=this;function clearStateChar(){if(y){switch(y){case"*":o+=h;l=true;break;case"?":o+=c;l=true;break;default:o+="\\"+y;break}E.debug("clearStateChar %j %j",y,o);y=false}}for(var x=0,A=t.length,O;x<A&&(O=t.charAt(x));x++){this.debug("%s\t%s %s %j",t,x,o,O);if(p&&m[O]){o+="\\"+O;p=false;continue}switch(O){case"/":{return false}case"\\":clearStateChar();p=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",t,x,o,O);if(b){this.debug(" in class");if(O==="!"&&x===w+1)O="^";o+=O;continue}E.debug("call clearStateChar %j",y);clearStateChar();y=O;if(i.noext)clearStateChar();continue;case"(":if(b){o+="(";continue}if(!y){o+="\\(";continue}d.push({type:y,start:x-1,reStart:o.length,open:u[y].open,close:u[y].close});o+=y==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",y,o);y=false;continue;case")":if(b||!d.length){o+="\\)";continue}clearStateChar();l=true;var k=d.pop();o+=k.close;if(k.type==="!"){g.push(k)}k.reEnd=o.length;continue;case"|":if(b||!d.length||p){o+="\\|";p=false;continue}clearStateChar();o+="|";continue;case"[":clearStateChar();if(b){o+="\\"+O;continue}b=true;w=x;_=o.length;o+=O;continue;case"]":if(x===w+1||!b){o+="\\"+O;p=false;continue}var R=t.substring(w+1,x);try{RegExp("["+R+"]")}catch(t){var T=this.parse(R,v);o=o.substr(0,_)+"\\["+T[0]+"\\]";l=l||T[1];b=false;continue}l=true;b=false;o+=O;continue;default:clearStateChar();if(p){p=false}else if(m[O]&&!(O==="^"&&b)){o+="\\"}o+=O}}if(b){R=t.substr(w+1);T=this.parse(R,v);o=o.substr(0,_)+"\\["+T[0];l=l||T[1]}for(k=d.pop();k;k=d.pop()){var C=o.slice(k.reStart+k.open.length);this.debug("setting tail",o,k);C=C.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(t,r,i){if(!i){i="\\"}return r+r+i+"|"}));this.debug("tail=%j\n %s",C,C,k,o);var P=k.type==="*"?h:k.type==="?"?c:"\\"+k.type;l=true;o=o.slice(0,k.reStart)+P+"\\("+C}clearStateChar();if(p){o+="\\\\"}var I=false;switch(o.charAt(0)){case"[":case".":case"(":I=true}for(var L=g.length-1;L>-1;L--){var M=g[L];var N=o.slice(0,M.reStart);var D=o.slice(M.reStart,M.reEnd-8);var j=o.slice(M.reEnd-8,M.reEnd);var $=o.slice(M.reEnd);j+=$;var B=N.split("(").length-1;var H=$;for(x=0;x<B;x++){H=H.replace(/\)[+*?]?/,"")}$=H;var W="";if($===""&&r!==v){W="$"}var G=N+D+$+W+j;o=G}if(o!==""&&l){o="(?=.)"+o}if(I){o=S+o}if(r===v){return[o,l]}if(!l){return globUnescape(t)}var U=i.nocase?"i":"";try{var V=new RegExp("^"+o+"$",U)}catch(t){return new RegExp("$.")}V._glob=t;V._src=o;return V}minimatch.makeRe=function(t,r){return new Minimatch(t,r||{}).makeRe()};Minimatch.prototype.makeRe=makeRe;function makeRe(){if(this.regexp||this.regexp===false)return this.regexp;var t=this.set;if(!t.length){this.regexp=false;return this.regexp}var r=this.options;var i=r.noglobstar?h:r.dot?p:d;var o=r.nocase?"i":"";var l=t.map((function(t){return t.map((function(t){return t===a?i:typeof t==="string"?regExpEscape(t):t._src})).join("\\/")})).join("|");l="^(?:"+l+")$";if(this.negate)l="^(?!"+l+").*$";try{this.regexp=new RegExp(l,o)}catch(t){this.regexp=false}return this.regexp}minimatch.match=function(t,r,i){i=i||{};var o=new Minimatch(r,i);t=t.filter((function(t){return o.match(t)}));if(o.options.nonull&&!t.length){t.push(r)}return t};Minimatch.prototype.match=function match(t,r){if(typeof r==="undefined")r=this.partial;this.debug("match",t,this.pattern);if(this.comment)return false;if(this.empty)return t==="";if(t==="/"&&r)return true;var i=this.options;if(o.sep!=="/"){t=t.split(o.sep).join("/")}t=t.split(g);this.debug(this.pattern,"split",t);var a=this.set;this.debug(this.pattern,"set",a);var l;var u;for(u=t.length-1;u>=0;u--){l=t[u];if(l)break}for(u=0;u<a.length;u++){var c=a[u];var h=t;if(i.matchBase&&c.length===1){h=[l]}var p=this.matchOne(h,c,r);if(p){if(i.flipNegate)return true;return!this.negate}}if(i.flipNegate)return false;return this.negate};Minimatch.prototype.matchOne=function(t,r,i){var o=this.options;this.debug("matchOne",{this:this,file:t,pattern:r});this.debug("matchOne",t.length,r.length);for(var l=0,u=0,c=t.length,h=r.length;l<c&&u<h;l++,u++){this.debug("matchOne loop");var p=r[u];var d=t[l];this.debug(r,p,d);if(p===false)return false;if(p===a){this.debug("GLOBSTAR",[r,p,d]);var m=l;var g=u+1;if(g===h){this.debug("** at the end");for(;l<c;l++){if(t[l]==="."||t[l]===".."||!o.dot&&t[l].charAt(0)===".")return false}return true}while(m<c){var y=t[m];this.debug("\nglobstar while",t,m,r,g,y);if(this.matchOne(t.slice(m),r.slice(g),i)){this.debug("globstar found match!",m,c,y);return true}else{if(y==="."||y===".."||!o.dot&&y.charAt(0)==="."){this.debug("dot detected!",t,m,r,g);break}this.debug("globstar swallow a segment, and continue");m++}}if(i){this.debug("\n>>> no match, partial?",t,m,r,g);if(m===c)return true}return false}var v;if(typeof p==="string"){v=d===p;this.debug("string match",p,d,v)}else{v=d.match(p);this.debug("pattern match",p,d,v)}if(!v)return false}if(l===c&&u===h){return true}else if(l===c){return i}else if(u===h){return l===c-1&&t[l]===""}throw new Error("wtf?")};function globUnescape(t){return t.replace(/\\(.)/g,"$1")}function regExpEscape(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},1254:t=>{t.exports=function(t,r){if(!r)r={};var i={bools:{},strings:{},unknownFn:null};if(typeof r["unknown"]==="function"){i.unknownFn=r["unknown"]}if(typeof r["boolean"]==="boolean"&&r["boolean"]){i.allBools=true}else{[].concat(r["boolean"]).filter(Boolean).forEach((function(t){i.bools[t]=true}))}var o={};Object.keys(r.alias||{}).forEach((function(t){o[t]=[].concat(r.alias[t]);o[t].forEach((function(r){o[r]=[t].concat(o[t].filter((function(t){return r!==t})))}))}));[].concat(r.string).filter(Boolean).forEach((function(t){i.strings[t]=true;if(o[t]){i.strings[o[t]]=true}}));var a=r["default"]||{};var l={_:[]};Object.keys(i.bools).forEach((function(t){setArg(t,a[t]===undefined?false:a[t])}));var u=[];if(t.indexOf("--")!==-1){u=t.slice(t.indexOf("--")+1);t=t.slice(0,t.indexOf("--"))}function argDefined(t,r){return i.allBools&&/^--[^=]+$/.test(r)||i.strings[t]||i.bools[t]||o[t]}function setArg(t,r,a){if(a&&i.unknownFn&&!argDefined(t,a)){if(i.unknownFn(a)===false)return}var u=!i.strings[t]&&isNumber(r)?Number(r):r;setKey(l,t.split("."),u);(o[t]||[]).forEach((function(t){setKey(l,t.split("."),u)}))}function setKey(t,r,o){var a=t;for(var l=0;l<r.length-1;l++){var u=r[l];if(isConstructorOrProto(a,u))return;if(a[u]===undefined)a[u]={};if(a[u]===Object.prototype||a[u]===Number.prototype||a[u]===String.prototype)a[u]={};if(a[u]===Array.prototype)a[u]=[];a=a[u]}var u=r[r.length-1];if(isConstructorOrProto(a,u))return;if(a===Object.prototype||a===Number.prototype||a===String.prototype)a={};if(a===Array.prototype)a=[];if(a[u]===undefined||i.bools[u]||typeof a[u]==="boolean"){a[u]=o}else if(Array.isArray(a[u])){a[u].push(o)}else{a[u]=[a[u],o]}}function aliasIsBoolean(t){return o[t].some((function(t){return i.bools[t]}))}for(var c=0;c<t.length;c++){var h=t[c];if(/^--.+=/.test(h)){var p=h.match(/^--([^=]+)=([\s\S]*)$/);var d=p[1];var m=p[2];if(i.bools[d]){m=m!=="false"}setArg(d,m,h)}else if(/^--no-.+/.test(h)){var d=h.match(/^--no-(.+)/)[1];setArg(d,false,h)}else if(/^--.+/.test(h)){var d=h.match(/^--(.+)/)[1];var g=t[c+1];if(g!==undefined&&!/^-/.test(g)&&!i.bools[d]&&!i.allBools&&(o[d]?!aliasIsBoolean(d):true)){setArg(d,g,h);c++}else if(/^(true|false)$/.test(g)){setArg(d,g==="true",h);c++}else{setArg(d,i.strings[d]?"":true,h)}}else if(/^-[^-]+/.test(h)){var y=h.slice(1,-1).split("");var v=false;for(var b=0;b<y.length;b++){var g=h.slice(b+2);if(g==="-"){setArg(y[b],g,h);continue}if(/[A-Za-z]/.test(y[b])&&/=/.test(g)){setArg(y[b],g.split("=")[1],h);v=true;break}if(/[A-Za-z]/.test(y[b])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(g)){setArg(y[b],g,h);v=true;break}if(y[b+1]&&y[b+1].match(/\W/)){setArg(y[b],h.slice(b+2),h);v=true;break}else{setArg(y[b],i.strings[y[b]]?"":true,h)}}var d=h.slice(-1)[0];if(!v&&d!=="-"){if(t[c+1]&&!/^(-|--)[^-]/.test(t[c+1])&&!i.bools[d]&&(o[d]?!aliasIsBoolean(d):true)){setArg(d,t[c+1],h);c++}else if(t[c+1]&&/^(true|false)$/.test(t[c+1])){setArg(d,t[c+1]==="true",h);c++}else{setArg(d,i.strings[d]?"":true,h)}}}else{if(!i.unknownFn||i.unknownFn(h)!==false){l._.push(i.strings["_"]||!isNumber(h)?h:Number(h))}if(r.stopEarly){l._.push.apply(l._,t.slice(c+1));break}}}Object.keys(a).forEach((function(t){if(!hasKey(l,t.split("."))){setKey(l,t.split("."),a[t]);(o[t]||[]).forEach((function(r){setKey(l,r.split("."),a[t])}))}}));if(r["--"]){l["--"]=new Array;u.forEach((function(t){l["--"].push(t)}))}else{u.forEach((function(t){l._.push(t)}))}return l};function hasKey(t,r){var i=t;r.slice(0,-1).forEach((function(t){i=i[t]||{}}));var o=r[r.length-1];return o in i}function isNumber(t){if(typeof t==="number")return true;if(/^0x[0-9a-f]+$/i.test(t))return true;return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function isConstructorOrProto(t,r){return r==="constructor"&&typeof t[r]==="function"||r==="__proto__"}},3134:(t,r,i)=>{var o=i(3837).inherits;var NestedError=function(t,r){this.nested=r;if(t instanceof Error){r=t}else if(typeof t!=="undefined"){Object.defineProperty(this,"message",{value:t,writable:true,enumerable:false,configurable:true})}Error.captureStackTrace(this,this.constructor);var i=Object.getOwnPropertyDescriptor(this,"stack");var o=buildStackDescriptor(i,r);Object.defineProperty(this,"stack",o)};function buildStackDescriptor(t,r){if(t.get){return{get:function(){var r=t.get.call(this);return buildCombinedStacks(r,this.nested)}}}else{var i=t.value;return{value:buildCombinedStacks(i,r)}}}function buildCombinedStacks(t,r){if(r){t+="\nCaused By: "+r.stack}return t}o(NestedError,Error);NestedError.prototype.name="NestedError";t.exports=NestedError},4119:t=>{
110
+ */t.exports=function(t){if(typeof t==="number"){return t-t===0}if(typeof t==="string"&&t.trim()!==""){return Number.isFinite?Number.isFinite(+t):isFinite(+t)}return false}},1551:t=>{var r={}.toString;t.exports=Array.isArray||function(t){return r.call(t)=="[object Array]"}},7745:(t,r,i)=>{var o=i(7147);var a;if(process.platform==="win32"||global.TESTING_WINDOWS){a=i(8554)}else{a=i(7138)}t.exports=isexe;isexe.sync=sync;function isexe(t,r,i){if(typeof r==="function"){i=r;r={}}if(!i){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(i,o){isexe(t,r||{},(function(t,r){if(t){o(t)}else{i(r)}}))}))}a(t,r||{},(function(t,o){if(t){if(t.code==="EACCES"||r&&r.ignoreErrors){t=null;o=false}}i(t,o)}))}function sync(t,r){try{return a.sync(t,r||{})}catch(t){if(r&&r.ignoreErrors||t.code==="EACCES"){return false}else{throw t}}}},7138:(t,r,i)=>{t.exports=isexe;isexe.sync=sync;var o=i(7147);function isexe(t,r,i){o.stat(t,(function(t,o){i(t,t?false:checkStat(o,r))}))}function sync(t,r){return checkStat(o.statSync(t),r)}function checkStat(t,r){return t.isFile()&&checkMode(t,r)}function checkMode(t,r){var i=t.mode;var o=t.uid;var a=t.gid;var l=r.uid!==undefined?r.uid:process.getuid&&process.getuid();var u=r.gid!==undefined?r.gid:process.getgid&&process.getgid();var c=parseInt("100",8);var h=parseInt("010",8);var p=parseInt("001",8);var d=c|h;var m=i&p||i&h&&a===u||i&c&&o===l||i&d&&l===0;return m}},8554:(t,r,i)=>{t.exports=isexe;isexe.sync=sync;var o=i(7147);function checkPathExt(t,r){var i=r.pathExt!==undefined?r.pathExt:process.env.PATHEXT;if(!i){return true}i=i.split(";");if(i.indexOf("")!==-1){return true}for(var o=0;o<i.length;o++){var a=i[o].toLowerCase();if(a&&t.substr(-a.length).toLowerCase()===a){return true}}return false}function checkStat(t,r,i){if(!t.isSymbolicLink()&&!t.isFile()){return false}return checkPathExt(r,i)}function isexe(t,r,i){o.stat(t,(function(o,a){i(o,o?false:checkStat(a,t,r))}))}function sync(t,r){return checkStat(o.statSync(t),t,r)}},5585:(t,r,i)=>{"use strict";var o=i(6882);t.exports=o},6882:(t,r,i)=>{"use strict";var o=i(3760);var a=i(6642);function deprecated(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}t.exports.Type=i(7457);t.exports.Schema=i(6433);t.exports.FAILSAFE_SCHEMA=i(7637);t.exports.JSON_SCHEMA=i(9980);t.exports.CORE_SCHEMA=i(6678);t.exports.DEFAULT_SAFE_SCHEMA=i(5817);t.exports.DEFAULT_FULL_SCHEMA=i(4795);t.exports.load=o.load;t.exports.loadAll=o.loadAll;t.exports.safeLoad=o.safeLoad;t.exports.safeLoadAll=o.safeLoadAll;t.exports.dump=a.dump;t.exports.safeDump=a.safeDump;t.exports.YAMLException=i(909);t.exports.MINIMAL_SCHEMA=i(7637);t.exports.SAFE_SCHEMA=i(5817);t.exports.DEFAULT_SCHEMA=i(4795);t.exports.scan=deprecated("scan");t.exports.parse=deprecated("parse");t.exports.compose=deprecated("compose");t.exports.addConstructor=deprecated("addConstructor")},975:t=>{"use strict";function isNothing(t){return typeof t==="undefined"||t===null}function isObject(t){return typeof t==="object"&&t!==null}function toArray(t){if(Array.isArray(t))return t;else if(isNothing(t))return[];return[t]}function extend(t,r){var i,o,a,l;if(r){l=Object.keys(r);for(i=0,o=l.length;i<o;i+=1){a=l[i];t[a]=r[a]}}return t}function repeat(t,r){var i="",o;for(o=0;o<r;o+=1){i+=t}return i}function isNegativeZero(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}t.exports.isNothing=isNothing;t.exports.isObject=isObject;t.exports.toArray=toArray;t.exports.repeat=repeat;t.exports.isNegativeZero=isNegativeZero;t.exports.extend=extend},6642:(t,r,i)=>{"use strict";var o=i(975);var a=i(909);var l=i(4795);var u=i(5817);var c=Object.prototype.toString;var h=Object.prototype.hasOwnProperty;var p=9;var d=10;var m=13;var g=32;var y=33;var v=34;var b=35;var _=37;var w=38;var S=39;var E=42;var x=44;var A=45;var O=58;var k=61;var R=62;var T=63;var C=64;var P=91;var I=93;var L=96;var M=123;var N=124;var j=125;var D={};D[0]="\\0";D[7]="\\a";D[8]="\\b";D[9]="\\t";D[10]="\\n";D[11]="\\v";D[12]="\\f";D[13]="\\r";D[27]="\\e";D[34]='\\"';D[92]="\\\\";D[133]="\\N";D[160]="\\_";D[8232]="\\L";D[8233]="\\P";var $=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function compileStyleMap(t,r){var i,o,a,l,u,c,p;if(r===null)return{};i={};o=Object.keys(r);for(a=0,l=o.length;a<l;a+=1){u=o[a];c=String(r[u]);if(u.slice(0,2)==="!!"){u="tag:yaml.org,2002:"+u.slice(2)}p=t.compiledTypeMap["fallback"][u];if(p&&h.call(p.styleAliases,c)){c=p.styleAliases[c]}i[u]=c}return i}function encodeHex(t){var r,i,l;r=t.toString(16).toUpperCase();if(t<=255){i="x";l=2}else if(t<=65535){i="u";l=4}else if(t<=4294967295){i="U";l=8}else{throw new a("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+i+o.repeat("0",l-r.length)+r}function State(t){this.schema=t["schema"]||l;this.indent=Math.max(1,t["indent"]||2);this.noArrayIndent=t["noArrayIndent"]||false;this.skipInvalid=t["skipInvalid"]||false;this.flowLevel=o.isNothing(t["flowLevel"])?-1:t["flowLevel"];this.styleMap=compileStyleMap(this.schema,t["styles"]||null);this.sortKeys=t["sortKeys"]||false;this.lineWidth=t["lineWidth"]||80;this.noRefs=t["noRefs"]||false;this.noCompatMode=t["noCompatMode"]||false;this.condenseFlow=t["condenseFlow"]||false;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}function indentString(t,r){var i=o.repeat(" ",r),a=0,l=-1,u="",c,h=t.length;while(a<h){l=t.indexOf("\n",a);if(l===-1){c=t.slice(a);a=h}else{c=t.slice(a,l+1);a=l+1}if(c.length&&c!=="\n")u+=i;u+=c}return u}function generateNextLine(t,r){return"\n"+o.repeat(" ",t.indent*r)}function testImplicitResolving(t,r){var i,o,a;for(i=0,o=t.implicitTypes.length;i<o;i+=1){a=t.implicitTypes[i];if(a.resolve(r)){return true}}return false}function isWhitespace(t){return t===g||t===p}function isPrintable(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function isNsChar(t){return isPrintable(t)&&!isWhitespace(t)&&t!==65279&&t!==m&&t!==d}function isPlainSafe(t,r){return isPrintable(t)&&t!==65279&&t!==x&&t!==P&&t!==I&&t!==M&&t!==j&&t!==O&&(t!==b||r&&isNsChar(r))}function isPlainSafeFirst(t){return isPrintable(t)&&t!==65279&&!isWhitespace(t)&&t!==A&&t!==T&&t!==O&&t!==x&&t!==P&&t!==I&&t!==M&&t!==j&&t!==b&&t!==w&&t!==E&&t!==y&&t!==N&&t!==k&&t!==R&&t!==S&&t!==v&&t!==_&&t!==C&&t!==L}function needIndentIndicator(t){var r=/^\n* /;return r.test(t)}var B=1,H=2,W=3,G=4,U=5;function chooseScalarStyle(t,r,i,o,a){var l;var u,c;var h=false;var p=false;var m=o!==-1;var g=-1;var y=isPlainSafeFirst(t.charCodeAt(0))&&!isWhitespace(t.charCodeAt(t.length-1));if(r){for(l=0;l<t.length;l++){u=t.charCodeAt(l);if(!isPrintable(u)){return U}c=l>0?t.charCodeAt(l-1):null;y=y&&isPlainSafe(u,c)}}else{for(l=0;l<t.length;l++){u=t.charCodeAt(l);if(u===d){h=true;if(m){p=p||l-g-1>o&&t[g+1]!==" ";g=l}}else if(!isPrintable(u)){return U}c=l>0?t.charCodeAt(l-1):null;y=y&&isPlainSafe(u,c)}p=p||m&&(l-g-1>o&&t[g+1]!==" ")}if(!h&&!p){return y&&!a(t)?B:H}if(i>9&&needIndentIndicator(t)){return U}return p?G:W}function writeScalar(t,r,i,o){t.dump=function(){if(r.length===0){return"''"}if(!t.noCompatMode&&$.indexOf(r)!==-1){return"'"+r+"'"}var l=t.indent*Math.max(1,i);var u=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-l);var c=o||t.flowLevel>-1&&i>=t.flowLevel;function testAmbiguity(r){return testImplicitResolving(t,r)}switch(chooseScalarStyle(r,c,t.indent,u,testAmbiguity)){case B:return r;case H:return"'"+r.replace(/'/g,"''")+"'";case W:return"|"+blockHeader(r,t.indent)+dropEndingNewline(indentString(r,l));case G:return">"+blockHeader(r,t.indent)+dropEndingNewline(indentString(foldString(r,u),l));case U:return'"'+escapeString(r,u)+'"';default:throw new a("impossible error: invalid scalar style")}}()}function blockHeader(t,r){var i=needIndentIndicator(t)?String(r):"";var o=t[t.length-1]==="\n";var a=o&&(t[t.length-2]==="\n"||t==="\n");var l=a?"+":o?"":"-";return i+l+"\n"}function dropEndingNewline(t){return t[t.length-1]==="\n"?t.slice(0,-1):t}function foldString(t,r){var i=/(\n+)([^\n]*)/g;var o=function(){var o=t.indexOf("\n");o=o!==-1?o:t.length;i.lastIndex=o;return foldLine(t.slice(0,o),r)}();var a=t[0]==="\n"||t[0]===" ";var l;var u;while(u=i.exec(t)){var c=u[1],h=u[2];l=h[0]===" ";o+=c+(!a&&!l&&h!==""?"\n":"")+foldLine(h,r);a=l}return o}function foldLine(t,r){if(t===""||t[0]===" ")return t;var i=/ [^ ]/g;var o;var a=0,l,u=0,c=0;var h="";while(o=i.exec(t)){c=o.index;if(c-a>r){l=u>a?u:c;h+="\n"+t.slice(a,l);a=l+1}u=c}h+="\n";if(t.length-a>r&&u>a){h+=t.slice(a,u)+"\n"+t.slice(u+1)}else{h+=t.slice(a)}return h.slice(1)}function escapeString(t){var r="";var i,o;var a;for(var l=0;l<t.length;l++){i=t.charCodeAt(l);if(i>=55296&&i<=56319){o=t.charCodeAt(l+1);if(o>=56320&&o<=57343){r+=encodeHex((i-55296)*1024+o-56320+65536);l++;continue}}a=D[i];r+=!a&&isPrintable(i)?t[l]:a||encodeHex(i)}return r}function writeFlowSequence(t,r,i){var o="",a=t.tag,l,u;for(l=0,u=i.length;l<u;l+=1){if(writeNode(t,r,i[l],false,false)){if(l!==0)o+=","+(!t.condenseFlow?" ":"");o+=t.dump}}t.tag=a;t.dump="["+o+"]"}function writeBlockSequence(t,r,i,o){var a="",l=t.tag,u,c;for(u=0,c=i.length;u<c;u+=1){if(writeNode(t,r+1,i[u],true,true)){if(!o||u!==0){a+=generateNextLine(t,r)}if(t.dump&&d===t.dump.charCodeAt(0)){a+="-"}else{a+="- "}a+=t.dump}}t.tag=l;t.dump=a||"[]"}function writeFlowMapping(t,r,i){var o="",a=t.tag,l=Object.keys(i),u,c,h,p,d;for(u=0,c=l.length;u<c;u+=1){d="";if(u!==0)d+=", ";if(t.condenseFlow)d+='"';h=l[u];p=i[h];if(!writeNode(t,r,h,false,false)){continue}if(t.dump.length>1024)d+="? ";d+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" ");if(!writeNode(t,r,p,false,false)){continue}d+=t.dump;o+=d}t.tag=a;t.dump="{"+o+"}"}function writeBlockMapping(t,r,i,o){var l="",u=t.tag,c=Object.keys(i),h,p,m,g,y,v;if(t.sortKeys===true){c.sort()}else if(typeof t.sortKeys==="function"){c.sort(t.sortKeys)}else if(t.sortKeys){throw new a("sortKeys must be a boolean or a function")}for(h=0,p=c.length;h<p;h+=1){v="";if(!o||h!==0){v+=generateNextLine(t,r)}m=c[h];g=i[m];if(!writeNode(t,r+1,m,true,true,true)){continue}y=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024;if(y){if(t.dump&&d===t.dump.charCodeAt(0)){v+="?"}else{v+="? "}}v+=t.dump;if(y){v+=generateNextLine(t,r)}if(!writeNode(t,r+1,g,true,y)){continue}if(t.dump&&d===t.dump.charCodeAt(0)){v+=":"}else{v+=": "}v+=t.dump;l+=v}t.tag=u;t.dump=l||"{}"}function detectType(t,r,i){var o,l,u,p,d,m;l=i?t.explicitTypes:t.implicitTypes;for(u=0,p=l.length;u<p;u+=1){d=l[u];if((d.instanceOf||d.predicate)&&(!d.instanceOf||typeof r==="object"&&r instanceof d.instanceOf)&&(!d.predicate||d.predicate(r))){t.tag=i?d.tag:"?";if(d.represent){m=t.styleMap[d.tag]||d.defaultStyle;if(c.call(d.represent)==="[object Function]"){o=d.represent(r,m)}else if(h.call(d.represent,m)){o=d.represent[m](r,m)}else{throw new a("!<"+d.tag+'> tag resolver accepts not "'+m+'" style')}t.dump=o}return true}}return false}function writeNode(t,r,i,o,l,u){t.tag=null;t.dump=i;if(!detectType(t,i,false)){detectType(t,i,true)}var h=c.call(t.dump);if(o){o=t.flowLevel<0||t.flowLevel>r}var p=h==="[object Object]"||h==="[object Array]",d,m;if(p){d=t.duplicates.indexOf(i);m=d!==-1}if(t.tag!==null&&t.tag!=="?"||m||t.indent!==2&&r>0){l=false}if(m&&t.usedDuplicates[d]){t.dump="*ref_"+d}else{if(p&&m&&!t.usedDuplicates[d]){t.usedDuplicates[d]=true}if(h==="[object Object]"){if(o&&Object.keys(t.dump).length!==0){writeBlockMapping(t,r,t.dump,l);if(m){t.dump="&ref_"+d+t.dump}}else{writeFlowMapping(t,r,t.dump);if(m){t.dump="&ref_"+d+" "+t.dump}}}else if(h==="[object Array]"){var g=t.noArrayIndent&&r>0?r-1:r;if(o&&t.dump.length!==0){writeBlockSequence(t,g,t.dump,l);if(m){t.dump="&ref_"+d+t.dump}}else{writeFlowSequence(t,g,t.dump);if(m){t.dump="&ref_"+d+" "+t.dump}}}else if(h==="[object String]"){if(t.tag!=="?"){writeScalar(t,t.dump,r,u)}}else{if(t.skipInvalid)return false;throw new a("unacceptable kind of an object to dump "+h)}if(t.tag!==null&&t.tag!=="?"){t.dump="!<"+t.tag+"> "+t.dump}}return true}function getDuplicateReferences(t,r){var i=[],o=[],a,l;inspectNode(t,i,o);for(a=0,l=o.length;a<l;a+=1){r.duplicates.push(i[o[a]])}r.usedDuplicates=new Array(l)}function inspectNode(t,r,i){var o,a,l;if(t!==null&&typeof t==="object"){a=r.indexOf(t);if(a!==-1){if(i.indexOf(a)===-1){i.push(a)}}else{r.push(t);if(Array.isArray(t)){for(a=0,l=t.length;a<l;a+=1){inspectNode(t[a],r,i)}}else{o=Object.keys(t);for(a=0,l=o.length;a<l;a+=1){inspectNode(t[o[a]],r,i)}}}}}function dump(t,r){r=r||{};var i=new State(r);if(!i.noRefs)getDuplicateReferences(t,i);if(writeNode(i,0,t,true,true))return i.dump+"\n";return""}function safeDump(t,r){return dump(t,o.extend({schema:u},r))}t.exports.dump=dump;t.exports.safeDump=safeDump},909:t=>{"use strict";function YAMLException(t,r){Error.call(this);this.name="YAMLException";this.reason=t;this.mark=r;this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"");if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(t){var r=this.name+": ";r+=this.reason||"(unknown reason)";if(!t&&this.mark){r+=" "+this.mark.toString()}return r};t.exports=YAMLException},3760:(t,r,i)=>{"use strict";var o=i(975);var a=i(909);var l=i(7091);var u=i(5817);var c=i(4795);var h=Object.prototype.hasOwnProperty;var p=1;var d=2;var m=3;var g=4;var y=1;var v=2;var b=3;var _=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var w=/[\x85\u2028\u2029]/;var S=/[,\[\]\{\}]/;var E=/^(?:!|!!|![a-z\-]+!)$/i;var x=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(t){return Object.prototype.toString.call(t)}function is_EOL(t){return t===10||t===13}function is_WHITE_SPACE(t){return t===9||t===32}function is_WS_OR_EOL(t){return t===9||t===32||t===10||t===13}function is_FLOW_INDICATOR(t){return t===44||t===91||t===93||t===123||t===125}function fromHexCode(t){var r;if(48<=t&&t<=57){return t-48}r=t|32;if(97<=r&&r<=102){return r-97+10}return-1}function escapedHexLen(t){if(t===120){return 2}if(t===117){return 4}if(t===85){return 8}return 0}function fromDecimalCode(t){if(48<=t&&t<=57){return t-48}return-1}function simpleEscapeSequence(t){return t===48?"\0":t===97?"":t===98?"\b":t===116?"\t":t===9?"\t":t===110?"\n":t===118?"\v":t===102?"\f":t===114?"\r":t===101?"":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function charFromCodepoint(t){if(t<=65535){return String.fromCharCode(t)}return String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var A=new Array(256);var O=new Array(256);for(var k=0;k<256;k++){A[k]=simpleEscapeSequence(k)?1:0;O[k]=simpleEscapeSequence(k)}function State(t,r){this.input=t;this.filename=r["filename"]||null;this.schema=r["schema"]||c;this.onWarning=r["onWarning"]||null;this.legacy=r["legacy"]||false;this.json=r["json"]||false;this.listener=r["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=t.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}function generateError(t,r){return new a(r,new l(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function throwError(t,r){throw generateError(t,r)}function throwWarning(t,r){if(t.onWarning){t.onWarning.call(null,generateError(t,r))}}var R={YAML:function handleYamlDirective(t,r,i){var o,a,l;if(t.version!==null){throwError(t,"duplication of %YAML directive")}if(i.length!==1){throwError(t,"YAML directive accepts exactly one argument")}o=/^([0-9]+)\.([0-9]+)$/.exec(i[0]);if(o===null){throwError(t,"ill-formed argument of the YAML directive")}a=parseInt(o[1],10);l=parseInt(o[2],10);if(a!==1){throwError(t,"unacceptable YAML version of the document")}t.version=i[0];t.checkLineBreaks=l<2;if(l!==1&&l!==2){throwWarning(t,"unsupported YAML version of the document")}},TAG:function handleTagDirective(t,r,i){var o,a;if(i.length!==2){throwError(t,"TAG directive accepts exactly two arguments")}o=i[0];a=i[1];if(!E.test(o)){throwError(t,"ill-formed tag handle (first argument) of the TAG directive")}if(h.call(t.tagMap,o)){throwError(t,'there is a previously declared suffix for "'+o+'" tag handle')}if(!x.test(a)){throwError(t,"ill-formed tag prefix (second argument) of the TAG directive")}t.tagMap[o]=a}};function captureSegment(t,r,i,o){var a,l,u,c;if(r<i){c=t.input.slice(r,i);if(o){for(a=0,l=c.length;a<l;a+=1){u=c.charCodeAt(a);if(!(u===9||32<=u&&u<=1114111)){throwError(t,"expected valid JSON character")}}}else if(_.test(c)){throwError(t,"the stream contains non-printable characters")}t.result+=c}}function mergeMappings(t,r,i,a){var l,u,c,p;if(!o.isObject(i)){throwError(t,"cannot merge mappings; the provided source object is unacceptable")}l=Object.keys(i);for(c=0,p=l.length;c<p;c+=1){u=l[c];if(!h.call(r,u)){r[u]=i[u];a[u]=true}}}function storeMappingPair(t,r,i,o,a,l,u,c){var p,d;if(Array.isArray(a)){a=Array.prototype.slice.call(a);for(p=0,d=a.length;p<d;p+=1){if(Array.isArray(a[p])){throwError(t,"nested arrays are not supported inside keys")}if(typeof a==="object"&&_class(a[p])==="[object Object]"){a[p]="[object Object]"}}}if(typeof a==="object"&&_class(a)==="[object Object]"){a="[object Object]"}a=String(a);if(r===null){r={}}if(o==="tag:yaml.org,2002:merge"){if(Array.isArray(l)){for(p=0,d=l.length;p<d;p+=1){mergeMappings(t,r,l[p],i)}}else{mergeMappings(t,r,l,i)}}else{if(!t.json&&!h.call(i,a)&&h.call(r,a)){t.line=u||t.line;t.position=c||t.position;throwError(t,"duplicated mapping key")}r[a]=l;delete i[a]}return r}function readLineBreak(t){var r;r=t.input.charCodeAt(t.position);if(r===10){t.position++}else if(r===13){t.position++;if(t.input.charCodeAt(t.position)===10){t.position++}}else{throwError(t,"a line break is expected")}t.line+=1;t.lineStart=t.position}function skipSeparationSpace(t,r,i){var o=0,a=t.input.charCodeAt(t.position);while(a!==0){while(is_WHITE_SPACE(a)){a=t.input.charCodeAt(++t.position)}if(r&&a===35){do{a=t.input.charCodeAt(++t.position)}while(a!==10&&a!==13&&a!==0)}if(is_EOL(a)){readLineBreak(t);a=t.input.charCodeAt(t.position);o++;t.lineIndent=0;while(a===32){t.lineIndent++;a=t.input.charCodeAt(++t.position)}}else{break}}if(i!==-1&&o!==0&&t.lineIndent<i){throwWarning(t,"deficient indentation")}return o}function testDocumentSeparator(t){var r=t.position,i;i=t.input.charCodeAt(r);if((i===45||i===46)&&i===t.input.charCodeAt(r+1)&&i===t.input.charCodeAt(r+2)){r+=3;i=t.input.charCodeAt(r);if(i===0||is_WS_OR_EOL(i)){return true}}return false}function writeFoldedLines(t,r){if(r===1){t.result+=" "}else if(r>1){t.result+=o.repeat("\n",r-1)}}function readPlainScalar(t,r,i){var o,a,l,u,c,h,p,d,m=t.kind,g=t.result,y;y=t.input.charCodeAt(t.position);if(is_WS_OR_EOL(y)||is_FLOW_INDICATOR(y)||y===35||y===38||y===42||y===33||y===124||y===62||y===39||y===34||y===37||y===64||y===96){return false}if(y===63||y===45){a=t.input.charCodeAt(t.position+1);if(is_WS_OR_EOL(a)||i&&is_FLOW_INDICATOR(a)){return false}}t.kind="scalar";t.result="";l=u=t.position;c=false;while(y!==0){if(y===58){a=t.input.charCodeAt(t.position+1);if(is_WS_OR_EOL(a)||i&&is_FLOW_INDICATOR(a)){break}}else if(y===35){o=t.input.charCodeAt(t.position-1);if(is_WS_OR_EOL(o)){break}}else if(t.position===t.lineStart&&testDocumentSeparator(t)||i&&is_FLOW_INDICATOR(y)){break}else if(is_EOL(y)){h=t.line;p=t.lineStart;d=t.lineIndent;skipSeparationSpace(t,false,-1);if(t.lineIndent>=r){c=true;y=t.input.charCodeAt(t.position);continue}else{t.position=u;t.line=h;t.lineStart=p;t.lineIndent=d;break}}if(c){captureSegment(t,l,u,false);writeFoldedLines(t,t.line-h);l=u=t.position;c=false}if(!is_WHITE_SPACE(y)){u=t.position+1}y=t.input.charCodeAt(++t.position)}captureSegment(t,l,u,false);if(t.result){return true}t.kind=m;t.result=g;return false}function readSingleQuotedScalar(t,r){var i,o,a;i=t.input.charCodeAt(t.position);if(i!==39){return false}t.kind="scalar";t.result="";t.position++;o=a=t.position;while((i=t.input.charCodeAt(t.position))!==0){if(i===39){captureSegment(t,o,t.position,true);i=t.input.charCodeAt(++t.position);if(i===39){o=t.position;t.position++;a=t.position}else{return true}}else if(is_EOL(i)){captureSegment(t,o,a,true);writeFoldedLines(t,skipSeparationSpace(t,false,r));o=a=t.position}else if(t.position===t.lineStart&&testDocumentSeparator(t)){throwError(t,"unexpected end of the document within a single quoted scalar")}else{t.position++;a=t.position}}throwError(t,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(t,r){var i,o,a,l,u,c;c=t.input.charCodeAt(t.position);if(c!==34){return false}t.kind="scalar";t.result="";t.position++;i=o=t.position;while((c=t.input.charCodeAt(t.position))!==0){if(c===34){captureSegment(t,i,t.position,true);t.position++;return true}else if(c===92){captureSegment(t,i,t.position,true);c=t.input.charCodeAt(++t.position);if(is_EOL(c)){skipSeparationSpace(t,false,r)}else if(c<256&&A[c]){t.result+=O[c];t.position++}else if((u=escapedHexLen(c))>0){a=u;l=0;for(;a>0;a--){c=t.input.charCodeAt(++t.position);if((u=fromHexCode(c))>=0){l=(l<<4)+u}else{throwError(t,"expected hexadecimal character")}}t.result+=charFromCodepoint(l);t.position++}else{throwError(t,"unknown escape sequence")}i=o=t.position}else if(is_EOL(c)){captureSegment(t,i,o,true);writeFoldedLines(t,skipSeparationSpace(t,false,r));i=o=t.position}else if(t.position===t.lineStart&&testDocumentSeparator(t)){throwError(t,"unexpected end of the document within a double quoted scalar")}else{t.position++;o=t.position}}throwError(t,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(t,r){var i=true,o,a=t.tag,l,u=t.anchor,c,h,d,m,g,y={},v,b,_,w;w=t.input.charCodeAt(t.position);if(w===91){h=93;g=false;l=[]}else if(w===123){h=125;g=true;l={}}else{return false}if(t.anchor!==null){t.anchorMap[t.anchor]=l}w=t.input.charCodeAt(++t.position);while(w!==0){skipSeparationSpace(t,true,r);w=t.input.charCodeAt(t.position);if(w===h){t.position++;t.tag=a;t.anchor=u;t.kind=g?"mapping":"sequence";t.result=l;return true}else if(!i){throwError(t,"missed comma between flow collection entries")}b=v=_=null;d=m=false;if(w===63){c=t.input.charCodeAt(t.position+1);if(is_WS_OR_EOL(c)){d=m=true;t.position++;skipSeparationSpace(t,true,r)}}o=t.line;composeNode(t,r,p,false,true);b=t.tag;v=t.result;skipSeparationSpace(t,true,r);w=t.input.charCodeAt(t.position);if((m||t.line===o)&&w===58){d=true;w=t.input.charCodeAt(++t.position);skipSeparationSpace(t,true,r);composeNode(t,r,p,false,true);_=t.result}if(g){storeMappingPair(t,l,y,b,v,_)}else if(d){l.push(storeMappingPair(t,null,y,b,v,_))}else{l.push(v)}skipSeparationSpace(t,true,r);w=t.input.charCodeAt(t.position);if(w===44){i=true;w=t.input.charCodeAt(++t.position)}else{i=false}}throwError(t,"unexpected end of the stream within a flow collection")}function readBlockScalar(t,r){var i,a,l=y,u=false,c=false,h=r,p=0,d=false,m,g;g=t.input.charCodeAt(t.position);if(g===124){a=false}else if(g===62){a=true}else{return false}t.kind="scalar";t.result="";while(g!==0){g=t.input.charCodeAt(++t.position);if(g===43||g===45){if(y===l){l=g===43?b:v}else{throwError(t,"repeat of a chomping mode identifier")}}else if((m=fromDecimalCode(g))>=0){if(m===0){throwError(t,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!c){h=r+m-1;c=true}else{throwError(t,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(g)){do{g=t.input.charCodeAt(++t.position)}while(is_WHITE_SPACE(g));if(g===35){do{g=t.input.charCodeAt(++t.position)}while(!is_EOL(g)&&g!==0)}}while(g!==0){readLineBreak(t);t.lineIndent=0;g=t.input.charCodeAt(t.position);while((!c||t.lineIndent<h)&&g===32){t.lineIndent++;g=t.input.charCodeAt(++t.position)}if(!c&&t.lineIndent>h){h=t.lineIndent}if(is_EOL(g)){p++;continue}if(t.lineIndent<h){if(l===b){t.result+=o.repeat("\n",u?1+p:p)}else if(l===y){if(u){t.result+="\n"}}break}if(a){if(is_WHITE_SPACE(g)){d=true;t.result+=o.repeat("\n",u?1+p:p)}else if(d){d=false;t.result+=o.repeat("\n",p+1)}else if(p===0){if(u){t.result+=" "}}else{t.result+=o.repeat("\n",p)}}else{t.result+=o.repeat("\n",u?1+p:p)}u=true;c=true;p=0;i=t.position;while(!is_EOL(g)&&g!==0){g=t.input.charCodeAt(++t.position)}captureSegment(t,i,t.position,false)}return true}function readBlockSequence(t,r){var i,o=t.tag,a=t.anchor,l=[],u,c=false,h;if(t.anchor!==null){t.anchorMap[t.anchor]=l}h=t.input.charCodeAt(t.position);while(h!==0){if(h!==45){break}u=t.input.charCodeAt(t.position+1);if(!is_WS_OR_EOL(u)){break}c=true;t.position++;if(skipSeparationSpace(t,true,-1)){if(t.lineIndent<=r){l.push(null);h=t.input.charCodeAt(t.position);continue}}i=t.line;composeNode(t,r,m,false,true);l.push(t.result);skipSeparationSpace(t,true,-1);h=t.input.charCodeAt(t.position);if((t.line===i||t.lineIndent>r)&&h!==0){throwError(t,"bad indentation of a sequence entry")}else if(t.lineIndent<r){break}}if(c){t.tag=o;t.anchor=a;t.kind="sequence";t.result=l;return true}return false}function readBlockMapping(t,r,i){var o,a,l,u,c=t.tag,h=t.anchor,p={},m={},y=null,v=null,b=null,_=false,w=false,S;if(t.anchor!==null){t.anchorMap[t.anchor]=p}S=t.input.charCodeAt(t.position);while(S!==0){o=t.input.charCodeAt(t.position+1);l=t.line;u=t.position;if((S===63||S===58)&&is_WS_OR_EOL(o)){if(S===63){if(_){storeMappingPair(t,p,m,y,v,null);y=v=b=null}w=true;_=true;a=true}else if(_){_=false;a=true}else{throwError(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line")}t.position+=1;S=o}else if(composeNode(t,i,d,false,true)){if(t.line===l){S=t.input.charCodeAt(t.position);while(is_WHITE_SPACE(S)){S=t.input.charCodeAt(++t.position)}if(S===58){S=t.input.charCodeAt(++t.position);if(!is_WS_OR_EOL(S)){throwError(t,"a whitespace character is expected after the key-value separator within a block mapping")}if(_){storeMappingPair(t,p,m,y,v,null);y=v=b=null}w=true;_=false;a=false;y=t.tag;v=t.result}else if(w){throwError(t,"can not read an implicit mapping pair; a colon is missed")}else{t.tag=c;t.anchor=h;return true}}else if(w){throwError(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}else{t.tag=c;t.anchor=h;return true}}else{break}if(t.line===l||t.lineIndent>r){if(composeNode(t,r,g,true,a)){if(_){v=t.result}else{b=t.result}}if(!_){storeMappingPair(t,p,m,y,v,b,l,u);y=v=b=null}skipSeparationSpace(t,true,-1);S=t.input.charCodeAt(t.position)}if(t.lineIndent>r&&S!==0){throwError(t,"bad indentation of a mapping entry")}else if(t.lineIndent<r){break}}if(_){storeMappingPair(t,p,m,y,v,null)}if(w){t.tag=c;t.anchor=h;t.kind="mapping";t.result=p}return w}function readTagProperty(t){var r,i=false,o=false,a,l,u;u=t.input.charCodeAt(t.position);if(u!==33)return false;if(t.tag!==null){throwError(t,"duplication of a tag property")}u=t.input.charCodeAt(++t.position);if(u===60){i=true;u=t.input.charCodeAt(++t.position)}else if(u===33){o=true;a="!!";u=t.input.charCodeAt(++t.position)}else{a="!"}r=t.position;if(i){do{u=t.input.charCodeAt(++t.position)}while(u!==0&&u!==62);if(t.position<t.length){l=t.input.slice(r,t.position);u=t.input.charCodeAt(++t.position)}else{throwError(t,"unexpected end of the stream within a verbatim tag")}}else{while(u!==0&&!is_WS_OR_EOL(u)){if(u===33){if(!o){a=t.input.slice(r-1,t.position+1);if(!E.test(a)){throwError(t,"named tag handle cannot contain such characters")}o=true;r=t.position+1}else{throwError(t,"tag suffix cannot contain exclamation marks")}}u=t.input.charCodeAt(++t.position)}l=t.input.slice(r,t.position);if(S.test(l)){throwError(t,"tag suffix cannot contain flow indicator characters")}}if(l&&!x.test(l)){throwError(t,"tag name cannot contain such characters: "+l)}if(i){t.tag=l}else if(h.call(t.tagMap,a)){t.tag=t.tagMap[a]+l}else if(a==="!"){t.tag="!"+l}else if(a==="!!"){t.tag="tag:yaml.org,2002:"+l}else{throwError(t,'undeclared tag handle "'+a+'"')}return true}function readAnchorProperty(t){var r,i;i=t.input.charCodeAt(t.position);if(i!==38)return false;if(t.anchor!==null){throwError(t,"duplication of an anchor property")}i=t.input.charCodeAt(++t.position);r=t.position;while(i!==0&&!is_WS_OR_EOL(i)&&!is_FLOW_INDICATOR(i)){i=t.input.charCodeAt(++t.position)}if(t.position===r){throwError(t,"name of an anchor node must contain at least one character")}t.anchor=t.input.slice(r,t.position);return true}function readAlias(t){var r,i,o;o=t.input.charCodeAt(t.position);if(o!==42)return false;o=t.input.charCodeAt(++t.position);r=t.position;while(o!==0&&!is_WS_OR_EOL(o)&&!is_FLOW_INDICATOR(o)){o=t.input.charCodeAt(++t.position)}if(t.position===r){throwError(t,"name of an alias node must contain at least one character")}i=t.input.slice(r,t.position);if(!h.call(t.anchorMap,i)){throwError(t,'unidentified alias "'+i+'"')}t.result=t.anchorMap[i];skipSeparationSpace(t,true,-1);return true}function composeNode(t,r,i,o,a){var l,u,c,y=1,v=false,b=false,_,w,S,E,x;if(t.listener!==null){t.listener("open",t)}t.tag=null;t.anchor=null;t.kind=null;t.result=null;l=u=c=g===i||m===i;if(o){if(skipSeparationSpace(t,true,-1)){v=true;if(t.lineIndent>r){y=1}else if(t.lineIndent===r){y=0}else if(t.lineIndent<r){y=-1}}}if(y===1){while(readTagProperty(t)||readAnchorProperty(t)){if(skipSeparationSpace(t,true,-1)){v=true;c=l;if(t.lineIndent>r){y=1}else if(t.lineIndent===r){y=0}else if(t.lineIndent<r){y=-1}}else{c=false}}}if(c){c=v||a}if(y===1||g===i){if(p===i||d===i){E=r}else{E=r+1}x=t.position-t.lineStart;if(y===1){if(c&&(readBlockSequence(t,x)||readBlockMapping(t,x,E))||readFlowCollection(t,E)){b=true}else{if(u&&readBlockScalar(t,E)||readSingleQuotedScalar(t,E)||readDoubleQuotedScalar(t,E)){b=true}else if(readAlias(t)){b=true;if(t.tag!==null||t.anchor!==null){throwError(t,"alias node should not have any properties")}}else if(readPlainScalar(t,E,p===i)){b=true;if(t.tag===null){t.tag="?"}}if(t.anchor!==null){t.anchorMap[t.anchor]=t.result}}}else if(y===0){b=c&&readBlockSequence(t,x)}}if(t.tag!==null&&t.tag!=="!"){if(t.tag==="?"){if(t.result!==null&&t.kind!=="scalar"){throwError(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"')}for(_=0,w=t.implicitTypes.length;_<w;_+=1){S=t.implicitTypes[_];if(S.resolve(t.result)){t.result=S.construct(t.result);t.tag=S.tag;if(t.anchor!==null){t.anchorMap[t.anchor]=t.result}break}}}else if(h.call(t.typeMap[t.kind||"fallback"],t.tag)){S=t.typeMap[t.kind||"fallback"][t.tag];if(t.result!==null&&S.kind!==t.kind){throwError(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+S.kind+'", not "'+t.kind+'"')}if(!S.resolve(t.result)){throwError(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}else{t.result=S.construct(t.result);if(t.anchor!==null){t.anchorMap[t.anchor]=t.result}}}else{throwError(t,"unknown tag !<"+t.tag+">")}}if(t.listener!==null){t.listener("close",t)}return t.tag!==null||t.anchor!==null||b}function readDocument(t){var r=t.position,i,o,a,l=false,u;t.version=null;t.checkLineBreaks=t.legacy;t.tagMap={};t.anchorMap={};while((u=t.input.charCodeAt(t.position))!==0){skipSeparationSpace(t,true,-1);u=t.input.charCodeAt(t.position);if(t.lineIndent>0||u!==37){break}l=true;u=t.input.charCodeAt(++t.position);i=t.position;while(u!==0&&!is_WS_OR_EOL(u)){u=t.input.charCodeAt(++t.position)}o=t.input.slice(i,t.position);a=[];if(o.length<1){throwError(t,"directive name must not be less than one character in length")}while(u!==0){while(is_WHITE_SPACE(u)){u=t.input.charCodeAt(++t.position)}if(u===35){do{u=t.input.charCodeAt(++t.position)}while(u!==0&&!is_EOL(u));break}if(is_EOL(u))break;i=t.position;while(u!==0&&!is_WS_OR_EOL(u)){u=t.input.charCodeAt(++t.position)}a.push(t.input.slice(i,t.position))}if(u!==0)readLineBreak(t);if(h.call(R,o)){R[o](t,o,a)}else{throwWarning(t,'unknown document directive "'+o+'"')}}skipSeparationSpace(t,true,-1);if(t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45){t.position+=3;skipSeparationSpace(t,true,-1)}else if(l){throwError(t,"directives end mark is expected")}composeNode(t,t.lineIndent-1,g,false,true);skipSeparationSpace(t,true,-1);if(t.checkLineBreaks&&w.test(t.input.slice(r,t.position))){throwWarning(t,"non-ASCII line breaks are interpreted as content")}t.documents.push(t.result);if(t.position===t.lineStart&&testDocumentSeparator(t)){if(t.input.charCodeAt(t.position)===46){t.position+=3;skipSeparationSpace(t,true,-1)}return}if(t.position<t.length-1){throwError(t,"end of the stream or a document separator is expected")}else{return}}function loadDocuments(t,r){t=String(t);r=r||{};if(t.length!==0){if(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13){t+="\n"}if(t.charCodeAt(0)===65279){t=t.slice(1)}}var i=new State(t,r);var o=t.indexOf("\0");if(o!==-1){i.position=o;throwError(i,"null byte is not allowed in input")}i.input+="\0";while(i.input.charCodeAt(i.position)===32){i.lineIndent+=1;i.position+=1}while(i.position<i.length-1){readDocument(i)}return i.documents}function loadAll(t,r,i){if(r!==null&&typeof r==="object"&&typeof i==="undefined"){i=r;r=null}var o=loadDocuments(t,i);if(typeof r!=="function"){return o}for(var a=0,l=o.length;a<l;a+=1){r(o[a])}}function load(t,r){var i=loadDocuments(t,r);if(i.length===0){return undefined}else if(i.length===1){return i[0]}throw new a("expected a single document in the stream, but found more")}function safeLoadAll(t,r,i){if(typeof r==="object"&&r!==null&&typeof i==="undefined"){i=r;r=null}return loadAll(t,r,o.extend({schema:u},i))}function safeLoad(t,r){return load(t,o.extend({schema:u},r))}t.exports.loadAll=loadAll;t.exports.load=load;t.exports.safeLoadAll=safeLoadAll;t.exports.safeLoad=safeLoad},7091:(t,r,i)=>{"use strict";var o=i(975);function Mark(t,r,i,o,a){this.name=t;this.buffer=r;this.position=i;this.line=o;this.column=a}Mark.prototype.getSnippet=function getSnippet(t,r){var i,a,l,u,c;if(!this.buffer)return null;t=t||4;r=r||75;i="";a=this.position;while(a>0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(a-1))===-1){a-=1;if(this.position-a>r/2-1){i=" ... ";a+=5;break}}l="";u=this.position;while(u<this.buffer.length&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(u))===-1){u+=1;if(u-this.position>r/2-1){l=" ... ";u-=5;break}}c=this.buffer.slice(a,u);return o.repeat(" ",t)+i+c+l+"\n"+o.repeat(" ",t+this.position-a+i.length)+"^"};Mark.prototype.toString=function toString(t){var r,i="";if(this.name){i+='in "'+this.name+'" '}i+="at line "+(this.line+1)+", column "+(this.column+1);if(!t){r=this.getSnippet();if(r){i+=":\n"+r}}return i};t.exports=Mark},6433:(t,r,i)=>{"use strict";var o=i(975);var a=i(909);var l=i(7457);function compileList(t,r,i){var o=[];t.include.forEach((function(t){i=compileList(t,r,i)}));t[r].forEach((function(t){i.forEach((function(r,i){if(r.tag===t.tag&&r.kind===t.kind){o.push(i)}}));i.push(t)}));return i.filter((function(t,r){return o.indexOf(r)===-1}))}function compileMap(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},r,i;function collectType(r){t[r.kind][r.tag]=t["fallback"][r.tag]=r}for(r=0,i=arguments.length;r<i;r+=1){arguments[r].forEach(collectType)}return t}function Schema(t){this.include=t.include||[];this.implicit=t.implicit||[];this.explicit=t.explicit||[];this.implicit.forEach((function(t){if(t.loadKind&&t.loadKind!=="scalar"){throw new a("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}}));this.compiledImplicit=compileList(this,"implicit",[]);this.compiledExplicit=compileList(this,"explicit",[]);this.compiledTypeMap=compileMap(this.compiledImplicit,this.compiledExplicit)}Schema.DEFAULT=null;Schema.create=function createSchema(){var t,r;switch(arguments.length){case 1:t=Schema.DEFAULT;r=arguments[0];break;case 2:t=arguments[0];r=arguments[1];break;default:throw new a("Wrong number of arguments for Schema.create function")}t=o.toArray(t);r=o.toArray(r);if(!t.every((function(t){return t instanceof Schema}))){throw new a("Specified list of super schemas (or a single Schema object) contains a non-Schema object.")}if(!r.every((function(t){return t instanceof l}))){throw new a("Specified list of YAML types (or a single Type object) contains a non-Type object.")}return new Schema({include:t,explicit:r})};t.exports=Schema},6678:(t,r,i)=>{"use strict";var o=i(6433);t.exports=new o({include:[i(9980)]})},4795:(t,r,i)=>{"use strict";var o=i(6433);t.exports=o.DEFAULT=new o({include:[i(5817)],explicit:[i(6407),i(8230),i(2085)]})},5817:(t,r,i)=>{"use strict";var o=i(6433);t.exports=new o({include:[i(6678)],implicit:[i(5934),i(4831)],explicit:[i(3099),i(3893),i(5979),i(2086)]})},7637:(t,r,i)=>{"use strict";var o=i(6433);t.exports=new o({explicit:[i(6582),i(5319),i(650)]})},9980:(t,r,i)=>{"use strict";var o=i(6433);t.exports=new o({include:[i(7637)],implicit:[i(6357),i(4939),i(3905),i(2448)]})},7457:(t,r,i)=>{"use strict";var o=i(909);var a=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var l=["scalar","sequence","mapping"];function compileStyleAliases(t){var r={};if(t!==null){Object.keys(t).forEach((function(i){t[i].forEach((function(t){r[String(t)]=i}))}))}return r}function Type(t,r){r=r||{};Object.keys(r).forEach((function(r){if(a.indexOf(r)===-1){throw new o('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}}));this.tag=t;this.kind=r["kind"]||null;this.resolve=r["resolve"]||function(){return true};this.construct=r["construct"]||function(t){return t};this.instanceOf=r["instanceOf"]||null;this.predicate=r["predicate"]||null;this.represent=r["represent"]||null;this.defaultStyle=r["defaultStyle"]||null;this.styleAliases=compileStyleAliases(r["styleAliases"]||null);if(l.indexOf(this.kind)===-1){throw new o('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}}t.exports=Type},3099:(t,r,i)=>{"use strict";var o;try{var a=require;o=a("buffer").Buffer}catch(t){}var l=i(7457);var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(t){if(t===null)return false;var r,i,o=0,a=t.length,l=u;for(i=0;i<a;i++){r=l.indexOf(t.charAt(i));if(r>64)continue;if(r<0)return false;o+=6}return o%8===0}function constructYamlBinary(t){var r,i,a=t.replace(/[\r\n=]/g,""),l=a.length,c=u,h=0,p=[];for(r=0;r<l;r++){if(r%4===0&&r){p.push(h>>16&255);p.push(h>>8&255);p.push(h&255)}h=h<<6|c.indexOf(a.charAt(r))}i=l%4*6;if(i===0){p.push(h>>16&255);p.push(h>>8&255);p.push(h&255)}else if(i===18){p.push(h>>10&255);p.push(h>>2&255)}else if(i===12){p.push(h>>4&255)}if(o){return o.from?o.from(p):new o(p)}return p}function representYamlBinary(t){var r="",i=0,o,a,l=t.length,c=u;for(o=0;o<l;o++){if(o%3===0&&o){r+=c[i>>18&63];r+=c[i>>12&63];r+=c[i>>6&63];r+=c[i&63]}i=(i<<8)+t[o]}a=l%3;if(a===0){r+=c[i>>18&63];r+=c[i>>12&63];r+=c[i>>6&63];r+=c[i&63]}else if(a===2){r+=c[i>>10&63];r+=c[i>>4&63];r+=c[i<<2&63];r+=c[64]}else if(a===1){r+=c[i>>2&63];r+=c[i<<4&63];r+=c[64];r+=c[64]}return r}function isBinary(t){return o&&o.isBuffer(t)}t.exports=new l("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},4939:(t,r,i)=>{"use strict";var o=i(7457);function resolveYamlBoolean(t){if(t===null)return false;var r=t.length;return r===4&&(t==="true"||t==="True"||t==="TRUE")||r===5&&(t==="false"||t==="False"||t==="FALSE")}function constructYamlBoolean(t){return t==="true"||t==="True"||t==="TRUE"}function isBoolean(t){return Object.prototype.toString.call(t)==="[object Boolean]"}t.exports=new o("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})},2448:(t,r,i)=>{"use strict";var o=i(975);var a=i(7457);var l=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(t){if(t===null)return false;if(!l.test(t)||t[t.length-1]==="_"){return false}return true}function constructYamlFloat(t){var r,i,o,a;r=t.replace(/_/g,"").toLowerCase();i=r[0]==="-"?-1:1;a=[];if("+-".indexOf(r[0])>=0){r=r.slice(1)}if(r===".inf"){return i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(r===".nan"){return NaN}else if(r.indexOf(":")>=0){r.split(":").forEach((function(t){a.unshift(parseFloat(t,10))}));r=0;o=1;a.forEach((function(t){r+=t*o;o*=60}));return i*r}return i*parseFloat(r,10)}var u=/^[-+]?[0-9]+e/;function representYamlFloat(t,r){var i;if(isNaN(t)){switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===t){switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===t){switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(o.isNegativeZero(t)){return"-0.0"}i=t.toString(10);return u.test(i)?i.replace("e",".e"):i}function isFloat(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||o.isNegativeZero(t))}t.exports=new a("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},3905:(t,r,i)=>{"use strict";var o=i(975);var a=i(7457);function isHexCode(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function isOctCode(t){return 48<=t&&t<=55}function isDecCode(t){return 48<=t&&t<=57}function resolveYamlInteger(t){if(t===null)return false;var r=t.length,i=0,o=false,a;if(!r)return false;a=t[i];if(a==="-"||a==="+"){a=t[++i]}if(a==="0"){if(i+1===r)return true;a=t[++i];if(a==="b"){i++;for(;i<r;i++){a=t[i];if(a==="_")continue;if(a!=="0"&&a!=="1")return false;o=true}return o&&a!=="_"}if(a==="x"){i++;for(;i<r;i++){a=t[i];if(a==="_")continue;if(!isHexCode(t.charCodeAt(i)))return false;o=true}return o&&a!=="_"}for(;i<r;i++){a=t[i];if(a==="_")continue;if(!isOctCode(t.charCodeAt(i)))return false;o=true}return o&&a!=="_"}if(a==="_")return false;for(;i<r;i++){a=t[i];if(a==="_")continue;if(a===":")break;if(!isDecCode(t.charCodeAt(i))){return false}o=true}if(!o||a==="_")return false;if(a!==":")return true;return/^(:[0-5]?[0-9])+$/.test(t.slice(i))}function constructYamlInteger(t){var r=t,i=1,o,a,l=[];if(r.indexOf("_")!==-1){r=r.replace(/_/g,"")}o=r[0];if(o==="-"||o==="+"){if(o==="-")i=-1;r=r.slice(1);o=r[0]}if(r==="0")return 0;if(o==="0"){if(r[1]==="b")return i*parseInt(r.slice(2),2);if(r[1]==="x")return i*parseInt(r,16);return i*parseInt(r,8)}if(r.indexOf(":")!==-1){r.split(":").forEach((function(t){l.unshift(parseInt(t,10))}));r=0;a=1;l.forEach((function(t){r+=t*a;a*=60}));return i*r}return i*parseInt(r,10)}function isInteger(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1===0&&!o.isNegativeZero(t))}t.exports=new a("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0"+t.toString(8):"-0"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},2085:(t,r,i)=>{"use strict";var o;try{var a=require;o=a("esprima")}catch(t){if(typeof window!=="undefined")o=window.esprima}var l=i(7457);function resolveJavascriptFunction(t){if(t===null)return false;try{var r="("+t+")",i=o.parse(r,{range:true});if(i.type!=="Program"||i.body.length!==1||i.body[0].type!=="ExpressionStatement"||i.body[0].expression.type!=="ArrowFunctionExpression"&&i.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(t){return false}}function constructJavascriptFunction(t){var r="("+t+")",i=o.parse(r,{range:true}),a=[],l;if(i.type!=="Program"||i.body.length!==1||i.body[0].type!=="ExpressionStatement"||i.body[0].expression.type!=="ArrowFunctionExpression"&&i.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}i.body[0].expression.params.forEach((function(t){a.push(t.name)}));l=i.body[0].expression.body.range;if(i.body[0].expression.body.type==="BlockStatement"){return new Function(a,r.slice(l[0]+1,l[1]-1))}return new Function(a,"return "+r.slice(l[0],l[1]))}function representJavascriptFunction(t){return t.toString()}function isFunction(t){return Object.prototype.toString.call(t)==="[object Function]"}t.exports=new l("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},8230:(t,r,i)=>{"use strict";var o=i(7457);function resolveJavascriptRegExp(t){if(t===null)return false;if(t.length===0)return false;var r=t,i=/\/([gim]*)$/.exec(t),o="";if(r[0]==="/"){if(i)o=i[1];if(o.length>3)return false;if(r[r.length-o.length-1]!=="/")return false}return true}function constructJavascriptRegExp(t){var r=t,i=/\/([gim]*)$/.exec(t),o="";if(r[0]==="/"){if(i)o=i[1];r=r.slice(1,r.length-o.length-1)}return new RegExp(r,o)}function representJavascriptRegExp(t){var r="/"+t.source+"/";if(t.global)r+="g";if(t.multiline)r+="m";if(t.ignoreCase)r+="i";return r}function isRegExp(t){return Object.prototype.toString.call(t)==="[object RegExp]"}t.exports=new o("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},6407:(t,r,i)=>{"use strict";var o=i(7457);function resolveJavascriptUndefined(){return true}function constructJavascriptUndefined(){return undefined}function representJavascriptUndefined(){return""}function isUndefined(t){return typeof t==="undefined"}t.exports=new o("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined})},650:(t,r,i)=>{"use strict";var o=i(7457);t.exports=new o("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})},4831:(t,r,i)=>{"use strict";var o=i(7457);function resolveYamlMerge(t){return t==="<<"||t===null}t.exports=new o("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},6357:(t,r,i)=>{"use strict";var o=i(7457);function resolveYamlNull(t){if(t===null)return true;var r=t.length;return r===1&&t==="~"||r===4&&(t==="null"||t==="Null"||t==="NULL")}function constructYamlNull(){return null}function isNull(t){return t===null}t.exports=new o("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},3893:(t,r,i)=>{"use strict";var o=i(7457);var a=Object.prototype.hasOwnProperty;var l=Object.prototype.toString;function resolveYamlOmap(t){if(t===null)return true;var r=[],i,o,u,c,h,p=t;for(i=0,o=p.length;i<o;i+=1){u=p[i];h=false;if(l.call(u)!=="[object Object]")return false;for(c in u){if(a.call(u,c)){if(!h)h=true;else return false}}if(!h)return false;if(r.indexOf(c)===-1)r.push(c);else return false}return true}function constructYamlOmap(t){return t!==null?t:[]}t.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap})},5979:(t,r,i)=>{"use strict";var o=i(7457);var a=Object.prototype.toString;function resolveYamlPairs(t){if(t===null)return true;var r,i,o,l,u,c=t;u=new Array(c.length);for(r=0,i=c.length;r<i;r+=1){o=c[r];if(a.call(o)!=="[object Object]")return false;l=Object.keys(o);if(l.length!==1)return false;u[r]=[l[0],o[l[0]]]}return true}function constructYamlPairs(t){if(t===null)return[];var r,i,o,a,l,u=t;l=new Array(u.length);for(r=0,i=u.length;r<i;r+=1){o=u[r];a=Object.keys(o);l[r]=[a[0],o[a[0]]]}return l}t.exports=new o("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs})},5319:(t,r,i)=>{"use strict";var o=i(7457);t.exports=new o("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})},2086:(t,r,i)=>{"use strict";var o=i(7457);var a=Object.prototype.hasOwnProperty;function resolveYamlSet(t){if(t===null)return true;var r,i=t;for(r in i){if(a.call(i,r)){if(i[r]!==null)return false}}return true}function constructYamlSet(t){return t!==null?t:{}}t.exports=new o("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},6582:(t,r,i)=>{"use strict";var o=i(7457);t.exports=new o("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})},5934:(t,r,i)=>{"use strict";var o=i(7457);var a=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var l=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(t){if(t===null)return false;if(a.exec(t)!==null)return true;if(l.exec(t)!==null)return true;return false}function constructYamlTimestamp(t){var r,i,o,u,c,h,p,d=0,m=null,g,y,v;r=a.exec(t);if(r===null)r=l.exec(t);if(r===null)throw new Error("Date resolve error");i=+r[1];o=+r[2]-1;u=+r[3];if(!r[4]){return new Date(Date.UTC(i,o,u))}c=+r[4];h=+r[5];p=+r[6];if(r[7]){d=r[7].slice(0,3);while(d.length<3){d+="0"}d=+d}if(r[9]){g=+r[10];y=+(r[11]||0);m=(g*60+y)*6e4;if(r[9]==="-")m=-m}v=new Date(Date.UTC(i,o,u,c,h,p,d));if(m)v.setTime(v.getTime()-m);return v}function representYamlTimestamp(t){return t.toISOString()}t.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},4824:t=>{var r=Object.prototype.toString;t.exports=function kindOf(t){if(t===void 0)return"undefined";if(t===null)return"null";var i=typeof t;if(i==="boolean")return"boolean";if(i==="string")return"string";if(i==="number")return"number";if(i==="symbol")return"symbol";if(i==="function"){return isGeneratorFn(t)?"generatorfunction":"function"}if(isArray(t))return"array";if(isBuffer(t))return"buffer";if(isArguments(t))return"arguments";if(isDate(t))return"date";if(isError(t))return"error";if(isRegexp(t))return"regexp";switch(ctorName(t)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(isGeneratorObj(t)){return"generator"}i=r.call(t);switch(i){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return i.slice(8,-1).toLowerCase().replace(/\s/g,"")};function ctorName(t){return typeof t.constructor==="function"?t.constructor.name:null}function isArray(t){if(Array.isArray)return Array.isArray(t);return t instanceof Array}function isError(t){return t instanceof Error||typeof t.message==="string"&&t.constructor&&typeof t.constructor.stackTraceLimit==="number"}function isDate(t){if(t instanceof Date)return true;return typeof t.toDateString==="function"&&typeof t.getDate==="function"&&typeof t.setDate==="function"}function isRegexp(t){if(t instanceof RegExp)return true;return typeof t.flags==="string"&&typeof t.ignoreCase==="boolean"&&typeof t.multiline==="boolean"&&typeof t.global==="boolean"}function isGeneratorFn(t,r){return ctorName(t)==="GeneratorFunction"}function isGeneratorObj(t){return typeof t.throw==="function"&&typeof t.return==="function"&&typeof t.next==="function"}function isArguments(t){try{if(typeof t.length==="number"&&typeof t.callee==="function"){return true}}catch(t){if(t.message.indexOf("callee")!==-1){return true}}return false}function isBuffer(t){if(t.constructor&&typeof t.constructor.isBuffer==="function"){return t.constructor.isBuffer(t)}return false}},7836:t=>{"use strict";const{FORCE_COLOR:r,NODE_DISABLE_COLORS:i,TERM:o}=process.env;const a={enabled:!i&&o!=="dumb"&&r!=="0",reset:init(0,0),bold:init(1,22),dim:init(2,22),italic:init(3,23),underline:init(4,24),inverse:init(7,27),hidden:init(8,28),strikethrough:init(9,29),black:init(30,39),red:init(31,39),green:init(32,39),yellow:init(33,39),blue:init(34,39),magenta:init(35,39),cyan:init(36,39),white:init(37,39),gray:init(90,39),grey:init(90,39),bgBlack:init(40,49),bgRed:init(41,49),bgGreen:init(42,49),bgYellow:init(43,49),bgBlue:init(44,49),bgMagenta:init(45,49),bgCyan:init(46,49),bgWhite:init(47,49)};function run(t,r){let i=0,o,a="",l="";for(;i<t.length;i++){o=t[i];a+=o.open;l+=o.close;if(r.includes(o.close)){r=r.replace(o.rgx,o.close+o.open)}}return a+r+l}function chain(t,r){let i={has:t,keys:r};i.reset=a.reset.bind(i);i.bold=a.bold.bind(i);i.dim=a.dim.bind(i);i.italic=a.italic.bind(i);i.underline=a.underline.bind(i);i.inverse=a.inverse.bind(i);i.hidden=a.hidden.bind(i);i.strikethrough=a.strikethrough.bind(i);i.black=a.black.bind(i);i.red=a.red.bind(i);i.green=a.green.bind(i);i.yellow=a.yellow.bind(i);i.blue=a.blue.bind(i);i.magenta=a.magenta.bind(i);i.cyan=a.cyan.bind(i);i.white=a.white.bind(i);i.gray=a.gray.bind(i);i.grey=a.grey.bind(i);i.bgBlack=a.bgBlack.bind(i);i.bgRed=a.bgRed.bind(i);i.bgGreen=a.bgGreen.bind(i);i.bgYellow=a.bgYellow.bind(i);i.bgBlue=a.bgBlue.bind(i);i.bgMagenta=a.bgMagenta.bind(i);i.bgCyan=a.bgCyan.bind(i);i.bgWhite=a.bgWhite.bind(i);return i}function init(t,r){let i={open:`[${t}m`,close:`[${r}m`,rgx:new RegExp(`\\x1b\\[${r}m`,"g")};return function(r){if(this!==void 0&&this.has!==void 0){this.has.includes(t)||(this.has.push(t),this.keys.push(i));return r===void 0?this:a.enabled?run(this.keys,r+""):r+""}return r===void 0?chain([t],[i]):a.enabled?run([i],r+""):r+""}}t.exports=a},9544:(t,r,i)=>{var o=i(3837);var a=i(4088);t.exports={Readable:Readable,Writable:Writable};o.inherits(Readable,a);o.inherits(Writable,a);function beforeFirstCall(t,r,i){t[r]=function(){delete t[r];i.apply(this,arguments);return this[r].apply(this,arguments)}}function Readable(t,r){if(!(this instanceof Readable))return new Readable(t,r);a.call(this,r);beforeFirstCall(this,"_read",(function(){var i=t.call(this,r);var o=this.emit.bind(this,"error");i.on("error",o);i.pipe(this)}));this.emit("readable")}function Writable(t,r){if(!(this instanceof Writable))return new Writable(t,r);a.call(this,r);beforeFirstCall(this,"_write",(function(){var i=t.call(this,r);var o=this.emit.bind(this,"error");i.on("error",o);this.pipe(i)}));this.emit("writable")}},9297:t=>{var r=9007199254740991;var i="[object Arguments]",o="[object Function]",a="[object GeneratorFunction]";var l=/^(?:0|[1-9]\d*)$/;function apply(t,r,i){switch(i.length){case 0:return t.call(r);case 1:return t.call(r,i[0]);case 2:return t.call(r,i[0],i[1]);case 3:return t.call(r,i[0],i[1],i[2])}return t.apply(r,i)}function baseTimes(t,r){var i=-1,o=Array(t);while(++i<t){o[i]=r(i)}return o}var u=Object.prototype;var c=u.hasOwnProperty;var h=u.toString;var p=u.propertyIsEnumerable;var d=Math.max;function arrayLikeKeys(t,r){var i=m(t)||isArguments(t)?baseTimes(t.length,String):[];var o=i.length,a=!!o;for(var l in t){if((r||c.call(t,l))&&!(a&&(l=="length"||isIndex(l,o)))){i.push(l)}}return i}function assignInDefaults(t,r,i,o){if(t===undefined||eq(t,u[i])&&!c.call(o,i)){return r}return t}function assignValue(t,r,i){var o=t[r];if(!(c.call(t,r)&&eq(o,i))||i===undefined&&!(r in t)){t[r]=i}}function baseKeysIn(t){if(!isObject(t)){return nativeKeysIn(t)}var r=isPrototype(t),i=[];for(var o in t){if(!(o=="constructor"&&(r||!c.call(t,o)))){i.push(o)}}return i}function baseRest(t,r){r=d(r===undefined?t.length-1:r,0);return function(){var i=arguments,o=-1,a=d(i.length-r,0),l=Array(a);while(++o<a){l[o]=i[r+o]}o=-1;var u=Array(r+1);while(++o<r){u[o]=i[o]}u[r]=l;return apply(t,this,u)}}function copyObject(t,r,i,o){i||(i={});var a=-1,l=r.length;while(++a<l){var u=r[a];var c=o?o(i[u],t[u],u,i,t):undefined;assignValue(i,u,c===undefined?t[u]:c)}return i}function createAssigner(t){return baseRest((function(r,i){var o=-1,a=i.length,l=a>1?i[a-1]:undefined,u=a>2?i[2]:undefined;l=t.length>3&&typeof l=="function"?(a--,l):undefined;if(u&&isIterateeCall(i[0],i[1],u)){l=a<3?undefined:l;a=1}r=Object(r);while(++o<a){var c=i[o];if(c){t(r,c,o,l)}}return r}))}function isIndex(t,i){i=i==null?r:i;return!!i&&(typeof t=="number"||l.test(t))&&(t>-1&&t%1==0&&t<i)}function isIterateeCall(t,r,i){if(!isObject(i)){return false}var o=typeof r;if(o=="number"?isArrayLike(i)&&isIndex(r,i.length):o=="string"&&r in i){return eq(i[r],t)}return false}function isPrototype(t){var r=t&&t.constructor,i=typeof r=="function"&&r.prototype||u;return t===i}function nativeKeysIn(t){var r=[];if(t!=null){for(var i in Object(t)){r.push(i)}}return r}function eq(t,r){return t===r||t!==t&&r!==r}function isArguments(t){return isArrayLikeObject(t)&&c.call(t,"callee")&&(!p.call(t,"callee")||h.call(t)==i)}var m=Array.isArray;function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}function isArrayLikeObject(t){return isObjectLike(t)&&isArrayLike(t)}function isFunction(t){var r=isObject(t)?h.call(t):"";return r==o||r==a}function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=r}function isObject(t){var r=typeof t;return!!t&&(r=="object"||r=="function")}function isObjectLike(t){return!!t&&typeof t=="object"}var g=createAssigner((function(t,r,i,o){copyObject(r,keysIn(r),t,o)}));var y=baseRest((function(t){t.push(undefined,assignInDefaults);return apply(g,undefined,t)}));function keysIn(t){return isArrayLike(t)?arrayLikeKeys(t,true):baseKeysIn(t)}t.exports=y},7843:t=>{var r=200;var i="__lodash_hash_undefined__";var o=9007199254740991;var a="[object Arguments]",l="[object Function]",u="[object GeneratorFunction]";var c=/[\\^$.*+?()[\]{}|]/g;var h=/^\[object .+?Constructor\]$/;var p=typeof global=="object"&&global&&global.Object===Object&&global;var d=typeof self=="object"&&self&&self.Object===Object&&self;var m=p||d||Function("return this")();function apply(t,r,i){switch(i.length){case 0:return t.call(r);case 1:return t.call(r,i[0]);case 2:return t.call(r,i[0],i[1]);case 3:return t.call(r,i[0],i[1],i[2])}return t.apply(r,i)}function arrayIncludes(t,r){var i=t?t.length:0;return!!i&&baseIndexOf(t,r,0)>-1}function arrayIncludesWith(t,r,i){var o=-1,a=t?t.length:0;while(++o<a){if(i(r,t[o])){return true}}return false}function arrayMap(t,r){var i=-1,o=t?t.length:0,a=Array(o);while(++i<o){a[i]=r(t[i],i,t)}return a}function arrayPush(t,r){var i=-1,o=r.length,a=t.length;while(++i<o){t[a+i]=r[i]}return t}function baseFindIndex(t,r,i,o){var a=t.length,l=i+(o?1:-1);while(o?l--:++l<a){if(r(t[l],l,t)){return l}}return-1}function baseIndexOf(t,r,i){if(r!==r){return baseFindIndex(t,baseIsNaN,i)}var o=i-1,a=t.length;while(++o<a){if(t[o]===r){return o}}return-1}function baseIsNaN(t){return t!==t}function baseUnary(t){return function(r){return t(r)}}function cacheHas(t,r){return t.has(r)}function getValue(t,r){return t==null?undefined:t[r]}function isHostObject(t){var r=false;if(t!=null&&typeof t.toString!="function"){try{r=!!(t+"")}catch(t){}}return r}var g=Array.prototype,y=Function.prototype,v=Object.prototype;var b=m["__core-js_shared__"];var _=function(){var t=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var w=y.toString;var S=v.hasOwnProperty;var E=v.toString;var x=RegExp("^"+w.call(S).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var A=m.Symbol,O=v.propertyIsEnumerable,k=g.splice,R=A?A.isConcatSpreadable:undefined;var T=Math.max;var C=getNative(m,"Map"),P=getNative(Object,"create");function Hash(t){var r=-1,i=t?t.length:0;this.clear();while(++r<i){var o=t[r];this.set(o[0],o[1])}}function hashClear(){this.__data__=P?P(null):{}}function hashDelete(t){return this.has(t)&&delete this.__data__[t]}function hashGet(t){var r=this.__data__;if(P){var o=r[t];return o===i?undefined:o}return S.call(r,t)?r[t]:undefined}function hashHas(t){var r=this.__data__;return P?r[t]!==undefined:S.call(r,t)}function hashSet(t,r){var o=this.__data__;o[t]=P&&r===undefined?i:r;return this}Hash.prototype.clear=hashClear;Hash.prototype["delete"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function ListCache(t){var r=-1,i=t?t.length:0;this.clear();while(++r<i){var o=t[r];this.set(o[0],o[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(t){var r=this.__data__,i=assocIndexOf(r,t);if(i<0){return false}var o=r.length-1;if(i==o){r.pop()}else{k.call(r,i,1)}return true}function listCacheGet(t){var r=this.__data__,i=assocIndexOf(r,t);return i<0?undefined:r[i][1]}function listCacheHas(t){return assocIndexOf(this.__data__,t)>-1}function listCacheSet(t,r){var i=this.__data__,o=assocIndexOf(i,t);if(o<0){i.push([t,r])}else{i[o][1]=r}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(t){var r=-1,i=t?t.length:0;this.clear();while(++r<i){var o=t[r];this.set(o[0],o[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(C||ListCache),string:new Hash}}function mapCacheDelete(t){return getMapData(this,t)["delete"](t)}function mapCacheGet(t){return getMapData(this,t).get(t)}function mapCacheHas(t){return getMapData(this,t).has(t)}function mapCacheSet(t,r){getMapData(this,t).set(t,r);return this}MapCache.prototype.clear=mapCacheClear;MapCache.prototype["delete"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;function SetCache(t){var r=-1,i=t?t.length:0;this.__data__=new MapCache;while(++r<i){this.add(t[r])}}function setCacheAdd(t){this.__data__.set(t,i);return this}function setCacheHas(t){return this.__data__.has(t)}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd;SetCache.prototype.has=setCacheHas;function assocIndexOf(t,r){var i=t.length;while(i--){if(eq(t[i][0],r)){return i}}return-1}function baseDifference(t,i,o,a){var l=-1,u=arrayIncludes,c=true,h=t.length,p=[],d=i.length;if(!h){return p}if(o){i=arrayMap(i,baseUnary(o))}if(a){u=arrayIncludesWith;c=false}else if(i.length>=r){u=cacheHas;c=false;i=new SetCache(i)}e:while(++l<h){var m=t[l],g=o?o(m):m;m=a||m!==0?m:0;if(c&&g===g){var y=d;while(y--){if(i[y]===g){continue e}}p.push(m)}else if(!u(i,g,a)){p.push(m)}}return p}function baseFlatten(t,r,i,o,a){var l=-1,u=t.length;i||(i=isFlattenable);a||(a=[]);while(++l<u){var c=t[l];if(r>0&&i(c)){if(r>1){baseFlatten(c,r-1,i,o,a)}else{arrayPush(a,c)}}else if(!o){a[a.length]=c}}return a}function baseIsNative(t){if(!isObject(t)||isMasked(t)){return false}var r=isFunction(t)||isHostObject(t)?x:h;return r.test(toSource(t))}function baseRest(t,r){r=T(r===undefined?t.length-1:r,0);return function(){var i=arguments,o=-1,a=T(i.length-r,0),l=Array(a);while(++o<a){l[o]=i[r+o]}o=-1;var u=Array(r+1);while(++o<r){u[o]=i[o]}u[r]=l;return apply(t,this,u)}}function getMapData(t,r){var i=t.__data__;return isKeyable(r)?i[typeof r=="string"?"string":"hash"]:i.map}function getNative(t,r){var i=getValue(t,r);return baseIsNative(i)?i:undefined}function isFlattenable(t){return L(t)||isArguments(t)||!!(R&&t&&t[R])}function isKeyable(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}function isMasked(t){return!!_&&_ in t}function toSource(t){if(t!=null){try{return w.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var I=baseRest((function(t,r){return isArrayLikeObject(t)?baseDifference(t,baseFlatten(r,1,isArrayLikeObject,true)):[]}));function eq(t,r){return t===r||t!==t&&r!==r}function isArguments(t){return isArrayLikeObject(t)&&S.call(t,"callee")&&(!O.call(t,"callee")||E.call(t)==a)}var L=Array.isArray;function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}function isArrayLikeObject(t){return isObjectLike(t)&&isArrayLike(t)}function isFunction(t){var r=isObject(t)?E.call(t):"";return r==l||r==u}function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=o}function isObject(t){var r=typeof t;return!!t&&(r=="object"||r=="function")}function isObjectLike(t){return!!t&&typeof t=="object"}t.exports=I},4332:t=>{var r=9007199254740991;var i="[object Arguments]",o="[object Function]",a="[object GeneratorFunction]";var l=typeof global=="object"&&global&&global.Object===Object&&global;var u=typeof self=="object"&&self&&self.Object===Object&&self;var c=l||u||Function("return this")();function arrayPush(t,r){var i=-1,o=r.length,a=t.length;while(++i<o){t[a+i]=r[i]}return t}var h=Object.prototype;var p=h.hasOwnProperty;var d=h.toString;var m=c.Symbol,g=h.propertyIsEnumerable,y=m?m.isConcatSpreadable:undefined;function baseFlatten(t,r,i,o,a){var l=-1,u=t.length;i||(i=isFlattenable);a||(a=[]);while(++l<u){var c=t[l];if(r>0&&i(c)){if(r>1){baseFlatten(c,r-1,i,o,a)}else{arrayPush(a,c)}}else if(!o){a[a.length]=c}}return a}function isFlattenable(t){return v(t)||isArguments(t)||!!(y&&t&&t[y])}function flatten(t){var r=t?t.length:0;return r?baseFlatten(t,1):[]}function isArguments(t){return isArrayLikeObject(t)&&p.call(t,"callee")&&(!g.call(t,"callee")||d.call(t)==i)}var v=Array.isArray;function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}function isArrayLikeObject(t){return isObjectLike(t)&&isArrayLike(t)}function isFunction(t){var r=isObject(t)?d.call(t):"";return r==o||r==a}function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=r}function isObject(t){var r=typeof t;return!!t&&(r=="object"||r=="function")}function isObjectLike(t){return!!t&&typeof t=="object"}t.exports=flatten},3443:t=>{var r="[object Object]";function isHostObject(t){var r=false;if(t!=null&&typeof t.toString!="function"){try{r=!!(t+"")}catch(t){}}return r}function overArg(t,r){return function(i){return t(r(i))}}var i=Function.prototype,o=Object.prototype;var a=i.toString;var l=o.hasOwnProperty;var u=a.call(Object);var c=o.toString;var h=overArg(Object.getPrototypeOf,Object);function isObjectLike(t){return!!t&&typeof t=="object"}function isPlainObject(t){if(!isObjectLike(t)||c.call(t)!=r||isHostObject(t)){return false}var i=h(t);if(i===null){return true}var o=l.call(i,"constructor")&&i.constructor;return typeof o=="function"&&o instanceof o&&a.call(o)==u}t.exports=isPlainObject},1418:t=>{var r=200;var i="__lodash_hash_undefined__";var o=1/0,a=9007199254740991;var l="[object Arguments]",u="[object Function]",c="[object GeneratorFunction]";var h=/[\\^$.*+?()[\]{}|]/g;var p=/^\[object .+?Constructor\]$/;var d=typeof global=="object"&&global&&global.Object===Object&&global;var m=typeof self=="object"&&self&&self.Object===Object&&self;var g=d||m||Function("return this")();function apply(t,r,i){switch(i.length){case 0:return t.call(r);case 1:return t.call(r,i[0]);case 2:return t.call(r,i[0],i[1]);case 3:return t.call(r,i[0],i[1],i[2])}return t.apply(r,i)}function arrayIncludes(t,r){var i=t?t.length:0;return!!i&&baseIndexOf(t,r,0)>-1}function arrayIncludesWith(t,r,i){var o=-1,a=t?t.length:0;while(++o<a){if(i(r,t[o])){return true}}return false}function arrayPush(t,r){var i=-1,o=r.length,a=t.length;while(++i<o){t[a+i]=r[i]}return t}function baseFindIndex(t,r,i,o){var a=t.length,l=i+(o?1:-1);while(o?l--:++l<a){if(r(t[l],l,t)){return l}}return-1}function baseIndexOf(t,r,i){if(r!==r){return baseFindIndex(t,baseIsNaN,i)}var o=i-1,a=t.length;while(++o<a){if(t[o]===r){return o}}return-1}function baseIsNaN(t){return t!==t}function cacheHas(t,r){return t.has(r)}function getValue(t,r){return t==null?undefined:t[r]}function isHostObject(t){var r=false;if(t!=null&&typeof t.toString!="function"){try{r=!!(t+"")}catch(t){}}return r}function setToArray(t){var r=-1,i=Array(t.size);t.forEach((function(t){i[++r]=t}));return i}var y=Array.prototype,v=Function.prototype,b=Object.prototype;var _=g["__core-js_shared__"];var w=function(){var t=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var S=v.toString;var E=b.hasOwnProperty;var x=b.toString;var A=RegExp("^"+S.call(E).replace(h,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var O=g.Symbol,k=b.propertyIsEnumerable,R=y.splice,T=O?O.isConcatSpreadable:undefined;var C=Math.max;var P=getNative(g,"Map"),I=getNative(g,"Set"),L=getNative(Object,"create");function Hash(t){var r=-1,i=t?t.length:0;this.clear();while(++r<i){var o=t[r];this.set(o[0],o[1])}}function hashClear(){this.__data__=L?L(null):{}}function hashDelete(t){return this.has(t)&&delete this.__data__[t]}function hashGet(t){var r=this.__data__;if(L){var o=r[t];return o===i?undefined:o}return E.call(r,t)?r[t]:undefined}function hashHas(t){var r=this.__data__;return L?r[t]!==undefined:E.call(r,t)}function hashSet(t,r){var o=this.__data__;o[t]=L&&r===undefined?i:r;return this}Hash.prototype.clear=hashClear;Hash.prototype["delete"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function ListCache(t){var r=-1,i=t?t.length:0;this.clear();while(++r<i){var o=t[r];this.set(o[0],o[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(t){var r=this.__data__,i=assocIndexOf(r,t);if(i<0){return false}var o=r.length-1;if(i==o){r.pop()}else{R.call(r,i,1)}return true}function listCacheGet(t){var r=this.__data__,i=assocIndexOf(r,t);return i<0?undefined:r[i][1]}function listCacheHas(t){return assocIndexOf(this.__data__,t)>-1}function listCacheSet(t,r){var i=this.__data__,o=assocIndexOf(i,t);if(o<0){i.push([t,r])}else{i[o][1]=r}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(t){var r=-1,i=t?t.length:0;this.clear();while(++r<i){var o=t[r];this.set(o[0],o[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(P||ListCache),string:new Hash}}function mapCacheDelete(t){return getMapData(this,t)["delete"](t)}function mapCacheGet(t){return getMapData(this,t).get(t)}function mapCacheHas(t){return getMapData(this,t).has(t)}function mapCacheSet(t,r){getMapData(this,t).set(t,r);return this}MapCache.prototype.clear=mapCacheClear;MapCache.prototype["delete"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;function SetCache(t){var r=-1,i=t?t.length:0;this.__data__=new MapCache;while(++r<i){this.add(t[r])}}function setCacheAdd(t){this.__data__.set(t,i);return this}function setCacheHas(t){return this.__data__.has(t)}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd;SetCache.prototype.has=setCacheHas;function assocIndexOf(t,r){var i=t.length;while(i--){if(eq(t[i][0],r)){return i}}return-1}function baseFlatten(t,r,i,o,a){var l=-1,u=t.length;i||(i=isFlattenable);a||(a=[]);while(++l<u){var c=t[l];if(r>0&&i(c)){if(r>1){baseFlatten(c,r-1,i,o,a)}else{arrayPush(a,c)}}else if(!o){a[a.length]=c}}return a}function baseIsNative(t){if(!isObject(t)||isMasked(t)){return false}var r=isFunction(t)||isHostObject(t)?A:p;return r.test(toSource(t))}function baseRest(t,r){r=C(r===undefined?t.length-1:r,0);return function(){var i=arguments,o=-1,a=C(i.length-r,0),l=Array(a);while(++o<a){l[o]=i[r+o]}o=-1;var u=Array(r+1);while(++o<r){u[o]=i[o]}u[r]=l;return apply(t,this,u)}}function baseUniq(t,i,o){var a=-1,l=arrayIncludes,u=t.length,c=true,h=[],p=h;if(o){c=false;l=arrayIncludesWith}else if(u>=r){var d=i?null:M(t);if(d){return setToArray(d)}c=false;l=cacheHas;p=new SetCache}else{p=i?[]:h}e:while(++a<u){var m=t[a],g=i?i(m):m;m=o||m!==0?m:0;if(c&&g===g){var y=p.length;while(y--){if(p[y]===g){continue e}}if(i){p.push(g)}h.push(m)}else if(!l(p,g,o)){if(p!==h){p.push(g)}h.push(m)}}return h}var M=!(I&&1/setToArray(new I([,-0]))[1]==o)?noop:function(t){return new I(t)};function getMapData(t,r){var i=t.__data__;return isKeyable(r)?i[typeof r=="string"?"string":"hash"]:i.map}function getNative(t,r){var i=getValue(t,r);return baseIsNative(i)?i:undefined}function isFlattenable(t){return j(t)||isArguments(t)||!!(T&&t&&t[T])}function isKeyable(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}function isMasked(t){return!!w&&w in t}function toSource(t){if(t!=null){try{return S.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var N=baseRest((function(t){return baseUniq(baseFlatten(t,1,isArrayLikeObject,true))}));function eq(t,r){return t===r||t!==t&&r!==r}function isArguments(t){return isArrayLikeObject(t)&&E.call(t,"callee")&&(!k.call(t,"callee")||x.call(t)==l)}var j=Array.isArray;function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}function isArrayLikeObject(t){return isObjectLike(t)&&isArrayLike(t)}function isFunction(t){var r=isObject(t)?x.call(t):"";return r==u||r==c}function isLength(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=a}function isObject(t){var r=typeof t;return!!t&&(r=="object"||r=="function")}function isObjectLike(t){return!!t&&typeof t=="object"}function noop(){}t.exports=N},5940:(t,r,i)=>{"use strict";const o=i(7147);const a=i(1017);const{promisify:l}=i(3837);const u=i(9005);const c=u.satisfies(process.version,">=10.12.0");const checkPath=t=>{if(process.platform==="win32"){const r=/[<>:"|?*]/.test(t.replace(a.parse(t).root,""));if(r){const r=new Error(`Path contains invalid characters: ${t}`);r.code="EINVAL";throw r}}};const processOptions=t=>{const r={mode:511,fs:o};return{...r,...t}};const permissionError=t=>{const r=new Error(`operation not permitted, mkdir '${t}'`);r.code="EPERM";r.errno=-4048;r.path=t;r.syscall="mkdir";return r};const makeDir=async(t,r)=>{checkPath(t);r=processOptions(r);const i=l(r.fs.mkdir);const u=l(r.fs.stat);if(c&&r.fs.mkdir===o.mkdir){const o=a.resolve(t);await i(o,{mode:r.mode,recursive:true});return o}const make=async t=>{try{await i(t,r.mode);return t}catch(r){if(r.code==="EPERM"){throw r}if(r.code==="ENOENT"){if(a.dirname(t)===t){throw permissionError(t)}if(r.message.includes("null bytes")){throw r}await make(a.dirname(t));return make(t)}try{const r=await u(t);if(!r.isDirectory()){throw new Error("The path is not a directory")}}catch(t){throw r}return t}};return make(a.resolve(t))};t.exports=makeDir;t.exports.sync=(t,r)=>{checkPath(t);r=processOptions(r);if(c&&r.fs.mkdirSync===o.mkdirSync){const i=a.resolve(t);o.mkdirSync(i,{mode:r.mode,recursive:true});return i}const make=t=>{try{r.fs.mkdirSync(t,r.mode)}catch(i){if(i.code==="EPERM"){throw i}if(i.code==="ENOENT"){if(a.dirname(t)===t){throw permissionError(t)}if(i.message.includes("null bytes")){throw i}make(a.dirname(t));return make(t)}try{if(!r.fs.statSync(t).isDirectory()){throw new Error("The path is not a directory")}}catch(t){throw i}}return t};return make(a.resolve(t))}},9117:(t,r,i)=>{"use strict";const o=i(2781);const a=o.PassThrough;const l=Array.prototype.slice;t.exports=merge2;function merge2(){const t=[];const r=l.call(arguments);let i=false;let o=r[r.length-1];if(o&&!Array.isArray(o)&&o.pipe==null){r.pop()}else{o={}}const u=o.end!==false;const c=o.pipeError===true;if(o.objectMode==null){o.objectMode=true}if(o.highWaterMark==null){o.highWaterMark=64*1024}const h=a(o);function addStream(){for(let r=0,i=arguments.length;r<i;r++){t.push(pauseStreams(arguments[r],o))}mergeStream();return this}function mergeStream(){if(i){return}i=true;let r=t.shift();if(!r){process.nextTick(endStream);return}if(!Array.isArray(r)){r=[r]}let o=r.length+1;function next(){if(--o>0){return}i=false;mergeStream()}function pipe(t){function onend(){t.removeListener("merge2UnpipeEnd",onend);t.removeListener("end",onend);if(c){t.removeListener("error",onerror)}next()}function onerror(t){h.emit("error",t)}if(t._readableState.endEmitted){return next()}t.on("merge2UnpipeEnd",onend);t.on("end",onend);if(c){t.on("error",onerror)}t.pipe(h,{end:false});t.resume()}for(let t=0;t<r.length;t++){pipe(r[t])}next()}function endStream(){i=false;h.emit("queueDrain");if(u){h.end()}}h.setMaxListeners(0);h.add=addStream;h.on("unpipe",(function(t){t.emit("merge2UnpipeEnd")}));if(r.length){addStream.apply(null,r)}return h}function pauseStreams(t,r){if(!Array.isArray(t)){if(!t._readableState&&t.pipe){t=t.pipe(a(r))}if(!t._readableState||!t.pause||!t.pipe){throw new Error("Only readable stream can be merged.")}t.pause()}else{for(let i=0,o=t.length;i<o;i++){t[i]=pauseStreams(t[i],r)}}return t}},7971:(t,r,i)=>{"use strict";const o=i(3837);const a=i(8333);const l=i(3846);const u=i(5502);const isEmptyString=t=>t===""||t==="./";const micromatch=(t,r,i)=>{r=[].concat(r);t=[].concat(t);let o=new Set;let a=new Set;let u=new Set;let c=0;let onResult=t=>{u.add(t.output);if(i&&i.onResult){i.onResult(t)}};for(let u=0;u<r.length;u++){let h=l(String(r[u]),{...i,onResult:onResult},true);let p=h.state.negated||h.state.negatedExtglob;if(p)c++;for(let r of t){let t=h(r,true);let i=p?!t.isMatch:t.isMatch;if(!i)continue;if(p){o.add(t.output)}else{o.delete(t.output);a.add(t.output)}}}let h=c===r.length?[...u]:[...a];let p=h.filter((t=>!o.has(t)));if(i&&p.length===0){if(i.failglob===true){throw new Error(`No matches found for "${r.join(", ")}"`)}if(i.nonull===true||i.nullglob===true){return i.unescape?r.map((t=>t.replace(/\\/g,""))):r}}return p};micromatch.match=micromatch;micromatch.matcher=(t,r)=>l(t,r);micromatch.isMatch=(t,r,i)=>l(r,i)(t);micromatch.any=micromatch.isMatch;micromatch.not=(t,r,i={})=>{r=[].concat(r).map(String);let o=new Set;let a=[];let onResult=t=>{if(i.onResult)i.onResult(t);a.push(t.output)};let l=micromatch(t,r,{...i,onResult:onResult});for(let t of a){if(!l.includes(t)){o.add(t)}}return[...o]};micromatch.contains=(t,r,i)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${o.inspect(t)}"`)}if(Array.isArray(r)){return r.some((r=>micromatch.contains(t,r,i)))}if(typeof r==="string"){if(isEmptyString(t)||isEmptyString(r)){return false}if(t.includes(r)||t.startsWith("./")&&t.slice(2).includes(r)){return true}}return micromatch.isMatch(t,r,{...i,contains:true})};micromatch.matchKeys=(t,r,i)=>{if(!u.isObject(t)){throw new TypeError("Expected the first argument to be an object")}let o=micromatch(Object.keys(t),r,i);let a={};for(let r of o)a[r]=t[r];return a};micromatch.some=(t,r,i)=>{let o=[].concat(t);for(let t of[].concat(r)){let r=l(String(t),i);if(o.some((t=>r(t)))){return true}}return false};micromatch.every=(t,r,i)=>{let o=[].concat(t);for(let t of[].concat(r)){let r=l(String(t),i);if(!o.every((t=>r(t)))){return false}}return true};micromatch.all=(t,r,i)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${o.inspect(t)}"`)}return[].concat(r).every((r=>l(r,i)(t)))};micromatch.capture=(t,r,i)=>{let o=u.isWindows(i);let a=l.makeRe(String(t),{...i,capture:true});let c=a.exec(o?u.toPosixSlashes(r):r);if(c){return c.slice(1).map((t=>t===void 0?"":t))}};micromatch.makeRe=(...t)=>l.makeRe(...t);micromatch.scan=(...t)=>l.scan(...t);micromatch.parse=(t,r)=>{let i=[];for(let o of[].concat(t||[])){for(let t of a(String(o),r)){i.push(l.parse(t,r))}}return i};micromatch.braces=(t,r)=>{if(typeof t!=="string")throw new TypeError("Expected a string");if(r&&r.nobrace===true||!/\{.*\}/.test(t)){return[t]}return a(t,r)};micromatch.braceExpand=(t,r)=>{if(typeof t!=="string")throw new TypeError("Expected a string");return micromatch.braces(t,{...r,expand:true})};t.exports=micromatch},1065:(t,r,i)=>{"use strict";const o=i(3837);const a=i(8333);const l=i(3846);const u=i(5502);const isEmptyString=t=>t===""||t==="./";const micromatch=(t,r,i)=>{r=[].concat(r);t=[].concat(t);let o=new Set;let a=new Set;let u=new Set;let c=0;let onResult=t=>{u.add(t.output);if(i&&i.onResult){i.onResult(t)}};for(let u=0;u<r.length;u++){let h=l(String(r[u]),{...i,onResult:onResult},true);let p=h.state.negated||h.state.negatedExtglob;if(p)c++;for(let r of t){let t=h(r,true);let i=p?!t.isMatch:t.isMatch;if(!i)continue;if(p){o.add(t.output)}else{o.delete(t.output);a.add(t.output)}}}let h=c===r.length?[...u]:[...a];let p=h.filter((t=>!o.has(t)));if(i&&p.length===0){if(i.failglob===true){throw new Error(`No matches found for "${r.join(", ")}"`)}if(i.nonull===true||i.nullglob===true){return i.unescape?r.map((t=>t.replace(/\\/g,""))):r}}return p};micromatch.match=micromatch;micromatch.matcher=(t,r)=>l(t,r);micromatch.isMatch=(t,r,i)=>l(r,i)(t);micromatch.any=micromatch.isMatch;micromatch.not=(t,r,i={})=>{r=[].concat(r).map(String);let o=new Set;let a=[];let onResult=t=>{if(i.onResult)i.onResult(t);a.push(t.output)};let l=new Set(micromatch(t,r,{...i,onResult:onResult}));for(let t of a){if(!l.has(t)){o.add(t)}}return[...o]};micromatch.contains=(t,r,i)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${o.inspect(t)}"`)}if(Array.isArray(r)){return r.some((r=>micromatch.contains(t,r,i)))}if(typeof r==="string"){if(isEmptyString(t)||isEmptyString(r)){return false}if(t.includes(r)||t.startsWith("./")&&t.slice(2).includes(r)){return true}}return micromatch.isMatch(t,r,{...i,contains:true})};micromatch.matchKeys=(t,r,i)=>{if(!u.isObject(t)){throw new TypeError("Expected the first argument to be an object")}let o=micromatch(Object.keys(t),r,i);let a={};for(let r of o)a[r]=t[r];return a};micromatch.some=(t,r,i)=>{let o=[].concat(t);for(let t of[].concat(r)){let r=l(String(t),i);if(o.some((t=>r(t)))){return true}}return false};micromatch.every=(t,r,i)=>{let o=[].concat(t);for(let t of[].concat(r)){let r=l(String(t),i);if(!o.every((t=>r(t)))){return false}}return true};micromatch.all=(t,r,i)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${o.inspect(t)}"`)}return[].concat(r).every((r=>l(r,i)(t)))};micromatch.capture=(t,r,i)=>{let o=u.isWindows(i);let a=l.makeRe(String(t),{...i,capture:true});let c=a.exec(o?u.toPosixSlashes(r):r);if(c){return c.slice(1).map((t=>t===void 0?"":t))}};micromatch.makeRe=(...t)=>l.makeRe(...t);micromatch.scan=(...t)=>l.scan(...t);micromatch.parse=(t,r)=>{let i=[];for(let o of[].concat(t||[])){for(let t of a(String(o),r)){i.push(l.parse(t,r))}}return i};micromatch.braces=(t,r)=>{if(typeof t!=="string")throw new TypeError("Expected a string");if(r&&r.nobrace===true||!/\{.*\}/.test(t)){return[t]}return a(t,r)};micromatch.braceExpand=(t,r)=>{if(typeof t!=="string")throw new TypeError("Expected a string");return micromatch.braces(t,{...r,expand:true})};t.exports=micromatch},8923:(t,r,i)=>{t.exports=minimatch;minimatch.Minimatch=Minimatch;var o=function(){try{return i(1017)}catch(t){}}()||{sep:"/"};minimatch.sep=o.sep;var a=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var l=i(4800);var u={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var c="[^/]";var h=c+"*?";var p="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var d="(?:(?!(?:\\/|^)\\.).)*?";var m=charSet("().*{}+?[]^$\\!");function charSet(t){return t.split("").reduce((function(t,r){t[r]=true;return t}),{})}var g=/\/+/;minimatch.filter=filter;function filter(t,r){r=r||{};return function(i,o,a){return minimatch(i,t,r)}}function ext(t,r){r=r||{};var i={};Object.keys(t).forEach((function(r){i[r]=t[r]}));Object.keys(r).forEach((function(t){i[t]=r[t]}));return i}minimatch.defaults=function(t){if(!t||typeof t!=="object"||!Object.keys(t).length){return minimatch}var r=minimatch;var i=function minimatch(i,o,a){return r(i,o,ext(t,a))};i.Minimatch=function Minimatch(i,o){return new r.Minimatch(i,ext(t,o))};i.Minimatch.defaults=function defaults(i){return r.defaults(ext(t,i)).Minimatch};i.filter=function filter(i,o){return r.filter(i,ext(t,o))};i.defaults=function defaults(i){return r.defaults(ext(t,i))};i.makeRe=function makeRe(i,o){return r.makeRe(i,ext(t,o))};i.braceExpand=function braceExpand(i,o){return r.braceExpand(i,ext(t,o))};i.match=function(i,o,a){return r.match(i,o,ext(t,a))};return i};Minimatch.defaults=function(t){return minimatch.defaults(t).Minimatch};function minimatch(t,r,i){assertValidPattern(r);if(!i)i={};if(!i.nocomment&&r.charAt(0)==="#"){return false}return new Minimatch(r,i).match(t)}function Minimatch(t,r){if(!(this instanceof Minimatch)){return new Minimatch(t,r)}assertValidPattern(t);if(!r)r={};t=t.trim();if(!r.allowWindowsEscape&&o.sep!=="/"){t=t.split(o.sep).join("/")}this.options=r;this.set=[];this.pattern=t;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!r.partial;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){var t=this.pattern;var r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();var i=this.globSet=this.braceExpand();if(r.debug)this.debug=function debug(){console.error.apply(console,arguments)};this.debug(this.pattern,i);i=this.globParts=i.map((function(t){return t.split(g)}));this.debug(this.pattern,i);i=i.map((function(t,r,i){return t.map(this.parse,this)}),this);this.debug(this.pattern,i);i=i.filter((function(t){return t.indexOf(false)===-1}));this.debug(this.pattern,i);this.set=i}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var t=this.pattern;var r=false;var i=this.options;var o=0;if(i.nonegate)return;for(var a=0,l=t.length;a<l&&t.charAt(a)==="!";a++){r=!r;o++}if(o)this.pattern=t.substr(o);this.negate=r}minimatch.braceExpand=function(t,r){return braceExpand(t,r)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(t,r){if(!r){if(this instanceof Minimatch){r=this.options}else{r={}}}t=typeof t==="undefined"?this.pattern:t;assertValidPattern(t);if(r.nobrace||!/\{(?:(?!\{).)*\}/.test(t)){return[t]}return l(t)}var y=1024*64;var assertValidPattern=function(t){if(typeof t!=="string"){throw new TypeError("invalid pattern")}if(t.length>y){throw new TypeError("pattern is too long")}};Minimatch.prototype.parse=parse;var v={};function parse(t,r){assertValidPattern(t);var i=this.options;if(t==="**"){if(!i.noglobstar)return a;else t="*"}if(t==="")return"";var o="";var l=!!i.nocase;var p=false;var d=[];var g=[];var y;var b=false;var _=-1;var w=-1;var S=t.charAt(0)==="."?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var E=this;function clearStateChar(){if(y){switch(y){case"*":o+=h;l=true;break;case"?":o+=c;l=true;break;default:o+="\\"+y;break}E.debug("clearStateChar %j %j",y,o);y=false}}for(var x=0,A=t.length,O;x<A&&(O=t.charAt(x));x++){this.debug("%s\t%s %s %j",t,x,o,O);if(p&&m[O]){o+="\\"+O;p=false;continue}switch(O){case"/":{return false}case"\\":clearStateChar();p=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",t,x,o,O);if(b){this.debug(" in class");if(O==="!"&&x===w+1)O="^";o+=O;continue}E.debug("call clearStateChar %j",y);clearStateChar();y=O;if(i.noext)clearStateChar();continue;case"(":if(b){o+="(";continue}if(!y){o+="\\(";continue}d.push({type:y,start:x-1,reStart:o.length,open:u[y].open,close:u[y].close});o+=y==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",y,o);y=false;continue;case")":if(b||!d.length){o+="\\)";continue}clearStateChar();l=true;var k=d.pop();o+=k.close;if(k.type==="!"){g.push(k)}k.reEnd=o.length;continue;case"|":if(b||!d.length||p){o+="\\|";p=false;continue}clearStateChar();o+="|";continue;case"[":clearStateChar();if(b){o+="\\"+O;continue}b=true;w=x;_=o.length;o+=O;continue;case"]":if(x===w+1||!b){o+="\\"+O;p=false;continue}var R=t.substring(w+1,x);try{RegExp("["+R+"]")}catch(t){var T=this.parse(R,v);o=o.substr(0,_)+"\\["+T[0]+"\\]";l=l||T[1];b=false;continue}l=true;b=false;o+=O;continue;default:clearStateChar();if(p){p=false}else if(m[O]&&!(O==="^"&&b)){o+="\\"}o+=O}}if(b){R=t.substr(w+1);T=this.parse(R,v);o=o.substr(0,_)+"\\["+T[0];l=l||T[1]}for(k=d.pop();k;k=d.pop()){var C=o.slice(k.reStart+k.open.length);this.debug("setting tail",o,k);C=C.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(t,r,i){if(!i){i="\\"}return r+r+i+"|"}));this.debug("tail=%j\n %s",C,C,k,o);var P=k.type==="*"?h:k.type==="?"?c:"\\"+k.type;l=true;o=o.slice(0,k.reStart)+P+"\\("+C}clearStateChar();if(p){o+="\\\\"}var I=false;switch(o.charAt(0)){case"[":case".":case"(":I=true}for(var L=g.length-1;L>-1;L--){var M=g[L];var N=o.slice(0,M.reStart);var j=o.slice(M.reStart,M.reEnd-8);var D=o.slice(M.reEnd-8,M.reEnd);var $=o.slice(M.reEnd);D+=$;var B=N.split("(").length-1;var H=$;for(x=0;x<B;x++){H=H.replace(/\)[+*?]?/,"")}$=H;var W="";if($===""&&r!==v){W="$"}var G=N+j+$+W+D;o=G}if(o!==""&&l){o="(?=.)"+o}if(I){o=S+o}if(r===v){return[o,l]}if(!l){return globUnescape(t)}var U=i.nocase?"i":"";try{var V=new RegExp("^"+o+"$",U)}catch(t){return new RegExp("$.")}V._glob=t;V._src=o;return V}minimatch.makeRe=function(t,r){return new Minimatch(t,r||{}).makeRe()};Minimatch.prototype.makeRe=makeRe;function makeRe(){if(this.regexp||this.regexp===false)return this.regexp;var t=this.set;if(!t.length){this.regexp=false;return this.regexp}var r=this.options;var i=r.noglobstar?h:r.dot?p:d;var o=r.nocase?"i":"";var l=t.map((function(t){return t.map((function(t){return t===a?i:typeof t==="string"?regExpEscape(t):t._src})).join("\\/")})).join("|");l="^(?:"+l+")$";if(this.negate)l="^(?!"+l+").*$";try{this.regexp=new RegExp(l,o)}catch(t){this.regexp=false}return this.regexp}minimatch.match=function(t,r,i){i=i||{};var o=new Minimatch(r,i);t=t.filter((function(t){return o.match(t)}));if(o.options.nonull&&!t.length){t.push(r)}return t};Minimatch.prototype.match=function match(t,r){if(typeof r==="undefined")r=this.partial;this.debug("match",t,this.pattern);if(this.comment)return false;if(this.empty)return t==="";if(t==="/"&&r)return true;var i=this.options;if(o.sep!=="/"){t=t.split(o.sep).join("/")}t=t.split(g);this.debug(this.pattern,"split",t);var a=this.set;this.debug(this.pattern,"set",a);var l;var u;for(u=t.length-1;u>=0;u--){l=t[u];if(l)break}for(u=0;u<a.length;u++){var c=a[u];var h=t;if(i.matchBase&&c.length===1){h=[l]}var p=this.matchOne(h,c,r);if(p){if(i.flipNegate)return true;return!this.negate}}if(i.flipNegate)return false;return this.negate};Minimatch.prototype.matchOne=function(t,r,i){var o=this.options;this.debug("matchOne",{this:this,file:t,pattern:r});this.debug("matchOne",t.length,r.length);for(var l=0,u=0,c=t.length,h=r.length;l<c&&u<h;l++,u++){this.debug("matchOne loop");var p=r[u];var d=t[l];this.debug(r,p,d);if(p===false)return false;if(p===a){this.debug("GLOBSTAR",[r,p,d]);var m=l;var g=u+1;if(g===h){this.debug("** at the end");for(;l<c;l++){if(t[l]==="."||t[l]===".."||!o.dot&&t[l].charAt(0)===".")return false}return true}while(m<c){var y=t[m];this.debug("\nglobstar while",t,m,r,g,y);if(this.matchOne(t.slice(m),r.slice(g),i)){this.debug("globstar found match!",m,c,y);return true}else{if(y==="."||y===".."||!o.dot&&y.charAt(0)==="."){this.debug("dot detected!",t,m,r,g);break}this.debug("globstar swallow a segment, and continue");m++}}if(i){this.debug("\n>>> no match, partial?",t,m,r,g);if(m===c)return true}return false}var v;if(typeof p==="string"){v=d===p;this.debug("string match",p,d,v)}else{v=d.match(p);this.debug("pattern match",p,d,v)}if(!v)return false}if(l===c&&u===h){return true}else if(l===c){return i}else if(u===h){return l===c-1&&t[l]===""}throw new Error("wtf?")};function globUnescape(t){return t.replace(/\\(.)/g,"$1")}function regExpEscape(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},1254:t=>{t.exports=function(t,r){if(!r)r={};var i={bools:{},strings:{},unknownFn:null};if(typeof r["unknown"]==="function"){i.unknownFn=r["unknown"]}if(typeof r["boolean"]==="boolean"&&r["boolean"]){i.allBools=true}else{[].concat(r["boolean"]).filter(Boolean).forEach((function(t){i.bools[t]=true}))}var o={};Object.keys(r.alias||{}).forEach((function(t){o[t]=[].concat(r.alias[t]);o[t].forEach((function(r){o[r]=[t].concat(o[t].filter((function(t){return r!==t})))}))}));[].concat(r.string).filter(Boolean).forEach((function(t){i.strings[t]=true;if(o[t]){i.strings[o[t]]=true}}));var a=r["default"]||{};var l={_:[]};Object.keys(i.bools).forEach((function(t){setArg(t,a[t]===undefined?false:a[t])}));var u=[];if(t.indexOf("--")!==-1){u=t.slice(t.indexOf("--")+1);t=t.slice(0,t.indexOf("--"))}function argDefined(t,r){return i.allBools&&/^--[^=]+$/.test(r)||i.strings[t]||i.bools[t]||o[t]}function setArg(t,r,a){if(a&&i.unknownFn&&!argDefined(t,a)){if(i.unknownFn(a)===false)return}var u=!i.strings[t]&&isNumber(r)?Number(r):r;setKey(l,t.split("."),u);(o[t]||[]).forEach((function(t){setKey(l,t.split("."),u)}))}function setKey(t,r,o){var a=t;for(var l=0;l<r.length-1;l++){var u=r[l];if(isConstructorOrProto(a,u))return;if(a[u]===undefined)a[u]={};if(a[u]===Object.prototype||a[u]===Number.prototype||a[u]===String.prototype)a[u]={};if(a[u]===Array.prototype)a[u]=[];a=a[u]}var u=r[r.length-1];if(isConstructorOrProto(a,u))return;if(a===Object.prototype||a===Number.prototype||a===String.prototype)a={};if(a===Array.prototype)a=[];if(a[u]===undefined||i.bools[u]||typeof a[u]==="boolean"){a[u]=o}else if(Array.isArray(a[u])){a[u].push(o)}else{a[u]=[a[u],o]}}function aliasIsBoolean(t){return o[t].some((function(t){return i.bools[t]}))}for(var c=0;c<t.length;c++){var h=t[c];if(/^--.+=/.test(h)){var p=h.match(/^--([^=]+)=([\s\S]*)$/);var d=p[1];var m=p[2];if(i.bools[d]){m=m!=="false"}setArg(d,m,h)}else if(/^--no-.+/.test(h)){var d=h.match(/^--no-(.+)/)[1];setArg(d,false,h)}else if(/^--.+/.test(h)){var d=h.match(/^--(.+)/)[1];var g=t[c+1];if(g!==undefined&&!/^-/.test(g)&&!i.bools[d]&&!i.allBools&&(o[d]?!aliasIsBoolean(d):true)){setArg(d,g,h);c++}else if(/^(true|false)$/.test(g)){setArg(d,g==="true",h);c++}else{setArg(d,i.strings[d]?"":true,h)}}else if(/^-[^-]+/.test(h)){var y=h.slice(1,-1).split("");var v=false;for(var b=0;b<y.length;b++){var g=h.slice(b+2);if(g==="-"){setArg(y[b],g,h);continue}if(/[A-Za-z]/.test(y[b])&&/=/.test(g)){setArg(y[b],g.split("=")[1],h);v=true;break}if(/[A-Za-z]/.test(y[b])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(g)){setArg(y[b],g,h);v=true;break}if(y[b+1]&&y[b+1].match(/\W/)){setArg(y[b],h.slice(b+2),h);v=true;break}else{setArg(y[b],i.strings[y[b]]?"":true,h)}}var d=h.slice(-1)[0];if(!v&&d!=="-"){if(t[c+1]&&!/^(-|--)[^-]/.test(t[c+1])&&!i.bools[d]&&(o[d]?!aliasIsBoolean(d):true)){setArg(d,t[c+1],h);c++}else if(t[c+1]&&/^(true|false)$/.test(t[c+1])){setArg(d,t[c+1]==="true",h);c++}else{setArg(d,i.strings[d]?"":true,h)}}}else{if(!i.unknownFn||i.unknownFn(h)!==false){l._.push(i.strings["_"]||!isNumber(h)?h:Number(h))}if(r.stopEarly){l._.push.apply(l._,t.slice(c+1));break}}}Object.keys(a).forEach((function(t){if(!hasKey(l,t.split("."))){setKey(l,t.split("."),a[t]);(o[t]||[]).forEach((function(r){setKey(l,r.split("."),a[t])}))}}));if(r["--"]){l["--"]=new Array;u.forEach((function(t){l["--"].push(t)}))}else{u.forEach((function(t){l._.push(t)}))}return l};function hasKey(t,r){var i=t;r.slice(0,-1).forEach((function(t){i=i[t]||{}}));var o=r[r.length-1];return o in i}function isNumber(t){if(typeof t==="number")return true;if(/^0x[0-9a-f]+$/i.test(t))return true;return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function isConstructorOrProto(t,r){return r==="constructor"&&typeof t[r]==="function"||r==="__proto__"}},3134:(t,r,i)=>{var o=i(3837).inherits;var NestedError=function(t,r){this.nested=r;if(t instanceof Error){r=t}else if(typeof t!=="undefined"){Object.defineProperty(this,"message",{value:t,writable:true,enumerable:false,configurable:true})}Error.captureStackTrace(this,this.constructor);var i=Object.getOwnPropertyDescriptor(this,"stack");var o=buildStackDescriptor(i,r);Object.defineProperty(this,"stack",o)};function buildStackDescriptor(t,r){if(t.get){return{get:function(){var r=t.get.call(this);return buildCombinedStacks(r,this.nested)}}}else{var i=t.value;return{value:buildCombinedStacks(i,r)}}}function buildCombinedStacks(t,r){if(r){t+="\nCaused By: "+r.stack}return t}o(NestedError,Error);NestedError.prototype.name="NestedError";t.exports=NestedError},4119:t=>{
111
111
  /*!
112
112
  * normalize-path <https://github.com/jonschlinkert/normalize-path>
113
113
  *
114
114
  * Copyright (c) 2014-2018, Jon Schlinkert.
115
115
  * Released under the MIT License.
116
116
  */
117
- t.exports=function(t,r){if(typeof t!=="string"){throw new TypeError("expected path to be a string")}if(t==="\\"||t==="/")return"/";var i=t.length;if(i<=1)return t;var o="";if(i>4&&t[3]==="\\"){var a=t[2];if((a==="?"||a===".")&&t.slice(0,2)==="\\\\"){t=t.slice(2);o="//"}}var l=t.split(/[/\\]+/);if(r!==false&&l[l.length-1]===""){l.pop()}return o+l.join("/")}},9852:(t,r,i)=>{var o=i(3270);t.exports=o(once);t.exports.strict=o(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(t){var f=function(){if(f.called)return f.value;f.called=true;return f.value=t.apply(this,arguments)};f.called=false;return f}function onceStrict(t){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=t.apply(this,arguments)};var r=t.name||"Function wrapped with `once`";f.onceError=r+" shouldn't be called more than once";f.called=false;return f}},6415:(t,r,i)=>{"use strict";const o=i(2816);const a=Symbol.asyncIterator||"@@asyncIterator";const normalizeEmitter=t=>{const r=t.on||t.addListener||t.addEventListener;const i=t.off||t.removeListener||t.removeEventListener;if(!r||!i){throw new TypeError("Emitter is not compatible")}return{addListener:r.bind(t),removeListener:i.bind(t)}};const toArray=t=>Array.isArray(t)?t:[t];const multiple=(t,r,i)=>{let a;const l=new Promise(((o,l)=>{i={rejectionEvents:["error"],multiArgs:false,resolveImmediately:false,...i};if(!(i.count>=0&&(i.count===Infinity||Number.isInteger(i.count)))){throw new TypeError("The `count` option should be at least 0 or more")}const u=toArray(r);const c=[];const{addListener:h,removeListener:p}=normalizeEmitter(t);const onItem=(...t)=>{const r=i.multiArgs?t:t[0];if(i.filter&&!i.filter(r)){return}c.push(r);if(i.count===c.length){a();o(c)}};const rejectHandler=t=>{a();l(t)};a=()=>{for(const t of u){p(t,onItem)}for(const t of i.rejectionEvents){p(t,rejectHandler)}};for(const t of u){h(t,onItem)}for(const t of i.rejectionEvents){h(t,rejectHandler)}if(i.resolveImmediately){o(c)}}));l.cancel=a;if(typeof i.timeout==="number"){const t=o(l,i.timeout);t.cancel=a;return t}return l};const pEvent=(t,r,i)=>{if(typeof i==="function"){i={filter:i}}i={...i,count:1,resolveImmediately:false};const o=multiple(t,r,i);const a=o.then((t=>t[0]));a.cancel=o.cancel;return a};t.exports=pEvent;t.exports["default"]=pEvent;t.exports.multiple=multiple;t.exports.iterator=(t,r,i)=>{if(typeof i==="function"){i={filter:i}}const o=toArray(r);i={rejectionEvents:["error"],resolutionEvents:[],limit:Infinity,multiArgs:false,...i};const{limit:l}=i;const u=l>=0&&(l===Infinity||Number.isInteger(l));if(!u){throw new TypeError("The `limit` option should be a non-negative integer or Infinity")}if(l===0){return{[Symbol.asyncIterator](){return this},async next(){return{done:true,value:undefined}}}}const{addListener:c,removeListener:h}=normalizeEmitter(t);let p=false;let d;let m=false;const g=[];const y=[];let v=0;let b=false;const valueHandler=(...t)=>{v++;b=v===l;const r=i.multiArgs?t:t[0];if(g.length>0){const{resolve:t}=g.shift();t({done:false,value:r});if(b){cancel()}return}y.push(r);if(b){cancel()}};const cancel=()=>{p=true;for(const t of o){h(t,valueHandler)}for(const t of i.rejectionEvents){h(t,rejectHandler)}for(const t of i.resolutionEvents){h(t,resolveHandler)}while(g.length>0){const{resolve:t}=g.shift();t({done:true,value:undefined})}};const rejectHandler=(...t)=>{d=i.multiArgs?t:t[0];if(g.length>0){const{reject:t}=g.shift();t(d)}else{m=true}cancel()};const resolveHandler=(...t)=>{const r=i.multiArgs?t:t[0];if(i.filter&&!i.filter(r)){return}if(g.length>0){const{resolve:t}=g.shift();t({done:true,value:r})}else{y.push(r)}cancel()};for(const t of o){c(t,valueHandler)}for(const t of i.rejectionEvents){c(t,rejectHandler)}for(const t of i.resolutionEvents){c(t,resolveHandler)}return{[a](){return this},async next(){if(y.length>0){const t=y.shift();return{done:p&&y.length===0&&!b,value:t}}if(m){m=false;throw d}if(p){return{done:true,value:undefined}}return new Promise(((t,r)=>g.push({resolve:t,reject:r})))},async return(t){cancel();return{done:p,value:t}}}};t.exports.TimeoutError=o.TimeoutError},8213:t=>{"use strict";t.exports=(t,r)=>{r=r||(()=>{});return t.then((t=>new Promise((t=>{t(r())})).then((()=>t))),(t=>new Promise((t=>{t(r())})).then((()=>{throw t}))))}},2816:(t,r,i)=>{"use strict";const o=i(8213);class TimeoutError extends Error{constructor(t){super(t);this.name="TimeoutError"}}const pTimeout=(t,r,i)=>new Promise(((a,l)=>{if(typeof r!=="number"||r<0){throw new TypeError("Expected `milliseconds` to be a positive number")}if(r===Infinity){a(t);return}const u=setTimeout((()=>{if(typeof i==="function"){try{a(i())}catch(t){l(t)}return}const o=typeof i==="string"?i:`Promise timed out after ${r} milliseconds`;const u=i instanceof Error?i:new TimeoutError(o);if(typeof t.cancel==="function"){t.cancel()}l(u)}),r);o(t.then(a,l),(()=>{clearTimeout(u)}))}));t.exports=pTimeout;t.exports["default"]=pTimeout;t.exports.TimeoutError=TimeoutError},6230:t=>{"use strict";function posix(t){return t.charAt(0)==="/"}function win32(t){var r=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var i=r.exec(t);var o=i[1]||"";var a=Boolean(o&&o.charAt(1)!==":");return Boolean(i[2]||a)}t.exports=process.platform==="win32"?win32:posix;t.exports.posix=posix;t.exports.win32=win32},2799:t=>{"use strict";const pathKey=(t={})=>{const r=t.env||process.env;const i=t.platform||process.platform;if(i!=="win32"){return"PATH"}return Object.keys(r).reverse().find((t=>t.toUpperCase()==="PATH"))||"Path"};t.exports=pathKey;t.exports["default"]=pathKey},4997:(t,r,i)=>{"use strict";const{promisify:o}=i(3837);const a=i(7147);async function isType(t,r,i){if(typeof i!=="string"){throw new TypeError(`Expected a string, got ${typeof i}`)}try{const l=await o(a[t])(i);return l[r]()}catch(t){if(t.code==="ENOENT"){return false}throw t}}function isTypeSync(t,r,i){if(typeof i!=="string"){throw new TypeError(`Expected a string, got ${typeof i}`)}try{return a[t](i)[r]()}catch(t){if(t.code==="ENOENT"){return false}throw t}}r.isFile=isType.bind(null,"stat","isFile");r.isDirectory=isType.bind(null,"stat","isDirectory");r.isSymlink=isType.bind(null,"lstat","isSymbolicLink");r.isFileSync=isTypeSync.bind(null,"statSync","isFile");r.isDirectorySync=isTypeSync.bind(null,"statSync","isDirectory");r.isSymlinkSync=isTypeSync.bind(null,"lstatSync","isSymbolicLink")},3846:(t,r,i)=>{"use strict";t.exports=i(7250)},7798:(t,r,i)=>{"use strict";const o=i(1017);const a="\\\\/";const l=`[^${a}]`;const u="\\.";const c="\\+";const h="\\?";const p="\\/";const d="(?=.)";const m="[^/]";const g=`(?:${p}|$)`;const y=`(?:^|${p})`;const v=`${u}{1,2}${g}`;const b=`(?!${u})`;const _=`(?!${y}${v})`;const w=`(?!${u}{0,1}${g})`;const S=`(?!${v})`;const E=`[^.${p}]`;const x=`${m}*?`;const A={DOT_LITERAL:u,PLUS_LITERAL:c,QMARK_LITERAL:h,SLASH_LITERAL:p,ONE_CHAR:d,QMARK:m,END_ANCHOR:g,DOTS_SLASH:v,NO_DOT:b,NO_DOTS:_,NO_DOT_SLASH:w,NO_DOTS_SLASH:S,QMARK_NO_DOT:E,STAR:x,START_ANCHOR:y};const O={...A,SLASH_LITERAL:`[${a}]`,QMARK:l,STAR:`${l}*?`,DOTS_SLASH:`${u}{1,2}(?:[${a}]|$)`,NO_DOT:`(?!${u})`,NO_DOTS:`(?!(?:^|[${a}])${u}{1,2}(?:[${a}]|$))`,NO_DOT_SLASH:`(?!${u}{0,1}(?:[${a}]|$))`,NO_DOTS_SLASH:`(?!${u}{1,2}(?:[${a}]|$))`,QMARK_NO_DOT:`[^.${a}]`,START_ANCHOR:`(?:^|[${a}])`,END_ANCHOR:`(?:[${a}]|$)`};const k={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:k,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:o.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===true?O:A}}},3632:(t,r,i)=>{"use strict";const o=i(7798);const a=i(5502);const{MAX_LENGTH:l,POSIX_REGEX_SOURCE:u,REGEX_NON_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_BACKREF:h,REPLACEMENTS:p}=o;const expandRange=(t,r)=>{if(typeof r.expandRange==="function"){return r.expandRange(...t,r)}t.sort();const i=`[${t.join("-")}]`;try{new RegExp(i)}catch(r){return t.map((t=>a.escapeRegex(t))).join("..")}return i};const syntaxError=(t,r)=>`Missing ${t}: "${r}" - use "\\\\${r}" to match literal characters`;const parse=(t,r)=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}t=p[t]||t;const i={...r};const d=typeof i.maxLength==="number"?Math.min(l,i.maxLength):l;let m=t.length;if(m>d){throw new SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${d}`)}const g={type:"bos",value:"",output:i.prepend||""};const y=[g];const v=i.capture?"":"?:";const b=a.isWindows(r);const _=o.globChars(b);const w=o.extglobChars(_);const{DOT_LITERAL:S,PLUS_LITERAL:E,SLASH_LITERAL:x,ONE_CHAR:A,DOTS_SLASH:O,NO_DOT:k,NO_DOT_SLASH:R,NO_DOTS_SLASH:T,QMARK:C,QMARK_NO_DOT:P,STAR:I,START_ANCHOR:L}=_;const globstar=t=>`(${v}(?:(?!${L}${t.dot?O:S}).)*?)`;const M=i.dot?"":k;const N=i.dot?C:P;let D=i.bash===true?globstar(i):I;if(i.capture){D=`(${D})`}if(typeof i.noext==="boolean"){i.noextglob=i.noext}const j={input:t,index:-1,start:0,dot:i.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:y};t=a.removePrefix(t,j);m=t.length;const $=[];const B=[];const H=[];let W=g;let G;const eos=()=>j.index===m-1;const U=j.peek=(r=1)=>t[j.index+r];const V=j.advance=()=>t[++j.index]||"";const remaining=()=>t.slice(j.index+1);const consume=(t="",r=0)=>{j.consumed+=t;j.index+=r};const append=t=>{j.output+=t.output!=null?t.output:t.value;consume(t.value)};const negate=()=>{let t=1;while(U()==="!"&&(U(2)!=="("||U(3)==="?")){V();j.start++;t++}if(t%2===0){return false}j.negated=true;j.start++;return true};const increment=t=>{j[t]++;H.push(t)};const decrement=t=>{j[t]--;H.pop()};const push=t=>{if(W.type==="globstar"){const r=j.braces>0&&(t.type==="comma"||t.type==="brace");const i=t.extglob===true||$.length&&(t.type==="pipe"||t.type==="paren");if(t.type!=="slash"&&t.type!=="paren"&&!r&&!i){j.output=j.output.slice(0,-W.output.length);W.type="star";W.value="*";W.output=D;j.output+=W.output}}if($.length&&t.type!=="paren"){$[$.length-1].inner+=t.value}if(t.value||t.output)append(t);if(W&&W.type==="text"&&t.type==="text"){W.value+=t.value;W.output=(W.output||"")+t.value;return}t.prev=W;y.push(t);W=t};const extglobOpen=(t,r)=>{const o={...w[r],conditions:1,inner:""};o.prev=W;o.parens=j.parens;o.output=j.output;const a=(i.capture?"(":"")+o.open;increment("parens");push({type:t,value:r,output:j.output?"":A});push({type:"paren",extglob:true,value:V(),output:a});$.push(o)};const extglobClose=t=>{let o=t.close+(i.capture?")":"");let a;if(t.type==="negate"){let l=D;if(t.inner&&t.inner.length>1&&t.inner.includes("/")){l=globstar(i)}if(l!==D||eos()||/^\)+$/.test(remaining())){o=t.close=`)$))${l}`}if(t.inner.includes("*")&&(a=remaining())&&/^\.[^\\/.]+$/.test(a)){const i=parse(a,{...r,fastpaths:false}).output;o=t.close=`)${i})${l})`}if(t.prev.type==="bos"){j.negatedExtglob=true}}push({type:"paren",extglob:true,value:G,output:o});decrement("parens")};if(i.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let o=false;let l=t.replace(h,((t,r,i,a,l,u)=>{if(a==="\\"){o=true;return t}if(a==="?"){if(r){return r+a+(l?C.repeat(l.length):"")}if(u===0){return N+(l?C.repeat(l.length):"")}return C.repeat(i.length)}if(a==="."){return S.repeat(i.length)}if(a==="*"){if(r){return r+a+(l?D:"")}return D}return r?t:`\\${t}`}));if(o===true){if(i.unescape===true){l=l.replace(/\\/g,"")}else{l=l.replace(/\\+/g,(t=>t.length%2===0?"\\\\":t?"\\":""))}}if(l===t&&i.contains===true){j.output=t;return j}j.output=a.wrapOutput(l,j,r);return j}while(!eos()){G=V();if(G==="\0"){continue}if(G==="\\"){const t=U();if(t==="/"&&i.bash!==true){continue}if(t==="."||t===";"){continue}if(!t){G+="\\";push({type:"text",value:G});continue}const r=/^\\+/.exec(remaining());let o=0;if(r&&r[0].length>2){o=r[0].length;j.index+=o;if(o%2!==0){G+="\\"}}if(i.unescape===true){G=V()}else{G+=V()}if(j.brackets===0){push({type:"text",value:G});continue}}if(j.brackets>0&&(G!=="]"||W.value==="["||W.value==="[^")){if(i.posix!==false&&G===":"){const t=W.value.slice(1);if(t.includes("[")){W.posix=true;if(t.includes(":")){const t=W.value.lastIndexOf("[");const r=W.value.slice(0,t);const i=W.value.slice(t+2);const o=u[i];if(o){W.value=r+o;j.backtrack=true;V();if(!g.output&&y.indexOf(W)===1){g.output=A}continue}}}}if(G==="["&&U()!==":"||G==="-"&&U()==="]"){G=`\\${G}`}if(G==="]"&&(W.value==="["||W.value==="[^")){G=`\\${G}`}if(i.posix===true&&G==="!"&&W.value==="["){G="^"}W.value+=G;append({value:G});continue}if(j.quotes===1&&G!=='"'){G=a.escapeRegex(G);W.value+=G;append({value:G});continue}if(G==='"'){j.quotes=j.quotes===1?0:1;if(i.keepQuotes===true){push({type:"text",value:G})}continue}if(G==="("){increment("parens");push({type:"paren",value:G});continue}if(G===")"){if(j.parens===0&&i.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const t=$[$.length-1];if(t&&j.parens===t.parens+1){extglobClose($.pop());continue}push({type:"paren",value:G,output:j.parens?")":"\\)"});decrement("parens");continue}if(G==="["){if(i.nobracket===true||!remaining().includes("]")){if(i.nobracket!==true&&i.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}G=`\\${G}`}else{increment("brackets")}push({type:"bracket",value:G});continue}if(G==="]"){if(i.nobracket===true||W&&W.type==="bracket"&&W.value.length===1){push({type:"text",value:G,output:`\\${G}`});continue}if(j.brackets===0){if(i.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:G,output:`\\${G}`});continue}decrement("brackets");const t=W.value.slice(1);if(W.posix!==true&&t[0]==="^"&&!t.includes("/")){G=`/${G}`}W.value+=G;append({value:G});if(i.literalBrackets===false||a.hasRegexChars(t)){continue}const r=a.escapeRegex(W.value);j.output=j.output.slice(0,-W.value.length);if(i.literalBrackets===true){j.output+=r;W.value=r;continue}W.value=`(${v}${r}|${W.value})`;j.output+=W.value;continue}if(G==="{"&&i.nobrace!==true){increment("braces");const t={type:"brace",value:G,output:"(",outputIndex:j.output.length,tokensIndex:j.tokens.length};B.push(t);push(t);continue}if(G==="}"){const t=B[B.length-1];if(i.nobrace===true||!t){push({type:"text",value:G,output:G});continue}let r=")";if(t.dots===true){const t=y.slice();const o=[];for(let r=t.length-1;r>=0;r--){y.pop();if(t[r].type==="brace"){break}if(t[r].type!=="dots"){o.unshift(t[r].value)}}r=expandRange(o,i);j.backtrack=true}if(t.comma!==true&&t.dots!==true){const i=j.output.slice(0,t.outputIndex);const o=j.tokens.slice(t.tokensIndex);t.value=t.output="\\{";G=r="\\}";j.output=i;for(const t of o){j.output+=t.output||t.value}}push({type:"brace",value:G,output:r});decrement("braces");B.pop();continue}if(G==="|"){if($.length>0){$[$.length-1].conditions++}push({type:"text",value:G});continue}if(G===","){let t=G;const r=B[B.length-1];if(r&&H[H.length-1]==="braces"){r.comma=true;t="|"}push({type:"comma",value:G,output:t});continue}if(G==="/"){if(W.type==="dot"&&j.index===j.start+1){j.start=j.index+1;j.consumed="";j.output="";y.pop();W=g;continue}push({type:"slash",value:G,output:x});continue}if(G==="."){if(j.braces>0&&W.type==="dot"){if(W.value===".")W.output=S;const t=B[B.length-1];W.type="dots";W.output+=G;W.value+=G;t.dots=true;continue}if(j.braces+j.parens===0&&W.type!=="bos"&&W.type!=="slash"){push({type:"text",value:G,output:S});continue}push({type:"dot",value:G,output:S});continue}if(G==="?"){const t=W&&W.value==="(";if(!t&&i.noextglob!==true&&U()==="("&&U(2)!=="?"){extglobOpen("qmark",G);continue}if(W&&W.type==="paren"){const t=U();let r=G;if(t==="<"&&!a.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(W.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(remaining())){r=`\\${G}`}push({type:"text",value:G,output:r});continue}if(i.dot!==true&&(W.type==="slash"||W.type==="bos")){push({type:"qmark",value:G,output:P});continue}push({type:"qmark",value:G,output:C});continue}if(G==="!"){if(i.noextglob!==true&&U()==="("){if(U(2)!=="?"||!/[!=<:]/.test(U(3))){extglobOpen("negate",G);continue}}if(i.nonegate!==true&&j.index===0){negate();continue}}if(G==="+"){if(i.noextglob!==true&&U()==="("&&U(2)!=="?"){extglobOpen("plus",G);continue}if(W&&W.value==="("||i.regex===false){push({type:"plus",value:G,output:E});continue}if(W&&(W.type==="bracket"||W.type==="paren"||W.type==="brace")||j.parens>0){push({type:"plus",value:G});continue}push({type:"plus",value:E});continue}if(G==="@"){if(i.noextglob!==true&&U()==="("&&U(2)!=="?"){push({type:"at",extglob:true,value:G,output:""});continue}push({type:"text",value:G});continue}if(G!=="*"){if(G==="$"||G==="^"){G=`\\${G}`}const t=c.exec(remaining());if(t){G+=t[0];j.index+=t[0].length}push({type:"text",value:G});continue}if(W&&(W.type==="globstar"||W.star===true)){W.type="star";W.star=true;W.value+=G;W.output=D;j.backtrack=true;j.globstar=true;consume(G);continue}let r=remaining();if(i.noextglob!==true&&/^\([^?]/.test(r)){extglobOpen("star",G);continue}if(W.type==="star"){if(i.noglobstar===true){consume(G);continue}const o=W.prev;const a=o.prev;const l=o.type==="slash"||o.type==="bos";const u=a&&(a.type==="star"||a.type==="globstar");if(i.bash===true&&(!l||r[0]&&r[0]!=="/")){push({type:"star",value:G,output:""});continue}const c=j.braces>0&&(o.type==="comma"||o.type==="brace");const h=$.length&&(o.type==="pipe"||o.type==="paren");if(!l&&o.type!=="paren"&&!c&&!h){push({type:"star",value:G,output:""});continue}while(r.slice(0,3)==="/**"){const i=t[j.index+4];if(i&&i!=="/"){break}r=r.slice(3);consume("/**",3)}if(o.type==="bos"&&eos()){W.type="globstar";W.value+=G;W.output=globstar(i);j.output=W.output;j.globstar=true;consume(G);continue}if(o.type==="slash"&&o.prev.type!=="bos"&&!u&&eos()){j.output=j.output.slice(0,-(o.output+W.output).length);o.output=`(?:${o.output}`;W.type="globstar";W.output=globstar(i)+(i.strictSlashes?")":"|$)");W.value+=G;j.globstar=true;j.output+=o.output+W.output;consume(G);continue}if(o.type==="slash"&&o.prev.type!=="bos"&&r[0]==="/"){const t=r[1]!==void 0?"|$":"";j.output=j.output.slice(0,-(o.output+W.output).length);o.output=`(?:${o.output}`;W.type="globstar";W.output=`${globstar(i)}${x}|${x}${t})`;W.value+=G;j.output+=o.output+W.output;j.globstar=true;consume(G+V());push({type:"slash",value:"/",output:""});continue}if(o.type==="bos"&&r[0]==="/"){W.type="globstar";W.value+=G;W.output=`(?:^|${x}|${globstar(i)}${x})`;j.output=W.output;j.globstar=true;consume(G+V());push({type:"slash",value:"/",output:""});continue}j.output=j.output.slice(0,-W.output.length);W.type="globstar";W.output=globstar(i);W.value+=G;j.output+=W.output;j.globstar=true;consume(G);continue}const o={type:"star",value:G,output:D};if(i.bash===true){o.output=".*?";if(W.type==="bos"||W.type==="slash"){o.output=M+o.output}push(o);continue}if(W&&(W.type==="bracket"||W.type==="paren")&&i.regex===true){o.output=G;push(o);continue}if(j.index===j.start||W.type==="slash"||W.type==="dot"){if(W.type==="dot"){j.output+=R;W.output+=R}else if(i.dot===true){j.output+=T;W.output+=T}else{j.output+=M;W.output+=M}if(U()!=="*"){j.output+=A;W.output+=A}}push(o)}while(j.brackets>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));j.output=a.escapeLast(j.output,"[");decrement("brackets")}while(j.parens>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));j.output=a.escapeLast(j.output,"(");decrement("parens")}while(j.braces>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));j.output=a.escapeLast(j.output,"{");decrement("braces")}if(i.strictSlashes!==true&&(W.type==="star"||W.type==="bracket")){push({type:"maybe_slash",value:"",output:`${x}?`})}if(j.backtrack===true){j.output="";for(const t of j.tokens){j.output+=t.output!=null?t.output:t.value;if(t.suffix){j.output+=t.suffix}}}return j};parse.fastpaths=(t,r)=>{const i={...r};const u=typeof i.maxLength==="number"?Math.min(l,i.maxLength):l;const c=t.length;if(c>u){throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${u}`)}t=p[t]||t;const h=a.isWindows(r);const{DOT_LITERAL:d,SLASH_LITERAL:m,ONE_CHAR:g,DOTS_SLASH:y,NO_DOT:v,NO_DOTS:b,NO_DOTS_SLASH:_,STAR:w,START_ANCHOR:S}=o.globChars(h);const E=i.dot?b:v;const x=i.dot?_:v;const A=i.capture?"":"?:";const O={negated:false,prefix:""};let k=i.bash===true?".*?":w;if(i.capture){k=`(${k})`}const globstar=t=>{if(t.noglobstar===true)return k;return`(${A}(?:(?!${S}${t.dot?y:d}).)*?)`};const create=t=>{switch(t){case"*":return`${E}${g}${k}`;case".*":return`${d}${g}${k}`;case"*.*":return`${E}${k}${d}${g}${k}`;case"*/*":return`${E}${k}${m}${g}${x}${k}`;case"**":return E+globstar(i);case"**/*":return`(?:${E}${globstar(i)}${m})?${x}${g}${k}`;case"**/*.*":return`(?:${E}${globstar(i)}${m})?${x}${k}${d}${g}${k}`;case"**/.*":return`(?:${E}${globstar(i)}${m})?${d}${g}${k}`;default:{const r=/^(.*?)\.(\w+)$/.exec(t);if(!r)return;const i=create(r[1]);if(!i)return;return i+d+r[2]}}};const R=a.removePrefix(t,O);let T=create(R);if(T&&i.strictSlashes!==true){T+=`${m}?`}return T};t.exports=parse},7250:(t,r,i)=>{"use strict";const o=i(1017);const a=i(2964);const l=i(3632);const u=i(5502);const c=i(7798);const isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);const picomatch=(t,r,i=false)=>{if(Array.isArray(t)){const o=t.map((t=>picomatch(t,r,i)));const arrayMatcher=t=>{for(const r of o){const i=r(t);if(i)return i}return false};return arrayMatcher}const o=isObject(t)&&t.tokens&&t.input;if(t===""||typeof t!=="string"&&!o){throw new TypeError("Expected pattern to be a non-empty string")}const a=r||{};const l=u.isWindows(r);const c=o?picomatch.compileRe(t,r):picomatch.makeRe(t,r,false,true);const h=c.state;delete c.state;let isIgnored=()=>false;if(a.ignore){const t={...r,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(a.ignore,t,i)}const matcher=(i,o=false)=>{const{isMatch:u,match:p,output:d}=picomatch.test(i,c,r,{glob:t,posix:l});const m={glob:t,state:h,regex:c,posix:l,input:i,output:d,match:p,isMatch:u};if(typeof a.onResult==="function"){a.onResult(m)}if(u===false){m.isMatch=false;return o?m:false}if(isIgnored(i)){if(typeof a.onIgnore==="function"){a.onIgnore(m)}m.isMatch=false;return o?m:false}if(typeof a.onMatch==="function"){a.onMatch(m)}return o?m:true};if(i){matcher.state=h}return matcher};picomatch.test=(t,r,i,{glob:o,posix:a}={})=>{if(typeof t!=="string"){throw new TypeError("Expected input to be a string")}if(t===""){return{isMatch:false,output:""}}const l=i||{};const c=l.format||(a?u.toPosixSlashes:null);let h=t===o;let p=h&&c?c(t):t;if(h===false){p=c?c(t):t;h=p===o}if(h===false||l.capture===true){if(l.matchBase===true||l.basename===true){h=picomatch.matchBase(t,r,i,a)}else{h=r.exec(p)}}return{isMatch:Boolean(h),match:h,output:p}};picomatch.matchBase=(t,r,i,a=u.isWindows(i))=>{const l=r instanceof RegExp?r:picomatch.makeRe(r,i);return l.test(o.basename(t))};picomatch.isMatch=(t,r,i)=>picomatch(r,i)(t);picomatch.parse=(t,r)=>{if(Array.isArray(t))return t.map((t=>picomatch.parse(t,r)));return l(t,{...r,fastpaths:false})};picomatch.scan=(t,r)=>a(t,r);picomatch.compileRe=(t,r,i=false,o=false)=>{if(i===true){return t.output}const a=r||{};const l=a.contains?"":"^";const u=a.contains?"":"$";let c=`${l}(?:${t.output})${u}`;if(t&&t.negated===true){c=`^(?!${c}).*$`}const h=picomatch.toRegex(c,r);if(o===true){h.state=t}return h};picomatch.makeRe=(t,r={},i=false,o=false)=>{if(!t||typeof t!=="string"){throw new TypeError("Expected a non-empty string")}let a={negated:false,fastpaths:true};if(r.fastpaths!==false&&(t[0]==="."||t[0]==="*")){a.output=l.fastpaths(t,r)}if(!a.output){a=l(t,r)}return picomatch.compileRe(a,r,i,o)};picomatch.toRegex=(t,r)=>{try{const i=r||{};return new RegExp(t,i.flags||(i.nocase?"i":""))}catch(t){if(r&&r.debug===true)throw t;return/$^/}};picomatch.constants=c;t.exports=picomatch},2964:(t,r,i)=>{"use strict";const o=i(5502);const{CHAR_ASTERISK:a,CHAR_AT:l,CHAR_BACKWARD_SLASH:u,CHAR_COMMA:c,CHAR_DOT:h,CHAR_EXCLAMATION_MARK:p,CHAR_FORWARD_SLASH:d,CHAR_LEFT_CURLY_BRACE:m,CHAR_LEFT_PARENTHESES:g,CHAR_LEFT_SQUARE_BRACKET:y,CHAR_PLUS:v,CHAR_QUESTION_MARK:b,CHAR_RIGHT_CURLY_BRACE:_,CHAR_RIGHT_PARENTHESES:w,CHAR_RIGHT_SQUARE_BRACKET:S}=i(7798);const isPathSeparator=t=>t===d||t===u;const depth=t=>{if(t.isPrefix!==true){t.depth=t.isGlobstar?Infinity:1}};const scan=(t,r)=>{const i=r||{};const E=t.length-1;const x=i.parts===true||i.scanToEnd===true;const A=[];const O=[];const k=[];let R=t;let T=-1;let C=0;let P=0;let I=false;let L=false;let M=false;let N=false;let D=false;let j=false;let $=false;let B=false;let H=false;let W=false;let G=0;let U;let V;let q={value:"",depth:0,isGlob:false};const eos=()=>T>=E;const peek=()=>R.charCodeAt(T+1);const advance=()=>{U=V;return R.charCodeAt(++T)};while(T<E){V=advance();let t;if(V===u){$=q.backslashes=true;V=advance();if(V===m){j=true}continue}if(j===true||V===m){G++;while(eos()!==true&&(V=advance())){if(V===u){$=q.backslashes=true;advance();continue}if(V===m){G++;continue}if(j!==true&&V===h&&(V=advance())===h){I=q.isBrace=true;M=q.isGlob=true;W=true;if(x===true){continue}break}if(j!==true&&V===c){I=q.isBrace=true;M=q.isGlob=true;W=true;if(x===true){continue}break}if(V===_){G--;if(G===0){j=false;I=q.isBrace=true;W=true;break}}}if(x===true){continue}break}if(V===d){A.push(T);O.push(q);q={value:"",depth:0,isGlob:false};if(W===true)continue;if(U===h&&T===C+1){C+=2;continue}P=T+1;continue}if(i.noext!==true){const t=V===v||V===l||V===a||V===b||V===p;if(t===true&&peek()===g){M=q.isGlob=true;N=q.isExtglob=true;W=true;if(V===p&&T===C){H=true}if(x===true){while(eos()!==true&&(V=advance())){if(V===u){$=q.backslashes=true;V=advance();continue}if(V===w){M=q.isGlob=true;W=true;break}}continue}break}}if(V===a){if(U===a)D=q.isGlobstar=true;M=q.isGlob=true;W=true;if(x===true){continue}break}if(V===b){M=q.isGlob=true;W=true;if(x===true){continue}break}if(V===y){while(eos()!==true&&(t=advance())){if(t===u){$=q.backslashes=true;advance();continue}if(t===S){L=q.isBracket=true;M=q.isGlob=true;W=true;break}}if(x===true){continue}break}if(i.nonegate!==true&&V===p&&T===C){B=q.negated=true;C++;continue}if(i.noparen!==true&&V===g){M=q.isGlob=true;if(x===true){while(eos()!==true&&(V=advance())){if(V===g){$=q.backslashes=true;V=advance();continue}if(V===w){W=true;break}}continue}break}if(M===true){W=true;if(x===true){continue}break}}if(i.noext===true){N=false;M=false}let z=R;let Y="";let K="";if(C>0){Y=R.slice(0,C);R=R.slice(C);P-=C}if(z&&M===true&&P>0){z=R.slice(0,P);K=R.slice(P)}else if(M===true){z="";K=R}else{z=R}if(z&&z!==""&&z!=="/"&&z!==R){if(isPathSeparator(z.charCodeAt(z.length-1))){z=z.slice(0,-1)}}if(i.unescape===true){if(K)K=o.removeBackslashes(K);if(z&&$===true){z=o.removeBackslashes(z)}}const Q={prefix:Y,input:t,start:C,base:z,glob:K,isBrace:I,isBracket:L,isGlob:M,isExtglob:N,isGlobstar:D,negated:B,negatedExtglob:H};if(i.tokens===true){Q.maxDepth=0;if(!isPathSeparator(V)){O.push(q)}Q.tokens=O}if(i.parts===true||i.tokens===true){let r;for(let o=0;o<A.length;o++){const a=r?r+1:C;const l=A[o];const u=t.slice(a,l);if(i.tokens){if(o===0&&C!==0){O[o].isPrefix=true;O[o].value=Y}else{O[o].value=u}depth(O[o]);Q.maxDepth+=O[o].depth}if(o!==0||u!==""){k.push(u)}r=l}if(r&&r+1<t.length){const o=t.slice(r+1);k.push(o);if(i.tokens){O[O.length-1].value=o;depth(O[O.length-1]);Q.maxDepth+=O[O.length-1].depth}}Q.slashes=A;Q.parts=k}return Q};t.exports=scan},5502:(t,r,i)=>{"use strict";const o=i(1017);const a=process.platform==="win32";const{REGEX_BACKSLASH:l,REGEX_REMOVE_BACKSLASH:u,REGEX_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_GLOBAL:h}=i(7798);r.isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);r.hasRegexChars=t=>c.test(t);r.isRegexChar=t=>t.length===1&&r.hasRegexChars(t);r.escapeRegex=t=>t.replace(h,"\\$1");r.toPosixSlashes=t=>t.replace(l,"/");r.removeBackslashes=t=>t.replace(u,(t=>t==="\\"?"":t));r.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);if(t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10){return true}return false};r.isWindows=t=>{if(t&&typeof t.windows==="boolean"){return t.windows}return a===true||o.sep==="\\"};r.escapeLast=(t,i,o)=>{const a=t.lastIndexOf(i,o);if(a===-1)return t;if(t[a-1]==="\\")return r.escapeLast(t,i,a-1);return`${t.slice(0,a)}\\${t.slice(a)}`};r.removePrefix=(t,r={})=>{let i=t;if(i.startsWith("./")){i=i.slice(2);r.prefix="./"}return i};r.wrapOutput=(t,r={},i={})=>{const o=i.contains?"":"^";const a=i.contains?"":"$";let l=`${o}(?:${t})${a}`;if(r.negated===true){l=`(?:^(?!${l}).*$)`}return l}},9182:t=>{"use strict";if(typeof process==="undefined"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){t.exports={nextTick:nextTick}}else{t.exports=process}function nextTick(t,r,i,o){if(typeof t!=="function"){throw new TypeError('"callback" argument must be a function')}var a=arguments.length;var l,u;switch(a){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick((function afterTickOne(){t.call(null,r)}));case 3:return process.nextTick((function afterTickTwo(){t.call(null,r,i)}));case 4:return process.nextTick((function afterTickThree(){t.call(null,r,i,o)}));default:l=new Array(a-1);u=0;while(u<l.length){l[u++]=arguments[u]}return process.nextTick((function afterTick(){t.apply(null,l)}))}}},7127:t=>{"use strict";class DatePart{constructor({token:t,date:r,parts:i,locales:o}){this.token=t;this.date=r||new Date;this.parts=i||[this];this.locales=o||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((r,i)=>i>t&&r instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const r=t.indexOf(this);return t.find(((t,i)=>i>r&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},9009:(t,r,i)=>{"use strict";const o=i(7127);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends o{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let r=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:t}}t.exports=Day},7574:(t,r,i)=>{"use strict";const o=i(7127);class Hours extends o{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},1411:(t,r,i)=>{"use strict";t.exports={DatePart:i(7127),Meridiem:i(4375),Day:i(9009),Hours:i(7574),Milliseconds:i(8284),Minutes:i(2168),Month:i(7001),Seconds:i(3228),Year:i(494)}},4375:(t,r,i)=>{"use strict";const o=i(7127);class Meridiem extends o{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},8284:(t,r,i)=>{"use strict";const o=i(7127);class Milliseconds extends o{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},2168:(t,r,i)=>{"use strict";const o=i(7127);class Minutes extends o{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},7001:(t,r,i)=>{"use strict";const o=i(7127);class Month extends o{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let r=this.token.length;return r===2?String(t+1).padStart(2,"0"):r===3?this.locales.monthsShort[t]:r===4?this.locales.months[t]:String(t+1)}}t.exports=Month},3228:(t,r,i)=>{"use strict";const o=i(7127);class Seconds extends o{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},494:(t,r,i)=>{"use strict";const o=i(7127);class Year extends o{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},6074:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,l,u){try{var c=t[l](u);var h=c.value}catch(t){i(t);return}if(c.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(7836);const a=i(4458);const l=i(1407),u=l.erase,c=l.cursor;const h=i(4115),p=h.style,d=h.clear,m=h.figures,g=h.wrap,y=h.entriesToDisplay;const getVal=(t,r)=>t[r]&&(t[r].value||t[r].title||t[r]);const getTitle=(t,r)=>t[r]&&(t[r].title||t[r].value||t[r]);const getIndex=(t,r)=>{const i=t.findIndex((t=>t.value===r||t.title===r));return i>-1?i:undefined};class AutocompletePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.i18n={noMatches:t.noMatches||"no matches found"};this.fallback=t.fallback||this.initial;this.clearFirst=t.clearFirst||false;this.suggestions=[];this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=p.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=d("",this.out.columns);this.complete(this.render);this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;if(typeof this._fb==="number")t=this.choices[this._fb];else if(typeof this._fb==="string")t={title:this._fb};return t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t;if(this.suggestions.length>0)this.value=getVal(this.suggestions,t);else this.value=this.fallback.value;this.fire()}complete(t){var r=this;return _asyncToGenerator((function*(){const i=r.completing=r.suggest(r.input,r.choices);const o=yield i;if(r.completing!==i)return;r.suggestions=o.map(((t,r,i)=>({title:getTitle(i,r),value:getVal(i,r),description:t.description})));r.completing=false;const a=Math.max(o.length-1,0);r.moveSelect(Math.min(a,r.select));t&&t()}))()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}exit(){if(this.clearFirst&&this.input.length>0){this.reset()}else{this.done=this.exited=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}abort(){this.done=this.aborted=true;this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){let i=this.input.slice(0,this.cursor);let o=this.input.slice(this.cursor);this.input=`${i}${t}${o}`;this.cursor=i.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let r=this.input.slice(this.cursor);this.input=`${t}${r}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let r=this.input.slice(this.cursor+1);this.input=`${t}${r}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions.length-1);this.render()}up(){if(this.select===0){this.moveSelect(this.suggestions.length-1)}else{this.moveSelect(this.select-1)}this.render()}down(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else{this.moveSelect(this.select+1)}this.render()}next(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1));this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0));this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}renderOption(t,r,i,a){let l;let u=i?m.arrowUp:a?m.arrowDown:" ";let c=r?o.cyan().underline(t.title):t.title;u=(r?o.cyan(m.pointer)+" ":" ")+u;if(t.description){l=` - ${t.description}`;if(u.length+c.length+l.length>=this.out.columns||t.description.split(/\r?\n/).length>1){l="\n"+g(t.description,{margin:3,width:this.out.columns})}}return u+" "+c+o.gray(l||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(c.hide);else this.out.write(d(this.outputText,this.out.columns));super.render();let t=y(this.select,this.choices.length,this.limit),r=t.startIndex,i=t.endIndex;this.outputText=[p.symbol(this.done,this.aborted,this.exited),o.bold(this.msg),p.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" ");if(!this.done){const t=this.suggestions.slice(r,i).map(((t,o)=>this.renderOption(t,this.select===o+r,o===0&&r>0,o+r===i-1&&i<this.choices.length))).join("\n");this.outputText+=`\n`+(t||o.gray(this.fallback.title))}this.out.write(u.line+c.to(0)+this.outputText)}}t.exports=AutocompletePrompt},555:(t,r,i)=>{"use strict";const o=i(7836);const a=i(1407),l=a.cursor;const u=i(3740);const c=i(4115),h=c.clear,p=c.style,d=c.figures;class AutocompleteMultiselectPrompt extends u{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=h("",this.out.columns);this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const r=this.filteredOptions.findIndex((r=>r===t));this.cursor=r<0?0:r;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,r){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return`\nInstructions:\n ${d.arrowUp}/${d.arrowDown}: Highlight option\n ${d.arrowLeft}/${d.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`}return""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:o.gray("Enter something to filter")}\n`}renderOption(t,r,i){let a;if(r.disabled)a=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title);else a=t===i?o.cyan().underline(r.title):r.title;return(r.selected?o.green(d.radioOn):d.radioOff)+" "+a}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);super.render();let t=[p.symbol(this.done,this.aborted),o.bold(this.msg),p.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=h(t,this.out.columns)}}t.exports=AutocompleteMultiselectPrompt},9205:(t,r,i)=>{"use strict";const o=i(7836);const a=i(4458);const l=i(4115),u=l.style,c=l.clear;const h=i(1407),p=h.erase,d=h.cursor;class ConfirmPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();this.outputText=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:o.gray(this.initialValue?this.yesOption:this.noOption)].join(" ");this.out.write(p.line+d.to(0)+this.outputText)}}t.exports=ConfirmPrompt},4244:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,l,u){try{var c=t[l](u);var h=c.value}catch(t){i(t);return}if(c.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(7836);const a=i(4458);const l=i(4115),u=l.style,c=l.clear,h=l.figures;const p=i(1407),d=p.erase,m=p.cursor;const g=i(1411),y=g.DatePart,v=g.Meridiem,b=g.Day,_=g.Hours,w=g.Milliseconds,S=g.Minutes,E=g.Month,x=g.Seconds,A=g.Year;const O=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const k={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new b(t),3:t=>new E(t),4:t=>new A(t),5:t=>new v(t),6:t=>new _(t),7:t=>new S(t),8:t=>new x(t),9:t=>new w(t)};const R={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(R,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=c("",this.out.columns);this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let r;this.parts=[];while(r=O.exec(t)){let t=r.shift();let i=r.findIndex((t=>t!=null));this.parts.push(i in k?k[i]({token:r[i]||t,date:this.date,parts:this.parts,locales:this.locales}):r[i]||t)}let i=this.parts.reduce(((t,r)=>{if(typeof r==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=r;else t.push(r);return t}),[]);this.parts.splice(0);this.parts.push(...i);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof y)));this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let r=yield t.validator(t.value);if(typeof r==="string"){t.errorMsg=r;r=false}t.error=!r}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color="red";t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof y)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(m.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();this.outputText=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(false),this.parts.reduce(((t,r,i)=>t.concat(i===this.cursor&&!this.done?o.cyan().underline(r.toString()):r)),[]).join("")].join(" ");if(this.error){this.outputText+=this.errorMsg.split("\n").reduce(((t,r,i)=>t+`\n${i?` `:h.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(d.line+m.to(0)+this.outputText)}}t.exports=DatePrompt},8301:(t,r,i)=>{"use strict";t.exports={TextPrompt:i(9548),SelectPrompt:i(4319),TogglePrompt:i(8999),DatePrompt:i(4244),NumberPrompt:i(6460),MultiselectPrompt:i(3740),AutocompletePrompt:i(6074),AutocompleteMultiselectPrompt:i(555),ConfirmPrompt:i(9205)}},3740:(t,r,i)=>{"use strict";const o=i(7836);const a=i(1407),l=a.cursor;const u=i(4458);const c=i(4115),h=c.clear,p=c.figures,d=c.style,m=c.wrap,g=c.entriesToDisplay;class MultiselectPrompt extends u{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.instructions=t.instructions;this.optionsPerPage=t.optionsPerPage||10;this.value=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===undefined?r:t.value),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=h("",this.out.columns);if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}toggleAll(){if(this.maxChoices!==undefined||this.value[this.cursor].disabled){return this.bell()}const t=!this.value[this.cursor].selected;this.value.filter((t=>!t.disabled)).forEach((r=>r.selected=t));this.render()}_(t,r){if(t===" "){this.handleSpaceToggle()}else if(t==="a"){this.toggleAll()}else{return this.bell()}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return"\nInstructions:\n"+` ${p.arrowUp}/${p.arrowDown}: Highlight option\n`+` ${p.arrowLeft}/${p.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===undefined?` a: Toggle all\n`:"")+` enter/return: Complete answer`}return""}renderOption(t,r,i,a){const l=(r.selected?o.green(p.radioOn):p.radioOff)+" "+a+" ";let u,c;if(r.disabled){u=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title)}else{u=t===i?o.cyan().underline(r.title):r.title;if(t===i&&r.description){c=` - ${r.description}`;if(l.length+u.length+c.length>=this.out.columns||r.description.split(/\r?\n/).length>1){c="\n"+m(r.description,{margin:l.length,width:this.out.columns})}}}return l+u+o.gray(c||"")}paginateOptions(t){if(t.length===0){return o.red("No matches for this query.")}let r=g(this.cursor,t.length,this.optionsPerPage),i=r.startIndex,a=r.endIndex;let l,u=[];for(let r=i;r<a;r++){if(r===i&&i>0){l=p.arrowUp}else if(r===a-1&&a<t.length){l=p.arrowDown}else{l=" "}u.push(this.renderOption(this.cursor,t[r],r,l))}return"\n"+u.join("\n")}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);super.render();let t=[d.symbol(this.done,this.aborted),o.bold(this.msg),d.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=h(t,this.out.columns)}}t.exports=MultiselectPrompt},6460:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,l,u){try{var c=t[l](u);var h=c.value}catch(t){i(t);return}if(c.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(7836);const a=i(4458);const l=i(1407),u=l.cursor,c=l.erase;const h=i(4115),p=h.style,d=h.figures,m=h.clear,g=h.lines;const y=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,r)=>{let i=Math.pow(10,r);return Math.round(t*i)/i};class NumberPrompt extends a{constructor(t={}){super(t);this.transform=p.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=o.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||y.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let r=yield t.validator(t.value);if(typeof r===`string`){t.errorMsg=r;r=false}t.error=!r}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color=`red`;t.fire();t.render();return}let r=t.value;t.value=r!==``?r:t.initial;t.done=true;t.aborted=false;t.error=false;t.fire();t.render();t.out.write(`\n`);t.close()}))()}up(){this.typed=``;if(this.value===""){this.value=this.min-this.inc}if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value===""){this.value=this.min+this.inc}if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;if(this.value!==""&&this.value<this.min){this.value=this.min}this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,r){if(!this.valid(t))return this.bell();const i=Date.now();if(i-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=i;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(u.down(g(this.outputError,this.out.columns)-1)+m(this.outputError,this.out.columns));this.out.write(m(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[p.symbol(this.done,this.aborted),o.bold(this.msg),p.delimiter(this.done),!this.done||!this.done&&!this.placeholder?o[this.color]().underline(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?` `:d.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(c.line+u.to(0)+this.outputText+u.save+this.outputError+u.restore)}}t.exports=NumberPrompt},4458:(t,r,i)=>{"use strict";const o=i(4521);const a=i(4115),l=a.action;const u=i(2361);const c=i(1407),h=c.beep,p=c.cursor;const d=i(7836);class Prompt extends u{constructor(t={}){super();this.firstRender=true;this.in=t.stdin||process.stdin;this.out=t.stdout||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const r=o.createInterface({input:this.in,escapeCodeTimeout:50});o.emitKeypressEvents(this.in,r);if(this.in.isTTY)this.in.setRawMode(true);const i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1;const keypress=(t,r)=>{let o=l(r,i);if(o===false){this._&&this._(t,r)}else if(typeof this[o]==="function"){this[o](r)}else{this.bell()}};this.close=()=>{this.out.write(p.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);r.close();this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(h)}render(){this.onRender(d);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},4319:(t,r,i)=>{"use strict";const o=i(7836);const a=i(4458);const l=i(4115),u=l.style,c=l.clear,h=l.figures,p=l.wrap,d=l.entriesToDisplay;const m=i(1407),g=m.cursor;class SelectPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),value:t&&(t.value===undefined?r:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled}}));this.optionsPerPage=t.optionsPerPage||10;this.value=(this.choices[this.cursor]||{}).value;this.clear=c("",this.out.columns);this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0){this.moveCursor(this.choices.length-1)}else{this.moveCursor(this.cursor-1)}this.render()}down(){if(this.cursor===this.choices.length-1){this.moveCursor(0)}else{this.moveCursor(this.cursor+1)}this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,r){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(g.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();let t=d(this.cursor,this.choices.length,this.optionsPerPage),r=t.startIndex,i=t.endIndex;this.outputText=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(false),this.done?this.selection.title:this.selection.disabled?o.yellow(this.warn):o.gray(this.hint)].join(" ");if(!this.done){this.outputText+="\n";for(let t=r;t<i;t++){let a,l,u="",c=this.choices[t];if(t===r&&r>0){l=h.arrowUp}else if(t===i-1&&i<this.choices.length){l=h.arrowDown}else{l=" "}if(c.disabled){a=this.cursor===t?o.gray().underline(c.title):o.strikethrough().gray(c.title);l=(this.cursor===t?o.bold().gray(h.pointer)+" ":" ")+l}else{a=this.cursor===t?o.cyan().underline(c.title):c.title;l=(this.cursor===t?o.cyan(h.pointer)+" ":" ")+l;if(c.description&&this.cursor===t){u=` - ${c.description}`;if(l.length+a.length+u.length>=this.out.columns||c.description.split(/\r?\n/).length>1){u="\n"+p(c.description,{margin:3,width:this.out.columns})}}}this.outputText+=`${l} ${a}${o.gray(u)}\n`}}this.out.write(this.outputText)}}t.exports=SelectPrompt},9548:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,l,u){try{var c=t[l](u);var h=c.value}catch(t){i(t);return}if(c.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(7836);const a=i(4458);const l=i(1407),u=l.erase,c=l.cursor;const h=i(4115),p=h.style,d=h.clear,m=h.lines,g=h.figures;class TextPrompt extends a{constructor(t={}){super(t);this.transform=p.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.clear=d(``,this.out.columns);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=o.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.fire();this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let r=yield t.validator(t.value);if(typeof r===`string`){t.errorMsg=r;r=false}t.error=!r}))()}submit(){var t=this;return _asyncToGenerator((function*(){t.value=t.value||t.initial;t.cursorOffset=0;t.cursor=t.rendered.length;yield t.validate();if(t.error){t.red=true;t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t;this.cursorOffset+=t}_(t,r){let i=this.value.slice(0,this.cursor);let o=this.value.slice(this.cursor);this.value=`${i}${t}${o}`;this.red=false;this.cursor=this.placeholder?0:i.length+1;this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1);let r=this.value.slice(this.cursor);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtStart()){this.cursorOffset=0}else{this.cursorOffset++;this.moveCursor(-1)}this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let r=this.value.slice(this.cursor+1);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtEnd()){this.cursorOffset=0}else{this.cursorOffset++}this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(c.down(m(this.outputError,this.out.columns)-1)+d(this.outputError,this.out.columns));this.out.write(d(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[p.symbol(this.done,this.aborted),o.bold(this.msg),p.delimiter(this.done),this.red?o.red(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?" ":g.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(u.line+c.to(0)+this.outputText+c.save+this.outputError+c.restore+c.move(this.cursorOffset,0))}}t.exports=TextPrompt},8999:(t,r,i)=>{"use strict";const o=i(7836);const a=i(4458);const l=i(4115),u=l.style,c=l.clear;const h=i(1407),p=h.cursor,d=h.erase;class TogglePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,r){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(p.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();this.outputText=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(this.done),this.value?this.inactive:o.cyan().underline(this.inactive),o.gray("/"),this.value?o.cyan().underline(this.active):this.active].join(" ");this.out.write(d.line+p.to(0)+this.outputText)}}t.exports=TogglePrompt},2024:(t,r,i)=>{"use strict";function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);if(r){o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))}i.push.apply(i,o)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};if(r%2){ownKeys(Object(i),true).forEach((function(r){_defineProperty(t,r,i[r])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(t,Object.getOwnPropertyDescriptors(i))}else{ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}}return t}function _defineProperty(t,r,i){if(r in t){Object.defineProperty(t,r,{value:i,enumerable:true,configurable:true,writable:true})}else{t[r]=i}return t}function _createForOfIteratorHelper(t,r){var i=typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&typeof t.length==="number"){if(i)t=i;var o=0;var a=function F(){};return{s:a,n:function n(){if(o>=t.length)return{done:true};return{done:false,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l=true,u=false,c;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){u=true;c=t},f:function f(){try{if(!l&&i.return!=null)i.return()}finally{if(u)throw c}}}}function _unsupportedIterableToArray(t,r){if(!t)return;if(typeof t==="string")return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor)i=t.constructor.name;if(i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}function _arrayLikeToArray(t,r){if(r==null||r>t.length)r=t.length;for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function asyncGeneratorStep(t,r,i,o,a,l,u){try{var c=t[l](u);var h=c.value}catch(t){i(t);return}if(c.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(8422);const a=["suggest","format","onState","validate","onRender","type"];const noop=()=>{};function prompt(){return _prompt.apply(this,arguments)}function _prompt(){_prompt=_asyncToGenerator((function*(t=[],{onSubmit:r=noop,onCancel:i=noop}={}){const l={};const u=prompt._override||{};t=[].concat(t);let c,h,p,d,m,g;const y=function(){var t=_asyncToGenerator((function*(t,r,i=false){if(!i&&t.validate&&t.validate(r)!==true){return}return t.format?yield t.format(r,l):r}));return function getFormattedAnswer(r,i){return t.apply(this,arguments)}}();var v=_createForOfIteratorHelper(t),b;try{for(v.s();!(b=v.n()).done;){h=b.value;var _=h;d=_.name;m=_.type;if(typeof m==="function"){m=yield m(c,_objectSpread({},l),h);h["type"]=m}if(!m)continue;for(let t in h){if(a.includes(t))continue;let r=h[t];h[t]=typeof r==="function"?yield r(c,_objectSpread({},l),g):r}g=h;if(typeof h.message!=="string"){throw new Error("prompt message is required")}var w=h;d=w.name;m=w.type;if(o[m]===void 0){throw new Error(`prompt type (${m}) is not defined`)}if(u[h.name]!==undefined){c=yield y(h,u[h.name]);if(c!==undefined){l[d]=c;continue}}try{c=prompt._injected?getInjectedAnswer(prompt._injected,h.initial):yield o[m](h);l[d]=c=yield y(h,c,true);p=yield r(h,c,l)}catch(t){p=!(yield i(h,l))}if(p)return l}}catch(t){v.e(t)}finally{v.f()}return l}));return _prompt.apply(this,arguments)}function getInjectedAnswer(t,r){const i=t.shift();if(i instanceof Error){throw i}return i===undefined?r:i}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:o,inject:inject,override:override})},8422:(t,r,i)=>{"use strict";const o=r;const a=i(8301);const noop=t=>t;function toPrompt(t,r,i={}){return new Promise(((o,l)=>{const u=new a[t](r);const c=i.onAbort||noop;const h=i.onSubmit||noop;const p=i.onExit||noop;u.on("state",r.onState||noop);u.on("submit",(t=>o(h(t))));u.on("exit",(t=>o(p(t))));u.on("abort",(t=>l(c(t))))}))}o.text=t=>toPrompt("TextPrompt",t);o.password=t=>{t.style="password";return o.text(t)};o.invisible=t=>{t.style="invisible";return o.text(t)};o.number=t=>toPrompt("NumberPrompt",t);o.date=t=>toPrompt("DatePrompt",t);o.confirm=t=>toPrompt("ConfirmPrompt",t);o.list=t=>{const r=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(r).map((t=>t.trim()))})};o.toggle=t=>toPrompt("TogglePrompt",t);o.select=t=>toPrompt("SelectPrompt",t);o.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};o.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,r)=>Promise.resolve(r.filter((r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));o.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},4199:t=>{"use strict";t.exports=(t,r)=>{if(t.meta&&t.name!=="escape")return;if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(r){if(t.name==="j")return"down";if(t.name==="k")return"up"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"exit";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="home")return"home";if(t.name==="end")return"end";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},3995:(t,r,i)=>{"use strict";function _createForOfIteratorHelper(t,r){var i=typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&typeof t.length==="number"){if(i)t=i;var o=0;var a=function F(){};return{s:a,n:function n(){if(o>=t.length)return{done:true};return{done:false,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l=true,u=false,c;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){u=true;c=t},f:function f(){try{if(!l&&i.return!=null)i.return()}finally{if(u)throw c}}}}function _unsupportedIterableToArray(t,r){if(!t)return;if(typeof t==="string")return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor)i=t.constructor.name;if(i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}function _arrayLikeToArray(t,r){if(r==null||r>t.length)r=t.length;for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}const o=i(4056);const a=i(1407),l=a.erase,u=a.cursor;const width=t=>[...o(t)].length;t.exports=function(t,r){if(!r)return l.line+u.to(0);let i=0;const o=t.split(/\r?\n/);var a=_createForOfIteratorHelper(o),c;try{for(a.s();!(c=a.n()).done;){let t=c.value;i+=1+Math.floor(Math.max(width(t)-1,0)/r)}}catch(t){a.e(t)}finally{a.f()}return l.lines(i)}},308:t=>{"use strict";t.exports=(t,r,i)=>{i=i||r;let o=Math.min(r-i,t-Math.floor(i/2));if(o<0)o=0;let a=Math.min(o+i,r);return{startIndex:o,endIndex:a}}},8111:t=>{"use strict";const r={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const i={arrowUp:r.arrowUp,arrowDown:r.arrowDown,arrowLeft:r.arrowLeft,arrowRight:r.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const o=process.platform==="win32"?i:r;t.exports=o},4115:(t,r,i)=>{"use strict";t.exports={action:i(4199),clear:i(3995),style:i(1640),strip:i(4056),figures:i(8111),lines:i(8886),wrap:i(2110),entriesToDisplay:i(308)}},8886:(t,r,i)=>{"use strict";const o=i(4056);t.exports=function(t,r){let i=String(o(t)||"").split(/\r?\n/);if(!r)return i.length;return i.map((t=>Math.ceil(t.length/r))).reduce(((t,r)=>t+r))}},4056:t=>{"use strict";t.exports=t=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const i=new RegExp(r,"g");return typeof t==="string"?t.replace(i,""):t}},1640:(t,r,i)=>{"use strict";const o=i(7836);const a=i(8111);const l=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>l[t]||l.default;const u=Object.freeze({aborted:o.red(a.cross),done:o.green(a.tick),exited:o.yellow(a.cross),default:o.cyan("?")});const symbol=(t,r,i)=>r?u.aborted:i?u.exited:t?u.done:u.default;const delimiter=t=>o.gray(t?a.ellipsis:a.pointerSmall);const item=(t,r)=>o.gray(t?r?a.pointerSmall:"+":a.line);t.exports={styles:l,render:render,symbols:u,symbol:symbol,delimiter:delimiter,item:item}},2110:t=>{"use strict";t.exports=(t,r={})=>{const i=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"";const o=r.width;return(t||"").split(/\r?\n/g).map((t=>t.split(/\s+/g).reduce(((t,r)=>{if(r.length+i.length>=o||t[t.length-1].length+r.length+1<o)t[t.length-1]+=` ${r}`;else t.push(`${i}${r}`);return t}),[i]).join("\n"))).join("\n")}},5713:(t,r,i)=>{function isNodeLT(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let r=0,i=process.versions.node.split(".").map(Number);for(;r<t.length;r++){if(i[r]>t[r])return false;if(t[r]>i[r])return true}return false}t.exports=isNodeLT("8.6.0")?i(2024):i(5061)},8701:t=>{"use strict";class DatePart{constructor({token:t,date:r,parts:i,locales:o}){this.token=t;this.date=r||new Date;this.parts=i||[this];this.locales=o||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((r,i)=>i>t&&r instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const r=t.indexOf(this);return t.find(((t,i)=>i>r&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},5998:(t,r,i)=>{"use strict";const o=i(8701);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends o{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let r=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:t}}t.exports=Day},9780:(t,r,i)=>{"use strict";const o=i(8701);class Hours extends o{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},399:(t,r,i)=>{"use strict";t.exports={DatePart:i(8701),Meridiem:i(3385),Day:i(5998),Hours:i(9780),Milliseconds:i(6858),Minutes:i(8616),Month:i(1325),Seconds:i(817),Year:i(5406)}},3385:(t,r,i)=>{"use strict";const o=i(8701);class Meridiem extends o{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},6858:(t,r,i)=>{"use strict";const o=i(8701);class Milliseconds extends o{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},8616:(t,r,i)=>{"use strict";const o=i(8701);class Minutes extends o{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},1325:(t,r,i)=>{"use strict";const o=i(8701);class Month extends o{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let r=this.token.length;return r===2?String(t+1).padStart(2,"0"):r===3?this.locales.monthsShort[t]:r===4?this.locales.months[t]:String(t+1)}}t.exports=Month},817:(t,r,i)=>{"use strict";const o=i(8701);class Seconds extends o{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},5406:(t,r,i)=>{"use strict";const o=i(8701);class Year extends o{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},5533:(t,r,i)=>{"use strict";const o=i(7836);const a=i(9850);const{erase:l,cursor:u}=i(1407);const{style:c,clear:h,figures:p,wrap:d,entriesToDisplay:m}=i(327);const getVal=(t,r)=>t[r]&&(t[r].value||t[r].title||t[r]);const getTitle=(t,r)=>t[r]&&(t[r].title||t[r].value||t[r]);const getIndex=(t,r)=>{const i=t.findIndex((t=>t.value===r||t.title===r));return i>-1?i:undefined};class AutocompletePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.i18n={noMatches:t.noMatches||"no matches found"};this.fallback=t.fallback||this.initial;this.clearFirst=t.clearFirst||false;this.suggestions=[];this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=c.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=h("",this.out.columns);this.complete(this.render);this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;if(typeof this._fb==="number")t=this.choices[this._fb];else if(typeof this._fb==="string")t={title:this._fb};return t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t;if(this.suggestions.length>0)this.value=getVal(this.suggestions,t);else this.value=this.fallback.value;this.fire()}async complete(t){const r=this.completing=this.suggest(this.input,this.choices);const i=await r;if(this.completing!==r)return;this.suggestions=i.map(((t,r,i)=>({title:getTitle(i,r),value:getVal(i,r),description:t.description})));this.completing=false;const o=Math.max(i.length-1,0);this.moveSelect(Math.min(o,this.select));t&&t()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}exit(){if(this.clearFirst&&this.input.length>0){this.reset()}else{this.done=this.exited=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}abort(){this.done=this.aborted=true;this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){let i=this.input.slice(0,this.cursor);let o=this.input.slice(this.cursor);this.input=`${i}${t}${o}`;this.cursor=i.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let r=this.input.slice(this.cursor);this.input=`${t}${r}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let r=this.input.slice(this.cursor+1);this.input=`${t}${r}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions.length-1);this.render()}up(){if(this.select===0){this.moveSelect(this.suggestions.length-1)}else{this.moveSelect(this.select-1)}this.render()}down(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else{this.moveSelect(this.select+1)}this.render()}next(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1));this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0));this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}renderOption(t,r,i,a){let l;let u=i?p.arrowUp:a?p.arrowDown:" ";let c=r?o.cyan().underline(t.title):t.title;u=(r?o.cyan(p.pointer)+" ":" ")+u;if(t.description){l=` - ${t.description}`;if(u.length+c.length+l.length>=this.out.columns||t.description.split(/\r?\n/).length>1){l="\n"+d(t.description,{margin:3,width:this.out.columns})}}return u+" "+c+o.gray(l||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);else this.out.write(h(this.outputText,this.out.columns));super.render();let{startIndex:t,endIndex:r}=m(this.select,this.choices.length,this.limit);this.outputText=[c.symbol(this.done,this.aborted,this.exited),o.bold(this.msg),c.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" ");if(!this.done){const i=this.suggestions.slice(t,r).map(((i,o)=>this.renderOption(i,this.select===o+t,o===0&&t>0,o+t===r-1&&r<this.choices.length))).join("\n");this.outputText+=`\n`+(i||o.gray(this.fallback.title))}this.out.write(l.line+u.to(0)+this.outputText)}}t.exports=AutocompletePrompt},5474:(t,r,i)=>{"use strict";const o=i(7836);const{cursor:a}=i(1407);const l=i(3441);const{clear:u,style:c,figures:h}=i(327);class AutocompleteMultiselectPrompt extends l{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=u("",this.out.columns);this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const r=this.filteredOptions.findIndex((r=>r===t));this.cursor=r<0?0:r;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,r){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return`\nInstructions:\n ${h.arrowUp}/${h.arrowDown}: Highlight option\n ${h.arrowLeft}/${h.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`}return""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:o.gray("Enter something to filter")}\n`}renderOption(t,r,i){let a;if(r.disabled)a=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title);else a=t===i?o.cyan().underline(r.title):r.title;return(r.selected?o.green(h.radioOn):h.radioOff)+" "+a}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();let t=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=u(t,this.out.columns)}}t.exports=AutocompleteMultiselectPrompt},252:(t,r,i)=>{const o=i(7836);const a=i(9850);const{style:l,clear:u}=i(327);const{erase:c,cursor:h}=i(1407);class ConfirmPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:o.gray(this.initialValue?this.yesOption:this.noOption)].join(" ");this.out.write(c.line+h.to(0)+this.outputText)}}t.exports=ConfirmPrompt},3330:(t,r,i)=>{"use strict";const o=i(7836);const a=i(9850);const{style:l,clear:u,figures:c}=i(327);const{erase:h,cursor:p}=i(1407);const{DatePart:d,Meridiem:m,Day:g,Hours:y,Milliseconds:v,Minutes:b,Month:_,Seconds:w,Year:S}=i(399);const E=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const x={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new g(t),3:t=>new _(t),4:t=>new S(t),5:t=>new m(t),6:t=>new y(t),7:t=>new b(t),8:t=>new w(t),9:t=>new v(t)};const A={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(A,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=u("",this.out.columns);this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let r;this.parts=[];while(r=E.exec(t)){let t=r.shift();let i=r.findIndex((t=>t!=null));this.parts.push(i in x?x[i]({token:r[i]||t,date:this.date,parts:this.parts,locales:this.locales}):r[i]||t)}let i=this.parts.reduce(((t,r)=>{if(typeof r==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=r;else t.push(r);return t}),[]);this.parts.splice(0);this.parts.push(...i);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof d)));this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t==="string"){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color="red";this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof d)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(p.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(false),this.parts.reduce(((t,r,i)=>t.concat(i===this.cursor&&!this.done?o.cyan().underline(r.toString()):r)),[]).join("")].join(" ");if(this.error){this.outputText+=this.errorMsg.split("\n").reduce(((t,r,i)=>t+`\n${i?` `:c.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(h.line+p.to(0)+this.outputText)}}t.exports=DatePrompt},697:(t,r,i)=>{"use strict";t.exports={TextPrompt:i(6589),SelectPrompt:i(7682),TogglePrompt:i(4654),DatePrompt:i(3330),NumberPrompt:i(3281),MultiselectPrompt:i(3441),AutocompletePrompt:i(5533),AutocompleteMultiselectPrompt:i(5474),ConfirmPrompt:i(252)}},3441:(t,r,i)=>{"use strict";const o=i(7836);const{cursor:a}=i(1407);const l=i(9850);const{clear:u,figures:c,style:h,wrap:p,entriesToDisplay:d}=i(327);class MultiselectPrompt extends l{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.instructions=t.instructions;this.optionsPerPage=t.optionsPerPage||10;this.value=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===undefined?r:t.value),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=u("",this.out.columns);if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}toggleAll(){if(this.maxChoices!==undefined||this.value[this.cursor].disabled){return this.bell()}const t=!this.value[this.cursor].selected;this.value.filter((t=>!t.disabled)).forEach((r=>r.selected=t));this.render()}_(t,r){if(t===" "){this.handleSpaceToggle()}else if(t==="a"){this.toggleAll()}else{return this.bell()}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return"\nInstructions:\n"+` ${c.arrowUp}/${c.arrowDown}: Highlight option\n`+` ${c.arrowLeft}/${c.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===undefined?` a: Toggle all\n`:"")+` enter/return: Complete answer`}return""}renderOption(t,r,i,a){const l=(r.selected?o.green(c.radioOn):c.radioOff)+" "+a+" ";let u,h;if(r.disabled){u=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title)}else{u=t===i?o.cyan().underline(r.title):r.title;if(t===i&&r.description){h=` - ${r.description}`;if(l.length+u.length+h.length>=this.out.columns||r.description.split(/\r?\n/).length>1){h="\n"+p(r.description,{margin:l.length,width:this.out.columns})}}}return l+u+o.gray(h||"")}paginateOptions(t){if(t.length===0){return o.red("No matches for this query.")}let{startIndex:r,endIndex:i}=d(this.cursor,t.length,this.optionsPerPage);let a,l=[];for(let o=r;o<i;o++){if(o===r&&r>0){a=c.arrowUp}else if(o===i-1&&i<t.length){a=c.arrowDown}else{a=" "}l.push(this.renderOption(this.cursor,t[o],o,a))}return"\n"+l.join("\n")}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();let t=[h.symbol(this.done,this.aborted),o.bold(this.msg),h.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=u(t,this.out.columns)}}t.exports=MultiselectPrompt},3281:(t,r,i)=>{const o=i(7836);const a=i(9850);const{cursor:l,erase:u}=i(1407);const{style:c,figures:h,clear:p,lines:d}=i(327);const m=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,r)=>{let i=Math.pow(10,r);return Math.round(t*i)/i};class NumberPrompt extends a{constructor(t={}){super(t);this.transform=c.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=o.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||m.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color=`red`;this.fire();this.render();return}let t=this.value;this.value=t!==``?t:this.initial;this.done=true;this.aborted=false;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}up(){this.typed=``;if(this.value===""){this.value=this.min-this.inc}if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value===""){this.value=this.min+this.inc}if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;if(this.value!==""&&this.value<this.min){this.value=this.min}this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,r){if(!this.valid(t))return this.bell();const i=Date.now();if(i-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=i;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(l.down(d(this.outputError,this.out.columns)-1)+p(this.outputError,this.out.columns));this.out.write(p(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(this.done),!this.done||!this.done&&!this.placeholder?o[this.color]().underline(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?` `:h.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(u.line+l.to(0)+this.outputText+l.save+this.outputError+l.restore)}}t.exports=NumberPrompt},9850:(t,r,i)=>{"use strict";const o=i(4521);const{action:a}=i(327);const l=i(2361);const{beep:u,cursor:c}=i(1407);const h=i(7836);class Prompt extends l{constructor(t={}){super();this.firstRender=true;this.in=t.stdin||process.stdin;this.out=t.stdout||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const r=o.createInterface({input:this.in,escapeCodeTimeout:50});o.emitKeypressEvents(this.in,r);if(this.in.isTTY)this.in.setRawMode(true);const i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1;const keypress=(t,r)=>{let o=a(r,i);if(o===false){this._&&this._(t,r)}else if(typeof this[o]==="function"){this[o](r)}else{this.bell()}};this.close=()=>{this.out.write(c.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);r.close();this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(u)}render(){this.onRender(h);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},7682:(t,r,i)=>{"use strict";const o=i(7836);const a=i(9850);const{style:l,clear:u,figures:c,wrap:h,entriesToDisplay:p}=i(327);const{cursor:d}=i(1407);class SelectPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),value:t&&(t.value===undefined?r:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled}}));this.optionsPerPage=t.optionsPerPage||10;this.value=(this.choices[this.cursor]||{}).value;this.clear=u("",this.out.columns);this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0){this.moveCursor(this.choices.length-1)}else{this.moveCursor(this.cursor-1)}this.render()}down(){if(this.cursor===this.choices.length-1){this.moveCursor(0)}else{this.moveCursor(this.cursor+1)}this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,r){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();let{startIndex:t,endIndex:r}=p(this.cursor,this.choices.length,this.optionsPerPage);this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(false),this.done?this.selection.title:this.selection.disabled?o.yellow(this.warn):o.gray(this.hint)].join(" ");if(!this.done){this.outputText+="\n";for(let i=t;i<r;i++){let a,l,u="",p=this.choices[i];if(i===t&&t>0){l=c.arrowUp}else if(i===r-1&&r<this.choices.length){l=c.arrowDown}else{l=" "}if(p.disabled){a=this.cursor===i?o.gray().underline(p.title):o.strikethrough().gray(p.title);l=(this.cursor===i?o.bold().gray(c.pointer)+" ":" ")+l}else{a=this.cursor===i?o.cyan().underline(p.title):p.title;l=(this.cursor===i?o.cyan(c.pointer)+" ":" ")+l;if(p.description&&this.cursor===i){u=` - ${p.description}`;if(l.length+a.length+u.length>=this.out.columns||p.description.split(/\r?\n/).length>1){u="\n"+h(p.description,{margin:3,width:this.out.columns})}}}this.outputText+=`${l} ${a}${o.gray(u)}\n`}}this.out.write(this.outputText)}}t.exports=SelectPrompt},6589:(t,r,i)=>{const o=i(7836);const a=i(9850);const{erase:l,cursor:u}=i(1407);const{style:c,clear:h,lines:p,figures:d}=i(327);class TextPrompt extends a{constructor(t={}){super(t);this.transform=c.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.clear=h(``,this.out.columns);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=o.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.fire();this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){this.value=this.value||this.initial;this.cursorOffset=0;this.cursor=this.rendered.length;await this.validate();if(this.error){this.red=true;this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t;this.cursorOffset+=t}_(t,r){let i=this.value.slice(0,this.cursor);let o=this.value.slice(this.cursor);this.value=`${i}${t}${o}`;this.red=false;this.cursor=this.placeholder?0:i.length+1;this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1);let r=this.value.slice(this.cursor);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtStart()){this.cursorOffset=0}else{this.cursorOffset++;this.moveCursor(-1)}this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let r=this.value.slice(this.cursor+1);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtEnd()){this.cursorOffset=0}else{this.cursorOffset++}this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(u.down(p(this.outputError,this.out.columns)-1)+h(this.outputError,this.out.columns));this.out.write(h(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(this.done),this.red?o.red(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?" ":d.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(l.line+u.to(0)+this.outputText+u.save+this.outputError+u.restore+u.move(this.cursorOffset,0))}}t.exports=TextPrompt},4654:(t,r,i)=>{const o=i(7836);const a=i(9850);const{style:l,clear:u}=i(327);const{cursor:c,erase:h}=i(1407);class TogglePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,r){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(c.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(this.done),this.value?this.inactive:o.cyan().underline(this.inactive),o.gray("/"),this.value?o.cyan().underline(this.active):this.active].join(" ");this.out.write(h.line+c.to(0)+this.outputText)}}t.exports=TogglePrompt},5061:(t,r,i)=>{"use strict";const o=i(4542);const a=["suggest","format","onState","validate","onRender","type"];const noop=()=>{};async function prompt(t=[],{onSubmit:r=noop,onCancel:i=noop}={}){const l={};const u=prompt._override||{};t=[].concat(t);let c,h,p,d,m,g;const getFormattedAnswer=async(t,r,i=false)=>{if(!i&&t.validate&&t.validate(r)!==true){return}return t.format?await t.format(r,l):r};for(h of t){({name:d,type:m}=h);if(typeof m==="function"){m=await m(c,{...l},h);h["type"]=m}if(!m)continue;for(let t in h){if(a.includes(t))continue;let r=h[t];h[t]=typeof r==="function"?await r(c,{...l},g):r}g=h;if(typeof h.message!=="string"){throw new Error("prompt message is required")}({name:d,type:m}=h);if(o[m]===void 0){throw new Error(`prompt type (${m}) is not defined`)}if(u[h.name]!==undefined){c=await getFormattedAnswer(h,u[h.name]);if(c!==undefined){l[d]=c;continue}}try{c=prompt._injected?getInjectedAnswer(prompt._injected,h.initial):await o[m](h);l[d]=c=await getFormattedAnswer(h,c,true);p=await r(h,c,l)}catch(t){p=!await i(h,l)}if(p)return l}return l}function getInjectedAnswer(t,r){const i=t.shift();if(i instanceof Error){throw i}return i===undefined?r:i}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:o,inject:inject,override:override})},4542:(t,r,i)=>{"use strict";const o=r;const a=i(697);const noop=t=>t;function toPrompt(t,r,i={}){return new Promise(((o,l)=>{const u=new a[t](r);const c=i.onAbort||noop;const h=i.onSubmit||noop;const p=i.onExit||noop;u.on("state",r.onState||noop);u.on("submit",(t=>o(h(t))));u.on("exit",(t=>o(p(t))));u.on("abort",(t=>l(c(t))))}))}o.text=t=>toPrompt("TextPrompt",t);o.password=t=>{t.style="password";return o.text(t)};o.invisible=t=>{t.style="invisible";return o.text(t)};o.number=t=>toPrompt("NumberPrompt",t);o.date=t=>toPrompt("DatePrompt",t);o.confirm=t=>toPrompt("ConfirmPrompt",t);o.list=t=>{const r=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(r).map((t=>t.trim()))})};o.toggle=t=>toPrompt("TogglePrompt",t);o.select=t=>toPrompt("SelectPrompt",t);o.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};o.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,r)=>Promise.resolve(r.filter((r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));o.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},7612:t=>{"use strict";t.exports=(t,r)=>{if(t.meta&&t.name!=="escape")return;if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(r){if(t.name==="j")return"down";if(t.name==="k")return"up"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"exit";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="home")return"home";if(t.name==="end")return"end";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},1335:(t,r,i)=>{"use strict";const o=i(8409);const{erase:a,cursor:l}=i(1407);const width=t=>[...o(t)].length;t.exports=function(t,r){if(!r)return a.line+l.to(0);let i=0;const o=t.split(/\r?\n/);for(let t of o){i+=1+Math.floor(Math.max(width(t)-1,0)/r)}return a.lines(i)}},6606:t=>{"use strict";t.exports=(t,r,i)=>{i=i||r;let o=Math.min(r-i,t-Math.floor(i/2));if(o<0)o=0;let a=Math.min(o+i,r);return{startIndex:o,endIndex:a}}},5878:t=>{"use strict";const r={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const i={arrowUp:r.arrowUp,arrowDown:r.arrowDown,arrowLeft:r.arrowLeft,arrowRight:r.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const o=process.platform==="win32"?i:r;t.exports=o},327:(t,r,i)=>{"use strict";t.exports={action:i(7612),clear:i(1335),style:i(3165),strip:i(8409),figures:i(5878),lines:i(2890),wrap:i(1669),entriesToDisplay:i(6606)}},2890:(t,r,i)=>{"use strict";const o=i(8409);t.exports=function(t,r){let i=String(o(t)||"").split(/\r?\n/);if(!r)return i.length;return i.map((t=>Math.ceil(t.length/r))).reduce(((t,r)=>t+r))}},8409:t=>{"use strict";t.exports=t=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const i=new RegExp(r,"g");return typeof t==="string"?t.replace(i,""):t}},3165:(t,r,i)=>{"use strict";const o=i(7836);const a=i(5878);const l=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>l[t]||l.default;const u=Object.freeze({aborted:o.red(a.cross),done:o.green(a.tick),exited:o.yellow(a.cross),default:o.cyan("?")});const symbol=(t,r,i)=>r?u.aborted:i?u.exited:t?u.done:u.default;const delimiter=t=>o.gray(t?a.ellipsis:a.pointerSmall);const item=(t,r)=>o.gray(t?r?a.pointerSmall:"+":a.line);t.exports={styles:l,render:render,symbols:u,symbol:symbol,delimiter:delimiter,item:item}},1669:t=>{"use strict";t.exports=(t,r={})=>{const i=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"";const o=r.width;return(t||"").split(/\r?\n/g).map((t=>t.split(/\s+/g).reduce(((t,r)=>{if(r.length+i.length>=o||t[t.length-1].length+r.length+1<o)t[t.length-1]+=` ${r}`;else t.push(`${i}${r}`);return t}),[i]).join("\n"))).join("\n")}},592:t=>{
117
+ t.exports=function(t,r){if(typeof t!=="string"){throw new TypeError("expected path to be a string")}if(t==="\\"||t==="/")return"/";var i=t.length;if(i<=1)return t;var o="";if(i>4&&t[3]==="\\"){var a=t[2];if((a==="?"||a===".")&&t.slice(0,2)==="\\\\"){t=t.slice(2);o="//"}}var l=t.split(/[/\\]+/);if(r!==false&&l[l.length-1]===""){l.pop()}return o+l.join("/")}},9852:(t,r,i)=>{var o=i(3270);t.exports=o(once);t.exports.strict=o(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(t){var f=function(){if(f.called)return f.value;f.called=true;return f.value=t.apply(this,arguments)};f.called=false;return f}function onceStrict(t){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=t.apply(this,arguments)};var r=t.name||"Function wrapped with `once`";f.onceError=r+" shouldn't be called more than once";f.called=false;return f}},6415:(t,r,i)=>{"use strict";const o=i(2816);const a=Symbol.asyncIterator||"@@asyncIterator";const normalizeEmitter=t=>{const r=t.on||t.addListener||t.addEventListener;const i=t.off||t.removeListener||t.removeEventListener;if(!r||!i){throw new TypeError("Emitter is not compatible")}return{addListener:r.bind(t),removeListener:i.bind(t)}};const toArray=t=>Array.isArray(t)?t:[t];const multiple=(t,r,i)=>{let a;const l=new Promise(((o,l)=>{i={rejectionEvents:["error"],multiArgs:false,resolveImmediately:false,...i};if(!(i.count>=0&&(i.count===Infinity||Number.isInteger(i.count)))){throw new TypeError("The `count` option should be at least 0 or more")}const u=toArray(r);const c=[];const{addListener:h,removeListener:p}=normalizeEmitter(t);const onItem=(...t)=>{const r=i.multiArgs?t:t[0];if(i.filter&&!i.filter(r)){return}c.push(r);if(i.count===c.length){a();o(c)}};const rejectHandler=t=>{a();l(t)};a=()=>{for(const t of u){p(t,onItem)}for(const t of i.rejectionEvents){p(t,rejectHandler)}};for(const t of u){h(t,onItem)}for(const t of i.rejectionEvents){h(t,rejectHandler)}if(i.resolveImmediately){o(c)}}));l.cancel=a;if(typeof i.timeout==="number"){const t=o(l,i.timeout);t.cancel=a;return t}return l};const pEvent=(t,r,i)=>{if(typeof i==="function"){i={filter:i}}i={...i,count:1,resolveImmediately:false};const o=multiple(t,r,i);const a=o.then((t=>t[0]));a.cancel=o.cancel;return a};t.exports=pEvent;t.exports["default"]=pEvent;t.exports.multiple=multiple;t.exports.iterator=(t,r,i)=>{if(typeof i==="function"){i={filter:i}}const o=toArray(r);i={rejectionEvents:["error"],resolutionEvents:[],limit:Infinity,multiArgs:false,...i};const{limit:l}=i;const u=l>=0&&(l===Infinity||Number.isInteger(l));if(!u){throw new TypeError("The `limit` option should be a non-negative integer or Infinity")}if(l===0){return{[Symbol.asyncIterator](){return this},async next(){return{done:true,value:undefined}}}}const{addListener:c,removeListener:h}=normalizeEmitter(t);let p=false;let d;let m=false;const g=[];const y=[];let v=0;let b=false;const valueHandler=(...t)=>{v++;b=v===l;const r=i.multiArgs?t:t[0];if(g.length>0){const{resolve:t}=g.shift();t({done:false,value:r});if(b){cancel()}return}y.push(r);if(b){cancel()}};const cancel=()=>{p=true;for(const t of o){h(t,valueHandler)}for(const t of i.rejectionEvents){h(t,rejectHandler)}for(const t of i.resolutionEvents){h(t,resolveHandler)}while(g.length>0){const{resolve:t}=g.shift();t({done:true,value:undefined})}};const rejectHandler=(...t)=>{d=i.multiArgs?t:t[0];if(g.length>0){const{reject:t}=g.shift();t(d)}else{m=true}cancel()};const resolveHandler=(...t)=>{const r=i.multiArgs?t:t[0];if(i.filter&&!i.filter(r)){return}if(g.length>0){const{resolve:t}=g.shift();t({done:true,value:r})}else{y.push(r)}cancel()};for(const t of o){c(t,valueHandler)}for(const t of i.rejectionEvents){c(t,rejectHandler)}for(const t of i.resolutionEvents){c(t,resolveHandler)}return{[a](){return this},async next(){if(y.length>0){const t=y.shift();return{done:p&&y.length===0&&!b,value:t}}if(m){m=false;throw d}if(p){return{done:true,value:undefined}}return new Promise(((t,r)=>g.push({resolve:t,reject:r})))},async return(t){cancel();return{done:p,value:t}}}};t.exports.TimeoutError=o.TimeoutError},8213:t=>{"use strict";t.exports=(t,r)=>{r=r||(()=>{});return t.then((t=>new Promise((t=>{t(r())})).then((()=>t))),(t=>new Promise((t=>{t(r())})).then((()=>{throw t}))))}},2816:(t,r,i)=>{"use strict";const o=i(8213);class TimeoutError extends Error{constructor(t){super(t);this.name="TimeoutError"}}const pTimeout=(t,r,i)=>new Promise(((a,l)=>{if(typeof r!=="number"||r<0){throw new TypeError("Expected `milliseconds` to be a positive number")}if(r===Infinity){a(t);return}const u=setTimeout((()=>{if(typeof i==="function"){try{a(i())}catch(t){l(t)}return}const o=typeof i==="string"?i:`Promise timed out after ${r} milliseconds`;const u=i instanceof Error?i:new TimeoutError(o);if(typeof t.cancel==="function"){t.cancel()}l(u)}),r);o(t.then(a,l),(()=>{clearTimeout(u)}))}));t.exports=pTimeout;t.exports["default"]=pTimeout;t.exports.TimeoutError=TimeoutError},6230:t=>{"use strict";function posix(t){return t.charAt(0)==="/"}function win32(t){var r=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var i=r.exec(t);var o=i[1]||"";var a=Boolean(o&&o.charAt(1)!==":");return Boolean(i[2]||a)}t.exports=process.platform==="win32"?win32:posix;t.exports.posix=posix;t.exports.win32=win32},2799:t=>{"use strict";const pathKey=(t={})=>{const r=t.env||process.env;const i=t.platform||process.platform;if(i!=="win32"){return"PATH"}return Object.keys(r).reverse().find((t=>t.toUpperCase()==="PATH"))||"Path"};t.exports=pathKey;t.exports["default"]=pathKey},4997:(t,r,i)=>{"use strict";const{promisify:o}=i(3837);const a=i(7147);async function isType(t,r,i){if(typeof i!=="string"){throw new TypeError(`Expected a string, got ${typeof i}`)}try{const l=await o(a[t])(i);return l[r]()}catch(t){if(t.code==="ENOENT"){return false}throw t}}function isTypeSync(t,r,i){if(typeof i!=="string"){throw new TypeError(`Expected a string, got ${typeof i}`)}try{return a[t](i)[r]()}catch(t){if(t.code==="ENOENT"){return false}throw t}}r.isFile=isType.bind(null,"stat","isFile");r.isDirectory=isType.bind(null,"stat","isDirectory");r.isSymlink=isType.bind(null,"lstat","isSymbolicLink");r.isFileSync=isTypeSync.bind(null,"statSync","isFile");r.isDirectorySync=isTypeSync.bind(null,"statSync","isDirectory");r.isSymlinkSync=isTypeSync.bind(null,"lstatSync","isSymbolicLink")},3846:(t,r,i)=>{"use strict";t.exports=i(7250)},7798:(t,r,i)=>{"use strict";const o=i(1017);const a="\\\\/";const l=`[^${a}]`;const u="\\.";const c="\\+";const h="\\?";const p="\\/";const d="(?=.)";const m="[^/]";const g=`(?:${p}|$)`;const y=`(?:^|${p})`;const v=`${u}{1,2}${g}`;const b=`(?!${u})`;const _=`(?!${y}${v})`;const w=`(?!${u}{0,1}${g})`;const S=`(?!${v})`;const E=`[^.${p}]`;const x=`${m}*?`;const A={DOT_LITERAL:u,PLUS_LITERAL:c,QMARK_LITERAL:h,SLASH_LITERAL:p,ONE_CHAR:d,QMARK:m,END_ANCHOR:g,DOTS_SLASH:v,NO_DOT:b,NO_DOTS:_,NO_DOT_SLASH:w,NO_DOTS_SLASH:S,QMARK_NO_DOT:E,STAR:x,START_ANCHOR:y};const O={...A,SLASH_LITERAL:`[${a}]`,QMARK:l,STAR:`${l}*?`,DOTS_SLASH:`${u}{1,2}(?:[${a}]|$)`,NO_DOT:`(?!${u})`,NO_DOTS:`(?!(?:^|[${a}])${u}{1,2}(?:[${a}]|$))`,NO_DOT_SLASH:`(?!${u}{0,1}(?:[${a}]|$))`,NO_DOTS_SLASH:`(?!${u}{1,2}(?:[${a}]|$))`,QMARK_NO_DOT:`[^.${a}]`,START_ANCHOR:`(?:^|[${a}])`,END_ANCHOR:`(?:[${a}]|$)`};const k={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:k,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:o.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===true?O:A}}},3632:(t,r,i)=>{"use strict";const o=i(7798);const a=i(5502);const{MAX_LENGTH:l,POSIX_REGEX_SOURCE:u,REGEX_NON_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_BACKREF:h,REPLACEMENTS:p}=o;const expandRange=(t,r)=>{if(typeof r.expandRange==="function"){return r.expandRange(...t,r)}t.sort();const i=`[${t.join("-")}]`;try{new RegExp(i)}catch(r){return t.map((t=>a.escapeRegex(t))).join("..")}return i};const syntaxError=(t,r)=>`Missing ${t}: "${r}" - use "\\\\${r}" to match literal characters`;const parse=(t,r)=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}t=p[t]||t;const i={...r};const d=typeof i.maxLength==="number"?Math.min(l,i.maxLength):l;let m=t.length;if(m>d){throw new SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${d}`)}const g={type:"bos",value:"",output:i.prepend||""};const y=[g];const v=i.capture?"":"?:";const b=a.isWindows(r);const _=o.globChars(b);const w=o.extglobChars(_);const{DOT_LITERAL:S,PLUS_LITERAL:E,SLASH_LITERAL:x,ONE_CHAR:A,DOTS_SLASH:O,NO_DOT:k,NO_DOT_SLASH:R,NO_DOTS_SLASH:T,QMARK:C,QMARK_NO_DOT:P,STAR:I,START_ANCHOR:L}=_;const globstar=t=>`(${v}(?:(?!${L}${t.dot?O:S}).)*?)`;const M=i.dot?"":k;const N=i.dot?C:P;let j=i.bash===true?globstar(i):I;if(i.capture){j=`(${j})`}if(typeof i.noext==="boolean"){i.noextglob=i.noext}const D={input:t,index:-1,start:0,dot:i.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:y};t=a.removePrefix(t,D);m=t.length;const $=[];const B=[];const H=[];let W=g;let G;const eos=()=>D.index===m-1;const U=D.peek=(r=1)=>t[D.index+r];const V=D.advance=()=>t[++D.index]||"";const remaining=()=>t.slice(D.index+1);const consume=(t="",r=0)=>{D.consumed+=t;D.index+=r};const append=t=>{D.output+=t.output!=null?t.output:t.value;consume(t.value)};const negate=()=>{let t=1;while(U()==="!"&&(U(2)!=="("||U(3)==="?")){V();D.start++;t++}if(t%2===0){return false}D.negated=true;D.start++;return true};const increment=t=>{D[t]++;H.push(t)};const decrement=t=>{D[t]--;H.pop()};const push=t=>{if(W.type==="globstar"){const r=D.braces>0&&(t.type==="comma"||t.type==="brace");const i=t.extglob===true||$.length&&(t.type==="pipe"||t.type==="paren");if(t.type!=="slash"&&t.type!=="paren"&&!r&&!i){D.output=D.output.slice(0,-W.output.length);W.type="star";W.value="*";W.output=j;D.output+=W.output}}if($.length&&t.type!=="paren"){$[$.length-1].inner+=t.value}if(t.value||t.output)append(t);if(W&&W.type==="text"&&t.type==="text"){W.value+=t.value;W.output=(W.output||"")+t.value;return}t.prev=W;y.push(t);W=t};const extglobOpen=(t,r)=>{const o={...w[r],conditions:1,inner:""};o.prev=W;o.parens=D.parens;o.output=D.output;const a=(i.capture?"(":"")+o.open;increment("parens");push({type:t,value:r,output:D.output?"":A});push({type:"paren",extglob:true,value:V(),output:a});$.push(o)};const extglobClose=t=>{let o=t.close+(i.capture?")":"");let a;if(t.type==="negate"){let l=j;if(t.inner&&t.inner.length>1&&t.inner.includes("/")){l=globstar(i)}if(l!==j||eos()||/^\)+$/.test(remaining())){o=t.close=`)$))${l}`}if(t.inner.includes("*")&&(a=remaining())&&/^\.[^\\/.]+$/.test(a)){const i=parse(a,{...r,fastpaths:false}).output;o=t.close=`)${i})${l})`}if(t.prev.type==="bos"){D.negatedExtglob=true}}push({type:"paren",extglob:true,value:G,output:o});decrement("parens")};if(i.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let o=false;let l=t.replace(h,((t,r,i,a,l,u)=>{if(a==="\\"){o=true;return t}if(a==="?"){if(r){return r+a+(l?C.repeat(l.length):"")}if(u===0){return N+(l?C.repeat(l.length):"")}return C.repeat(i.length)}if(a==="."){return S.repeat(i.length)}if(a==="*"){if(r){return r+a+(l?j:"")}return j}return r?t:`\\${t}`}));if(o===true){if(i.unescape===true){l=l.replace(/\\/g,"")}else{l=l.replace(/\\+/g,(t=>t.length%2===0?"\\\\":t?"\\":""))}}if(l===t&&i.contains===true){D.output=t;return D}D.output=a.wrapOutput(l,D,r);return D}while(!eos()){G=V();if(G==="\0"){continue}if(G==="\\"){const t=U();if(t==="/"&&i.bash!==true){continue}if(t==="."||t===";"){continue}if(!t){G+="\\";push({type:"text",value:G});continue}const r=/^\\+/.exec(remaining());let o=0;if(r&&r[0].length>2){o=r[0].length;D.index+=o;if(o%2!==0){G+="\\"}}if(i.unescape===true){G=V()}else{G+=V()}if(D.brackets===0){push({type:"text",value:G});continue}}if(D.brackets>0&&(G!=="]"||W.value==="["||W.value==="[^")){if(i.posix!==false&&G===":"){const t=W.value.slice(1);if(t.includes("[")){W.posix=true;if(t.includes(":")){const t=W.value.lastIndexOf("[");const r=W.value.slice(0,t);const i=W.value.slice(t+2);const o=u[i];if(o){W.value=r+o;D.backtrack=true;V();if(!g.output&&y.indexOf(W)===1){g.output=A}continue}}}}if(G==="["&&U()!==":"||G==="-"&&U()==="]"){G=`\\${G}`}if(G==="]"&&(W.value==="["||W.value==="[^")){G=`\\${G}`}if(i.posix===true&&G==="!"&&W.value==="["){G="^"}W.value+=G;append({value:G});continue}if(D.quotes===1&&G!=='"'){G=a.escapeRegex(G);W.value+=G;append({value:G});continue}if(G==='"'){D.quotes=D.quotes===1?0:1;if(i.keepQuotes===true){push({type:"text",value:G})}continue}if(G==="("){increment("parens");push({type:"paren",value:G});continue}if(G===")"){if(D.parens===0&&i.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const t=$[$.length-1];if(t&&D.parens===t.parens+1){extglobClose($.pop());continue}push({type:"paren",value:G,output:D.parens?")":"\\)"});decrement("parens");continue}if(G==="["){if(i.nobracket===true||!remaining().includes("]")){if(i.nobracket!==true&&i.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}G=`\\${G}`}else{increment("brackets")}push({type:"bracket",value:G});continue}if(G==="]"){if(i.nobracket===true||W&&W.type==="bracket"&&W.value.length===1){push({type:"text",value:G,output:`\\${G}`});continue}if(D.brackets===0){if(i.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:G,output:`\\${G}`});continue}decrement("brackets");const t=W.value.slice(1);if(W.posix!==true&&t[0]==="^"&&!t.includes("/")){G=`/${G}`}W.value+=G;append({value:G});if(i.literalBrackets===false||a.hasRegexChars(t)){continue}const r=a.escapeRegex(W.value);D.output=D.output.slice(0,-W.value.length);if(i.literalBrackets===true){D.output+=r;W.value=r;continue}W.value=`(${v}${r}|${W.value})`;D.output+=W.value;continue}if(G==="{"&&i.nobrace!==true){increment("braces");const t={type:"brace",value:G,output:"(",outputIndex:D.output.length,tokensIndex:D.tokens.length};B.push(t);push(t);continue}if(G==="}"){const t=B[B.length-1];if(i.nobrace===true||!t){push({type:"text",value:G,output:G});continue}let r=")";if(t.dots===true){const t=y.slice();const o=[];for(let r=t.length-1;r>=0;r--){y.pop();if(t[r].type==="brace"){break}if(t[r].type!=="dots"){o.unshift(t[r].value)}}r=expandRange(o,i);D.backtrack=true}if(t.comma!==true&&t.dots!==true){const i=D.output.slice(0,t.outputIndex);const o=D.tokens.slice(t.tokensIndex);t.value=t.output="\\{";G=r="\\}";D.output=i;for(const t of o){D.output+=t.output||t.value}}push({type:"brace",value:G,output:r});decrement("braces");B.pop();continue}if(G==="|"){if($.length>0){$[$.length-1].conditions++}push({type:"text",value:G});continue}if(G===","){let t=G;const r=B[B.length-1];if(r&&H[H.length-1]==="braces"){r.comma=true;t="|"}push({type:"comma",value:G,output:t});continue}if(G==="/"){if(W.type==="dot"&&D.index===D.start+1){D.start=D.index+1;D.consumed="";D.output="";y.pop();W=g;continue}push({type:"slash",value:G,output:x});continue}if(G==="."){if(D.braces>0&&W.type==="dot"){if(W.value===".")W.output=S;const t=B[B.length-1];W.type="dots";W.output+=G;W.value+=G;t.dots=true;continue}if(D.braces+D.parens===0&&W.type!=="bos"&&W.type!=="slash"){push({type:"text",value:G,output:S});continue}push({type:"dot",value:G,output:S});continue}if(G==="?"){const t=W&&W.value==="(";if(!t&&i.noextglob!==true&&U()==="("&&U(2)!=="?"){extglobOpen("qmark",G);continue}if(W&&W.type==="paren"){const t=U();let r=G;if(t==="<"&&!a.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(W.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(remaining())){r=`\\${G}`}push({type:"text",value:G,output:r});continue}if(i.dot!==true&&(W.type==="slash"||W.type==="bos")){push({type:"qmark",value:G,output:P});continue}push({type:"qmark",value:G,output:C});continue}if(G==="!"){if(i.noextglob!==true&&U()==="("){if(U(2)!=="?"||!/[!=<:]/.test(U(3))){extglobOpen("negate",G);continue}}if(i.nonegate!==true&&D.index===0){negate();continue}}if(G==="+"){if(i.noextglob!==true&&U()==="("&&U(2)!=="?"){extglobOpen("plus",G);continue}if(W&&W.value==="("||i.regex===false){push({type:"plus",value:G,output:E});continue}if(W&&(W.type==="bracket"||W.type==="paren"||W.type==="brace")||D.parens>0){push({type:"plus",value:G});continue}push({type:"plus",value:E});continue}if(G==="@"){if(i.noextglob!==true&&U()==="("&&U(2)!=="?"){push({type:"at",extglob:true,value:G,output:""});continue}push({type:"text",value:G});continue}if(G!=="*"){if(G==="$"||G==="^"){G=`\\${G}`}const t=c.exec(remaining());if(t){G+=t[0];D.index+=t[0].length}push({type:"text",value:G});continue}if(W&&(W.type==="globstar"||W.star===true)){W.type="star";W.star=true;W.value+=G;W.output=j;D.backtrack=true;D.globstar=true;consume(G);continue}let r=remaining();if(i.noextglob!==true&&/^\([^?]/.test(r)){extglobOpen("star",G);continue}if(W.type==="star"){if(i.noglobstar===true){consume(G);continue}const o=W.prev;const a=o.prev;const l=o.type==="slash"||o.type==="bos";const u=a&&(a.type==="star"||a.type==="globstar");if(i.bash===true&&(!l||r[0]&&r[0]!=="/")){push({type:"star",value:G,output:""});continue}const c=D.braces>0&&(o.type==="comma"||o.type==="brace");const h=$.length&&(o.type==="pipe"||o.type==="paren");if(!l&&o.type!=="paren"&&!c&&!h){push({type:"star",value:G,output:""});continue}while(r.slice(0,3)==="/**"){const i=t[D.index+4];if(i&&i!=="/"){break}r=r.slice(3);consume("/**",3)}if(o.type==="bos"&&eos()){W.type="globstar";W.value+=G;W.output=globstar(i);D.output=W.output;D.globstar=true;consume(G);continue}if(o.type==="slash"&&o.prev.type!=="bos"&&!u&&eos()){D.output=D.output.slice(0,-(o.output+W.output).length);o.output=`(?:${o.output}`;W.type="globstar";W.output=globstar(i)+(i.strictSlashes?")":"|$)");W.value+=G;D.globstar=true;D.output+=o.output+W.output;consume(G);continue}if(o.type==="slash"&&o.prev.type!=="bos"&&r[0]==="/"){const t=r[1]!==void 0?"|$":"";D.output=D.output.slice(0,-(o.output+W.output).length);o.output=`(?:${o.output}`;W.type="globstar";W.output=`${globstar(i)}${x}|${x}${t})`;W.value+=G;D.output+=o.output+W.output;D.globstar=true;consume(G+V());push({type:"slash",value:"/",output:""});continue}if(o.type==="bos"&&r[0]==="/"){W.type="globstar";W.value+=G;W.output=`(?:^|${x}|${globstar(i)}${x})`;D.output=W.output;D.globstar=true;consume(G+V());push({type:"slash",value:"/",output:""});continue}D.output=D.output.slice(0,-W.output.length);W.type="globstar";W.output=globstar(i);W.value+=G;D.output+=W.output;D.globstar=true;consume(G);continue}const o={type:"star",value:G,output:j};if(i.bash===true){o.output=".*?";if(W.type==="bos"||W.type==="slash"){o.output=M+o.output}push(o);continue}if(W&&(W.type==="bracket"||W.type==="paren")&&i.regex===true){o.output=G;push(o);continue}if(D.index===D.start||W.type==="slash"||W.type==="dot"){if(W.type==="dot"){D.output+=R;W.output+=R}else if(i.dot===true){D.output+=T;W.output+=T}else{D.output+=M;W.output+=M}if(U()!=="*"){D.output+=A;W.output+=A}}push(o)}while(D.brackets>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));D.output=a.escapeLast(D.output,"[");decrement("brackets")}while(D.parens>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));D.output=a.escapeLast(D.output,"(");decrement("parens")}while(D.braces>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));D.output=a.escapeLast(D.output,"{");decrement("braces")}if(i.strictSlashes!==true&&(W.type==="star"||W.type==="bracket")){push({type:"maybe_slash",value:"",output:`${x}?`})}if(D.backtrack===true){D.output="";for(const t of D.tokens){D.output+=t.output!=null?t.output:t.value;if(t.suffix){D.output+=t.suffix}}}return D};parse.fastpaths=(t,r)=>{const i={...r};const u=typeof i.maxLength==="number"?Math.min(l,i.maxLength):l;const c=t.length;if(c>u){throw new SyntaxError(`Input length: ${c}, exceeds maximum allowed length: ${u}`)}t=p[t]||t;const h=a.isWindows(r);const{DOT_LITERAL:d,SLASH_LITERAL:m,ONE_CHAR:g,DOTS_SLASH:y,NO_DOT:v,NO_DOTS:b,NO_DOTS_SLASH:_,STAR:w,START_ANCHOR:S}=o.globChars(h);const E=i.dot?b:v;const x=i.dot?_:v;const A=i.capture?"":"?:";const O={negated:false,prefix:""};let k=i.bash===true?".*?":w;if(i.capture){k=`(${k})`}const globstar=t=>{if(t.noglobstar===true)return k;return`(${A}(?:(?!${S}${t.dot?y:d}).)*?)`};const create=t=>{switch(t){case"*":return`${E}${g}${k}`;case".*":return`${d}${g}${k}`;case"*.*":return`${E}${k}${d}${g}${k}`;case"*/*":return`${E}${k}${m}${g}${x}${k}`;case"**":return E+globstar(i);case"**/*":return`(?:${E}${globstar(i)}${m})?${x}${g}${k}`;case"**/*.*":return`(?:${E}${globstar(i)}${m})?${x}${k}${d}${g}${k}`;case"**/.*":return`(?:${E}${globstar(i)}${m})?${d}${g}${k}`;default:{const r=/^(.*?)\.(\w+)$/.exec(t);if(!r)return;const i=create(r[1]);if(!i)return;return i+d+r[2]}}};const R=a.removePrefix(t,O);let T=create(R);if(T&&i.strictSlashes!==true){T+=`${m}?`}return T};t.exports=parse},7250:(t,r,i)=>{"use strict";const o=i(1017);const a=i(2964);const l=i(3632);const u=i(5502);const c=i(7798);const isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);const picomatch=(t,r,i=false)=>{if(Array.isArray(t)){const o=t.map((t=>picomatch(t,r,i)));const arrayMatcher=t=>{for(const r of o){const i=r(t);if(i)return i}return false};return arrayMatcher}const o=isObject(t)&&t.tokens&&t.input;if(t===""||typeof t!=="string"&&!o){throw new TypeError("Expected pattern to be a non-empty string")}const a=r||{};const l=u.isWindows(r);const c=o?picomatch.compileRe(t,r):picomatch.makeRe(t,r,false,true);const h=c.state;delete c.state;let isIgnored=()=>false;if(a.ignore){const t={...r,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(a.ignore,t,i)}const matcher=(i,o=false)=>{const{isMatch:u,match:p,output:d}=picomatch.test(i,c,r,{glob:t,posix:l});const m={glob:t,state:h,regex:c,posix:l,input:i,output:d,match:p,isMatch:u};if(typeof a.onResult==="function"){a.onResult(m)}if(u===false){m.isMatch=false;return o?m:false}if(isIgnored(i)){if(typeof a.onIgnore==="function"){a.onIgnore(m)}m.isMatch=false;return o?m:false}if(typeof a.onMatch==="function"){a.onMatch(m)}return o?m:true};if(i){matcher.state=h}return matcher};picomatch.test=(t,r,i,{glob:o,posix:a}={})=>{if(typeof t!=="string"){throw new TypeError("Expected input to be a string")}if(t===""){return{isMatch:false,output:""}}const l=i||{};const c=l.format||(a?u.toPosixSlashes:null);let h=t===o;let p=h&&c?c(t):t;if(h===false){p=c?c(t):t;h=p===o}if(h===false||l.capture===true){if(l.matchBase===true||l.basename===true){h=picomatch.matchBase(t,r,i,a)}else{h=r.exec(p)}}return{isMatch:Boolean(h),match:h,output:p}};picomatch.matchBase=(t,r,i,a=u.isWindows(i))=>{const l=r instanceof RegExp?r:picomatch.makeRe(r,i);return l.test(o.basename(t))};picomatch.isMatch=(t,r,i)=>picomatch(r,i)(t);picomatch.parse=(t,r)=>{if(Array.isArray(t))return t.map((t=>picomatch.parse(t,r)));return l(t,{...r,fastpaths:false})};picomatch.scan=(t,r)=>a(t,r);picomatch.compileRe=(t,r,i=false,o=false)=>{if(i===true){return t.output}const a=r||{};const l=a.contains?"":"^";const u=a.contains?"":"$";let c=`${l}(?:${t.output})${u}`;if(t&&t.negated===true){c=`^(?!${c}).*$`}const h=picomatch.toRegex(c,r);if(o===true){h.state=t}return h};picomatch.makeRe=(t,r={},i=false,o=false)=>{if(!t||typeof t!=="string"){throw new TypeError("Expected a non-empty string")}let a={negated:false,fastpaths:true};if(r.fastpaths!==false&&(t[0]==="."||t[0]==="*")){a.output=l.fastpaths(t,r)}if(!a.output){a=l(t,r)}return picomatch.compileRe(a,r,i,o)};picomatch.toRegex=(t,r)=>{try{const i=r||{};return new RegExp(t,i.flags||(i.nocase?"i":""))}catch(t){if(r&&r.debug===true)throw t;return/$^/}};picomatch.constants=c;t.exports=picomatch},2964:(t,r,i)=>{"use strict";const o=i(5502);const{CHAR_ASTERISK:a,CHAR_AT:l,CHAR_BACKWARD_SLASH:u,CHAR_COMMA:c,CHAR_DOT:h,CHAR_EXCLAMATION_MARK:p,CHAR_FORWARD_SLASH:d,CHAR_LEFT_CURLY_BRACE:m,CHAR_LEFT_PARENTHESES:g,CHAR_LEFT_SQUARE_BRACKET:y,CHAR_PLUS:v,CHAR_QUESTION_MARK:b,CHAR_RIGHT_CURLY_BRACE:_,CHAR_RIGHT_PARENTHESES:w,CHAR_RIGHT_SQUARE_BRACKET:S}=i(7798);const isPathSeparator=t=>t===d||t===u;const depth=t=>{if(t.isPrefix!==true){t.depth=t.isGlobstar?Infinity:1}};const scan=(t,r)=>{const i=r||{};const E=t.length-1;const x=i.parts===true||i.scanToEnd===true;const A=[];const O=[];const k=[];let R=t;let T=-1;let C=0;let P=0;let I=false;let L=false;let M=false;let N=false;let j=false;let D=false;let $=false;let B=false;let H=false;let W=false;let G=0;let U;let V;let q={value:"",depth:0,isGlob:false};const eos=()=>T>=E;const peek=()=>R.charCodeAt(T+1);const advance=()=>{U=V;return R.charCodeAt(++T)};while(T<E){V=advance();let t;if(V===u){$=q.backslashes=true;V=advance();if(V===m){D=true}continue}if(D===true||V===m){G++;while(eos()!==true&&(V=advance())){if(V===u){$=q.backslashes=true;advance();continue}if(V===m){G++;continue}if(D!==true&&V===h&&(V=advance())===h){I=q.isBrace=true;M=q.isGlob=true;W=true;if(x===true){continue}break}if(D!==true&&V===c){I=q.isBrace=true;M=q.isGlob=true;W=true;if(x===true){continue}break}if(V===_){G--;if(G===0){D=false;I=q.isBrace=true;W=true;break}}}if(x===true){continue}break}if(V===d){A.push(T);O.push(q);q={value:"",depth:0,isGlob:false};if(W===true)continue;if(U===h&&T===C+1){C+=2;continue}P=T+1;continue}if(i.noext!==true){const t=V===v||V===l||V===a||V===b||V===p;if(t===true&&peek()===g){M=q.isGlob=true;N=q.isExtglob=true;W=true;if(V===p&&T===C){H=true}if(x===true){while(eos()!==true&&(V=advance())){if(V===u){$=q.backslashes=true;V=advance();continue}if(V===w){M=q.isGlob=true;W=true;break}}continue}break}}if(V===a){if(U===a)j=q.isGlobstar=true;M=q.isGlob=true;W=true;if(x===true){continue}break}if(V===b){M=q.isGlob=true;W=true;if(x===true){continue}break}if(V===y){while(eos()!==true&&(t=advance())){if(t===u){$=q.backslashes=true;advance();continue}if(t===S){L=q.isBracket=true;M=q.isGlob=true;W=true;break}}if(x===true){continue}break}if(i.nonegate!==true&&V===p&&T===C){B=q.negated=true;C++;continue}if(i.noparen!==true&&V===g){M=q.isGlob=true;if(x===true){while(eos()!==true&&(V=advance())){if(V===g){$=q.backslashes=true;V=advance();continue}if(V===w){W=true;break}}continue}break}if(M===true){W=true;if(x===true){continue}break}}if(i.noext===true){N=false;M=false}let z=R;let Y="";let K="";if(C>0){Y=R.slice(0,C);R=R.slice(C);P-=C}if(z&&M===true&&P>0){z=R.slice(0,P);K=R.slice(P)}else if(M===true){z="";K=R}else{z=R}if(z&&z!==""&&z!=="/"&&z!==R){if(isPathSeparator(z.charCodeAt(z.length-1))){z=z.slice(0,-1)}}if(i.unescape===true){if(K)K=o.removeBackslashes(K);if(z&&$===true){z=o.removeBackslashes(z)}}const Q={prefix:Y,input:t,start:C,base:z,glob:K,isBrace:I,isBracket:L,isGlob:M,isExtglob:N,isGlobstar:j,negated:B,negatedExtglob:H};if(i.tokens===true){Q.maxDepth=0;if(!isPathSeparator(V)){O.push(q)}Q.tokens=O}if(i.parts===true||i.tokens===true){let r;for(let o=0;o<A.length;o++){const a=r?r+1:C;const l=A[o];const u=t.slice(a,l);if(i.tokens){if(o===0&&C!==0){O[o].isPrefix=true;O[o].value=Y}else{O[o].value=u}depth(O[o]);Q.maxDepth+=O[o].depth}if(o!==0||u!==""){k.push(u)}r=l}if(r&&r+1<t.length){const o=t.slice(r+1);k.push(o);if(i.tokens){O[O.length-1].value=o;depth(O[O.length-1]);Q.maxDepth+=O[O.length-1].depth}}Q.slashes=A;Q.parts=k}return Q};t.exports=scan},5502:(t,r,i)=>{"use strict";const o=i(1017);const a=process.platform==="win32";const{REGEX_BACKSLASH:l,REGEX_REMOVE_BACKSLASH:u,REGEX_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_GLOBAL:h}=i(7798);r.isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);r.hasRegexChars=t=>c.test(t);r.isRegexChar=t=>t.length===1&&r.hasRegexChars(t);r.escapeRegex=t=>t.replace(h,"\\$1");r.toPosixSlashes=t=>t.replace(l,"/");r.removeBackslashes=t=>t.replace(u,(t=>t==="\\"?"":t));r.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);if(t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10){return true}return false};r.isWindows=t=>{if(t&&typeof t.windows==="boolean"){return t.windows}return a===true||o.sep==="\\"};r.escapeLast=(t,i,o)=>{const a=t.lastIndexOf(i,o);if(a===-1)return t;if(t[a-1]==="\\")return r.escapeLast(t,i,a-1);return`${t.slice(0,a)}\\${t.slice(a)}`};r.removePrefix=(t,r={})=>{let i=t;if(i.startsWith("./")){i=i.slice(2);r.prefix="./"}return i};r.wrapOutput=(t,r={},i={})=>{const o=i.contains?"":"^";const a=i.contains?"":"$";let l=`${o}(?:${t})${a}`;if(r.negated===true){l=`(?:^(?!${l}).*$)`}return l}},9182:t=>{"use strict";if(typeof process==="undefined"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0){t.exports={nextTick:nextTick}}else{t.exports=process}function nextTick(t,r,i,o){if(typeof t!=="function"){throw new TypeError('"callback" argument must be a function')}var a=arguments.length;var l,u;switch(a){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick((function afterTickOne(){t.call(null,r)}));case 3:return process.nextTick((function afterTickTwo(){t.call(null,r,i)}));case 4:return process.nextTick((function afterTickThree(){t.call(null,r,i,o)}));default:l=new Array(a-1);u=0;while(u<l.length){l[u++]=arguments[u]}return process.nextTick((function afterTick(){t.apply(null,l)}))}}},7127:t=>{"use strict";class DatePart{constructor({token:t,date:r,parts:i,locales:o}){this.token=t;this.date=r||new Date;this.parts=i||[this];this.locales=o||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((r,i)=>i>t&&r instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const r=t.indexOf(this);return t.find(((t,i)=>i>r&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},9009:(t,r,i)=>{"use strict";const o=i(7127);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends o{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let r=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:t}}t.exports=Day},7574:(t,r,i)=>{"use strict";const o=i(7127);class Hours extends o{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},1411:(t,r,i)=>{"use strict";t.exports={DatePart:i(7127),Meridiem:i(4375),Day:i(9009),Hours:i(7574),Milliseconds:i(8284),Minutes:i(2168),Month:i(7001),Seconds:i(3228),Year:i(494)}},4375:(t,r,i)=>{"use strict";const o=i(7127);class Meridiem extends o{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},8284:(t,r,i)=>{"use strict";const o=i(7127);class Milliseconds extends o{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},2168:(t,r,i)=>{"use strict";const o=i(7127);class Minutes extends o{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},7001:(t,r,i)=>{"use strict";const o=i(7127);class Month extends o{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let r=this.token.length;return r===2?String(t+1).padStart(2,"0"):r===3?this.locales.monthsShort[t]:r===4?this.locales.months[t]:String(t+1)}}t.exports=Month},3228:(t,r,i)=>{"use strict";const o=i(7127);class Seconds extends o{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},494:(t,r,i)=>{"use strict";const o=i(7127);class Year extends o{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},6074:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,l,u){try{var c=t[l](u);var h=c.value}catch(t){i(t);return}if(c.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(7836);const a=i(4458);const l=i(1407),u=l.erase,c=l.cursor;const h=i(4115),p=h.style,d=h.clear,m=h.figures,g=h.wrap,y=h.entriesToDisplay;const getVal=(t,r)=>t[r]&&(t[r].value||t[r].title||t[r]);const getTitle=(t,r)=>t[r]&&(t[r].title||t[r].value||t[r]);const getIndex=(t,r)=>{const i=t.findIndex((t=>t.value===r||t.title===r));return i>-1?i:undefined};class AutocompletePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.i18n={noMatches:t.noMatches||"no matches found"};this.fallback=t.fallback||this.initial;this.clearFirst=t.clearFirst||false;this.suggestions=[];this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=p.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=d("",this.out.columns);this.complete(this.render);this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;if(typeof this._fb==="number")t=this.choices[this._fb];else if(typeof this._fb==="string")t={title:this._fb};return t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t;if(this.suggestions.length>0)this.value=getVal(this.suggestions,t);else this.value=this.fallback.value;this.fire()}complete(t){var r=this;return _asyncToGenerator((function*(){const i=r.completing=r.suggest(r.input,r.choices);const o=yield i;if(r.completing!==i)return;r.suggestions=o.map(((t,r,i)=>({title:getTitle(i,r),value:getVal(i,r),description:t.description})));r.completing=false;const a=Math.max(o.length-1,0);r.moveSelect(Math.min(a,r.select));t&&t()}))()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}exit(){if(this.clearFirst&&this.input.length>0){this.reset()}else{this.done=this.exited=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}abort(){this.done=this.aborted=true;this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){let i=this.input.slice(0,this.cursor);let o=this.input.slice(this.cursor);this.input=`${i}${t}${o}`;this.cursor=i.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let r=this.input.slice(this.cursor);this.input=`${t}${r}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let r=this.input.slice(this.cursor+1);this.input=`${t}${r}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions.length-1);this.render()}up(){if(this.select===0){this.moveSelect(this.suggestions.length-1)}else{this.moveSelect(this.select-1)}this.render()}down(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else{this.moveSelect(this.select+1)}this.render()}next(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1));this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0));this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}renderOption(t,r,i,a){let l;let u=i?m.arrowUp:a?m.arrowDown:" ";let c=r?o.cyan().underline(t.title):t.title;u=(r?o.cyan(m.pointer)+" ":" ")+u;if(t.description){l=` - ${t.description}`;if(u.length+c.length+l.length>=this.out.columns||t.description.split(/\r?\n/).length>1){l="\n"+g(t.description,{margin:3,width:this.out.columns})}}return u+" "+c+o.gray(l||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(c.hide);else this.out.write(d(this.outputText,this.out.columns));super.render();let t=y(this.select,this.choices.length,this.limit),r=t.startIndex,i=t.endIndex;this.outputText=[p.symbol(this.done,this.aborted,this.exited),o.bold(this.msg),p.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" ");if(!this.done){const t=this.suggestions.slice(r,i).map(((t,o)=>this.renderOption(t,this.select===o+r,o===0&&r>0,o+r===i-1&&i<this.choices.length))).join("\n");this.outputText+=`\n`+(t||o.gray(this.fallback.title))}this.out.write(u.line+c.to(0)+this.outputText)}}t.exports=AutocompletePrompt},555:(t,r,i)=>{"use strict";const o=i(7836);const a=i(1407),l=a.cursor;const u=i(3740);const c=i(4115),h=c.clear,p=c.style,d=c.figures;class AutocompleteMultiselectPrompt extends u{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=h("",this.out.columns);this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const r=this.filteredOptions.findIndex((r=>r===t));this.cursor=r<0?0:r;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,r){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return`\nInstructions:\n ${d.arrowUp}/${d.arrowDown}: Highlight option\n ${d.arrowLeft}/${d.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`}return""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:o.gray("Enter something to filter")}\n`}renderOption(t,r,i){let a;if(r.disabled)a=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title);else a=t===i?o.cyan().underline(r.title):r.title;return(r.selected?o.green(d.radioOn):d.radioOff)+" "+a}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);super.render();let t=[p.symbol(this.done,this.aborted),o.bold(this.msg),p.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=h(t,this.out.columns)}}t.exports=AutocompleteMultiselectPrompt},9205:(t,r,i)=>{"use strict";const o=i(7836);const a=i(4458);const l=i(4115),u=l.style,c=l.clear;const h=i(1407),p=h.erase,d=h.cursor;class ConfirmPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();this.outputText=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:o.gray(this.initialValue?this.yesOption:this.noOption)].join(" ");this.out.write(p.line+d.to(0)+this.outputText)}}t.exports=ConfirmPrompt},4244:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,l,u){try{var c=t[l](u);var h=c.value}catch(t){i(t);return}if(c.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(7836);const a=i(4458);const l=i(4115),u=l.style,c=l.clear,h=l.figures;const p=i(1407),d=p.erase,m=p.cursor;const g=i(1411),y=g.DatePart,v=g.Meridiem,b=g.Day,_=g.Hours,w=g.Milliseconds,S=g.Minutes,E=g.Month,x=g.Seconds,A=g.Year;const O=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const k={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new b(t),3:t=>new E(t),4:t=>new A(t),5:t=>new v(t),6:t=>new _(t),7:t=>new S(t),8:t=>new x(t),9:t=>new w(t)};const R={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(R,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=c("",this.out.columns);this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let r;this.parts=[];while(r=O.exec(t)){let t=r.shift();let i=r.findIndex((t=>t!=null));this.parts.push(i in k?k[i]({token:r[i]||t,date:this.date,parts:this.parts,locales:this.locales}):r[i]||t)}let i=this.parts.reduce(((t,r)=>{if(typeof r==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=r;else t.push(r);return t}),[]);this.parts.splice(0);this.parts.push(...i);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof y)));this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let r=yield t.validator(t.value);if(typeof r==="string"){t.errorMsg=r;r=false}t.error=!r}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color="red";t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof y)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(m.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();this.outputText=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(false),this.parts.reduce(((t,r,i)=>t.concat(i===this.cursor&&!this.done?o.cyan().underline(r.toString()):r)),[]).join("")].join(" ");if(this.error){this.outputText+=this.errorMsg.split("\n").reduce(((t,r,i)=>t+`\n${i?` `:h.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(d.line+m.to(0)+this.outputText)}}t.exports=DatePrompt},8301:(t,r,i)=>{"use strict";t.exports={TextPrompt:i(9548),SelectPrompt:i(4319),TogglePrompt:i(8999),DatePrompt:i(4244),NumberPrompt:i(6460),MultiselectPrompt:i(3740),AutocompletePrompt:i(6074),AutocompleteMultiselectPrompt:i(555),ConfirmPrompt:i(9205)}},3740:(t,r,i)=>{"use strict";const o=i(7836);const a=i(1407),l=a.cursor;const u=i(4458);const c=i(4115),h=c.clear,p=c.figures,d=c.style,m=c.wrap,g=c.entriesToDisplay;class MultiselectPrompt extends u{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.instructions=t.instructions;this.optionsPerPage=t.optionsPerPage||10;this.value=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===undefined?r:t.value),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=h("",this.out.columns);if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}toggleAll(){if(this.maxChoices!==undefined||this.value[this.cursor].disabled){return this.bell()}const t=!this.value[this.cursor].selected;this.value.filter((t=>!t.disabled)).forEach((r=>r.selected=t));this.render()}_(t,r){if(t===" "){this.handleSpaceToggle()}else if(t==="a"){this.toggleAll()}else{return this.bell()}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return"\nInstructions:\n"+` ${p.arrowUp}/${p.arrowDown}: Highlight option\n`+` ${p.arrowLeft}/${p.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===undefined?` a: Toggle all\n`:"")+` enter/return: Complete answer`}return""}renderOption(t,r,i,a){const l=(r.selected?o.green(p.radioOn):p.radioOff)+" "+a+" ";let u,c;if(r.disabled){u=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title)}else{u=t===i?o.cyan().underline(r.title):r.title;if(t===i&&r.description){c=` - ${r.description}`;if(l.length+u.length+c.length>=this.out.columns||r.description.split(/\r?\n/).length>1){c="\n"+m(r.description,{margin:l.length,width:this.out.columns})}}}return l+u+o.gray(c||"")}paginateOptions(t){if(t.length===0){return o.red("No matches for this query.")}let r=g(this.cursor,t.length,this.optionsPerPage),i=r.startIndex,a=r.endIndex;let l,u=[];for(let r=i;r<a;r++){if(r===i&&i>0){l=p.arrowUp}else if(r===a-1&&a<t.length){l=p.arrowDown}else{l=" "}u.push(this.renderOption(this.cursor,t[r],r,l))}return"\n"+u.join("\n")}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(l.hide);super.render();let t=[d.symbol(this.done,this.aborted),o.bold(this.msg),d.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=h(t,this.out.columns)}}t.exports=MultiselectPrompt},6460:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,l,u){try{var c=t[l](u);var h=c.value}catch(t){i(t);return}if(c.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(7836);const a=i(4458);const l=i(1407),u=l.cursor,c=l.erase;const h=i(4115),p=h.style,d=h.figures,m=h.clear,g=h.lines;const y=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,r)=>{let i=Math.pow(10,r);return Math.round(t*i)/i};class NumberPrompt extends a{constructor(t={}){super(t);this.transform=p.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=o.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||y.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let r=yield t.validator(t.value);if(typeof r===`string`){t.errorMsg=r;r=false}t.error=!r}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color=`red`;t.fire();t.render();return}let r=t.value;t.value=r!==``?r:t.initial;t.done=true;t.aborted=false;t.error=false;t.fire();t.render();t.out.write(`\n`);t.close()}))()}up(){this.typed=``;if(this.value===""){this.value=this.min-this.inc}if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value===""){this.value=this.min+this.inc}if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;if(this.value!==""&&this.value<this.min){this.value=this.min}this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,r){if(!this.valid(t))return this.bell();const i=Date.now();if(i-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=i;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(u.down(g(this.outputError,this.out.columns)-1)+m(this.outputError,this.out.columns));this.out.write(m(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[p.symbol(this.done,this.aborted),o.bold(this.msg),p.delimiter(this.done),!this.done||!this.done&&!this.placeholder?o[this.color]().underline(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?` `:d.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(c.line+u.to(0)+this.outputText+u.save+this.outputError+u.restore)}}t.exports=NumberPrompt},4458:(t,r,i)=>{"use strict";const o=i(4521);const a=i(4115),l=a.action;const u=i(2361);const c=i(1407),h=c.beep,p=c.cursor;const d=i(7836);class Prompt extends u{constructor(t={}){super();this.firstRender=true;this.in=t.stdin||process.stdin;this.out=t.stdout||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const r=o.createInterface({input:this.in,escapeCodeTimeout:50});o.emitKeypressEvents(this.in,r);if(this.in.isTTY)this.in.setRawMode(true);const i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1;const keypress=(t,r)=>{let o=l(r,i);if(o===false){this._&&this._(t,r)}else if(typeof this[o]==="function"){this[o](r)}else{this.bell()}};this.close=()=>{this.out.write(p.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);r.close();this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(h)}render(){this.onRender(d);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},4319:(t,r,i)=>{"use strict";const o=i(7836);const a=i(4458);const l=i(4115),u=l.style,c=l.clear,h=l.figures,p=l.wrap,d=l.entriesToDisplay;const m=i(1407),g=m.cursor;class SelectPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),value:t&&(t.value===undefined?r:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled}}));this.optionsPerPage=t.optionsPerPage||10;this.value=(this.choices[this.cursor]||{}).value;this.clear=c("",this.out.columns);this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0){this.moveCursor(this.choices.length-1)}else{this.moveCursor(this.cursor-1)}this.render()}down(){if(this.cursor===this.choices.length-1){this.moveCursor(0)}else{this.moveCursor(this.cursor+1)}this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,r){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(g.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();let t=d(this.cursor,this.choices.length,this.optionsPerPage),r=t.startIndex,i=t.endIndex;this.outputText=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(false),this.done?this.selection.title:this.selection.disabled?o.yellow(this.warn):o.gray(this.hint)].join(" ");if(!this.done){this.outputText+="\n";for(let t=r;t<i;t++){let a,l,u="",c=this.choices[t];if(t===r&&r>0){l=h.arrowUp}else if(t===i-1&&i<this.choices.length){l=h.arrowDown}else{l=" "}if(c.disabled){a=this.cursor===t?o.gray().underline(c.title):o.strikethrough().gray(c.title);l=(this.cursor===t?o.bold().gray(h.pointer)+" ":" ")+l}else{a=this.cursor===t?o.cyan().underline(c.title):c.title;l=(this.cursor===t?o.cyan(h.pointer)+" ":" ")+l;if(c.description&&this.cursor===t){u=` - ${c.description}`;if(l.length+a.length+u.length>=this.out.columns||c.description.split(/\r?\n/).length>1){u="\n"+p(c.description,{margin:3,width:this.out.columns})}}}this.outputText+=`${l} ${a}${o.gray(u)}\n`}}this.out.write(this.outputText)}}t.exports=SelectPrompt},9548:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,l,u){try{var c=t[l](u);var h=c.value}catch(t){i(t);return}if(c.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(7836);const a=i(4458);const l=i(1407),u=l.erase,c=l.cursor;const h=i(4115),p=h.style,d=h.clear,m=h.lines,g=h.figures;class TextPrompt extends a{constructor(t={}){super(t);this.transform=p.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.clear=d(``,this.out.columns);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=o.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.fire();this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let r=yield t.validator(t.value);if(typeof r===`string`){t.errorMsg=r;r=false}t.error=!r}))()}submit(){var t=this;return _asyncToGenerator((function*(){t.value=t.value||t.initial;t.cursorOffset=0;t.cursor=t.rendered.length;yield t.validate();if(t.error){t.red=true;t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t;this.cursorOffset+=t}_(t,r){let i=this.value.slice(0,this.cursor);let o=this.value.slice(this.cursor);this.value=`${i}${t}${o}`;this.red=false;this.cursor=this.placeholder?0:i.length+1;this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1);let r=this.value.slice(this.cursor);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtStart()){this.cursorOffset=0}else{this.cursorOffset++;this.moveCursor(-1)}this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let r=this.value.slice(this.cursor+1);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtEnd()){this.cursorOffset=0}else{this.cursorOffset++}this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(c.down(m(this.outputError,this.out.columns)-1)+d(this.outputError,this.out.columns));this.out.write(d(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[p.symbol(this.done,this.aborted),o.bold(this.msg),p.delimiter(this.done),this.red?o.red(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?" ":g.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(u.line+c.to(0)+this.outputText+c.save+this.outputError+c.restore+c.move(this.cursorOffset,0))}}t.exports=TextPrompt},8999:(t,r,i)=>{"use strict";const o=i(7836);const a=i(4458);const l=i(4115),u=l.style,c=l.clear;const h=i(1407),p=h.cursor,d=h.erase;class TogglePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,r){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(p.hide);else this.out.write(c(this.outputText,this.out.columns));super.render();this.outputText=[u.symbol(this.done,this.aborted),o.bold(this.msg),u.delimiter(this.done),this.value?this.inactive:o.cyan().underline(this.inactive),o.gray("/"),this.value?o.cyan().underline(this.active):this.active].join(" ");this.out.write(d.line+p.to(0)+this.outputText)}}t.exports=TogglePrompt},2024:(t,r,i)=>{"use strict";function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);if(r){o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))}i.push.apply(i,o)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};if(r%2){ownKeys(Object(i),true).forEach((function(r){_defineProperty(t,r,i[r])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(t,Object.getOwnPropertyDescriptors(i))}else{ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}}return t}function _defineProperty(t,r,i){if(r in t){Object.defineProperty(t,r,{value:i,enumerable:true,configurable:true,writable:true})}else{t[r]=i}return t}function _createForOfIteratorHelper(t,r){var i=typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&typeof t.length==="number"){if(i)t=i;var o=0;var a=function F(){};return{s:a,n:function n(){if(o>=t.length)return{done:true};return{done:false,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l=true,u=false,c;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){u=true;c=t},f:function f(){try{if(!l&&i.return!=null)i.return()}finally{if(u)throw c}}}}function _unsupportedIterableToArray(t,r){if(!t)return;if(typeof t==="string")return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor)i=t.constructor.name;if(i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}function _arrayLikeToArray(t,r){if(r==null||r>t.length)r=t.length;for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}function asyncGeneratorStep(t,r,i,o,a,l,u){try{var c=t[l](u);var h=c.value}catch(t){i(t);return}if(c.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}const o=i(8422);const a=["suggest","format","onState","validate","onRender","type"];const noop=()=>{};function prompt(){return _prompt.apply(this,arguments)}function _prompt(){_prompt=_asyncToGenerator((function*(t=[],{onSubmit:r=noop,onCancel:i=noop}={}){const l={};const u=prompt._override||{};t=[].concat(t);let c,h,p,d,m,g;const y=function(){var t=_asyncToGenerator((function*(t,r,i=false){if(!i&&t.validate&&t.validate(r)!==true){return}return t.format?yield t.format(r,l):r}));return function getFormattedAnswer(r,i){return t.apply(this,arguments)}}();var v=_createForOfIteratorHelper(t),b;try{for(v.s();!(b=v.n()).done;){h=b.value;var _=h;d=_.name;m=_.type;if(typeof m==="function"){m=yield m(c,_objectSpread({},l),h);h["type"]=m}if(!m)continue;for(let t in h){if(a.includes(t))continue;let r=h[t];h[t]=typeof r==="function"?yield r(c,_objectSpread({},l),g):r}g=h;if(typeof h.message!=="string"){throw new Error("prompt message is required")}var w=h;d=w.name;m=w.type;if(o[m]===void 0){throw new Error(`prompt type (${m}) is not defined`)}if(u[h.name]!==undefined){c=yield y(h,u[h.name]);if(c!==undefined){l[d]=c;continue}}try{c=prompt._injected?getInjectedAnswer(prompt._injected,h.initial):yield o[m](h);l[d]=c=yield y(h,c,true);p=yield r(h,c,l)}catch(t){p=!(yield i(h,l))}if(p)return l}}catch(t){v.e(t)}finally{v.f()}return l}));return _prompt.apply(this,arguments)}function getInjectedAnswer(t,r){const i=t.shift();if(i instanceof Error){throw i}return i===undefined?r:i}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:o,inject:inject,override:override})},8422:(t,r,i)=>{"use strict";const o=r;const a=i(8301);const noop=t=>t;function toPrompt(t,r,i={}){return new Promise(((o,l)=>{const u=new a[t](r);const c=i.onAbort||noop;const h=i.onSubmit||noop;const p=i.onExit||noop;u.on("state",r.onState||noop);u.on("submit",(t=>o(h(t))));u.on("exit",(t=>o(p(t))));u.on("abort",(t=>l(c(t))))}))}o.text=t=>toPrompt("TextPrompt",t);o.password=t=>{t.style="password";return o.text(t)};o.invisible=t=>{t.style="invisible";return o.text(t)};o.number=t=>toPrompt("NumberPrompt",t);o.date=t=>toPrompt("DatePrompt",t);o.confirm=t=>toPrompt("ConfirmPrompt",t);o.list=t=>{const r=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(r).map((t=>t.trim()))})};o.toggle=t=>toPrompt("TogglePrompt",t);o.select=t=>toPrompt("SelectPrompt",t);o.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};o.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,r)=>Promise.resolve(r.filter((r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));o.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},4199:t=>{"use strict";t.exports=(t,r)=>{if(t.meta&&t.name!=="escape")return;if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(r){if(t.name==="j")return"down";if(t.name==="k")return"up"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"exit";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="home")return"home";if(t.name==="end")return"end";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},3995:(t,r,i)=>{"use strict";function _createForOfIteratorHelper(t,r){var i=typeof Symbol!=="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=_unsupportedIterableToArray(t))||r&&t&&typeof t.length==="number"){if(i)t=i;var o=0;var a=function F(){};return{s:a,n:function n(){if(o>=t.length)return{done:true};return{done:false,value:t[o++]}},e:function e(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l=true,u=false,c;return{s:function s(){i=i.call(t)},n:function n(){var t=i.next();l=t.done;return t},e:function e(t){u=true;c=t},f:function f(){try{if(!l&&i.return!=null)i.return()}finally{if(u)throw c}}}}function _unsupportedIterableToArray(t,r){if(!t)return;if(typeof t==="string")return _arrayLikeToArray(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor)i=t.constructor.name;if(i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(t,r)}function _arrayLikeToArray(t,r){if(r==null||r>t.length)r=t.length;for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o}const o=i(4056);const a=i(1407),l=a.erase,u=a.cursor;const width=t=>[...o(t)].length;t.exports=function(t,r){if(!r)return l.line+u.to(0);let i=0;const o=t.split(/\r?\n/);var a=_createForOfIteratorHelper(o),c;try{for(a.s();!(c=a.n()).done;){let t=c.value;i+=1+Math.floor(Math.max(width(t)-1,0)/r)}}catch(t){a.e(t)}finally{a.f()}return l.lines(i)}},308:t=>{"use strict";t.exports=(t,r,i)=>{i=i||r;let o=Math.min(r-i,t-Math.floor(i/2));if(o<0)o=0;let a=Math.min(o+i,r);return{startIndex:o,endIndex:a}}},8111:t=>{"use strict";const r={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const i={arrowUp:r.arrowUp,arrowDown:r.arrowDown,arrowLeft:r.arrowLeft,arrowRight:r.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const o=process.platform==="win32"?i:r;t.exports=o},4115:(t,r,i)=>{"use strict";t.exports={action:i(4199),clear:i(3995),style:i(1640),strip:i(4056),figures:i(8111),lines:i(8886),wrap:i(2110),entriesToDisplay:i(308)}},8886:(t,r,i)=>{"use strict";const o=i(4056);t.exports=function(t,r){let i=String(o(t)||"").split(/\r?\n/);if(!r)return i.length;return i.map((t=>Math.ceil(t.length/r))).reduce(((t,r)=>t+r))}},4056:t=>{"use strict";t.exports=t=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const i=new RegExp(r,"g");return typeof t==="string"?t.replace(i,""):t}},1640:(t,r,i)=>{"use strict";const o=i(7836);const a=i(8111);const l=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>l[t]||l.default;const u=Object.freeze({aborted:o.red(a.cross),done:o.green(a.tick),exited:o.yellow(a.cross),default:o.cyan("?")});const symbol=(t,r,i)=>r?u.aborted:i?u.exited:t?u.done:u.default;const delimiter=t=>o.gray(t?a.ellipsis:a.pointerSmall);const item=(t,r)=>o.gray(t?r?a.pointerSmall:"+":a.line);t.exports={styles:l,render:render,symbols:u,symbol:symbol,delimiter:delimiter,item:item}},2110:t=>{"use strict";t.exports=(t,r={})=>{const i=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"";const o=r.width;return(t||"").split(/\r?\n/g).map((t=>t.split(/\s+/g).reduce(((t,r)=>{if(r.length+i.length>=o||t[t.length-1].length+r.length+1<o)t[t.length-1]+=` ${r}`;else t.push(`${i}${r}`);return t}),[i]).join("\n"))).join("\n")}},5713:(t,r,i)=>{function isNodeLT(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let r=0,i=process.versions.node.split(".").map(Number);for(;r<t.length;r++){if(i[r]>t[r])return false;if(t[r]>i[r])return true}return false}t.exports=isNodeLT("8.6.0")?i(2024):i(5061)},8701:t=>{"use strict";class DatePart{constructor({token:t,date:r,parts:i,locales:o}){this.token=t;this.date=r||new Date;this.parts=i||[this];this.locales=o||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((r,i)=>i>t&&r instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const r=t.indexOf(this);return t.find(((t,i)=>i>r&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},5998:(t,r,i)=>{"use strict";const o=i(8701);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends o{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let r=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:t}}t.exports=Day},9780:(t,r,i)=>{"use strict";const o=i(8701);class Hours extends o{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},399:(t,r,i)=>{"use strict";t.exports={DatePart:i(8701),Meridiem:i(3385),Day:i(5998),Hours:i(9780),Milliseconds:i(6858),Minutes:i(8616),Month:i(1325),Seconds:i(817),Year:i(5406)}},3385:(t,r,i)=>{"use strict";const o=i(8701);class Meridiem extends o{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},6858:(t,r,i)=>{"use strict";const o=i(8701);class Milliseconds extends o{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},8616:(t,r,i)=>{"use strict";const o=i(8701);class Minutes extends o{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},1325:(t,r,i)=>{"use strict";const o=i(8701);class Month extends o{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let r=this.token.length;return r===2?String(t+1).padStart(2,"0"):r===3?this.locales.monthsShort[t]:r===4?this.locales.months[t]:String(t+1)}}t.exports=Month},817:(t,r,i)=>{"use strict";const o=i(8701);class Seconds extends o{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},5406:(t,r,i)=>{"use strict";const o=i(8701);class Year extends o{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},5533:(t,r,i)=>{"use strict";const o=i(7836);const a=i(9850);const{erase:l,cursor:u}=i(1407);const{style:c,clear:h,figures:p,wrap:d,entriesToDisplay:m}=i(327);const getVal=(t,r)=>t[r]&&(t[r].value||t[r].title||t[r]);const getTitle=(t,r)=>t[r]&&(t[r].title||t[r].value||t[r]);const getIndex=(t,r)=>{const i=t.findIndex((t=>t.value===r||t.title===r));return i>-1?i:undefined};class AutocompletePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.i18n={noMatches:t.noMatches||"no matches found"};this.fallback=t.fallback||this.initial;this.clearFirst=t.clearFirst||false;this.suggestions=[];this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=c.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=h("",this.out.columns);this.complete(this.render);this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;if(typeof this._fb==="number")t=this.choices[this._fb];else if(typeof this._fb==="string")t={title:this._fb};return t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t;if(this.suggestions.length>0)this.value=getVal(this.suggestions,t);else this.value=this.fallback.value;this.fire()}async complete(t){const r=this.completing=this.suggest(this.input,this.choices);const i=await r;if(this.completing!==r)return;this.suggestions=i.map(((t,r,i)=>({title:getTitle(i,r),value:getVal(i,r),description:t.description})));this.completing=false;const o=Math.max(i.length-1,0);this.moveSelect(Math.min(o,this.select));t&&t()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}exit(){if(this.clearFirst&&this.input.length>0){this.reset()}else{this.done=this.exited=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}abort(){this.done=this.aborted=true;this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=this.exited=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){let i=this.input.slice(0,this.cursor);let o=this.input.slice(this.cursor);this.input=`${i}${t}${o}`;this.cursor=i.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let r=this.input.slice(this.cursor);this.input=`${t}${r}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let r=this.input.slice(this.cursor+1);this.input=`${t}${r}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions.length-1);this.render()}up(){if(this.select===0){this.moveSelect(this.suggestions.length-1)}else{this.moveSelect(this.select-1)}this.render()}down(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else{this.moveSelect(this.select+1)}this.render()}next(){if(this.select===this.suggestions.length-1){this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1));this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0));this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}renderOption(t,r,i,a){let l;let u=i?p.arrowUp:a?p.arrowDown:" ";let c=r?o.cyan().underline(t.title):t.title;u=(r?o.cyan(p.pointer)+" ":" ")+u;if(t.description){l=` - ${t.description}`;if(u.length+c.length+l.length>=this.out.columns||t.description.split(/\r?\n/).length>1){l="\n"+d(t.description,{margin:3,width:this.out.columns})}}return u+" "+c+o.gray(l||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);else this.out.write(h(this.outputText,this.out.columns));super.render();let{startIndex:t,endIndex:r}=m(this.select,this.choices.length,this.limit);this.outputText=[c.symbol(this.done,this.aborted,this.exited),o.bold(this.msg),c.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" ");if(!this.done){const i=this.suggestions.slice(t,r).map(((i,o)=>this.renderOption(i,this.select===o+t,o===0&&t>0,o+t===r-1&&r<this.choices.length))).join("\n");this.outputText+=`\n`+(i||o.gray(this.fallback.title))}this.out.write(l.line+u.to(0)+this.outputText)}}t.exports=AutocompletePrompt},5474:(t,r,i)=>{"use strict";const o=i(7836);const{cursor:a}=i(1407);const l=i(3441);const{clear:u,style:c,figures:h}=i(327);class AutocompleteMultiselectPrompt extends l{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=u("",this.out.columns);this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const r=this.filteredOptions.findIndex((r=>r===t));this.cursor=r<0?0:r;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,r){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return`\nInstructions:\n ${h.arrowUp}/${h.arrowDown}: Highlight option\n ${h.arrowLeft}/${h.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`}return""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:o.gray("Enter something to filter")}\n`}renderOption(t,r,i){let a;if(r.disabled)a=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title);else a=t===i?o.cyan().underline(r.title):r.title;return(r.selected?o.green(h.radioOn):h.radioOff)+" "+a}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();let t=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=u(t,this.out.columns)}}t.exports=AutocompleteMultiselectPrompt},252:(t,r,i)=>{const o=i(7836);const a=i(9850);const{style:l,clear:u}=i(327);const{erase:c,cursor:h}=i(1407);class ConfirmPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,r){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:o.gray(this.initialValue?this.yesOption:this.noOption)].join(" ");this.out.write(c.line+h.to(0)+this.outputText)}}t.exports=ConfirmPrompt},3330:(t,r,i)=>{"use strict";const o=i(7836);const a=i(9850);const{style:l,clear:u,figures:c}=i(327);const{erase:h,cursor:p}=i(1407);const{DatePart:d,Meridiem:m,Day:g,Hours:y,Milliseconds:v,Minutes:b,Month:_,Seconds:w,Year:S}=i(399);const E=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const x={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new g(t),3:t=>new _(t),4:t=>new S(t),5:t=>new m(t),6:t=>new y(t),7:t=>new b(t),8:t=>new w(t),9:t=>new v(t)};const A={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(A,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=u("",this.out.columns);this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let r;this.parts=[];while(r=E.exec(t)){let t=r.shift();let i=r.findIndex((t=>t!=null));this.parts.push(i in x?x[i]({token:r[i]||t,date:this.date,parts:this.parts,locales:this.locales}):r[i]||t)}let i=this.parts.reduce(((t,r)=>{if(typeof r==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=r;else t.push(r);return t}),[]);this.parts.splice(0);this.parts.push(...i);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof d)));this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t==="string"){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color="red";this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof d)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(p.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(false),this.parts.reduce(((t,r,i)=>t.concat(i===this.cursor&&!this.done?o.cyan().underline(r.toString()):r)),[]).join("")].join(" ");if(this.error){this.outputText+=this.errorMsg.split("\n").reduce(((t,r,i)=>t+`\n${i?` `:c.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(h.line+p.to(0)+this.outputText)}}t.exports=DatePrompt},697:(t,r,i)=>{"use strict";t.exports={TextPrompt:i(6589),SelectPrompt:i(7682),TogglePrompt:i(4654),DatePrompt:i(3330),NumberPrompt:i(3281),MultiselectPrompt:i(3441),AutocompletePrompt:i(5533),AutocompleteMultiselectPrompt:i(5474),ConfirmPrompt:i(252)}},3441:(t,r,i)=>{"use strict";const o=i(7836);const{cursor:a}=i(1407);const l=i(9850);const{clear:u,figures:c,style:h,wrap:p,entriesToDisplay:d}=i(327);class MultiselectPrompt extends l{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.instructions=t.instructions;this.optionsPerPage=t.optionsPerPage||10;this.value=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===undefined?r:t.value),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=u("",this.out.columns);if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}toggleAll(){if(this.maxChoices!==undefined||this.value[this.cursor].disabled){return this.bell()}const t=!this.value[this.cursor].selected;this.value.filter((t=>!t.disabled)).forEach((r=>r.selected=t));this.render()}_(t,r){if(t===" "){this.handleSpaceToggle()}else if(t==="a"){this.toggleAll()}else{return this.bell()}}renderInstructions(){if(this.instructions===undefined||this.instructions){if(typeof this.instructions==="string"){return this.instructions}return"\nInstructions:\n"+` ${c.arrowUp}/${c.arrowDown}: Highlight option\n`+` ${c.arrowLeft}/${c.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===undefined?` a: Toggle all\n`:"")+` enter/return: Complete answer`}return""}renderOption(t,r,i,a){const l=(r.selected?o.green(c.radioOn):c.radioOff)+" "+a+" ";let u,h;if(r.disabled){u=t===i?o.gray().underline(r.title):o.strikethrough().gray(r.title)}else{u=t===i?o.cyan().underline(r.title):r.title;if(t===i&&r.description){h=` - ${r.description}`;if(l.length+u.length+h.length>=this.out.columns||r.description.split(/\r?\n/).length>1){h="\n"+p(r.description,{margin:l.length,width:this.out.columns})}}}return l+u+o.gray(h||"")}paginateOptions(t){if(t.length===0){return o.red("No matches for this query.")}let{startIndex:r,endIndex:i}=d(this.cursor,t.length,this.optionsPerPage);let a,l=[];for(let o=r;o<i;o++){if(o===r&&r>0){a=c.arrowUp}else if(o===i-1&&i<t.length){a=c.arrowDown}else{a=" "}l.push(this.renderOption(this.cursor,t[o],o,a))}return"\n"+l.join("\n")}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ")}const t=[o.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(o.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();let t=[h.symbol(this.done,this.aborted),o.bold(this.msg),h.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=o.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=u(t,this.out.columns)}}t.exports=MultiselectPrompt},3281:(t,r,i)=>{const o=i(7836);const a=i(9850);const{cursor:l,erase:u}=i(1407);const{style:c,figures:h,clear:p,lines:d}=i(327);const m=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,r)=>{let i=Math.pow(10,r);return Math.round(t*i)/i};class NumberPrompt extends a{constructor(t={}){super(t);this.transform=c.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=o.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||m.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color=`red`;this.fire();this.render();return}let t=this.value;this.value=t!==``?t:this.initial;this.done=true;this.aborted=false;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}up(){this.typed=``;if(this.value===""){this.value=this.min-this.inc}if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value===""){this.value=this.min+this.inc}if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;if(this.value!==""&&this.value<this.min){this.value=this.min}this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,r){if(!this.valid(t))return this.bell();const i=Date.now();if(i-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=i;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(l.down(d(this.outputError,this.out.columns)-1)+p(this.outputError,this.out.columns));this.out.write(p(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(this.done),!this.done||!this.done&&!this.placeholder?o[this.color]().underline(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?` `:h.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(u.line+l.to(0)+this.outputText+l.save+this.outputError+l.restore)}}t.exports=NumberPrompt},9850:(t,r,i)=>{"use strict";const o=i(4521);const{action:a}=i(327);const l=i(2361);const{beep:u,cursor:c}=i(1407);const h=i(7836);class Prompt extends l{constructor(t={}){super();this.firstRender=true;this.in=t.stdin||process.stdin;this.out=t.stdout||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const r=o.createInterface({input:this.in,escapeCodeTimeout:50});o.emitKeypressEvents(this.in,r);if(this.in.isTTY)this.in.setRawMode(true);const i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1;const keypress=(t,r)=>{let o=a(r,i);if(o===false){this._&&this._(t,r)}else if(typeof this[o]==="function"){this[o](r)}else{this.bell()}};this.close=()=>{this.out.write(c.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);r.close();this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(u)}render(){this.onRender(h);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},7682:(t,r,i)=>{"use strict";const o=i(7836);const a=i(9850);const{style:l,clear:u,figures:c,wrap:h,entriesToDisplay:p}=i(327);const{cursor:d}=i(1407);class SelectPrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,r)=>{if(typeof t==="string")t={title:t,value:r};return{title:t&&(t.title||t.value||t),value:t&&(t.value===undefined?r:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled}}));this.optionsPerPage=t.optionsPerPage||10;this.value=(this.choices[this.cursor]||{}).value;this.clear=u("",this.out.columns);this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0){this.moveCursor(this.choices.length-1)}else{this.moveCursor(this.cursor-1)}this.render()}down(){if(this.cursor===this.choices.length-1){this.moveCursor(0)}else{this.moveCursor(this.cursor+1)}this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,r){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();let{startIndex:t,endIndex:r}=p(this.cursor,this.choices.length,this.optionsPerPage);this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(false),this.done?this.selection.title:this.selection.disabled?o.yellow(this.warn):o.gray(this.hint)].join(" ");if(!this.done){this.outputText+="\n";for(let i=t;i<r;i++){let a,l,u="",p=this.choices[i];if(i===t&&t>0){l=c.arrowUp}else if(i===r-1&&r<this.choices.length){l=c.arrowDown}else{l=" "}if(p.disabled){a=this.cursor===i?o.gray().underline(p.title):o.strikethrough().gray(p.title);l=(this.cursor===i?o.bold().gray(c.pointer)+" ":" ")+l}else{a=this.cursor===i?o.cyan().underline(p.title):p.title;l=(this.cursor===i?o.cyan(c.pointer)+" ":" ")+l;if(p.description&&this.cursor===i){u=` - ${p.description}`;if(l.length+a.length+u.length>=this.out.columns||p.description.split(/\r?\n/).length>1){u="\n"+h(p.description,{margin:3,width:this.out.columns})}}}this.outputText+=`${l} ${a}${o.gray(u)}\n`}}this.out.write(this.outputText)}}t.exports=SelectPrompt},6589:(t,r,i)=>{const o=i(7836);const a=i(9850);const{erase:l,cursor:u}=i(1407);const{style:c,clear:h,lines:p,figures:d}=i(327);class TextPrompt extends a{constructor(t={}){super(t);this.transform=c.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.clear=h(``,this.out.columns);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=o.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.cursorOffset=0;this.fire();this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){this.value=this.value||this.initial;this.cursorOffset=0;this.cursor=this.rendered.length;await this.validate();if(this.error){this.red=true;this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t;this.cursorOffset+=t}_(t,r){let i=this.value.slice(0,this.cursor);let o=this.value.slice(this.cursor);this.value=`${i}${t}${o}`;this.red=false;this.cursor=this.placeholder?0:i.length+1;this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1);let r=this.value.slice(this.cursor);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtStart()){this.cursorOffset=0}else{this.cursorOffset++;this.moveCursor(-1)}this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let r=this.value.slice(this.cursor+1);this.value=`${t}${r}`;this.red=false;if(this.isCursorAtEnd()){this.cursorOffset=0}else{this.cursorOffset++}this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(u.down(p(this.outputError,this.out.columns)-1)+h(this.outputError,this.out.columns));this.out.write(h(this.outputText,this.out.columns))}super.render();this.outputError="";this.outputText=[c.symbol(this.done,this.aborted),o.bold(this.msg),c.delimiter(this.done),this.red?o.red(this.rendered):this.rendered].join(` `);if(this.error){this.outputError+=this.errorMsg.split(`\n`).reduce(((t,r,i)=>t+`\n${i?" ":d.pointerSmall} ${o.red().italic(r)}`),``)}this.out.write(l.line+u.to(0)+this.outputText+u.save+this.outputError+u.restore+u.move(this.cursorOffset,0))}}t.exports=TextPrompt},4654:(t,r,i)=>{const o=i(7836);const a=i(9850);const{style:l,clear:u}=i(327);const{cursor:c,erase:h}=i(1407);class TogglePrompt extends a{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}exit(){this.abort()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,r){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(c.hide);else this.out.write(u(this.outputText,this.out.columns));super.render();this.outputText=[l.symbol(this.done,this.aborted),o.bold(this.msg),l.delimiter(this.done),this.value?this.inactive:o.cyan().underline(this.inactive),o.gray("/"),this.value?o.cyan().underline(this.active):this.active].join(" ");this.out.write(h.line+c.to(0)+this.outputText)}}t.exports=TogglePrompt},5061:(t,r,i)=>{"use strict";const o=i(4542);const a=["suggest","format","onState","validate","onRender","type"];const noop=()=>{};async function prompt(t=[],{onSubmit:r=noop,onCancel:i=noop}={}){const l={};const u=prompt._override||{};t=[].concat(t);let c,h,p,d,m,g;const getFormattedAnswer=async(t,r,i=false)=>{if(!i&&t.validate&&t.validate(r)!==true){return}return t.format?await t.format(r,l):r};for(h of t){({name:d,type:m}=h);if(typeof m==="function"){m=await m(c,{...l},h);h["type"]=m}if(!m)continue;for(let t in h){if(a.includes(t))continue;let r=h[t];h[t]=typeof r==="function"?await r(c,{...l},g):r}g=h;if(typeof h.message!=="string"){throw new Error("prompt message is required")}({name:d,type:m}=h);if(o[m]===void 0){throw new Error(`prompt type (${m}) is not defined`)}if(u[h.name]!==undefined){c=await getFormattedAnswer(h,u[h.name]);if(c!==undefined){l[d]=c;continue}}try{c=prompt._injected?getInjectedAnswer(prompt._injected,h.initial):await o[m](h);l[d]=c=await getFormattedAnswer(h,c,true);p=await r(h,c,l)}catch(t){p=!await i(h,l)}if(p)return l}return l}function getInjectedAnswer(t,r){const i=t.shift();if(i instanceof Error){throw i}return i===undefined?r:i}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:o,inject:inject,override:override})},4542:(t,r,i)=>{"use strict";const o=r;const a=i(697);const noop=t=>t;function toPrompt(t,r,i={}){return new Promise(((o,l)=>{const u=new a[t](r);const c=i.onAbort||noop;const h=i.onSubmit||noop;const p=i.onExit||noop;u.on("state",r.onState||noop);u.on("submit",(t=>o(h(t))));u.on("exit",(t=>o(p(t))));u.on("abort",(t=>l(c(t))))}))}o.text=t=>toPrompt("TextPrompt",t);o.password=t=>{t.style="password";return o.text(t)};o.invisible=t=>{t.style="invisible";return o.text(t)};o.number=t=>toPrompt("NumberPrompt",t);o.date=t=>toPrompt("DatePrompt",t);o.confirm=t=>toPrompt("ConfirmPrompt",t);o.list=t=>{const r=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(r).map((t=>t.trim()))})};o.toggle=t=>toPrompt("TogglePrompt",t);o.select=t=>toPrompt("SelectPrompt",t);o.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};o.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,r)=>Promise.resolve(r.filter((r=>r.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));o.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},7612:t=>{"use strict";t.exports=(t,r)=>{if(t.meta&&t.name!=="escape")return;if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(r){if(t.name==="j")return"down";if(t.name==="k")return"up"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"exit";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="home")return"home";if(t.name==="end")return"end";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},1335:(t,r,i)=>{"use strict";const o=i(8409);const{erase:a,cursor:l}=i(1407);const width=t=>[...o(t)].length;t.exports=function(t,r){if(!r)return a.line+l.to(0);let i=0;const o=t.split(/\r?\n/);for(let t of o){i+=1+Math.floor(Math.max(width(t)-1,0)/r)}return a.lines(i)}},6606:t=>{"use strict";t.exports=(t,r,i)=>{i=i||r;let o=Math.min(r-i,t-Math.floor(i/2));if(o<0)o=0;let a=Math.min(o+i,r);return{startIndex:o,endIndex:a}}},5878:t=>{"use strict";const r={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const i={arrowUp:r.arrowUp,arrowDown:r.arrowDown,arrowLeft:r.arrowLeft,arrowRight:r.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const o=process.platform==="win32"?i:r;t.exports=o},327:(t,r,i)=>{"use strict";t.exports={action:i(7612),clear:i(1335),style:i(3165),strip:i(8409),figures:i(5878),lines:i(2890),wrap:i(1669),entriesToDisplay:i(6606)}},2890:(t,r,i)=>{"use strict";const o=i(8409);t.exports=function(t,r){let i=String(o(t)||"").split(/\r?\n/);if(!r)return i.length;return i.map((t=>Math.ceil(t.length/r))).reduce(((t,r)=>t+r))}},8409:t=>{"use strict";t.exports=t=>{const r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const i=new RegExp(r,"g");return typeof t==="string"?t.replace(i,""):t}},3165:(t,r,i)=>{"use strict";const o=i(7836);const a=i(5878);const l=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>l[t]||l.default;const u=Object.freeze({aborted:o.red(a.cross),done:o.green(a.tick),exited:o.yellow(a.cross),default:o.cyan("?")});const symbol=(t,r,i)=>r?u.aborted:i?u.exited:t?u.done:u.default;const delimiter=t=>o.gray(t?a.ellipsis:a.pointerSmall);const item=(t,r)=>o.gray(t?r?a.pointerSmall:"+":a.line);t.exports={styles:l,render:render,symbols:u,symbol:symbol,delimiter:delimiter,item:item}},1669:t=>{"use strict";t.exports=(t,r={})=>{const i=Number.isSafeInteger(parseInt(r.margin))?new Array(parseInt(r.margin)).fill(" ").join(""):r.margin||"";const o=r.width;return(t||"").split(/\r?\n/g).map((t=>t.split(/\s+/g).reduce(((t,r)=>{if(r.length+i.length>=o||t[t.length-1].length+r.length+1<o)t[t.length-1]+=` ${r}`;else t.push(`${i}${r}`);return t}),[i]).join("\n"))).join("\n")}},592:t=>{
118
118
  /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
119
119
  let r;t.exports=typeof queueMicrotask==="function"?queueMicrotask.bind(typeof window!=="undefined"?window:global):t=>(r||(r=Promise.resolve())).then(t).catch((t=>setTimeout((()=>{throw t}),0)))},4446:(t,r,i)=>{var o=i(3574);var a=i(1017).join;var l=i(7360);var u="/etc";var c=process.platform==="win32";var h=c?process.env.USERPROFILE:process.env.HOME;t.exports=function(t,r,p,d){if("string"!==typeof t)throw new Error("rc(name): name *must* be string");if(!p)p=i(1254)(process.argv.slice(2));r=("string"===typeof r?o.json(r):r)||{};d=d||o.parse;var m=o.env(t+"_");var g=[r];var y=[];function addConfigFile(t){if(y.indexOf(t)>=0)return;var r=o.file(t);if(r){g.push(d(r));y.push(t)}}if(!c)[a(u,t,"config"),a(u,t+"rc")].forEach(addConfigFile);if(h)[a(h,".config",t,"config"),a(h,".config",t),a(h,"."+t,"config"),a(h,"."+t+"rc")].forEach(addConfigFile);addConfigFile(o.find("."+t+"rc"));if(m.config)addConfigFile(m.config);if(p.config)addConfigFile(p.config);return l.apply(null,g.concat([m,p,y.length?{configs:y,config:y[y.length-1]}:undefined]))}},3574:(t,r,i)=>{"use strict";var o=i(7147);var a=i(7036);var l=i(1017);var u=i(2251);var c=r.parse=function(t){if(/^\s*{/.test(t))return JSON.parse(u(t));return a.parse(t)};var h=r.file=function(){var t=[].slice.call(arguments).filter((function(t){return t!=null}));for(var r in t)if("string"!==typeof t[r])return;var i=l.join.apply(null,t);var a;try{return o.readFileSync(i,"utf-8")}catch(t){return}};var p=r.json=function(){var t=h.apply(null,arguments);return t?c(t):null};var d=r.env=function(t,r){r=r||process.env;var i={};var o=t.length;for(var a in r){if(a.toLowerCase().indexOf(t.toLowerCase())===0){var l=a.substring(o).split("__");var u;while((u=l.indexOf(""))>-1){l.splice(u,1)}var c=i;l.forEach((function _buildSubObj(t,i){if(!t||typeof c!=="object")return;if(i===l.length-1)c[t]=r[a];if(c[t]===undefined)c[t]={};c=c[t]}))}}return i};var m=r.find=function(){var t=l.join.apply(null,[].slice.call(arguments));function find(t,r){var i=l.join(t,r);try{o.statSync(i);return i}catch(i){if(l.dirname(t)!==t)return find(l.dirname(t),r)}}return find(process.cwd(),t)}},4928:(t,r,i)=>{"use strict";var o=i(9182);var a=Object.keys||function(t){var r=[];for(var i in t){r.push(i)}return r};t.exports=Duplex;var l=Object.create(i(642));l.inherits=i(2842);var u=i(7355);var c=i(3517);l.inherits(Duplex,u);{var h=a(c.prototype);for(var p=0;p<h.length;p++){var d=h[p];if(!Duplex.prototype[d])Duplex.prototype[d]=c.prototype[d]}}function Duplex(t){if(!(this instanceof Duplex))return new Duplex(t);u.call(this,t);c.call(this,t);if(t&&t.readable===false)this.readable=false;if(t&&t.writable===false)this.writable=false;this.allowHalfOpen=true;if(t&&t.allowHalfOpen===false)this.allowHalfOpen=false;this.once("end",onend)}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function onend(){if(this.allowHalfOpen||this._writableState.ended)return;o.nextTick(onEndNT,this)}function onEndNT(t){t.end()}Object.defineProperty(Duplex.prototype,"destroyed",{get:function(){if(this._readableState===undefined||this._writableState===undefined){return false}return this._readableState.destroyed&&this._writableState.destroyed},set:function(t){if(this._readableState===undefined||this._writableState===undefined){return}this._readableState.destroyed=t;this._writableState.destroyed=t}});Duplex.prototype._destroy=function(t,r){this.push(null);this.end();o.nextTick(r,t)}},9924:(t,r,i)=>{"use strict";t.exports=PassThrough;var o=i(2162);var a=Object.create(i(642));a.inherits=i(2842);a.inherits(PassThrough,o);function PassThrough(t){if(!(this instanceof PassThrough))return new PassThrough(t);o.call(this,t)}PassThrough.prototype._transform=function(t,r,i){i(null,t)}},7355:(t,r,i)=>{"use strict";var o=i(9182);t.exports=Readable;var a=i(1551);var l;Readable.ReadableState=ReadableState;var u=i(2361).EventEmitter;var EElistenerCount=function(t,r){return t.listeners(r).length};var c=i(2641);var h=i(291).Buffer;var p=global.Uint8Array||function(){};function _uint8ArrayToBuffer(t){return h.from(t)}function _isUint8Array(t){return h.isBuffer(t)||t instanceof p}var d=Object.create(i(642));d.inherits=i(2842);var m=i(3837);var g=void 0;if(m&&m.debuglog){g=m.debuglog("stream")}else{g=function(){}}var y=i(4865);var v=i(2604);var b;d.inherits(Readable,c);var _=["error","close","destroy","pause","resume"];function prependListener(t,r,i){if(typeof t.prependListener==="function")return t.prependListener(r,i);if(!t._events||!t._events[r])t.on(r,i);else if(a(t._events[r]))t._events[r].unshift(i);else t._events[r]=[i,t._events[r]]}function ReadableState(t,r){l=l||i(4928);t=t||{};var o=r instanceof l;this.objectMode=!!t.objectMode;if(o)this.objectMode=this.objectMode||!!t.readableObjectMode;var a=t.highWaterMark;var u=t.readableHighWaterMark;var c=this.objectMode?16:16*1024;if(a||a===0)this.highWaterMark=a;else if(o&&(u||u===0))this.highWaterMark=u;else this.highWaterMark=c;this.highWaterMark=Math.floor(this.highWaterMark);this.buffer=new y;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.destroyed=false;this.defaultEncoding=t.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(t.encoding){if(!b)b=i(4426).s;this.decoder=new b(t.encoding);this.encoding=t.encoding}}function Readable(t){l=l||i(4928);if(!(this instanceof Readable))return new Readable(t);this._readableState=new ReadableState(t,this);this.readable=true;if(t){if(typeof t.read==="function")this._read=t.read;if(typeof t.destroy==="function")this._destroy=t.destroy}c.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function(t){if(!this._readableState){return}this._readableState.destroyed=t}});Readable.prototype.destroy=v.destroy;Readable.prototype._undestroy=v.undestroy;Readable.prototype._destroy=function(t,r){this.push(null);r(t)};Readable.prototype.push=function(t,r){var i=this._readableState;var o;if(!i.objectMode){if(typeof t==="string"){r=r||i.defaultEncoding;if(r!==i.encoding){t=h.from(t,r);r=""}o=true}}else{o=true}return readableAddChunk(this,t,r,false,o)};Readable.prototype.unshift=function(t){return readableAddChunk(this,t,null,true,false)};function readableAddChunk(t,r,i,o,a){var l=t._readableState;if(r===null){l.reading=false;onEofChunk(t,l)}else{var u;if(!a)u=chunkInvalid(l,r);if(u){t.emit("error",u)}else if(l.objectMode||r&&r.length>0){if(typeof r!=="string"&&!l.objectMode&&Object.getPrototypeOf(r)!==h.prototype){r=_uint8ArrayToBuffer(r)}if(o){if(l.endEmitted)t.emit("error",new Error("stream.unshift() after end event"));else addChunk(t,l,r,true)}else if(l.ended){t.emit("error",new Error("stream.push() after EOF"))}else{l.reading=false;if(l.decoder&&!i){r=l.decoder.write(r);if(l.objectMode||r.length!==0)addChunk(t,l,r,false);else maybeReadMore(t,l)}else{addChunk(t,l,r,false)}}}else if(!o){l.reading=false}}return needMoreData(l)}function addChunk(t,r,i,o){if(r.flowing&&r.length===0&&!r.sync){t.emit("data",i);t.read(0)}else{r.length+=r.objectMode?1:i.length;if(o)r.buffer.unshift(i);else r.buffer.push(i);if(r.needReadable)emitReadable(t)}maybeReadMore(t,r)}function chunkInvalid(t,r){var i;if(!_isUint8Array(r)&&typeof r!=="string"&&r!==undefined&&!t.objectMode){i=new TypeError("Invalid non-string/buffer chunk")}return i}function needMoreData(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}Readable.prototype.isPaused=function(){return this._readableState.flowing===false};Readable.prototype.setEncoding=function(t){if(!b)b=i(4426).s;this._readableState.decoder=new b(t);this._readableState.encoding=t;return this};var w=8388608;function computeNewHighWaterMark(t){if(t>=w){t=w}else{t--;t|=t>>>1;t|=t>>>2;t|=t>>>4;t|=t>>>8;t|=t>>>16;t++}return t}function howMuchToRead(t,r){if(t<=0||r.length===0&&r.ended)return 0;if(r.objectMode)return 1;if(t!==t){if(r.flowing&&r.length)return r.buffer.head.data.length;else return r.length}if(t>r.highWaterMark)r.highWaterMark=computeNewHighWaterMark(t);if(t<=r.length)return t;if(!r.ended){r.needReadable=true;return 0}return r.length}Readable.prototype.read=function(t){g("read",t);t=parseInt(t,10);var r=this._readableState;var i=t;if(t!==0)r.emittedReadable=false;if(t===0&&r.needReadable&&(r.length>=r.highWaterMark||r.ended)){g("read: emitReadable",r.length,r.ended);if(r.length===0&&r.ended)endReadable(this);else emitReadable(this);return null}t=howMuchToRead(t,r);if(t===0&&r.ended){if(r.length===0)endReadable(this);return null}var o=r.needReadable;g("need readable",o);if(r.length===0||r.length-t<r.highWaterMark){o=true;g("length less than watermark",o)}if(r.ended||r.reading){o=false;g("reading or ended",o)}else if(o){g("do read");r.reading=true;r.sync=true;if(r.length===0)r.needReadable=true;this._read(r.highWaterMark);r.sync=false;if(!r.reading)t=howMuchToRead(i,r)}var a;if(t>0)a=fromList(t,r);else a=null;if(a===null){r.needReadable=true;t=0}else{r.length-=t}if(r.length===0){if(!r.ended)r.needReadable=true;if(i!==t&&r.ended)endReadable(this)}if(a!==null)this.emit("data",a);return a};function onEofChunk(t,r){if(r.ended)return;if(r.decoder){var i=r.decoder.end();if(i&&i.length){r.buffer.push(i);r.length+=r.objectMode?1:i.length}}r.ended=true;emitReadable(t)}function emitReadable(t){var r=t._readableState;r.needReadable=false;if(!r.emittedReadable){g("emitReadable",r.flowing);r.emittedReadable=true;if(r.sync)o.nextTick(emitReadable_,t);else emitReadable_(t)}}function emitReadable_(t){g("emit readable");t.emit("readable");flow(t)}function maybeReadMore(t,r){if(!r.readingMore){r.readingMore=true;o.nextTick(maybeReadMore_,t,r)}}function maybeReadMore_(t,r){var i=r.length;while(!r.reading&&!r.flowing&&!r.ended&&r.length<r.highWaterMark){g("maybeReadMore read 0");t.read(0);if(i===r.length)break;else i=r.length}r.readingMore=false}Readable.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};Readable.prototype.pipe=function(t,r){var i=this;var a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t);break}a.pipesCount+=1;g("pipe count=%d opts=%j",a.pipesCount,r);var l=(!r||r.end!==false)&&t!==process.stdout&&t!==process.stderr;var u=l?onend:unpipe;if(a.endEmitted)o.nextTick(u);else i.once("end",u);t.on("unpipe",onunpipe);function onunpipe(t,r){g("onunpipe");if(t===i){if(r&&r.hasUnpiped===false){r.hasUnpiped=true;cleanup()}}}function onend(){g("onend");t.end()}var c=pipeOnDrain(i);t.on("drain",c);var h=false;function cleanup(){g("cleanup");t.removeListener("close",onclose);t.removeListener("finish",onfinish);t.removeListener("drain",c);t.removeListener("error",onerror);t.removeListener("unpipe",onunpipe);i.removeListener("end",onend);i.removeListener("end",unpipe);i.removeListener("data",ondata);h=true;if(a.awaitDrain&&(!t._writableState||t._writableState.needDrain))c()}var p=false;i.on("data",ondata);function ondata(r){g("ondata");p=false;var o=t.write(r);if(false===o&&!p){if((a.pipesCount===1&&a.pipes===t||a.pipesCount>1&&indexOf(a.pipes,t)!==-1)&&!h){g("false write response, pause",i._readableState.awaitDrain);i._readableState.awaitDrain++;p=true}i.pause()}}function onerror(r){g("onerror",r);unpipe();t.removeListener("error",onerror);if(EElistenerCount(t,"error")===0)t.emit("error",r)}prependListener(t,"error",onerror);function onclose(){t.removeListener("finish",onfinish);unpipe()}t.once("close",onclose);function onfinish(){g("onfinish");t.removeListener("close",onclose);unpipe()}t.once("finish",onfinish);function unpipe(){g("unpipe");i.unpipe(t)}t.emit("pipe",i);if(!a.flowing){g("pipe resume");i.resume()}return t};function pipeOnDrain(t){return function(){var r=t._readableState;g("pipeOnDrain",r.awaitDrain);if(r.awaitDrain)r.awaitDrain--;if(r.awaitDrain===0&&EElistenerCount(t,"data")){r.flowing=true;flow(t)}}}Readable.prototype.unpipe=function(t){var r=this._readableState;var i={hasUnpiped:false};if(r.pipesCount===0)return this;if(r.pipesCount===1){if(t&&t!==r.pipes)return this;if(!t)t=r.pipes;r.pipes=null;r.pipesCount=0;r.flowing=false;if(t)t.emit("unpipe",this,i);return this}if(!t){var o=r.pipes;var a=r.pipesCount;r.pipes=null;r.pipesCount=0;r.flowing=false;for(var l=0;l<a;l++){o[l].emit("unpipe",this,i)}return this}var u=indexOf(r.pipes,t);if(u===-1)return this;r.pipes.splice(u,1);r.pipesCount-=1;if(r.pipesCount===1)r.pipes=r.pipes[0];t.emit("unpipe",this,i);return this};Readable.prototype.on=function(t,r){var i=c.prototype.on.call(this,t,r);if(t==="data"){if(this._readableState.flowing!==false)this.resume()}else if(t==="readable"){var a=this._readableState;if(!a.endEmitted&&!a.readableListening){a.readableListening=a.needReadable=true;a.emittedReadable=false;if(!a.reading){o.nextTick(nReadingNextTick,this)}else if(a.length){emitReadable(this)}}}return i};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(t){g("readable nexttick read 0");t.read(0)}Readable.prototype.resume=function(){var t=this._readableState;if(!t.flowing){g("resume");t.flowing=true;resume(this,t)}return this};function resume(t,r){if(!r.resumeScheduled){r.resumeScheduled=true;o.nextTick(resume_,t,r)}}function resume_(t,r){if(!r.reading){g("resume read 0");t.read(0)}r.resumeScheduled=false;r.awaitDrain=0;t.emit("resume");flow(t);if(r.flowing&&!r.reading)t.read(0)}Readable.prototype.pause=function(){g("call pause flowing=%j",this._readableState.flowing);if(false!==this._readableState.flowing){g("pause");this._readableState.flowing=false;this.emit("pause")}return this};function flow(t){var r=t._readableState;g("flow",r.flowing);while(r.flowing&&t.read()!==null){}}Readable.prototype.wrap=function(t){var r=this;var i=this._readableState;var o=false;t.on("end",(function(){g("wrapped end");if(i.decoder&&!i.ended){var t=i.decoder.end();if(t&&t.length)r.push(t)}r.push(null)}));t.on("data",(function(a){g("wrapped data");if(i.decoder)a=i.decoder.write(a);if(i.objectMode&&(a===null||a===undefined))return;else if(!i.objectMode&&(!a||!a.length))return;var l=r.push(a);if(!l){o=true;t.pause()}}));for(var a in t){if(this[a]===undefined&&typeof t[a]==="function"){this[a]=function(r){return function(){return t[r].apply(t,arguments)}}(a)}}for(var l=0;l<_.length;l++){t.on(_[l],this.emit.bind(this,_[l]))}this._read=function(r){g("wrapped _read",r);if(o){o=false;t.resume()}};return this};Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:false,get:function(){return this._readableState.highWaterMark}});Readable._fromList=fromList;function fromList(t,r){if(r.length===0)return null;var i;if(r.objectMode)i=r.buffer.shift();else if(!t||t>=r.length){if(r.decoder)i=r.buffer.join("");else if(r.buffer.length===1)i=r.buffer.head.data;else i=r.buffer.concat(r.length);r.buffer.clear()}else{i=fromListPartial(t,r.buffer,r.decoder)}return i}function fromListPartial(t,r,i){var o;if(t<r.head.data.length){o=r.head.data.slice(0,t);r.head.data=r.head.data.slice(t)}else if(t===r.head.data.length){o=r.shift()}else{o=i?copyFromBufferString(t,r):copyFromBuffer(t,r)}return o}function copyFromBufferString(t,r){var i=r.head;var o=1;var a=i.data;t-=a.length;while(i=i.next){var l=i.data;var u=t>l.length?l.length:t;if(u===l.length)a+=l;else a+=l.slice(0,t);t-=u;if(t===0){if(u===l.length){++o;if(i.next)r.head=i.next;else r.head=r.tail=null}else{r.head=i;i.data=l.slice(u)}break}++o}r.length-=o;return a}function copyFromBuffer(t,r){var i=h.allocUnsafe(t);var o=r.head;var a=1;o.data.copy(i);t-=o.data.length;while(o=o.next){var l=o.data;var u=t>l.length?l.length:t;l.copy(i,i.length-t,0,u);t-=u;if(t===0){if(u===l.length){++a;if(o.next)r.head=o.next;else r.head=r.tail=null}else{r.head=o;o.data=l.slice(u)}break}++a}r.length-=a;return i}function endReadable(t){var r=t._readableState;if(r.length>0)throw new Error('"endReadable()" called on non-empty stream');if(!r.endEmitted){r.ended=true;o.nextTick(endReadableNT,r,t)}}function endReadableNT(t,r){if(!t.endEmitted&&t.length===0){t.endEmitted=true;r.readable=false;r.emit("end")}}function indexOf(t,r){for(var i=0,o=t.length;i<o;i++){if(t[i]===r)return i}return-1}},2162:(t,r,i)=>{"use strict";t.exports=Transform;var o=i(4928);var a=Object.create(i(642));a.inherits=i(2842);a.inherits(Transform,o);function afterTransform(t,r){var i=this._transformState;i.transforming=false;var o=i.writecb;if(!o){return this.emit("error",new Error("write callback called multiple times"))}i.writechunk=null;i.writecb=null;if(r!=null)this.push(r);o(t);var a=this._readableState;a.reading=false;if(a.needReadable||a.length<a.highWaterMark){this._read(a.highWaterMark)}}function Transform(t){if(!(this instanceof Transform))return new Transform(t);o.call(this,t);this._transformState={afterTransform:afterTransform.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null};this._readableState.needReadable=true;this._readableState.sync=false;if(t){if(typeof t.transform==="function")this._transform=t.transform;if(typeof t.flush==="function")this._flush=t.flush}this.on("prefinish",prefinish)}function prefinish(){var t=this;if(typeof this._flush==="function"){this._flush((function(r,i){done(t,r,i)}))}else{done(this,null,null)}}Transform.prototype.push=function(t,r){this._transformState.needTransform=false;return o.prototype.push.call(this,t,r)};Transform.prototype._transform=function(t,r,i){throw new Error("_transform() is not implemented")};Transform.prototype._write=function(t,r,i){var o=this._transformState;o.writecb=i;o.writechunk=t;o.writeencoding=r;if(!o.transforming){var a=this._readableState;if(o.needTransform||a.needReadable||a.length<a.highWaterMark)this._read(a.highWaterMark)}};Transform.prototype._read=function(t){var r=this._transformState;if(r.writechunk!==null&&r.writecb&&!r.transforming){r.transforming=true;this._transform(r.writechunk,r.writeencoding,r.afterTransform)}else{r.needTransform=true}};Transform.prototype._destroy=function(t,r){var i=this;o.prototype._destroy.call(this,t,(function(t){r(t);i.emit("close")}))};function done(t,r,i){if(r)return t.emit("error",r);if(i!=null)t.push(i);if(t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}},3517:(t,r,i)=>{"use strict";var o=i(9182);t.exports=Writable;function WriteReq(t,r,i){this.chunk=t;this.encoding=r;this.callback=i;this.next=null}function CorkedRequest(t){var r=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(r,t)}}var a=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:o.nextTick;var l;Writable.WritableState=WritableState;var u=Object.create(i(642));u.inherits=i(2842);var c={deprecate:i(6124)};var h=i(2641);var p=i(291).Buffer;var d=global.Uint8Array||function(){};function _uint8ArrayToBuffer(t){return p.from(t)}function _isUint8Array(t){return p.isBuffer(t)||t instanceof d}var m=i(2604);u.inherits(Writable,h);function nop(){}function WritableState(t,r){l=l||i(4928);t=t||{};var o=r instanceof l;this.objectMode=!!t.objectMode;if(o)this.objectMode=this.objectMode||!!t.writableObjectMode;var a=t.highWaterMark;var u=t.writableHighWaterMark;var c=this.objectMode?16:16*1024;if(a||a===0)this.highWaterMark=a;else if(o&&(u||u===0))this.highWaterMark=u;else this.highWaterMark=c;this.highWaterMark=Math.floor(this.highWaterMark);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var h=t.decodeStrings===false;this.decodeStrings=!h;this.defaultEncoding=t.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(t){onwrite(r,t)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var t=this.bufferedRequest;var r=[];while(t){r.push(t);t=t.next}return r};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(t){}})();var g;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){g=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function(t){if(g.call(this,t))return true;if(this!==Writable)return false;return t&&t._writableState instanceof WritableState}})}else{g=function(t){return t instanceof this}}function Writable(t){l=l||i(4928);if(!g.call(Writable,this)&&!(this instanceof l)){return new Writable(t)}this._writableState=new WritableState(t,this);this.writable=true;if(t){if(typeof t.write==="function")this._write=t.write;if(typeof t.writev==="function")this._writev=t.writev;if(typeof t.destroy==="function")this._destroy=t.destroy;if(typeof t.final==="function")this._final=t.final}h.call(this)}Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function writeAfterEnd(t,r){var i=new Error("write after end");t.emit("error",i);o.nextTick(r,i)}function validChunk(t,r,i,a){var l=true;var u=false;if(i===null){u=new TypeError("May not write null values to stream")}else if(typeof i!=="string"&&i!==undefined&&!r.objectMode){u=new TypeError("Invalid non-string/buffer chunk")}if(u){t.emit("error",u);o.nextTick(a,u);l=false}return l}Writable.prototype.write=function(t,r,i){var o=this._writableState;var a=false;var l=!o.objectMode&&_isUint8Array(t);if(l&&!p.isBuffer(t)){t=_uint8ArrayToBuffer(t)}if(typeof r==="function"){i=r;r=null}if(l)r="buffer";else if(!r)r=o.defaultEncoding;if(typeof i!=="function")i=nop;if(o.ended)writeAfterEnd(this,i);else if(l||validChunk(this,o,t,i)){o.pendingcb++;a=writeOrBuffer(this,o,l,t,r,i)}return a};Writable.prototype.cork=function(){var t=this._writableState;t.corked++};Writable.prototype.uncork=function(){var t=this._writableState;if(t.corked){t.corked--;if(!t.writing&&!t.corked&&!t.finished&&!t.bufferProcessing&&t.bufferedRequest)clearBuffer(this,t)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(t){if(typeof t==="string")t=t.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);this._writableState.defaultEncoding=t;return this};function decodeChunk(t,r,i){if(!t.objectMode&&t.decodeStrings!==false&&typeof r==="string"){r=p.from(r,i)}return r}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(t,r,i,o,a,l){if(!i){var u=decodeChunk(r,o,a);if(o!==u){i=true;a="buffer";o=u}}var c=r.objectMode?1:o.length;r.length+=c;var h=r.length<r.highWaterMark;if(!h)r.needDrain=true;if(r.writing||r.corked){var p=r.lastBufferedRequest;r.lastBufferedRequest={chunk:o,encoding:a,isBuf:i,callback:l,next:null};if(p){p.next=r.lastBufferedRequest}else{r.bufferedRequest=r.lastBufferedRequest}r.bufferedRequestCount+=1}else{doWrite(t,r,false,c,o,a,l)}return h}function doWrite(t,r,i,o,a,l,u){r.writelen=o;r.writecb=u;r.writing=true;r.sync=true;if(i)t._writev(a,r.onwrite);else t._write(a,l,r.onwrite);r.sync=false}function onwriteError(t,r,i,a,l){--r.pendingcb;if(i){o.nextTick(l,a);o.nextTick(finishMaybe,t,r);t._writableState.errorEmitted=true;t.emit("error",a)}else{l(a);t._writableState.errorEmitted=true;t.emit("error",a);finishMaybe(t,r)}}function onwriteStateUpdate(t){t.writing=false;t.writecb=null;t.length-=t.writelen;t.writelen=0}function onwrite(t,r){var i=t._writableState;var o=i.sync;var l=i.writecb;onwriteStateUpdate(i);if(r)onwriteError(t,i,o,r,l);else{var u=needFinish(i);if(!u&&!i.corked&&!i.bufferProcessing&&i.bufferedRequest){clearBuffer(t,i)}if(o){a(afterWrite,t,i,u,l)}else{afterWrite(t,i,u,l)}}}function afterWrite(t,r,i,o){if(!i)onwriteDrain(t,r);r.pendingcb--;o();finishMaybe(t,r)}function onwriteDrain(t,r){if(r.length===0&&r.needDrain){r.needDrain=false;t.emit("drain")}}function clearBuffer(t,r){r.bufferProcessing=true;var i=r.bufferedRequest;if(t._writev&&i&&i.next){var o=r.bufferedRequestCount;var a=new Array(o);var l=r.corkedRequestsFree;l.entry=i;var u=0;var c=true;while(i){a[u]=i;if(!i.isBuf)c=false;i=i.next;u+=1}a.allBuffers=c;doWrite(t,r,true,r.length,a,"",l.finish);r.pendingcb++;r.lastBufferedRequest=null;if(l.next){r.corkedRequestsFree=l.next;l.next=null}else{r.corkedRequestsFree=new CorkedRequest(r)}r.bufferedRequestCount=0}else{while(i){var h=i.chunk;var p=i.encoding;var d=i.callback;var m=r.objectMode?1:h.length;doWrite(t,r,false,m,h,p,d);i=i.next;r.bufferedRequestCount--;if(r.writing){break}}if(i===null)r.lastBufferedRequest=null}r.bufferedRequest=i;r.bufferProcessing=false}Writable.prototype._write=function(t,r,i){i(new Error("_write() is not implemented"))};Writable.prototype._writev=null;Writable.prototype.end=function(t,r,i){var o=this._writableState;if(typeof t==="function"){i=t;t=null;r=null}else if(typeof r==="function"){i=r;r=null}if(t!==null&&t!==undefined)this.write(t,r);if(o.corked){o.corked=1;this.uncork()}if(!o.ending&&!o.finished)endWritable(this,o,i)};function needFinish(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function callFinal(t,r){t._final((function(i){r.pendingcb--;if(i){t.emit("error",i)}r.prefinished=true;t.emit("prefinish");finishMaybe(t,r)}))}function prefinish(t,r){if(!r.prefinished&&!r.finalCalled){if(typeof t._final==="function"){r.pendingcb++;r.finalCalled=true;o.nextTick(callFinal,t,r)}else{r.prefinished=true;t.emit("prefinish")}}}function finishMaybe(t,r){var i=needFinish(r);if(i){prefinish(t,r);if(r.pendingcb===0){r.finished=true;t.emit("finish")}}return i}function endWritable(t,r,i){r.ending=true;finishMaybe(t,r);if(i){if(r.finished)o.nextTick(i);else t.once("finish",i)}r.ended=true;t.writable=false}function onCorkedFinish(t,r,i){var o=t.entry;t.entry=null;while(o){var a=o.callback;r.pendingcb--;a(i);o=o.next}if(r.corkedRequestsFree){r.corkedRequestsFree.next=t}else{r.corkedRequestsFree=t}}Object.defineProperty(Writable.prototype,"destroyed",{get:function(){if(this._writableState===undefined){return false}return this._writableState.destroyed},set:function(t){if(!this._writableState){return}this._writableState.destroyed=t}});Writable.prototype.destroy=m.destroy;Writable.prototype._undestroy=m.undestroy;Writable.prototype._destroy=function(t,r){this.end();r(t)}},4865:(t,r,i)=>{"use strict";function _classCallCheck(t,r){if(!(t instanceof r)){throw new TypeError("Cannot call a class as a function")}}var o=i(291).Buffer;var a=i(3837);function copyBuffer(t,r,i){t.copy(r,i)}t.exports=function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}BufferList.prototype.push=function push(t){var r={data:t,next:null};if(this.length>0)this.tail.next=r;else this.head=r;this.tail=r;++this.length};BufferList.prototype.unshift=function unshift(t){var r={data:t,next:this.head};if(this.length===0)this.tail=r;this.head=r;++this.length};BufferList.prototype.shift=function shift(){if(this.length===0)return;var t=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return t};BufferList.prototype.clear=function clear(){this.head=this.tail=null;this.length=0};BufferList.prototype.join=function join(t){if(this.length===0)return"";var r=this.head;var i=""+r.data;while(r=r.next){i+=t+r.data}return i};BufferList.prototype.concat=function concat(t){if(this.length===0)return o.alloc(0);if(this.length===1)return this.head.data;var r=o.allocUnsafe(t>>>0);var i=this.head;var a=0;while(i){copyBuffer(i.data,r,a);a+=i.data.length;i=i.next}return r};return BufferList}();if(a&&a.inspect&&a.inspect.custom){t.exports.prototype[a.inspect.custom]=function(){var t=a.inspect({length:this.length});return this.constructor.name+" "+t}}},2604:(t,r,i)=>{"use strict";var o=i(9182);function destroy(t,r){var i=this;var a=this._readableState&&this._readableState.destroyed;var l=this._writableState&&this._writableState.destroyed;if(a||l){if(r){r(t)}else if(t&&(!this._writableState||!this._writableState.errorEmitted)){o.nextTick(emitErrorNT,this,t)}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(t||null,(function(t){if(!r&&t){o.nextTick(emitErrorNT,i,t);if(i._writableState){i._writableState.errorEmitted=true}}else if(r){r(t)}}));return this}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(t,r){t.emit("error",r)}t.exports={destroy:destroy,undestroy:undestroy}},2641:(t,r,i)=>{t.exports=i(2781)},4088:(t,r,i)=>{t.exports=i(8511).PassThrough},8511:(t,r,i)=>{var o=i(2781);if(process.env.READABLE_STREAM==="disable"&&o){t.exports=o;r=t.exports=o.Readable;r.Readable=o.Readable;r.Writable=o.Writable;r.Duplex=o.Duplex;r.Transform=o.Transform;r.PassThrough=o.PassThrough;r.Stream=o}else{r=t.exports=i(7355);r.Stream=o||r;r.Readable=r;r.Writable=i(3517);r.Duplex=i(4928);r.Transform=i(2162);r.PassThrough=i(9924)}},4646:t=>{"use strict";const r={};function createErrorType(t,i,o){if(!o){o=Error}function getMessage(t,r,o){if(typeof i==="string"){return i}else{return i(t,r,o)}}class NodeError extends o{constructor(t,r,i){super(getMessage(t,r,i))}}NodeError.prototype.name=o.name;NodeError.prototype.code=t;r[t]=NodeError}function oneOf(t,r){if(Array.isArray(t)){const i=t.length;t=t.map((t=>String(t)));if(i>2){return`one of ${r} ${t.slice(0,i-1).join(", ")}, or `+t[i-1]}else if(i===2){return`one of ${r} ${t[0]} or ${t[1]}`}else{return`of ${r} ${t[0]}`}}else{return`of ${r} ${String(t)}`}}function startsWith(t,r,i){return t.substr(!i||i<0?0:+i,r.length)===r}function endsWith(t,r,i){if(i===undefined||i>t.length){i=t.length}return t.substring(i-r.length,i)===r}function includes(t,r,i){if(typeof i!=="number"){i=0}if(i+r.length>t.length){return false}else{return t.indexOf(r,i)!==-1}}createErrorType("ERR_INVALID_OPT_VALUE",(function(t,r){return'The value "'+r+'" is invalid for option "'+t+'"'}),TypeError);createErrorType("ERR_INVALID_ARG_TYPE",(function(t,r,i){let o;if(typeof r==="string"&&startsWith(r,"not ")){o="must not be";r=r.replace(/^not /,"")}else{o="must be"}let a;if(endsWith(t," argument")){a=`The ${t} ${o} ${oneOf(r,"type")}`}else{const i=includes(t,".")?"property":"argument";a=`The "${t}" ${i} ${o} ${oneOf(r,"type")}`}a+=`. Received type ${typeof i}`;return a}),TypeError);createErrorType("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");createErrorType("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"}));createErrorType("ERR_STREAM_PREMATURE_CLOSE","Premature close");createErrorType("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"}));createErrorType("ERR_MULTIPLE_CALLBACK","Callback called multiple times");createErrorType("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");createErrorType("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);createErrorType("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError);createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");t.exports.q=r},2403:(t,r,i)=>{"use strict";var o=Object.keys||function(t){var r=[];for(var i in t){r.push(i)}return r};t.exports=Duplex;var a=i(1709);var l=i(7337);i(2842)(Duplex,a);{var u=o(l.prototype);for(var c=0;c<u.length;c++){var h=u[c];if(!Duplex.prototype[h])Duplex.prototype[h]=l.prototype[h]}}function Duplex(t){if(!(this instanceof Duplex))return new Duplex(t);a.call(this,t);l.call(this,t);this.allowHalfOpen=true;if(t){if(t.readable===false)this.readable=false;if(t.writable===false)this.writable=false;if(t.allowHalfOpen===false){this.allowHalfOpen=false;this.once("end",onend)}}}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});Object.defineProperty(Duplex.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Duplex.prototype,"writableLength",{enumerable:false,get:function get(){return this._writableState.length}});function onend(){if(this._writableState.ended)return;process.nextTick(onEndNT,this)}function onEndNT(t){t.end()}Object.defineProperty(Duplex.prototype,"destroyed",{enumerable:false,get:function get(){if(this._readableState===undefined||this._writableState===undefined){return false}return this._readableState.destroyed&&this._writableState.destroyed},set:function set(t){if(this._readableState===undefined||this._writableState===undefined){return}this._readableState.destroyed=t;this._writableState.destroyed=t}})},7889:(t,r,i)=>{"use strict";t.exports=PassThrough;var o=i(1170);i(2842)(PassThrough,o);function PassThrough(t){if(!(this instanceof PassThrough))return new PassThrough(t);o.call(this,t)}PassThrough.prototype._transform=function(t,r,i){i(null,t)}},1709:(t,r,i)=>{"use strict";t.exports=Readable;var o;Readable.ReadableState=ReadableState;var a=i(2361).EventEmitter;var l=function EElistenerCount(t,r){return t.listeners(r).length};var u=i(4678);var c=i(4300).Buffer;var h=global.Uint8Array||function(){};function _uint8ArrayToBuffer(t){return c.from(t)}function _isUint8Array(t){return c.isBuffer(t)||t instanceof h}var p=i(3837);var d;if(p&&p.debuglog){d=p.debuglog("stream")}else{d=function debug(){}}var m=i(4379);var g=i(7025);var y=i(6776),v=y.getHighWaterMark;var b=i(4646).q,_=b.ERR_INVALID_ARG_TYPE,w=b.ERR_STREAM_PUSH_AFTER_EOF,S=b.ERR_METHOD_NOT_IMPLEMENTED,E=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;var x;var A;var O;i(2842)(Readable,u);var k=g.errorOrDestroy;var R=["error","close","destroy","pause","resume"];function prependListener(t,r,i){if(typeof t.prependListener==="function")return t.prependListener(r,i);if(!t._events||!t._events[r])t.on(r,i);else if(Array.isArray(t._events[r]))t._events[r].unshift(i);else t._events[r]=[i,t._events[r]]}function ReadableState(t,r,a){o=o||i(2403);t=t||{};if(typeof a!=="boolean")a=r instanceof o;this.objectMode=!!t.objectMode;if(a)this.objectMode=this.objectMode||!!t.readableObjectMode;this.highWaterMark=v(this,t,"readableHighWaterMark",a);this.buffer=new m;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.ended=false;this.endEmitted=false;this.reading=false;this.sync=true;this.needReadable=false;this.emittedReadable=false;this.readableListening=false;this.resumeScheduled=false;this.paused=true;this.emitClose=t.emitClose!==false;this.autoDestroy=!!t.autoDestroy;this.destroyed=false;this.defaultEncoding=t.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=false;this.decoder=null;this.encoding=null;if(t.encoding){if(!x)x=i(3704).s;this.decoder=new x(t.encoding);this.encoding=t.encoding}}function Readable(t){o=o||i(2403);if(!(this instanceof Readable))return new Readable(t);var r=this instanceof o;this._readableState=new ReadableState(t,this,r);this.readable=true;if(t){if(typeof t.read==="function")this._read=t.read;if(typeof t.destroy==="function")this._destroy=t.destroy}u.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{enumerable:false,get:function get(){if(this._readableState===undefined){return false}return this._readableState.destroyed},set:function set(t){if(!this._readableState){return}this._readableState.destroyed=t}});Readable.prototype.destroy=g.destroy;Readable.prototype._undestroy=g.undestroy;Readable.prototype._destroy=function(t,r){r(t)};Readable.prototype.push=function(t,r){var i=this._readableState;var o;if(!i.objectMode){if(typeof t==="string"){r=r||i.defaultEncoding;if(r!==i.encoding){t=c.from(t,r);r=""}o=true}}else{o=true}return readableAddChunk(this,t,r,false,o)};Readable.prototype.unshift=function(t){return readableAddChunk(this,t,null,true,false)};function readableAddChunk(t,r,i,o,a){d("readableAddChunk",r);var l=t._readableState;if(r===null){l.reading=false;onEofChunk(t,l)}else{var u;if(!a)u=chunkInvalid(l,r);if(u){k(t,u)}else if(l.objectMode||r&&r.length>0){if(typeof r!=="string"&&!l.objectMode&&Object.getPrototypeOf(r)!==c.prototype){r=_uint8ArrayToBuffer(r)}if(o){if(l.endEmitted)k(t,new E);else addChunk(t,l,r,true)}else if(l.ended){k(t,new w)}else if(l.destroyed){return false}else{l.reading=false;if(l.decoder&&!i){r=l.decoder.write(r);if(l.objectMode||r.length!==0)addChunk(t,l,r,false);else maybeReadMore(t,l)}else{addChunk(t,l,r,false)}}}else if(!o){l.reading=false;maybeReadMore(t,l)}}return!l.ended&&(l.length<l.highWaterMark||l.length===0)}function addChunk(t,r,i,o){if(r.flowing&&r.length===0&&!r.sync){r.awaitDrain=0;t.emit("data",i)}else{r.length+=r.objectMode?1:i.length;if(o)r.buffer.unshift(i);else r.buffer.push(i);if(r.needReadable)emitReadable(t)}maybeReadMore(t,r)}function chunkInvalid(t,r){var i;if(!_isUint8Array(r)&&typeof r!=="string"&&r!==undefined&&!t.objectMode){i=new _("chunk",["string","Buffer","Uint8Array"],r)}return i}Readable.prototype.isPaused=function(){return this._readableState.flowing===false};Readable.prototype.setEncoding=function(t){if(!x)x=i(3704).s;var r=new x(t);this._readableState.decoder=r;this._readableState.encoding=this._readableState.decoder.encoding;var o=this._readableState.buffer.head;var a="";while(o!==null){a+=r.write(o.data);o=o.next}this._readableState.buffer.clear();if(a!=="")this._readableState.buffer.push(a);this._readableState.length=a.length;return this};var T=1073741824;function computeNewHighWaterMark(t){if(t>=T){t=T}else{t--;t|=t>>>1;t|=t>>>2;t|=t>>>4;t|=t>>>8;t|=t>>>16;t++}return t}function howMuchToRead(t,r){if(t<=0||r.length===0&&r.ended)return 0;if(r.objectMode)return 1;if(t!==t){if(r.flowing&&r.length)return r.buffer.head.data.length;else return r.length}if(t>r.highWaterMark)r.highWaterMark=computeNewHighWaterMark(t);if(t<=r.length)return t;if(!r.ended){r.needReadable=true;return 0}return r.length}Readable.prototype.read=function(t){d("read",t);t=parseInt(t,10);var r=this._readableState;var i=t;if(t!==0)r.emittedReadable=false;if(t===0&&r.needReadable&&((r.highWaterMark!==0?r.length>=r.highWaterMark:r.length>0)||r.ended)){d("read: emitReadable",r.length,r.ended);if(r.length===0&&r.ended)endReadable(this);else emitReadable(this);return null}t=howMuchToRead(t,r);if(t===0&&r.ended){if(r.length===0)endReadable(this);return null}var o=r.needReadable;d("need readable",o);if(r.length===0||r.length-t<r.highWaterMark){o=true;d("length less than watermark",o)}if(r.ended||r.reading){o=false;d("reading or ended",o)}else if(o){d("do read");r.reading=true;r.sync=true;if(r.length===0)r.needReadable=true;this._read(r.highWaterMark);r.sync=false;if(!r.reading)t=howMuchToRead(i,r)}var a;if(t>0)a=fromList(t,r);else a=null;if(a===null){r.needReadable=r.length<=r.highWaterMark;t=0}else{r.length-=t;r.awaitDrain=0}if(r.length===0){if(!r.ended)r.needReadable=true;if(i!==t&&r.ended)endReadable(this)}if(a!==null)this.emit("data",a);return a};function onEofChunk(t,r){d("onEofChunk");if(r.ended)return;if(r.decoder){var i=r.decoder.end();if(i&&i.length){r.buffer.push(i);r.length+=r.objectMode?1:i.length}}r.ended=true;if(r.sync){emitReadable(t)}else{r.needReadable=false;if(!r.emittedReadable){r.emittedReadable=true;emitReadable_(t)}}}function emitReadable(t){var r=t._readableState;d("emitReadable",r.needReadable,r.emittedReadable);r.needReadable=false;if(!r.emittedReadable){d("emitReadable",r.flowing);r.emittedReadable=true;process.nextTick(emitReadable_,t)}}function emitReadable_(t){var r=t._readableState;d("emitReadable_",r.destroyed,r.length,r.ended);if(!r.destroyed&&(r.length||r.ended)){t.emit("readable");r.emittedReadable=false}r.needReadable=!r.flowing&&!r.ended&&r.length<=r.highWaterMark;flow(t)}function maybeReadMore(t,r){if(!r.readingMore){r.readingMore=true;process.nextTick(maybeReadMore_,t,r)}}function maybeReadMore_(t,r){while(!r.reading&&!r.ended&&(r.length<r.highWaterMark||r.flowing&&r.length===0)){var i=r.length;d("maybeReadMore read 0");t.read(0);if(i===r.length)break}r.readingMore=false}Readable.prototype._read=function(t){k(this,new S("_read()"))};Readable.prototype.pipe=function(t,r){var i=this;var o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t);break}o.pipesCount+=1;d("pipe count=%d opts=%j",o.pipesCount,r);var a=(!r||r.end!==false)&&t!==process.stdout&&t!==process.stderr;var u=a?onend:unpipe;if(o.endEmitted)process.nextTick(u);else i.once("end",u);t.on("unpipe",onunpipe);function onunpipe(t,r){d("onunpipe");if(t===i){if(r&&r.hasUnpiped===false){r.hasUnpiped=true;cleanup()}}}function onend(){d("onend");t.end()}var c=pipeOnDrain(i);t.on("drain",c);var h=false;function cleanup(){d("cleanup");t.removeListener("close",onclose);t.removeListener("finish",onfinish);t.removeListener("drain",c);t.removeListener("error",onerror);t.removeListener("unpipe",onunpipe);i.removeListener("end",onend);i.removeListener("end",unpipe);i.removeListener("data",ondata);h=true;if(o.awaitDrain&&(!t._writableState||t._writableState.needDrain))c()}i.on("data",ondata);function ondata(r){d("ondata");var a=t.write(r);d("dest.write",a);if(a===false){if((o.pipesCount===1&&o.pipes===t||o.pipesCount>1&&indexOf(o.pipes,t)!==-1)&&!h){d("false write response, pause",o.awaitDrain);o.awaitDrain++}i.pause()}}function onerror(r){d("onerror",r);unpipe();t.removeListener("error",onerror);if(l(t,"error")===0)k(t,r)}prependListener(t,"error",onerror);function onclose(){t.removeListener("finish",onfinish);unpipe()}t.once("close",onclose);function onfinish(){d("onfinish");t.removeListener("close",onclose);unpipe()}t.once("finish",onfinish);function unpipe(){d("unpipe");i.unpipe(t)}t.emit("pipe",i);if(!o.flowing){d("pipe resume");i.resume()}return t};function pipeOnDrain(t){return function pipeOnDrainFunctionResult(){var r=t._readableState;d("pipeOnDrain",r.awaitDrain);if(r.awaitDrain)r.awaitDrain--;if(r.awaitDrain===0&&l(t,"data")){r.flowing=true;flow(t)}}}Readable.prototype.unpipe=function(t){var r=this._readableState;var i={hasUnpiped:false};if(r.pipesCount===0)return this;if(r.pipesCount===1){if(t&&t!==r.pipes)return this;if(!t)t=r.pipes;r.pipes=null;r.pipesCount=0;r.flowing=false;if(t)t.emit("unpipe",this,i);return this}if(!t){var o=r.pipes;var a=r.pipesCount;r.pipes=null;r.pipesCount=0;r.flowing=false;for(var l=0;l<a;l++){o[l].emit("unpipe",this,{hasUnpiped:false})}return this}var u=indexOf(r.pipes,t);if(u===-1)return this;r.pipes.splice(u,1);r.pipesCount-=1;if(r.pipesCount===1)r.pipes=r.pipes[0];t.emit("unpipe",this,i);return this};Readable.prototype.on=function(t,r){var i=u.prototype.on.call(this,t,r);var o=this._readableState;if(t==="data"){o.readableListening=this.listenerCount("readable")>0;if(o.flowing!==false)this.resume()}else if(t==="readable"){if(!o.endEmitted&&!o.readableListening){o.readableListening=o.needReadable=true;o.flowing=false;o.emittedReadable=false;d("on readable",o.length,o.reading);if(o.length){emitReadable(this)}else if(!o.reading){process.nextTick(nReadingNextTick,this)}}}return i};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.removeListener=function(t,r){var i=u.prototype.removeListener.call(this,t,r);if(t==="readable"){process.nextTick(updateReadableListening,this)}return i};Readable.prototype.removeAllListeners=function(t){var r=u.prototype.removeAllListeners.apply(this,arguments);if(t==="readable"||t===undefined){process.nextTick(updateReadableListening,this)}return r};function updateReadableListening(t){var r=t._readableState;r.readableListening=t.listenerCount("readable")>0;if(r.resumeScheduled&&!r.paused){r.flowing=true}else if(t.listenerCount("data")>0){t.resume()}}function nReadingNextTick(t){d("readable nexttick read 0");t.read(0)}Readable.prototype.resume=function(){var t=this._readableState;if(!t.flowing){d("resume");t.flowing=!t.readableListening;resume(this,t)}t.paused=false;return this};function resume(t,r){if(!r.resumeScheduled){r.resumeScheduled=true;process.nextTick(resume_,t,r)}}function resume_(t,r){d("resume",r.reading);if(!r.reading){t.read(0)}r.resumeScheduled=false;t.emit("resume");flow(t);if(r.flowing&&!r.reading)t.read(0)}Readable.prototype.pause=function(){d("call pause flowing=%j",this._readableState.flowing);if(this._readableState.flowing!==false){d("pause");this._readableState.flowing=false;this.emit("pause")}this._readableState.paused=true;return this};function flow(t){var r=t._readableState;d("flow",r.flowing);while(r.flowing&&t.read()!==null){}}Readable.prototype.wrap=function(t){var r=this;var i=this._readableState;var o=false;t.on("end",(function(){d("wrapped end");if(i.decoder&&!i.ended){var t=i.decoder.end();if(t&&t.length)r.push(t)}r.push(null)}));t.on("data",(function(a){d("wrapped data");if(i.decoder)a=i.decoder.write(a);if(i.objectMode&&(a===null||a===undefined))return;else if(!i.objectMode&&(!a||!a.length))return;var l=r.push(a);if(!l){o=true;t.pause()}}));for(var a in t){if(this[a]===undefined&&typeof t[a]==="function"){this[a]=function methodWrap(r){return function methodWrapReturnFunction(){return t[r].apply(t,arguments)}}(a)}}for(var l=0;l<R.length;l++){t.on(R[l],this.emit.bind(this,R[l]))}this._read=function(r){d("wrapped _read",r);if(o){o=false;t.resume()}};return this};if(typeof Symbol==="function"){Readable.prototype[Symbol.asyncIterator]=function(){if(A===undefined){A=i(6871)}return A(this)}}Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:false,get:function get(){return this._readableState.highWaterMark}});Object.defineProperty(Readable.prototype,"readableBuffer",{enumerable:false,get:function get(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Readable.prototype,"readableFlowing",{enumerable:false,get:function get(){return this._readableState.flowing},set:function set(t){if(this._readableState){this._readableState.flowing=t}}});Readable._fromList=fromList;Object.defineProperty(Readable.prototype,"readableLength",{enumerable:false,get:function get(){return this._readableState.length}});function fromList(t,r){if(r.length===0)return null;var i;if(r.objectMode)i=r.buffer.shift();else if(!t||t>=r.length){if(r.decoder)i=r.buffer.join("");else if(r.buffer.length===1)i=r.buffer.first();else i=r.buffer.concat(r.length);r.buffer.clear()}else{i=r.buffer.consume(t,r.decoder)}return i}function endReadable(t){var r=t._readableState;d("endReadable",r.endEmitted);if(!r.endEmitted){r.ended=true;process.nextTick(endReadableNT,r,t)}}function endReadableNT(t,r){d("endReadableNT",t.endEmitted,t.length);if(!t.endEmitted&&t.length===0){t.endEmitted=true;r.readable=false;r.emit("end");if(t.autoDestroy){var i=r._writableState;if(!i||i.autoDestroy&&i.finished){r.destroy()}}}}if(typeof Symbol==="function"){Readable.from=function(t,r){if(O===undefined){O=i(9727)}return O(Readable,t,r)}}function indexOf(t,r){for(var i=0,o=t.length;i<o;i++){if(t[i]===r)return i}return-1}},1170:(t,r,i)=>{"use strict";t.exports=Transform;var o=i(4646).q,a=o.ERR_METHOD_NOT_IMPLEMENTED,l=o.ERR_MULTIPLE_CALLBACK,u=o.ERR_TRANSFORM_ALREADY_TRANSFORMING,c=o.ERR_TRANSFORM_WITH_LENGTH_0;var h=i(2403);i(2842)(Transform,h);function afterTransform(t,r){var i=this._transformState;i.transforming=false;var o=i.writecb;if(o===null){return this.emit("error",new l)}i.writechunk=null;i.writecb=null;if(r!=null)this.push(r);o(t);var a=this._readableState;a.reading=false;if(a.needReadable||a.length<a.highWaterMark){this._read(a.highWaterMark)}}function Transform(t){if(!(this instanceof Transform))return new Transform(t);h.call(this,t);this._transformState={afterTransform:afterTransform.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null};this._readableState.needReadable=true;this._readableState.sync=false;if(t){if(typeof t.transform==="function")this._transform=t.transform;if(typeof t.flush==="function")this._flush=t.flush}this.on("prefinish",prefinish)}function prefinish(){var t=this;if(typeof this._flush==="function"&&!this._readableState.destroyed){this._flush((function(r,i){done(t,r,i)}))}else{done(this,null,null)}}Transform.prototype.push=function(t,r){this._transformState.needTransform=false;return h.prototype.push.call(this,t,r)};Transform.prototype._transform=function(t,r,i){i(new a("_transform()"))};Transform.prototype._write=function(t,r,i){var o=this._transformState;o.writecb=i;o.writechunk=t;o.writeencoding=r;if(!o.transforming){var a=this._readableState;if(o.needTransform||a.needReadable||a.length<a.highWaterMark)this._read(a.highWaterMark)}};Transform.prototype._read=function(t){var r=this._transformState;if(r.writechunk!==null&&!r.transforming){r.transforming=true;this._transform(r.writechunk,r.writeencoding,r.afterTransform)}else{r.needTransform=true}};Transform.prototype._destroy=function(t,r){h.prototype._destroy.call(this,t,(function(t){r(t)}))};function done(t,r,i){if(r)return t.emit("error",r);if(i!=null)t.push(i);if(t._writableState.length)throw new c;if(t._transformState.transforming)throw new u;return t.push(null)}},7337:(t,r,i)=>{"use strict";t.exports=Writable;function WriteReq(t,r,i){this.chunk=t;this.encoding=r;this.callback=i;this.next=null}function CorkedRequest(t){var r=this;this.next=null;this.entry=null;this.finish=function(){onCorkedFinish(r,t)}}var o;Writable.WritableState=WritableState;var a={deprecate:i(6124)};var l=i(4678);var u=i(4300).Buffer;var c=global.Uint8Array||function(){};function _uint8ArrayToBuffer(t){return u.from(t)}function _isUint8Array(t){return u.isBuffer(t)||t instanceof c}var h=i(7025);var p=i(6776),d=p.getHighWaterMark;var m=i(4646).q,g=m.ERR_INVALID_ARG_TYPE,y=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_MULTIPLE_CALLBACK,b=m.ERR_STREAM_CANNOT_PIPE,_=m.ERR_STREAM_DESTROYED,w=m.ERR_STREAM_NULL_VALUES,S=m.ERR_STREAM_WRITE_AFTER_END,E=m.ERR_UNKNOWN_ENCODING;var x=h.errorOrDestroy;i(2842)(Writable,l);function nop(){}function WritableState(t,r,a){o=o||i(2403);t=t||{};if(typeof a!=="boolean")a=r instanceof o;this.objectMode=!!t.objectMode;if(a)this.objectMode=this.objectMode||!!t.writableObjectMode;this.highWaterMark=d(this,t,"writableHighWaterMark",a);this.finalCalled=false;this.needDrain=false;this.ending=false;this.ended=false;this.finished=false;this.destroyed=false;var l=t.decodeStrings===false;this.decodeStrings=!l;this.defaultEncoding=t.defaultEncoding||"utf8";this.length=0;this.writing=false;this.corked=0;this.sync=true;this.bufferProcessing=false;this.onwrite=function(t){onwrite(r,t)};this.writecb=null;this.writelen=0;this.bufferedRequest=null;this.lastBufferedRequest=null;this.pendingcb=0;this.prefinished=false;this.errorEmitted=false;this.emitClose=t.emitClose!==false;this.autoDestroy=!!t.autoDestroy;this.bufferedRequestCount=0;this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function getBuffer(){var t=this.bufferedRequest;var r=[];while(t){r.push(t);t=t.next}return r};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:a.deprecate((function writableStateBufferGetter(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer "+"instead.","DEP0003")})}catch(t){}})();var A;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function"){A=Function.prototype[Symbol.hasInstance];Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(t){if(A.call(this,t))return true;if(this!==Writable)return false;return t&&t._writableState instanceof WritableState}})}else{A=function realHasInstance(t){return t instanceof this}}function Writable(t){o=o||i(2403);var r=this instanceof o;if(!r&&!A.call(Writable,this))return new Writable(t);this._writableState=new WritableState(t,this,r);this.writable=true;if(t){if(typeof t.write==="function")this._write=t.write;if(typeof t.writev==="function")this._writev=t.writev;if(typeof t.destroy==="function")this._destroy=t.destroy;if(typeof t.final==="function")this._final=t.final}l.call(this)}Writable.prototype.pipe=function(){x(this,new b)};function writeAfterEnd(t,r){var i=new S;x(t,i);process.nextTick(r,i)}function validChunk(t,r,i,o){var a;if(i===null){a=new w}else if(typeof i!=="string"&&!r.objectMode){a=new g("chunk",["string","Buffer"],i)}if(a){x(t,a);process.nextTick(o,a);return false}return true}Writable.prototype.write=function(t,r,i){var o=this._writableState;var a=false;var l=!o.objectMode&&_isUint8Array(t);if(l&&!u.isBuffer(t)){t=_uint8ArrayToBuffer(t)}if(typeof r==="function"){i=r;r=null}if(l)r="buffer";else if(!r)r=o.defaultEncoding;if(typeof i!=="function")i=nop;if(o.ending)writeAfterEnd(this,i);else if(l||validChunk(this,o,t,i)){o.pendingcb++;a=writeOrBuffer(this,o,l,t,r,i)}return a};Writable.prototype.cork=function(){this._writableState.corked++};Writable.prototype.uncork=function(){var t=this._writableState;if(t.corked){t.corked--;if(!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest)clearBuffer(this,t)}};Writable.prototype.setDefaultEncoding=function setDefaultEncoding(t){if(typeof t==="string")t=t.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new E(t);this._writableState.defaultEncoding=t;return this};Object.defineProperty(Writable.prototype,"writableBuffer",{enumerable:false,get:function get(){return this._writableState&&this._writableState.getBuffer()}});function decodeChunk(t,r,i){if(!t.objectMode&&t.decodeStrings!==false&&typeof r==="string"){r=u.from(r,i)}return r}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:false,get:function get(){return this._writableState.highWaterMark}});function writeOrBuffer(t,r,i,o,a,l){if(!i){var u=decodeChunk(r,o,a);if(o!==u){i=true;a="buffer";o=u}}var c=r.objectMode?1:o.length;r.length+=c;var h=r.length<r.highWaterMark;if(!h)r.needDrain=true;if(r.writing||r.corked){var p=r.lastBufferedRequest;r.lastBufferedRequest={chunk:o,encoding:a,isBuf:i,callback:l,next:null};if(p){p.next=r.lastBufferedRequest}else{r.bufferedRequest=r.lastBufferedRequest}r.bufferedRequestCount+=1}else{doWrite(t,r,false,c,o,a,l)}return h}function doWrite(t,r,i,o,a,l,u){r.writelen=o;r.writecb=u;r.writing=true;r.sync=true;if(r.destroyed)r.onwrite(new _("write"));else if(i)t._writev(a,r.onwrite);else t._write(a,l,r.onwrite);r.sync=false}function onwriteError(t,r,i,o,a){--r.pendingcb;if(i){process.nextTick(a,o);process.nextTick(finishMaybe,t,r);t._writableState.errorEmitted=true;x(t,o)}else{a(o);t._writableState.errorEmitted=true;x(t,o);finishMaybe(t,r)}}function onwriteStateUpdate(t){t.writing=false;t.writecb=null;t.length-=t.writelen;t.writelen=0}function onwrite(t,r){var i=t._writableState;var o=i.sync;var a=i.writecb;if(typeof a!=="function")throw new v;onwriteStateUpdate(i);if(r)onwriteError(t,i,o,r,a);else{var l=needFinish(i)||t.destroyed;if(!l&&!i.corked&&!i.bufferProcessing&&i.bufferedRequest){clearBuffer(t,i)}if(o){process.nextTick(afterWrite,t,i,l,a)}else{afterWrite(t,i,l,a)}}}function afterWrite(t,r,i,o){if(!i)onwriteDrain(t,r);r.pendingcb--;o();finishMaybe(t,r)}function onwriteDrain(t,r){if(r.length===0&&r.needDrain){r.needDrain=false;t.emit("drain")}}function clearBuffer(t,r){r.bufferProcessing=true;var i=r.bufferedRequest;if(t._writev&&i&&i.next){var o=r.bufferedRequestCount;var a=new Array(o);var l=r.corkedRequestsFree;l.entry=i;var u=0;var c=true;while(i){a[u]=i;if(!i.isBuf)c=false;i=i.next;u+=1}a.allBuffers=c;doWrite(t,r,true,r.length,a,"",l.finish);r.pendingcb++;r.lastBufferedRequest=null;if(l.next){r.corkedRequestsFree=l.next;l.next=null}else{r.corkedRequestsFree=new CorkedRequest(r)}r.bufferedRequestCount=0}else{while(i){var h=i.chunk;var p=i.encoding;var d=i.callback;var m=r.objectMode?1:h.length;doWrite(t,r,false,m,h,p,d);i=i.next;r.bufferedRequestCount--;if(r.writing){break}}if(i===null)r.lastBufferedRequest=null}r.bufferedRequest=i;r.bufferProcessing=false}Writable.prototype._write=function(t,r,i){i(new y("_write()"))};Writable.prototype._writev=null;Writable.prototype.end=function(t,r,i){var o=this._writableState;if(typeof t==="function"){i=t;t=null;r=null}else if(typeof r==="function"){i=r;r=null}if(t!==null&&t!==undefined)this.write(t,r);if(o.corked){o.corked=1;this.uncork()}if(!o.ending)endWritable(this,o,i);return this};Object.defineProperty(Writable.prototype,"writableLength",{enumerable:false,get:function get(){return this._writableState.length}});function needFinish(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function callFinal(t,r){t._final((function(i){r.pendingcb--;if(i){x(t,i)}r.prefinished=true;t.emit("prefinish");finishMaybe(t,r)}))}function prefinish(t,r){if(!r.prefinished&&!r.finalCalled){if(typeof t._final==="function"&&!r.destroyed){r.pendingcb++;r.finalCalled=true;process.nextTick(callFinal,t,r)}else{r.prefinished=true;t.emit("prefinish")}}}function finishMaybe(t,r){var i=needFinish(r);if(i){prefinish(t,r);if(r.pendingcb===0){r.finished=true;t.emit("finish");if(r.autoDestroy){var o=t._readableState;if(!o||o.autoDestroy&&o.endEmitted){t.destroy()}}}}return i}function endWritable(t,r,i){r.ending=true;finishMaybe(t,r);if(i){if(r.finished)process.nextTick(i);else t.once("finish",i)}r.ended=true;t.writable=false}function onCorkedFinish(t,r,i){var o=t.entry;t.entry=null;while(o){var a=o.callback;r.pendingcb--;a(i);o=o.next}r.corkedRequestsFree.next=t}Object.defineProperty(Writable.prototype,"destroyed",{enumerable:false,get:function get(){if(this._writableState===undefined){return false}return this._writableState.destroyed},set:function set(t){if(!this._writableState){return}this._writableState.destroyed=t}});Writable.prototype.destroy=h.destroy;Writable.prototype._undestroy=h.undestroy;Writable.prototype._destroy=function(t,r){r(t)}},6871:(t,r,i)=>{"use strict";var o;function _defineProperty(t,r,i){if(r in t){Object.defineProperty(t,r,{value:i,enumerable:true,configurable:true,writable:true})}else{t[r]=i}return t}var a=i(9698);var l=Symbol("lastResolve");var u=Symbol("lastReject");var c=Symbol("error");var h=Symbol("ended");var p=Symbol("lastPromise");var d=Symbol("handlePromise");var m=Symbol("stream");function createIterResult(t,r){return{value:t,done:r}}function readAndResolve(t){var r=t[l];if(r!==null){var i=t[m].read();if(i!==null){t[p]=null;t[l]=null;t[u]=null;r(createIterResult(i,false))}}}function onReadable(t){process.nextTick(readAndResolve,t)}function wrapForNext(t,r){return function(i,o){t.then((function(){if(r[h]){i(createIterResult(undefined,true));return}r[d](i,o)}),o)}}var g=Object.getPrototypeOf((function(){}));var y=Object.setPrototypeOf((o={get stream(){return this[m]},next:function next(){var t=this;var r=this[c];if(r!==null){return Promise.reject(r)}if(this[h]){return Promise.resolve(createIterResult(undefined,true))}if(this[m].destroyed){return new Promise((function(r,i){process.nextTick((function(){if(t[c]){i(t[c])}else{r(createIterResult(undefined,true))}}))}))}var i=this[p];var o;if(i){o=new Promise(wrapForNext(i,this))}else{var a=this[m].read();if(a!==null){return Promise.resolve(createIterResult(a,false))}o=new Promise(this[d])}this[p]=o;return o}},_defineProperty(o,Symbol.asyncIterator,(function(){return this})),_defineProperty(o,"return",(function _return(){var t=this;return new Promise((function(r,i){t[m].destroy(null,(function(t){if(t){i(t);return}r(createIterResult(undefined,true))}))}))})),o),g);var v=function createReadableStreamAsyncIterator(t){var r;var i=Object.create(y,(r={},_defineProperty(r,m,{value:t,writable:true}),_defineProperty(r,l,{value:null,writable:true}),_defineProperty(r,u,{value:null,writable:true}),_defineProperty(r,c,{value:null,writable:true}),_defineProperty(r,h,{value:t._readableState.endEmitted,writable:true}),_defineProperty(r,d,{value:function value(t,r){var o=i[m].read();if(o){i[p]=null;i[l]=null;i[u]=null;t(createIterResult(o,false))}else{i[l]=t;i[u]=r}},writable:true}),r));i[p]=null;a(t,(function(t){if(t&&t.code!=="ERR_STREAM_PREMATURE_CLOSE"){var r=i[u];if(r!==null){i[p]=null;i[l]=null;i[u]=null;r(t)}i[c]=t;return}var o=i[l];if(o!==null){i[p]=null;i[l]=null;i[u]=null;o(createIterResult(undefined,true))}i[h]=true}));t.on("readable",onReadable.bind(null,i));return i};t.exports=v},4379:(t,r,i)=>{"use strict";function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);if(r)o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}));i.push.apply(i,o)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};if(r%2){ownKeys(Object(i),true).forEach((function(r){_defineProperty(t,r,i[r])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(t,Object.getOwnPropertyDescriptors(i))}else{ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}}return t}function _defineProperty(t,r,i){if(r in t){Object.defineProperty(t,r,{value:i,enumerable:true,configurable:true,writable:true})}else{t[r]=i}return t}function _classCallCheck(t,r){if(!(t instanceof r)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(t,r){for(var i=0;i<r.length;i++){var o=r[i];o.enumerable=o.enumerable||false;o.configurable=true;if("value"in o)o.writable=true;Object.defineProperty(t,o.key,o)}}function _createClass(t,r,i){if(r)_defineProperties(t.prototype,r);if(i)_defineProperties(t,i);return t}var o=i(4300),a=o.Buffer;var l=i(3837),u=l.inspect;var c=u&&u.custom||"inspect";function copyBuffer(t,r,i){a.prototype.copy.call(t,r,i)}t.exports=function(){function BufferList(){_classCallCheck(this,BufferList);this.head=null;this.tail=null;this.length=0}_createClass(BufferList,[{key:"push",value:function push(t){var r={data:t,next:null};if(this.length>0)this.tail.next=r;else this.head=r;this.tail=r;++this.length}},{key:"unshift",value:function unshift(t){var r={data:t,next:this.head};if(this.length===0)this.tail=r;this.head=r;++this.length}},{key:"shift",value:function shift(){if(this.length===0)return;var t=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;--this.length;return t}},{key:"clear",value:function clear(){this.head=this.tail=null;this.length=0}},{key:"join",value:function join(t){if(this.length===0)return"";var r=this.head;var i=""+r.data;while(r=r.next){i+=t+r.data}return i}},{key:"concat",value:function concat(t){if(this.length===0)return a.alloc(0);var r=a.allocUnsafe(t>>>0);var i=this.head;var o=0;while(i){copyBuffer(i.data,r,o);o+=i.data.length;i=i.next}return r}},{key:"consume",value:function consume(t,r){var i;if(t<this.head.data.length){i=this.head.data.slice(0,t);this.head.data=this.head.data.slice(t)}else if(t===this.head.data.length){i=this.shift()}else{i=r?this._getString(t):this._getBuffer(t)}return i}},{key:"first",value:function first(){return this.head.data}},{key:"_getString",value:function _getString(t){var r=this.head;var i=1;var o=r.data;t-=o.length;while(r=r.next){var a=r.data;var l=t>a.length?a.length:t;if(l===a.length)o+=a;else o+=a.slice(0,t);t-=l;if(t===0){if(l===a.length){++i;if(r.next)this.head=r.next;else this.head=this.tail=null}else{this.head=r;r.data=a.slice(l)}break}++i}this.length-=i;return o}},{key:"_getBuffer",value:function _getBuffer(t){var r=a.allocUnsafe(t);var i=this.head;var o=1;i.data.copy(r);t-=i.data.length;while(i=i.next){var l=i.data;var u=t>l.length?l.length:t;l.copy(r,r.length-t,0,u);t-=u;if(t===0){if(u===l.length){++o;if(i.next)this.head=i.next;else this.head=this.tail=null}else{this.head=i;i.data=l.slice(u)}break}++o}this.length-=o;return r}},{key:c,value:function value(t,r){return u(this,_objectSpread({},r,{depth:0,customInspect:false}))}}]);return BufferList}()},7025:t=>{"use strict";function destroy(t,r){var i=this;var o=this._readableState&&this._readableState.destroyed;var a=this._writableState&&this._writableState.destroyed;if(o||a){if(r){r(t)}else if(t){if(!this._writableState){process.nextTick(emitErrorNT,this,t)}else if(!this._writableState.errorEmitted){this._writableState.errorEmitted=true;process.nextTick(emitErrorNT,this,t)}}return this}if(this._readableState){this._readableState.destroyed=true}if(this._writableState){this._writableState.destroyed=true}this._destroy(t||null,(function(t){if(!r&&t){if(!i._writableState){process.nextTick(emitErrorAndCloseNT,i,t)}else if(!i._writableState.errorEmitted){i._writableState.errorEmitted=true;process.nextTick(emitErrorAndCloseNT,i,t)}else{process.nextTick(emitCloseNT,i)}}else if(r){process.nextTick(emitCloseNT,i);r(t)}else{process.nextTick(emitCloseNT,i)}}));return this}function emitErrorAndCloseNT(t,r){emitErrorNT(t,r);emitCloseNT(t)}function emitCloseNT(t){if(t._writableState&&!t._writableState.emitClose)return;if(t._readableState&&!t._readableState.emitClose)return;t.emit("close")}function undestroy(){if(this._readableState){this._readableState.destroyed=false;this._readableState.reading=false;this._readableState.ended=false;this._readableState.endEmitted=false}if(this._writableState){this._writableState.destroyed=false;this._writableState.ended=false;this._writableState.ending=false;this._writableState.finalCalled=false;this._writableState.prefinished=false;this._writableState.finished=false;this._writableState.errorEmitted=false}}function emitErrorNT(t,r){t.emit("error",r)}function errorOrDestroy(t,r){var i=t._readableState;var o=t._writableState;if(i&&i.autoDestroy||o&&o.autoDestroy)t.destroy(r);else t.emit("error",r)}t.exports={destroy:destroy,undestroy:undestroy,errorOrDestroy:errorOrDestroy}},9698:(t,r,i)=>{"use strict";var o=i(4646).q.ERR_STREAM_PREMATURE_CLOSE;function once(t){var r=false;return function(){if(r)return;r=true;for(var i=arguments.length,o=new Array(i),a=0;a<i;a++){o[a]=arguments[a]}t.apply(this,o)}}function noop(){}function isRequest(t){return t.setHeader&&typeof t.abort==="function"}function eos(t,r,i){if(typeof r==="function")return eos(t,null,r);if(!r)r={};i=once(i||noop);var a=r.readable||r.readable!==false&&t.readable;var l=r.writable||r.writable!==false&&t.writable;var u=function onlegacyfinish(){if(!t.writable)h()};var c=t._writableState&&t._writableState.finished;var h=function onfinish(){l=false;c=true;if(!a)i.call(t)};var p=t._readableState&&t._readableState.endEmitted;var d=function onend(){a=false;p=true;if(!l)i.call(t)};var m=function onerror(r){i.call(t,r)};var g=function onclose(){var r;if(a&&!p){if(!t._readableState||!t._readableState.ended)r=new o;return i.call(t,r)}if(l&&!c){if(!t._writableState||!t._writableState.ended)r=new o;return i.call(t,r)}};var y=function onrequest(){t.req.on("finish",h)};if(isRequest(t)){t.on("complete",h);t.on("abort",g);if(t.req)y();else t.on("request",y)}else if(l&&!t._writableState){t.on("end",u);t.on("close",u)}t.on("end",d);t.on("finish",h);if(r.error!==false)t.on("error",m);t.on("close",g);return function(){t.removeListener("complete",h);t.removeListener("abort",g);t.removeListener("request",y);if(t.req)t.req.removeListener("finish",h);t.removeListener("end",u);t.removeListener("close",u);t.removeListener("finish",h);t.removeListener("end",d);t.removeListener("error",m);t.removeListener("close",g)}}t.exports=eos},9727:(t,r,i)=>{"use strict";function asyncGeneratorStep(t,r,i,o,a,l,u){try{var c=t[l](u);var h=c.value}catch(t){i(t);return}if(c.done){r(h)}else{Promise.resolve(h).then(o,a)}}function _asyncToGenerator(t){return function(){var r=this,i=arguments;return new Promise((function(o,a){var l=t.apply(r,i);function _next(t){asyncGeneratorStep(l,o,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,o,a,_next,_throw,"throw",t)}_next(undefined)}))}}function ownKeys(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);if(r)o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}));i.push.apply(i,o)}return i}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};if(r%2){ownKeys(Object(i),true).forEach((function(r){_defineProperty(t,r,i[r])}))}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(t,Object.getOwnPropertyDescriptors(i))}else{ownKeys(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}}return t}function _defineProperty(t,r,i){if(r in t){Object.defineProperty(t,r,{value:i,enumerable:true,configurable:true,writable:true})}else{t[r]=i}return t}var o=i(4646).q.ERR_INVALID_ARG_TYPE;function from(t,r,i){var a;if(r&&typeof r.next==="function"){a=r}else if(r&&r[Symbol.asyncIterator])a=r[Symbol.asyncIterator]();else if(r&&r[Symbol.iterator])a=r[Symbol.iterator]();else throw new o("iterable",["Iterable"],r);var l=new t(_objectSpread({objectMode:true},i));var u=false;l._read=function(){if(!u){u=true;next()}};function next(){return _next2.apply(this,arguments)}function _next2(){_next2=_asyncToGenerator((function*(){try{var t=yield a.next(),r=t.value,i=t.done;if(i){l.push(null)}else if(l.push(yield r)){next()}else{u=false}}catch(t){l.destroy(t)}}));return _next2.apply(this,arguments)}return l}t.exports=from},8442:(t,r,i)=>{"use strict";var o;function once(t){var r=false;return function(){if(r)return;r=true;t.apply(void 0,arguments)}}var a=i(4646).q,l=a.ERR_MISSING_ARGS,u=a.ERR_STREAM_DESTROYED;function noop(t){if(t)throw t}function isRequest(t){return t.setHeader&&typeof t.abort==="function"}function destroyer(t,r,a,l){l=once(l);var c=false;t.on("close",(function(){c=true}));if(o===undefined)o=i(9698);o(t,{readable:r,writable:a},(function(t){if(t)return l(t);c=true;l()}));var h=false;return function(r){if(c)return;if(h)return;h=true;if(isRequest(t))return t.abort();if(typeof t.destroy==="function")return t.destroy();l(r||new u("pipe"))}}function call(t){t()}function pipe(t,r){return t.pipe(r)}function popCallback(t){if(!t.length)return noop;if(typeof t[t.length-1]!=="function")return noop;return t.pop()}function pipeline(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++){r[i]=arguments[i]}var o=popCallback(r);if(Array.isArray(r[0]))r=r[0];if(r.length<2){throw new l("streams")}var a;var u=r.map((function(t,i){var l=i<r.length-1;var c=i>0;return destroyer(t,l,c,(function(t){if(!a)a=t;if(t)u.forEach(call);if(l)return;u.forEach(call);o(a)}))}));return r.reduce(pipe)}t.exports=pipeline},6776:(t,r,i)=>{"use strict";var o=i(4646).q.ERR_INVALID_OPT_VALUE;function highWaterMarkFrom(t,r,i){return t.highWaterMark!=null?t.highWaterMark:r?t[i]:null}function getHighWaterMark(t,r,i,a){var l=highWaterMarkFrom(r,a,i);if(l!=null){if(!(isFinite(l)&&Math.floor(l)===l)||l<0){var u=a?i:"highWaterMark";throw new o(u,l)}return Math.floor(l)}return t.objectMode?16:16*1024}t.exports={getHighWaterMark:getHighWaterMark}},4678:(t,r,i)=>{t.exports=i(2781)},3726:(t,r,i)=>{var o=i(2781);if(process.env.READABLE_STREAM==="disable"&&o){t.exports=o.Readable;Object.assign(t.exports,o);t.exports.Stream=o}else{r=t.exports=i(1709);r.Stream=o||r;r.Readable=r;r.Writable=i(7337);r.Duplex=i(2403);r.Transform=i(1170);r.PassThrough=i(7889);r.finished=i(9698);r.pipeline=i(8442)}},3638:(t,r,i)=>{t.exports=readdirGlob;const o=i(7147);const{EventEmitter:a}=i(2361);const{Minimatch:l}=i(8923);const{resolve:u}=i(1017);function readdir(t,r){return new Promise(((i,a)=>{o.readdir(t,{withFileTypes:true},((t,o)=>{if(t){switch(t.code){case"ENOTDIR":if(r){a(t)}else{i([])}break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":i([]);break;case"ELOOP":default:a(t);break}}else{i(o)}}))}))}function stat(t,r){return new Promise(((i,a)=>{const l=r?o.stat:o.lstat;l(t,((o,a)=>{if(o){switch(o.code){case"ENOENT":if(r){i(stat(t,false))}else{i(null)}break;default:i(null);break}}else{i(a)}}))}))}async function*exploreWalkAsync(t,r,i,o,a,l){let u=await readdir(r+t,l);for(const l of u){let u=l.name;if(u===undefined){u=l;o=true}const c=t+"/"+u;const h=c.slice(1);const p=r+"/"+h;let d=null;if(o||i){d=await stat(p,i)}if(!d&&l.name!==undefined){d=l}if(d===null){d={isDirectory:()=>false}}if(d.isDirectory()){if(!a(h)){yield{relative:h,absolute:p,stats:d};yield*exploreWalkAsync(c,r,i,o,a,false)}}else{yield{relative:h,absolute:p,stats:d}}}}async function*explore(t,r,i,o){yield*exploreWalkAsync("",t,r,i,o,true)}function readOptions(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}class ReaddirGlob extends a{constructor(t,r,i){super();if(typeof r==="function"){i=r;r=null}this.options=readOptions(r||{});this.matchers=[];if(this.options.pattern){const t=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=t.map((t=>new l(t,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase})))}this.ignoreMatchers=[];if(this.options.ignore){const t=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=t.map((t=>new l(t,{dot:true})))}this.skipMatchers=[];if(this.options.skip){const t=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=t.map((t=>new l(t,{dot:true})))}this.iterator=explore(u(t||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this));this.paused=false;this.inactive=false;this.aborted=false;if(i){this._matches=[];this.on("match",(t=>this._matches.push(this.options.absolute?t.absolute:t.relative)));this.on("error",(t=>i(t)));this.on("end",(()=>i(null,this._matches)))}setTimeout((()=>this._next()),0)}_shouldSkipDirectory(t){return this.skipMatchers.some((r=>r.match(t)))}_fileMatches(t,r){const i=t+(r?"/":"");return(this.matchers.length===0||this.matchers.some((t=>t.match(i))))&&!this.ignoreMatchers.some((t=>t.match(i)))&&(!this.options.nodir||!r)}_next(){if(!this.paused&&!this.aborted){this.iterator.next().then((t=>{if(!t.done){const r=t.value.stats.isDirectory();if(this._fileMatches(t.value.relative,r)){let i=t.value.relative;let o=t.value.absolute;if(this.options.mark&&r){i+="/";o+="/"}if(this.options.stat){this.emit("match",{relative:i,absolute:o,stat:t.value.stats})}else{this.emit("match",{relative:i,absolute:o})}}this._next(this.iterator)}else{this.emit("end")}})).catch((t=>{this.abort();this.emit("error",t);if(!t.code&&!this.options.silent){console.error(t)}}))}else{this.inactive=true}}abort(){this.aborted=true}pause(){this.paused=true}resume(){this.paused=false;if(this.inactive){this.inactive=false;this._next()}}}function readdirGlob(t,r,i){return new ReaddirGlob(t,r,i)}readdirGlob.ReaddirGlob=ReaddirGlob},1913:(t,r,i)=>{const o=i(6911).Buffer;function decodeBase64(t){return o.from(t,"base64").toString("utf8")}function encodeBase64(t){return o.from(t,"utf8").toString("base64")}t.exports={decodeBase64:decodeBase64,encodeBase64:encodeBase64}},1281:(t,r,i)=>{var o=i(7310);var a=i(1913);var l=a.decodeBase64;var u=a.encodeBase64;var c=":_authToken";var h=":username";var p=":_password";t.exports=function(){var t;var r;if(arguments.length>=2){t=arguments[0];r=arguments[1]}else if(typeof arguments[0]==="string"){t=arguments[0]}else{r=arguments[0]}r=r||{};r.npmrc=r.npmrc||i(4446)("npm",{registry:"https://registry.npmjs.org/"});t=t||r.npmrc.registry;return getRegistryAuthInfo(t,r)||getLegacyAuthInfo(r.npmrc)};function getRegistryAuthInfo(t,r){var i=o.parse(t,false,true);var a;while(a!=="/"&&i.pathname!==a){a=i.pathname||"/";var l="//"+i.host+a.replace(/\/$/,"");var u=getAuthInfoForUrl(l,r.npmrc);if(u){return u}if(!r.recursive){return/\/$/.test(t)?undefined:getRegistryAuthInfo(o.resolve(t,"."),r)}i.pathname=o.resolve(normalizePath(a),"..")||"/"}return undefined}function getLegacyAuthInfo(t){if(t._auth){return{token:t._auth,type:"Basic"}}return undefined}function normalizePath(t){return t[t.length-1]==="/"?t:t+"/"}function getAuthInfoForUrl(t,r){var i=getBearerToken(r[t+c]||r[t+"/"+c]);if(i){return i}var o=r[t+h]||r[t+"/"+h];var a=r[t+p]||r[t+"/"+p];var l=getTokenForUsernameAndPassword(o,a);if(l){return l}return undefined}function getBearerToken(t){if(!t){return undefined}var r=t.replace(/^\$\{?([^}]*)\}?$/,(function(t,r){return process.env[r]}));return{token:r,type:"Bearer"}}function getTokenForUsernameAndPassword(t,r){if(!t||!r){return undefined}var i=l(r.replace(/^\$\{?([^}]*)\}?$/,(function(t,r){return process.env[r]})));var o=u(t+":"+i);return{token:o,type:"Basic",password:i,username:t}}},9074:(t,r,i)=>{"use strict";t.exports=function(t){var r=i(4446)("npm",{registry:"https://registry.npmjs.org/"});var o=r[t+":registry"]||r.registry;return o.slice(-1)==="/"?o:o+"/"}},7327:t=>{"use strict";function reusify(t){var r=new t;var i=r;function get(){var o=r;if(o.next){r=o.next}else{r=new t;i=r}o.next=null;return o}function release(t){i.next=t;i=t}return{get:get,release:release}}t.exports=reusify},4700:(t,r,i)=>{const o=i(9491);const a=i(1017);const l=i(7147);let u=undefined;try{u=i(4991)}catch(t){}const c={nosort:true,silent:true};let h=0;const p=process.platform==="win32";const defaults=t=>{const r=["unlink","chmod","stat","lstat","rmdir","readdir"];r.forEach((r=>{t[r]=t[r]||l[r];r=r+"Sync";t[r]=t[r]||l[r]}));t.maxBusyTries=t.maxBusyTries||3;t.emfileWait=t.emfileWait||1e3;if(t.glob===false){t.disableGlob=true}if(t.disableGlob!==true&&u===undefined){throw Error("glob dependency not found, set `options.disableGlob = true` if intentional")}t.disableGlob=t.disableGlob||false;t.glob=t.glob||c};const rimraf=(t,r,i)=>{if(typeof r==="function"){i=r;r={}}o(t,"rimraf: missing path");o.equal(typeof t,"string","rimraf: path should be a string");o.equal(typeof i,"function","rimraf: callback function required");o(r,"rimraf: invalid options argument provided");o.equal(typeof r,"object","rimraf: options should be object");defaults(r);let a=0;let l=null;let c=0;const next=t=>{l=l||t;if(--c===0)i(l)};const afterGlob=(t,o)=>{if(t)return i(t);c=o.length;if(c===0)return i();o.forEach((t=>{const CB=i=>{if(i){if((i.code==="EBUSY"||i.code==="ENOTEMPTY"||i.code==="EPERM")&&a<r.maxBusyTries){a++;return setTimeout((()=>rimraf_(t,r,CB)),a*100)}if(i.code==="EMFILE"&&h<r.emfileWait){return setTimeout((()=>rimraf_(t,r,CB)),h++)}if(i.code==="ENOENT")i=null}h=0;next(i)};rimraf_(t,r,CB)}))};if(r.disableGlob||!u.hasMagic(t))return afterGlob(null,[t]);r.lstat(t,((i,o)=>{if(!i)return afterGlob(null,[t]);u(t,r.glob,afterGlob)}))};const rimraf_=(t,r,i)=>{o(t);o(r);o(typeof i==="function");r.lstat(t,((o,a)=>{if(o&&o.code==="ENOENT")return i(null);if(o&&o.code==="EPERM"&&p)fixWinEPERM(t,r,o,i);if(a&&a.isDirectory())return rmdir(t,r,o,i);r.unlink(t,(o=>{if(o){if(o.code==="ENOENT")return i(null);if(o.code==="EPERM")return p?fixWinEPERM(t,r,o,i):rmdir(t,r,o,i);if(o.code==="EISDIR")return rmdir(t,r,o,i)}return i(o)}))}))};const fixWinEPERM=(t,r,i,a)=>{o(t);o(r);o(typeof a==="function");r.chmod(t,438,(o=>{if(o)a(o.code==="ENOENT"?null:i);else r.stat(t,((o,l)=>{if(o)a(o.code==="ENOENT"?null:i);else if(l.isDirectory())rmdir(t,r,i,a);else r.unlink(t,a)}))}))};const fixWinEPERMSync=(t,r,i)=>{o(t);o(r);try{r.chmodSync(t,438)}catch(t){if(t.code==="ENOENT")return;else throw i}let a;try{a=r.statSync(t)}catch(t){if(t.code==="ENOENT")return;else throw i}if(a.isDirectory())rmdirSync(t,r,i);else r.unlinkSync(t)};const rmdir=(t,r,i,a)=>{o(t);o(r);o(typeof a==="function");r.rmdir(t,(o=>{if(o&&(o.code==="ENOTEMPTY"||o.code==="EEXIST"||o.code==="EPERM"))rmkids(t,r,a);else if(o&&o.code==="ENOTDIR")a(i);else a(o)}))};const rmkids=(t,r,i)=>{o(t);o(r);o(typeof i==="function");r.readdir(t,((o,l)=>{if(o)return i(o);let u=l.length;if(u===0)return r.rmdir(t,i);let c;l.forEach((o=>{rimraf(a.join(t,o),r,(o=>{if(c)return;if(o)return i(c=o);if(--u===0)r.rmdir(t,i)}))}))}))};const rimrafSync=(t,r)=>{r=r||{};defaults(r);o(t,"rimraf: missing path");o.equal(typeof t,"string","rimraf: path should be a string");o(r,"rimraf: missing options");o.equal(typeof r,"object","rimraf: options should be object");let i;if(r.disableGlob||!u.hasMagic(t)){i=[t]}else{try{r.lstatSync(t);i=[t]}catch(o){i=u.sync(t,r.glob)}}if(!i.length)return;for(let t=0;t<i.length;t++){const o=i[t];let a;try{a=r.lstatSync(o)}catch(t){if(t.code==="ENOENT")return;if(t.code==="EPERM"&&p)fixWinEPERMSync(o,r,t)}try{if(a&&a.isDirectory())rmdirSync(o,r,null);else r.unlinkSync(o)}catch(t){if(t.code==="ENOENT")return;if(t.code==="EPERM")return p?fixWinEPERMSync(o,r,t):rmdirSync(o,r,t);if(t.code!=="EISDIR")throw t;rmdirSync(o,r,t)}}};const rmdirSync=(t,r,i)=>{o(t);o(r);try{r.rmdirSync(t)}catch(o){if(o.code==="ENOENT")return;if(o.code==="ENOTDIR")throw i;if(o.code==="ENOTEMPTY"||o.code==="EEXIST"||o.code==="EPERM")rmkidsSync(t,r)}};const rmkidsSync=(t,r)=>{o(t);o(r);r.readdirSync(t).forEach((i=>rimrafSync(a.join(t,i),r)));const i=p?100:1;let l=0;do{let o=true;try{const a=r.rmdirSync(t,r);o=false;return a}finally{if(++l<i&&o)continue}}while(true)};t.exports=rimraf;rimraf.sync=rimrafSync},4796:(t,r,i)=>{
120
120
  /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
@@ -140,4 +140,4 @@ var o=i(4300);var a=o.Buffer;function copyProps(t,r){for(var i in t){r[i]=t[i]}}
140
140
  * @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE}
141
141
  * @copyright (c) 2014 Chris Talkington, contributors.
142
142
  */
143
- var o=i(3837).inherits;var a=i(2096).ZipArchiveOutputStream;var l=i(2096).ZipArchiveEntry;var u=i(1246);var c=t.exports=function(t){if(!(this instanceof c)){return new c(t)}t=this.options=t||{};t.zlib=t.zlib||{};a.call(this,t);if(typeof t.level==="number"&&t.level>=0){t.zlib.level=t.level;delete t.level}if(!t.forceZip64&&typeof t.zlib.level==="number"&&t.zlib.level===0){t.store=true}t.namePrependSlash=t.namePrependSlash||false;if(t.comment&&t.comment.length>0){this.setComment(t.comment)}};o(c,a);c.prototype._normalizeFileData=function(t){t=u.defaults(t,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""});var r=t.type==="directory";var i=t.type==="symlink";if(t.name){t.name=u.sanitizePath(t.name);if(!i&&t.name.slice(-1)==="/"){r=true;t.type="directory"}else if(r){t.name+="/"}}if(r||i){t.store=true}t.date=u.dateify(t.date);return t};c.prototype.entry=function(t,r,i){if(typeof i!=="function"){i=this._emitErrorCallback.bind(this)}r=this._normalizeFileData(r);if(r.type!=="file"&&r.type!=="directory"&&r.type!=="symlink"){i(new Error(r.type+" entries not currently supported"));return}if(typeof r.name!=="string"||r.name.length===0){i(new Error("entry name must be a non-empty string value"));return}if(r.type==="symlink"&&typeof r.linkname!=="string"){i(new Error("entry linkname must be a non-empty string value when type equals symlink"));return}var o=new l(r.name);o.setTime(r.date,this.options.forceLocalTime);if(r.namePrependSlash){o.setName(r.name,true)}if(r.store){o.setMethod(0)}if(r.comment.length>0){o.setComment(r.comment)}if(r.type==="symlink"&&typeof r.mode!=="number"){r.mode=40960}if(typeof r.mode==="number"){if(r.type==="symlink"){r.mode|=40960}o.setUnixMode(r.mode)}if(r.type==="symlink"&&typeof r.linkname==="string"){t=Buffer.from(r.linkname)}return a.prototype.entry.call(this,o,t,i)};c.prototype.finalize=function(){this.finish()}},371:(t,r,i)=>{"use strict";i.r(r);const o=10;const wrapAnsi16=(t=0)=>r=>`[${r+t}m`;const wrapAnsi256=(t=0)=>r=>`[${38+t};5;${r}m`;const wrapAnsi16m=(t=0)=>(r,i,o)=>`[${38+t};2;${r};${i};${o}m`;const a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};const l=Object.keys(a.modifier);const u=Object.keys(a.color);const c=Object.keys(a.bgColor);const h=[...u,...c];function assembleStyles(){const t=new Map;for(const[r,i]of Object.entries(a)){for(const[r,o]of Object.entries(i)){a[r]={open:`[${o[0]}m`,close:`[${o[1]}m`};i[r]=a[r];t.set(o[0],o[1])}Object.defineProperty(a,r,{value:i,enumerable:false})}Object.defineProperty(a,"codes",{value:t,enumerable:false});a.color.close="";a.bgColor.close="";a.color.ansi=wrapAnsi16();a.color.ansi256=wrapAnsi256();a.color.ansi16m=wrapAnsi16m();a.bgColor.ansi=wrapAnsi16(o);a.bgColor.ansi256=wrapAnsi256(o);a.bgColor.ansi16m=wrapAnsi16m(o);Object.defineProperties(a,{rgbToAnsi256:{value(t,r,i){if(t===r&&r===i){if(t<8){return 16}if(t>248){return 231}return Math.round((t-8)/247*24)+232}return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)},enumerable:false},hexToRgb:{value(t){const r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r){return[0,0,0]}let[i]=r;if(i.length===3){i=[...i].map((t=>t+t)).join("")}const o=Number.parseInt(i,16);return[o>>16&255,o>>8&255,o&255]},enumerable:false},hexToAnsi256:{value:t=>a.rgbToAnsi256(...a.hexToRgb(t)),enumerable:false},ansi256ToAnsi:{value(t){if(t<8){return 30+t}if(t<16){return 90+(t-8)}let r;let i;let o;if(t>=232){r=((t-232)*10+8)/255;i=r;o=r}else{t-=16;const a=t%36;r=Math.floor(t/36)/5;i=Math.floor(a/6)/5;o=a%6/5}const a=Math.max(r,i,o)*2;if(a===0){return 30}let l=30+(Math.round(o)<<2|Math.round(i)<<1|Math.round(r));if(a===2){l+=60}return l},enumerable:false},rgbToAnsi:{value:(t,r,i)=>a.ansi256ToAnsi(a.rgbToAnsi256(t,r,i)),enumerable:false},hexToAnsi:{value:t=>a.ansi256ToAnsi(a.hexToAnsi256(t)),enumerable:false}});return a}const p=assembleStyles();const d=p;const m=require("node:process");const g=require("node:os");const y=require("node:tty");function hasFlag(t,r=m.argv){const i=t.startsWith("-")?"":t.length===1?"-":"--";const o=r.indexOf(i+t);const a=r.indexOf("--");return o!==-1&&(a===-1||o<a)}const{env:v}=m;let b;if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")||hasFlag("color=never")){b=0}else if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){b=1}function envForceColor(){if("FORCE_COLOR"in v){if(v.FORCE_COLOR==="true"){return 1}if(v.FORCE_COLOR==="false"){return 0}return v.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(v.FORCE_COLOR,10),3)}}function translateLevel(t){if(t===0){return false}return{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function _supportsColor(t,{streamIsTTY:r,sniffFlags:i=true}={}){const o=envForceColor();if(o!==undefined){b=o}const a=i?b:o;if(a===0){return 0}if(i){if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor")){return 3}if(hasFlag("color=256")){return 2}}if(t&&!r&&a===undefined){return 0}const l=a||0;if(v.TERM==="dumb"){return l}if(m.platform==="win32"){const t=g.release().split(".");if(Number(t[0])>=10&&Number(t[2])>=10586){return Number(t[2])>=14931?3:2}return 1}if("CI"in v){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((t=>t in v))||v.CI_NAME==="codeship"){return 1}return l}if("TEAMCITY_VERSION"in v){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(v.TEAMCITY_VERSION)?1:0}if("TF_BUILD"in v&&"AGENT_NAME"in v){return 1}if(v.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in v){const t=Number.parseInt((v.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(v.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(v.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(v.TERM)){return 1}if("COLORTERM"in v){return 1}return l}function createSupportsColor(t,r={}){const i=_supportsColor(t,{streamIsTTY:t&&t.isTTY,...r});return translateLevel(i)}const _={stdout:createSupportsColor({isTTY:y.isatty(1)}),stderr:createSupportsColor({isTTY:y.isatty(2)})};const w=_;function stringReplaceAll(t,r,i){let o=t.indexOf(r);if(o===-1){return t}const a=r.length;let l=0;let u="";do{u+=t.slice(l,o)+r+i;l=o+a;o=t.indexOf(r,l)}while(o!==-1);u+=t.slice(l);return u}function stringEncaseCRLFWithFirstIndex(t,r,i,o){let a=0;let l="";do{const u=t[o-1]==="\r";l+=t.slice(a,u?o-1:o)+r+(u?"\r\n":"\n")+i;a=o+1;o=t.indexOf("\n",a)}while(o!==-1);l+=t.slice(a);return l}const{stdout:S,stderr:E}=w;const x=Symbol("GENERATOR");const A=Symbol("STYLER");const O=Symbol("IS_EMPTY");const k=["ansi","ansi","ansi256","ansi16m"];const R=Object.create(null);const applyOptions=(t,r={})=>{if(r.level&&!(Number.isInteger(r.level)&&r.level>=0&&r.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const i=S?S.level:0;t.level=r.level===undefined?i:r.level};class Chalk{constructor(t){return chalkFactory(t)}}const chalkFactory=t=>{const chalk=(...t)=>t.join(" ");applyOptions(chalk,t);Object.setPrototypeOf(chalk,createChalk.prototype);return chalk};function createChalk(t){return chalkFactory(t)}Object.setPrototypeOf(createChalk.prototype,Function.prototype);for(const[t,r]of Object.entries(d)){R[t]={get(){const i=createBuilder(this,createStyler(r.open,r.close,this[A]),this[O]);Object.defineProperty(this,t,{value:i});return i}}}R.visible={get(){const t=createBuilder(this,this[A],true);Object.defineProperty(this,"visible",{value:t});return t}};const getModelAnsi=(t,r,i,...o)=>{if(t==="rgb"){if(r==="ansi16m"){return d[i].ansi16m(...o)}if(r==="ansi256"){return d[i].ansi256(d.rgbToAnsi256(...o))}return d[i].ansi(d.rgbToAnsi(...o))}if(t==="hex"){return getModelAnsi("rgb",r,i,...d.hexToRgb(...o))}return d[i][t](...o)};const T=["rgb","hex","ansi256"];for(const t of T){R[t]={get(){const{level:r}=this;return function(...i){const o=createStyler(getModelAnsi(t,k[r],"color",...i),d.color.close,this[A]);return createBuilder(this,o,this[O])}}};const r="bg"+t[0].toUpperCase()+t.slice(1);R[r]={get(){const{level:r}=this;return function(...i){const o=createStyler(getModelAnsi(t,k[r],"bgColor",...i),d.bgColor.close,this[A]);return createBuilder(this,o,this[O])}}}}const C=Object.defineProperties((()=>{}),{...R,level:{enumerable:true,get(){return this[x].level},set(t){this[x].level=t}}});const createStyler=(t,r,i)=>{let o;let a;if(i===undefined){o=t;a=r}else{o=i.openAll+t;a=r+i.closeAll}return{open:t,close:r,openAll:o,closeAll:a,parent:i}};const createBuilder=(t,r,i)=>{const builder=(...t)=>applyStyle(builder,t.length===1?""+t[0]:t.join(" "));Object.setPrototypeOf(builder,C);builder[x]=t;builder[A]=r;builder[O]=i;return builder};const applyStyle=(t,r)=>{if(t.level<=0||!r){return t[O]?"":r}let i=t[A];if(i===undefined){return r}const{openAll:o,closeAll:a}=i;if(r.includes("")){while(i!==undefined){r=stringReplaceAll(r,i.close,i.open);i=i.parent}}const l=r.indexOf("\n");if(l!==-1){r=stringEncaseCRLFWithFirstIndex(r,a,o,l)}return o+r+a};Object.defineProperties(createChalk.prototype,R);const P=createChalk();const I=createChalk({level:E?E.level:0});const L=P;var M=i(345);const{program:N,createCommand:D,createArgument:j,createOption:$,CommanderError:B,InvalidArgumentError:H,InvalidOptionArgumentError:W,Command:G,Argument:U,Option:V,Help:q}=M;var z=i(5656);var Y=i.n(z);var K=i(1017);var Q=i.n(K);var Z=i(7147);var X=i.n(Z);function isSetup(t){const r="Could not find .hyperbook folder. Be sure to run `hyperbook setup`.";try{const r=X().statSync(Q().join(t,".hyperbook"));if(!r.isDirectory()){throw Error()}}catch(t){console.log(L.red(`Could not find .hyperbook folder at ${r}. Be sure to run \`hyperbook setup\`.`));return false}if(process.env.HYPERBOOK_LOCAL_DEV){return true}const i=Q().join(t,".hyperbook","node_modules",".bin","next");try{X().statSync(i)}catch(t){console.log(L.red(`Could not find next binary at ${i}. Be sure to run \`hyperbook setup\`.`));return false}return true}var J=i(2202);var ee=i.n(J);async function archiveFolder(t,r,i){return new Promise(((o,a)=>{const l=Q().join(t,"public","archives");if(!X().existsSync(l)){X().mkdirSync(l,{recursive:true})}const u=Q().join(l,r+".zip");const c=X().createWriteStream(u);const h=ee()("zip",{zlib:{level:9}});h.on("finish",(()=>{console.log(`${L.green(`[${i}]`)} Archive ${r} zipped.`);o()}));h.on("error",(t=>{throw t}));h.pipe(c);h.directory(Q().join(t,"archives",r),false);h.finalize()}))}async function runArchive(t,r){const i=isSetup(t);if(!i){throw new Error("no setup")}return new Promise(((i,o)=>{if(!X().existsSync(Q().join(t,"archives"))){console.log(`${L.blue(`[${r}]`)} No archives found.`);i()}else{console.log(`${L.blue(`[${r}]`)} Zipping archives.`);const a=X().readdirSync(Q().join(t,"archives"),{withFileTypes:true}).filter((t=>t.isDirectory()));Promise.all(a.map((i=>archiveFolder(t,i.name,r)))).then((()=>{i()})).catch((()=>{o()}))}}))}var te=i(4488);var re=i.n(te);var ne=i(4521);var ie=i.n(ne);async function readHyperbook(t){return new Promise(((r,i)=>{X().readFile(Q().join(t,"hyperbook.json"),((t,o)=>{if(t){console.log(L.red("Could not find 'hyperbook.json'. Make sure you are in the right directory."));i()}else{const t=JSON.parse(o.toString());r(t)}}))}))}const se=require("fs/promises");var oe=i.n(se);var ae=i(659);const le=require("node:path");const ue=require("node:url");const ce=require("node:fs");class Node{value;next;constructor(t){this.value=t}}class yocto_queue_Queue{#e;#t;#r;constructor(){this.clear()}enqueue(t){const r=new Node(t);if(this.#e){this.#t.next=r;this.#t=r}else{this.#e=r;this.#t=r}this.#r++}dequeue(){const t=this.#e;if(!t){return}this.#e=this.#e.next;this.#r--;return t.value}clear(){this.#e=undefined;this.#t=undefined;this.#r=0}get size(){return this.#r}*[Symbol.iterator](){let t=this.#e;while(t){yield t.value;t=t.next}}}function p_limit_pLimit(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0)){throw new TypeError("Expected `concurrency` to be a number from 1 and up")}const r=new Queue;let i=0;const next=()=>{i--;if(r.size>0){r.dequeue()()}};const run=async(t,r,o)=>{i++;const a=(async()=>t(...o))();r(a);try{await a}catch{}next()};const enqueue=(o,a,l)=>{r.enqueue(run.bind(undefined,o,a,l));(async()=>{await Promise.resolve();if(i<t&&r.size>0){r.dequeue()()}})()};const generator=(t,...r)=>new Promise((i=>{enqueue(t,i,r)}));Object.defineProperties(generator,{activeCount:{get:()=>i},pendingCount:{get:()=>r.size},clearQueue:{value:()=>{r.clear()}}});return generator}class EndError extends Error{constructor(t){super();this.value=t}}const testElement=async(t,r)=>r(await t);const finder=async t=>{const r=await Promise.all(t);if(r[1]===true){throw new EndError(r[0])}return false};async function p_locate_pLocate(t,r,{concurrency:i=Number.POSITIVE_INFINITY,preserveOrder:o=true}={}){const a=pLimit(i);const l=[...t].map((t=>[t,a(testElement,t,r)]));const u=pLimit(o?1:Number.POSITIVE_INFINITY);try{await Promise.all(l.map((t=>u(finder,t))))}catch(t){if(t instanceof EndError){return t.value}throw t}}const fe={directory:"isDirectory",file:"isFile"};function checkType(t){if(Object.hasOwnProperty.call(fe,t)){return}throw new Error(`Invalid type specified: ${t}`)}const matchType=(t,r)=>r[fe[t]]();const toPath=t=>t instanceof URL?fileURLToPath(t):t;async function locate_path_locatePath(t,{cwd:r=process.cwd(),type:i="file",allowSymlinks:o=true,concurrency:a,preserveOrder:l}={}){checkType(i);r=toPath(r);const u=o?fsPromises.stat:fsPromises.lstat;return pLocate(t,(async t=>{try{const o=await u(path.resolve(r,t));return matchType(i,o)}catch{return false}}),{concurrency:a,preserveOrder:l})}function locate_path_locatePathSync(t,{cwd:r=process.cwd(),type:i="file",allowSymlinks:o=true}={}){checkType(i);r=toPath(r);const a=o?fs.statSync:fs.lstatSync;for(const o of t){try{const t=a(path.resolve(r,o));if(matchType(i,t)){return o}}catch{}}}async function pathExists(t){try{await fsPromises.access(t);return true}catch{return false}}function pathExistsSync(t){try{fs.accessSync(t);return true}catch{return false}}const find_up_toPath=t=>t instanceof URL?fileURLToPath(t):t;const he=Symbol("findUpStop");async function findUpMultiple(t,r={}){let i=path.resolve(find_up_toPath(r.cwd)||"");const{root:o}=path.parse(i);const a=path.resolve(i,r.stopAt||o);const l=r.limit||Number.POSITIVE_INFINITY;const u=[t].flat();const runMatcher=async r=>{if(typeof t!=="function"){return locatePath(u,r)}const i=await t(r.cwd);if(typeof i==="string"){return locatePath([i],r)}return i};const c=[];while(true){const t=await runMatcher({...r,cwd:i});if(t===he){break}if(t){c.push(path.resolve(i,t))}if(i===a||c.length>=l){break}i=path.dirname(i)}return c}function findUpMultipleSync(t,r={}){let i=path.resolve(find_up_toPath(r.cwd)||"");const{root:o}=path.parse(i);const a=r.stopAt||o;const l=r.limit||Number.POSITIVE_INFINITY;const u=[t].flat();const runMatcher=r=>{if(typeof t!=="function"){return locatePathSync(u,r)}const i=t(r.cwd);if(typeof i==="string"){return locatePathSync([i],r)}return i};const c=[];while(true){const t=runMatcher({...r,cwd:i});if(t===he){break}if(t){c.push(path.resolve(i,t))}if(i===a||c.length>=l){break}i=path.dirname(i)}return c}async function find_up_findUp(t,r={}){const i=await findUpMultiple(t,{...r,limit:1});return i[0]}function findUpSync(t,r={}){const i=findUpMultipleSync(t,{...r,limit:1});return i[0]}var pe=Object.defineProperty;var de=Object.defineProperties;var me=Object.getOwnPropertyDescriptors;var ge=Object.getOwnPropertySymbols;var ye=Object.prototype.hasOwnProperty;var ve=Object.prototype.propertyIsEnumerable;var __defNormalProp=(t,r,i)=>r in t?pe(t,r,{enumerable:true,configurable:true,writable:true,value:i}):t[r]=i;var __spreadValues=(t,r)=>{for(var i in r||={})if(ye.call(r,i))__defNormalProp(t,i,r[i]);if(ge)for(var i of ge(r)){if(ve.call(r,i))__defNormalProp(t,i,r[i])}return t};var __spreadProps=(t,r)=>de(t,me(r));var __async=(t,r,i)=>new Promise(((o,a)=>{var fulfilled=t=>{try{step(i.next(t))}catch(t){a(t)}};var rejected=t=>{try{step(i.throw(t))}catch(t){a(t)}};var step=t=>t.done?o(t.value):Promise.resolve(t.value).then(fulfilled,rejected);step((i=i.apply(t,r)).next())}));var listFiles=(t,r="",i=true)=>__async(void 0,null,(function*(){const o=yield fs.readdir(path.join(t,r));return Promise.all(o.flatMap((o=>__async(void 0,null,(function*(){const a=yield fs.stat(path.join(t,r,o));if(a.isDirectory()){return listFiles(t,path.join(r,o),i)}else if(o.endsWith(".md")){if(i){return[path.join(t,r,o)]}else{return[path.join(r,o)]}}return[]}))))).then((t=>t.flat()))}));var readBook=(t,r=true)=>__async(void 0,null,(function*(){return listFiles(path.join(t,"book"),"",r)}));var readGlossary=(t,r=true)=>__async(void 0,null,(function*(){return listFiles(path.join(t,"glossary"),"",r)}));var makeGlossary=t=>__async(void 0,null,(function*(){const r=yield readGlossary(t);const i={};for(const o of r){const{content:r,data:a}=yield readFile(o);let l=path.basename(o,".md");if(a.name){l=a.name}else{console.log(`\n${chalk.yellow(`warn `)}- Glossary page ${o} does not specify a name. Defaulting to the filename ${l}.`)}const u=l[0].toUpperCase();if(!i[u]){i[u]=[]}const c=path.relative(t,o).replace(/\.md$/,"").split("/");i[u].push({name:l,href:"/"+c.join("/")})}return i}));var listPagesForTerm=(t,r)=>__async(void 0,null,(function*(){const i=yield readBook(t);const o=[];for(const a of i){const{content:i,data:l}=yield readFile(a);const u=new RegExp(`:t\\[.*\\]\\{#${r}(..*)?\\}|:t\\[${r}\\]`);const c=i.match(u);if(c&&!l.hide&&l.name){const r=path.relative(path.join(t,"book"),a).replace(/\.md$/,"").split("/");const i=r[r.length-1]==="index";if(i){r.pop()}o.push(__spreadProps(__spreadValues({},l),{href:"/"+r.join("/")}))}}return o}));var readFile=t=>__async(void 0,null,(function*(){const r=yield fs.readFile(t).catch((()=>fs.readFile(t+".md").catch((()=>fs.readFile(path.join(t,"index.md"))))));const{content:i,data:o}=matter(r);return{content:i,data:o}}));var index_esm_readHyperbook=t=>__async(void 0,null,(function*(){return se.readFile(K.join(t,"hyperbook.json")).then((t=>t.toString())).then(JSON.parse)}));var readHyperlibrary=t=>__async(void 0,null,(function*(){return se.readFile(K.join(t,"hyperlibrary.json")).then((t=>t.toString())).then(JSON.parse)}));var findHyperbook=t=>__async(void 0,null,(function*(){return findUp("hyperbook.json",{cwd:t}).then((t=>{if(!t){throw new Error("Could not find hyperbook.json")}return fs.readFile(t)})).then((t=>JSON.parse(t.toString())))}));var findHyperbookRoot=t=>__async(void 0,null,(function*(){return findUp("hyperbook.json",{cwd:t}).then((t=>{if(!t){throw new Error("Could not find hyperbook.json")}return path.parse(t).dir}))}));var readProject=(t,r)=>__async(void 0,null,(function*(){var i,o,a,l;if(r==null?void 0:r.src){t=K.join(t,r.src)}const u=yield index_esm_readHyperbook(t).catch((()=>null));if(u){return{type:"book",src:t,basePath:(i=r==null?void 0:r.basePath)!=null?i:u.basePath,name:(o=r==null?void 0:r.name)!=null?o:u.name,icon:r==null?void 0:r.icon}}const c=yield readHyperlibrary(t).catch((()=>null));if(c){return{type:"library",src:t,basePath:(a=r==null?void 0:r.basePath)!=null?a:c.basePath,name:(l=r==null?void 0:r.name)!=null?l:c.name,projects:yield Promise.all(c.library.map((i=>{var o,a;return readProject(t,__spreadProps(__spreadValues({},i),{basePath:K.join((a=(o=r==null?void 0:r.basePath)!=null?o:c.basePath)!=null?a:"",i.basePath)}))}))),icon:r==null?void 0:r.icon}}console.log(`${L.red("Error")} - Missing book or library for path ${t}.`);throw Error(`Missing book or library for path ${t}`)}));var getProjectName=(t,r)=>{let i="";if(typeof t.name==="string"){i=t.name}else{if(r){i=t.name[r]||""}else{i=Object.values(t.name)[0]}if(!i){console.log(L.red(`You need to provide a name for language ${r} in ${t.src}`));throw Error("")}}return i};var makeLinkForHyperproject=(t,...r)=>__async(void 0,[t,...r],(function*(t,r="en",i={}){var o,a,l,u,c,h;const p=getProjectName(t,r);if(t.type==="library"){return{label:p,links:yield Promise.all(t.projects.map((t=>makeLinkForHyperproject(t,r,i)))),icon:t.icon}}else{let r=(o=t.basePath)!=null?o:"/";if(!r.startsWith("/")){r="/"+r}if((a=i.href)==null?void 0:a.useSrc){r=t.src}if((l=i.href)==null?void 0:l.relative){r=K.relative(i.href.relative,r)}if((u=i.href)==null?void 0:u.prepend){r=K.join(...i.href.prepend,r)}if((c=i.href)==null?void 0:c.append){r=K.join(r,...i.href.append)}if((h=i.href)==null?void 0:h.protocol){if(r.startsWith("/")){r=r.slice(0,-1)}r=i.href.protocol+r}if(r.length>1&&r.endsWith("/")){r=r.slice(0,-1)}return{label:p,href:r,icon:t.icon}}}));var makeNavigationForHyperbook=(t,r="/")=>__async(void 0,null,(function*(){const i=yield index_esm_readHyperbook(t);const getSectionsAndPages=function(r){return __async(this,arguments,(function*(r,o=[]){const a=yield fs.readdir(r);let l=[];let u=[];for(const c of a){let a=path.join(r,c);let h=null;if(i.repo){h=i.repo+"/"+path.relative(t,a)}const p=yield fs.stat(a);if(p.isDirectory()){const{pages:r,sections:i}=yield getSectionsAndPages(a,o);const{content:l,data:c}=yield readFile(a);const p=__spreadProps(__spreadValues({},c),{href:"/"+path.relative(path.join(t,"book"),a),isEmpty:l.trim()==="",pages:r,sections:i});if(h){p.repo=h+"/index.md"}u.push(p)}else{const{data:r}=yield readFile(a);if(a.endsWith(".md")){a=a.substring(0,a.length-3);if(path.relative(path.join(t,"book"),a)==="index"){a=a.substring(0,a.length-5)}if(!a.endsWith("index")){const i=__spreadProps(__spreadValues({},r),{href:"/"+path.relative(path.join(t,"book"),a)});if(h){i.repo=h}l.push(i)}}}}l=l.sort(((t,r)=>t.name>r.name?1:-1));l=l.sort(((t,r)=>{const i=t.index!==void 0?t.index:9999;const o=r.index!==void 0?r.index:9999;return i-o}));u=u.sort(((t,r)=>t.name>r.name?1:-1));u=u.sort(((t,r)=>{const i=t.index!==void 0?t.index:9999;const o=r.index!==void 0?r.index:9999;return i-o}));return{pages:l,sections:u}}))};const getPageList=(t,r)=>{let i=[...r];for(const r of t){i=[...i,r,...getPageList(r.sections,r.pages)]}return i};const{sections:o,pages:a}=yield getSectionsAndPages(path.join(t,"book"));let l=getPageList(o,a);let u=l.findIndex((t=>t.href===r));const c=l[u]||null;l=l.filter((t=>!t.isEmpty&&!t.hide));u=l.findIndex((t=>t.href===r));const h=l[u+1]||null;const p=l[u-1]||null;return{next:h,current:c,previous:p,sections:o,pages:a}}));async function makeDir(t,r={recursive:true}){await X().promises.mkdir(t,r)}var be=i(4700);var _e=i.n(be);function makeEnv(){let t=process.env.NODE_PATH;let r=process.env.PATH;if(process.env.HYPERBOOK_LOCAL_DEV){t=Q().join(__dirname,"..","..","..","platforms","web","node_modules");r=Q().join(__dirname,"..","..","..","platforms","web","node_modules",".bin")+":"+r}const i={NODE_PATH:t,PATH:r};return i}async function runBuildProject(t,r,i){const o=getProjectName(t);if(t.type==="book"){console.log(`${L.blue(`[${o}]`)} Building Book.`);await runBuild(t.src,r,t.basePath,o,i)}else{if(!i){i=t.src;_e().sync(Q().join(i,".hyperbook","out"))}console.log(`${L.blue(`[${o}]`)} Building Library.`);for(const o of t.projects){await runBuildProject(o,r,i)}}}async function runBuild(t,r,i,o,a){const l=isSetup(t);if(!l){throw new Error("no setup")}await runArchive(t,o);const u=await readHyperbook(t);if(!i&&(u===null||u===void 0?void 0:u.basePath)){i=u.basePath}if(i&&!i.startsWith("/")){i="/"+i}if(i&&i.endsWith("/")){i=i.slice(0,-1)}X().writeFileSync(Q().join(t,".hyperbook","next.config.js"),`\nmodule.exports = {\n ${i?`basePath: '${i}',`:""}\n typescript: {\n ignoreBuildErrors: true,\n }\n}\n `);const c=await readHyperbook(t);let h=undefined;if(r.type==="library"){h=await makeLinkForHyperproject(r,c.language)}if(h){if(!c.links){c.links=[h]}else{c.links.push(h)}}c.basePath=i;X().cpSync(Q().join(t,"hyperbook.json"),Q().join(t,".hyperbook","hyperbook.json"),{force:true});X().writeFileSync(Q().join(t,".hyperbook","hyperbook.json"),JSON.stringify(c,null,2));return new Promise(((r,l)=>{var u;const c="npm";const h=["run","next:build"];const p=makeEnv();const d=re()(c,h,{stdio:"pipe",cwd:Q().join(t,".hyperbook"),env:{...process.env,...p,ADBLOCK:"1",DISABLE_OPENCOLLECTIVE:"1"}});const m=`${L.blue(`[${o}]`)} Exporting HTML files`;let g=0;const y=setInterval((()=>{if(!process.env.CI){ie().clearLine(process.stdout,0);ie().cursorTo(process.stdout,0);process.stdout.write(m+".".repeat(g));g=(g+1)%5}}),500);if(process.env.CI){process.stdout.write(m+".\n")}(u=d.stderr)===null||u===void 0?void 0:u.on("data",(t=>{if(!String(t).startsWith("warn")){console.log(`${L.red(`[${o}]`)} `+t)}}));d.on("close",(u=>{clearInterval(y);if(u!==0){process.stdout.write("\n");l({command:`${c} ${h.join(" ")}`});return}else{ie().clearLine(process.stdout,0);ie().cursorTo(process.stdout,0);const u=Q().join(t,".hyperbook","out");if(!a){process.stdout.write(`${L.green(`[${o}]`)} Export successful. Files written to ${u}.\n`);r()}else{const t=Q().join(a,".hyperbook","out",i||"");makeDir(t).then((()=>{X().cpSync(u,t,{recursive:true,force:true});process.stdout.write(`${L.green(`[${o}]`)} Export successful. Files written to ${t}.\n`);r()})).catch((t=>{process.stdout.write("\n");console.error(t);l()}))}}}))}))}async function runDev(){const t=process.cwd();const r=isSetup(t);if(!r){throw new Error("no setup")}return new Promise(((r,i)=>{const o="npm";const a=["run","next:dev"];const l=makeEnv();const u=re()(o,a,{stdio:"inherit",cwd:Q().join(t,".hyperbook"),env:{...process.env,...l,ADBLOCK:"1",DISABLE_OPENCOLLECTIVE:"1"}});u.on("close",(t=>{if(t!==0){i({command:`${o} ${a.join(" ")}`});return}r()}))}))}var we=i(2081);function getPkgManager(){try{const t=process.env.npm_config_user_agent;if(t){if(t.startsWith("yarn")){return"yarn"}else if(t.startsWith("pnpm")){return"pnpm"}}try{(0,we.execSync)("yarn --version",{stdio:"ignore"});return"yarn"}catch{(0,we.execSync)("pnpm --version",{stdio:"ignore"});return"pnpm"}}catch{return"npm"}}var Se=i(2037);var Ee=i.n(Se);const xe=require("node:events");function indentString(t,r=1,i={}){const{indent:o=" ",includeEmptyLines:a=false}=i;if(typeof t!=="string"){throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``)}if(typeof r!=="number"){throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``)}if(r<0){throw new RangeError(`Expected \`count\` to be at least 0, got \`${r}\``)}if(typeof o!=="string"){throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof o}\``)}if(r===0){return t}const l=a?/^/gm:/^(?!\s*$)/gm;return t.replace(l,o.repeat(r))}function escapeStringRegexp(t){if(typeof t!=="string"){throw new TypeError("Expected a string")}return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Ae=/\s+at.*[(\s](.*)\)?/;const Oe=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;const ke=typeof Se.homedir==="undefined"?"":Se.homedir().replace(/\\/g,"/");function cleanStack(t,{pretty:r=false,basePath:i}={}){const o=i&&new RegExp(`(at | \\()${escapeStringRegexp(i.replace(/\\/g,"/"))}`,"g");if(typeof t!=="string"){return undefined}return t.replace(/\\/g,"/").split("\n").filter((t=>{const r=t.match(Ae);if(r===null||!r[1]){return true}const i=r[1];if(i.includes(".app/Contents/Resources/electron.asar")||i.includes(".app/Contents/Resources/default_app.asar")){return false}return!Oe.test(i)})).filter((t=>t.trim()!=="")).map((t=>{if(o){t=t.replace(o,"$1")}if(r){t=t.replace(Ae,((t,r)=>t.replace(r,r.replace(ke,"~"))))}return t})).join("\n")}const cleanInternalStack=t=>t.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,"");class AggregateError extends Error{#n;name="AggregateError";constructor(t){if(!Array.isArray(t)){throw new TypeError(`Expected input to be an Array, got ${typeof t}`)}t=t.map((t=>{if(t instanceof Error){return t}if(t!==null&&typeof t==="object"){return Object.assign(new Error(t.message),t)}return new Error(t)}));let r=t.map((t=>typeof t.stack==="string"?cleanInternalStack(cleanStack(t.stack)):String(t))).join("\n");r="\n"+indentString(r,4);super(r);this.#n=t}get errors(){return this.#n.slice()}}async function pMap(t,r,{concurrency:i=Number.POSITIVE_INFINITY,stopOnError:o=true}={}){return new Promise(((a,l)=>{if(t[Symbol.iterator]===undefined&&t[Symbol.asyncIterator]===undefined){throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`)}if(typeof r!=="function"){throw new TypeError("Mapper function is required")}if(!((Number.isSafeInteger(i)||i===Number.POSITIVE_INFINITY)&&i>=1)){throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${i}\` (${typeof i})`)}const u=[];const c=[];const h=new Map;let p=false;let d=false;let m=false;let g=0;let y=0;const v=t[Symbol.iterator]===undefined?t[Symbol.asyncIterator]():t[Symbol.iterator]();const reject=t=>{p=true;d=true;l(t)};const next=async()=>{if(d){return}const t=await v.next();const i=y;y++;if(t.done){m=true;if(g===0&&!d){if(!o&&c.length>0){reject(new AggregateError(c));return}d=true;if(!h.size){a(u);return}const t=[];for(const[r,i]of u.entries()){if(h.get(r)===Re){continue}t.push(i)}a(t)}return}g++;(async()=>{try{const o=await t.value;if(d){return}const a=await r(o,i);if(a===Re){h.set(i,a)}u[i]=a;g--;await next()}catch(t){if(o){reject(t)}else{c.push(t);g--;try{await next()}catch(t){reject(t)}}}})()};(async()=>{for(let t=0;t<i;t++){try{await next()}catch(t){reject(t);break}if(m||p){break}}})()}))}const Re=Symbol("skip");function arrify(t){if(t===null||t===undefined){return[]}if(Array.isArray(t)){return t}if(typeof t==="string"){return[t]}if(typeof t[Symbol.iterator]==="function"){return[...t]}return[t]}var Te=i(8174);class AbortError extends Error{constructor(t){super();this.name="AbortError";this.message=t}}const getDOMException=t=>globalThis.DOMException===undefined?new AbortError(t):new DOMException(t);const getAbortedReason=t=>{const r=t.reason===undefined?getDOMException("This operation was aborted."):t.reason;return r instanceof Error?r:getDOMException(r)};async function p_map_pMap(t,r,{concurrency:i=Number.POSITIVE_INFINITY,stopOnError:o=true,signal:a}={}){return new Promise(((l,u)=>{if(t[Symbol.iterator]===undefined&&t[Symbol.asyncIterator]===undefined){throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`)}if(typeof r!=="function"){throw new TypeError("Mapper function is required")}if(!((Number.isSafeInteger(i)||i===Number.POSITIVE_INFINITY)&&i>=1)){throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${i}\` (${typeof i})`)}const c=[];const h=[];const p=new Map;let d=false;let m=false;let g=false;let y=0;let v=0;const b=t[Symbol.iterator]===undefined?t[Symbol.asyncIterator]():t[Symbol.iterator]();const reject=t=>{d=true;m=true;u(t)};if(a){if(a.aborted){reject(getAbortedReason(a))}a.addEventListener("abort",(()=>{reject(getAbortedReason(a))}))}const next=async()=>{if(m){return}const t=await b.next();const i=v;v++;if(t.done){g=true;if(y===0&&!m){if(!o&&h.length>0){reject(new AggregateError(h));return}m=true;if(p.size===0){l(c);return}const t=[];for(const[r,i]of c.entries()){if(p.get(r)===Ce){continue}t.push(i)}l(t)}return}y++;(async()=>{try{const o=await t.value;if(m){return}const a=await r(o,i);if(a===Ce){p.set(i,a)}c[i]=a;y--;await next()}catch(t){if(o){reject(t)}else{h.push(t);y--;try{await next()}catch(t){reject(t)}}}})()};(async()=>{for(let t=0;t<i;t++){try{await next()}catch(t){reject(t);break}if(g||d){break}}})()}))}const Ce=Symbol("skip");async function pFilter(t,r,i){const o=await p_map_pMap(t,((t,i)=>Promise.all([r(t,i),t])),i);return o.filter((t=>Boolean(t[0]))).map((t=>t[1]))}var Pe=i(9117);var Ie=i(2153);var Le=i(3286);var Me=i(7993);function slash(t){const r=/^\\\\\?\\/.test(t);const i=/[^\u0000-\u0080]+/.test(t);if(r||i){return t}return t.replace(/\\/g,"/")}const Ne=require("node:stream");const utilities_toPath=t=>t instanceof URL?(0,ue.fileURLToPath)(t):t;class FilterStream extends Ne.Transform{constructor(t){super({objectMode:true,transform(r,i,o){o(undefined,t(r)?r:undefined)}})}}const isNegativePattern=t=>t[0]==="!";const De={ignore:["**/node_modules","**/flow-typed","**/coverage","**/.git"],absolute:true,dot:true};const je="**/.gitignore";const applyBaseToPattern=(t,r)=>isNegativePattern(t)?"!"+le.posix.join(r,t.slice(1)):le.posix.join(r,t);const parseIgnoreFile=(t,r)=>{const i=slash(le.relative(r,le.dirname(t.filePath)));return t.content.split(/\r?\n/).filter((t=>t&&!t.startsWith("#"))).map((t=>applyBaseToPattern(t,i)))};const toRelativePath=(t,r)=>{r=slash(r);if(le.isAbsolute(t)){if(slash(t).startsWith(r)){return le.relative(r,t)}throw new Error(`Path ${t} is not in cwd ${r}`)}return t};const getIsIgnoredPredicate=(t,r)=>{const i=t.flatMap((t=>parseIgnoreFile(t,r)));const o=Me().add(i);return t=>{t=utilities_toPath(t);t=toRelativePath(t,r);return o.ignores(slash(t))}};const normalizeOptions=(t={})=>({cwd:utilities_toPath(t.cwd)||m.cwd()});const isIgnoredByIgnoreFiles=async(t,r)=>{const{cwd:i}=normalizeOptions(r);const o=await Ie(t,{cwd:i,...De});const a=await Promise.all(o.map((async t=>({filePath:t,content:await ce.promises.readFile(t,"utf8")}))));return getIsIgnoredPredicate(a,i)};const isIgnoredByIgnoreFilesSync=(t,r)=>{const{cwd:i}=normalizeOptions(r);const o=Ie.sync(t,{cwd:i,...De});const a=o.map((t=>({filePath:t,content:ce.readFileSync(t,"utf8")})));return getIsIgnoredPredicate(a,i)};const isGitIgnored=t=>isIgnoredByIgnoreFiles(je,t);const isGitIgnoredSync=t=>isIgnoredByIgnoreFilesSync(je,t);const assertPatternsInput=t=>{if(t.some((t=>typeof t!=="string"))){throw new TypeError("Patterns must be a string or an array of strings")}};const toPatternsArray=t=>{t=[...new Set([t].flat())];assertPatternsInput(t);return t};const checkCwdOption=t=>{if(!t.cwd){return}let r;try{r=ce.statSync(t.cwd)}catch{return}if(!r.isDirectory()){throw new Error("The `cwd` option must be a path to a directory")}};const globby_normalizeOptions=(t={})=>{t={ignore:[],expandDirectories:true,...t,cwd:utilities_toPath(t.cwd)};checkCwdOption(t);return t};const normalizeArguments=t=>async(r,i)=>t(toPatternsArray(r),globby_normalizeOptions(i));const normalizeArgumentsSync=t=>(r,i)=>t(toPatternsArray(r),globby_normalizeOptions(i));const getIgnoreFilesPatterns=t=>{const{ignoreFiles:r,gitignore:i}=t;const o=r?toPatternsArray(r):[];if(i){o.push(je)}return o};const getFilter=async t=>{const r=getIgnoreFilesPatterns(t);return createFilterFunction(r.length>0&&await isIgnoredByIgnoreFiles(r,{cwd:t.cwd}))};const getFilterSync=t=>{const r=getIgnoreFilesPatterns(t);return createFilterFunction(r.length>0&&isIgnoredByIgnoreFilesSync(r,{cwd:t.cwd}))};const createFilterFunction=t=>{const r=new Set;return i=>{const o=i.path||i;const a=le.normalize(o);const l=r.has(a)||t&&t(o);r.add(a);return!l}};const unionFastGlobResults=(t,r)=>t.flat().filter((t=>r(t)));const unionFastGlobStreams=(t,r)=>Pe(t).pipe(new FilterStream((t=>r(t))));const convertNegativePatterns=(t,r)=>{const i=[];while(t.length>0){const o=t.findIndex((t=>isNegativePattern(t)));if(o===-1){i.push({patterns:t,options:r});break}const a=t[o].slice(1);for(const t of i){t.options.ignore.push(a)}if(o!==0){i.push({patterns:t.slice(0,o),options:{...r,ignore:[...r.ignore,a]}})}t=t.slice(o+1)}return i};const getDirGlobOptions=(t,r)=>({...r?{cwd:r}:{},...Array.isArray(t)?{files:t}:t});const generateTasks=async(t,r)=>{const i=convertNegativePatterns(t,r);const{cwd:o,expandDirectories:a}=r;if(!a){return i}const l=getDirGlobOptions(a,o);const u=o?{cwd:o}:undefined;return Promise.all(i.map((async t=>{let{patterns:r,options:i}=t;[r,i.ignore]=await Promise.all([Le(r,l),Le(i.ignore,u)]);return{patterns:r,options:i}})))};const generateTasksSync=(t,r)=>{const i=convertNegativePatterns(t,r);const{cwd:o,expandDirectories:a}=r;if(!a){return i}const l=getDirGlobOptions(a,o);const u=o?{cwd:o}:undefined;return i.map((t=>{let{patterns:r,options:i}=t;r=Le.sync(r,l);i.ignore=Le.sync(i.ignore,u);return{patterns:r,options:i}}))};const Fe=normalizeArguments((async(t,r)=>{const[i,o]=await Promise.all([generateTasks(t,r),getFilter(r)]);const a=await Promise.all(i.map((t=>Ie(t.patterns,t.options))));return unionFastGlobResults(a,o)}));const $e=normalizeArgumentsSync(((t,r)=>{const i=generateTasksSync(t,r);const o=getFilterSync(r);const a=i.map((t=>Ie.sync(t.patterns,t.options)));return unionFastGlobResults(a,o)}));const Be=normalizeArgumentsSync(((t,r)=>{const i=generateTasksSync(t,r);const o=getFilterSync(r);const a=i.map((t=>Ie.stream(t.patterns,t.options)));return unionFastGlobStreams(a,o)}));const He=normalizeArgumentsSync(((t,r)=>t.some((t=>Ie.isDynamicPattern(t,r)))));const We=normalizeArguments(generateTasks);const Ge=normalizeArgumentsSync(generateTasksSync);var Ue=i(7971);var Ve=i(3134);class CpyError extends Ve{constructor(t,r){super(t,r);Object.assign(this,r);this.name="CpyError"}}const qe=["^npm-debug\\.log$","^\\..*\\.swp$","^\\.DS_Store$","^\\.AppleDouble$","^\\.LSOverride$","^Icon\\r$","^\\._.*","^\\.Spotlight-V100(?:$|\\/)","\\.Trashes","^__MACOSX$","~$","^Thumbs\\.db$","^ehthumbs\\.db$","^Desktop\\.ini$","@eaDir$"];const ze=new RegExp(qe.join("|"));function isJunk(t){return ze.test(t)}function isNotJunk(t){return!isJunk(t)}class GlobPattern{constructor(t,r,i){this.path=t;this.originalPath=t;this.destination=r;this.options=i;this.isDirectory=false;if(!He(t)&&ce.existsSync(t)&&ce.lstatSync(t).isDirectory()){this.path=[t,"**"].join("/");this.isDirectory=true}}get name(){return le.basename(this.originalPath)}get normalizedPath(){const t=this.originalPath.split("/");const r=t.findIndex((t=>t?He(t):false));const i=t.slice(0,r).join("/");if(i){return le.isAbsolute(i)?i:le.join(this.options.cwd,i)}return this.destination}hasMagic(){return He(this.options.flat?this.path:this.originalPath)}getMatches(){let t=$e(this.path,{...this.options,dot:true,absolute:true,onlyFiles:true});if(this.options.ignoreJunk){t=t.filter((t=>isNotJunk(le.basename(t))))}return t}}const Ye=(g.cpus().length||1)*2;const Ke={ignoreJunk:true,flat:false,cwd:m.cwd()};class Entry{constructor(t,r,i){this.path=t.split("/").join(le.sep);this.relativePath=r.split("/").join(le.sep);this.pattern=i;Object.freeze(this)}get name(){return le.basename(this.path)}get nameWithoutExtension(){return le.basename(this.path,le.extname(this.path))}get extension(){return le.extname(this.path).slice(1)}}const expandPatternsWithBraceExpansion=t=>t.flatMap((t=>Ue.braces(t,{expand:true,nodupes:true})));const preprocessDestinationPath=({entry:t,destination:r,options:i})=>{if(t.pattern.hasMagic()){if(i.flat){if(le.isAbsolute(r)){return le.join(r,t.name)}return le.join(i.cwd,r,t.name)}return le.join(r,le.relative(t.pattern.normalizedPath,t.path))}if(le.isAbsolute(r)){return le.join(r,t.name)}if(t.pattern.isDirectory&&le.relative(i.cwd,t.path).startsWith("..")){return le.join(i.cwd,r,le.basename(t.pattern.originalPath),le.relative(t.pattern.originalPath,t.path))}if(!t.pattern.isDirectory&&t.path===t.relativePath){return le.join(i.cwd,r,le.basename(t.pattern.originalPath),le.relative(t.pattern.originalPath,t.path))}if(!t.pattern.isDirectory&&i.flat){return le.join(i.cwd,r,le.basename(t.pattern.originalPath))}return le.join(i.cwd,r,le.relative(i.cwd,t.path))};const renameFile=(t,r)=>{const i=le.basename(t,le.extname(t));const o=le.extname(t);const a=le.dirname(t);if(typeof r==="string"){return le.join(a,r)}if(typeof r==="function"){return le.join(a,`${r(i)}${o}`)}return t};function cpy(t,r,{concurrency:i=Ye,...o}={}){const a=new Map;const l=new xe;o={...Ke,...o};const u=(async()=>{let u=[];let c=0;let h=0;let p=expandPatternsWithBraceExpansion(arrify(t)).map((t=>t.replace(/\\/g,"/")));const d=p.filter((t=>!t.startsWith("!")));const m=p.filter((t=>t.startsWith("!")));if(d.length===0||!r){throw new CpyError("`source` and `destination` required")}p=p.map((t=>new GlobPattern(t,r,{...o,ignore:m})));for(const t of p){let r=[];try{r=t.getMatches()}catch(r){throw new CpyError(`Cannot glob \`${t.originalPath}\`: ${r.message}`,r)}if(r.length===0&&!He(t.originalPath)&&!He(m)){throw new CpyError(`Cannot copy \`${t.originalPath}\`: the file doesn't exist`)}u=[...u,...r.map((r=>new Entry(r,le.relative(o.cwd,r),t)))]}if(o.filter!==undefined){u=await pFilter(u,o.filter,{concurrency:1024})}if(u.length===0){l.emit("progress",{totalFiles:0,percent:1,completedFiles:0,completedSize:0})}const fileProgressHandler=t=>{const r=a.get(t.sourcePath)||{writtenBytes:0,percent:0};if(r.writtenBytes!==t.writtenBytes||r.percent!==t.percent){h-=r.writtenBytes;h+=t.writtenBytes;if(t.percent===1&&r.percent!==1){c++}a.set(t.sourcePath,{writtenBytes:t.writtenBytes,percent:t.percent});l.emit("progress",{totalFiles:u.length,percent:c/u.length,completedFiles:c,completedSize:h})}};return pMap(u,(async t=>{const i=renameFile(preprocessDestinationPath({entry:t,destination:r,options:o}),o.rename);try{await Te(t.path,i,o).on("progress",fileProgressHandler)}catch(r){throw new CpyError(`Cannot copy from \`${t.relativePath}\` to \`${i}\`: ${r.message}`,r)}return i}),{concurrency:i})})();u.on=(...t)=>{l.on(...t);return u};return u}var Qe=i(5713);var Ze=i.n(Qe);function isFolderEmpty(t,r){const i=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log"];const o=X().readdirSync(t).filter((t=>!i.includes(t))).filter((t=>!/\.iml$/.test(t)));if(o.length>0){console.log(`The directory ${L.green(r)} contains files that could conflict:`);console.log();for(const r of o){try{const i=X().lstatSync(Q().join(t,r));if(i.isDirectory()){console.log(` ${L.blue(r)}/`)}else{console.log(` ${r}`)}}catch{console.log(` ${r}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}async function isWriteable(t){try{await X().promises.access(t,(X().constants||X()).W_OK);return true}catch(t){return false}}function isInGitRepository(){try{(0,we.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(t){}return false}function isInMercurialRepository(){try{(0,we.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(t){}return false}function tryGitInit(t){let r=false;try{(0,we.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,we.execSync)("git init",{stdio:"ignore"});r=true;(0,we.execSync)("git checkout -b main",{stdio:"ignore"});(0,we.execSync)("git add -A",{stdio:"ignore"});(0,we.execSync)('git commit -m "Initial commit from Hyperbook"',{stdio:"ignore"});return true}catch(i){if(r){try{_e().sync(Q().join(t,".git"))}catch(t){}}return false}}function install(t,r,{packageManager:i,isOnline:o,devDependencies:a}){const l=[];const u=[];return new Promise(((c,h)=>{let p;let d=i;const m=i==="yarn";if(r&&r.length){if(m){p=["add","--exact"];if(!o)p.push("--offline");p.push("--cwd",t);if(a)p.push("--dev");p.push(...r)}else{p=["install","--save-exact"];p.push(a?"--save-dev":"--save");p.push(...r)}}else{p=["install"];if(!o){console.log(L.yellow("You appear to be offline."));if(m){console.log(L.yellow("Falling back to the local Yarn cache."));console.log();p.push("--offline")}else{console.log()}}}if(m){p.push(...u)}else{p.push(...l)}const g=re()(d,p,{stdio:"inherit",cwd:t,env:{...process.env,ADBLOCK:"1",DISABLE_OPENCOLLECTIVE:"1"}});g.on("close",(t=>{if(t!==0){h({command:`${d} ${p.join(" ")}`});return}c()}))}))}const Xe=require("dns");var Je=i.n(Xe);var et=i(7310);var tt=i.n(et);function getProxy(){if(process.env.https_proxy){return process.env.https_proxy}try{const t=(0,we.execSync)("npm config get https-proxy").toString().trim();return t!=="null"?t:undefined}catch(t){return}}function getOnline(){return new Promise((t=>{Je().lookup("registry.yarnpkg.com",(r=>{if(!r){return t(true)}const i=getProxy();if(!i){return t(false)}const{hostname:o}=tt().parse(i);if(!o){return t(false)}Je().lookup(o,(r=>{t(r==null)}))}))}))}async function makeSymlink(t,r){const i=Ee().platform()=="win32"?"junction":null;return new Promise(((o,a)=>{X().symlink(t,r,i,(t=>{if(t){a()}else{o()}}))}))}async function runSetupProject(t,r){const o=getProjectName(t);console.log(`${L.blue(`[${o}]`)} Setup Project.`);const a=Q().join(t.src,".hyperbook");const l=Q().join((r===null||r===void 0?void 0:r.src)||"",".hyperbook");_e().sync(a);const u=i.ab+"templates";await makeDir(a);await cpy("default/.hyperbook/**",a,{cwd:i.ab+"templates",followSymbolicLinks:false});if(process.env.HYPERBOOK_LOCAL_DEV){const t=await oe().readFile(Q().join(__dirname,"..","..","..","platforms","web","package.json")).then((t=>JSON.parse(t.toString())));await oe().writeFile(Q().join(a,"package.json"),JSON.stringify({...t,name:`@docs/`+o.toLowerCase().replace(" ","-"),scripts:{"next:dev":"next-hyperbook-watch","next:build":"next build && next export"}},null,2))}else{if(!r){const t=await getOnline();await install(l,null,{packageManager:"npm",isOnline:t})}else{await makeSymlink(Q().join(l,"node_modules"),Q().join(a,"node_modules"))}}if(t.type==="library"){await makeSymlink(Q().join(t.src,"hyperlibrary.json"),Q().join(a,"hyperlibrary.json"));for(const i of t.projects){await runSetupProject(i,r)}return}await makeSymlink(Q().join(t.src,"archives"),Q().join(a,"archives"));await makeSymlink(Q().join(t.src,"book"),Q().join(a,"book"));await makeSymlink(Q().join(t.src,"glossary"),Q().join(a,"glossary"));await makeSymlink(Q().join(t.src,"public"),Q().join(a,"public"));await makeSymlink(Q().join(t.src,"hyperbook.json"),Q().join(a,"hyperbook.json"))}async function runNew({programName:t,bookPath:r}){if(typeof r==="string"){r=r.trim()}if(!r){const t=await Ze()({type:"text",name:"path",message:"What is your book named?",initial:"my-book"});if(typeof t.path==="string"){r=t.path.trim()}}if(!r){console.log();console.log("Please specify the book directory:");console.log(` ${L.cyan(t)} ${L.green("<book-directory>")}`);console.log();console.log("For example:");console.log(` ${L.cyan(t)} ${L.green("my-new-book")}`);console.log();console.log(`Run ${L.cyan(`${t} --help`)} to see all options.`);process.exit(1)}const o=Q().resolve(r);if(!await isWriteable(Q().dirname(o))){console.error("The book path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const a=Q().basename(o);await makeDir(o);if(!isFolderEmpty(o,a)){process.exit(1)}const l=process.cwd();console.log(`Creating a new hyperbook in ${L.green(o)}.`);console.log();process.chdir(o);const{description:u}=await Ze()({type:"text",name:"description",message:"What is your book about?",initial:""});const{author:c}=await Ze()({type:"text",name:"author",message:"Who is the author of the book?",initial:""});const{authorUrl:h}=await Ze()({type:"text",name:"authorUrl",message:"What is the link to the authors homepage?",initial:""});let{license:p}=await Ze()({type:"select",name:"license",message:"Pick a license for your book!",choices:[{title:"Creative Commons Zero (CC0)",value:"cc0"},{title:"Creative Commons Attribution (CC BY)",value:"cc-by"},{title:"Creative Commons Attribution-ShareAlike (CC BY-SA)",value:"cc-by-sa"},{title:"Creative Commons Attribution-NoDerivs (CC BY-ND)",value:"cc-by-nd"},{title:"Creative Commons Attribution-NonCommercial (CC BY-NC)",value:"cc-by-nc"},{title:"Creative Commons Attribution-NonCommercial-ShareAlike (CC BY-NC-SA)",value:"cc-by-nc-sa"},{title:"Creative Commons Attribution-NonCommercial-NoDervis (CC BY-NC-ND)",value:"cc-by-nc-nd"},{title:"Custom",value:"custom"}]});if(p==="custom"){const t=await Ze()({type:"text",name:"license",message:"Which custom license you want to use?"});p=t.license}const{language:d}=await Ze()({type:"text",name:"language",message:"In which language is your book written? Provide a short code, e.g.: en or de",initial:"en"});const m={name:a,version:"0.0.0",description:u,license:p,author:{name:c,url:h},language:d};X().writeFileSync(Q().join(o,"hyperbook.json"),JSON.stringify(m,null,2)+Ee().EOL);console.log();const g=i.ab+"templates";await cpy("default/**",o,{cwd:i.ab+"templates",rename:t=>{switch(t){case"gitignore":{return".".concat(t)}case"README-template.md":{return"README.md"}default:{return t}}}});await runSetupProject({type:"book",name:a,src:o});if(tryGitInit(o)){console.log("Initialized a git repository.");console.log()}let y;if(Q().join(l,a)===r){y=a}else{y=r}console.log(`${L.green("Success!")} Created ${a} at ${r}`);console.log("Inside that directory, you can run several commands:");console.log();console.log(L.cyan(` hyperbook dev`));console.log(" Starts the development server.");console.log();console.log(L.cyan(` hyperbook build`));console.log(" Builds the book for production.");console.log();console.log("We suggest that you begin by typing:");console.log();console.log(L.cyan(" cd"),y);console.log(` ${L.cyan(`hyperbook dev`)}`);console.log()}const rt=JSON.parse('{"name":"hyperbook","version":"0.8.8","author":"Mike Barkmin","homepage":"https://github.com/openpatch/hyperbook#readme","license":"MIT","bin":{"hyperbook":"./dist/index.js"},"files":["dist"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/openpatch/hyperbook.git","directory":"packages/hyperbook"},"bugs":{"url":"https://github.com/openpatch/hyperbook/issues"},"engines":{"node":">=12.22.0"},"scripts":{"version":"pnpm build","lint":"tsc --noEmit","dev":"ncc build ./index.ts -w -o dist/","build":"rimraf dist && ncc build ./index.ts -o ./dist/ -e \\"hyperbook-simple-template\\" --minify --no-cache --no-source-map-register && node ./postbuild.mjs"},"devDependencies":{"@pnpm/exportable-manifest":"4.0.2","@types/archiver":"5.3.1","@types/async-retry":"1.4.5","@types/cross-spawn":"6.0.2","@types/prompts":"2.4.1","@types/rimraf":"3.0.2","@types/tar":"6.1.3","@vercel/ncc":"0.34.0","archiver":"5.3.1","async-retry":"1.3.3","chalk":"5.1.2","commander":"9.4.1","cpy":"9.0.1","cross-spawn":"7.0.3","got":"12.5.3","prompts":"2.4.2","rimraf":"3.0.2","tar":"6.1.12","update-check":"1.5.4","@platforms/web":"workspace:*"},"dependencies":{"@hyperbook/fs":"workspace:*","@hyperbook/types":"workspace:*"}}');const nt=new G;nt.name(rt.name).version(rt.version).hook("preAction",(async()=>{await notifyUpdate()}));nt.command("new").description("create a new hyperbook").arguments("<book-directory>").usage(`${L.green("<book-directory>")}`).action((async t=>{await runNew({programName:nt.name(),bookPath:t}).catch((()=>process.exit(1)))}));nt.command("dev").description("start the development server for a hyperbook").action((async()=>{await runDev()}));nt.command("setup").description("downloads the latest version of the template of a hyperbook").action((async()=>{const t=await readProject(process.cwd()).catch((()=>{process.exit(1)}));await runSetupProject(t).catch((()=>{process.exit(1)}))}));nt.command("build").description("build a hyperbook").action((async()=>{const t=await readProject(process.cwd()).catch((()=>{process.exit(1)}));await runBuildProject(t,t).catch((()=>{process.exit(1)}))}));nt.command("archive").description("create archives from archives folder").action((async()=>{await runArchive(process.cwd()).catch((()=>process.exit(1)))}));nt.parseAsync(process.argv);const it=Y()(rt).catch((()=>null));async function notifyUpdate(){try{const t=await it;if(t===null||t===void 0?void 0:t.latest){const t=getPkgManager();console.log();console.log(L.yellow.bold("A new version of `hyperbook` is available!"));console.log("You can update by running: "+L.cyan(t==="yarn"?"yarn global add hyperbook":`${t} install --global hyperbook`));console.log()}process.exit()}catch{}}},9491:t=>{"use strict";t.exports=require("assert")},4300:t=>{"use strict";t.exports=require("buffer")},2081:t=>{"use strict";t.exports=require("child_process")},2057:t=>{"use strict";t.exports=require("constants")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},7282:t=>{"use strict";t.exports=require("process")},4521:t=>{"use strict";t.exports=require("readline")},2781:t=>{"use strict";t.exports=require("stream")},1576:t=>{"use strict";t.exports=require("string_decoder")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},9796:t=>{"use strict";t.exports=require("zlib")},345:(t,r,i)=>{const{Argument:o}=i(4079);const{Command:a}=i(6505);const{CommanderError:l,InvalidArgumentError:u}=i(9027);const{Help:c}=i(9164);const{Option:h}=i(5205);r=t.exports=new a;r.program=r;r.Argument=o;r.Command=a;r.CommanderError=l;r.Help=c;r.InvalidArgumentError=u;r.InvalidOptionArgumentError=u;r.Option=h},4079:(t,r,i)=>{const{InvalidArgumentError:o}=i(9027);class Argument{constructor(t,r){this.description=r||"";this.variadic=false;this.parseArg=undefined;this.defaultValue=undefined;this.defaultValueDescription=undefined;this.argChoices=undefined;switch(t[0]){case"<":this.required=true;this._name=t.slice(1,-1);break;case"[":this.required=false;this._name=t.slice(1,-1);break;default:this.required=true;this._name=t;break}if(this._name.length>3&&this._name.slice(-3)==="..."){this.variadic=true;this._name=this._name.slice(0,-3)}}name(){return this._name}_concatValue(t,r){if(r===this.defaultValue||!Array.isArray(r)){return[t]}return r.concat(t)}default(t,r){this.defaultValue=t;this.defaultValueDescription=r;return this}argParser(t){this.parseArg=t;return this}choices(t){this.argChoices=t.slice();this.parseArg=(t,r)=>{if(!this.argChoices.includes(t)){throw new o(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(t,r)}return t};return this}argRequired(){this.required=true;return this}argOptional(){this.required=false;return this}}function humanReadableArgName(t){const r=t.name()+(t.variadic===true?"...":"");return t.required?"<"+r+">":"["+r+"]"}r.Argument=Argument;r.humanReadableArgName=humanReadableArgName},6505:(t,r,i)=>{const o=i(2361).EventEmitter;const a=i(2081);const l=i(1017);const u=i(7147);const c=i(7282);const{Argument:h,humanReadableArgName:p}=i(4079);const{CommanderError:d}=i(9027);const{Help:m}=i(9164);const{Option:g,splitOptionFlags:y,DualOptions:v}=i(5205);const{suggestSimilar:b}=i(211);class Command extends o{constructor(t){super();this.commands=[];this.options=[];this.parent=null;this._allowUnknownOption=false;this._allowExcessArguments=true;this._args=[];this.args=[];this.rawArgs=[];this.processedArgs=[];this._scriptPath=null;this._name=t||"";this._optionValues={};this._optionValueSources={};this._storeOptionsAsProperties=false;this._actionHandler=null;this._executableHandler=false;this._executableFile=null;this._executableDir=null;this._defaultCommandName=null;this._exitCallback=null;this._aliases=[];this._combineFlagAndOptionalValue=true;this._description="";this._summary="";this._argsDescription=undefined;this._enablePositionalOptions=false;this._passThroughOptions=false;this._lifeCycleHooks={};this._showHelpAfterError=false;this._showSuggestionAfterError=true;this._outputConfiguration={writeOut:t=>c.stdout.write(t),writeErr:t=>c.stderr.write(t),getOutHelpWidth:()=>c.stdout.isTTY?c.stdout.columns:undefined,getErrHelpWidth:()=>c.stderr.isTTY?c.stderr.columns:undefined,outputError:(t,r)=>r(t)};this._hidden=false;this._hasHelpOption=true;this._helpFlags="-h, --help";this._helpDescription="display help for command";this._helpShortFlag="-h";this._helpLongFlag="--help";this._addImplicitHelpCommand=undefined;this._helpCommandName="help";this._helpCommandnameAndArgs="help [command]";this._helpCommandDescription="display help for command";this._helpConfiguration={}}copyInheritedSettings(t){this._outputConfiguration=t._outputConfiguration;this._hasHelpOption=t._hasHelpOption;this._helpFlags=t._helpFlags;this._helpDescription=t._helpDescription;this._helpShortFlag=t._helpShortFlag;this._helpLongFlag=t._helpLongFlag;this._helpCommandName=t._helpCommandName;this._helpCommandnameAndArgs=t._helpCommandnameAndArgs;this._helpCommandDescription=t._helpCommandDescription;this._helpConfiguration=t._helpConfiguration;this._exitCallback=t._exitCallback;this._storeOptionsAsProperties=t._storeOptionsAsProperties;this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue;this._allowExcessArguments=t._allowExcessArguments;this._enablePositionalOptions=t._enablePositionalOptions;this._showHelpAfterError=t._showHelpAfterError;this._showSuggestionAfterError=t._showSuggestionAfterError;return this}command(t,r,i){let o=r;let a=i;if(typeof o==="object"&&o!==null){a=o;o=null}a=a||{};const[,l,u]=t.match(/([^ ]+) *(.*)/);const c=this.createCommand(l);if(o){c.description(o);c._executableHandler=true}if(a.isDefault)this._defaultCommandName=c._name;c._hidden=!!(a.noHelp||a.hidden);c._executableFile=a.executableFile||null;if(u)c.arguments(u);this.commands.push(c);c.parent=this;c.copyInheritedSettings(this);if(o)return this;return c}createCommand(t){return new Command(t)}createHelp(){return Object.assign(new m,this.configureHelp())}configureHelp(t){if(t===undefined)return this._helpConfiguration;this._helpConfiguration=t;return this}configureOutput(t){if(t===undefined)return this._outputConfiguration;Object.assign(this._outputConfiguration,t);return this}showHelpAfterError(t=true){if(typeof t!=="string")t=!!t;this._showHelpAfterError=t;return this}showSuggestionAfterError(t=true){this._showSuggestionAfterError=!!t;return this}addCommand(t,r){if(!t._name){throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`)}r=r||{};if(r.isDefault)this._defaultCommandName=t._name;if(r.noHelp||r.hidden)t._hidden=true;this.commands.push(t);t.parent=this;return this}createArgument(t,r){return new h(t,r)}argument(t,r,i,o){const a=this.createArgument(t,r);if(typeof i==="function"){a.default(o).argParser(i)}else{a.default(i)}this.addArgument(a);return this}arguments(t){t.split(/ +/).forEach((t=>{this.argument(t)}));return this}addArgument(t){const r=this._args.slice(-1)[0];if(r&&r.variadic){throw new Error(`only the last argument can be variadic '${r.name()}'`)}if(t.required&&t.defaultValue!==undefined&&t.parseArg===undefined){throw new Error(`a default value for a required argument is never used: '${t.name()}'`)}this._args.push(t);return this}addHelpCommand(t,r){if(t===false){this._addImplicitHelpCommand=false}else{this._addImplicitHelpCommand=true;if(typeof t==="string"){this._helpCommandName=t.split(" ")[0];this._helpCommandnameAndArgs=t}this._helpCommandDescription=r||this._helpCommandDescription}return this}_hasImplicitHelpCommand(){if(this._addImplicitHelpCommand===undefined){return this.commands.length&&!this._actionHandler&&!this._findCommand("help")}return this._addImplicitHelpCommand}hook(t,r){const i=["preSubcommand","preAction","postAction"];if(!i.includes(t)){throw new Error(`Unexpected value for event passed to hook : '${t}'.\nExpecting one of '${i.join("', '")}'`)}if(this._lifeCycleHooks[t]){this._lifeCycleHooks[t].push(r)}else{this._lifeCycleHooks[t]=[r]}return this}exitOverride(t){if(t){this._exitCallback=t}else{this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync"){throw t}else{}}}return this}_exit(t,r,i){if(this._exitCallback){this._exitCallback(new d(t,r,i))}c.exit(t)}action(t){const listener=r=>{const i=this._args.length;const o=r.slice(0,i);if(this._storeOptionsAsProperties){o[i]=this}else{o[i]=this.opts()}o.push(this);return t.apply(this,o)};this._actionHandler=listener;return this}createOption(t,r){return new g(t,r)}addOption(t){const r=t.name();const i=t.attributeName();if(t.negate){const r=t.long.replace(/^--no-/,"--");if(!this._findOption(r)){this.setOptionValueWithSource(i,t.defaultValue===undefined?true:t.defaultValue,"default")}}else if(t.defaultValue!==undefined){this.setOptionValueWithSource(i,t.defaultValue,"default")}this.options.push(t);const handleOptionValue=(r,o,a)=>{if(r==null&&t.presetArg!==undefined){r=t.presetArg}const l=this.getOptionValue(i);if(r!==null&&t.parseArg){try{r=t.parseArg(r,l)}catch(t){if(t.code==="commander.invalidArgument"){const r=`${o} ${t.message}`;this.error(r,{exitCode:t.exitCode,code:t.code})}throw t}}else if(r!==null&&t.variadic){r=t._concatValue(r,l)}if(r==null){if(t.negate){r=false}else if(t.isBoolean()||t.optional){r=true}else{r=""}}this.setOptionValueWithSource(i,r,a)};this.on("option:"+r,(r=>{const i=`error: option '${t.flags}' argument '${r}' is invalid.`;handleOptionValue(r,i,"cli")}));if(t.envVar){this.on("optionEnv:"+r,(r=>{const i=`error: option '${t.flags}' value '${r}' from env '${t.envVar}' is invalid.`;handleOptionValue(r,i,"env")}))}return this}_optionEx(t,r,i,o,a){if(typeof r==="object"&&r instanceof g){throw new Error("To add an Option object use addOption() instead of option() or requiredOption()")}const l=this.createOption(r,i);l.makeOptionMandatory(!!t.mandatory);if(typeof o==="function"){l.default(a).argParser(o)}else if(o instanceof RegExp){const t=o;o=(r,i)=>{const o=t.exec(r);return o?o[0]:i};l.default(a).argParser(o)}else{l.default(o)}return this.addOption(l)}option(t,r,i,o){return this._optionEx({},t,r,i,o)}requiredOption(t,r,i,o){return this._optionEx({mandatory:true},t,r,i,o)}combineFlagAndOptionalValue(t=true){this._combineFlagAndOptionalValue=!!t;return this}allowUnknownOption(t=true){this._allowUnknownOption=!!t;return this}allowExcessArguments(t=true){this._allowExcessArguments=!!t;return this}enablePositionalOptions(t=true){this._enablePositionalOptions=!!t;return this}passThroughOptions(t=true){this._passThroughOptions=!!t;if(!!this.parent&&t&&!this.parent._enablePositionalOptions){throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)")}return this}storeOptionsAsProperties(t=true){this._storeOptionsAsProperties=!!t;if(this.options.length){throw new Error("call .storeOptionsAsProperties() before adding options")}return this}getOptionValue(t){if(this._storeOptionsAsProperties){return this[t]}return this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,undefined)}setOptionValueWithSource(t,r,i){if(this._storeOptionsAsProperties){this[t]=r}else{this._optionValues[t]=r}this._optionValueSources[t]=i;return this}getOptionValueSource(t){return this._optionValueSources[t]}_prepareUserArgs(t,r){if(t!==undefined&&!Array.isArray(t)){throw new Error("first parameter to parse must be array or undefined")}r=r||{};if(t===undefined){t=c.argv;if(c.versions&&c.versions.electron){r.from="electron"}}this.rawArgs=t.slice();let i;switch(r.from){case undefined:case"node":this._scriptPath=t[1];i=t.slice(2);break;case"electron":if(c.defaultApp){this._scriptPath=t[1];i=t.slice(2)}else{i=t.slice(1)}break;case"user":i=t.slice(0);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);this._name=this._name||"program";return i}parse(t,r){const i=this._prepareUserArgs(t,r);this._parseCommand([],i);return this}async parseAsync(t,r){const i=this._prepareUserArgs(t,r);await this._parseCommand([],i);return this}_executeSubCommand(t,r){r=r.slice();let i=false;const o=[".js",".ts",".tsx",".mjs",".cjs"];function findFile(t,r){const i=l.resolve(t,r);if(u.existsSync(i))return i;if(o.includes(l.extname(r)))return undefined;const a=o.find((t=>u.existsSync(`${i}${t}`)));if(a)return`${i}${a}`;return undefined}this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();let h=t._executableFile||`${this._name}-${t._name}`;let p=this._executableDir||"";if(this._scriptPath){let t;try{t=u.realpathSync(this._scriptPath)}catch(r){t=this._scriptPath}p=l.resolve(l.dirname(t),p)}if(p){let r=findFile(p,h);if(!r&&!t._executableFile&&this._scriptPath){const i=l.basename(this._scriptPath,l.extname(this._scriptPath));if(i!==this._name){r=findFile(p,`${i}-${t._name}`)}}h=r||h}i=o.includes(l.extname(h));let m;if(c.platform!=="win32"){if(i){r.unshift(h);r=incrementNodeInspectorPort(c.execArgv).concat(r);m=a.spawn(c.argv[0],r,{stdio:"inherit"})}else{m=a.spawn(h,r,{stdio:"inherit"})}}else{r.unshift(h);r=incrementNodeInspectorPort(c.execArgv).concat(r);m=a.spawn(c.execPath,r,{stdio:"inherit"})}if(!m.killed){const t=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];t.forEach((t=>{c.on(t,(()=>{if(m.killed===false&&m.exitCode===null){m.kill(t)}}))}))}const g=this._exitCallback;if(!g){m.on("close",c.exit.bind(c))}else{m.on("close",(()=>{g(new d(c.exitCode||0,"commander.executeSubCommandAsync","(close)"))}))}m.on("error",(r=>{if(r.code==="ENOENT"){const r=p?`searched for local subcommand relative to directory '${p}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory";const i=`'${h}' does not exist\n - if '${t._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${r}`;throw new Error(i)}else if(r.code==="EACCES"){throw new Error(`'${h}' not executable`)}if(!g){c.exit(1)}else{const t=new d(1,"commander.executeSubCommandAsync","(error)");t.nestedError=r;g(t)}}));this.runningCommand=m}_dispatchSubcommand(t,r,i){const o=this._findCommand(t);if(!o)this.help({error:true});let a;a=this._chainOrCallSubCommandHook(a,o,"preSubcommand");a=this._chainOrCall(a,(()=>{if(o._executableHandler){this._executeSubCommand(o,r.concat(i))}else{return o._parseCommand(r,i)}}));return a}_checkNumberOfArguments(){this._args.forEach(((t,r)=>{if(t.required&&this.args[r]==null){this.missingArgument(t.name())}}));if(this._args.length>0&&this._args[this._args.length-1].variadic){return}if(this.args.length>this._args.length){this._excessArguments(this.args)}}_processArguments(){const myParseArg=(t,r,i)=>{let o=r;if(r!==null&&t.parseArg){try{o=t.parseArg(r,i)}catch(i){if(i.code==="commander.invalidArgument"){const o=`error: command-argument value '${r}' is invalid for argument '${t.name()}'. ${i.message}`;this.error(o,{exitCode:i.exitCode,code:i.code})}throw i}}return o};this._checkNumberOfArguments();const t=[];this._args.forEach(((r,i)=>{let o=r.defaultValue;if(r.variadic){if(i<this.args.length){o=this.args.slice(i);if(r.parseArg){o=o.reduce(((t,i)=>myParseArg(r,i,t)),r.defaultValue)}}else if(o===undefined){o=[]}}else if(i<this.args.length){o=this.args[i];if(r.parseArg){o=myParseArg(r,o,r.defaultValue)}}t[i]=o}));this.processedArgs=t}_chainOrCall(t,r){if(t&&t.then&&typeof t.then==="function"){return t.then((()=>r()))}return r()}_chainOrCallHooks(t,r){let i=t;const o=[];getCommandAndParents(this).reverse().filter((t=>t._lifeCycleHooks[r]!==undefined)).forEach((t=>{t._lifeCycleHooks[r].forEach((r=>{o.push({hookedCommand:t,callback:r})}))}));if(r==="postAction"){o.reverse()}o.forEach((t=>{i=this._chainOrCall(i,(()=>t.callback(t.hookedCommand,this)))}));return i}_chainOrCallSubCommandHook(t,r,i){let o=t;if(this._lifeCycleHooks[i]!==undefined){this._lifeCycleHooks[i].forEach((t=>{o=this._chainOrCall(o,(()=>t(this,r)))}))}return o}_parseCommand(t,r){const i=this.parseOptions(r);this._parseOptionsEnv();this._parseOptionsImplied();t=t.concat(i.operands);r=i.unknown;this.args=t.concat(r);if(t&&this._findCommand(t[0])){return this._dispatchSubcommand(t[0],t.slice(1),r)}if(this._hasImplicitHelpCommand()&&t[0]===this._helpCommandName){if(t.length===1){this.help()}return this._dispatchSubcommand(t[1],[],[this._helpLongFlag])}if(this._defaultCommandName){outputHelpIfRequested(this,r);return this._dispatchSubcommand(this._defaultCommandName,t,r)}if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName){this.help({error:true})}outputHelpIfRequested(this,i.unknown);this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();const checkForUnknownOptions=()=>{if(i.unknown.length>0){this.unknownOption(i.unknown[0])}};const o=`command:${this.name()}`;if(this._actionHandler){checkForUnknownOptions();this._processArguments();let i;i=this._chainOrCallHooks(i,"preAction");i=this._chainOrCall(i,(()=>this._actionHandler(this.processedArgs)));if(this.parent){i=this._chainOrCall(i,(()=>{this.parent.emit(o,t,r)}))}i=this._chainOrCallHooks(i,"postAction");return i}if(this.parent&&this.parent.listenerCount(o)){checkForUnknownOptions();this._processArguments();this.parent.emit(o,t,r)}else if(t.length){if(this._findCommand("*")){return this._dispatchSubcommand("*",t,r)}if(this.listenerCount("command:*")){this.emit("command:*",t,r)}else if(this.commands.length){this.unknownCommand()}else{checkForUnknownOptions();this._processArguments()}}else if(this.commands.length){checkForUnknownOptions();this.help({error:true})}else{checkForUnknownOptions();this._processArguments()}}_findCommand(t){if(!t)return undefined;return this.commands.find((r=>r._name===t||r._aliases.includes(t)))}_findOption(t){return this.options.find((r=>r.is(t)))}_checkForMissingMandatoryOptions(){for(let t=this;t;t=t.parent){t.options.forEach((r=>{if(r.mandatory&&t.getOptionValue(r.attributeName())===undefined){t.missingMandatoryOptionValue(r)}}))}}_checkForConflictingLocalOptions(){const t=this.options.filter((t=>{const r=t.attributeName();if(this.getOptionValue(r)===undefined){return false}return this.getOptionValueSource(r)!=="default"}));const r=t.filter((t=>t.conflictsWith.length>0));r.forEach((r=>{const i=t.find((t=>r.conflictsWith.includes(t.attributeName())));if(i){this._conflictingOption(r,i)}}))}_checkForConflictingOptions(){for(let t=this;t;t=t.parent){t._checkForConflictingLocalOptions()}}parseOptions(t){const r=[];const i=[];let o=r;const a=t.slice();function maybeOption(t){return t.length>1&&t[0]==="-"}let l=null;while(a.length){const t=a.shift();if(t==="--"){if(o===i)o.push(t);o.push(...a);break}if(l&&!maybeOption(t)){this.emit(`option:${l.name()}`,t);continue}l=null;if(maybeOption(t)){const r=this._findOption(t);if(r){if(r.required){const t=a.shift();if(t===undefined)this.optionMissingArgument(r);this.emit(`option:${r.name()}`,t)}else if(r.optional){let t=null;if(a.length>0&&!maybeOption(a[0])){t=a.shift()}this.emit(`option:${r.name()}`,t)}else{this.emit(`option:${r.name()}`)}l=r.variadic?r:null;continue}}if(t.length>2&&t[0]==="-"&&t[1]!=="-"){const r=this._findOption(`-${t[1]}`);if(r){if(r.required||r.optional&&this._combineFlagAndOptionalValue){this.emit(`option:${r.name()}`,t.slice(2))}else{this.emit(`option:${r.name()}`);a.unshift(`-${t.slice(2)}`)}continue}}if(/^--[^=]+=/.test(t)){const r=t.indexOf("=");const i=this._findOption(t.slice(0,r));if(i&&(i.required||i.optional)){this.emit(`option:${i.name()}`,t.slice(r+1));continue}}if(maybeOption(t)){o=i}if((this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&i.length===0){if(this._findCommand(t)){r.push(t);if(a.length>0)i.push(...a);break}else if(t===this._helpCommandName&&this._hasImplicitHelpCommand()){r.push(t);if(a.length>0)r.push(...a);break}else if(this._defaultCommandName){i.push(t);if(a.length>0)i.push(...a);break}}if(this._passThroughOptions){o.push(t);if(a.length>0)o.push(...a);break}o.push(t)}return{operands:r,unknown:i}}opts(){if(this._storeOptionsAsProperties){const t={};const r=this.options.length;for(let i=0;i<r;i++){const r=this.options[i].attributeName();t[r]=r===this._versionOptionName?this._version:this[r]}return t}return this._optionValues}optsWithGlobals(){return getCommandAndParents(this).reduce(((t,r)=>Object.assign(t,r.opts())),{})}error(t,r){this._outputConfiguration.outputError(`${t}\n`,this._outputConfiguration.writeErr);if(typeof this._showHelpAfterError==="string"){this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`)}else if(this._showHelpAfterError){this._outputConfiguration.writeErr("\n");this.outputHelp({error:true})}const i=r||{};const o=i.exitCode||1;const a=i.code||"commander.error";this._exit(o,a,t)}_parseOptionsEnv(){this.options.forEach((t=>{if(t.envVar&&t.envVar in c.env){const r=t.attributeName();if(this.getOptionValue(r)===undefined||["default","config","env"].includes(this.getOptionValueSource(r))){if(t.required||t.optional){this.emit(`optionEnv:${t.name()}`,c.env[t.envVar])}else{this.emit(`optionEnv:${t.name()}`)}}}}))}_parseOptionsImplied(){const t=new v(this.options);const hasCustomOptionValue=t=>this.getOptionValue(t)!==undefined&&!["default","implied"].includes(this.getOptionValueSource(t));this.options.filter((r=>r.implied!==undefined&&hasCustomOptionValue(r.attributeName())&&t.valueFromOption(this.getOptionValue(r.attributeName()),r))).forEach((t=>{Object.keys(t.implied).filter((t=>!hasCustomOptionValue(t))).forEach((r=>{this.setOptionValueWithSource(r,t.implied[r],"implied")}))}))}missingArgument(t){const r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){const r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){const r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){const findBestOptionFromValue=t=>{const r=t.attributeName();const i=this.getOptionValue(r);const o=this.options.find((t=>t.negate&&r===t.attributeName()));const a=this.options.find((t=>!t.negate&&r===t.attributeName()));if(o&&(o.presetArg===undefined&&i===false||o.presetArg!==undefined&&i===o.presetArg)){return o}return a||t};const getErrorMessage=t=>{const r=findBestOptionFromValue(t);const i=r.attributeName();const o=this.getOptionValueSource(i);if(o==="env"){return`environment variable '${r.envVar}'`}return`option '${r.flags}'`};const i=`error: ${getErrorMessage(t)} cannot be used with ${getErrorMessage(r)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let i=[];let o=this;do{const t=o.createHelp().visibleOptions(o).filter((t=>t.long)).map((t=>t.long));i=i.concat(t);o=o.parent}while(o&&!o._enablePositionalOptions);r=b(t,i)}const i=`error: unknown option '${t}'${r}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;const r=this._args.length;const i=r===1?"":"s";const o=this.parent?` for '${this.name()}'`:"";const a=`error: too many arguments${o}. Expected ${r} argument${i} but got ${t.length}.`;this.error(a,{code:"commander.excessArguments"})}unknownCommand(){const t=this.args[0];let r="";if(this._showSuggestionAfterError){const i=[];this.createHelp().visibleCommands(this).forEach((t=>{i.push(t.name());if(t.alias())i.push(t.alias())}));r=b(t,i)}const i=`error: unknown command '${t}'${r}`;this.error(i,{code:"commander.unknownCommand"})}version(t,r,i){if(t===undefined)return this._version;this._version=t;r=r||"-V, --version";i=i||"output the version number";const o=this.createOption(r,i);this._versionOptionName=o.attributeName();this.options.push(o);this.on("option:"+o.name(),(()=>{this._outputConfiguration.writeOut(`${t}\n`);this._exit(0,"commander.version",t)}));return this}description(t,r){if(t===undefined&&r===undefined)return this._description;this._description=t;if(r){this._argsDescription=r}return this}summary(t){if(t===undefined)return this._summary;this._summary=t;return this}alias(t){if(t===undefined)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler){r=this.commands[this.commands.length-1]}if(t===r._name)throw new Error("Command alias can't be the same as its name");r._aliases.push(t);return this}aliases(t){if(t===undefined)return this._aliases;t.forEach((t=>this.alias(t)));return this}usage(t){if(t===undefined){if(this._usage)return this._usage;const t=this._args.map((t=>p(t)));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}this._usage=t;return this}name(t){if(t===undefined)return this._name;this._name=t;return this}nameFromFilename(t){this._name=l.basename(t,l.extname(t));return this}executableDir(t){if(t===undefined)return this._executableDir;this._executableDir=t;return this}helpInformation(t){const r=this.createHelp();if(r.helpWidth===undefined){r.helpWidth=t&&t.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()}return r.formatHelp(this,r)}_getHelpContext(t){t=t||{};const r={error:!!t.error};let i;if(r.error){i=t=>this._outputConfiguration.writeErr(t)}else{i=t=>this._outputConfiguration.writeOut(t)}r.write=t.write||i;r.command=this;return r}outputHelp(t){let r;if(typeof t==="function"){r=t;t=undefined}const i=this._getHelpContext(t);getCommandAndParents(this).reverse().forEach((t=>t.emit("beforeAllHelp",i)));this.emit("beforeHelp",i);let o=this.helpInformation(i);if(r){o=r(o);if(typeof o!=="string"&&!Buffer.isBuffer(o)){throw new Error("outputHelp callback must return a string or a Buffer")}}i.write(o);this.emit(this._helpLongFlag);this.emit("afterHelp",i);getCommandAndParents(this).forEach((t=>t.emit("afterAllHelp",i)))}helpOption(t,r){if(typeof t==="boolean"){this._hasHelpOption=t;return this}this._helpFlags=t||this._helpFlags;this._helpDescription=r||this._helpDescription;const i=y(this._helpFlags);this._helpShortFlag=i.shortFlag;this._helpLongFlag=i.longFlag;return this}help(t){this.outputHelp(t);let r=c.exitCode||0;if(r===0&&t&&typeof t!=="function"&&t.error){r=1}this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){const i=["beforeAll","before","after","afterAll"];if(!i.includes(t)){throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${i.join("', '")}'`)}const o=`${t}Help`;this.on(o,(t=>{let i;if(typeof r==="function"){i=r({error:t.error,command:t.command})}else{i=r}if(i){t.write(`${i}\n`)}}));return this}}function outputHelpIfRequested(t,r){const i=t._hasHelpOption&&r.find((r=>r===t._helpLongFlag||r===t._helpShortFlag));if(i){t.outputHelp();t._exit(0,"commander.helpDisplayed","(outputHelp)")}}function incrementNodeInspectorPort(t){return t.map((t=>{if(!t.startsWith("--inspect")){return t}let r;let i="127.0.0.1";let o="9229";let a;if((a=t.match(/^(--inspect(-brk)?)$/))!==null){r=a[1]}else if((a=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null){r=a[1];if(/^\d+$/.test(a[3])){o=a[3]}else{i=a[3]}}else if((a=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null){r=a[1];i=a[3];o=a[4]}if(r&&o!=="0"){return`${r}=${i}:${parseInt(o)+1}`}return t}))}function getCommandAndParents(t){const r=[];for(let i=t;i;i=i.parent){r.push(i)}return r}r.Command=Command},9027:(t,r)=>{class CommanderError extends Error{constructor(t,r,i){super(i);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name;this.code=r;this.exitCode=t;this.nestedError=undefined}}class InvalidArgumentError extends CommanderError{constructor(t){super(1,"commander.invalidArgument",t);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name}}r.CommanderError=CommanderError;r.InvalidArgumentError=InvalidArgumentError},9164:(t,r,i)=>{const{humanReadableArgName:o}=i(4079);class Help{constructor(){this.helpWidth=undefined;this.sortSubcommands=false;this.sortOptions=false}visibleCommands(t){const r=t.commands.filter((t=>!t._hidden));if(t._hasImplicitHelpCommand()){const[,i,o]=t._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/);const a=t.createCommand(i).helpOption(false);a.description(t._helpCommandDescription);if(o)a.arguments(o);r.push(a)}if(this.sortSubcommands){r.sort(((t,r)=>t.name().localeCompare(r.name())))}return r}visibleOptions(t){const r=t.options.filter((t=>!t.hidden));const i=t._hasHelpOption&&t._helpShortFlag&&!t._findOption(t._helpShortFlag);const o=t._hasHelpOption&&!t._findOption(t._helpLongFlag);if(i||o){let a;if(!i){a=t.createOption(t._helpLongFlag,t._helpDescription)}else if(!o){a=t.createOption(t._helpShortFlag,t._helpDescription)}else{a=t.createOption(t._helpFlags,t._helpDescription)}r.push(a)}if(this.sortOptions){const getSortKey=t=>t.short?t.short.replace(/^-/,""):t.long.replace(/^--/,"");r.sort(((t,r)=>getSortKey(t).localeCompare(getSortKey(r))))}return r}visibleArguments(t){if(t._argsDescription){t._args.forEach((r=>{r.description=r.description||t._argsDescription[r.name()]||""}))}if(t._args.find((t=>t.description))){return t._args}return[]}subcommandTerm(t){const r=t._args.map((t=>o(t))).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce(((t,i)=>Math.max(t,r.subcommandTerm(i).length)),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce(((t,i)=>Math.max(t,r.optionTerm(i).length)),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce(((t,i)=>Math.max(t,r.argumentTerm(i).length)),0)}commandUsage(t){let r=t._name;if(t._aliases[0]){r=r+"|"+t._aliases[0]}let i="";for(let r=t.parent;r;r=r.parent){i=r.name()+" "+i}return i+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){const r=[];if(t.argChoices){r.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`)}if(t.defaultValue!==undefined){const i=t.required||t.optional||t.isBoolean()&&typeof t.defaultValue==="boolean";if(i){r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`)}}if(t.presetArg!==undefined&&t.optional){r.push(`preset: ${JSON.stringify(t.presetArg)}`)}if(t.envVar!==undefined){r.push(`env: ${t.envVar}`)}if(r.length>0){return`${t.description} (${r.join(", ")})`}return t.description}argumentDescription(t){const r=[];if(t.argChoices){r.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`)}if(t.defaultValue!==undefined){r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`)}if(r.length>0){const i=`(${r.join(", ")})`;if(t.description){return`${t.description} ${i}`}return i}return t.description}formatHelp(t,r){const i=r.padWidth(t,r);const o=r.helpWidth||80;const a=2;const l=2;function formatItem(t,u){if(u){const c=`${t.padEnd(i+l)}${u}`;return r.wrap(c,o-a,i+l)}return t}function formatList(t){return t.join("\n").replace(/^/gm," ".repeat(a))}let u=[`Usage: ${r.commandUsage(t)}`,""];const c=r.commandDescription(t);if(c.length>0){u=u.concat([c,""])}const h=r.visibleArguments(t).map((t=>formatItem(r.argumentTerm(t),r.argumentDescription(t))));if(h.length>0){u=u.concat(["Arguments:",formatList(h),""])}const p=r.visibleOptions(t).map((t=>formatItem(r.optionTerm(t),r.optionDescription(t))));if(p.length>0){u=u.concat(["Options:",formatList(p),""])}const d=r.visibleCommands(t).map((t=>formatItem(r.subcommandTerm(t),r.subcommandDescription(t))));if(d.length>0){u=u.concat(["Commands:",formatList(d),""])}return u.join("\n")}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}wrap(t,r,i,o=40){if(t.match(/[\n]\s+/))return t;const a=r-i;if(a<o)return t;const l=t.slice(0,i);const u=t.slice(i);const c=" ".repeat(i);const h=new RegExp(".{1,"+(a-1)+"}([\\s​]|$)|[^\\s​]+?([\\s​]|$)","g");const p=u.match(h)||[];return l+p.map(((t,r)=>{if(t.slice(-1)==="\n"){t=t.slice(0,t.length-1)}return(r>0?c:"")+t.trimRight()})).join("\n")}}r.Help=Help},5205:(t,r,i)=>{const{InvalidArgumentError:o}=i(9027);class Option{constructor(t,r){this.flags=t;this.description=r||"";this.required=t.includes("<");this.optional=t.includes("[");this.variadic=/\w\.\.\.[>\]]$/.test(t);this.mandatory=false;const i=splitOptionFlags(t);this.short=i.shortFlag;this.long=i.longFlag;this.negate=false;if(this.long){this.negate=this.long.startsWith("--no-")}this.defaultValue=undefined;this.defaultValueDescription=undefined;this.presetArg=undefined;this.envVar=undefined;this.parseArg=undefined;this.hidden=false;this.argChoices=undefined;this.conflictsWith=[];this.implied=undefined}default(t,r){this.defaultValue=t;this.defaultValueDescription=r;return this}preset(t){this.presetArg=t;return this}conflicts(t){this.conflictsWith=this.conflictsWith.concat(t);return this}implies(t){this.implied=Object.assign(this.implied||{},t);return this}env(t){this.envVar=t;return this}argParser(t){this.parseArg=t;return this}makeOptionMandatory(t=true){this.mandatory=!!t;return this}hideHelp(t=true){this.hidden=!!t;return this}_concatValue(t,r){if(r===this.defaultValue||!Array.isArray(r)){return[t]}return r.concat(t)}choices(t){this.argChoices=t.slice();this.parseArg=(t,r)=>{if(!this.argChoices.includes(t)){throw new o(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(t,r)}return t};return this}name(){if(this.long){return this.long.replace(/^--/,"")}return this.short.replace(/^-/,"")}attributeName(){return camelcase(this.name().replace(/^no-/,""))}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class DualOptions{constructor(t){this.positiveOptions=new Map;this.negativeOptions=new Map;this.dualOptions=new Set;t.forEach((t=>{if(t.negate){this.negativeOptions.set(t.attributeName(),t)}else{this.positiveOptions.set(t.attributeName(),t)}}));this.negativeOptions.forEach(((t,r)=>{if(this.positiveOptions.has(r)){this.dualOptions.add(r)}}))}valueFromOption(t,r){const i=r.attributeName();if(!this.dualOptions.has(i))return true;const o=this.negativeOptions.get(i).presetArg;const a=o!==undefined?o:false;return r.negate===(a===t)}}function camelcase(t){return t.split("-").reduce(((t,r)=>t+r[0].toUpperCase()+r.slice(1)))}function splitOptionFlags(t){let r;let i;const o=t.split(/[ |,]+/);if(o.length>1&&!/^[[<]/.test(o[1]))r=o.shift();i=o.shift();if(!r&&/^-[^-]$/.test(i)){r=i;i=undefined}return{shortFlag:r,longFlag:i}}r.Option=Option;r.splitOptionFlags=splitOptionFlags;r.DualOptions=DualOptions},211:(t,r)=>{const i=3;function editDistance(t,r){if(Math.abs(t.length-r.length)>i)return Math.max(t.length,r.length);const o=[];for(let r=0;r<=t.length;r++){o[r]=[r]}for(let t=0;t<=r.length;t++){o[0][t]=t}for(let i=1;i<=r.length;i++){for(let a=1;a<=t.length;a++){let l=1;if(t[a-1]===r[i-1]){l=0}else{l=1}o[a][i]=Math.min(o[a-1][i]+1,o[a][i-1]+1,o[a-1][i-1]+l);if(a>1&&i>1&&t[a-1]===r[i-2]&&t[a-2]===r[i-1]){o[a][i]=Math.min(o[a][i],o[a-2][i-2]+1)}}}return o[t.length][r.length]}function suggestSimilar(t,r){if(!r||r.length===0)return"";r=Array.from(new Set(r));const o=t.startsWith("--");if(o){t=t.slice(2);r=r.map((t=>t.slice(2)))}let a=[];let l=i;const u=.4;r.forEach((r=>{if(r.length<=1)return;const i=editDistance(t,r);const o=Math.max(t.length,r.length);const c=(o-i)/o;if(c>u){if(i<l){l=i;a=[r]}else if(i===l){a.push(r)}}}));a.sort(((t,r)=>t.localeCompare(r)));if(o){a=a.map((t=>`--${t}`))}if(a.length>1){return`\n(Did you mean one of ${a.join(", ")}?)`}if(a.length===1){return`\n(Did you mean ${a[0]}?)`}return""}r.suggestSimilar=suggestSimilar}};var __webpack_module_cache__={};function __nccwpck_require__(t){var r=__webpack_module_cache__[t];if(r!==undefined){return r.exports}var i=__webpack_module_cache__[t]={exports:{}};var o=true;try{__webpack_modules__[t].call(i.exports,i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete __webpack_module_cache__[t]}return i.exports}(()=>{__nccwpck_require__.n=t=>{var r=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(r,{a:r});return r}})();(()=>{__nccwpck_require__.d=(t,r)=>{for(var i in r){if(__nccwpck_require__.o(r,i)&&!__nccwpck_require__.o(t,i)){Object.defineProperty(t,i,{enumerable:true,get:r[i]})}}}})();(()=>{__nccwpck_require__.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require__(371);module.exports=__webpack_exports__})();
143
+ var o=i(3837).inherits;var a=i(2096).ZipArchiveOutputStream;var l=i(2096).ZipArchiveEntry;var u=i(1246);var c=t.exports=function(t){if(!(this instanceof c)){return new c(t)}t=this.options=t||{};t.zlib=t.zlib||{};a.call(this,t);if(typeof t.level==="number"&&t.level>=0){t.zlib.level=t.level;delete t.level}if(!t.forceZip64&&typeof t.zlib.level==="number"&&t.zlib.level===0){t.store=true}t.namePrependSlash=t.namePrependSlash||false;if(t.comment&&t.comment.length>0){this.setComment(t.comment)}};o(c,a);c.prototype._normalizeFileData=function(t){t=u.defaults(t,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""});var r=t.type==="directory";var i=t.type==="symlink";if(t.name){t.name=u.sanitizePath(t.name);if(!i&&t.name.slice(-1)==="/"){r=true;t.type="directory"}else if(r){t.name+="/"}}if(r||i){t.store=true}t.date=u.dateify(t.date);return t};c.prototype.entry=function(t,r,i){if(typeof i!=="function"){i=this._emitErrorCallback.bind(this)}r=this._normalizeFileData(r);if(r.type!=="file"&&r.type!=="directory"&&r.type!=="symlink"){i(new Error(r.type+" entries not currently supported"));return}if(typeof r.name!=="string"||r.name.length===0){i(new Error("entry name must be a non-empty string value"));return}if(r.type==="symlink"&&typeof r.linkname!=="string"){i(new Error("entry linkname must be a non-empty string value when type equals symlink"));return}var o=new l(r.name);o.setTime(r.date,this.options.forceLocalTime);if(r.namePrependSlash){o.setName(r.name,true)}if(r.store){o.setMethod(0)}if(r.comment.length>0){o.setComment(r.comment)}if(r.type==="symlink"&&typeof r.mode!=="number"){r.mode=40960}if(typeof r.mode==="number"){if(r.type==="symlink"){r.mode|=40960}o.setUnixMode(r.mode)}if(r.type==="symlink"&&typeof r.linkname==="string"){t=Buffer.from(r.linkname)}return a.prototype.entry.call(this,o,t,i)};c.prototype.finalize=function(){this.finish()}},371:(t,r,i)=>{"use strict";i.r(r);const o=10;const wrapAnsi16=(t=0)=>r=>`[${r+t}m`;const wrapAnsi256=(t=0)=>r=>`[${38+t};5;${r}m`;const wrapAnsi16m=(t=0)=>(r,i,o)=>`[${38+t};2;${r};${i};${o}m`;const a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};const l=Object.keys(a.modifier);const u=Object.keys(a.color);const c=Object.keys(a.bgColor);const h=[...u,...c];function assembleStyles(){const t=new Map;for(const[r,i]of Object.entries(a)){for(const[r,o]of Object.entries(i)){a[r]={open:`[${o[0]}m`,close:`[${o[1]}m`};i[r]=a[r];t.set(o[0],o[1])}Object.defineProperty(a,r,{value:i,enumerable:false})}Object.defineProperty(a,"codes",{value:t,enumerable:false});a.color.close="";a.bgColor.close="";a.color.ansi=wrapAnsi16();a.color.ansi256=wrapAnsi256();a.color.ansi16m=wrapAnsi16m();a.bgColor.ansi=wrapAnsi16(o);a.bgColor.ansi256=wrapAnsi256(o);a.bgColor.ansi16m=wrapAnsi16m(o);Object.defineProperties(a,{rgbToAnsi256:{value(t,r,i){if(t===r&&r===i){if(t<8){return 16}if(t>248){return 231}return Math.round((t-8)/247*24)+232}return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)},enumerable:false},hexToRgb:{value(t){const r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r){return[0,0,0]}let[i]=r;if(i.length===3){i=[...i].map((t=>t+t)).join("")}const o=Number.parseInt(i,16);return[o>>16&255,o>>8&255,o&255]},enumerable:false},hexToAnsi256:{value:t=>a.rgbToAnsi256(...a.hexToRgb(t)),enumerable:false},ansi256ToAnsi:{value(t){if(t<8){return 30+t}if(t<16){return 90+(t-8)}let r;let i;let o;if(t>=232){r=((t-232)*10+8)/255;i=r;o=r}else{t-=16;const a=t%36;r=Math.floor(t/36)/5;i=Math.floor(a/6)/5;o=a%6/5}const a=Math.max(r,i,o)*2;if(a===0){return 30}let l=30+(Math.round(o)<<2|Math.round(i)<<1|Math.round(r));if(a===2){l+=60}return l},enumerable:false},rgbToAnsi:{value:(t,r,i)=>a.ansi256ToAnsi(a.rgbToAnsi256(t,r,i)),enumerable:false},hexToAnsi:{value:t=>a.ansi256ToAnsi(a.hexToAnsi256(t)),enumerable:false}});return a}const p=assembleStyles();const d=p;const m=require("node:process");const g=require("node:os");const y=require("node:tty");function hasFlag(t,r=m.argv){const i=t.startsWith("-")?"":t.length===1?"-":"--";const o=r.indexOf(i+t);const a=r.indexOf("--");return o!==-1&&(a===-1||o<a)}const{env:v}=m;let b;if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")||hasFlag("color=never")){b=0}else if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){b=1}function envForceColor(){if("FORCE_COLOR"in v){if(v.FORCE_COLOR==="true"){return 1}if(v.FORCE_COLOR==="false"){return 0}return v.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(v.FORCE_COLOR,10),3)}}function translateLevel(t){if(t===0){return false}return{level:t,hasBasic:true,has256:t>=2,has16m:t>=3}}function _supportsColor(t,{streamIsTTY:r,sniffFlags:i=true}={}){const o=envForceColor();if(o!==undefined){b=o}const a=i?b:o;if(a===0){return 0}if(i){if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor")){return 3}if(hasFlag("color=256")){return 2}}if(t&&!r&&a===undefined){return 0}const l=a||0;if(v.TERM==="dumb"){return l}if(m.platform==="win32"){const t=g.release().split(".");if(Number(t[0])>=10&&Number(t[2])>=10586){return Number(t[2])>=14931?3:2}return 1}if("CI"in v){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((t=>t in v))||v.CI_NAME==="codeship"){return 1}return l}if("TEAMCITY_VERSION"in v){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(v.TEAMCITY_VERSION)?1:0}if("TF_BUILD"in v&&"AGENT_NAME"in v){return 1}if(v.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in v){const t=Number.parseInt((v.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(v.TERM_PROGRAM){case"iTerm.app":return t>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(v.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(v.TERM)){return 1}if("COLORTERM"in v){return 1}return l}function createSupportsColor(t,r={}){const i=_supportsColor(t,{streamIsTTY:t&&t.isTTY,...r});return translateLevel(i)}const _={stdout:createSupportsColor({isTTY:y.isatty(1)}),stderr:createSupportsColor({isTTY:y.isatty(2)})};const w=_;function stringReplaceAll(t,r,i){let o=t.indexOf(r);if(o===-1){return t}const a=r.length;let l=0;let u="";do{u+=t.slice(l,o)+r+i;l=o+a;o=t.indexOf(r,l)}while(o!==-1);u+=t.slice(l);return u}function stringEncaseCRLFWithFirstIndex(t,r,i,o){let a=0;let l="";do{const u=t[o-1]==="\r";l+=t.slice(a,u?o-1:o)+r+(u?"\r\n":"\n")+i;a=o+1;o=t.indexOf("\n",a)}while(o!==-1);l+=t.slice(a);return l}const{stdout:S,stderr:E}=w;const x=Symbol("GENERATOR");const A=Symbol("STYLER");const O=Symbol("IS_EMPTY");const k=["ansi","ansi","ansi256","ansi16m"];const R=Object.create(null);const applyOptions=(t,r={})=>{if(r.level&&!(Number.isInteger(r.level)&&r.level>=0&&r.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const i=S?S.level:0;t.level=r.level===undefined?i:r.level};class Chalk{constructor(t){return chalkFactory(t)}}const chalkFactory=t=>{const chalk=(...t)=>t.join(" ");applyOptions(chalk,t);Object.setPrototypeOf(chalk,createChalk.prototype);return chalk};function createChalk(t){return chalkFactory(t)}Object.setPrototypeOf(createChalk.prototype,Function.prototype);for(const[t,r]of Object.entries(d)){R[t]={get(){const i=createBuilder(this,createStyler(r.open,r.close,this[A]),this[O]);Object.defineProperty(this,t,{value:i});return i}}}R.visible={get(){const t=createBuilder(this,this[A],true);Object.defineProperty(this,"visible",{value:t});return t}};const getModelAnsi=(t,r,i,...o)=>{if(t==="rgb"){if(r==="ansi16m"){return d[i].ansi16m(...o)}if(r==="ansi256"){return d[i].ansi256(d.rgbToAnsi256(...o))}return d[i].ansi(d.rgbToAnsi(...o))}if(t==="hex"){return getModelAnsi("rgb",r,i,...d.hexToRgb(...o))}return d[i][t](...o)};const T=["rgb","hex","ansi256"];for(const t of T){R[t]={get(){const{level:r}=this;return function(...i){const o=createStyler(getModelAnsi(t,k[r],"color",...i),d.color.close,this[A]);return createBuilder(this,o,this[O])}}};const r="bg"+t[0].toUpperCase()+t.slice(1);R[r]={get(){const{level:r}=this;return function(...i){const o=createStyler(getModelAnsi(t,k[r],"bgColor",...i),d.bgColor.close,this[A]);return createBuilder(this,o,this[O])}}}}const C=Object.defineProperties((()=>{}),{...R,level:{enumerable:true,get(){return this[x].level},set(t){this[x].level=t}}});const createStyler=(t,r,i)=>{let o;let a;if(i===undefined){o=t;a=r}else{o=i.openAll+t;a=r+i.closeAll}return{open:t,close:r,openAll:o,closeAll:a,parent:i}};const createBuilder=(t,r,i)=>{const builder=(...t)=>applyStyle(builder,t.length===1?""+t[0]:t.join(" "));Object.setPrototypeOf(builder,C);builder[x]=t;builder[A]=r;builder[O]=i;return builder};const applyStyle=(t,r)=>{if(t.level<=0||!r){return t[O]?"":r}let i=t[A];if(i===undefined){return r}const{openAll:o,closeAll:a}=i;if(r.includes("")){while(i!==undefined){r=stringReplaceAll(r,i.close,i.open);i=i.parent}}const l=r.indexOf("\n");if(l!==-1){r=stringEncaseCRLFWithFirstIndex(r,a,o,l)}return o+r+a};Object.defineProperties(createChalk.prototype,R);const P=createChalk();const I=createChalk({level:E?E.level:0});const L=P;var M=i(345);const{program:N,createCommand:j,createArgument:D,createOption:$,CommanderError:B,InvalidArgumentError:H,InvalidOptionArgumentError:W,Command:G,Argument:U,Option:V,Help:q}=M;var z=i(5656);var Y=i.n(z);var K=i(1017);var Q=i.n(K);var Z=i(7147);var X=i.n(Z);var J=i(2202);var ee=i.n(J);async function archiveFolder(t,r,i){return new Promise(((o,a)=>{const l=Q().join(t,"public","archives");if(!X().existsSync(l)){X().mkdirSync(l,{recursive:true})}const u=Q().join(l,r+".zip");const c=X().createWriteStream(u);const h=ee()("zip",{zlib:{level:9}});h.on("finish",(()=>{console.log(`${L.green(`[${i}]`)} Archive ${r} zipped.`);o()}));h.on("error",(t=>{throw t}));h.pipe(c);h.directory(Q().join(t,"archives",r),false);h.finalize()}))}async function runArchive(t,r){return new Promise(((i,o)=>{if(!X().existsSync(Q().join(t,"archives"))){console.log(`${L.blue(`[${r}]`)} No archives found.`);i()}else{console.log(`${L.blue(`[${r}]`)} Zipping archives.`);const a=X().readdirSync(Q().join(t,"archives"),{withFileTypes:true}).filter((t=>t.isDirectory()));Promise.all(a.map((i=>archiveFolder(t,i.name,r)))).then((()=>{i()})).catch((()=>{o()}))}}))}var te=i(4488);var re=i.n(te);var ne=i(4521);var ie=i.n(ne);function isSetup(t,r){const i="Could not find .hyperbook folder. Be sure to run `hyperbook setup`.";try{const r=X().statSync(Q().join(t,".hyperbook"));if(!r.isDirectory()){throw Error()}}catch(t){console.log(L.red(`Could not find .hyperbook folder at ${i}. Be sure to run \`hyperbook setup\`.`));return false}if(process.env.HYPERBOOK_LOCAL_DEV){return true}const o=Q().join((r===null||r===void 0?void 0:r.src)||t,".hyperbook","node_modules",".bin","next");try{X().statSync(o)}catch(t){console.log(L.red(`Could not find next binary at ${o}. Be sure to run \`hyperbook setup\`.`));return false}return true}async function readHyperbook(t){return new Promise(((r,i)=>{X().readFile(Q().join(t,"hyperbook.json"),((t,o)=>{if(t){console.log(L.red("Could not find 'hyperbook.json'. Make sure you are in the right directory."));i()}else{const t=JSON.parse(o.toString());r(t)}}))}))}const se=require("fs/promises");var oe=i.n(se);var ae=i(659);const le=require("node:path");const ue=require("node:url");const ce=require("node:fs");class Node{value;next;constructor(t){this.value=t}}class yocto_queue_Queue{#e;#t;#r;constructor(){this.clear()}enqueue(t){const r=new Node(t);if(this.#e){this.#t.next=r;this.#t=r}else{this.#e=r;this.#t=r}this.#r++}dequeue(){const t=this.#e;if(!t){return}this.#e=this.#e.next;this.#r--;return t.value}clear(){this.#e=undefined;this.#t=undefined;this.#r=0}get size(){return this.#r}*[Symbol.iterator](){let t=this.#e;while(t){yield t.value;t=t.next}}}function p_limit_pLimit(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0)){throw new TypeError("Expected `concurrency` to be a number from 1 and up")}const r=new Queue;let i=0;const next=()=>{i--;if(r.size>0){r.dequeue()()}};const run=async(t,r,o)=>{i++;const a=(async()=>t(...o))();r(a);try{await a}catch{}next()};const enqueue=(o,a,l)=>{r.enqueue(run.bind(undefined,o,a,l));(async()=>{await Promise.resolve();if(i<t&&r.size>0){r.dequeue()()}})()};const generator=(t,...r)=>new Promise((i=>{enqueue(t,i,r)}));Object.defineProperties(generator,{activeCount:{get:()=>i},pendingCount:{get:()=>r.size},clearQueue:{value:()=>{r.clear()}}});return generator}class EndError extends Error{constructor(t){super();this.value=t}}const testElement=async(t,r)=>r(await t);const finder=async t=>{const r=await Promise.all(t);if(r[1]===true){throw new EndError(r[0])}return false};async function p_locate_pLocate(t,r,{concurrency:i=Number.POSITIVE_INFINITY,preserveOrder:o=true}={}){const a=pLimit(i);const l=[...t].map((t=>[t,a(testElement,t,r)]));const u=pLimit(o?1:Number.POSITIVE_INFINITY);try{await Promise.all(l.map((t=>u(finder,t))))}catch(t){if(t instanceof EndError){return t.value}throw t}}const fe={directory:"isDirectory",file:"isFile"};function checkType(t){if(Object.hasOwnProperty.call(fe,t)){return}throw new Error(`Invalid type specified: ${t}`)}const matchType=(t,r)=>r[fe[t]]();const toPath=t=>t instanceof URL?fileURLToPath(t):t;async function locate_path_locatePath(t,{cwd:r=process.cwd(),type:i="file",allowSymlinks:o=true,concurrency:a,preserveOrder:l}={}){checkType(i);r=toPath(r);const u=o?fsPromises.stat:fsPromises.lstat;return pLocate(t,(async t=>{try{const o=await u(path.resolve(r,t));return matchType(i,o)}catch{return false}}),{concurrency:a,preserveOrder:l})}function locate_path_locatePathSync(t,{cwd:r=process.cwd(),type:i="file",allowSymlinks:o=true}={}){checkType(i);r=toPath(r);const a=o?fs.statSync:fs.lstatSync;for(const o of t){try{const t=a(path.resolve(r,o));if(matchType(i,t)){return o}}catch{}}}async function pathExists(t){try{await fsPromises.access(t);return true}catch{return false}}function pathExistsSync(t){try{fs.accessSync(t);return true}catch{return false}}const find_up_toPath=t=>t instanceof URL?fileURLToPath(t):t;const he=Symbol("findUpStop");async function findUpMultiple(t,r={}){let i=path.resolve(find_up_toPath(r.cwd)||"");const{root:o}=path.parse(i);const a=path.resolve(i,r.stopAt||o);const l=r.limit||Number.POSITIVE_INFINITY;const u=[t].flat();const runMatcher=async r=>{if(typeof t!=="function"){return locatePath(u,r)}const i=await t(r.cwd);if(typeof i==="string"){return locatePath([i],r)}return i};const c=[];while(true){const t=await runMatcher({...r,cwd:i});if(t===he){break}if(t){c.push(path.resolve(i,t))}if(i===a||c.length>=l){break}i=path.dirname(i)}return c}function findUpMultipleSync(t,r={}){let i=path.resolve(find_up_toPath(r.cwd)||"");const{root:o}=path.parse(i);const a=r.stopAt||o;const l=r.limit||Number.POSITIVE_INFINITY;const u=[t].flat();const runMatcher=r=>{if(typeof t!=="function"){return locatePathSync(u,r)}const i=t(r.cwd);if(typeof i==="string"){return locatePathSync([i],r)}return i};const c=[];while(true){const t=runMatcher({...r,cwd:i});if(t===he){break}if(t){c.push(path.resolve(i,t))}if(i===a||c.length>=l){break}i=path.dirname(i)}return c}async function find_up_findUp(t,r={}){const i=await findUpMultiple(t,{...r,limit:1});return i[0]}function findUpSync(t,r={}){const i=findUpMultipleSync(t,{...r,limit:1});return i[0]}var pe=Object.defineProperty;var de=Object.defineProperties;var me=Object.getOwnPropertyDescriptors;var ge=Object.getOwnPropertySymbols;var ye=Object.prototype.hasOwnProperty;var ve=Object.prototype.propertyIsEnumerable;var __defNormalProp=(t,r,i)=>r in t?pe(t,r,{enumerable:true,configurable:true,writable:true,value:i}):t[r]=i;var __spreadValues=(t,r)=>{for(var i in r||={})if(ye.call(r,i))__defNormalProp(t,i,r[i]);if(ge)for(var i of ge(r)){if(ve.call(r,i))__defNormalProp(t,i,r[i])}return t};var __spreadProps=(t,r)=>de(t,me(r));var __async=(t,r,i)=>new Promise(((o,a)=>{var fulfilled=t=>{try{step(i.next(t))}catch(t){a(t)}};var rejected=t=>{try{step(i.throw(t))}catch(t){a(t)}};var step=t=>t.done?o(t.value):Promise.resolve(t.value).then(fulfilled,rejected);step((i=i.apply(t,r)).next())}));var listFiles=(t,r="",i=true)=>__async(void 0,null,(function*(){const o=yield fs.readdir(path.join(t,r));return Promise.all(o.flatMap((o=>__async(void 0,null,(function*(){const a=yield fs.stat(path.join(t,r,o));if(a.isDirectory()){return listFiles(t,path.join(r,o),i)}else if(o.endsWith(".md")){if(i){return[path.join(t,r,o)]}else{return[path.join(r,o)]}}return[]}))))).then((t=>t.flat()))}));var readBook=(t,r=true)=>__async(void 0,null,(function*(){return listFiles(path.join(t,"book"),"",r)}));var readGlossary=(t,r=true)=>__async(void 0,null,(function*(){return listFiles(path.join(t,"glossary"),"",r)}));var makeGlossary=t=>__async(void 0,null,(function*(){const r=yield readGlossary(t);const i={};for(const o of r){const{content:r,data:a}=yield readFile(o);let l=path.basename(o,".md");if(a.name){l=a.name}else{console.log(`\n${chalk.yellow(`warn `)}- Glossary page ${o} does not specify a name. Defaulting to the filename ${l}.`)}const u=l[0].toUpperCase();if(!i[u]){i[u]=[]}const c=path.relative(t,o).replace(/\.md$/,"").split("/");i[u].push({name:l,href:"/"+c.join("/")})}return i}));var listPagesForTerm=(t,r)=>__async(void 0,null,(function*(){const i=yield readBook(t);const o=[];for(const a of i){const{content:i,data:l}=yield readFile(a);const u=new RegExp(`:t\\[.*\\]\\{#${r}(..*)?\\}|:t\\[${r}\\]`);const c=i.match(u);if(c&&!l.hide&&l.name){const r=path.relative(path.join(t,"book"),a).replace(/\.md$/,"").split("/");const i=r[r.length-1]==="index";if(i){r.pop()}o.push(__spreadProps(__spreadValues({},l),{href:"/"+r.join("/")}))}}return o}));var readFile=t=>__async(void 0,null,(function*(){const r=yield fs.readFile(t).catch((()=>fs.readFile(t+".md").catch((()=>fs.readFile(path.join(t,"index.md"))))));const{content:i,data:o}=matter(r);return{content:i,data:o}}));var index_esm_readHyperbook=t=>__async(void 0,null,(function*(){return se.readFile(K.join(t,"hyperbook.json")).then((t=>t.toString())).then(JSON.parse)}));var readHyperlibrary=t=>__async(void 0,null,(function*(){return se.readFile(K.join(t,"hyperlibrary.json")).then((t=>t.toString())).then(JSON.parse)}));var findHyperbook=t=>__async(void 0,null,(function*(){return findUp("hyperbook.json",{cwd:t}).then((t=>{if(!t){throw new Error("Could not find hyperbook.json")}return fs.readFile(t)})).then((t=>JSON.parse(t.toString())))}));var findHyperbookRoot=t=>__async(void 0,null,(function*(){return findUp("hyperbook.json",{cwd:t}).then((t=>{if(!t){throw new Error("Could not find hyperbook.json")}return path.parse(t).dir}))}));var readProject=(t,r)=>__async(void 0,null,(function*(){var i,o,a,l;if(r==null?void 0:r.src){t=K.join(t,r.src)}const u=yield index_esm_readHyperbook(t).catch((()=>null));if(u){return{type:"book",src:t,basePath:(i=r==null?void 0:r.basePath)!=null?i:u.basePath,name:(o=r==null?void 0:r.name)!=null?o:u.name,icon:r==null?void 0:r.icon}}const c=yield readHyperlibrary(t).catch((()=>null));if(c){return{type:"library",src:t,basePath:(a=r==null?void 0:r.basePath)!=null?a:c.basePath,name:(l=r==null?void 0:r.name)!=null?l:c.name,projects:yield Promise.all(c.library.map((i=>{var o,a;return readProject(t,__spreadProps(__spreadValues({},i),{basePath:K.join((a=(o=r==null?void 0:r.basePath)!=null?o:c.basePath)!=null?a:"",i.basePath)}))}))),icon:r==null?void 0:r.icon}}console.log(`${L.red("Error")} - Missing book or library for path ${t}.`);throw Error(`Missing book or library for path ${t}`)}));var getProjectName=(t,r)=>{let i="";if(typeof t.name==="string"){i=t.name}else{if(r){i=t.name[r]||""}else{i=Object.values(t.name)[0]}if(!i){console.log(L.red(`You need to provide a name for language ${r} in ${t.src}`));throw Error("")}}return i};var makeLinkForHyperproject=(t,...r)=>__async(void 0,[t,...r],(function*(t,r="en",i={}){var o,a,l,u,c,h;const p=getProjectName(t,r);if(t.type==="library"){return{label:p,links:yield Promise.all(t.projects.map((t=>makeLinkForHyperproject(t,r,i)))),icon:t.icon}}else{let r=(o=t.basePath)!=null?o:"/";if(!r.startsWith("/")){r="/"+r}if((a=i.href)==null?void 0:a.useSrc){r=t.src}if((l=i.href)==null?void 0:l.relative){r=K.relative(i.href.relative,r)}if((u=i.href)==null?void 0:u.prepend){r=K.join(...i.href.prepend,r)}if((c=i.href)==null?void 0:c.append){r=K.join(r,...i.href.append)}if((h=i.href)==null?void 0:h.protocol){if(r.startsWith("/")){r=r.slice(0,-1)}r=i.href.protocol+r}if(r.length>1&&r.endsWith("/")){r=r.slice(0,-1)}return{label:p,href:r,icon:t.icon}}}));var makeNavigationForHyperbook=(t,r="/")=>__async(void 0,null,(function*(){const i=yield index_esm_readHyperbook(t);const getSectionsAndPages=function(r){return __async(this,arguments,(function*(r,o=[]){const a=yield fs.readdir(r);let l=[];let u=[];for(const c of a){let a=path.join(r,c);let h=null;if(i.repo){h=i.repo+"/"+path.relative(t,a)}const p=yield fs.stat(a);if(p.isDirectory()){const{pages:r,sections:i}=yield getSectionsAndPages(a,o);const{content:l,data:c}=yield readFile(a);const p=__spreadProps(__spreadValues({},c),{href:"/"+path.relative(path.join(t,"book"),a),isEmpty:l.trim()==="",pages:r,sections:i});if(h){p.repo=h+"/index.md"}u.push(p)}else{const{data:r}=yield readFile(a);if(a.endsWith(".md")){a=a.substring(0,a.length-3);if(path.relative(path.join(t,"book"),a)==="index"){a=a.substring(0,a.length-5)}if(!a.endsWith("index")){const i=__spreadProps(__spreadValues({},r),{href:"/"+path.relative(path.join(t,"book"),a)});if(h){i.repo=h}l.push(i)}}}}l=l.sort(((t,r)=>t.name>r.name?1:-1));l=l.sort(((t,r)=>{const i=t.index!==void 0?t.index:9999;const o=r.index!==void 0?r.index:9999;return i-o}));u=u.sort(((t,r)=>t.name>r.name?1:-1));u=u.sort(((t,r)=>{const i=t.index!==void 0?t.index:9999;const o=r.index!==void 0?r.index:9999;return i-o}));return{pages:l,sections:u}}))};const getPageList=(t,r)=>{let i=[...r];for(const r of t){i=[...i,r,...getPageList(r.sections,r.pages)]}return i};const{sections:o,pages:a}=yield getSectionsAndPages(path.join(t,"book"));let l=getPageList(o,a);let u=l.findIndex((t=>t.href===r));const c=l[u]||null;l=l.filter((t=>!t.isEmpty&&!t.hide));u=l.findIndex((t=>t.href===r));const h=l[u+1]||null;const p=l[u-1]||null;return{next:h,current:c,previous:p,sections:o,pages:a}}));async function makeDir(t,r={recursive:true}){await X().promises.mkdir(t,r)}var be=i(4700);var _e=i.n(be);function makeEnv(t){let r=process.env.NODE_PATH;let i=process.env.PATH;if(process.env.HYPERBOOK_LOCAL_DEV){r=Q().join(__dirname,"..","..","..","platforms","web","node_modules");i=Q().join(__dirname,"..","..","..","platforms","web","node_modules",".bin")+":"+i}else if(t){r=Q().join(t.src,".hyperbook","node_modules");i=Q().join(t.src,".hyperbook","node_modules",".bin")+":"+i}const o={NODE_PATH:r,PATH:i};return o}async function runBuildProject(t,r,i){const o=getProjectName(t);if(t.type==="book"){console.log(`${L.blue(`[${o}]`)} Building Book.`);await runBuild(t.src,r,t.basePath,o,i)}else{if(!i){i=t.src;_e().sync(Q().join(i,".hyperbook","out"))}console.log(`${L.blue(`[${o}]`)} Building Library.`);for(const o of t.projects){await runBuildProject(o,r,i)}}}async function runBuild(t,r,i,o,a){const l=isSetup(t,r);if(!l){throw new Error("no setup")}await runArchive(t,o);const u=await readHyperbook(t);if(!i&&(u===null||u===void 0?void 0:u.basePath)){i=u.basePath}if(i&&!i.startsWith("/")){i="/"+i}if(i&&i.endsWith("/")){i=i.slice(0,-1)}X().writeFileSync(Q().join(t,".hyperbook","next.config.js"),`\nmodule.exports = {\n ${i?`basePath: '${i}',`:""}\n typescript: {\n ignoreBuildErrors: true,\n }\n}\n `);const c=await readHyperbook(t);let h=undefined;if(r.type==="library"){h=await makeLinkForHyperproject(r,c.language)}if(h){if(!c.links){c.links=[h]}else{c.links.push(h)}}c.basePath=i;X().cpSync(Q().join(t,"hyperbook.json"),Q().join(t,".hyperbook","hyperbook.json"),{force:true});X().writeFileSync(Q().join(t,".hyperbook","hyperbook.json"),JSON.stringify(c,null,2));return new Promise(((l,u)=>{var c;const h="npm";const p=["run","next:build"];const d=makeEnv(r);const m=re()(h,p,{stdio:"pipe",cwd:Q().join(t,".hyperbook"),env:{...process.env,...d,ADBLOCK:"1",DISABLE_OPENCOLLECTIVE:"1"}});const g=`${L.blue(`[${o}]`)} Exporting HTML files`;let y=0;const v=setInterval((()=>{if(!process.env.CI){ie().clearLine(process.stdout,0);ie().cursorTo(process.stdout,0);process.stdout.write(g+".".repeat(y));y=(y+1)%5}}),500);if(process.env.CI){process.stdout.write(g+".\n")}(c=m.stderr)===null||c===void 0?void 0:c.on("data",(t=>{if(!String(t).startsWith("warn")){console.log(`${L.red(`[${o}]`)} `+t)}}));m.on("close",(r=>{clearInterval(v);if(r!==0){process.stdout.write("\n");u({command:`${h} ${p.join(" ")}`});return}else{ie().clearLine(process.stdout,0);ie().cursorTo(process.stdout,0);const r=Q().join(t,".hyperbook","out");if(!a){process.stdout.write(`${L.green(`[${o}]`)} Export successful. Files written to ${r}.\n`);l()}else{const t=Q().join(a,".hyperbook","out",i||"");makeDir(t).then((()=>{X().cpSync(r,t,{recursive:true,force:true});process.stdout.write(`${L.green(`[${o}]`)} Export successful. Files written to ${t}.\n`);l()})).catch((t=>{process.stdout.write("\n");console.error(t);u()}))}}}))}))}async function runDev(){const t=process.cwd();const r=isSetup(t);if(!r){throw new Error("no setup")}return new Promise(((r,i)=>{const o="npm";const a=["run","next:dev"];const l=makeEnv();const u=re()(o,a,{stdio:"inherit",cwd:Q().join(t,".hyperbook"),env:{...process.env,...l,ADBLOCK:"1",DISABLE_OPENCOLLECTIVE:"1"}});u.on("close",(t=>{if(t!==0){i({command:`${o} ${a.join(" ")}`});return}r()}))}))}var we=i(2081);function getPkgManager(){try{const t=process.env.npm_config_user_agent;if(t){if(t.startsWith("yarn")){return"yarn"}else if(t.startsWith("pnpm")){return"pnpm"}}try{(0,we.execSync)("yarn --version",{stdio:"ignore"});return"yarn"}catch{(0,we.execSync)("pnpm --version",{stdio:"ignore"});return"pnpm"}}catch{return"npm"}}var Se=i(2037);var Ee=i.n(Se);const xe=require("node:events");function indentString(t,r=1,i={}){const{indent:o=" ",includeEmptyLines:a=false}=i;if(typeof t!=="string"){throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``)}if(typeof r!=="number"){throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``)}if(r<0){throw new RangeError(`Expected \`count\` to be at least 0, got \`${r}\``)}if(typeof o!=="string"){throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof o}\``)}if(r===0){return t}const l=a?/^/gm:/^(?!\s*$)/gm;return t.replace(l,o.repeat(r))}function escapeStringRegexp(t){if(typeof t!=="string"){throw new TypeError("Expected a string")}return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Ae=/\s+at.*[(\s](.*)\)?/;const Oe=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;const ke=typeof Se.homedir==="undefined"?"":Se.homedir().replace(/\\/g,"/");function cleanStack(t,{pretty:r=false,basePath:i}={}){const o=i&&new RegExp(`(at | \\()${escapeStringRegexp(i.replace(/\\/g,"/"))}`,"g");if(typeof t!=="string"){return undefined}return t.replace(/\\/g,"/").split("\n").filter((t=>{const r=t.match(Ae);if(r===null||!r[1]){return true}const i=r[1];if(i.includes(".app/Contents/Resources/electron.asar")||i.includes(".app/Contents/Resources/default_app.asar")){return false}return!Oe.test(i)})).filter((t=>t.trim()!=="")).map((t=>{if(o){t=t.replace(o,"$1")}if(r){t=t.replace(Ae,((t,r)=>t.replace(r,r.replace(ke,"~"))))}return t})).join("\n")}const cleanInternalStack=t=>t.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,"");class AggregateError extends Error{#n;name="AggregateError";constructor(t){if(!Array.isArray(t)){throw new TypeError(`Expected input to be an Array, got ${typeof t}`)}t=t.map((t=>{if(t instanceof Error){return t}if(t!==null&&typeof t==="object"){return Object.assign(new Error(t.message),t)}return new Error(t)}));let r=t.map((t=>typeof t.stack==="string"?cleanInternalStack(cleanStack(t.stack)):String(t))).join("\n");r="\n"+indentString(r,4);super(r);this.#n=t}get errors(){return this.#n.slice()}}async function pMap(t,r,{concurrency:i=Number.POSITIVE_INFINITY,stopOnError:o=true}={}){return new Promise(((a,l)=>{if(t[Symbol.iterator]===undefined&&t[Symbol.asyncIterator]===undefined){throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`)}if(typeof r!=="function"){throw new TypeError("Mapper function is required")}if(!((Number.isSafeInteger(i)||i===Number.POSITIVE_INFINITY)&&i>=1)){throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${i}\` (${typeof i})`)}const u=[];const c=[];const h=new Map;let p=false;let d=false;let m=false;let g=0;let y=0;const v=t[Symbol.iterator]===undefined?t[Symbol.asyncIterator]():t[Symbol.iterator]();const reject=t=>{p=true;d=true;l(t)};const next=async()=>{if(d){return}const t=await v.next();const i=y;y++;if(t.done){m=true;if(g===0&&!d){if(!o&&c.length>0){reject(new AggregateError(c));return}d=true;if(!h.size){a(u);return}const t=[];for(const[r,i]of u.entries()){if(h.get(r)===Re){continue}t.push(i)}a(t)}return}g++;(async()=>{try{const o=await t.value;if(d){return}const a=await r(o,i);if(a===Re){h.set(i,a)}u[i]=a;g--;await next()}catch(t){if(o){reject(t)}else{c.push(t);g--;try{await next()}catch(t){reject(t)}}}})()};(async()=>{for(let t=0;t<i;t++){try{await next()}catch(t){reject(t);break}if(m||p){break}}})()}))}const Re=Symbol("skip");function arrify(t){if(t===null||t===undefined){return[]}if(Array.isArray(t)){return t}if(typeof t==="string"){return[t]}if(typeof t[Symbol.iterator]==="function"){return[...t]}return[t]}var Te=i(8174);class AbortError extends Error{constructor(t){super();this.name="AbortError";this.message=t}}const getDOMException=t=>globalThis.DOMException===undefined?new AbortError(t):new DOMException(t);const getAbortedReason=t=>{const r=t.reason===undefined?getDOMException("This operation was aborted."):t.reason;return r instanceof Error?r:getDOMException(r)};async function p_map_pMap(t,r,{concurrency:i=Number.POSITIVE_INFINITY,stopOnError:o=true,signal:a}={}){return new Promise(((l,u)=>{if(t[Symbol.iterator]===undefined&&t[Symbol.asyncIterator]===undefined){throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`)}if(typeof r!=="function"){throw new TypeError("Mapper function is required")}if(!((Number.isSafeInteger(i)||i===Number.POSITIVE_INFINITY)&&i>=1)){throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${i}\` (${typeof i})`)}const c=[];const h=[];const p=new Map;let d=false;let m=false;let g=false;let y=0;let v=0;const b=t[Symbol.iterator]===undefined?t[Symbol.asyncIterator]():t[Symbol.iterator]();const reject=t=>{d=true;m=true;u(t)};if(a){if(a.aborted){reject(getAbortedReason(a))}a.addEventListener("abort",(()=>{reject(getAbortedReason(a))}))}const next=async()=>{if(m){return}const t=await b.next();const i=v;v++;if(t.done){g=true;if(y===0&&!m){if(!o&&h.length>0){reject(new AggregateError(h));return}m=true;if(p.size===0){l(c);return}const t=[];for(const[r,i]of c.entries()){if(p.get(r)===Ce){continue}t.push(i)}l(t)}return}y++;(async()=>{try{const o=await t.value;if(m){return}const a=await r(o,i);if(a===Ce){p.set(i,a)}c[i]=a;y--;await next()}catch(t){if(o){reject(t)}else{h.push(t);y--;try{await next()}catch(t){reject(t)}}}})()};(async()=>{for(let t=0;t<i;t++){try{await next()}catch(t){reject(t);break}if(g||d){break}}})()}))}const Ce=Symbol("skip");async function pFilter(t,r,i){const o=await p_map_pMap(t,((t,i)=>Promise.all([r(t,i),t])),i);return o.filter((t=>Boolean(t[0]))).map((t=>t[1]))}var Pe=i(9117);var Ie=i(2153);var Le=i(3286);var Me=i(7993);function slash(t){const r=/^\\\\\?\\/.test(t);const i=/[^\u0000-\u0080]+/.test(t);if(r||i){return t}return t.replace(/\\/g,"/")}const Ne=require("node:stream");const utilities_toPath=t=>t instanceof URL?(0,ue.fileURLToPath)(t):t;class FilterStream extends Ne.Transform{constructor(t){super({objectMode:true,transform(r,i,o){o(undefined,t(r)?r:undefined)}})}}const isNegativePattern=t=>t[0]==="!";const je={ignore:["**/node_modules","**/flow-typed","**/coverage","**/.git"],absolute:true,dot:true};const De="**/.gitignore";const applyBaseToPattern=(t,r)=>isNegativePattern(t)?"!"+le.posix.join(r,t.slice(1)):le.posix.join(r,t);const parseIgnoreFile=(t,r)=>{const i=slash(le.relative(r,le.dirname(t.filePath)));return t.content.split(/\r?\n/).filter((t=>t&&!t.startsWith("#"))).map((t=>applyBaseToPattern(t,i)))};const toRelativePath=(t,r)=>{r=slash(r);if(le.isAbsolute(t)){if(slash(t).startsWith(r)){return le.relative(r,t)}throw new Error(`Path ${t} is not in cwd ${r}`)}return t};const getIsIgnoredPredicate=(t,r)=>{const i=t.flatMap((t=>parseIgnoreFile(t,r)));const o=Me().add(i);return t=>{t=utilities_toPath(t);t=toRelativePath(t,r);return o.ignores(slash(t))}};const normalizeOptions=(t={})=>({cwd:utilities_toPath(t.cwd)||m.cwd()});const isIgnoredByIgnoreFiles=async(t,r)=>{const{cwd:i}=normalizeOptions(r);const o=await Ie(t,{cwd:i,...je});const a=await Promise.all(o.map((async t=>({filePath:t,content:await ce.promises.readFile(t,"utf8")}))));return getIsIgnoredPredicate(a,i)};const isIgnoredByIgnoreFilesSync=(t,r)=>{const{cwd:i}=normalizeOptions(r);const o=Ie.sync(t,{cwd:i,...je});const a=o.map((t=>({filePath:t,content:ce.readFileSync(t,"utf8")})));return getIsIgnoredPredicate(a,i)};const isGitIgnored=t=>isIgnoredByIgnoreFiles(De,t);const isGitIgnoredSync=t=>isIgnoredByIgnoreFilesSync(De,t);const assertPatternsInput=t=>{if(t.some((t=>typeof t!=="string"))){throw new TypeError("Patterns must be a string or an array of strings")}};const toPatternsArray=t=>{t=[...new Set([t].flat())];assertPatternsInput(t);return t};const checkCwdOption=t=>{if(!t.cwd){return}let r;try{r=ce.statSync(t.cwd)}catch{return}if(!r.isDirectory()){throw new Error("The `cwd` option must be a path to a directory")}};const globby_normalizeOptions=(t={})=>{t={ignore:[],expandDirectories:true,...t,cwd:utilities_toPath(t.cwd)};checkCwdOption(t);return t};const normalizeArguments=t=>async(r,i)=>t(toPatternsArray(r),globby_normalizeOptions(i));const normalizeArgumentsSync=t=>(r,i)=>t(toPatternsArray(r),globby_normalizeOptions(i));const getIgnoreFilesPatterns=t=>{const{ignoreFiles:r,gitignore:i}=t;const o=r?toPatternsArray(r):[];if(i){o.push(De)}return o};const getFilter=async t=>{const r=getIgnoreFilesPatterns(t);return createFilterFunction(r.length>0&&await isIgnoredByIgnoreFiles(r,{cwd:t.cwd}))};const getFilterSync=t=>{const r=getIgnoreFilesPatterns(t);return createFilterFunction(r.length>0&&isIgnoredByIgnoreFilesSync(r,{cwd:t.cwd}))};const createFilterFunction=t=>{const r=new Set;return i=>{const o=i.path||i;const a=le.normalize(o);const l=r.has(a)||t&&t(o);r.add(a);return!l}};const unionFastGlobResults=(t,r)=>t.flat().filter((t=>r(t)));const unionFastGlobStreams=(t,r)=>Pe(t).pipe(new FilterStream((t=>r(t))));const convertNegativePatterns=(t,r)=>{const i=[];while(t.length>0){const o=t.findIndex((t=>isNegativePattern(t)));if(o===-1){i.push({patterns:t,options:r});break}const a=t[o].slice(1);for(const t of i){t.options.ignore.push(a)}if(o!==0){i.push({patterns:t.slice(0,o),options:{...r,ignore:[...r.ignore,a]}})}t=t.slice(o+1)}return i};const getDirGlobOptions=(t,r)=>({...r?{cwd:r}:{},...Array.isArray(t)?{files:t}:t});const generateTasks=async(t,r)=>{const i=convertNegativePatterns(t,r);const{cwd:o,expandDirectories:a}=r;if(!a){return i}const l=getDirGlobOptions(a,o);const u=o?{cwd:o}:undefined;return Promise.all(i.map((async t=>{let{patterns:r,options:i}=t;[r,i.ignore]=await Promise.all([Le(r,l),Le(i.ignore,u)]);return{patterns:r,options:i}})))};const generateTasksSync=(t,r)=>{const i=convertNegativePatterns(t,r);const{cwd:o,expandDirectories:a}=r;if(!a){return i}const l=getDirGlobOptions(a,o);const u=o?{cwd:o}:undefined;return i.map((t=>{let{patterns:r,options:i}=t;r=Le.sync(r,l);i.ignore=Le.sync(i.ignore,u);return{patterns:r,options:i}}))};const Fe=normalizeArguments((async(t,r)=>{const[i,o]=await Promise.all([generateTasks(t,r),getFilter(r)]);const a=await Promise.all(i.map((t=>Ie(t.patterns,t.options))));return unionFastGlobResults(a,o)}));const $e=normalizeArgumentsSync(((t,r)=>{const i=generateTasksSync(t,r);const o=getFilterSync(r);const a=i.map((t=>Ie.sync(t.patterns,t.options)));return unionFastGlobResults(a,o)}));const Be=normalizeArgumentsSync(((t,r)=>{const i=generateTasksSync(t,r);const o=getFilterSync(r);const a=i.map((t=>Ie.stream(t.patterns,t.options)));return unionFastGlobStreams(a,o)}));const He=normalizeArgumentsSync(((t,r)=>t.some((t=>Ie.isDynamicPattern(t,r)))));const We=normalizeArguments(generateTasks);const Ge=normalizeArgumentsSync(generateTasksSync);var Ue=i(7971);var Ve=i(3134);class CpyError extends Ve{constructor(t,r){super(t,r);Object.assign(this,r);this.name="CpyError"}}const qe=["^npm-debug\\.log$","^\\..*\\.swp$","^\\.DS_Store$","^\\.AppleDouble$","^\\.LSOverride$","^Icon\\r$","^\\._.*","^\\.Spotlight-V100(?:$|\\/)","\\.Trashes","^__MACOSX$","~$","^Thumbs\\.db$","^ehthumbs\\.db$","^Desktop\\.ini$","@eaDir$"];const ze=new RegExp(qe.join("|"));function isJunk(t){return ze.test(t)}function isNotJunk(t){return!isJunk(t)}class GlobPattern{constructor(t,r,i){this.path=t;this.originalPath=t;this.destination=r;this.options=i;this.isDirectory=false;if(!He(t)&&ce.existsSync(t)&&ce.lstatSync(t).isDirectory()){this.path=[t,"**"].join("/");this.isDirectory=true}}get name(){return le.basename(this.originalPath)}get normalizedPath(){const t=this.originalPath.split("/");const r=t.findIndex((t=>t?He(t):false));const i=t.slice(0,r).join("/");if(i){return le.isAbsolute(i)?i:le.join(this.options.cwd,i)}return this.destination}hasMagic(){return He(this.options.flat?this.path:this.originalPath)}getMatches(){let t=$e(this.path,{...this.options,dot:true,absolute:true,onlyFiles:true});if(this.options.ignoreJunk){t=t.filter((t=>isNotJunk(le.basename(t))))}return t}}const Ye=(g.cpus().length||1)*2;const Ke={ignoreJunk:true,flat:false,cwd:m.cwd()};class Entry{constructor(t,r,i){this.path=t.split("/").join(le.sep);this.relativePath=r.split("/").join(le.sep);this.pattern=i;Object.freeze(this)}get name(){return le.basename(this.path)}get nameWithoutExtension(){return le.basename(this.path,le.extname(this.path))}get extension(){return le.extname(this.path).slice(1)}}const expandPatternsWithBraceExpansion=t=>t.flatMap((t=>Ue.braces(t,{expand:true,nodupes:true})));const preprocessDestinationPath=({entry:t,destination:r,options:i})=>{if(t.pattern.hasMagic()){if(i.flat){if(le.isAbsolute(r)){return le.join(r,t.name)}return le.join(i.cwd,r,t.name)}return le.join(r,le.relative(t.pattern.normalizedPath,t.path))}if(le.isAbsolute(r)){return le.join(r,t.name)}if(t.pattern.isDirectory&&le.relative(i.cwd,t.path).startsWith("..")){return le.join(i.cwd,r,le.basename(t.pattern.originalPath),le.relative(t.pattern.originalPath,t.path))}if(!t.pattern.isDirectory&&t.path===t.relativePath){return le.join(i.cwd,r,le.basename(t.pattern.originalPath),le.relative(t.pattern.originalPath,t.path))}if(!t.pattern.isDirectory&&i.flat){return le.join(i.cwd,r,le.basename(t.pattern.originalPath))}return le.join(i.cwd,r,le.relative(i.cwd,t.path))};const renameFile=(t,r)=>{const i=le.basename(t,le.extname(t));const o=le.extname(t);const a=le.dirname(t);if(typeof r==="string"){return le.join(a,r)}if(typeof r==="function"){return le.join(a,`${r(i)}${o}`)}return t};function cpy(t,r,{concurrency:i=Ye,...o}={}){const a=new Map;const l=new xe;o={...Ke,...o};const u=(async()=>{let u=[];let c=0;let h=0;let p=expandPatternsWithBraceExpansion(arrify(t)).map((t=>t.replace(/\\/g,"/")));const d=p.filter((t=>!t.startsWith("!")));const m=p.filter((t=>t.startsWith("!")));if(d.length===0||!r){throw new CpyError("`source` and `destination` required")}p=p.map((t=>new GlobPattern(t,r,{...o,ignore:m})));for(const t of p){let r=[];try{r=t.getMatches()}catch(r){throw new CpyError(`Cannot glob \`${t.originalPath}\`: ${r.message}`,r)}if(r.length===0&&!He(t.originalPath)&&!He(m)){throw new CpyError(`Cannot copy \`${t.originalPath}\`: the file doesn't exist`)}u=[...u,...r.map((r=>new Entry(r,le.relative(o.cwd,r),t)))]}if(o.filter!==undefined){u=await pFilter(u,o.filter,{concurrency:1024})}if(u.length===0){l.emit("progress",{totalFiles:0,percent:1,completedFiles:0,completedSize:0})}const fileProgressHandler=t=>{const r=a.get(t.sourcePath)||{writtenBytes:0,percent:0};if(r.writtenBytes!==t.writtenBytes||r.percent!==t.percent){h-=r.writtenBytes;h+=t.writtenBytes;if(t.percent===1&&r.percent!==1){c++}a.set(t.sourcePath,{writtenBytes:t.writtenBytes,percent:t.percent});l.emit("progress",{totalFiles:u.length,percent:c/u.length,completedFiles:c,completedSize:h})}};return pMap(u,(async t=>{const i=renameFile(preprocessDestinationPath({entry:t,destination:r,options:o}),o.rename);try{await Te(t.path,i,o).on("progress",fileProgressHandler)}catch(r){throw new CpyError(`Cannot copy from \`${t.relativePath}\` to \`${i}\`: ${r.message}`,r)}return i}),{concurrency:i})})();u.on=(...t)=>{l.on(...t);return u};return u}var Qe=i(5713);var Ze=i.n(Qe);function isFolderEmpty(t,r){const i=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log"];const o=X().readdirSync(t).filter((t=>!i.includes(t))).filter((t=>!/\.iml$/.test(t)));if(o.length>0){console.log(`The directory ${L.green(r)} contains files that could conflict:`);console.log();for(const r of o){try{const i=X().lstatSync(Q().join(t,r));if(i.isDirectory()){console.log(` ${L.blue(r)}/`)}else{console.log(` ${r}`)}}catch{console.log(` ${r}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}async function isWriteable(t){try{await X().promises.access(t,(X().constants||X()).W_OK);return true}catch(t){return false}}function isInGitRepository(){try{(0,we.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(t){}return false}function isInMercurialRepository(){try{(0,we.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(t){}return false}function tryGitInit(t){let r=false;try{(0,we.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,we.execSync)("git init",{stdio:"ignore"});r=true;(0,we.execSync)("git checkout -b main",{stdio:"ignore"});(0,we.execSync)("git add -A",{stdio:"ignore"});(0,we.execSync)('git commit -m "Initial commit from Hyperbook"',{stdio:"ignore"});return true}catch(i){if(r){try{_e().sync(Q().join(t,".git"))}catch(t){}}return false}}function install(t,r,{packageManager:i,isOnline:o,devDependencies:a}){const l=[];const u=[];return new Promise(((c,h)=>{let p;let d=i;const m=i==="yarn";if(r&&r.length){if(m){p=["add","--exact"];if(!o)p.push("--offline");p.push("--cwd",t);if(a)p.push("--dev");p.push(...r)}else{p=["install","--save-exact"];p.push(a?"--save-dev":"--save");p.push(...r)}}else{p=["install"];if(!o){console.log(L.yellow("You appear to be offline."));if(m){console.log(L.yellow("Falling back to the local Yarn cache."));console.log();p.push("--offline")}else{console.log()}}}if(m){p.push(...u)}else{p.push(...l)}const g=re()(d,p,{stdio:"inherit",cwd:t,env:{...process.env,ADBLOCK:"1",DISABLE_OPENCOLLECTIVE:"1"}});g.on("close",(t=>{if(t!==0){h({command:`${d} ${p.join(" ")}`});return}c()}))}))}const Xe=require("dns");var Je=i.n(Xe);var et=i(7310);var tt=i.n(et);function getProxy(){if(process.env.https_proxy){return process.env.https_proxy}try{const t=(0,we.execSync)("npm config get https-proxy").toString().trim();return t!=="null"?t:undefined}catch(t){return}}function getOnline(){return new Promise((t=>{Je().lookup("registry.yarnpkg.com",(r=>{if(!r){return t(true)}const i=getProxy();if(!i){return t(false)}const{hostname:o}=tt().parse(i);if(!o){return t(false)}Je().lookup(o,(r=>{t(r==null)}))}))}))}async function makeSymlink(t,r){const i=Ee().platform()=="win32"?"junction":null;return new Promise(((o,a)=>{X().symlink(t,r,i,(t=>{if(t){a()}else{o()}}))}))}async function runSetupProject(t,r){const o=getProjectName(t);console.log(`${L.blue(`[${o}]`)} Setup Project.`);const a=Q().join(t.src,".hyperbook");const l=Q().join((r===null||r===void 0?void 0:r.src)||"",".hyperbook");_e().sync(a);const u=i.ab+"templates";await makeDir(a);await cpy("default/.hyperbook/**",a,{cwd:i.ab+"templates",followSymbolicLinks:false});if(process.env.HYPERBOOK_LOCAL_DEV){const t=await oe().readFile(Q().join(__dirname,"..","..","..","platforms","web","package.json")).then((t=>JSON.parse(t.toString())));await oe().writeFile(Q().join(a,"package.json"),JSON.stringify({...t,name:`@docs/`+o.toLowerCase().replace(" ","-"),scripts:{"next:dev":"next-hyperbook-watch","next:build":"next build && next export"}},null,2))}else{if(!r){const t=await getOnline();await install(l,null,{packageManager:"npm",isOnline:t})}else{await makeSymlink(Q().join(l,"node_modules"),Q().join(a,"node_modules"))}}if(t.type==="library"){await makeSymlink(Q().join(t.src,"hyperlibrary.json"),Q().join(a,"hyperlibrary.json"));for(const i of t.projects){await runSetupProject(i,r)}return}await makeSymlink(Q().join(t.src,"archives"),Q().join(a,"archives"));await makeSymlink(Q().join(t.src,"book"),Q().join(a,"book"));await makeSymlink(Q().join(t.src,"glossary"),Q().join(a,"glossary"));await makeSymlink(Q().join(t.src,"public"),Q().join(a,"public"));await makeSymlink(Q().join(t.src,"hyperbook.json"),Q().join(a,"hyperbook.json"))}async function runNew({programName:t,bookPath:r}){if(typeof r==="string"){r=r.trim()}if(!r){const t=await Ze()({type:"text",name:"path",message:"What is your book named?",initial:"my-book"});if(typeof t.path==="string"){r=t.path.trim()}}if(!r){console.log();console.log("Please specify the book directory:");console.log(` ${L.cyan(t)} ${L.green("<book-directory>")}`);console.log();console.log("For example:");console.log(` ${L.cyan(t)} ${L.green("my-new-book")}`);console.log();console.log(`Run ${L.cyan(`${t} --help`)} to see all options.`);process.exit(1)}const o=Q().resolve(r);if(!await isWriteable(Q().dirname(o))){console.error("The book path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const a=Q().basename(o);await makeDir(o);if(!isFolderEmpty(o,a)){process.exit(1)}const l=process.cwd();console.log(`Creating a new hyperbook in ${L.green(o)}.`);console.log();process.chdir(o);const{description:u}=await Ze()({type:"text",name:"description",message:"What is your book about?",initial:""});const{author:c}=await Ze()({type:"text",name:"author",message:"Who is the author of the book?",initial:""});const{authorUrl:h}=await Ze()({type:"text",name:"authorUrl",message:"What is the link to the authors homepage?",initial:""});let{license:p}=await Ze()({type:"select",name:"license",message:"Pick a license for your book!",choices:[{title:"Creative Commons Zero (CC0)",value:"cc0"},{title:"Creative Commons Attribution (CC BY)",value:"cc-by"},{title:"Creative Commons Attribution-ShareAlike (CC BY-SA)",value:"cc-by-sa"},{title:"Creative Commons Attribution-NoDerivs (CC BY-ND)",value:"cc-by-nd"},{title:"Creative Commons Attribution-NonCommercial (CC BY-NC)",value:"cc-by-nc"},{title:"Creative Commons Attribution-NonCommercial-ShareAlike (CC BY-NC-SA)",value:"cc-by-nc-sa"},{title:"Creative Commons Attribution-NonCommercial-NoDervis (CC BY-NC-ND)",value:"cc-by-nc-nd"},{title:"Custom",value:"custom"}]});if(p==="custom"){const t=await Ze()({type:"text",name:"license",message:"Which custom license you want to use?"});p=t.license}const{language:d}=await Ze()({type:"text",name:"language",message:"In which language is your book written? Provide a short code, e.g.: en or de",initial:"en"});const m={name:a,version:"0.0.0",description:u,license:p,author:{name:c,url:h},language:d};X().writeFileSync(Q().join(o,"hyperbook.json"),JSON.stringify(m,null,2)+Ee().EOL);console.log();const g=i.ab+"templates";await cpy("default/**",o,{cwd:i.ab+"templates",rename:t=>{switch(t){case"gitignore":{return".".concat(t)}case"README-template.md":{return"README.md"}default:{return t}}}});await runSetupProject({type:"book",name:a,src:o});if(tryGitInit(o)){console.log("Initialized a git repository.");console.log()}let y;if(Q().join(l,a)===r){y=a}else{y=r}console.log(`${L.green("Success!")} Created ${a} at ${r}`);console.log("Inside that directory, you can run several commands:");console.log();console.log(L.cyan(` hyperbook dev`));console.log(" Starts the development server.");console.log();console.log(L.cyan(` hyperbook build`));console.log(" Builds the book for production.");console.log();console.log("We suggest that you begin by typing:");console.log();console.log(L.cyan(" cd"),y);console.log(` ${L.cyan(`hyperbook dev`)}`);console.log()}const rt=JSON.parse('{"name":"hyperbook","version":"0.9.0","author":"Mike Barkmin","homepage":"https://github.com/openpatch/hyperbook#readme","license":"MIT","bin":{"hyperbook":"./dist/index.js"},"files":["dist"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/openpatch/hyperbook.git","directory":"packages/hyperbook"},"bugs":{"url":"https://github.com/openpatch/hyperbook/issues"},"engines":{"node":">=12.22.0"},"scripts":{"version":"pnpm build","lint":"tsc --noEmit","dev":"ncc build ./index.ts -w -o dist/","build":"rimraf dist && ncc build ./index.ts -o ./dist/ -e \\"hyperbook-simple-template\\" --minify --no-cache --no-source-map-register && node ./postbuild.mjs"},"devDependencies":{"@pnpm/exportable-manifest":"4.0.3","@types/archiver":"5.3.1","@types/async-retry":"1.4.5","@types/cross-spawn":"6.0.2","@types/prompts":"2.4.1","@types/rimraf":"3.0.2","@types/tar":"6.1.3","@vercel/ncc":"0.34.0","archiver":"5.3.1","async-retry":"1.3.3","chalk":"5.1.2","commander":"9.4.1","cpy":"9.0.1","cross-spawn":"7.0.3","got":"12.5.3","prompts":"2.4.2","rimraf":"3.0.2","tar":"6.1.12","update-check":"1.5.4","@platforms/web":"workspace:*"},"dependencies":{"@hyperbook/fs":"workspace:*","@hyperbook/types":"workspace:*"}}');const nt=new G;nt.name(rt.name).version(rt.version).hook("preAction",(async()=>{await notifyUpdate()}));nt.command("new").description("create a new hyperbook").arguments("<book-directory>").usage(`${L.green("<book-directory>")}`).action((async t=>{await runNew({programName:nt.name(),bookPath:t}).catch((()=>process.exit(1)))}));nt.command("dev").description("start the development server for a hyperbook").action((async()=>{await runDev()}));nt.command("setup").description("downloads the latest version of the template of a hyperbook").action((async()=>{const t=await readProject(process.cwd()).catch((()=>{process.exit(1)}));await runSetupProject(t).catch((()=>{process.exit(1)}))}));nt.command("build").description("build a hyperbook").action((async()=>{const t=await readProject(process.cwd()).catch((()=>{process.exit(1)}));await runBuildProject(t,t).catch((()=>{process.exit(1)}))}));nt.command("archive").description("create archives from archives folder").action((async()=>{await runArchive(process.cwd()).catch((()=>process.exit(1)))}));nt.parseAsync(process.argv);const it=Y()(rt).catch((()=>null));async function notifyUpdate(){try{const t=await it;if(t===null||t===void 0?void 0:t.latest){const t=getPkgManager();console.log();console.log(L.yellow.bold("A new version of `hyperbook` is available!"));console.log("You can update by running: "+L.cyan(t==="yarn"?"yarn global add hyperbook":`${t} install --global hyperbook`));console.log()}process.exit()}catch{}}},9491:t=>{"use strict";t.exports=require("assert")},4300:t=>{"use strict";t.exports=require("buffer")},2081:t=>{"use strict";t.exports=require("child_process")},2057:t=>{"use strict";t.exports=require("constants")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},7282:t=>{"use strict";t.exports=require("process")},4521:t=>{"use strict";t.exports=require("readline")},2781:t=>{"use strict";t.exports=require("stream")},1576:t=>{"use strict";t.exports=require("string_decoder")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},9796:t=>{"use strict";t.exports=require("zlib")},345:(t,r,i)=>{const{Argument:o}=i(4079);const{Command:a}=i(6505);const{CommanderError:l,InvalidArgumentError:u}=i(9027);const{Help:c}=i(9164);const{Option:h}=i(5205);r=t.exports=new a;r.program=r;r.Argument=o;r.Command=a;r.CommanderError=l;r.Help=c;r.InvalidArgumentError=u;r.InvalidOptionArgumentError=u;r.Option=h},4079:(t,r,i)=>{const{InvalidArgumentError:o}=i(9027);class Argument{constructor(t,r){this.description=r||"";this.variadic=false;this.parseArg=undefined;this.defaultValue=undefined;this.defaultValueDescription=undefined;this.argChoices=undefined;switch(t[0]){case"<":this.required=true;this._name=t.slice(1,-1);break;case"[":this.required=false;this._name=t.slice(1,-1);break;default:this.required=true;this._name=t;break}if(this._name.length>3&&this._name.slice(-3)==="..."){this.variadic=true;this._name=this._name.slice(0,-3)}}name(){return this._name}_concatValue(t,r){if(r===this.defaultValue||!Array.isArray(r)){return[t]}return r.concat(t)}default(t,r){this.defaultValue=t;this.defaultValueDescription=r;return this}argParser(t){this.parseArg=t;return this}choices(t){this.argChoices=t.slice();this.parseArg=(t,r)=>{if(!this.argChoices.includes(t)){throw new o(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(t,r)}return t};return this}argRequired(){this.required=true;return this}argOptional(){this.required=false;return this}}function humanReadableArgName(t){const r=t.name()+(t.variadic===true?"...":"");return t.required?"<"+r+">":"["+r+"]"}r.Argument=Argument;r.humanReadableArgName=humanReadableArgName},6505:(t,r,i)=>{const o=i(2361).EventEmitter;const a=i(2081);const l=i(1017);const u=i(7147);const c=i(7282);const{Argument:h,humanReadableArgName:p}=i(4079);const{CommanderError:d}=i(9027);const{Help:m}=i(9164);const{Option:g,splitOptionFlags:y,DualOptions:v}=i(5205);const{suggestSimilar:b}=i(211);class Command extends o{constructor(t){super();this.commands=[];this.options=[];this.parent=null;this._allowUnknownOption=false;this._allowExcessArguments=true;this._args=[];this.args=[];this.rawArgs=[];this.processedArgs=[];this._scriptPath=null;this._name=t||"";this._optionValues={};this._optionValueSources={};this._storeOptionsAsProperties=false;this._actionHandler=null;this._executableHandler=false;this._executableFile=null;this._executableDir=null;this._defaultCommandName=null;this._exitCallback=null;this._aliases=[];this._combineFlagAndOptionalValue=true;this._description="";this._summary="";this._argsDescription=undefined;this._enablePositionalOptions=false;this._passThroughOptions=false;this._lifeCycleHooks={};this._showHelpAfterError=false;this._showSuggestionAfterError=true;this._outputConfiguration={writeOut:t=>c.stdout.write(t),writeErr:t=>c.stderr.write(t),getOutHelpWidth:()=>c.stdout.isTTY?c.stdout.columns:undefined,getErrHelpWidth:()=>c.stderr.isTTY?c.stderr.columns:undefined,outputError:(t,r)=>r(t)};this._hidden=false;this._hasHelpOption=true;this._helpFlags="-h, --help";this._helpDescription="display help for command";this._helpShortFlag="-h";this._helpLongFlag="--help";this._addImplicitHelpCommand=undefined;this._helpCommandName="help";this._helpCommandnameAndArgs="help [command]";this._helpCommandDescription="display help for command";this._helpConfiguration={}}copyInheritedSettings(t){this._outputConfiguration=t._outputConfiguration;this._hasHelpOption=t._hasHelpOption;this._helpFlags=t._helpFlags;this._helpDescription=t._helpDescription;this._helpShortFlag=t._helpShortFlag;this._helpLongFlag=t._helpLongFlag;this._helpCommandName=t._helpCommandName;this._helpCommandnameAndArgs=t._helpCommandnameAndArgs;this._helpCommandDescription=t._helpCommandDescription;this._helpConfiguration=t._helpConfiguration;this._exitCallback=t._exitCallback;this._storeOptionsAsProperties=t._storeOptionsAsProperties;this._combineFlagAndOptionalValue=t._combineFlagAndOptionalValue;this._allowExcessArguments=t._allowExcessArguments;this._enablePositionalOptions=t._enablePositionalOptions;this._showHelpAfterError=t._showHelpAfterError;this._showSuggestionAfterError=t._showSuggestionAfterError;return this}command(t,r,i){let o=r;let a=i;if(typeof o==="object"&&o!==null){a=o;o=null}a=a||{};const[,l,u]=t.match(/([^ ]+) *(.*)/);const c=this.createCommand(l);if(o){c.description(o);c._executableHandler=true}if(a.isDefault)this._defaultCommandName=c._name;c._hidden=!!(a.noHelp||a.hidden);c._executableFile=a.executableFile||null;if(u)c.arguments(u);this.commands.push(c);c.parent=this;c.copyInheritedSettings(this);if(o)return this;return c}createCommand(t){return new Command(t)}createHelp(){return Object.assign(new m,this.configureHelp())}configureHelp(t){if(t===undefined)return this._helpConfiguration;this._helpConfiguration=t;return this}configureOutput(t){if(t===undefined)return this._outputConfiguration;Object.assign(this._outputConfiguration,t);return this}showHelpAfterError(t=true){if(typeof t!=="string")t=!!t;this._showHelpAfterError=t;return this}showSuggestionAfterError(t=true){this._showSuggestionAfterError=!!t;return this}addCommand(t,r){if(!t._name){throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`)}r=r||{};if(r.isDefault)this._defaultCommandName=t._name;if(r.noHelp||r.hidden)t._hidden=true;this.commands.push(t);t.parent=this;return this}createArgument(t,r){return new h(t,r)}argument(t,r,i,o){const a=this.createArgument(t,r);if(typeof i==="function"){a.default(o).argParser(i)}else{a.default(i)}this.addArgument(a);return this}arguments(t){t.split(/ +/).forEach((t=>{this.argument(t)}));return this}addArgument(t){const r=this._args.slice(-1)[0];if(r&&r.variadic){throw new Error(`only the last argument can be variadic '${r.name()}'`)}if(t.required&&t.defaultValue!==undefined&&t.parseArg===undefined){throw new Error(`a default value for a required argument is never used: '${t.name()}'`)}this._args.push(t);return this}addHelpCommand(t,r){if(t===false){this._addImplicitHelpCommand=false}else{this._addImplicitHelpCommand=true;if(typeof t==="string"){this._helpCommandName=t.split(" ")[0];this._helpCommandnameAndArgs=t}this._helpCommandDescription=r||this._helpCommandDescription}return this}_hasImplicitHelpCommand(){if(this._addImplicitHelpCommand===undefined){return this.commands.length&&!this._actionHandler&&!this._findCommand("help")}return this._addImplicitHelpCommand}hook(t,r){const i=["preSubcommand","preAction","postAction"];if(!i.includes(t)){throw new Error(`Unexpected value for event passed to hook : '${t}'.\nExpecting one of '${i.join("', '")}'`)}if(this._lifeCycleHooks[t]){this._lifeCycleHooks[t].push(r)}else{this._lifeCycleHooks[t]=[r]}return this}exitOverride(t){if(t){this._exitCallback=t}else{this._exitCallback=t=>{if(t.code!=="commander.executeSubCommandAsync"){throw t}else{}}}return this}_exit(t,r,i){if(this._exitCallback){this._exitCallback(new d(t,r,i))}c.exit(t)}action(t){const listener=r=>{const i=this._args.length;const o=r.slice(0,i);if(this._storeOptionsAsProperties){o[i]=this}else{o[i]=this.opts()}o.push(this);return t.apply(this,o)};this._actionHandler=listener;return this}createOption(t,r){return new g(t,r)}addOption(t){const r=t.name();const i=t.attributeName();if(t.negate){const r=t.long.replace(/^--no-/,"--");if(!this._findOption(r)){this.setOptionValueWithSource(i,t.defaultValue===undefined?true:t.defaultValue,"default")}}else if(t.defaultValue!==undefined){this.setOptionValueWithSource(i,t.defaultValue,"default")}this.options.push(t);const handleOptionValue=(r,o,a)=>{if(r==null&&t.presetArg!==undefined){r=t.presetArg}const l=this.getOptionValue(i);if(r!==null&&t.parseArg){try{r=t.parseArg(r,l)}catch(t){if(t.code==="commander.invalidArgument"){const r=`${o} ${t.message}`;this.error(r,{exitCode:t.exitCode,code:t.code})}throw t}}else if(r!==null&&t.variadic){r=t._concatValue(r,l)}if(r==null){if(t.negate){r=false}else if(t.isBoolean()||t.optional){r=true}else{r=""}}this.setOptionValueWithSource(i,r,a)};this.on("option:"+r,(r=>{const i=`error: option '${t.flags}' argument '${r}' is invalid.`;handleOptionValue(r,i,"cli")}));if(t.envVar){this.on("optionEnv:"+r,(r=>{const i=`error: option '${t.flags}' value '${r}' from env '${t.envVar}' is invalid.`;handleOptionValue(r,i,"env")}))}return this}_optionEx(t,r,i,o,a){if(typeof r==="object"&&r instanceof g){throw new Error("To add an Option object use addOption() instead of option() or requiredOption()")}const l=this.createOption(r,i);l.makeOptionMandatory(!!t.mandatory);if(typeof o==="function"){l.default(a).argParser(o)}else if(o instanceof RegExp){const t=o;o=(r,i)=>{const o=t.exec(r);return o?o[0]:i};l.default(a).argParser(o)}else{l.default(o)}return this.addOption(l)}option(t,r,i,o){return this._optionEx({},t,r,i,o)}requiredOption(t,r,i,o){return this._optionEx({mandatory:true},t,r,i,o)}combineFlagAndOptionalValue(t=true){this._combineFlagAndOptionalValue=!!t;return this}allowUnknownOption(t=true){this._allowUnknownOption=!!t;return this}allowExcessArguments(t=true){this._allowExcessArguments=!!t;return this}enablePositionalOptions(t=true){this._enablePositionalOptions=!!t;return this}passThroughOptions(t=true){this._passThroughOptions=!!t;if(!!this.parent&&t&&!this.parent._enablePositionalOptions){throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)")}return this}storeOptionsAsProperties(t=true){this._storeOptionsAsProperties=!!t;if(this.options.length){throw new Error("call .storeOptionsAsProperties() before adding options")}return this}getOptionValue(t){if(this._storeOptionsAsProperties){return this[t]}return this._optionValues[t]}setOptionValue(t,r){return this.setOptionValueWithSource(t,r,undefined)}setOptionValueWithSource(t,r,i){if(this._storeOptionsAsProperties){this[t]=r}else{this._optionValues[t]=r}this._optionValueSources[t]=i;return this}getOptionValueSource(t){return this._optionValueSources[t]}_prepareUserArgs(t,r){if(t!==undefined&&!Array.isArray(t)){throw new Error("first parameter to parse must be array or undefined")}r=r||{};if(t===undefined){t=c.argv;if(c.versions&&c.versions.electron){r.from="electron"}}this.rawArgs=t.slice();let i;switch(r.from){case undefined:case"node":this._scriptPath=t[1];i=t.slice(2);break;case"electron":if(c.defaultApp){this._scriptPath=t[1];i=t.slice(2)}else{i=t.slice(1)}break;case"user":i=t.slice(0);break;default:throw new Error(`unexpected parse option { from: '${r.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);this._name=this._name||"program";return i}parse(t,r){const i=this._prepareUserArgs(t,r);this._parseCommand([],i);return this}async parseAsync(t,r){const i=this._prepareUserArgs(t,r);await this._parseCommand([],i);return this}_executeSubCommand(t,r){r=r.slice();let i=false;const o=[".js",".ts",".tsx",".mjs",".cjs"];function findFile(t,r){const i=l.resolve(t,r);if(u.existsSync(i))return i;if(o.includes(l.extname(r)))return undefined;const a=o.find((t=>u.existsSync(`${i}${t}`)));if(a)return`${i}${a}`;return undefined}this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();let h=t._executableFile||`${this._name}-${t._name}`;let p=this._executableDir||"";if(this._scriptPath){let t;try{t=u.realpathSync(this._scriptPath)}catch(r){t=this._scriptPath}p=l.resolve(l.dirname(t),p)}if(p){let r=findFile(p,h);if(!r&&!t._executableFile&&this._scriptPath){const i=l.basename(this._scriptPath,l.extname(this._scriptPath));if(i!==this._name){r=findFile(p,`${i}-${t._name}`)}}h=r||h}i=o.includes(l.extname(h));let m;if(c.platform!=="win32"){if(i){r.unshift(h);r=incrementNodeInspectorPort(c.execArgv).concat(r);m=a.spawn(c.argv[0],r,{stdio:"inherit"})}else{m=a.spawn(h,r,{stdio:"inherit"})}}else{r.unshift(h);r=incrementNodeInspectorPort(c.execArgv).concat(r);m=a.spawn(c.execPath,r,{stdio:"inherit"})}if(!m.killed){const t=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];t.forEach((t=>{c.on(t,(()=>{if(m.killed===false&&m.exitCode===null){m.kill(t)}}))}))}const g=this._exitCallback;if(!g){m.on("close",c.exit.bind(c))}else{m.on("close",(()=>{g(new d(c.exitCode||0,"commander.executeSubCommandAsync","(close)"))}))}m.on("error",(r=>{if(r.code==="ENOENT"){const r=p?`searched for local subcommand relative to directory '${p}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory";const i=`'${h}' does not exist\n - if '${t._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${r}`;throw new Error(i)}else if(r.code==="EACCES"){throw new Error(`'${h}' not executable`)}if(!g){c.exit(1)}else{const t=new d(1,"commander.executeSubCommandAsync","(error)");t.nestedError=r;g(t)}}));this.runningCommand=m}_dispatchSubcommand(t,r,i){const o=this._findCommand(t);if(!o)this.help({error:true});let a;a=this._chainOrCallSubCommandHook(a,o,"preSubcommand");a=this._chainOrCall(a,(()=>{if(o._executableHandler){this._executeSubCommand(o,r.concat(i))}else{return o._parseCommand(r,i)}}));return a}_checkNumberOfArguments(){this._args.forEach(((t,r)=>{if(t.required&&this.args[r]==null){this.missingArgument(t.name())}}));if(this._args.length>0&&this._args[this._args.length-1].variadic){return}if(this.args.length>this._args.length){this._excessArguments(this.args)}}_processArguments(){const myParseArg=(t,r,i)=>{let o=r;if(r!==null&&t.parseArg){try{o=t.parseArg(r,i)}catch(i){if(i.code==="commander.invalidArgument"){const o=`error: command-argument value '${r}' is invalid for argument '${t.name()}'. ${i.message}`;this.error(o,{exitCode:i.exitCode,code:i.code})}throw i}}return o};this._checkNumberOfArguments();const t=[];this._args.forEach(((r,i)=>{let o=r.defaultValue;if(r.variadic){if(i<this.args.length){o=this.args.slice(i);if(r.parseArg){o=o.reduce(((t,i)=>myParseArg(r,i,t)),r.defaultValue)}}else if(o===undefined){o=[]}}else if(i<this.args.length){o=this.args[i];if(r.parseArg){o=myParseArg(r,o,r.defaultValue)}}t[i]=o}));this.processedArgs=t}_chainOrCall(t,r){if(t&&t.then&&typeof t.then==="function"){return t.then((()=>r()))}return r()}_chainOrCallHooks(t,r){let i=t;const o=[];getCommandAndParents(this).reverse().filter((t=>t._lifeCycleHooks[r]!==undefined)).forEach((t=>{t._lifeCycleHooks[r].forEach((r=>{o.push({hookedCommand:t,callback:r})}))}));if(r==="postAction"){o.reverse()}o.forEach((t=>{i=this._chainOrCall(i,(()=>t.callback(t.hookedCommand,this)))}));return i}_chainOrCallSubCommandHook(t,r,i){let o=t;if(this._lifeCycleHooks[i]!==undefined){this._lifeCycleHooks[i].forEach((t=>{o=this._chainOrCall(o,(()=>t(this,r)))}))}return o}_parseCommand(t,r){const i=this.parseOptions(r);this._parseOptionsEnv();this._parseOptionsImplied();t=t.concat(i.operands);r=i.unknown;this.args=t.concat(r);if(t&&this._findCommand(t[0])){return this._dispatchSubcommand(t[0],t.slice(1),r)}if(this._hasImplicitHelpCommand()&&t[0]===this._helpCommandName){if(t.length===1){this.help()}return this._dispatchSubcommand(t[1],[],[this._helpLongFlag])}if(this._defaultCommandName){outputHelpIfRequested(this,r);return this._dispatchSubcommand(this._defaultCommandName,t,r)}if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName){this.help({error:true})}outputHelpIfRequested(this,i.unknown);this._checkForMissingMandatoryOptions();this._checkForConflictingOptions();const checkForUnknownOptions=()=>{if(i.unknown.length>0){this.unknownOption(i.unknown[0])}};const o=`command:${this.name()}`;if(this._actionHandler){checkForUnknownOptions();this._processArguments();let i;i=this._chainOrCallHooks(i,"preAction");i=this._chainOrCall(i,(()=>this._actionHandler(this.processedArgs)));if(this.parent){i=this._chainOrCall(i,(()=>{this.parent.emit(o,t,r)}))}i=this._chainOrCallHooks(i,"postAction");return i}if(this.parent&&this.parent.listenerCount(o)){checkForUnknownOptions();this._processArguments();this.parent.emit(o,t,r)}else if(t.length){if(this._findCommand("*")){return this._dispatchSubcommand("*",t,r)}if(this.listenerCount("command:*")){this.emit("command:*",t,r)}else if(this.commands.length){this.unknownCommand()}else{checkForUnknownOptions();this._processArguments()}}else if(this.commands.length){checkForUnknownOptions();this.help({error:true})}else{checkForUnknownOptions();this._processArguments()}}_findCommand(t){if(!t)return undefined;return this.commands.find((r=>r._name===t||r._aliases.includes(t)))}_findOption(t){return this.options.find((r=>r.is(t)))}_checkForMissingMandatoryOptions(){for(let t=this;t;t=t.parent){t.options.forEach((r=>{if(r.mandatory&&t.getOptionValue(r.attributeName())===undefined){t.missingMandatoryOptionValue(r)}}))}}_checkForConflictingLocalOptions(){const t=this.options.filter((t=>{const r=t.attributeName();if(this.getOptionValue(r)===undefined){return false}return this.getOptionValueSource(r)!=="default"}));const r=t.filter((t=>t.conflictsWith.length>0));r.forEach((r=>{const i=t.find((t=>r.conflictsWith.includes(t.attributeName())));if(i){this._conflictingOption(r,i)}}))}_checkForConflictingOptions(){for(let t=this;t;t=t.parent){t._checkForConflictingLocalOptions()}}parseOptions(t){const r=[];const i=[];let o=r;const a=t.slice();function maybeOption(t){return t.length>1&&t[0]==="-"}let l=null;while(a.length){const t=a.shift();if(t==="--"){if(o===i)o.push(t);o.push(...a);break}if(l&&!maybeOption(t)){this.emit(`option:${l.name()}`,t);continue}l=null;if(maybeOption(t)){const r=this._findOption(t);if(r){if(r.required){const t=a.shift();if(t===undefined)this.optionMissingArgument(r);this.emit(`option:${r.name()}`,t)}else if(r.optional){let t=null;if(a.length>0&&!maybeOption(a[0])){t=a.shift()}this.emit(`option:${r.name()}`,t)}else{this.emit(`option:${r.name()}`)}l=r.variadic?r:null;continue}}if(t.length>2&&t[0]==="-"&&t[1]!=="-"){const r=this._findOption(`-${t[1]}`);if(r){if(r.required||r.optional&&this._combineFlagAndOptionalValue){this.emit(`option:${r.name()}`,t.slice(2))}else{this.emit(`option:${r.name()}`);a.unshift(`-${t.slice(2)}`)}continue}}if(/^--[^=]+=/.test(t)){const r=t.indexOf("=");const i=this._findOption(t.slice(0,r));if(i&&(i.required||i.optional)){this.emit(`option:${i.name()}`,t.slice(r+1));continue}}if(maybeOption(t)){o=i}if((this._enablePositionalOptions||this._passThroughOptions)&&r.length===0&&i.length===0){if(this._findCommand(t)){r.push(t);if(a.length>0)i.push(...a);break}else if(t===this._helpCommandName&&this._hasImplicitHelpCommand()){r.push(t);if(a.length>0)r.push(...a);break}else if(this._defaultCommandName){i.push(t);if(a.length>0)i.push(...a);break}}if(this._passThroughOptions){o.push(t);if(a.length>0)o.push(...a);break}o.push(t)}return{operands:r,unknown:i}}opts(){if(this._storeOptionsAsProperties){const t={};const r=this.options.length;for(let i=0;i<r;i++){const r=this.options[i].attributeName();t[r]=r===this._versionOptionName?this._version:this[r]}return t}return this._optionValues}optsWithGlobals(){return getCommandAndParents(this).reduce(((t,r)=>Object.assign(t,r.opts())),{})}error(t,r){this._outputConfiguration.outputError(`${t}\n`,this._outputConfiguration.writeErr);if(typeof this._showHelpAfterError==="string"){this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`)}else if(this._showHelpAfterError){this._outputConfiguration.writeErr("\n");this.outputHelp({error:true})}const i=r||{};const o=i.exitCode||1;const a=i.code||"commander.error";this._exit(o,a,t)}_parseOptionsEnv(){this.options.forEach((t=>{if(t.envVar&&t.envVar in c.env){const r=t.attributeName();if(this.getOptionValue(r)===undefined||["default","config","env"].includes(this.getOptionValueSource(r))){if(t.required||t.optional){this.emit(`optionEnv:${t.name()}`,c.env[t.envVar])}else{this.emit(`optionEnv:${t.name()}`)}}}}))}_parseOptionsImplied(){const t=new v(this.options);const hasCustomOptionValue=t=>this.getOptionValue(t)!==undefined&&!["default","implied"].includes(this.getOptionValueSource(t));this.options.filter((r=>r.implied!==undefined&&hasCustomOptionValue(r.attributeName())&&t.valueFromOption(this.getOptionValue(r.attributeName()),r))).forEach((t=>{Object.keys(t.implied).filter((t=>!hasCustomOptionValue(t))).forEach((r=>{this.setOptionValueWithSource(r,t.implied[r],"implied")}))}))}missingArgument(t){const r=`error: missing required argument '${t}'`;this.error(r,{code:"commander.missingArgument"})}optionMissingArgument(t){const r=`error: option '${t.flags}' argument missing`;this.error(r,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(t){const r=`error: required option '${t.flags}' not specified`;this.error(r,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(t,r){const findBestOptionFromValue=t=>{const r=t.attributeName();const i=this.getOptionValue(r);const o=this.options.find((t=>t.negate&&r===t.attributeName()));const a=this.options.find((t=>!t.negate&&r===t.attributeName()));if(o&&(o.presetArg===undefined&&i===false||o.presetArg!==undefined&&i===o.presetArg)){return o}return a||t};const getErrorMessage=t=>{const r=findBestOptionFromValue(t);const i=r.attributeName();const o=this.getOptionValueSource(i);if(o==="env"){return`environment variable '${r.envVar}'`}return`option '${r.flags}'`};const i=`error: ${getErrorMessage(t)} cannot be used with ${getErrorMessage(r)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(t){if(this._allowUnknownOption)return;let r="";if(t.startsWith("--")&&this._showSuggestionAfterError){let i=[];let o=this;do{const t=o.createHelp().visibleOptions(o).filter((t=>t.long)).map((t=>t.long));i=i.concat(t);o=o.parent}while(o&&!o._enablePositionalOptions);r=b(t,i)}const i=`error: unknown option '${t}'${r}`;this.error(i,{code:"commander.unknownOption"})}_excessArguments(t){if(this._allowExcessArguments)return;const r=this._args.length;const i=r===1?"":"s";const o=this.parent?` for '${this.name()}'`:"";const a=`error: too many arguments${o}. Expected ${r} argument${i} but got ${t.length}.`;this.error(a,{code:"commander.excessArguments"})}unknownCommand(){const t=this.args[0];let r="";if(this._showSuggestionAfterError){const i=[];this.createHelp().visibleCommands(this).forEach((t=>{i.push(t.name());if(t.alias())i.push(t.alias())}));r=b(t,i)}const i=`error: unknown command '${t}'${r}`;this.error(i,{code:"commander.unknownCommand"})}version(t,r,i){if(t===undefined)return this._version;this._version=t;r=r||"-V, --version";i=i||"output the version number";const o=this.createOption(r,i);this._versionOptionName=o.attributeName();this.options.push(o);this.on("option:"+o.name(),(()=>{this._outputConfiguration.writeOut(`${t}\n`);this._exit(0,"commander.version",t)}));return this}description(t,r){if(t===undefined&&r===undefined)return this._description;this._description=t;if(r){this._argsDescription=r}return this}summary(t){if(t===undefined)return this._summary;this._summary=t;return this}alias(t){if(t===undefined)return this._aliases[0];let r=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler){r=this.commands[this.commands.length-1]}if(t===r._name)throw new Error("Command alias can't be the same as its name");r._aliases.push(t);return this}aliases(t){if(t===undefined)return this._aliases;t.forEach((t=>this.alias(t)));return this}usage(t){if(t===undefined){if(this._usage)return this._usage;const t=this._args.map((t=>p(t)));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")}this._usage=t;return this}name(t){if(t===undefined)return this._name;this._name=t;return this}nameFromFilename(t){this._name=l.basename(t,l.extname(t));return this}executableDir(t){if(t===undefined)return this._executableDir;this._executableDir=t;return this}helpInformation(t){const r=this.createHelp();if(r.helpWidth===undefined){r.helpWidth=t&&t.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()}return r.formatHelp(this,r)}_getHelpContext(t){t=t||{};const r={error:!!t.error};let i;if(r.error){i=t=>this._outputConfiguration.writeErr(t)}else{i=t=>this._outputConfiguration.writeOut(t)}r.write=t.write||i;r.command=this;return r}outputHelp(t){let r;if(typeof t==="function"){r=t;t=undefined}const i=this._getHelpContext(t);getCommandAndParents(this).reverse().forEach((t=>t.emit("beforeAllHelp",i)));this.emit("beforeHelp",i);let o=this.helpInformation(i);if(r){o=r(o);if(typeof o!=="string"&&!Buffer.isBuffer(o)){throw new Error("outputHelp callback must return a string or a Buffer")}}i.write(o);this.emit(this._helpLongFlag);this.emit("afterHelp",i);getCommandAndParents(this).forEach((t=>t.emit("afterAllHelp",i)))}helpOption(t,r){if(typeof t==="boolean"){this._hasHelpOption=t;return this}this._helpFlags=t||this._helpFlags;this._helpDescription=r||this._helpDescription;const i=y(this._helpFlags);this._helpShortFlag=i.shortFlag;this._helpLongFlag=i.longFlag;return this}help(t){this.outputHelp(t);let r=c.exitCode||0;if(r===0&&t&&typeof t!=="function"&&t.error){r=1}this._exit(r,"commander.help","(outputHelp)")}addHelpText(t,r){const i=["beforeAll","before","after","afterAll"];if(!i.includes(t)){throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${i.join("', '")}'`)}const o=`${t}Help`;this.on(o,(t=>{let i;if(typeof r==="function"){i=r({error:t.error,command:t.command})}else{i=r}if(i){t.write(`${i}\n`)}}));return this}}function outputHelpIfRequested(t,r){const i=t._hasHelpOption&&r.find((r=>r===t._helpLongFlag||r===t._helpShortFlag));if(i){t.outputHelp();t._exit(0,"commander.helpDisplayed","(outputHelp)")}}function incrementNodeInspectorPort(t){return t.map((t=>{if(!t.startsWith("--inspect")){return t}let r;let i="127.0.0.1";let o="9229";let a;if((a=t.match(/^(--inspect(-brk)?)$/))!==null){r=a[1]}else if((a=t.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null){r=a[1];if(/^\d+$/.test(a[3])){o=a[3]}else{i=a[3]}}else if((a=t.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null){r=a[1];i=a[3];o=a[4]}if(r&&o!=="0"){return`${r}=${i}:${parseInt(o)+1}`}return t}))}function getCommandAndParents(t){const r=[];for(let i=t;i;i=i.parent){r.push(i)}return r}r.Command=Command},9027:(t,r)=>{class CommanderError extends Error{constructor(t,r,i){super(i);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name;this.code=r;this.exitCode=t;this.nestedError=undefined}}class InvalidArgumentError extends CommanderError{constructor(t){super(1,"commander.invalidArgument",t);Error.captureStackTrace(this,this.constructor);this.name=this.constructor.name}}r.CommanderError=CommanderError;r.InvalidArgumentError=InvalidArgumentError},9164:(t,r,i)=>{const{humanReadableArgName:o}=i(4079);class Help{constructor(){this.helpWidth=undefined;this.sortSubcommands=false;this.sortOptions=false}visibleCommands(t){const r=t.commands.filter((t=>!t._hidden));if(t._hasImplicitHelpCommand()){const[,i,o]=t._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/);const a=t.createCommand(i).helpOption(false);a.description(t._helpCommandDescription);if(o)a.arguments(o);r.push(a)}if(this.sortSubcommands){r.sort(((t,r)=>t.name().localeCompare(r.name())))}return r}visibleOptions(t){const r=t.options.filter((t=>!t.hidden));const i=t._hasHelpOption&&t._helpShortFlag&&!t._findOption(t._helpShortFlag);const o=t._hasHelpOption&&!t._findOption(t._helpLongFlag);if(i||o){let a;if(!i){a=t.createOption(t._helpLongFlag,t._helpDescription)}else if(!o){a=t.createOption(t._helpShortFlag,t._helpDescription)}else{a=t.createOption(t._helpFlags,t._helpDescription)}r.push(a)}if(this.sortOptions){const getSortKey=t=>t.short?t.short.replace(/^-/,""):t.long.replace(/^--/,"");r.sort(((t,r)=>getSortKey(t).localeCompare(getSortKey(r))))}return r}visibleArguments(t){if(t._argsDescription){t._args.forEach((r=>{r.description=r.description||t._argsDescription[r.name()]||""}))}if(t._args.find((t=>t.description))){return t._args}return[]}subcommandTerm(t){const r=t._args.map((t=>o(t))).join(" ");return t._name+(t._aliases[0]?"|"+t._aliases[0]:"")+(t.options.length?" [options]":"")+(r?" "+r:"")}optionTerm(t){return t.flags}argumentTerm(t){return t.name()}longestSubcommandTermLength(t,r){return r.visibleCommands(t).reduce(((t,i)=>Math.max(t,r.subcommandTerm(i).length)),0)}longestOptionTermLength(t,r){return r.visibleOptions(t).reduce(((t,i)=>Math.max(t,r.optionTerm(i).length)),0)}longestArgumentTermLength(t,r){return r.visibleArguments(t).reduce(((t,i)=>Math.max(t,r.argumentTerm(i).length)),0)}commandUsage(t){let r=t._name;if(t._aliases[0]){r=r+"|"+t._aliases[0]}let i="";for(let r=t.parent;r;r=r.parent){i=r.name()+" "+i}return i+r+" "+t.usage()}commandDescription(t){return t.description()}subcommandDescription(t){return t.summary()||t.description()}optionDescription(t){const r=[];if(t.argChoices){r.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`)}if(t.defaultValue!==undefined){const i=t.required||t.optional||t.isBoolean()&&typeof t.defaultValue==="boolean";if(i){r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`)}}if(t.presetArg!==undefined&&t.optional){r.push(`preset: ${JSON.stringify(t.presetArg)}`)}if(t.envVar!==undefined){r.push(`env: ${t.envVar}`)}if(r.length>0){return`${t.description} (${r.join(", ")})`}return t.description}argumentDescription(t){const r=[];if(t.argChoices){r.push(`choices: ${t.argChoices.map((t=>JSON.stringify(t))).join(", ")}`)}if(t.defaultValue!==undefined){r.push(`default: ${t.defaultValueDescription||JSON.stringify(t.defaultValue)}`)}if(r.length>0){const i=`(${r.join(", ")})`;if(t.description){return`${t.description} ${i}`}return i}return t.description}formatHelp(t,r){const i=r.padWidth(t,r);const o=r.helpWidth||80;const a=2;const l=2;function formatItem(t,u){if(u){const c=`${t.padEnd(i+l)}${u}`;return r.wrap(c,o-a,i+l)}return t}function formatList(t){return t.join("\n").replace(/^/gm," ".repeat(a))}let u=[`Usage: ${r.commandUsage(t)}`,""];const c=r.commandDescription(t);if(c.length>0){u=u.concat([c,""])}const h=r.visibleArguments(t).map((t=>formatItem(r.argumentTerm(t),r.argumentDescription(t))));if(h.length>0){u=u.concat(["Arguments:",formatList(h),""])}const p=r.visibleOptions(t).map((t=>formatItem(r.optionTerm(t),r.optionDescription(t))));if(p.length>0){u=u.concat(["Options:",formatList(p),""])}const d=r.visibleCommands(t).map((t=>formatItem(r.subcommandTerm(t),r.subcommandDescription(t))));if(d.length>0){u=u.concat(["Commands:",formatList(d),""])}return u.join("\n")}padWidth(t,r){return Math.max(r.longestOptionTermLength(t,r),r.longestSubcommandTermLength(t,r),r.longestArgumentTermLength(t,r))}wrap(t,r,i,o=40){if(t.match(/[\n]\s+/))return t;const a=r-i;if(a<o)return t;const l=t.slice(0,i);const u=t.slice(i);const c=" ".repeat(i);const h=new RegExp(".{1,"+(a-1)+"}([\\s​]|$)|[^\\s​]+?([\\s​]|$)","g");const p=u.match(h)||[];return l+p.map(((t,r)=>{if(t.slice(-1)==="\n"){t=t.slice(0,t.length-1)}return(r>0?c:"")+t.trimRight()})).join("\n")}}r.Help=Help},5205:(t,r,i)=>{const{InvalidArgumentError:o}=i(9027);class Option{constructor(t,r){this.flags=t;this.description=r||"";this.required=t.includes("<");this.optional=t.includes("[");this.variadic=/\w\.\.\.[>\]]$/.test(t);this.mandatory=false;const i=splitOptionFlags(t);this.short=i.shortFlag;this.long=i.longFlag;this.negate=false;if(this.long){this.negate=this.long.startsWith("--no-")}this.defaultValue=undefined;this.defaultValueDescription=undefined;this.presetArg=undefined;this.envVar=undefined;this.parseArg=undefined;this.hidden=false;this.argChoices=undefined;this.conflictsWith=[];this.implied=undefined}default(t,r){this.defaultValue=t;this.defaultValueDescription=r;return this}preset(t){this.presetArg=t;return this}conflicts(t){this.conflictsWith=this.conflictsWith.concat(t);return this}implies(t){this.implied=Object.assign(this.implied||{},t);return this}env(t){this.envVar=t;return this}argParser(t){this.parseArg=t;return this}makeOptionMandatory(t=true){this.mandatory=!!t;return this}hideHelp(t=true){this.hidden=!!t;return this}_concatValue(t,r){if(r===this.defaultValue||!Array.isArray(r)){return[t]}return r.concat(t)}choices(t){this.argChoices=t.slice();this.parseArg=(t,r)=>{if(!this.argChoices.includes(t)){throw new o(`Allowed choices are ${this.argChoices.join(", ")}.`)}if(this.variadic){return this._concatValue(t,r)}return t};return this}name(){if(this.long){return this.long.replace(/^--/,"")}return this.short.replace(/^-/,"")}attributeName(){return camelcase(this.name().replace(/^no-/,""))}is(t){return this.short===t||this.long===t}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class DualOptions{constructor(t){this.positiveOptions=new Map;this.negativeOptions=new Map;this.dualOptions=new Set;t.forEach((t=>{if(t.negate){this.negativeOptions.set(t.attributeName(),t)}else{this.positiveOptions.set(t.attributeName(),t)}}));this.negativeOptions.forEach(((t,r)=>{if(this.positiveOptions.has(r)){this.dualOptions.add(r)}}))}valueFromOption(t,r){const i=r.attributeName();if(!this.dualOptions.has(i))return true;const o=this.negativeOptions.get(i).presetArg;const a=o!==undefined?o:false;return r.negate===(a===t)}}function camelcase(t){return t.split("-").reduce(((t,r)=>t+r[0].toUpperCase()+r.slice(1)))}function splitOptionFlags(t){let r;let i;const o=t.split(/[ |,]+/);if(o.length>1&&!/^[[<]/.test(o[1]))r=o.shift();i=o.shift();if(!r&&/^-[^-]$/.test(i)){r=i;i=undefined}return{shortFlag:r,longFlag:i}}r.Option=Option;r.splitOptionFlags=splitOptionFlags;r.DualOptions=DualOptions},211:(t,r)=>{const i=3;function editDistance(t,r){if(Math.abs(t.length-r.length)>i)return Math.max(t.length,r.length);const o=[];for(let r=0;r<=t.length;r++){o[r]=[r]}for(let t=0;t<=r.length;t++){o[0][t]=t}for(let i=1;i<=r.length;i++){for(let a=1;a<=t.length;a++){let l=1;if(t[a-1]===r[i-1]){l=0}else{l=1}o[a][i]=Math.min(o[a-1][i]+1,o[a][i-1]+1,o[a-1][i-1]+l);if(a>1&&i>1&&t[a-1]===r[i-2]&&t[a-2]===r[i-1]){o[a][i]=Math.min(o[a][i],o[a-2][i-2]+1)}}}return o[t.length][r.length]}function suggestSimilar(t,r){if(!r||r.length===0)return"";r=Array.from(new Set(r));const o=t.startsWith("--");if(o){t=t.slice(2);r=r.map((t=>t.slice(2)))}let a=[];let l=i;const u=.4;r.forEach((r=>{if(r.length<=1)return;const i=editDistance(t,r);const o=Math.max(t.length,r.length);const c=(o-i)/o;if(c>u){if(i<l){l=i;a=[r]}else if(i===l){a.push(r)}}}));a.sort(((t,r)=>t.localeCompare(r)));if(o){a=a.map((t=>`--${t}`))}if(a.length>1){return`\n(Did you mean one of ${a.join(", ")}?)`}if(a.length===1){return`\n(Did you mean ${a[0]}?)`}return""}r.suggestSimilar=suggestSimilar}};var __webpack_module_cache__={};function __nccwpck_require__(t){var r=__webpack_module_cache__[t];if(r!==undefined){return r.exports}var i=__webpack_module_cache__[t]={exports:{}};var o=true;try{__webpack_modules__[t].call(i.exports,i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete __webpack_module_cache__[t]}return i.exports}(()=>{__nccwpck_require__.n=t=>{var r=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(r,{a:r});return r}})();(()=>{__nccwpck_require__.d=(t,r)=>{for(var i in r){if(__nccwpck_require__.o(r,i)&&!__nccwpck_require__.o(t,i)){Object.defineProperty(t,i,{enumerable:true,get:r[i]})}}}})();(()=>{__nccwpck_require__.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__=__nccwpck_require__(371);module.exports=__webpack_exports__})();