create-xmlui-app 0.4.3 → 0.6.1

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.
@@ -1,9 +1,9 @@
1
1
  <Component name="ApiAware">
2
2
  <PagePanel>
3
- <List datasource="https://api.spacexdata.com/v3/history">
4
- <prop name="itemTemplate">
5
- <Card title="{$item.title}" subTitle="{$item.details}"/>
6
- </prop>
3
+ <List data="https://api.spacexdata.com/v3/history">
4
+ <property name="itemTemplate">
5
+ <Card title="{$item.title}" subtitle="{$item.details}"/>
6
+ </property>
7
7
  </List>
8
8
  </PagePanel>
9
9
  </Component>
package/dist/index.js CHANGED
@@ -51,7 +51,7 @@ var s=r(6546);var i={"{":"}","(":")","[":"]"};var strictCheck=function(t){if(t[0
51
51
  *
52
52
  * Copyright (c) 2014-present, Jon Schlinkert.
53
53
  * Released under the MIT License.
54
- */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}},228:(t,e,r)=>{var s=r(7147);var i;if(process.platform==="win32"||global.TESTING_WINDOWS){i=r(7214)}else{i=r(5211)}t.exports=isexe;isexe.sync=sync;function isexe(t,e,r){if(typeof e==="function"){r=e;e={}}if(!r){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(r,s){isexe(t,e||{},(function(t,e){if(t){s(t)}else{r(e)}}))}))}i(t,e||{},(function(t,s){if(t){if(t.code==="EACCES"||e&&e.ignoreErrors){t=null;s=false}}r(t,s)}))}function sync(t,e){try{return i.sync(t,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES"){return false}else{throw t}}}},5211:(t,e,r)=>{t.exports=isexe;isexe.sync=sync;var s=r(7147);function isexe(t,e,r){s.stat(t,(function(t,s){r(t,t?false:checkStat(s,e))}))}function sync(t,e){return checkStat(s.statSync(t),e)}function checkStat(t,e){return t.isFile()&&checkMode(t,e)}function checkMode(t,e){var r=t.mode;var s=t.uid;var i=t.gid;var n=e.uid!==undefined?e.uid:process.getuid&&process.getuid();var o=e.gid!==undefined?e.gid:process.getgid&&process.getgid();var a=parseInt("100",8);var l=parseInt("010",8);var u=parseInt("001",8);var c=a|l;var h=r&u||r&l&&i===o||r&a&&s===n||r&c&&n===0;return h}},7214:(t,e,r)=>{t.exports=isexe;isexe.sync=sync;var s=r(7147);function checkPathExt(t,e){var r=e.pathExt!==undefined?e.pathExt:process.env.PATHEXT;if(!r){return true}r=r.split(";");if(r.indexOf("")!==-1){return true}for(var s=0;s<r.length;s++){var i=r[s].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i){return true}}return false}function checkStat(t,e,r){if(!t.isSymbolicLink()&&!t.isFile()){return false}return checkPathExt(e,r)}function isexe(t,e,r){s.stat(t,(function(s,i){r(s,s?false:checkStat(i,t,e))}))}function sync(t,e){return checkStat(s.statSync(t),t,e)}},9439:t=>{"use strict";const{FORCE_COLOR:e,NODE_DISABLE_COLORS:r,TERM:s}=process.env;const i={enabled:!r&&s!=="dumb"&&e!=="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,e){let r=0,s,i="",n="";for(;r<t.length;r++){s=t[r];i+=s.open;n+=s.close;if(e.includes(s.close)){e=e.replace(s.rgx,s.close+s.open)}}return i+e+n}function chain(t,e){let r={has:t,keys:e};r.reset=i.reset.bind(r);r.bold=i.bold.bind(r);r.dim=i.dim.bind(r);r.italic=i.italic.bind(r);r.underline=i.underline.bind(r);r.inverse=i.inverse.bind(r);r.hidden=i.hidden.bind(r);r.strikethrough=i.strikethrough.bind(r);r.black=i.black.bind(r);r.red=i.red.bind(r);r.green=i.green.bind(r);r.yellow=i.yellow.bind(r);r.blue=i.blue.bind(r);r.magenta=i.magenta.bind(r);r.cyan=i.cyan.bind(r);r.white=i.white.bind(r);r.gray=i.gray.bind(r);r.grey=i.grey.bind(r);r.bgBlack=i.bgBlack.bind(r);r.bgRed=i.bgRed.bind(r);r.bgGreen=i.bgGreen.bind(r);r.bgYellow=i.bgYellow.bind(r);r.bgBlue=i.bgBlue.bind(r);r.bgMagenta=i.bgMagenta.bind(r);r.bgCyan=i.bgCyan.bind(r);r.bgWhite=i.bgWhite.bind(r);return r}function init(t,e){let r={open:`[${t}m`,close:`[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(e){if(this!==void 0&&this.has!==void 0){this.has.includes(t)||(this.has.push(t),this.keys.push(r));return e===void 0?this:i.enabled?run(this.keys,e+""):e+""}return e===void 0?chain([t],[r]):i.enabled?run([r],e+""):e+""}}t.exports=i},2375:(t,e,r)=>{"use strict";const s=r(2781);const i=s.PassThrough;const n=Array.prototype.slice;t.exports=merge2;function merge2(){const t=[];const e=n.call(arguments);let r=false;let s=e[e.length-1];if(s&&!Array.isArray(s)&&s.pipe==null){e.pop()}else{s={}}const o=s.end!==false;const a=s.pipeError===true;if(s.objectMode==null){s.objectMode=true}if(s.highWaterMark==null){s.highWaterMark=64*1024}const l=i(s);function addStream(){for(let e=0,r=arguments.length;e<r;e++){t.push(pauseStreams(arguments[e],s))}mergeStream();return this}function mergeStream(){if(r){return}r=true;let e=t.shift();if(!e){process.nextTick(endStream);return}if(!Array.isArray(e)){e=[e]}let s=e.length+1;function next(){if(--s>0){return}r=false;mergeStream()}function pipe(t){function onend(){t.removeListener("merge2UnpipeEnd",onend);t.removeListener("end",onend);if(a){t.removeListener("error",onerror)}next()}function onerror(t){l.emit("error",t)}if(t._readableState.endEmitted){return next()}t.on("merge2UnpipeEnd",onend);t.on("end",onend);if(a){t.on("error",onerror)}t.pipe(l,{end:false});t.resume()}for(let t=0;t<e.length;t++){pipe(e[t])}next()}function endStream(){r=false;l.emit("queueDrain");if(o){l.end()}}l.setMaxListeners(0);l.add=addStream;l.on("unpipe",(function(t){t.emit("merge2UnpipeEnd")}));if(e.length){addStream.apply(null,e)}return l}function pauseStreams(t,e){if(!Array.isArray(t)){if(!t._readableState&&t.pipe){t=t.pipe(i(e))}if(!t._readableState||!t.pause||!t.pipe){throw new Error("Only readable stream can be merged.")}t.pause()}else{for(let r=0,s=t.length;r<s;r++){t[r]=pauseStreams(t[r],e)}}return t}},9015:(t,e,r)=>{"use strict";const s=r(3837);const i=r(538);const n=r(9138);const o=r(2924);const isEmptyString=t=>t===""||t==="./";const micromatch=(t,e,r)=>{e=[].concat(e);t=[].concat(t);let s=new Set;let i=new Set;let o=new Set;let a=0;let onResult=t=>{o.add(t.output);if(r&&r.onResult){r.onResult(t)}};for(let o=0;o<e.length;o++){let l=n(String(e[o]),{...r,onResult:onResult},true);let u=l.state.negated||l.state.negatedExtglob;if(u)a++;for(let e of t){let t=l(e,true);let r=u?!t.isMatch:t.isMatch;if(!r)continue;if(u){s.add(t.output)}else{s.delete(t.output);i.add(t.output)}}}let l=a===e.length?[...o]:[...i];let u=l.filter((t=>!s.has(t)));if(r&&u.length===0){if(r.failglob===true){throw new Error(`No matches found for "${e.join(", ")}"`)}if(r.nonull===true||r.nullglob===true){return r.unescape?e.map((t=>t.replace(/\\/g,""))):e}}return u};micromatch.match=micromatch;micromatch.matcher=(t,e)=>n(t,e);micromatch.isMatch=(t,e,r)=>n(e,r)(t);micromatch.any=micromatch.isMatch;micromatch.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set;let i=[];let onResult=t=>{if(r.onResult)r.onResult(t);i.push(t.output)};let n=new Set(micromatch(t,e,{...r,onResult:onResult}));for(let t of i){if(!n.has(t)){s.add(t)}}return[...s]};micromatch.contains=(t,e,r)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${s.inspect(t)}"`)}if(Array.isArray(e)){return e.some((e=>micromatch.contains(t,e,r)))}if(typeof e==="string"){if(isEmptyString(t)||isEmptyString(e)){return false}if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e)){return true}}return micromatch.isMatch(t,e,{...r,contains:true})};micromatch.matchKeys=(t,e,r)=>{if(!o.isObject(t)){throw new TypeError("Expected the first argument to be an object")}let s=micromatch(Object.keys(t),e,r);let i={};for(let e of s)i[e]=t[e];return i};micromatch.some=(t,e,r)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),r);if(s.some((t=>e(t)))){return true}}return false};micromatch.every=(t,e,r)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),r);if(!s.every((t=>e(t)))){return false}}return true};micromatch.all=(t,e,r)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${s.inspect(t)}"`)}return[].concat(e).every((e=>n(e,r)(t)))};micromatch.capture=(t,e,r)=>{let s=o.isWindows(r);let i=n.makeRe(String(t),{...r,capture:true});let a=i.exec(s?o.toPosixSlashes(e):e);if(a){return a.slice(1).map((t=>t===void 0?"":t))}};micromatch.makeRe=(...t)=>n.makeRe(...t);micromatch.scan=(...t)=>n.scan(...t);micromatch.parse=(t,e)=>{let r=[];for(let s of[].concat(t||[])){for(let t of i(String(s),e)){r.push(n.parse(t,e))}}return r};micromatch.braces=(t,e)=>{if(typeof t!=="string")throw new TypeError("Expected a string");if(e&&e.nobrace===true||!/\{.*\}/.test(t)){return[t]}return i(t,e)};micromatch.braceExpand=(t,e)=>{if(typeof t!=="string")throw new TypeError("Expected a string");return micromatch.braces(t,{...e,expand:true})};t.exports=micromatch},5912:t=>{"use strict";function hasKey(t,e){var r=t;e.slice(0,-1).forEach((function(t){r=r[t]||{}}));var s=e[e.length-1];return s in r}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,e){return e==="constructor"&&typeof t[e]==="function"||e==="__proto__"}t.exports=function(t,e){if(!e){e={}}var r={bools:{},strings:{},unknownFn:null};if(typeof e.unknown==="function"){r.unknownFn=e.unknown}if(typeof e.boolean==="boolean"&&e.boolean){r.allBools=true}else{[].concat(e.boolean).filter(Boolean).forEach((function(t){r.bools[t]=true}))}var s={};function aliasIsBoolean(t){return s[t].some((function(t){return r.bools[t]}))}Object.keys(e.alias||{}).forEach((function(t){s[t]=[].concat(e.alias[t]);s[t].forEach((function(e){s[e]=[t].concat(s[t].filter((function(t){return e!==t})))}))}));[].concat(e.string).filter(Boolean).forEach((function(t){r.strings[t]=true;if(s[t]){[].concat(s[t]).forEach((function(t){r.strings[t]=true}))}}));var i=e.default||{};var n={_:[]};function argDefined(t,e){return r.allBools&&/^--[^=]+$/.test(e)||r.strings[t]||r.bools[t]||s[t]}function setKey(t,e,s){var i=t;for(var n=0;n<e.length-1;n++){var o=e[n];if(isConstructorOrProto(i,o)){return}if(i[o]===undefined){i[o]={}}if(i[o]===Object.prototype||i[o]===Number.prototype||i[o]===String.prototype){i[o]={}}if(i[o]===Array.prototype){i[o]=[]}i=i[o]}var a=e[e.length-1];if(isConstructorOrProto(i,a)){return}if(i===Object.prototype||i===Number.prototype||i===String.prototype){i={}}if(i===Array.prototype){i=[]}if(i[a]===undefined||r.bools[a]||typeof i[a]==="boolean"){i[a]=s}else if(Array.isArray(i[a])){i[a].push(s)}else{i[a]=[i[a],s]}}function setArg(t,e,i){if(i&&r.unknownFn&&!argDefined(t,i)){if(r.unknownFn(i)===false){return}}var o=!r.strings[t]&&isNumber(e)?Number(e):e;setKey(n,t.split("."),o);(s[t]||[]).forEach((function(t){setKey(n,t.split("."),o)}))}Object.keys(r.bools).forEach((function(t){setArg(t,i[t]===undefined?false:i[t])}));var o=[];if(t.indexOf("--")!==-1){o=t.slice(t.indexOf("--")+1);t=t.slice(0,t.indexOf("--"))}for(var a=0;a<t.length;a++){var l=t[a];var u;var c;if(/^--.+=/.test(l)){var h=l.match(/^--([^=]+)=([\s\S]*)$/);u=h[1];var d=h[2];if(r.bools[u]){d=d!=="false"}setArg(u,d,l)}else if(/^--no-.+/.test(l)){u=l.match(/^--no-(.+)/)[1];setArg(u,false,l)}else if(/^--.+/.test(l)){u=l.match(/^--(.+)/)[1];c=t[a+1];if(c!==undefined&&!/^(-|--)[^-]/.test(c)&&!r.bools[u]&&!r.allBools&&(s[u]?!aliasIsBoolean(u):true)){setArg(u,c,l);a+=1}else if(/^(true|false)$/.test(c)){setArg(u,c==="true",l);a+=1}else{setArg(u,r.strings[u]?"":true,l)}}else if(/^-[^-]+/.test(l)){var f=l.slice(1,-1).split("");var p=false;for(var g=0;g<f.length;g++){c=l.slice(g+2);if(c==="-"){setArg(f[g],c,l);continue}if(/[A-Za-z]/.test(f[g])&&c[0]==="="){setArg(f[g],c.slice(1),l);p=true;break}if(/[A-Za-z]/.test(f[g])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(c)){setArg(f[g],c,l);p=true;break}if(f[g+1]&&f[g+1].match(/\W/)){setArg(f[g],l.slice(g+2),l);p=true;break}else{setArg(f[g],r.strings[f[g]]?"":true,l)}}u=l.slice(-1)[0];if(!p&&u!=="-"){if(t[a+1]&&!/^(-|--)[^-]/.test(t[a+1])&&!r.bools[u]&&(s[u]?!aliasIsBoolean(u):true)){setArg(u,t[a+1],l);a+=1}else if(t[a+1]&&/^(true|false)$/.test(t[a+1])){setArg(u,t[a+1]==="true",l);a+=1}else{setArg(u,r.strings[u]?"":true,l)}}}else{if(!r.unknownFn||r.unknownFn(l)!==false){n._.push(r.strings._||!isNumber(l)?l:Number(l))}if(e.stopEarly){n._.push.apply(n._,t.slice(a+1));break}}}Object.keys(i).forEach((function(t){if(!hasKey(n,t.split("."))){setKey(n,t.split("."),i[t]);(s[t]||[]).forEach((function(e){setKey(n,e.split("."),i[t])}))}}));if(e["--"]){n["--"]=o.slice()}else{o.forEach((function(t){n._.push(t)}))}return n}},2170:t=>{"use strict";const pathKey=(t={})=>{const e=t.env||process.env;const r=t.platform||process.platform;if(r!=="win32"){return"PATH"}return Object.keys(e).reverse().find((t=>t.toUpperCase()==="PATH"))||"Path"};t.exports=pathKey;t.exports["default"]=pathKey},9397:(t,e,r)=>{let s=r(6224);let i=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||s.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env);let formatter=(t,e,r=t)=>s=>{let i=""+s;let n=i.indexOf(e,t.length);return~n?t+replaceClose(i,e,r,n)+e:t+i+e};let replaceClose=(t,e,r,s)=>{let i=t.substring(0,s)+r;let n=t.substring(s+e.length);let o=n.indexOf(e);return~o?i+replaceClose(n,e,r,o):i+n};let createColors=(t=i)=>({isColorSupported:t,reset:t?t=>`${t}`:String,bold:t?formatter("","",""):String,dim:t?formatter("","",""):String,italic:t?formatter("",""):String,underline:t?formatter("",""):String,inverse:t?formatter("",""):String,hidden:t?formatter("",""):String,strikethrough:t?formatter("",""):String,black:t?formatter("",""):String,red:t?formatter("",""):String,green:t?formatter("",""):String,yellow:t?formatter("",""):String,blue:t?formatter("",""):String,magenta:t?formatter("",""):String,cyan:t?formatter("",""):String,white:t?formatter("",""):String,gray:t?formatter("",""):String,bgBlack:t?formatter("",""):String,bgRed:t?formatter("",""):String,bgGreen:t?formatter("",""):String,bgYellow:t?formatter("",""):String,bgBlue:t?formatter("",""):String,bgMagenta:t?formatter("",""):String,bgCyan:t?formatter("",""):String,bgWhite:t?formatter("",""):String});t.exports=createColors();t.exports.createColors=createColors},9138:(t,e,r)=>{"use strict";t.exports=r(4755)},8223:(t,e,r)=>{"use strict";const s=r(1017);const i="\\\\/";const n=`[^${i}]`;const o="\\.";const a="\\+";const l="\\?";const u="\\/";const c="(?=.)";const h="[^/]";const d=`(?:${u}|$)`;const f=`(?:^|${u})`;const p=`${o}{1,2}${d}`;const g=`(?!${o})`;const m=`(?!${f}${p})`;const y=`(?!${o}{0,1}${d})`;const v=`(?!${p})`;const b=`[^.${u}]`;const _=`${h}*?`;const S={DOT_LITERAL:o,PLUS_LITERAL:a,QMARK_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:c,QMARK:h,END_ANCHOR:d,DOTS_SLASH:p,NO_DOT:g,NO_DOTS:m,NO_DOT_SLASH:y,NO_DOTS_SLASH:v,QMARK_NO_DOT:b,STAR:_,START_ANCHOR:f};const w={...S,SLASH_LITERAL:`[${i}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${o}{1,2}(?:[${i}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${i}])${o}{1,2}(?:[${i}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${i}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${i}]|$))`,QMARK_NO_DOT:`[^.${i}]`,START_ANCHOR:`(?:^|[${i}])`,END_ANCHOR:`(?:[${i}]|$)`};const x={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:x,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:s.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?w:S}}},1833:(t,e,r)=>{"use strict";const s=r(8223);const i=r(2924);const{MAX_LENGTH:n,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:l,REPLACEMENTS:u}=s;const expandRange=(t,e)=>{if(typeof e.expandRange==="function"){return e.expandRange(...t,e)}t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch(e){return t.map((t=>i.escapeRegex(t))).join("..")}return r};const syntaxError=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`;const parse=(t,e)=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}t=u[t]||t;const r={...e};const c=typeof r.maxLength==="number"?Math.min(n,r.maxLength):n;let h=t.length;if(h>c){throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${c}`)}const d={type:"bos",value:"",output:r.prepend||""};const f=[d];const p=r.capture?"":"?:";const g=i.isWindows(e);const m=s.globChars(g);const y=s.extglobChars(m);const{DOT_LITERAL:v,PLUS_LITERAL:b,SLASH_LITERAL:_,ONE_CHAR:S,DOTS_SLASH:w,NO_DOT:x,NO_DOT_SLASH:P,NO_DOTS_SLASH:E,QMARK:A,QMARK_NO_DOT:C,STAR:R,START_ANCHOR:k}=m;const globstar=t=>`(${p}(?:(?!${k}${t.dot?w:v}).)*?)`;const O=r.dot?"":x;const T=r.dot?A:C;let $=r.bash===true?globstar(r):R;if(r.capture){$=`(${$})`}if(typeof r.noext==="boolean"){r.noextglob=r.noext}const M={input:t,index:-1,start:0,dot:r.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:f};t=i.removePrefix(t,M);h=t.length;const D=[];const L=[];const F=[];let I=d;let H;const eos=()=>M.index===h-1;const N=M.peek=(e=1)=>t[M.index+e];const j=M.advance=()=>t[++M.index]||"";const remaining=()=>t.slice(M.index+1);const consume=(t="",e=0)=>{M.consumed+=t;M.index+=e};const append=t=>{M.output+=t.output!=null?t.output:t.value;consume(t.value)};const negate=()=>{let t=1;while(N()==="!"&&(N(2)!=="("||N(3)==="?")){j();M.start++;t++}if(t%2===0){return false}M.negated=true;M.start++;return true};const increment=t=>{M[t]++;F.push(t)};const decrement=t=>{M[t]--;F.pop()};const push=t=>{if(I.type==="globstar"){const e=M.braces>0&&(t.type==="comma"||t.type==="brace");const r=t.extglob===true||D.length&&(t.type==="pipe"||t.type==="paren");if(t.type!=="slash"&&t.type!=="paren"&&!e&&!r){M.output=M.output.slice(0,-I.output.length);I.type="star";I.value="*";I.output=$;M.output+=I.output}}if(D.length&&t.type!=="paren"){D[D.length-1].inner+=t.value}if(t.value||t.output)append(t);if(I&&I.type==="text"&&t.type==="text"){I.value+=t.value;I.output=(I.output||"")+t.value;return}t.prev=I;f.push(t);I=t};const extglobOpen=(t,e)=>{const s={...y[e],conditions:1,inner:""};s.prev=I;s.parens=M.parens;s.output=M.output;const i=(r.capture?"(":"")+s.open;increment("parens");push({type:t,value:e,output:M.output?"":S});push({type:"paren",extglob:true,value:j(),output:i});D.push(s)};const extglobClose=t=>{let s=t.close+(r.capture?")":"");let i;if(t.type==="negate"){let n=$;if(t.inner&&t.inner.length>1&&t.inner.includes("/")){n=globstar(r)}if(n!==$||eos()||/^\)+$/.test(remaining())){s=t.close=`)$))${n}`}if(t.inner.includes("*")&&(i=remaining())&&/^\.[^\\/.]+$/.test(i)){const r=parse(i,{...e,fastpaths:false}).output;s=t.close=`)${r})${n})`}if(t.prev.type==="bos"){M.negatedExtglob=true}}push({type:"paren",extglob:true,value:H,output:s});decrement("parens")};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let s=false;let n=t.replace(l,((t,e,r,i,n,o)=>{if(i==="\\"){s=true;return t}if(i==="?"){if(e){return e+i+(n?A.repeat(n.length):"")}if(o===0){return T+(n?A.repeat(n.length):"")}return A.repeat(r.length)}if(i==="."){return v.repeat(r.length)}if(i==="*"){if(e){return e+i+(n?$:"")}return $}return e?t:`\\${t}`}));if(s===true){if(r.unescape===true){n=n.replace(/\\/g,"")}else{n=n.replace(/\\+/g,(t=>t.length%2===0?"\\\\":t?"\\":""))}}if(n===t&&r.contains===true){M.output=t;return M}M.output=i.wrapOutput(n,M,e);return M}while(!eos()){H=j();if(H==="\0"){continue}if(H==="\\"){const t=N();if(t==="/"&&r.bash!==true){continue}if(t==="."||t===";"){continue}if(!t){H+="\\";push({type:"text",value:H});continue}const e=/^\\+/.exec(remaining());let s=0;if(e&&e[0].length>2){s=e[0].length;M.index+=s;if(s%2!==0){H+="\\"}}if(r.unescape===true){H=j()}else{H+=j()}if(M.brackets===0){push({type:"text",value:H});continue}}if(M.brackets>0&&(H!=="]"||I.value==="["||I.value==="[^")){if(r.posix!==false&&H===":"){const t=I.value.slice(1);if(t.includes("[")){I.posix=true;if(t.includes(":")){const t=I.value.lastIndexOf("[");const e=I.value.slice(0,t);const r=I.value.slice(t+2);const s=o[r];if(s){I.value=e+s;M.backtrack=true;j();if(!d.output&&f.indexOf(I)===1){d.output=S}continue}}}}if(H==="["&&N()!==":"||H==="-"&&N()==="]"){H=`\\${H}`}if(H==="]"&&(I.value==="["||I.value==="[^")){H=`\\${H}`}if(r.posix===true&&H==="!"&&I.value==="["){H="^"}I.value+=H;append({value:H});continue}if(M.quotes===1&&H!=='"'){H=i.escapeRegex(H);I.value+=H;append({value:H});continue}if(H==='"'){M.quotes=M.quotes===1?0:1;if(r.keepQuotes===true){push({type:"text",value:H})}continue}if(H==="("){increment("parens");push({type:"paren",value:H});continue}if(H===")"){if(M.parens===0&&r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const t=D[D.length-1];if(t&&M.parens===t.parens+1){extglobClose(D.pop());continue}push({type:"paren",value:H,output:M.parens?")":"\\)"});decrement("parens");continue}if(H==="["){if(r.nobracket===true||!remaining().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}H=`\\${H}`}else{increment("brackets")}push({type:"bracket",value:H});continue}if(H==="]"){if(r.nobracket===true||I&&I.type==="bracket"&&I.value.length===1){push({type:"text",value:H,output:`\\${H}`});continue}if(M.brackets===0){if(r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:H,output:`\\${H}`});continue}decrement("brackets");const t=I.value.slice(1);if(I.posix!==true&&t[0]==="^"&&!t.includes("/")){H=`/${H}`}I.value+=H;append({value:H});if(r.literalBrackets===false||i.hasRegexChars(t)){continue}const e=i.escapeRegex(I.value);M.output=M.output.slice(0,-I.value.length);if(r.literalBrackets===true){M.output+=e;I.value=e;continue}I.value=`(${p}${e}|${I.value})`;M.output+=I.value;continue}if(H==="{"&&r.nobrace!==true){increment("braces");const t={type:"brace",value:H,output:"(",outputIndex:M.output.length,tokensIndex:M.tokens.length};L.push(t);push(t);continue}if(H==="}"){const t=L[L.length-1];if(r.nobrace===true||!t){push({type:"text",value:H,output:H});continue}let e=")";if(t.dots===true){const t=f.slice();const s=[];for(let e=t.length-1;e>=0;e--){f.pop();if(t[e].type==="brace"){break}if(t[e].type!=="dots"){s.unshift(t[e].value)}}e=expandRange(s,r);M.backtrack=true}if(t.comma!==true&&t.dots!==true){const r=M.output.slice(0,t.outputIndex);const s=M.tokens.slice(t.tokensIndex);t.value=t.output="\\{";H=e="\\}";M.output=r;for(const t of s){M.output+=t.output||t.value}}push({type:"brace",value:H,output:e});decrement("braces");L.pop();continue}if(H==="|"){if(D.length>0){D[D.length-1].conditions++}push({type:"text",value:H});continue}if(H===","){let t=H;const e=L[L.length-1];if(e&&F[F.length-1]==="braces"){e.comma=true;t="|"}push({type:"comma",value:H,output:t});continue}if(H==="/"){if(I.type==="dot"&&M.index===M.start+1){M.start=M.index+1;M.consumed="";M.output="";f.pop();I=d;continue}push({type:"slash",value:H,output:_});continue}if(H==="."){if(M.braces>0&&I.type==="dot"){if(I.value===".")I.output=v;const t=L[L.length-1];I.type="dots";I.output+=H;I.value+=H;t.dots=true;continue}if(M.braces+M.parens===0&&I.type!=="bos"&&I.type!=="slash"){push({type:"text",value:H,output:v});continue}push({type:"dot",value:H,output:v});continue}if(H==="?"){const t=I&&I.value==="(";if(!t&&r.noextglob!==true&&N()==="("&&N(2)!=="?"){extglobOpen("qmark",H);continue}if(I&&I.type==="paren"){const t=N();let e=H;if(t==="<"&&!i.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(I.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(remaining())){e=`\\${H}`}push({type:"text",value:H,output:e});continue}if(r.dot!==true&&(I.type==="slash"||I.type==="bos")){push({type:"qmark",value:H,output:C});continue}push({type:"qmark",value:H,output:A});continue}if(H==="!"){if(r.noextglob!==true&&N()==="("){if(N(2)!=="?"||!/[!=<:]/.test(N(3))){extglobOpen("negate",H);continue}}if(r.nonegate!==true&&M.index===0){negate();continue}}if(H==="+"){if(r.noextglob!==true&&N()==="("&&N(2)!=="?"){extglobOpen("plus",H);continue}if(I&&I.value==="("||r.regex===false){push({type:"plus",value:H,output:b});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||M.parens>0){push({type:"plus",value:H});continue}push({type:"plus",value:b});continue}if(H==="@"){if(r.noextglob!==true&&N()==="("&&N(2)!=="?"){push({type:"at",extglob:true,value:H,output:""});continue}push({type:"text",value:H});continue}if(H!=="*"){if(H==="$"||H==="^"){H=`\\${H}`}const t=a.exec(remaining());if(t){H+=t[0];M.index+=t[0].length}push({type:"text",value:H});continue}if(I&&(I.type==="globstar"||I.star===true)){I.type="star";I.star=true;I.value+=H;I.output=$;M.backtrack=true;M.globstar=true;consume(H);continue}let e=remaining();if(r.noextglob!==true&&/^\([^?]/.test(e)){extglobOpen("star",H);continue}if(I.type==="star"){if(r.noglobstar===true){consume(H);continue}const s=I.prev;const i=s.prev;const n=s.type==="slash"||s.type==="bos";const o=i&&(i.type==="star"||i.type==="globstar");if(r.bash===true&&(!n||e[0]&&e[0]!=="/")){push({type:"star",value:H,output:""});continue}const a=M.braces>0&&(s.type==="comma"||s.type==="brace");const l=D.length&&(s.type==="pipe"||s.type==="paren");if(!n&&s.type!=="paren"&&!a&&!l){push({type:"star",value:H,output:""});continue}while(e.slice(0,3)==="/**"){const r=t[M.index+4];if(r&&r!=="/"){break}e=e.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){I.type="globstar";I.value+=H;I.output=globstar(r);M.output=I.output;M.globstar=true;consume(H);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!o&&eos()){M.output=M.output.slice(0,-(s.output+I.output).length);s.output=`(?:${s.output}`;I.type="globstar";I.output=globstar(r)+(r.strictSlashes?")":"|$)");I.value+=H;M.globstar=true;M.output+=s.output+I.output;consume(H);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&e[0]==="/"){const t=e[1]!==void 0?"|$":"";M.output=M.output.slice(0,-(s.output+I.output).length);s.output=`(?:${s.output}`;I.type="globstar";I.output=`${globstar(r)}${_}|${_}${t})`;I.value+=H;M.output+=s.output+I.output;M.globstar=true;consume(H+j());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&e[0]==="/"){I.type="globstar";I.value+=H;I.output=`(?:^|${_}|${globstar(r)}${_})`;M.output=I.output;M.globstar=true;consume(H+j());push({type:"slash",value:"/",output:""});continue}M.output=M.output.slice(0,-I.output.length);I.type="globstar";I.output=globstar(r);I.value+=H;M.output+=I.output;M.globstar=true;consume(H);continue}const s={type:"star",value:H,output:$};if(r.bash===true){s.output=".*?";if(I.type==="bos"||I.type==="slash"){s.output=O+s.output}push(s);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&r.regex===true){s.output=H;push(s);continue}if(M.index===M.start||I.type==="slash"||I.type==="dot"){if(I.type==="dot"){M.output+=P;I.output+=P}else if(r.dot===true){M.output+=E;I.output+=E}else{M.output+=O;I.output+=O}if(N()!=="*"){M.output+=S;I.output+=S}}push(s)}while(M.brackets>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));M.output=i.escapeLast(M.output,"[");decrement("brackets")}while(M.parens>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));M.output=i.escapeLast(M.output,"(");decrement("parens")}while(M.braces>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));M.output=i.escapeLast(M.output,"{");decrement("braces")}if(r.strictSlashes!==true&&(I.type==="star"||I.type==="bracket")){push({type:"maybe_slash",value:"",output:`${_}?`})}if(M.backtrack===true){M.output="";for(const t of M.tokens){M.output+=t.output!=null?t.output:t.value;if(t.suffix){M.output+=t.suffix}}}return M};parse.fastpaths=(t,e)=>{const r={...e};const o=typeof r.maxLength==="number"?Math.min(n,r.maxLength):n;const a=t.length;if(a>o){throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`)}t=u[t]||t;const l=i.isWindows(e);const{DOT_LITERAL:c,SLASH_LITERAL:h,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:g,NO_DOTS_SLASH:m,STAR:y,START_ANCHOR:v}=s.globChars(l);const b=r.dot?g:p;const _=r.dot?m:p;const S=r.capture?"":"?:";const w={negated:false,prefix:""};let x=r.bash===true?".*?":y;if(r.capture){x=`(${x})`}const globstar=t=>{if(t.noglobstar===true)return x;return`(${S}(?:(?!${v}${t.dot?f:c}).)*?)`};const create=t=>{switch(t){case"*":return`${b}${d}${x}`;case".*":return`${c}${d}${x}`;case"*.*":return`${b}${x}${c}${d}${x}`;case"*/*":return`${b}${x}${h}${d}${_}${x}`;case"**":return b+globstar(r);case"**/*":return`(?:${b}${globstar(r)}${h})?${_}${d}${x}`;case"**/*.*":return`(?:${b}${globstar(r)}${h})?${_}${x}${c}${d}${x}`;case"**/.*":return`(?:${b}${globstar(r)}${h})?${c}${d}${x}`;default:{const e=/^(.*?)\.(\w+)$/.exec(t);if(!e)return;const r=create(e[1]);if(!r)return;return r+c+e[2]}}};const P=i.removePrefix(t,w);let E=create(P);if(E&&r.strictSlashes!==true){E+=`${h}?`}return E};t.exports=parse},4755:(t,e,r)=>{"use strict";const s=r(1017);const i=r(2017);const n=r(1833);const o=r(2924);const a=r(8223);const isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);const picomatch=(t,e,r=false)=>{if(Array.isArray(t)){const s=t.map((t=>picomatch(t,e,r)));const arrayMatcher=t=>{for(const e of s){const r=e(t);if(r)return r}return false};return arrayMatcher}const s=isObject(t)&&t.tokens&&t.input;if(t===""||typeof t!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const i=e||{};const n=o.isWindows(e);const a=s?picomatch.compileRe(t,e):picomatch.makeRe(t,e,false,true);const l=a.state;delete a.state;let isIgnored=()=>false;if(i.ignore){const t={...e,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(i.ignore,t,r)}const matcher=(r,s=false)=>{const{isMatch:o,match:u,output:c}=picomatch.test(r,a,e,{glob:t,posix:n});const h={glob:t,state:l,regex:a,posix:n,input:r,output:c,match:u,isMatch:o};if(typeof i.onResult==="function"){i.onResult(h)}if(o===false){h.isMatch=false;return s?h:false}if(isIgnored(r)){if(typeof i.onIgnore==="function"){i.onIgnore(h)}h.isMatch=false;return s?h:false}if(typeof i.onMatch==="function"){i.onMatch(h)}return s?h:true};if(r){matcher.state=l}return matcher};picomatch.test=(t,e,r,{glob:s,posix:i}={})=>{if(typeof t!=="string"){throw new TypeError("Expected input to be a string")}if(t===""){return{isMatch:false,output:""}}const n=r||{};const a=n.format||(i?o.toPosixSlashes:null);let l=t===s;let u=l&&a?a(t):t;if(l===false){u=a?a(t):t;l=u===s}if(l===false||n.capture===true){if(n.matchBase===true||n.basename===true){l=picomatch.matchBase(t,e,r,i)}else{l=e.exec(u)}}return{isMatch:Boolean(l),match:l,output:u}};picomatch.matchBase=(t,e,r,i=o.isWindows(r))=>{const n=e instanceof RegExp?e:picomatch.makeRe(e,r);return n.test(s.basename(t))};picomatch.isMatch=(t,e,r)=>picomatch(e,r)(t);picomatch.parse=(t,e)=>{if(Array.isArray(t))return t.map((t=>picomatch.parse(t,e)));return n(t,{...e,fastpaths:false})};picomatch.scan=(t,e)=>i(t,e);picomatch.compileRe=(t,e,r=false,s=false)=>{if(r===true){return t.output}const i=e||{};const n=i.contains?"":"^";const o=i.contains?"":"$";let a=`${n}(?:${t.output})${o}`;if(t&&t.negated===true){a=`^(?!${a}).*$`}const l=picomatch.toRegex(a,e);if(s===true){l.state=t}return l};picomatch.makeRe=(t,e={},r=false,s=false)=>{if(!t||typeof t!=="string"){throw new TypeError("Expected a non-empty string")}let i={negated:false,fastpaths:true};if(e.fastpaths!==false&&(t[0]==="."||t[0]==="*")){i.output=n.fastpaths(t,e)}if(!i.output){i=n(t,e)}return picomatch.compileRe(i,e,r,s)};picomatch.toRegex=(t,e)=>{try{const r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(t){if(e&&e.debug===true)throw t;return/$^/}};picomatch.constants=a;t.exports=picomatch},2017:(t,e,r)=>{"use strict";const s=r(2924);const{CHAR_ASTERISK:i,CHAR_AT:n,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:l,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:c,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:y,CHAR_RIGHT_SQUARE_BRACKET:v}=r(8223);const isPathSeparator=t=>t===c||t===o;const depth=t=>{if(t.isPrefix!==true){t.depth=t.isGlobstar?Infinity:1}};const scan=(t,e)=>{const r=e||{};const b=t.length-1;const _=r.parts===true||r.scanToEnd===true;const S=[];const w=[];const x=[];let P=t;let E=-1;let A=0;let C=0;let R=false;let k=false;let O=false;let T=false;let $=false;let M=false;let D=false;let L=false;let F=false;let I=false;let H=0;let N;let j;let B={value:"",depth:0,isGlob:false};const eos=()=>E>=b;const peek=()=>P.charCodeAt(E+1);const advance=()=>{N=j;return P.charCodeAt(++E)};while(E<b){j=advance();let t;if(j===o){D=B.backslashes=true;j=advance();if(j===h){M=true}continue}if(M===true||j===h){H++;while(eos()!==true&&(j=advance())){if(j===o){D=B.backslashes=true;advance();continue}if(j===h){H++;continue}if(M!==true&&j===l&&(j=advance())===l){R=B.isBrace=true;O=B.isGlob=true;I=true;if(_===true){continue}break}if(M!==true&&j===a){R=B.isBrace=true;O=B.isGlob=true;I=true;if(_===true){continue}break}if(j===m){H--;if(H===0){M=false;R=B.isBrace=true;I=true;break}}}if(_===true){continue}break}if(j===c){S.push(E);w.push(B);B={value:"",depth:0,isGlob:false};if(I===true)continue;if(N===l&&E===A+1){A+=2;continue}C=E+1;continue}if(r.noext!==true){const t=j===p||j===n||j===i||j===g||j===u;if(t===true&&peek()===d){O=B.isGlob=true;T=B.isExtglob=true;I=true;if(j===u&&E===A){F=true}if(_===true){while(eos()!==true&&(j=advance())){if(j===o){D=B.backslashes=true;j=advance();continue}if(j===y){O=B.isGlob=true;I=true;break}}continue}break}}if(j===i){if(N===i)$=B.isGlobstar=true;O=B.isGlob=true;I=true;if(_===true){continue}break}if(j===g){O=B.isGlob=true;I=true;if(_===true){continue}break}if(j===f){while(eos()!==true&&(t=advance())){if(t===o){D=B.backslashes=true;advance();continue}if(t===v){k=B.isBracket=true;O=B.isGlob=true;I=true;break}}if(_===true){continue}break}if(r.nonegate!==true&&j===u&&E===A){L=B.negated=true;A++;continue}if(r.noparen!==true&&j===d){O=B.isGlob=true;if(_===true){while(eos()!==true&&(j=advance())){if(j===d){D=B.backslashes=true;j=advance();continue}if(j===y){I=true;break}}continue}break}if(O===true){I=true;if(_===true){continue}break}}if(r.noext===true){T=false;O=false}let G=P;let U="";let W="";if(A>0){U=P.slice(0,A);P=P.slice(A);C-=A}if(G&&O===true&&C>0){G=P.slice(0,C);W=P.slice(C)}else if(O===true){G="";W=P}else{G=P}if(G&&G!==""&&G!=="/"&&G!==P){if(isPathSeparator(G.charCodeAt(G.length-1))){G=G.slice(0,-1)}}if(r.unescape===true){if(W)W=s.removeBackslashes(W);if(G&&D===true){G=s.removeBackslashes(G)}}const V={prefix:U,input:t,start:A,base:G,glob:W,isBrace:R,isBracket:k,isGlob:O,isExtglob:T,isGlobstar:$,negated:L,negatedExtglob:F};if(r.tokens===true){V.maxDepth=0;if(!isPathSeparator(j)){w.push(B)}V.tokens=w}if(r.parts===true||r.tokens===true){let e;for(let s=0;s<S.length;s++){const i=e?e+1:A;const n=S[s];const o=t.slice(i,n);if(r.tokens){if(s===0&&A!==0){w[s].isPrefix=true;w[s].value=U}else{w[s].value=o}depth(w[s]);V.maxDepth+=w[s].depth}if(s!==0||o!==""){x.push(o)}e=n}if(e&&e+1<t.length){const s=t.slice(e+1);x.push(s);if(r.tokens){w[w.length-1].value=s;depth(w[w.length-1]);V.maxDepth+=w[w.length-1].depth}}V.slashes=S;V.parts=x}return V};t.exports=scan},2924:(t,e,r)=>{"use strict";const s=r(1017);const i=process.platform==="win32";const{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:l}=r(8223);e.isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);e.hasRegexChars=t=>a.test(t);e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t);e.escapeRegex=t=>t.replace(l,"\\$1");e.toPosixSlashes=t=>t.replace(n,"/");e.removeBackslashes=t=>t.replace(o,(t=>t==="\\"?"":t));e.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};e.isWindows=t=>{if(t&&typeof t.windows==="boolean"){return t.windows}return i===true||s.sep==="\\"};e.escapeLast=(t,r,s)=>{const i=t.lastIndexOf(r,s);if(i===-1)return t;if(t[i-1]==="\\")return e.escapeLast(t,r,i-1);return`${t.slice(0,i)}\\${t.slice(i)}`};e.removePrefix=(t,e={})=>{let r=t;if(r.startsWith("./")){r=r.slice(2);e.prefix="./"}return r};e.wrapOutput=(t,e={},r={})=>{const s=r.contains?"":"^";const i=r.contains?"":"$";let n=`${s}(?:${t})${i}`;if(e.negated===true){n=`(?:^(?!${n}).*$)`}return n}},399:t=>{"use strict";class DatePart{constructor({token:t,date:e,parts:r,locales:s}){this.token=t;this.date=e||new Date;this.parts=r||[this];this.locales=s||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((e,r)=>r>t&&e instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const e=t.indexOf(this);return t.find(((t,r)=>r>e&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},7967:(t,e,r)=>{"use strict";const s=r(399);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends s{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 e=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?e+1:this.token==="ddd"?this.locales.weekdaysShort[e]:this.token==="dddd"?this.locales.weekdays[e]:t}}t.exports=Day},4102:(t,e,r)=>{"use strict";const s=r(399);class Hours extends s{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},7517:(t,e,r)=>{"use strict";t.exports={DatePart:r(399),Meridiem:r(4128),Day:r(7967),Hours:r(4102),Milliseconds:r(6945),Minutes:r(7829),Month:r(8608),Seconds:r(812),Year:r(5227)}},4128:(t,e,r)=>{"use strict";const s=r(399);class Meridiem extends s{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},6945:(t,e,r)=>{"use strict";const s=r(399);class Milliseconds extends s{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},7829:(t,e,r)=>{"use strict";const s=r(399);class Minutes extends s{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},8608:(t,e,r)=>{"use strict";const s=r(399);class Month extends s{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 e=this.token.length;return e===2?String(t+1).padStart(2,"0"):e===3?this.locales.monthsShort[t]:e===4?this.locales.months[t]:String(t+1)}}t.exports=Month},812:(t,e,r)=>{"use strict";const s=r(399);class Seconds extends s{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},5227:(t,e,r)=>{"use strict";const s=r(399);class Year extends s{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},935:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor;const a=r(2800),l=a.style,u=a.clear,c=a.figures,h=a.strip;const getVal=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]);const getTitle=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]);const getIndex=(t,e)=>{const r=t.findIndex((t=>t.value===e||t.title===e));return r>-1?r:undefined};class AutocompletePrompt extends i{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.fallback=t.fallback||(t.initial!==undefined?`${c.pointerSmall} ${getTitle(this.choices,this.initial)}`:`${c.pointerSmall} ${t.noMatches||"no matches found"}`);this.suggestions=[[]];this.page=0;this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=l.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=u("");this.complete(this.render);this.render()}moveSelect(t){this.select=t;if(this.suggestions[this.page].length>0){this.value=getVal(this.suggestions[this.page],t)}else{this.value=this.initial!==undefined?getVal(this.choices,this.initial):null}this.fire()}complete(t){var e=this;return _asyncToGenerator((function*(){const r=e.completing=e.suggest(e.input,e.choices);const s=yield r;if(e.completing!==r)return;e.suggestions=s.map(((t,e,r)=>({title:getTitle(r,e),value:getVal(r,e)}))).reduce(((t,r)=>{if(t[t.length-1].length<e.limit)t[t.length-1].push(r);else t.push([r]);return t}),[[]]);e.isFallback=false;e.completing=false;if(!e.suggestions[e.page])e.page=0;if(!e.suggestions.length&&e.fallback){const t=getIndex(e.choices,e.fallback);e.suggestions=[[]];if(t!==undefined)e.suggestions[0].push({title:getTitle(e.choices,t),value:getVal(e.choices,t)});e.isFallback=true}const i=Math.max(s.length-1,0);e.moveSelect(Math.min(i,e.select));t&&t()}))()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}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()}_(t,e){let r=this.input.slice(0,this.cursor);let s=this.input.slice(this.cursor);this.input=`${r}${t}${s}`;this.cursor=r.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 e=this.input.slice(this.cursor);this.input=`${t}${e}`;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 e=this.input.slice(this.cursor+1);this.input=`${t}${e}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions[this.page].length-1);this.render()}up(){if(this.select<=0)return this.bell();this.moveSelect(this.select-1);this.render()}down(){if(this.select>=this.suggestions[this.page].length-1)return this.bell();this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions[this.page].length-1){this.page=(this.page+1)%this.suggestions.length;this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){if(this.page>=this.suggestions.length-1)return this.bell();this.page++;this.moveSelect(0);this.render()}prevPage(){if(this.page<=0)return this.bell();this.page--;this.moveSelect(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()}render(){if(this.closed)return;super.render();if(this.lineCount)this.out.write(o.down(this.lineCount));let t=s.bold(`${l.symbol(this.done,this.aborted)} ${this.msg} `)+`${l.delimiter(this.completing)} `;let e=h(t).length;if(this.done&&this.suggestions[this.page][this.select]){t+=`${this.suggestions[this.page][this.select].title}`}else{this.rendered=`${this.transform.render(this.input)}`;e+=this.rendered.length;t+=this.rendered}if(!this.done){this.lineCount=this.suggestions[this.page].length;let e=this.suggestions[this.page].reduce(((t,e,r)=>t+`\n${r===this.select?s.cyan(e.title):e.title}`),"");if(e&&!this.isFallback){t+=e;if(this.suggestions.length>1){this.lineCount++;t+=s.blue(`\nPage ${this.page+1}/${this.suggestions.length}`)}}else{const e=getIndex(this.choices,this.fallback);const r=e!==undefined?getTitle(this.choices,e):this.fallback;t+=`\n${s.gray(r)}`;this.lineCount++}}this.out.write(this.clear+t);this.clear=u(t);if(this.lineCount&&!this.done){let t=o.up(this.lineCount);t+=o.left+o.to(e);t+=o.move(-this.rendered.length+this.cursor*this.scale);this.out.write(t)}}}t.exports=AutocompletePrompt},2040:(t,e,r)=>{"use strict";const s=r(9439);const i=r(332),n=i.cursor;const o=r(4047);const a=r(2800),l=a.clear,u=a.style,c=a.figures;class AutocompleteMultiselectPrompt extends o{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=l("");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 e=this.filteredOptions.findIndex((e=>e===t));this.cursor=e<0?0:e;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,e){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){return`\nInstructions:\n ${c.arrowUp}/${c.arrowDown}: Highlight option\n ${c.arrowLeft}/${c.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n `}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:s.gray("Enter something to filter")}\n`}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(c.radioOn):c.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);super.render();let t=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.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=l(t)}}t.exports=AutocompleteMultiselectPrompt},5680:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style;const a=r(332),l=a.erase,u=a.cursor;class ConfirmPrompt extends i{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()}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,e){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(u.hide);super.render();this.out.write(l.line+u.to(0)+[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:s.gray(this.initialValue?this.yesOption:this.noOption)].join(" "))}}t.exports=ConfirmPrompt},3031:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear,l=n.figures,u=n.strip;const c=r(332),h=c.erase,d=c.cursor;const f=r(7517),p=f.DatePart,g=f.Meridiem,m=f.Day,y=f.Hours,v=f.Milliseconds,b=f.Minutes,_=f.Month,S=f.Seconds,w=f.Year;const x=/\\(.)|"((?:\\["\\]|[^"])+)"|(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 P={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new m(t),3:t=>new _(t),4:t=>new w(t),5:t=>new g(t),6:t=>new y(t),7:t=>new b(t),8:t=>new S(t),9:t=>new v(t)};const E={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 i{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(E,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=a("");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 e;this.parts=[];while(e=x.exec(t)){let t=e.shift();let r=e.findIndex((t=>t!=null));this.parts.push(r in P?P[r]({token:e[r]||t,date:this.date,parts:this.parts,locales:this.locales}):e[r]||t)}let r=this.parts.reduce(((t,e)=>{if(typeof e==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=e;else t.push(e);return t}),[]);this.parts.splice(0);this.parts.push(...r);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof p)));this.fire();this.render()}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 e=yield t.validator(t.value);if(typeof e==="string"){t.errorMsg=e;e=false}t.error=!e}))()}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 p)));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(d.hide);else this.out.write(h.lines(1));super.render();let t=h.line+(this.lines?h.down(this.lines):"")+d.to(0);this.lines=0;let e="";if(this.error){let t=this.errorMsg.split("\n");e=t.reduce(((t,e,r)=>t+`\n${r?` `:l.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(false),this.parts.reduce(((t,e,r)=>t.concat(r===this.cursor&&!this.done?s.cyan().underline(e.toString()):e)),[]).join("")].join(" ");let i="";if(this.lines){i+=d.up(this.lines);i+=d.left+d.to(u(r).length)}this.out.write(t+r+e+i)}}t.exports=DatePrompt},9956:(t,e,r)=>{"use strict";t.exports={TextPrompt:r(5430),SelectPrompt:r(8856),TogglePrompt:r(9692),DatePrompt:r(3031),NumberPrompt:r(8831),MultiselectPrompt:r(4047),AutocompletePrompt:r(935),AutocompleteMultiselectPrompt:r(2040),ConfirmPrompt:r(5680)}},4047:(t,e,r)=>{"use strict";const s=r(9439);const i=r(332),n=i.cursor;const o=r(5876);const a=r(2800),l=a.clear,u=a.figures,c=a.style;class MultiselectPrompt extends o{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.value=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=l("");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))}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()}}_(t,e){if(t===" "){this.handleSpaceToggle()}else{return this.bell()}}renderInstructions(){return`\nInstructions:\n ${u.arrowUp}/${u.arrowDown}: Highlight option\n ${u.arrowLeft}/${u.arrowRight}/[space]: Toggle selection\n enter/return: Complete answer\n `}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(u.radioOn):u.radioOff)+" "+i}paginateOptions(t){const e=this.cursor;let r=t.map(((t,r)=>this.renderOption(e,t,r)));const i=10;let n=r;let o="";if(r.length===0){return s.red("No matches for this query.")}else if(r.length>i){let a=e-i/2;let l=e+i/2;if(a<0){a=0;l=i}else if(l>t.length){l=t.length;a=l-i}n=r.slice(a,l);o=s.dim("(Move up and down to reveal more choices)")}return"\n"+n.join("\n")+"\n"+o}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);super.render();let t=[c.symbol(this.done,this.aborted),s.bold(this.msg),c.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.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=l(t)}}t.exports=MultiselectPrompt},8831:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor,a=n.erase;const l=r(2800),u=l.style,c=l.clear,h=l.figures,d=l.strip;const f=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r};class NumberPrompt extends i{constructor(t={}){super(t);this.transform=u.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=s.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||f.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}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 e=yield t.validator(t.value);if(typeof e===`string`){t.errorMsg=e;e=false}t.error=!e}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color=`red`;t.fire();t.render();return}let e=t.value;t.value=e!==``?e: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.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;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))||``;this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,e){if(!this.valid(t))return this.bell();const r=Date.now();if(r-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=r;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;super.render();let t=a.line+(this.lines?a.down(this.lines):``)+o.to(0);this.lines=0;let e=``;if(this.error){let t=this.errorMsg.split(`\n`);e+=t.reduce(((t,e,r)=>t+`\n${r?` `:h.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=!this.done||!this.done&&!this.placeholder;let i=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(this.done),r?s[this.color]().underline(this.rendered):this.rendered].join(` `);let n=``;if(this.lines){n+=o.up(this.lines);n+=o.left+o.to(d(i).length)}this.out.write(t+i+e+n)}}t.exports=NumberPrompt},5876:(t,e,r)=>{"use strict";const s=r(4521);const i=r(2800),n=i.action;const o=r(2361);const a=r(332),l=a.beep,u=a.cursor;const c=r(9439);class Prompt extends o{constructor(t={}){super();this.firstRender=true;this.in=t.in||process.stdin;this.out=t.out||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const e=s.createInterface(this.in);s.emitKeypressEvents(this.in,e);if(this.in.isTTY)this.in.setRawMode(true);const keypress=(t,e)=>{let r=n(e);if(r===false){this._&&this._(t,e)}else if(typeof this[r]==="function"){this[r](e)}else{this.bell()}};this.close=()=>{this.out.write(u.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);e.close();this.emit(this.aborted?"abort":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted})}bell(){this.out.write(l)}render(){this.onRender(c);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},8856:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear,l=n.figures;const u=r(332),c=u.erase,h=u.cursor;class SelectPrompt extends i{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,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.value=(this.choices[this.cursor]||{}).value;this.clear=a("");this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}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)return this.bell();this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)return this.bell();this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,e){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(c.lines(this.choices.length+1));super.render();this.out.write([o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(false),this.done?this.selection.title:this.selection.disabled?s.yellow(this.warn):s.gray(this.hint)].join(" "));if(!this.done){this.out.write("\n"+this.choices.map(((t,e)=>{let r,i;if(t.disabled){r=this.cursor===e?s.gray().underline(t.title):s.strikethrough().gray(t.title);i=this.cursor===e?s.bold().gray(l.pointer)+" ":" "}else{r=this.cursor===e?s.cyan().underline(t.title):t.title;i=this.cursor===e?s.cyan(l.pointer)+" ":" "}return`${i} ${r}`})).join("\n"))}}}t.exports=SelectPrompt},5430:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor;const a=r(2800),l=a.style,u=a.clear,c=a.strip,h=a.figures;class TextPrompt extends i{constructor(t={}){super(t);this.transform=l.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.clear=u(``);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=s.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.fire();this.render()}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 e=yield t.validator(t.value);if(typeof e===`string`){t.errorMsg=e;e=false}t.error=!e}))()}submit(){var t=this;return _asyncToGenerator((function*(){t.value=t.value||t.initial;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}_(t,e){let r=this.value.slice(0,this.cursor);let s=this.value.slice(this.cursor);this.value=`${r}${t}${s}`;this.red=false;this.cursor=this.placeholder?0:r.length+1;this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.value.slice(0,this.cursor-1);let e=this.value.slice(this.cursor);this.value=`${t}${e}`;this.red=false;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 e=this.value.slice(this.cursor+1);this.value=`${t}${e}`;this.red=false;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()}render(){if(this.closed)return;super.render();let t=(this.lines?o.down(this.lines):``)+this.clear;this.lines=0;let e=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(` `);let r=``;if(this.error){let t=this.errorMsg.split(`\n`);r+=t.reduce(((t,e,r)=>t+=`\n${r?" ":h.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let i=``;if(this.lines){i+=o.up(this.lines);i+=o.left+o.to(c(e).length)}i+=o.move(this.placeholder?-this.initial.length*this.scale:-this.rendered.length+this.cursor*this.scale);this.out.write(t+e+r+i);this.clear=u(e+r)}}t.exports=TextPrompt},9692:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear;const l=r(332),u=l.cursor,c=l.erase;class TogglePrompt extends i{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()}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,e){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(u.hide);super.render();this.out.write(c.lines(this.first?1:this.msg.split(/\n/g).length)+u.to(0)+[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.value?this.inactive:s.cyan().underline(this.inactive),s.gray("/"),this.value?s.cyan().underline(this.active):this.active].join(" "))}}t.exports=TogglePrompt},6598:(t,e,r)=>{"use strict";function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};var s=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){s=s.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))}s.forEach((function(e){_defineProperty(t,e,r[e])}))}return t}function _defineProperty(t,e,r){if(e in t){Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true})}else{t[e]=r}return t}function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(4591);const i=["suggest","format","onState","validate","onRender"];const noop=()=>{};function prompt(){return _prompt.apply(this,arguments)}function _prompt(){_prompt=_asyncToGenerator((function*(t=[],{onSubmit:e=noop,onCancel:r=noop}={}){const n={};const o=prompt._override||{};t=[].concat(t);let a,l,u,c,h;const d=function(){var t=_asyncToGenerator((function*(t,e,r=false){if(!r&&t.validate&&t.validate(e)!==true){return}return t.format?yield t.format(e,n):e}));return function getFormattedAnswer(e,r){return t.apply(this,arguments)}}();var f=true;var p=false;var g=undefined;try{for(var m=t[Symbol.iterator](),y;!(f=(y=m.next()).done);f=true){l=y.value;var v=l;c=v.name;h=v.type;for(let t in l){if(i.includes(t))continue;let e=l[t];l[t]=typeof e==="function"?yield e(a,_objectSpread({},n),l):e}if(typeof l.message!=="string"){throw new Error("prompt message is required")}var b=l;c=b.name;h=b.type;if(!h)continue;if(s[h]===void 0){throw new Error(`prompt type (${h}) is not defined`)}if(o[l.name]!==undefined){a=yield d(l,o[l.name]);if(a!==undefined){n[c]=a;continue}}try{a=prompt._injected?getInjectedAnswer(prompt._injected):yield s[h](l);n[c]=a=yield d(l,a,true);u=yield e(l,a,n)}catch(t){u=!(yield r(l,n))}if(u)return n}}catch(t){p=true;g=t}finally{try{if(!f&&m.return!=null){m.return()}}finally{if(p){throw g}}}return n}));return _prompt.apply(this,arguments)}function getInjectedAnswer(t){const e=t.shift();if(e instanceof Error){throw e}return e}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:s,inject:inject,override:override})},4591:(t,e,r)=>{"use strict";const s=e;const i=r(9956);const noop=t=>t;function toPrompt(t,e,r={}){return new Promise(((s,n)=>{const o=new i[t](e);const a=r.onAbort||noop;const l=r.onSubmit||noop;o.on("state",e.onState||noop);o.on("submit",(t=>s(l(t))));o.on("abort",(t=>n(a(t))))}))}s.text=t=>toPrompt("TextPrompt",t);s.password=t=>{t.style="password";return s.text(t)};s.invisible=t=>{t.style="invisible";return s.text(t)};s.number=t=>toPrompt("NumberPrompt",t);s.date=t=>toPrompt("DatePrompt",t);s.confirm=t=>toPrompt("ConfirmPrompt",t);s.list=t=>{const e=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(e).map((t=>t.trim()))})};s.toggle=t=>toPrompt("TogglePrompt",t);s.select=t=>toPrompt("SelectPrompt",t);s.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})};s.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,e)=>Promise.resolve(e.filter((e=>e.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));s.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},8692:t=>{"use strict";t.exports=t=>{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(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"abort";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";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}},3513:(t,e,r)=>{"use strict";const s=r(8760);const i=r(332),n=i.erase,o=i.cursor;const width=t=>[...s(t)].length;t.exports=function(t,e=process.stdout.columns){if(!e)return n.line+o.to(0);let r=0;const s=t.split(/\r?\n/);var i=true;var a=false;var l=undefined;try{for(var u=s[Symbol.iterator](),c;!(i=(c=u.next()).done);i=true){let t=c.value;r+=1+Math.floor(Math.max(width(t)-1,0)/e)}}catch(t){a=true;l=t}finally{try{if(!i&&u.return!=null){u.return()}}finally{if(a){throw l}}}return(n.line+o.prevLine()).repeat(r-1)+n.line+o.to(0)}},6217:t=>{"use strict";const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const s=process.platform==="win32"?r:e;t.exports=s},2800:(t,e,r)=>{"use strict";t.exports={action:r(8692),clear:r(3513),style:r(5012),strip:r(8760),figures:r(6217)}},8760:t=>{"use strict";t.exports=t=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const r=new RegExp(e,"g");return typeof t==="string"?t.replace(r,""):t}},5012:(t,e,r)=>{"use strict";const s=r(9439);const i=r(6217);const n=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=>n[t]||n.default;const o=Object.freeze({aborted:s.red(i.cross),done:s.green(i.tick),default:s.cyan("?")});const symbol=(t,e)=>e?o.aborted:t?o.done:o.default;const delimiter=t=>s.gray(t?i.ellipsis:i.pointerSmall);const item=(t,e)=>s.gray(t?e?i.pointerSmall:"+":i.line);t.exports={styles:n,render:render,symbols:o,symbol:symbol,delimiter:delimiter,item:item}},1112:(t,e,r)=>{function isNodeLT(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let e=0,r=process.versions.node.split(".").map(Number);for(;e<t.length;e++){if(r[e]>t[e])return false;if(t[e]>r[e])return true}return false}t.exports=isNodeLT("8.6.0")?r(6598):r(9590)},8994:t=>{"use strict";class DatePart{constructor({token:t,date:e,parts:r,locales:s}){this.token=t;this.date=e||new Date;this.parts=r||[this];this.locales=s||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((e,r)=>r>t&&e instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const e=t.indexOf(this);return t.find(((t,r)=>r>e&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},5513:(t,e,r)=>{"use strict";const s=r(8994);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends s{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 e=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?e+1:this.token==="ddd"?this.locales.weekdaysShort[e]:this.token==="dddd"?this.locales.weekdays[e]:t}}t.exports=Day},9270:(t,e,r)=>{"use strict";const s=r(8994);class Hours extends s{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},1190:(t,e,r)=>{"use strict";t.exports={DatePart:r(8994),Meridiem:r(8135),Day:r(5513),Hours:r(9270),Milliseconds:r(2397),Minutes:r(9246),Month:r(5763),Seconds:r(5579),Year:r(4191)}},8135:(t,e,r)=>{"use strict";const s=r(8994);class Meridiem extends s{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},2397:(t,e,r)=>{"use strict";const s=r(8994);class Milliseconds extends s{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},9246:(t,e,r)=>{"use strict";const s=r(8994);class Minutes extends s{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},5763:(t,e,r)=>{"use strict";const s=r(8994);class Month extends s{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 e=this.token.length;return e===2?String(t+1).padStart(2,"0"):e===3?this.locales.monthsShort[t]:e===4?this.locales.months[t]:String(t+1)}}t.exports=Month},5579:(t,e,r)=>{"use strict";const s=r(8994);class Seconds extends s{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},4191:(t,e,r)=>{"use strict";const s=r(8994);class Year extends s{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},514:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{cursor:n}=r(332);const{style:o,clear:a,figures:l,strip:u}=r(9807);const getVal=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]);const getTitle=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]);const getIndex=(t,e)=>{const r=t.findIndex((t=>t.value===e||t.title===e));return r>-1?r:undefined};class AutocompletePrompt extends i{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.fallback=t.fallback||(t.initial!==undefined?`${l.pointerSmall} ${getTitle(this.choices,this.initial)}`:`${l.pointerSmall} ${t.noMatches||"no matches found"}`);this.suggestions=[[]];this.page=0;this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=o.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=a("");this.complete(this.render);this.render()}moveSelect(t){this.select=t;if(this.suggestions[this.page].length>0){this.value=getVal(this.suggestions[this.page],t)}else{this.value=this.initial!==undefined?getVal(this.choices,this.initial):null}this.fire()}async complete(t){const e=this.completing=this.suggest(this.input,this.choices);const r=await e;if(this.completing!==e)return;this.suggestions=r.map(((t,e,r)=>({title:getTitle(r,e),value:getVal(r,e)}))).reduce(((t,e)=>{if(t[t.length-1].length<this.limit)t[t.length-1].push(e);else t.push([e]);return t}),[[]]);this.isFallback=false;this.completing=false;if(!this.suggestions[this.page])this.page=0;if(!this.suggestions.length&&this.fallback){const t=getIndex(this.choices,this.fallback);this.suggestions=[[]];if(t!==undefined)this.suggestions[0].push({title:getTitle(this.choices,t),value:getVal(this.choices,t)});this.isFallback=true}const s=Math.max(r.length-1,0);this.moveSelect(Math.min(s,this.select));t&&t()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}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()}_(t,e){let r=this.input.slice(0,this.cursor);let s=this.input.slice(this.cursor);this.input=`${r}${t}${s}`;this.cursor=r.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 e=this.input.slice(this.cursor);this.input=`${t}${e}`;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 e=this.input.slice(this.cursor+1);this.input=`${t}${e}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions[this.page].length-1);this.render()}up(){if(this.select<=0)return this.bell();this.moveSelect(this.select-1);this.render()}down(){if(this.select>=this.suggestions[this.page].length-1)return this.bell();this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions[this.page].length-1){this.page=(this.page+1)%this.suggestions.length;this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){if(this.page>=this.suggestions.length-1)return this.bell();this.page++;this.moveSelect(0);this.render()}prevPage(){if(this.page<=0)return this.bell();this.page--;this.moveSelect(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()}render(){if(this.closed)return;super.render();if(this.lineCount)this.out.write(n.down(this.lineCount));let t=s.bold(`${o.symbol(this.done,this.aborted)} ${this.msg} `)+`${o.delimiter(this.completing)} `;let e=u(t).length;if(this.done&&this.suggestions[this.page][this.select]){t+=`${this.suggestions[this.page][this.select].title}`}else{this.rendered=`${this.transform.render(this.input)}`;e+=this.rendered.length;t+=this.rendered}if(!this.done){this.lineCount=this.suggestions[this.page].length;let e=this.suggestions[this.page].reduce(((t,e,r)=>t+`\n${r===this.select?s.cyan(e.title):e.title}`),"");if(e&&!this.isFallback){t+=e;if(this.suggestions.length>1){this.lineCount++;t+=s.blue(`\nPage ${this.page+1}/${this.suggestions.length}`)}}else{const e=getIndex(this.choices,this.fallback);const r=e!==undefined?getTitle(this.choices,e):this.fallback;t+=`\n${s.gray(r)}`;this.lineCount++}}this.out.write(this.clear+t);this.clear=a(t);if(this.lineCount&&!this.done){let t=n.up(this.lineCount);t+=n.left+n.to(e);t+=n.move(-this.rendered.length+this.cursor*this.scale);this.out.write(t)}}}t.exports=AutocompletePrompt},7685:(t,e,r)=>{"use strict";const s=r(9439);const{cursor:i}=r(332);const n=r(92);const{clear:o,style:a,figures:l}=r(9807);class AutocompleteMultiselectPrompt extends n{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=o("");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 e=this.filteredOptions.findIndex((e=>e===t));this.cursor=e<0?0:e;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,e){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){return`\nInstructions:\n ${l.arrowUp}/${l.arrowDown}: Highlight option\n ${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n `}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:s.gray("Enter something to filter")}\n`}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(l.radioOn):l.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);super.render();let t=[a.symbol(this.done,this.aborted),s.bold(this.msg),a.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.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=o(t)}}t.exports=AutocompleteMultiselectPrompt},3037:(t,e,r)=>{const s=r(9439);const i=r(9126);const{style:n}=r(9807);const{erase:o,cursor:a}=r(332);class ConfirmPrompt extends i{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()}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,e){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(a.hide);super.render();this.out.write(o.line+a.to(0)+[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:s.gray(this.initialValue?this.yesOption:this.noOption)].join(" "))}}t.exports=ConfirmPrompt},5048:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{style:n,clear:o,figures:a,strip:l}=r(9807);const{erase:u,cursor:c}=r(332);const{DatePart:h,Meridiem:d,Day:f,Hours:p,Milliseconds:g,Minutes:m,Month:y,Seconds:v,Year:b}=r(1190);const _=/\\(.)|"((?:\\["\\]|[^"])+)"|(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 S={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new f(t),3:t=>new y(t),4:t=>new b(t),5:t=>new d(t),6:t=>new p(t),7:t=>new m(t),8:t=>new v(t),9:t=>new g(t)};const w={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 i{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(w,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=o("");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 e;this.parts=[];while(e=_.exec(t)){let t=e.shift();let r=e.findIndex((t=>t!=null));this.parts.push(r in S?S[r]({token:e[r]||t,date:this.date,parts:this.parts,locales:this.locales}):e[r]||t)}let r=this.parts.reduce(((t,e)=>{if(typeof e==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=e;else t.push(e);return t}),[]);this.parts.splice(0);this.parts.push(...r);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof h)));this.fire();this.render()}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 h)));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(c.hide);else this.out.write(u.lines(1));super.render();let t=u.line+(this.lines?u.down(this.lines):"")+c.to(0);this.lines=0;let e="";if(this.error){let t=this.errorMsg.split("\n");e=t.reduce(((t,e,r)=>t+`\n${r?` `:a.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(false),this.parts.reduce(((t,e,r)=>t.concat(r===this.cursor&&!this.done?s.cyan().underline(e.toString()):e)),[]).join("")].join(" ");let i="";if(this.lines){i+=c.up(this.lines);i+=c.left+c.to(l(r).length)}this.out.write(t+r+e+i)}}t.exports=DatePrompt},6529:(t,e,r)=>{"use strict";t.exports={TextPrompt:r(1551),SelectPrompt:r(6515),TogglePrompt:r(181),DatePrompt:r(5048),NumberPrompt:r(3686),MultiselectPrompt:r(92),AutocompletePrompt:r(514),AutocompleteMultiselectPrompt:r(7685),ConfirmPrompt:r(3037)}},92:(t,e,r)=>{"use strict";const s=r(9439);const{cursor:i}=r(332);const n=r(9126);const{clear:o,figures:a,style:l}=r(9807);class MultiselectPrompt extends n{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.value=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=o("");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))}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()}}_(t,e){if(t===" "){this.handleSpaceToggle()}else{return this.bell()}}renderInstructions(){return`\nInstructions:\n ${a.arrowUp}/${a.arrowDown}: Highlight option\n ${a.arrowLeft}/${a.arrowRight}/[space]: Toggle selection\n enter/return: Complete answer\n `}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(a.radioOn):a.radioOff)+" "+i}paginateOptions(t){const e=this.cursor;let r=t.map(((t,r)=>this.renderOption(e,t,r)));const i=10;let n=r;let o="";if(r.length===0){return s.red("No matches for this query.")}else if(r.length>i){let a=e-i/2;let l=e+i/2;if(a<0){a=0;l=i}else if(l>t.length){l=t.length;a=l-i}n=r.slice(a,l);o=s.dim("(Move up and down to reveal more choices)")}return"\n"+n.join("\n")+"\n"+o}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);super.render();let t=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.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=o(t)}}t.exports=MultiselectPrompt},3686:(t,e,r)=>{const s=r(9439);const i=r(9126);const{cursor:n,erase:o}=r(332);const{style:a,clear:l,figures:u,strip:c}=r(9807);const h=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r};class NumberPrompt extends i{constructor(t={}){super(t);this.transform=a.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=s.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||h.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}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.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;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))||``;this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,e){if(!this.valid(t))return this.bell();const r=Date.now();if(r-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=r;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;super.render();let t=o.line+(this.lines?o.down(this.lines):``)+n.to(0);this.lines=0;let e=``;if(this.error){let t=this.errorMsg.split(`\n`);e+=t.reduce(((t,e,r)=>t+`\n${r?` `:u.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=!this.done||!this.done&&!this.placeholder;let i=[a.symbol(this.done,this.aborted),s.bold(this.msg),a.delimiter(this.done),r?s[this.color]().underline(this.rendered):this.rendered].join(` `);let l=``;if(this.lines){l+=n.up(this.lines);l+=n.left+n.to(c(i).length)}this.out.write(t+i+e+l)}}t.exports=NumberPrompt},9126:(t,e,r)=>{"use strict";const s=r(4521);const{action:i}=r(9807);const n=r(2361);const{beep:o,cursor:a}=r(332);const l=r(9439);class Prompt extends n{constructor(t={}){super();this.firstRender=true;this.in=t.in||process.stdin;this.out=t.out||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const e=s.createInterface(this.in);s.emitKeypressEvents(this.in,e);if(this.in.isTTY)this.in.setRawMode(true);const keypress=(t,e)=>{let r=i(e);if(r===false){this._&&this._(t,e)}else if(typeof this[r]==="function"){this[r](e)}else{this.bell()}};this.close=()=>{this.out.write(a.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);e.close();this.emit(this.aborted?"abort":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted})}bell(){this.out.write(o)}render(){this.onRender(l);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},6515:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{style:n,clear:o,figures:a}=r(9807);const{erase:l,cursor:u}=r(332);class SelectPrompt extends i{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,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.value=(this.choices[this.cursor]||{}).value;this.clear=o("");this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}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)return this.bell();this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)return this.bell();this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,e){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);else this.out.write(l.lines(this.choices.length+1));super.render();this.out.write([n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(false),this.done?this.selection.title:this.selection.disabled?s.yellow(this.warn):s.gray(this.hint)].join(" "));if(!this.done){this.out.write("\n"+this.choices.map(((t,e)=>{let r,i;if(t.disabled){r=this.cursor===e?s.gray().underline(t.title):s.strikethrough().gray(t.title);i=this.cursor===e?s.bold().gray(a.pointer)+" ":" "}else{r=this.cursor===e?s.cyan().underline(t.title):t.title;i=this.cursor===e?s.cyan(a.pointer)+" ":" "}return`${i} ${r}`})).join("\n"))}}}t.exports=SelectPrompt},1551:(t,e,r)=>{const s=r(9439);const i=r(9126);const{cursor:n}=r(332);const{style:o,clear:a,strip:l,figures:u}=r(9807);class TextPrompt extends i{constructor(t={}){super(t);this.transform=o.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.clear=a(``);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=s.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.fire();this.render()}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;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}_(t,e){let r=this.value.slice(0,this.cursor);let s=this.value.slice(this.cursor);this.value=`${r}${t}${s}`;this.red=false;this.cursor=this.placeholder?0:r.length+1;this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.value.slice(0,this.cursor-1);let e=this.value.slice(this.cursor);this.value=`${t}${e}`;this.red=false;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 e=this.value.slice(this.cursor+1);this.value=`${t}${e}`;this.red=false;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()}render(){if(this.closed)return;super.render();let t=(this.lines?n.down(this.lines):``)+this.clear;this.lines=0;let e=[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(` `);let r=``;if(this.error){let t=this.errorMsg.split(`\n`);r+=t.reduce(((t,e,r)=>t+=`\n${r?" ":u.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let i=``;if(this.lines){i+=n.up(this.lines);i+=n.left+n.to(l(e).length)}i+=n.move(this.placeholder?-this.initial.length*this.scale:-this.rendered.length+this.cursor*this.scale);this.out.write(t+e+r+i);this.clear=a(e+r)}}t.exports=TextPrompt},181:(t,e,r)=>{const s=r(9439);const i=r(9126);const{style:n,clear:o}=r(9807);const{cursor:a,erase:l}=r(332);class TogglePrompt extends i{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()}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,e){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(a.hide);super.render();this.out.write(l.lines(this.first?1:this.msg.split(/\n/g).length)+a.to(0)+[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(this.done),this.value?this.inactive:s.cyan().underline(this.inactive),s.gray("/"),this.value?s.cyan().underline(this.active):this.active].join(" "))}}t.exports=TogglePrompt},9590:(t,e,r)=>{"use strict";const s=r(4450);const i=["suggest","format","onState","validate","onRender"];const noop=()=>{};async function prompt(t=[],{onSubmit:e=noop,onCancel:r=noop}={}){const n={};const o=prompt._override||{};t=[].concat(t);let a,l,u,c,h;const getFormattedAnswer=async(t,e,r=false)=>{if(!r&&t.validate&&t.validate(e)!==true){return}return t.format?await t.format(e,n):e};for(l of t){({name:c,type:h}=l);for(let t in l){if(i.includes(t))continue;let e=l[t];l[t]=typeof e==="function"?await e(a,{...n},l):e}if(typeof l.message!=="string"){throw new Error("prompt message is required")}({name:c,type:h}=l);if(!h)continue;if(s[h]===void 0){throw new Error(`prompt type (${h}) is not defined`)}if(o[l.name]!==undefined){a=await getFormattedAnswer(l,o[l.name]);if(a!==undefined){n[c]=a;continue}}try{a=prompt._injected?getInjectedAnswer(prompt._injected):await s[h](l);n[c]=a=await getFormattedAnswer(l,a,true);u=await e(l,a,n)}catch(t){u=!await r(l,n)}if(u)return n}return n}function getInjectedAnswer(t){const e=t.shift();if(e instanceof Error){throw e}return e}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:s,inject:inject,override:override})},4450:(t,e,r)=>{"use strict";const s=e;const i=r(6529);const noop=t=>t;function toPrompt(t,e,r={}){return new Promise(((s,n)=>{const o=new i[t](e);const a=r.onAbort||noop;const l=r.onSubmit||noop;o.on("state",e.onState||noop);o.on("submit",(t=>s(l(t))));o.on("abort",(t=>n(a(t))))}))}s.text=t=>toPrompt("TextPrompt",t);s.password=t=>{t.style="password";return s.text(t)};s.invisible=t=>{t.style="invisible";return s.text(t)};s.number=t=>toPrompt("NumberPrompt",t);s.date=t=>toPrompt("DatePrompt",t);s.confirm=t=>toPrompt("ConfirmPrompt",t);s.list=t=>{const e=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(e).map((t=>t.trim()))})};s.toggle=t=>toPrompt("TogglePrompt",t);s.select=t=>toPrompt("SelectPrompt",t);s.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})};s.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,e)=>Promise.resolve(e.filter((e=>e.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));s.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},8573:t=>{"use strict";t.exports=t=>{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(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"abort";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";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}},6747:(t,e,r)=>{"use strict";const s=r(2714);const{erase:i,cursor:n}=r(332);const width=t=>[...s(t)].length;t.exports=function(t,e=process.stdout.columns){if(!e)return i.line+n.to(0);let r=0;const s=t.split(/\r?\n/);for(let t of s){r+=1+Math.floor(Math.max(width(t)-1,0)/e)}return(i.line+n.prevLine()).repeat(r-1)+i.line+n.to(0)}},3034:t=>{"use strict";const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const s=process.platform==="win32"?r:e;t.exports=s},9807:(t,e,r)=>{"use strict";t.exports={action:r(8573),clear:r(6747),style:r(7357),strip:r(2714),figures:r(3034)}},2714:t=>{"use strict";t.exports=t=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const r=new RegExp(e,"g");return typeof t==="string"?t.replace(r,""):t}},7357:(t,e,r)=>{"use strict";const s=r(9439);const i=r(3034);const n=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=>n[t]||n.default;const o=Object.freeze({aborted:s.red(i.cross),done:s.green(i.tick),default:s.cyan("?")});const symbol=(t,e)=>e?o.aborted:t?o.done:o.default;const delimiter=t=>s.gray(t?i.ellipsis:i.pointerSmall);const item=(t,e)=>s.gray(t?e?i.pointerSmall:"+":i.line);t.exports={styles:n,render:render,symbols:o,symbol:symbol,delimiter:delimiter,item:item}},3135:t=>{
54
+ */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}},228:(t,e,r)=>{var s=r(7147);var i;if(process.platform==="win32"||global.TESTING_WINDOWS){i=r(7214)}else{i=r(5211)}t.exports=isexe;isexe.sync=sync;function isexe(t,e,r){if(typeof e==="function"){r=e;e={}}if(!r){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(r,s){isexe(t,e||{},(function(t,e){if(t){s(t)}else{r(e)}}))}))}i(t,e||{},(function(t,s){if(t){if(t.code==="EACCES"||e&&e.ignoreErrors){t=null;s=false}}r(t,s)}))}function sync(t,e){try{return i.sync(t,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES"){return false}else{throw t}}}},5211:(t,e,r)=>{t.exports=isexe;isexe.sync=sync;var s=r(7147);function isexe(t,e,r){s.stat(t,(function(t,s){r(t,t?false:checkStat(s,e))}))}function sync(t,e){return checkStat(s.statSync(t),e)}function checkStat(t,e){return t.isFile()&&checkMode(t,e)}function checkMode(t,e){var r=t.mode;var s=t.uid;var i=t.gid;var n=e.uid!==undefined?e.uid:process.getuid&&process.getuid();var o=e.gid!==undefined?e.gid:process.getgid&&process.getgid();var a=parseInt("100",8);var l=parseInt("010",8);var u=parseInt("001",8);var c=a|l;var h=r&u||r&l&&i===o||r&a&&s===n||r&c&&n===0;return h}},7214:(t,e,r)=>{t.exports=isexe;isexe.sync=sync;var s=r(7147);function checkPathExt(t,e){var r=e.pathExt!==undefined?e.pathExt:process.env.PATHEXT;if(!r){return true}r=r.split(";");if(r.indexOf("")!==-1){return true}for(var s=0;s<r.length;s++){var i=r[s].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i){return true}}return false}function checkStat(t,e,r){if(!t.isSymbolicLink()&&!t.isFile()){return false}return checkPathExt(e,r)}function isexe(t,e,r){s.stat(t,(function(s,i){r(s,s?false:checkStat(i,t,e))}))}function sync(t,e){return checkStat(s.statSync(t),t,e)}},9439:t=>{"use strict";const{FORCE_COLOR:e,NODE_DISABLE_COLORS:r,TERM:s}=process.env;const i={enabled:!r&&s!=="dumb"&&e!=="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,e){let r=0,s,i="",n="";for(;r<t.length;r++){s=t[r];i+=s.open;n+=s.close;if(e.includes(s.close)){e=e.replace(s.rgx,s.close+s.open)}}return i+e+n}function chain(t,e){let r={has:t,keys:e};r.reset=i.reset.bind(r);r.bold=i.bold.bind(r);r.dim=i.dim.bind(r);r.italic=i.italic.bind(r);r.underline=i.underline.bind(r);r.inverse=i.inverse.bind(r);r.hidden=i.hidden.bind(r);r.strikethrough=i.strikethrough.bind(r);r.black=i.black.bind(r);r.red=i.red.bind(r);r.green=i.green.bind(r);r.yellow=i.yellow.bind(r);r.blue=i.blue.bind(r);r.magenta=i.magenta.bind(r);r.cyan=i.cyan.bind(r);r.white=i.white.bind(r);r.gray=i.gray.bind(r);r.grey=i.grey.bind(r);r.bgBlack=i.bgBlack.bind(r);r.bgRed=i.bgRed.bind(r);r.bgGreen=i.bgGreen.bind(r);r.bgYellow=i.bgYellow.bind(r);r.bgBlue=i.bgBlue.bind(r);r.bgMagenta=i.bgMagenta.bind(r);r.bgCyan=i.bgCyan.bind(r);r.bgWhite=i.bgWhite.bind(r);return r}function init(t,e){let r={open:`[${t}m`,close:`[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(e){if(this!==void 0&&this.has!==void 0){this.has.includes(t)||(this.has.push(t),this.keys.push(r));return e===void 0?this:i.enabled?run(this.keys,e+""):e+""}return e===void 0?chain([t],[r]):i.enabled?run([r],e+""):e+""}}t.exports=i},2375:(t,e,r)=>{"use strict";const s=r(2781);const i=s.PassThrough;const n=Array.prototype.slice;t.exports=merge2;function merge2(){const t=[];const e=n.call(arguments);let r=false;let s=e[e.length-1];if(s&&!Array.isArray(s)&&s.pipe==null){e.pop()}else{s={}}const o=s.end!==false;const a=s.pipeError===true;if(s.objectMode==null){s.objectMode=true}if(s.highWaterMark==null){s.highWaterMark=64*1024}const l=i(s);function addStream(){for(let e=0,r=arguments.length;e<r;e++){t.push(pauseStreams(arguments[e],s))}mergeStream();return this}function mergeStream(){if(r){return}r=true;let e=t.shift();if(!e){process.nextTick(endStream);return}if(!Array.isArray(e)){e=[e]}let s=e.length+1;function next(){if(--s>0){return}r=false;mergeStream()}function pipe(t){function onend(){t.removeListener("merge2UnpipeEnd",onend);t.removeListener("end",onend);if(a){t.removeListener("error",onerror)}next()}function onerror(t){l.emit("error",t)}if(t._readableState.endEmitted){return next()}t.on("merge2UnpipeEnd",onend);t.on("end",onend);if(a){t.on("error",onerror)}t.pipe(l,{end:false});t.resume()}for(let t=0;t<e.length;t++){pipe(e[t])}next()}function endStream(){r=false;l.emit("queueDrain");if(o){l.end()}}l.setMaxListeners(0);l.add=addStream;l.on("unpipe",(function(t){t.emit("merge2UnpipeEnd")}));if(e.length){addStream.apply(null,e)}return l}function pauseStreams(t,e){if(!Array.isArray(t)){if(!t._readableState&&t.pipe){t=t.pipe(i(e))}if(!t._readableState||!t.pause||!t.pipe){throw new Error("Only readable stream can be merged.")}t.pause()}else{for(let r=0,s=t.length;r<s;r++){t[r]=pauseStreams(t[r],e)}}return t}},9015:(t,e,r)=>{"use strict";const s=r(3837);const i=r(538);const n=r(9138);const o=r(2924);const isEmptyString=t=>t===""||t==="./";const hasBraces=t=>{const e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1};const micromatch=(t,e,r)=>{e=[].concat(e);t=[].concat(t);let s=new Set;let i=new Set;let o=new Set;let a=0;let onResult=t=>{o.add(t.output);if(r&&r.onResult){r.onResult(t)}};for(let o=0;o<e.length;o++){let l=n(String(e[o]),{...r,onResult:onResult},true);let u=l.state.negated||l.state.negatedExtglob;if(u)a++;for(let e of t){let t=l(e,true);let r=u?!t.isMatch:t.isMatch;if(!r)continue;if(u){s.add(t.output)}else{s.delete(t.output);i.add(t.output)}}}let l=a===e.length?[...o]:[...i];let u=l.filter((t=>!s.has(t)));if(r&&u.length===0){if(r.failglob===true){throw new Error(`No matches found for "${e.join(", ")}"`)}if(r.nonull===true||r.nullglob===true){return r.unescape?e.map((t=>t.replace(/\\/g,""))):e}}return u};micromatch.match=micromatch;micromatch.matcher=(t,e)=>n(t,e);micromatch.isMatch=(t,e,r)=>n(e,r)(t);micromatch.any=micromatch.isMatch;micromatch.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set;let i=[];let onResult=t=>{if(r.onResult)r.onResult(t);i.push(t.output)};let n=new Set(micromatch(t,e,{...r,onResult:onResult}));for(let t of i){if(!n.has(t)){s.add(t)}}return[...s]};micromatch.contains=(t,e,r)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${s.inspect(t)}"`)}if(Array.isArray(e)){return e.some((e=>micromatch.contains(t,e,r)))}if(typeof e==="string"){if(isEmptyString(t)||isEmptyString(e)){return false}if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e)){return true}}return micromatch.isMatch(t,e,{...r,contains:true})};micromatch.matchKeys=(t,e,r)=>{if(!o.isObject(t)){throw new TypeError("Expected the first argument to be an object")}let s=micromatch(Object.keys(t),e,r);let i={};for(let e of s)i[e]=t[e];return i};micromatch.some=(t,e,r)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),r);if(s.some((t=>e(t)))){return true}}return false};micromatch.every=(t,e,r)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),r);if(!s.every((t=>e(t)))){return false}}return true};micromatch.all=(t,e,r)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${s.inspect(t)}"`)}return[].concat(e).every((e=>n(e,r)(t)))};micromatch.capture=(t,e,r)=>{let s=o.isWindows(r);let i=n.makeRe(String(t),{...r,capture:true});let a=i.exec(s?o.toPosixSlashes(e):e);if(a){return a.slice(1).map((t=>t===void 0?"":t))}};micromatch.makeRe=(...t)=>n.makeRe(...t);micromatch.scan=(...t)=>n.scan(...t);micromatch.parse=(t,e)=>{let r=[];for(let s of[].concat(t||[])){for(let t of i(String(s),e)){r.push(n.parse(t,e))}}return r};micromatch.braces=(t,e)=>{if(typeof t!=="string")throw new TypeError("Expected a string");if(e&&e.nobrace===true||!hasBraces(t)){return[t]}return i(t,e)};micromatch.braceExpand=(t,e)=>{if(typeof t!=="string")throw new TypeError("Expected a string");return micromatch.braces(t,{...e,expand:true})};micromatch.hasBraces=hasBraces;t.exports=micromatch},5912:t=>{"use strict";function hasKey(t,e){var r=t;e.slice(0,-1).forEach((function(t){r=r[t]||{}}));var s=e[e.length-1];return s in r}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,e){return e==="constructor"&&typeof t[e]==="function"||e==="__proto__"}t.exports=function(t,e){if(!e){e={}}var r={bools:{},strings:{},unknownFn:null};if(typeof e.unknown==="function"){r.unknownFn=e.unknown}if(typeof e.boolean==="boolean"&&e.boolean){r.allBools=true}else{[].concat(e.boolean).filter(Boolean).forEach((function(t){r.bools[t]=true}))}var s={};function aliasIsBoolean(t){return s[t].some((function(t){return r.bools[t]}))}Object.keys(e.alias||{}).forEach((function(t){s[t]=[].concat(e.alias[t]);s[t].forEach((function(e){s[e]=[t].concat(s[t].filter((function(t){return e!==t})))}))}));[].concat(e.string).filter(Boolean).forEach((function(t){r.strings[t]=true;if(s[t]){[].concat(s[t]).forEach((function(t){r.strings[t]=true}))}}));var i=e.default||{};var n={_:[]};function argDefined(t,e){return r.allBools&&/^--[^=]+$/.test(e)||r.strings[t]||r.bools[t]||s[t]}function setKey(t,e,s){var i=t;for(var n=0;n<e.length-1;n++){var o=e[n];if(isConstructorOrProto(i,o)){return}if(i[o]===undefined){i[o]={}}if(i[o]===Object.prototype||i[o]===Number.prototype||i[o]===String.prototype){i[o]={}}if(i[o]===Array.prototype){i[o]=[]}i=i[o]}var a=e[e.length-1];if(isConstructorOrProto(i,a)){return}if(i===Object.prototype||i===Number.prototype||i===String.prototype){i={}}if(i===Array.prototype){i=[]}if(i[a]===undefined||r.bools[a]||typeof i[a]==="boolean"){i[a]=s}else if(Array.isArray(i[a])){i[a].push(s)}else{i[a]=[i[a],s]}}function setArg(t,e,i){if(i&&r.unknownFn&&!argDefined(t,i)){if(r.unknownFn(i)===false){return}}var o=!r.strings[t]&&isNumber(e)?Number(e):e;setKey(n,t.split("."),o);(s[t]||[]).forEach((function(t){setKey(n,t.split("."),o)}))}Object.keys(r.bools).forEach((function(t){setArg(t,i[t]===undefined?false:i[t])}));var o=[];if(t.indexOf("--")!==-1){o=t.slice(t.indexOf("--")+1);t=t.slice(0,t.indexOf("--"))}for(var a=0;a<t.length;a++){var l=t[a];var u;var c;if(/^--.+=/.test(l)){var h=l.match(/^--([^=]+)=([\s\S]*)$/);u=h[1];var d=h[2];if(r.bools[u]){d=d!=="false"}setArg(u,d,l)}else if(/^--no-.+/.test(l)){u=l.match(/^--no-(.+)/)[1];setArg(u,false,l)}else if(/^--.+/.test(l)){u=l.match(/^--(.+)/)[1];c=t[a+1];if(c!==undefined&&!/^(-|--)[^-]/.test(c)&&!r.bools[u]&&!r.allBools&&(s[u]?!aliasIsBoolean(u):true)){setArg(u,c,l);a+=1}else if(/^(true|false)$/.test(c)){setArg(u,c==="true",l);a+=1}else{setArg(u,r.strings[u]?"":true,l)}}else if(/^-[^-]+/.test(l)){var f=l.slice(1,-1).split("");var p=false;for(var g=0;g<f.length;g++){c=l.slice(g+2);if(c==="-"){setArg(f[g],c,l);continue}if(/[A-Za-z]/.test(f[g])&&c[0]==="="){setArg(f[g],c.slice(1),l);p=true;break}if(/[A-Za-z]/.test(f[g])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(c)){setArg(f[g],c,l);p=true;break}if(f[g+1]&&f[g+1].match(/\W/)){setArg(f[g],l.slice(g+2),l);p=true;break}else{setArg(f[g],r.strings[f[g]]?"":true,l)}}u=l.slice(-1)[0];if(!p&&u!=="-"){if(t[a+1]&&!/^(-|--)[^-]/.test(t[a+1])&&!r.bools[u]&&(s[u]?!aliasIsBoolean(u):true)){setArg(u,t[a+1],l);a+=1}else if(t[a+1]&&/^(true|false)$/.test(t[a+1])){setArg(u,t[a+1]==="true",l);a+=1}else{setArg(u,r.strings[u]?"":true,l)}}}else{if(!r.unknownFn||r.unknownFn(l)!==false){n._.push(r.strings._||!isNumber(l)?l:Number(l))}if(e.stopEarly){n._.push.apply(n._,t.slice(a+1));break}}}Object.keys(i).forEach((function(t){if(!hasKey(n,t.split("."))){setKey(n,t.split("."),i[t]);(s[t]||[]).forEach((function(e){setKey(n,e.split("."),i[t])}))}}));if(e["--"]){n["--"]=o.slice()}else{o.forEach((function(t){n._.push(t)}))}return n}},2170:t=>{"use strict";const pathKey=(t={})=>{const e=t.env||process.env;const r=t.platform||process.platform;if(r!=="win32"){return"PATH"}return Object.keys(e).reverse().find((t=>t.toUpperCase()==="PATH"))||"Path"};t.exports=pathKey;t.exports["default"]=pathKey},9397:(t,e,r)=>{let s=r(6224);let i=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||s.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env);let formatter=(t,e,r=t)=>s=>{let i=""+s;let n=i.indexOf(e,t.length);return~n?t+replaceClose(i,e,r,n)+e:t+i+e};let replaceClose=(t,e,r,s)=>{let i=t.substring(0,s)+r;let n=t.substring(s+e.length);let o=n.indexOf(e);return~o?i+replaceClose(n,e,r,o):i+n};let createColors=(t=i)=>({isColorSupported:t,reset:t?t=>`${t}`:String,bold:t?formatter("","",""):String,dim:t?formatter("","",""):String,italic:t?formatter("",""):String,underline:t?formatter("",""):String,inverse:t?formatter("",""):String,hidden:t?formatter("",""):String,strikethrough:t?formatter("",""):String,black:t?formatter("",""):String,red:t?formatter("",""):String,green:t?formatter("",""):String,yellow:t?formatter("",""):String,blue:t?formatter("",""):String,magenta:t?formatter("",""):String,cyan:t?formatter("",""):String,white:t?formatter("",""):String,gray:t?formatter("",""):String,bgBlack:t?formatter("",""):String,bgRed:t?formatter("",""):String,bgGreen:t?formatter("",""):String,bgYellow:t?formatter("",""):String,bgBlue:t?formatter("",""):String,bgMagenta:t?formatter("",""):String,bgCyan:t?formatter("",""):String,bgWhite:t?formatter("",""):String});t.exports=createColors();t.exports.createColors=createColors},9138:(t,e,r)=>{"use strict";t.exports=r(4755)},8223:(t,e,r)=>{"use strict";const s=r(1017);const i="\\\\/";const n=`[^${i}]`;const o="\\.";const a="\\+";const l="\\?";const u="\\/";const c="(?=.)";const h="[^/]";const d=`(?:${u}|$)`;const f=`(?:^|${u})`;const p=`${o}{1,2}${d}`;const g=`(?!${o})`;const m=`(?!${f}${p})`;const y=`(?!${o}{0,1}${d})`;const v=`(?!${p})`;const b=`[^.${u}]`;const _=`${h}*?`;const S={DOT_LITERAL:o,PLUS_LITERAL:a,QMARK_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:c,QMARK:h,END_ANCHOR:d,DOTS_SLASH:p,NO_DOT:g,NO_DOTS:m,NO_DOT_SLASH:y,NO_DOTS_SLASH:v,QMARK_NO_DOT:b,STAR:_,START_ANCHOR:f};const w={...S,SLASH_LITERAL:`[${i}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${o}{1,2}(?:[${i}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${i}])${o}{1,2}(?:[${i}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${i}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${i}]|$))`,QMARK_NO_DOT:`[^.${i}]`,START_ANCHOR:`(?:^|[${i}])`,END_ANCHOR:`(?:[${i}]|$)`};const x={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:x,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:s.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?w:S}}},1833:(t,e,r)=>{"use strict";const s=r(8223);const i=r(2924);const{MAX_LENGTH:n,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:l,REPLACEMENTS:u}=s;const expandRange=(t,e)=>{if(typeof e.expandRange==="function"){return e.expandRange(...t,e)}t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch(e){return t.map((t=>i.escapeRegex(t))).join("..")}return r};const syntaxError=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`;const parse=(t,e)=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}t=u[t]||t;const r={...e};const c=typeof r.maxLength==="number"?Math.min(n,r.maxLength):n;let h=t.length;if(h>c){throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${c}`)}const d={type:"bos",value:"",output:r.prepend||""};const f=[d];const p=r.capture?"":"?:";const g=i.isWindows(e);const m=s.globChars(g);const y=s.extglobChars(m);const{DOT_LITERAL:v,PLUS_LITERAL:b,SLASH_LITERAL:_,ONE_CHAR:S,DOTS_SLASH:w,NO_DOT:x,NO_DOT_SLASH:P,NO_DOTS_SLASH:E,QMARK:A,QMARK_NO_DOT:C,STAR:R,START_ANCHOR:k}=m;const globstar=t=>`(${p}(?:(?!${k}${t.dot?w:v}).)*?)`;const O=r.dot?"":x;const T=r.dot?A:C;let $=r.bash===true?globstar(r):R;if(r.capture){$=`(${$})`}if(typeof r.noext==="boolean"){r.noextglob=r.noext}const M={input:t,index:-1,start:0,dot:r.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:f};t=i.removePrefix(t,M);h=t.length;const D=[];const L=[];const F=[];let I=d;let H;const eos=()=>M.index===h-1;const N=M.peek=(e=1)=>t[M.index+e];const j=M.advance=()=>t[++M.index]||"";const remaining=()=>t.slice(M.index+1);const consume=(t="",e=0)=>{M.consumed+=t;M.index+=e};const append=t=>{M.output+=t.output!=null?t.output:t.value;consume(t.value)};const negate=()=>{let t=1;while(N()==="!"&&(N(2)!=="("||N(3)==="?")){j();M.start++;t++}if(t%2===0){return false}M.negated=true;M.start++;return true};const increment=t=>{M[t]++;F.push(t)};const decrement=t=>{M[t]--;F.pop()};const push=t=>{if(I.type==="globstar"){const e=M.braces>0&&(t.type==="comma"||t.type==="brace");const r=t.extglob===true||D.length&&(t.type==="pipe"||t.type==="paren");if(t.type!=="slash"&&t.type!=="paren"&&!e&&!r){M.output=M.output.slice(0,-I.output.length);I.type="star";I.value="*";I.output=$;M.output+=I.output}}if(D.length&&t.type!=="paren"){D[D.length-1].inner+=t.value}if(t.value||t.output)append(t);if(I&&I.type==="text"&&t.type==="text"){I.value+=t.value;I.output=(I.output||"")+t.value;return}t.prev=I;f.push(t);I=t};const extglobOpen=(t,e)=>{const s={...y[e],conditions:1,inner:""};s.prev=I;s.parens=M.parens;s.output=M.output;const i=(r.capture?"(":"")+s.open;increment("parens");push({type:t,value:e,output:M.output?"":S});push({type:"paren",extglob:true,value:j(),output:i});D.push(s)};const extglobClose=t=>{let s=t.close+(r.capture?")":"");let i;if(t.type==="negate"){let n=$;if(t.inner&&t.inner.length>1&&t.inner.includes("/")){n=globstar(r)}if(n!==$||eos()||/^\)+$/.test(remaining())){s=t.close=`)$))${n}`}if(t.inner.includes("*")&&(i=remaining())&&/^\.[^\\/.]+$/.test(i)){const r=parse(i,{...e,fastpaths:false}).output;s=t.close=`)${r})${n})`}if(t.prev.type==="bos"){M.negatedExtglob=true}}push({type:"paren",extglob:true,value:H,output:s});decrement("parens")};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let s=false;let n=t.replace(l,((t,e,r,i,n,o)=>{if(i==="\\"){s=true;return t}if(i==="?"){if(e){return e+i+(n?A.repeat(n.length):"")}if(o===0){return T+(n?A.repeat(n.length):"")}return A.repeat(r.length)}if(i==="."){return v.repeat(r.length)}if(i==="*"){if(e){return e+i+(n?$:"")}return $}return e?t:`\\${t}`}));if(s===true){if(r.unescape===true){n=n.replace(/\\/g,"")}else{n=n.replace(/\\+/g,(t=>t.length%2===0?"\\\\":t?"\\":""))}}if(n===t&&r.contains===true){M.output=t;return M}M.output=i.wrapOutput(n,M,e);return M}while(!eos()){H=j();if(H==="\0"){continue}if(H==="\\"){const t=N();if(t==="/"&&r.bash!==true){continue}if(t==="."||t===";"){continue}if(!t){H+="\\";push({type:"text",value:H});continue}const e=/^\\+/.exec(remaining());let s=0;if(e&&e[0].length>2){s=e[0].length;M.index+=s;if(s%2!==0){H+="\\"}}if(r.unescape===true){H=j()}else{H+=j()}if(M.brackets===0){push({type:"text",value:H});continue}}if(M.brackets>0&&(H!=="]"||I.value==="["||I.value==="[^")){if(r.posix!==false&&H===":"){const t=I.value.slice(1);if(t.includes("[")){I.posix=true;if(t.includes(":")){const t=I.value.lastIndexOf("[");const e=I.value.slice(0,t);const r=I.value.slice(t+2);const s=o[r];if(s){I.value=e+s;M.backtrack=true;j();if(!d.output&&f.indexOf(I)===1){d.output=S}continue}}}}if(H==="["&&N()!==":"||H==="-"&&N()==="]"){H=`\\${H}`}if(H==="]"&&(I.value==="["||I.value==="[^")){H=`\\${H}`}if(r.posix===true&&H==="!"&&I.value==="["){H="^"}I.value+=H;append({value:H});continue}if(M.quotes===1&&H!=='"'){H=i.escapeRegex(H);I.value+=H;append({value:H});continue}if(H==='"'){M.quotes=M.quotes===1?0:1;if(r.keepQuotes===true){push({type:"text",value:H})}continue}if(H==="("){increment("parens");push({type:"paren",value:H});continue}if(H===")"){if(M.parens===0&&r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const t=D[D.length-1];if(t&&M.parens===t.parens+1){extglobClose(D.pop());continue}push({type:"paren",value:H,output:M.parens?")":"\\)"});decrement("parens");continue}if(H==="["){if(r.nobracket===true||!remaining().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}H=`\\${H}`}else{increment("brackets")}push({type:"bracket",value:H});continue}if(H==="]"){if(r.nobracket===true||I&&I.type==="bracket"&&I.value.length===1){push({type:"text",value:H,output:`\\${H}`});continue}if(M.brackets===0){if(r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:H,output:`\\${H}`});continue}decrement("brackets");const t=I.value.slice(1);if(I.posix!==true&&t[0]==="^"&&!t.includes("/")){H=`/${H}`}I.value+=H;append({value:H});if(r.literalBrackets===false||i.hasRegexChars(t)){continue}const e=i.escapeRegex(I.value);M.output=M.output.slice(0,-I.value.length);if(r.literalBrackets===true){M.output+=e;I.value=e;continue}I.value=`(${p}${e}|${I.value})`;M.output+=I.value;continue}if(H==="{"&&r.nobrace!==true){increment("braces");const t={type:"brace",value:H,output:"(",outputIndex:M.output.length,tokensIndex:M.tokens.length};L.push(t);push(t);continue}if(H==="}"){const t=L[L.length-1];if(r.nobrace===true||!t){push({type:"text",value:H,output:H});continue}let e=")";if(t.dots===true){const t=f.slice();const s=[];for(let e=t.length-1;e>=0;e--){f.pop();if(t[e].type==="brace"){break}if(t[e].type!=="dots"){s.unshift(t[e].value)}}e=expandRange(s,r);M.backtrack=true}if(t.comma!==true&&t.dots!==true){const r=M.output.slice(0,t.outputIndex);const s=M.tokens.slice(t.tokensIndex);t.value=t.output="\\{";H=e="\\}";M.output=r;for(const t of s){M.output+=t.output||t.value}}push({type:"brace",value:H,output:e});decrement("braces");L.pop();continue}if(H==="|"){if(D.length>0){D[D.length-1].conditions++}push({type:"text",value:H});continue}if(H===","){let t=H;const e=L[L.length-1];if(e&&F[F.length-1]==="braces"){e.comma=true;t="|"}push({type:"comma",value:H,output:t});continue}if(H==="/"){if(I.type==="dot"&&M.index===M.start+1){M.start=M.index+1;M.consumed="";M.output="";f.pop();I=d;continue}push({type:"slash",value:H,output:_});continue}if(H==="."){if(M.braces>0&&I.type==="dot"){if(I.value===".")I.output=v;const t=L[L.length-1];I.type="dots";I.output+=H;I.value+=H;t.dots=true;continue}if(M.braces+M.parens===0&&I.type!=="bos"&&I.type!=="slash"){push({type:"text",value:H,output:v});continue}push({type:"dot",value:H,output:v});continue}if(H==="?"){const t=I&&I.value==="(";if(!t&&r.noextglob!==true&&N()==="("&&N(2)!=="?"){extglobOpen("qmark",H);continue}if(I&&I.type==="paren"){const t=N();let e=H;if(t==="<"&&!i.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(I.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(remaining())){e=`\\${H}`}push({type:"text",value:H,output:e});continue}if(r.dot!==true&&(I.type==="slash"||I.type==="bos")){push({type:"qmark",value:H,output:C});continue}push({type:"qmark",value:H,output:A});continue}if(H==="!"){if(r.noextglob!==true&&N()==="("){if(N(2)!=="?"||!/[!=<:]/.test(N(3))){extglobOpen("negate",H);continue}}if(r.nonegate!==true&&M.index===0){negate();continue}}if(H==="+"){if(r.noextglob!==true&&N()==="("&&N(2)!=="?"){extglobOpen("plus",H);continue}if(I&&I.value==="("||r.regex===false){push({type:"plus",value:H,output:b});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||M.parens>0){push({type:"plus",value:H});continue}push({type:"plus",value:b});continue}if(H==="@"){if(r.noextglob!==true&&N()==="("&&N(2)!=="?"){push({type:"at",extglob:true,value:H,output:""});continue}push({type:"text",value:H});continue}if(H!=="*"){if(H==="$"||H==="^"){H=`\\${H}`}const t=a.exec(remaining());if(t){H+=t[0];M.index+=t[0].length}push({type:"text",value:H});continue}if(I&&(I.type==="globstar"||I.star===true)){I.type="star";I.star=true;I.value+=H;I.output=$;M.backtrack=true;M.globstar=true;consume(H);continue}let e=remaining();if(r.noextglob!==true&&/^\([^?]/.test(e)){extglobOpen("star",H);continue}if(I.type==="star"){if(r.noglobstar===true){consume(H);continue}const s=I.prev;const i=s.prev;const n=s.type==="slash"||s.type==="bos";const o=i&&(i.type==="star"||i.type==="globstar");if(r.bash===true&&(!n||e[0]&&e[0]!=="/")){push({type:"star",value:H,output:""});continue}const a=M.braces>0&&(s.type==="comma"||s.type==="brace");const l=D.length&&(s.type==="pipe"||s.type==="paren");if(!n&&s.type!=="paren"&&!a&&!l){push({type:"star",value:H,output:""});continue}while(e.slice(0,3)==="/**"){const r=t[M.index+4];if(r&&r!=="/"){break}e=e.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){I.type="globstar";I.value+=H;I.output=globstar(r);M.output=I.output;M.globstar=true;consume(H);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!o&&eos()){M.output=M.output.slice(0,-(s.output+I.output).length);s.output=`(?:${s.output}`;I.type="globstar";I.output=globstar(r)+(r.strictSlashes?")":"|$)");I.value+=H;M.globstar=true;M.output+=s.output+I.output;consume(H);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&e[0]==="/"){const t=e[1]!==void 0?"|$":"";M.output=M.output.slice(0,-(s.output+I.output).length);s.output=`(?:${s.output}`;I.type="globstar";I.output=`${globstar(r)}${_}|${_}${t})`;I.value+=H;M.output+=s.output+I.output;M.globstar=true;consume(H+j());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&e[0]==="/"){I.type="globstar";I.value+=H;I.output=`(?:^|${_}|${globstar(r)}${_})`;M.output=I.output;M.globstar=true;consume(H+j());push({type:"slash",value:"/",output:""});continue}M.output=M.output.slice(0,-I.output.length);I.type="globstar";I.output=globstar(r);I.value+=H;M.output+=I.output;M.globstar=true;consume(H);continue}const s={type:"star",value:H,output:$};if(r.bash===true){s.output=".*?";if(I.type==="bos"||I.type==="slash"){s.output=O+s.output}push(s);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&r.regex===true){s.output=H;push(s);continue}if(M.index===M.start||I.type==="slash"||I.type==="dot"){if(I.type==="dot"){M.output+=P;I.output+=P}else if(r.dot===true){M.output+=E;I.output+=E}else{M.output+=O;I.output+=O}if(N()!=="*"){M.output+=S;I.output+=S}}push(s)}while(M.brackets>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));M.output=i.escapeLast(M.output,"[");decrement("brackets")}while(M.parens>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));M.output=i.escapeLast(M.output,"(");decrement("parens")}while(M.braces>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));M.output=i.escapeLast(M.output,"{");decrement("braces")}if(r.strictSlashes!==true&&(I.type==="star"||I.type==="bracket")){push({type:"maybe_slash",value:"",output:`${_}?`})}if(M.backtrack===true){M.output="";for(const t of M.tokens){M.output+=t.output!=null?t.output:t.value;if(t.suffix){M.output+=t.suffix}}}return M};parse.fastpaths=(t,e)=>{const r={...e};const o=typeof r.maxLength==="number"?Math.min(n,r.maxLength):n;const a=t.length;if(a>o){throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`)}t=u[t]||t;const l=i.isWindows(e);const{DOT_LITERAL:c,SLASH_LITERAL:h,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:g,NO_DOTS_SLASH:m,STAR:y,START_ANCHOR:v}=s.globChars(l);const b=r.dot?g:p;const _=r.dot?m:p;const S=r.capture?"":"?:";const w={negated:false,prefix:""};let x=r.bash===true?".*?":y;if(r.capture){x=`(${x})`}const globstar=t=>{if(t.noglobstar===true)return x;return`(${S}(?:(?!${v}${t.dot?f:c}).)*?)`};const create=t=>{switch(t){case"*":return`${b}${d}${x}`;case".*":return`${c}${d}${x}`;case"*.*":return`${b}${x}${c}${d}${x}`;case"*/*":return`${b}${x}${h}${d}${_}${x}`;case"**":return b+globstar(r);case"**/*":return`(?:${b}${globstar(r)}${h})?${_}${d}${x}`;case"**/*.*":return`(?:${b}${globstar(r)}${h})?${_}${x}${c}${d}${x}`;case"**/.*":return`(?:${b}${globstar(r)}${h})?${c}${d}${x}`;default:{const e=/^(.*?)\.(\w+)$/.exec(t);if(!e)return;const r=create(e[1]);if(!r)return;return r+c+e[2]}}};const P=i.removePrefix(t,w);let E=create(P);if(E&&r.strictSlashes!==true){E+=`${h}?`}return E};t.exports=parse},4755:(t,e,r)=>{"use strict";const s=r(1017);const i=r(2017);const n=r(1833);const o=r(2924);const a=r(8223);const isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);const picomatch=(t,e,r=false)=>{if(Array.isArray(t)){const s=t.map((t=>picomatch(t,e,r)));const arrayMatcher=t=>{for(const e of s){const r=e(t);if(r)return r}return false};return arrayMatcher}const s=isObject(t)&&t.tokens&&t.input;if(t===""||typeof t!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const i=e||{};const n=o.isWindows(e);const a=s?picomatch.compileRe(t,e):picomatch.makeRe(t,e,false,true);const l=a.state;delete a.state;let isIgnored=()=>false;if(i.ignore){const t={...e,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(i.ignore,t,r)}const matcher=(r,s=false)=>{const{isMatch:o,match:u,output:c}=picomatch.test(r,a,e,{glob:t,posix:n});const h={glob:t,state:l,regex:a,posix:n,input:r,output:c,match:u,isMatch:o};if(typeof i.onResult==="function"){i.onResult(h)}if(o===false){h.isMatch=false;return s?h:false}if(isIgnored(r)){if(typeof i.onIgnore==="function"){i.onIgnore(h)}h.isMatch=false;return s?h:false}if(typeof i.onMatch==="function"){i.onMatch(h)}return s?h:true};if(r){matcher.state=l}return matcher};picomatch.test=(t,e,r,{glob:s,posix:i}={})=>{if(typeof t!=="string"){throw new TypeError("Expected input to be a string")}if(t===""){return{isMatch:false,output:""}}const n=r||{};const a=n.format||(i?o.toPosixSlashes:null);let l=t===s;let u=l&&a?a(t):t;if(l===false){u=a?a(t):t;l=u===s}if(l===false||n.capture===true){if(n.matchBase===true||n.basename===true){l=picomatch.matchBase(t,e,r,i)}else{l=e.exec(u)}}return{isMatch:Boolean(l),match:l,output:u}};picomatch.matchBase=(t,e,r,i=o.isWindows(r))=>{const n=e instanceof RegExp?e:picomatch.makeRe(e,r);return n.test(s.basename(t))};picomatch.isMatch=(t,e,r)=>picomatch(e,r)(t);picomatch.parse=(t,e)=>{if(Array.isArray(t))return t.map((t=>picomatch.parse(t,e)));return n(t,{...e,fastpaths:false})};picomatch.scan=(t,e)=>i(t,e);picomatch.compileRe=(t,e,r=false,s=false)=>{if(r===true){return t.output}const i=e||{};const n=i.contains?"":"^";const o=i.contains?"":"$";let a=`${n}(?:${t.output})${o}`;if(t&&t.negated===true){a=`^(?!${a}).*$`}const l=picomatch.toRegex(a,e);if(s===true){l.state=t}return l};picomatch.makeRe=(t,e={},r=false,s=false)=>{if(!t||typeof t!=="string"){throw new TypeError("Expected a non-empty string")}let i={negated:false,fastpaths:true};if(e.fastpaths!==false&&(t[0]==="."||t[0]==="*")){i.output=n.fastpaths(t,e)}if(!i.output){i=n(t,e)}return picomatch.compileRe(i,e,r,s)};picomatch.toRegex=(t,e)=>{try{const r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(t){if(e&&e.debug===true)throw t;return/$^/}};picomatch.constants=a;t.exports=picomatch},2017:(t,e,r)=>{"use strict";const s=r(2924);const{CHAR_ASTERISK:i,CHAR_AT:n,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:l,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:c,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:y,CHAR_RIGHT_SQUARE_BRACKET:v}=r(8223);const isPathSeparator=t=>t===c||t===o;const depth=t=>{if(t.isPrefix!==true){t.depth=t.isGlobstar?Infinity:1}};const scan=(t,e)=>{const r=e||{};const b=t.length-1;const _=r.parts===true||r.scanToEnd===true;const S=[];const w=[];const x=[];let P=t;let E=-1;let A=0;let C=0;let R=false;let k=false;let O=false;let T=false;let $=false;let M=false;let D=false;let L=false;let F=false;let I=false;let H=0;let N;let j;let B={value:"",depth:0,isGlob:false};const eos=()=>E>=b;const peek=()=>P.charCodeAt(E+1);const advance=()=>{N=j;return P.charCodeAt(++E)};while(E<b){j=advance();let t;if(j===o){D=B.backslashes=true;j=advance();if(j===h){M=true}continue}if(M===true||j===h){H++;while(eos()!==true&&(j=advance())){if(j===o){D=B.backslashes=true;advance();continue}if(j===h){H++;continue}if(M!==true&&j===l&&(j=advance())===l){R=B.isBrace=true;O=B.isGlob=true;I=true;if(_===true){continue}break}if(M!==true&&j===a){R=B.isBrace=true;O=B.isGlob=true;I=true;if(_===true){continue}break}if(j===m){H--;if(H===0){M=false;R=B.isBrace=true;I=true;break}}}if(_===true){continue}break}if(j===c){S.push(E);w.push(B);B={value:"",depth:0,isGlob:false};if(I===true)continue;if(N===l&&E===A+1){A+=2;continue}C=E+1;continue}if(r.noext!==true){const t=j===p||j===n||j===i||j===g||j===u;if(t===true&&peek()===d){O=B.isGlob=true;T=B.isExtglob=true;I=true;if(j===u&&E===A){F=true}if(_===true){while(eos()!==true&&(j=advance())){if(j===o){D=B.backslashes=true;j=advance();continue}if(j===y){O=B.isGlob=true;I=true;break}}continue}break}}if(j===i){if(N===i)$=B.isGlobstar=true;O=B.isGlob=true;I=true;if(_===true){continue}break}if(j===g){O=B.isGlob=true;I=true;if(_===true){continue}break}if(j===f){while(eos()!==true&&(t=advance())){if(t===o){D=B.backslashes=true;advance();continue}if(t===v){k=B.isBracket=true;O=B.isGlob=true;I=true;break}}if(_===true){continue}break}if(r.nonegate!==true&&j===u&&E===A){L=B.negated=true;A++;continue}if(r.noparen!==true&&j===d){O=B.isGlob=true;if(_===true){while(eos()!==true&&(j=advance())){if(j===d){D=B.backslashes=true;j=advance();continue}if(j===y){I=true;break}}continue}break}if(O===true){I=true;if(_===true){continue}break}}if(r.noext===true){T=false;O=false}let G=P;let U="";let W="";if(A>0){U=P.slice(0,A);P=P.slice(A);C-=A}if(G&&O===true&&C>0){G=P.slice(0,C);W=P.slice(C)}else if(O===true){G="";W=P}else{G=P}if(G&&G!==""&&G!=="/"&&G!==P){if(isPathSeparator(G.charCodeAt(G.length-1))){G=G.slice(0,-1)}}if(r.unescape===true){if(W)W=s.removeBackslashes(W);if(G&&D===true){G=s.removeBackslashes(G)}}const V={prefix:U,input:t,start:A,base:G,glob:W,isBrace:R,isBracket:k,isGlob:O,isExtglob:T,isGlobstar:$,negated:L,negatedExtglob:F};if(r.tokens===true){V.maxDepth=0;if(!isPathSeparator(j)){w.push(B)}V.tokens=w}if(r.parts===true||r.tokens===true){let e;for(let s=0;s<S.length;s++){const i=e?e+1:A;const n=S[s];const o=t.slice(i,n);if(r.tokens){if(s===0&&A!==0){w[s].isPrefix=true;w[s].value=U}else{w[s].value=o}depth(w[s]);V.maxDepth+=w[s].depth}if(s!==0||o!==""){x.push(o)}e=n}if(e&&e+1<t.length){const s=t.slice(e+1);x.push(s);if(r.tokens){w[w.length-1].value=s;depth(w[w.length-1]);V.maxDepth+=w[w.length-1].depth}}V.slashes=S;V.parts=x}return V};t.exports=scan},2924:(t,e,r)=>{"use strict";const s=r(1017);const i=process.platform==="win32";const{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:l}=r(8223);e.isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);e.hasRegexChars=t=>a.test(t);e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t);e.escapeRegex=t=>t.replace(l,"\\$1");e.toPosixSlashes=t=>t.replace(n,"/");e.removeBackslashes=t=>t.replace(o,(t=>t==="\\"?"":t));e.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};e.isWindows=t=>{if(t&&typeof t.windows==="boolean"){return t.windows}return i===true||s.sep==="\\"};e.escapeLast=(t,r,s)=>{const i=t.lastIndexOf(r,s);if(i===-1)return t;if(t[i-1]==="\\")return e.escapeLast(t,r,i-1);return`${t.slice(0,i)}\\${t.slice(i)}`};e.removePrefix=(t,e={})=>{let r=t;if(r.startsWith("./")){r=r.slice(2);e.prefix="./"}return r};e.wrapOutput=(t,e={},r={})=>{const s=r.contains?"":"^";const i=r.contains?"":"$";let n=`${s}(?:${t})${i}`;if(e.negated===true){n=`(?:^(?!${n}).*$)`}return n}},399:t=>{"use strict";class DatePart{constructor({token:t,date:e,parts:r,locales:s}){this.token=t;this.date=e||new Date;this.parts=r||[this];this.locales=s||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((e,r)=>r>t&&e instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const e=t.indexOf(this);return t.find(((t,r)=>r>e&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},7967:(t,e,r)=>{"use strict";const s=r(399);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends s{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 e=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?e+1:this.token==="ddd"?this.locales.weekdaysShort[e]:this.token==="dddd"?this.locales.weekdays[e]:t}}t.exports=Day},4102:(t,e,r)=>{"use strict";const s=r(399);class Hours extends s{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},7517:(t,e,r)=>{"use strict";t.exports={DatePart:r(399),Meridiem:r(4128),Day:r(7967),Hours:r(4102),Milliseconds:r(6945),Minutes:r(7829),Month:r(8608),Seconds:r(812),Year:r(5227)}},4128:(t,e,r)=>{"use strict";const s=r(399);class Meridiem extends s{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},6945:(t,e,r)=>{"use strict";const s=r(399);class Milliseconds extends s{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},7829:(t,e,r)=>{"use strict";const s=r(399);class Minutes extends s{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},8608:(t,e,r)=>{"use strict";const s=r(399);class Month extends s{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 e=this.token.length;return e===2?String(t+1).padStart(2,"0"):e===3?this.locales.monthsShort[t]:e===4?this.locales.months[t]:String(t+1)}}t.exports=Month},812:(t,e,r)=>{"use strict";const s=r(399);class Seconds extends s{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},5227:(t,e,r)=>{"use strict";const s=r(399);class Year extends s{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},935:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor;const a=r(2800),l=a.style,u=a.clear,c=a.figures,h=a.strip;const getVal=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]);const getTitle=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]);const getIndex=(t,e)=>{const r=t.findIndex((t=>t.value===e||t.title===e));return r>-1?r:undefined};class AutocompletePrompt extends i{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.fallback=t.fallback||(t.initial!==undefined?`${c.pointerSmall} ${getTitle(this.choices,this.initial)}`:`${c.pointerSmall} ${t.noMatches||"no matches found"}`);this.suggestions=[[]];this.page=0;this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=l.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=u("");this.complete(this.render);this.render()}moveSelect(t){this.select=t;if(this.suggestions[this.page].length>0){this.value=getVal(this.suggestions[this.page],t)}else{this.value=this.initial!==undefined?getVal(this.choices,this.initial):null}this.fire()}complete(t){var e=this;return _asyncToGenerator((function*(){const r=e.completing=e.suggest(e.input,e.choices);const s=yield r;if(e.completing!==r)return;e.suggestions=s.map(((t,e,r)=>({title:getTitle(r,e),value:getVal(r,e)}))).reduce(((t,r)=>{if(t[t.length-1].length<e.limit)t[t.length-1].push(r);else t.push([r]);return t}),[[]]);e.isFallback=false;e.completing=false;if(!e.suggestions[e.page])e.page=0;if(!e.suggestions.length&&e.fallback){const t=getIndex(e.choices,e.fallback);e.suggestions=[[]];if(t!==undefined)e.suggestions[0].push({title:getTitle(e.choices,t),value:getVal(e.choices,t)});e.isFallback=true}const i=Math.max(s.length-1,0);e.moveSelect(Math.min(i,e.select));t&&t()}))()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}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()}_(t,e){let r=this.input.slice(0,this.cursor);let s=this.input.slice(this.cursor);this.input=`${r}${t}${s}`;this.cursor=r.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 e=this.input.slice(this.cursor);this.input=`${t}${e}`;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 e=this.input.slice(this.cursor+1);this.input=`${t}${e}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions[this.page].length-1);this.render()}up(){if(this.select<=0)return this.bell();this.moveSelect(this.select-1);this.render()}down(){if(this.select>=this.suggestions[this.page].length-1)return this.bell();this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions[this.page].length-1){this.page=(this.page+1)%this.suggestions.length;this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){if(this.page>=this.suggestions.length-1)return this.bell();this.page++;this.moveSelect(0);this.render()}prevPage(){if(this.page<=0)return this.bell();this.page--;this.moveSelect(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()}render(){if(this.closed)return;super.render();if(this.lineCount)this.out.write(o.down(this.lineCount));let t=s.bold(`${l.symbol(this.done,this.aborted)} ${this.msg} `)+`${l.delimiter(this.completing)} `;let e=h(t).length;if(this.done&&this.suggestions[this.page][this.select]){t+=`${this.suggestions[this.page][this.select].title}`}else{this.rendered=`${this.transform.render(this.input)}`;e+=this.rendered.length;t+=this.rendered}if(!this.done){this.lineCount=this.suggestions[this.page].length;let e=this.suggestions[this.page].reduce(((t,e,r)=>t+`\n${r===this.select?s.cyan(e.title):e.title}`),"");if(e&&!this.isFallback){t+=e;if(this.suggestions.length>1){this.lineCount++;t+=s.blue(`\nPage ${this.page+1}/${this.suggestions.length}`)}}else{const e=getIndex(this.choices,this.fallback);const r=e!==undefined?getTitle(this.choices,e):this.fallback;t+=`\n${s.gray(r)}`;this.lineCount++}}this.out.write(this.clear+t);this.clear=u(t);if(this.lineCount&&!this.done){let t=o.up(this.lineCount);t+=o.left+o.to(e);t+=o.move(-this.rendered.length+this.cursor*this.scale);this.out.write(t)}}}t.exports=AutocompletePrompt},2040:(t,e,r)=>{"use strict";const s=r(9439);const i=r(332),n=i.cursor;const o=r(4047);const a=r(2800),l=a.clear,u=a.style,c=a.figures;class AutocompleteMultiselectPrompt extends o{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=l("");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 e=this.filteredOptions.findIndex((e=>e===t));this.cursor=e<0?0:e;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,e){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){return`\nInstructions:\n ${c.arrowUp}/${c.arrowDown}: Highlight option\n ${c.arrowLeft}/${c.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n `}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:s.gray("Enter something to filter")}\n`}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(c.radioOn):c.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);super.render();let t=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.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=l(t)}}t.exports=AutocompleteMultiselectPrompt},5680:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style;const a=r(332),l=a.erase,u=a.cursor;class ConfirmPrompt extends i{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()}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,e){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(u.hide);super.render();this.out.write(l.line+u.to(0)+[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:s.gray(this.initialValue?this.yesOption:this.noOption)].join(" "))}}t.exports=ConfirmPrompt},3031:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear,l=n.figures,u=n.strip;const c=r(332),h=c.erase,d=c.cursor;const f=r(7517),p=f.DatePart,g=f.Meridiem,m=f.Day,y=f.Hours,v=f.Milliseconds,b=f.Minutes,_=f.Month,S=f.Seconds,w=f.Year;const x=/\\(.)|"((?:\\["\\]|[^"])+)"|(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 P={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new m(t),3:t=>new _(t),4:t=>new w(t),5:t=>new g(t),6:t=>new y(t),7:t=>new b(t),8:t=>new S(t),9:t=>new v(t)};const E={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 i{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(E,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=a("");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 e;this.parts=[];while(e=x.exec(t)){let t=e.shift();let r=e.findIndex((t=>t!=null));this.parts.push(r in P?P[r]({token:e[r]||t,date:this.date,parts:this.parts,locales:this.locales}):e[r]||t)}let r=this.parts.reduce(((t,e)=>{if(typeof e==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=e;else t.push(e);return t}),[]);this.parts.splice(0);this.parts.push(...r);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof p)));this.fire();this.render()}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 e=yield t.validator(t.value);if(typeof e==="string"){t.errorMsg=e;e=false}t.error=!e}))()}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 p)));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(d.hide);else this.out.write(h.lines(1));super.render();let t=h.line+(this.lines?h.down(this.lines):"")+d.to(0);this.lines=0;let e="";if(this.error){let t=this.errorMsg.split("\n");e=t.reduce(((t,e,r)=>t+`\n${r?` `:l.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(false),this.parts.reduce(((t,e,r)=>t.concat(r===this.cursor&&!this.done?s.cyan().underline(e.toString()):e)),[]).join("")].join(" ");let i="";if(this.lines){i+=d.up(this.lines);i+=d.left+d.to(u(r).length)}this.out.write(t+r+e+i)}}t.exports=DatePrompt},9956:(t,e,r)=>{"use strict";t.exports={TextPrompt:r(5430),SelectPrompt:r(8856),TogglePrompt:r(9692),DatePrompt:r(3031),NumberPrompt:r(8831),MultiselectPrompt:r(4047),AutocompletePrompt:r(935),AutocompleteMultiselectPrompt:r(2040),ConfirmPrompt:r(5680)}},4047:(t,e,r)=>{"use strict";const s=r(9439);const i=r(332),n=i.cursor;const o=r(5876);const a=r(2800),l=a.clear,u=a.figures,c=a.style;class MultiselectPrompt extends o{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.value=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=l("");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))}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()}}_(t,e){if(t===" "){this.handleSpaceToggle()}else{return this.bell()}}renderInstructions(){return`\nInstructions:\n ${u.arrowUp}/${u.arrowDown}: Highlight option\n ${u.arrowLeft}/${u.arrowRight}/[space]: Toggle selection\n enter/return: Complete answer\n `}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(u.radioOn):u.radioOff)+" "+i}paginateOptions(t){const e=this.cursor;let r=t.map(((t,r)=>this.renderOption(e,t,r)));const i=10;let n=r;let o="";if(r.length===0){return s.red("No matches for this query.")}else if(r.length>i){let a=e-i/2;let l=e+i/2;if(a<0){a=0;l=i}else if(l>t.length){l=t.length;a=l-i}n=r.slice(a,l);o=s.dim("(Move up and down to reveal more choices)")}return"\n"+n.join("\n")+"\n"+o}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);super.render();let t=[c.symbol(this.done,this.aborted),s.bold(this.msg),c.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.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=l(t)}}t.exports=MultiselectPrompt},8831:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor,a=n.erase;const l=r(2800),u=l.style,c=l.clear,h=l.figures,d=l.strip;const f=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r};class NumberPrompt extends i{constructor(t={}){super(t);this.transform=u.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=s.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||f.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}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 e=yield t.validator(t.value);if(typeof e===`string`){t.errorMsg=e;e=false}t.error=!e}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color=`red`;t.fire();t.render();return}let e=t.value;t.value=e!==``?e: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.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;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))||``;this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,e){if(!this.valid(t))return this.bell();const r=Date.now();if(r-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=r;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;super.render();let t=a.line+(this.lines?a.down(this.lines):``)+o.to(0);this.lines=0;let e=``;if(this.error){let t=this.errorMsg.split(`\n`);e+=t.reduce(((t,e,r)=>t+`\n${r?` `:h.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=!this.done||!this.done&&!this.placeholder;let i=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(this.done),r?s[this.color]().underline(this.rendered):this.rendered].join(` `);let n=``;if(this.lines){n+=o.up(this.lines);n+=o.left+o.to(d(i).length)}this.out.write(t+i+e+n)}}t.exports=NumberPrompt},5876:(t,e,r)=>{"use strict";const s=r(4521);const i=r(2800),n=i.action;const o=r(2361);const a=r(332),l=a.beep,u=a.cursor;const c=r(9439);class Prompt extends o{constructor(t={}){super();this.firstRender=true;this.in=t.in||process.stdin;this.out=t.out||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const e=s.createInterface(this.in);s.emitKeypressEvents(this.in,e);if(this.in.isTTY)this.in.setRawMode(true);const keypress=(t,e)=>{let r=n(e);if(r===false){this._&&this._(t,e)}else if(typeof this[r]==="function"){this[r](e)}else{this.bell()}};this.close=()=>{this.out.write(u.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);e.close();this.emit(this.aborted?"abort":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted})}bell(){this.out.write(l)}render(){this.onRender(c);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},8856:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear,l=n.figures;const u=r(332),c=u.erase,h=u.cursor;class SelectPrompt extends i{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,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.value=(this.choices[this.cursor]||{}).value;this.clear=a("");this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}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)return this.bell();this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)return this.bell();this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,e){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(c.lines(this.choices.length+1));super.render();this.out.write([o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(false),this.done?this.selection.title:this.selection.disabled?s.yellow(this.warn):s.gray(this.hint)].join(" "));if(!this.done){this.out.write("\n"+this.choices.map(((t,e)=>{let r,i;if(t.disabled){r=this.cursor===e?s.gray().underline(t.title):s.strikethrough().gray(t.title);i=this.cursor===e?s.bold().gray(l.pointer)+" ":" "}else{r=this.cursor===e?s.cyan().underline(t.title):t.title;i=this.cursor===e?s.cyan(l.pointer)+" ":" "}return`${i} ${r}`})).join("\n"))}}}t.exports=SelectPrompt},5430:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor;const a=r(2800),l=a.style,u=a.clear,c=a.strip,h=a.figures;class TextPrompt extends i{constructor(t={}){super(t);this.transform=l.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.clear=u(``);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=s.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.fire();this.render()}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 e=yield t.validator(t.value);if(typeof e===`string`){t.errorMsg=e;e=false}t.error=!e}))()}submit(){var t=this;return _asyncToGenerator((function*(){t.value=t.value||t.initial;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}_(t,e){let r=this.value.slice(0,this.cursor);let s=this.value.slice(this.cursor);this.value=`${r}${t}${s}`;this.red=false;this.cursor=this.placeholder?0:r.length+1;this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.value.slice(0,this.cursor-1);let e=this.value.slice(this.cursor);this.value=`${t}${e}`;this.red=false;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 e=this.value.slice(this.cursor+1);this.value=`${t}${e}`;this.red=false;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()}render(){if(this.closed)return;super.render();let t=(this.lines?o.down(this.lines):``)+this.clear;this.lines=0;let e=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(` `);let r=``;if(this.error){let t=this.errorMsg.split(`\n`);r+=t.reduce(((t,e,r)=>t+=`\n${r?" ":h.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let i=``;if(this.lines){i+=o.up(this.lines);i+=o.left+o.to(c(e).length)}i+=o.move(this.placeholder?-this.initial.length*this.scale:-this.rendered.length+this.cursor*this.scale);this.out.write(t+e+r+i);this.clear=u(e+r)}}t.exports=TextPrompt},9692:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear;const l=r(332),u=l.cursor,c=l.erase;class TogglePrompt extends i{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()}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,e){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(u.hide);super.render();this.out.write(c.lines(this.first?1:this.msg.split(/\n/g).length)+u.to(0)+[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.value?this.inactive:s.cyan().underline(this.inactive),s.gray("/"),this.value?s.cyan().underline(this.active):this.active].join(" "))}}t.exports=TogglePrompt},6598:(t,e,r)=>{"use strict";function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};var s=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){s=s.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))}s.forEach((function(e){_defineProperty(t,e,r[e])}))}return t}function _defineProperty(t,e,r){if(e in t){Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true})}else{t[e]=r}return t}function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(4591);const i=["suggest","format","onState","validate","onRender"];const noop=()=>{};function prompt(){return _prompt.apply(this,arguments)}function _prompt(){_prompt=_asyncToGenerator((function*(t=[],{onSubmit:e=noop,onCancel:r=noop}={}){const n={};const o=prompt._override||{};t=[].concat(t);let a,l,u,c,h;const d=function(){var t=_asyncToGenerator((function*(t,e,r=false){if(!r&&t.validate&&t.validate(e)!==true){return}return t.format?yield t.format(e,n):e}));return function getFormattedAnswer(e,r){return t.apply(this,arguments)}}();var f=true;var p=false;var g=undefined;try{for(var m=t[Symbol.iterator](),y;!(f=(y=m.next()).done);f=true){l=y.value;var v=l;c=v.name;h=v.type;for(let t in l){if(i.includes(t))continue;let e=l[t];l[t]=typeof e==="function"?yield e(a,_objectSpread({},n),l):e}if(typeof l.message!=="string"){throw new Error("prompt message is required")}var b=l;c=b.name;h=b.type;if(!h)continue;if(s[h]===void 0){throw new Error(`prompt type (${h}) is not defined`)}if(o[l.name]!==undefined){a=yield d(l,o[l.name]);if(a!==undefined){n[c]=a;continue}}try{a=prompt._injected?getInjectedAnswer(prompt._injected):yield s[h](l);n[c]=a=yield d(l,a,true);u=yield e(l,a,n)}catch(t){u=!(yield r(l,n))}if(u)return n}}catch(t){p=true;g=t}finally{try{if(!f&&m.return!=null){m.return()}}finally{if(p){throw g}}}return n}));return _prompt.apply(this,arguments)}function getInjectedAnswer(t){const e=t.shift();if(e instanceof Error){throw e}return e}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:s,inject:inject,override:override})},4591:(t,e,r)=>{"use strict";const s=e;const i=r(9956);const noop=t=>t;function toPrompt(t,e,r={}){return new Promise(((s,n)=>{const o=new i[t](e);const a=r.onAbort||noop;const l=r.onSubmit||noop;o.on("state",e.onState||noop);o.on("submit",(t=>s(l(t))));o.on("abort",(t=>n(a(t))))}))}s.text=t=>toPrompt("TextPrompt",t);s.password=t=>{t.style="password";return s.text(t)};s.invisible=t=>{t.style="invisible";return s.text(t)};s.number=t=>toPrompt("NumberPrompt",t);s.date=t=>toPrompt("DatePrompt",t);s.confirm=t=>toPrompt("ConfirmPrompt",t);s.list=t=>{const e=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(e).map((t=>t.trim()))})};s.toggle=t=>toPrompt("TogglePrompt",t);s.select=t=>toPrompt("SelectPrompt",t);s.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})};s.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,e)=>Promise.resolve(e.filter((e=>e.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));s.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},8692:t=>{"use strict";t.exports=t=>{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(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"abort";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";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}},3513:(t,e,r)=>{"use strict";const s=r(8760);const i=r(332),n=i.erase,o=i.cursor;const width=t=>[...s(t)].length;t.exports=function(t,e=process.stdout.columns){if(!e)return n.line+o.to(0);let r=0;const s=t.split(/\r?\n/);var i=true;var a=false;var l=undefined;try{for(var u=s[Symbol.iterator](),c;!(i=(c=u.next()).done);i=true){let t=c.value;r+=1+Math.floor(Math.max(width(t)-1,0)/e)}}catch(t){a=true;l=t}finally{try{if(!i&&u.return!=null){u.return()}}finally{if(a){throw l}}}return(n.line+o.prevLine()).repeat(r-1)+n.line+o.to(0)}},6217:t=>{"use strict";const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const s=process.platform==="win32"?r:e;t.exports=s},2800:(t,e,r)=>{"use strict";t.exports={action:r(8692),clear:r(3513),style:r(5012),strip:r(8760),figures:r(6217)}},8760:t=>{"use strict";t.exports=t=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const r=new RegExp(e,"g");return typeof t==="string"?t.replace(r,""):t}},5012:(t,e,r)=>{"use strict";const s=r(9439);const i=r(6217);const n=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=>n[t]||n.default;const o=Object.freeze({aborted:s.red(i.cross),done:s.green(i.tick),default:s.cyan("?")});const symbol=(t,e)=>e?o.aborted:t?o.done:o.default;const delimiter=t=>s.gray(t?i.ellipsis:i.pointerSmall);const item=(t,e)=>s.gray(t?e?i.pointerSmall:"+":i.line);t.exports={styles:n,render:render,symbols:o,symbol:symbol,delimiter:delimiter,item:item}},1112:(t,e,r)=>{function isNodeLT(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let e=0,r=process.versions.node.split(".").map(Number);for(;e<t.length;e++){if(r[e]>t[e])return false;if(t[e]>r[e])return true}return false}t.exports=isNodeLT("8.6.0")?r(6598):r(9590)},8994:t=>{"use strict";class DatePart{constructor({token:t,date:e,parts:r,locales:s}){this.token=t;this.date=e||new Date;this.parts=r||[this];this.locales=s||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((e,r)=>r>t&&e instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const e=t.indexOf(this);return t.find(((t,r)=>r>e&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},5513:(t,e,r)=>{"use strict";const s=r(8994);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends s{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 e=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?e+1:this.token==="ddd"?this.locales.weekdaysShort[e]:this.token==="dddd"?this.locales.weekdays[e]:t}}t.exports=Day},9270:(t,e,r)=>{"use strict";const s=r(8994);class Hours extends s{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},1190:(t,e,r)=>{"use strict";t.exports={DatePart:r(8994),Meridiem:r(8135),Day:r(5513),Hours:r(9270),Milliseconds:r(2397),Minutes:r(9246),Month:r(5763),Seconds:r(5579),Year:r(4191)}},8135:(t,e,r)=>{"use strict";const s=r(8994);class Meridiem extends s{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},2397:(t,e,r)=>{"use strict";const s=r(8994);class Milliseconds extends s{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},9246:(t,e,r)=>{"use strict";const s=r(8994);class Minutes extends s{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},5763:(t,e,r)=>{"use strict";const s=r(8994);class Month extends s{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 e=this.token.length;return e===2?String(t+1).padStart(2,"0"):e===3?this.locales.monthsShort[t]:e===4?this.locales.months[t]:String(t+1)}}t.exports=Month},5579:(t,e,r)=>{"use strict";const s=r(8994);class Seconds extends s{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},4191:(t,e,r)=>{"use strict";const s=r(8994);class Year extends s{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},514:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{cursor:n}=r(332);const{style:o,clear:a,figures:l,strip:u}=r(9807);const getVal=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]);const getTitle=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]);const getIndex=(t,e)=>{const r=t.findIndex((t=>t.value===e||t.title===e));return r>-1?r:undefined};class AutocompletePrompt extends i{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.fallback=t.fallback||(t.initial!==undefined?`${l.pointerSmall} ${getTitle(this.choices,this.initial)}`:`${l.pointerSmall} ${t.noMatches||"no matches found"}`);this.suggestions=[[]];this.page=0;this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=o.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=a("");this.complete(this.render);this.render()}moveSelect(t){this.select=t;if(this.suggestions[this.page].length>0){this.value=getVal(this.suggestions[this.page],t)}else{this.value=this.initial!==undefined?getVal(this.choices,this.initial):null}this.fire()}async complete(t){const e=this.completing=this.suggest(this.input,this.choices);const r=await e;if(this.completing!==e)return;this.suggestions=r.map(((t,e,r)=>({title:getTitle(r,e),value:getVal(r,e)}))).reduce(((t,e)=>{if(t[t.length-1].length<this.limit)t[t.length-1].push(e);else t.push([e]);return t}),[[]]);this.isFallback=false;this.completing=false;if(!this.suggestions[this.page])this.page=0;if(!this.suggestions.length&&this.fallback){const t=getIndex(this.choices,this.fallback);this.suggestions=[[]];if(t!==undefined)this.suggestions[0].push({title:getTitle(this.choices,t),value:getVal(this.choices,t)});this.isFallback=true}const s=Math.max(r.length-1,0);this.moveSelect(Math.min(s,this.select));t&&t()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}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()}_(t,e){let r=this.input.slice(0,this.cursor);let s=this.input.slice(this.cursor);this.input=`${r}${t}${s}`;this.cursor=r.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 e=this.input.slice(this.cursor);this.input=`${t}${e}`;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 e=this.input.slice(this.cursor+1);this.input=`${t}${e}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions[this.page].length-1);this.render()}up(){if(this.select<=0)return this.bell();this.moveSelect(this.select-1);this.render()}down(){if(this.select>=this.suggestions[this.page].length-1)return this.bell();this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions[this.page].length-1){this.page=(this.page+1)%this.suggestions.length;this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){if(this.page>=this.suggestions.length-1)return this.bell();this.page++;this.moveSelect(0);this.render()}prevPage(){if(this.page<=0)return this.bell();this.page--;this.moveSelect(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()}render(){if(this.closed)return;super.render();if(this.lineCount)this.out.write(n.down(this.lineCount));let t=s.bold(`${o.symbol(this.done,this.aborted)} ${this.msg} `)+`${o.delimiter(this.completing)} `;let e=u(t).length;if(this.done&&this.suggestions[this.page][this.select]){t+=`${this.suggestions[this.page][this.select].title}`}else{this.rendered=`${this.transform.render(this.input)}`;e+=this.rendered.length;t+=this.rendered}if(!this.done){this.lineCount=this.suggestions[this.page].length;let e=this.suggestions[this.page].reduce(((t,e,r)=>t+`\n${r===this.select?s.cyan(e.title):e.title}`),"");if(e&&!this.isFallback){t+=e;if(this.suggestions.length>1){this.lineCount++;t+=s.blue(`\nPage ${this.page+1}/${this.suggestions.length}`)}}else{const e=getIndex(this.choices,this.fallback);const r=e!==undefined?getTitle(this.choices,e):this.fallback;t+=`\n${s.gray(r)}`;this.lineCount++}}this.out.write(this.clear+t);this.clear=a(t);if(this.lineCount&&!this.done){let t=n.up(this.lineCount);t+=n.left+n.to(e);t+=n.move(-this.rendered.length+this.cursor*this.scale);this.out.write(t)}}}t.exports=AutocompletePrompt},7685:(t,e,r)=>{"use strict";const s=r(9439);const{cursor:i}=r(332);const n=r(92);const{clear:o,style:a,figures:l}=r(9807);class AutocompleteMultiselectPrompt extends n{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=o("");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 e=this.filteredOptions.findIndex((e=>e===t));this.cursor=e<0?0:e;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,e){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){return`\nInstructions:\n ${l.arrowUp}/${l.arrowDown}: Highlight option\n ${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n `}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:s.gray("Enter something to filter")}\n`}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(l.radioOn):l.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);super.render();let t=[a.symbol(this.done,this.aborted),s.bold(this.msg),a.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.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=o(t)}}t.exports=AutocompleteMultiselectPrompt},3037:(t,e,r)=>{const s=r(9439);const i=r(9126);const{style:n}=r(9807);const{erase:o,cursor:a}=r(332);class ConfirmPrompt extends i{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()}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,e){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(a.hide);super.render();this.out.write(o.line+a.to(0)+[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:s.gray(this.initialValue?this.yesOption:this.noOption)].join(" "))}}t.exports=ConfirmPrompt},5048:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{style:n,clear:o,figures:a,strip:l}=r(9807);const{erase:u,cursor:c}=r(332);const{DatePart:h,Meridiem:d,Day:f,Hours:p,Milliseconds:g,Minutes:m,Month:y,Seconds:v,Year:b}=r(1190);const _=/\\(.)|"((?:\\["\\]|[^"])+)"|(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 S={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new f(t),3:t=>new y(t),4:t=>new b(t),5:t=>new d(t),6:t=>new p(t),7:t=>new m(t),8:t=>new v(t),9:t=>new g(t)};const w={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 i{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(w,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=o("");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 e;this.parts=[];while(e=_.exec(t)){let t=e.shift();let r=e.findIndex((t=>t!=null));this.parts.push(r in S?S[r]({token:e[r]||t,date:this.date,parts:this.parts,locales:this.locales}):e[r]||t)}let r=this.parts.reduce(((t,e)=>{if(typeof e==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=e;else t.push(e);return t}),[]);this.parts.splice(0);this.parts.push(...r);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof h)));this.fire();this.render()}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 h)));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(c.hide);else this.out.write(u.lines(1));super.render();let t=u.line+(this.lines?u.down(this.lines):"")+c.to(0);this.lines=0;let e="";if(this.error){let t=this.errorMsg.split("\n");e=t.reduce(((t,e,r)=>t+`\n${r?` `:a.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(false),this.parts.reduce(((t,e,r)=>t.concat(r===this.cursor&&!this.done?s.cyan().underline(e.toString()):e)),[]).join("")].join(" ");let i="";if(this.lines){i+=c.up(this.lines);i+=c.left+c.to(l(r).length)}this.out.write(t+r+e+i)}}t.exports=DatePrompt},6529:(t,e,r)=>{"use strict";t.exports={TextPrompt:r(1551),SelectPrompt:r(6515),TogglePrompt:r(181),DatePrompt:r(5048),NumberPrompt:r(3686),MultiselectPrompt:r(92),AutocompletePrompt:r(514),AutocompleteMultiselectPrompt:r(7685),ConfirmPrompt:r(3037)}},92:(t,e,r)=>{"use strict";const s=r(9439);const{cursor:i}=r(332);const n=r(9126);const{clear:o,figures:a,style:l}=r(9807);class MultiselectPrompt extends n{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.value=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=o("");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))}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()}}_(t,e){if(t===" "){this.handleSpaceToggle()}else{return this.bell()}}renderInstructions(){return`\nInstructions:\n ${a.arrowUp}/${a.arrowDown}: Highlight option\n ${a.arrowLeft}/${a.arrowRight}/[space]: Toggle selection\n enter/return: Complete answer\n `}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(a.radioOn):a.radioOff)+" "+i}paginateOptions(t){const e=this.cursor;let r=t.map(((t,r)=>this.renderOption(e,t,r)));const i=10;let n=r;let o="";if(r.length===0){return s.red("No matches for this query.")}else if(r.length>i){let a=e-i/2;let l=e+i/2;if(a<0){a=0;l=i}else if(l>t.length){l=t.length;a=l-i}n=r.slice(a,l);o=s.dim("(Move up and down to reveal more choices)")}return"\n"+n.join("\n")+"\n"+o}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);super.render();let t=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.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=o(t)}}t.exports=MultiselectPrompt},3686:(t,e,r)=>{const s=r(9439);const i=r(9126);const{cursor:n,erase:o}=r(332);const{style:a,clear:l,figures:u,strip:c}=r(9807);const h=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r};class NumberPrompt extends i{constructor(t={}){super(t);this.transform=a.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=s.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||h.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}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.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;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))||``;this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,e){if(!this.valid(t))return this.bell();const r=Date.now();if(r-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=r;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;super.render();let t=o.line+(this.lines?o.down(this.lines):``)+n.to(0);this.lines=0;let e=``;if(this.error){let t=this.errorMsg.split(`\n`);e+=t.reduce(((t,e,r)=>t+`\n${r?` `:u.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=!this.done||!this.done&&!this.placeholder;let i=[a.symbol(this.done,this.aborted),s.bold(this.msg),a.delimiter(this.done),r?s[this.color]().underline(this.rendered):this.rendered].join(` `);let l=``;if(this.lines){l+=n.up(this.lines);l+=n.left+n.to(c(i).length)}this.out.write(t+i+e+l)}}t.exports=NumberPrompt},9126:(t,e,r)=>{"use strict";const s=r(4521);const{action:i}=r(9807);const n=r(2361);const{beep:o,cursor:a}=r(332);const l=r(9439);class Prompt extends n{constructor(t={}){super();this.firstRender=true;this.in=t.in||process.stdin;this.out=t.out||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const e=s.createInterface(this.in);s.emitKeypressEvents(this.in,e);if(this.in.isTTY)this.in.setRawMode(true);const keypress=(t,e)=>{let r=i(e);if(r===false){this._&&this._(t,e)}else if(typeof this[r]==="function"){this[r](e)}else{this.bell()}};this.close=()=>{this.out.write(a.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);e.close();this.emit(this.aborted?"abort":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted})}bell(){this.out.write(o)}render(){this.onRender(l);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},6515:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{style:n,clear:o,figures:a}=r(9807);const{erase:l,cursor:u}=r(332);class SelectPrompt extends i{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,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.value=(this.choices[this.cursor]||{}).value;this.clear=o("");this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}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)return this.bell();this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)return this.bell();this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,e){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);else this.out.write(l.lines(this.choices.length+1));super.render();this.out.write([n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(false),this.done?this.selection.title:this.selection.disabled?s.yellow(this.warn):s.gray(this.hint)].join(" "));if(!this.done){this.out.write("\n"+this.choices.map(((t,e)=>{let r,i;if(t.disabled){r=this.cursor===e?s.gray().underline(t.title):s.strikethrough().gray(t.title);i=this.cursor===e?s.bold().gray(a.pointer)+" ":" "}else{r=this.cursor===e?s.cyan().underline(t.title):t.title;i=this.cursor===e?s.cyan(a.pointer)+" ":" "}return`${i} ${r}`})).join("\n"))}}}t.exports=SelectPrompt},1551:(t,e,r)=>{const s=r(9439);const i=r(9126);const{cursor:n}=r(332);const{style:o,clear:a,strip:l,figures:u}=r(9807);class TextPrompt extends i{constructor(t={}){super(t);this.transform=o.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.clear=a(``);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=s.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.fire();this.render()}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;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}_(t,e){let r=this.value.slice(0,this.cursor);let s=this.value.slice(this.cursor);this.value=`${r}${t}${s}`;this.red=false;this.cursor=this.placeholder?0:r.length+1;this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.value.slice(0,this.cursor-1);let e=this.value.slice(this.cursor);this.value=`${t}${e}`;this.red=false;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 e=this.value.slice(this.cursor+1);this.value=`${t}${e}`;this.red=false;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()}render(){if(this.closed)return;super.render();let t=(this.lines?n.down(this.lines):``)+this.clear;this.lines=0;let e=[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(` `);let r=``;if(this.error){let t=this.errorMsg.split(`\n`);r+=t.reduce(((t,e,r)=>t+=`\n${r?" ":u.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let i=``;if(this.lines){i+=n.up(this.lines);i+=n.left+n.to(l(e).length)}i+=n.move(this.placeholder?-this.initial.length*this.scale:-this.rendered.length+this.cursor*this.scale);this.out.write(t+e+r+i);this.clear=a(e+r)}}t.exports=TextPrompt},181:(t,e,r)=>{const s=r(9439);const i=r(9126);const{style:n,clear:o}=r(9807);const{cursor:a,erase:l}=r(332);class TogglePrompt extends i{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()}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,e){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(a.hide);super.render();this.out.write(l.lines(this.first?1:this.msg.split(/\n/g).length)+a.to(0)+[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(this.done),this.value?this.inactive:s.cyan().underline(this.inactive),s.gray("/"),this.value?s.cyan().underline(this.active):this.active].join(" "))}}t.exports=TogglePrompt},9590:(t,e,r)=>{"use strict";const s=r(4450);const i=["suggest","format","onState","validate","onRender"];const noop=()=>{};async function prompt(t=[],{onSubmit:e=noop,onCancel:r=noop}={}){const n={};const o=prompt._override||{};t=[].concat(t);let a,l,u,c,h;const getFormattedAnswer=async(t,e,r=false)=>{if(!r&&t.validate&&t.validate(e)!==true){return}return t.format?await t.format(e,n):e};for(l of t){({name:c,type:h}=l);for(let t in l){if(i.includes(t))continue;let e=l[t];l[t]=typeof e==="function"?await e(a,{...n},l):e}if(typeof l.message!=="string"){throw new Error("prompt message is required")}({name:c,type:h}=l);if(!h)continue;if(s[h]===void 0){throw new Error(`prompt type (${h}) is not defined`)}if(o[l.name]!==undefined){a=await getFormattedAnswer(l,o[l.name]);if(a!==undefined){n[c]=a;continue}}try{a=prompt._injected?getInjectedAnswer(prompt._injected):await s[h](l);n[c]=a=await getFormattedAnswer(l,a,true);u=await e(l,a,n)}catch(t){u=!await r(l,n)}if(u)return n}return n}function getInjectedAnswer(t){const e=t.shift();if(e instanceof Error){throw e}return e}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:s,inject:inject,override:override})},4450:(t,e,r)=>{"use strict";const s=e;const i=r(6529);const noop=t=>t;function toPrompt(t,e,r={}){return new Promise(((s,n)=>{const o=new i[t](e);const a=r.onAbort||noop;const l=r.onSubmit||noop;o.on("state",e.onState||noop);o.on("submit",(t=>s(l(t))));o.on("abort",(t=>n(a(t))))}))}s.text=t=>toPrompt("TextPrompt",t);s.password=t=>{t.style="password";return s.text(t)};s.invisible=t=>{t.style="invisible";return s.text(t)};s.number=t=>toPrompt("NumberPrompt",t);s.date=t=>toPrompt("DatePrompt",t);s.confirm=t=>toPrompt("ConfirmPrompt",t);s.list=t=>{const e=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(e).map((t=>t.trim()))})};s.toggle=t=>toPrompt("TogglePrompt",t);s.select=t=>toPrompt("SelectPrompt",t);s.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})};s.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,e)=>Promise.resolve(e.filter((e=>e.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));s.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},8573:t=>{"use strict";t.exports=t=>{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(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"abort";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";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}},6747:(t,e,r)=>{"use strict";const s=r(2714);const{erase:i,cursor:n}=r(332);const width=t=>[...s(t)].length;t.exports=function(t,e=process.stdout.columns){if(!e)return i.line+n.to(0);let r=0;const s=t.split(/\r?\n/);for(let t of s){r+=1+Math.floor(Math.max(width(t)-1,0)/e)}return(i.line+n.prevLine()).repeat(r-1)+i.line+n.to(0)}},3034:t=>{"use strict";const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const s=process.platform==="win32"?r:e;t.exports=s},9807:(t,e,r)=>{"use strict";t.exports={action:r(8573),clear:r(6747),style:r(7357),strip:r(2714),figures:r(3034)}},2714:t=>{"use strict";t.exports=t=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const r=new RegExp(e,"g");return typeof t==="string"?t.replace(r,""):t}},7357:(t,e,r)=>{"use strict";const s=r(9439);const i=r(3034);const n=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=>n[t]||n.default;const o=Object.freeze({aborted:s.red(i.cross),done:s.green(i.tick),default:s.cyan("?")});const symbol=(t,e)=>e?o.aborted:t?o.done:o.default;const delimiter=t=>s.gray(t?i.ellipsis:i.pointerSmall);const item=(t,e)=>s.gray(t?e?i.pointerSmall:"+":i.line);t.exports={styles:n,render:render,symbols:o,symbol:symbol,delimiter:delimiter,item:item}},3135:t=>{
55
55
  /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
56
56
  let e;t.exports=typeof queueMicrotask==="function"?queueMicrotask.bind(typeof window!=="undefined"?window:global):t=>(e||(e=Promise.resolve())).then(t).catch((t=>setTimeout((()=>{throw t}),0)))},8271:(t,e,r)=>{var s=r(7563);var i=r(1017).join;var n=r(5134);var o="/etc";var a=process.platform==="win32";var l=a?process.env.USERPROFILE:process.env.HOME;t.exports=function(t,e,u,c){if("string"!==typeof t)throw new Error("rc(name): name *must* be string");if(!u)u=r(5912)(process.argv.slice(2));e=("string"===typeof e?s.json(e):e)||{};c=c||s.parse;var h=s.env(t+"_");var d=[e];var f=[];function addConfigFile(t){if(f.indexOf(t)>=0)return;var e=s.file(t);if(e){d.push(c(e));f.push(t)}}if(!a)[i(o,t,"config"),i(o,t+"rc")].forEach(addConfigFile);if(l)[i(l,".config",t,"config"),i(l,".config",t),i(l,"."+t,"config"),i(l,"."+t+"rc")].forEach(addConfigFile);addConfigFile(s.find("."+t+"rc"));if(h.config)addConfigFile(h.config);if(u.config)addConfigFile(u.config);return n.apply(null,d.concat([h,u,f.length?{configs:f,config:f[f.length-1]}:undefined]))}},7563:(t,e,r)=>{"use strict";var s=r(7147);var i=r(1923);var n=r(1017);var o=r(6397);var a=e.parse=function(t){if(/^\s*{/.test(t))return JSON.parse(o(t));return i.parse(t)};var l=e.file=function(){var t=[].slice.call(arguments).filter((function(t){return t!=null}));for(var e in t)if("string"!==typeof t[e])return;var r=n.join.apply(null,t);var i;try{return s.readFileSync(r,"utf-8")}catch(t){return}};var u=e.json=function(){var t=l.apply(null,arguments);return t?a(t):null};var c=e.env=function(t,e){e=e||process.env;var r={};var s=t.length;for(var i in e){if(i.toLowerCase().indexOf(t.toLowerCase())===0){var n=i.substring(s).split("__");var o;while((o=n.indexOf(""))>-1){n.splice(o,1)}var a=r;n.forEach((function _buildSubObj(t,r){if(!t||typeof a!=="object")return;if(r===n.length-1)a[t]=e[i];if(a[t]===undefined)a[t]={};a=a[t]}))}}return r};var h=e.find=function(){var t=n.join.apply(null,[].slice.call(arguments));function find(t,e){var r=n.join(t,e);try{s.statSync(r);return r}catch(r){if(n.dirname(t)!==t)return find(n.dirname(t),e)}}return find(process.cwd(),t)}},6397:t=>{"use strict";var e=1;var r=2;function stripWithoutWhitespace(){return""}function stripWithWhitespace(t,e,r){return t.slice(e,r).replace(/\S/g," ")}t.exports=function(t,s){s=s||{};var i;var n;var o=false;var a=false;var l=0;var u="";var c=s.whitespace===false?stripWithoutWhitespace:stripWithWhitespace;for(var h=0;h<t.length;h++){i=t[h];n=t[h+1];if(!a&&i==='"'){var d=t[h-1]==="\\"&&t[h-2]!=="\\";if(!d){o=!o}}if(o){continue}if(!a&&i+n==="//"){u+=t.slice(l,h);l=h;a=e;h++}else if(a===e&&i+n==="\r\n"){h++;a=false;u+=c(t,l,h);l=h;continue}else if(a===e&&i==="\n"){a=false;u+=c(t,l,h);l=h}else if(!a&&i+n==="/*"){u+=t.slice(l,h);l=h;a=r;h++;continue}else if(a===r&&i+n==="*/"){h++;a=false;u+=c(t,l,h+1);l=h+1;continue}}return u+(a?c(t.substr(l)):t.substr(l))}},4955:(t,e,r)=>{const s=r(3118).Buffer;function decodeBase64(t){return s.from(t,"base64").toString("utf8")}function encodeBase64(t){return s.from(t,"utf8").toString("base64")}t.exports={decodeBase64:decodeBase64,encodeBase64:encodeBase64}},1384:(t,e,r)=>{var s=r(7310);var i=r(4955);var n=i.decodeBase64;var o=i.encodeBase64;var a=":_authToken";var l=":username";var u=":_password";t.exports=function(){var t;var e;if(arguments.length>=2){t=arguments[0];e=arguments[1]}else if(typeof arguments[0]==="string"){t=arguments[0]}else{e=arguments[0]}e=e||{};e.npmrc=e.npmrc||r(8271)("npm",{registry:"https://registry.npmjs.org/"});t=t||e.npmrc.registry;return getRegistryAuthInfo(t,e)||getLegacyAuthInfo(e.npmrc)};function getRegistryAuthInfo(t,e){var r=s.parse(t,false,true);var i;while(i!=="/"&&r.pathname!==i){i=r.pathname||"/";var n="//"+r.host+i.replace(/\/$/,"");var o=getAuthInfoForUrl(n,e.npmrc);if(o){return o}if(!e.recursive){return/\/$/.test(t)?undefined:getRegistryAuthInfo(s.resolve(t,"."),e)}r.pathname=s.resolve(normalizePath(i),"..")||"/"}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,e){var r=getBearerToken(e[t+a]||e[t+"/"+a]);if(r){return r}var s=e[t+l]||e[t+"/"+l];var i=e[t+u]||e[t+"/"+u];var n=getTokenForUsernameAndPassword(s,i);if(n){return n}return undefined}function getBearerToken(t){if(!t){return undefined}var e=t.replace(/^\$\{?([^}]*)\}?$/,(function(t,e){return process.env[e]}));return{token:e,type:"Bearer"}}function getTokenForUsernameAndPassword(t,e){if(!t||!e){return undefined}var r=n(e.replace(/^\$\{?([^}]*)\}?$/,(function(t,e){return process.env[e]})));var s=o(t+":"+r);return{token:s,type:"Basic",password:r,username:t}}},2447:(t,e,r)=>{"use strict";t.exports=function(t){var e=r(8271)("npm",{registry:"https://registry.npmjs.org/"});var s=e[t+":registry"]||e.registry;return s.slice(-1)==="/"?s:s+"/"}},7226:t=>{"use strict";function reusify(t){var e=new t;var r=e;function get(){var s=e;if(s.next){e=s.next}else{e=new t;r=e}s.next=null;return s}function release(t){r.next=t;r=t}return{get:get,release:release}}t.exports=reusify},1188:(t,e,r)=>{
57
57
  /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
@@ -61,4 +61,4 @@ t.exports=runParallel;const s=r(3135);function runParallel(t,e){let r,i,n;let o=
61
61
  *
62
62
  * Copyright (c) 2015-present, Jon Schlinkert.
63
63
  * Released under the MIT License.
64
- */const s=r(6110);const toRegexRange=(t,e,r)=>{if(s(t)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(e===void 0||t===e){return String(t)}if(s(e)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let i={relaxZeros:true,...r};if(typeof i.strictZeros==="boolean"){i.relaxZeros=i.strictZeros===false}let n=String(i.relaxZeros);let o=String(i.shorthand);let a=String(i.capture);let l=String(i.wrap);let u=t+":"+e+"="+n+o+a+l;if(toRegexRange.cache.hasOwnProperty(u)){return toRegexRange.cache[u].result}let c=Math.min(t,e);let h=Math.max(t,e);if(Math.abs(c-h)===1){let r=t+"|"+e;if(i.capture){return`(${r})`}if(i.wrap===false){return r}return`(?:${r})`}let d=hasPadding(t)||hasPadding(e);let f={min:t,max:e,a:c,b:h};let p=[];let g=[];if(d){f.isPadded=d;f.maxLen=String(f.max).length}if(c<0){let t=h<0?Math.abs(h):1;g=splitToPatterns(t,Math.abs(c),f,i);c=f.a=0}if(h>=0){p=splitToPatterns(c,h,f,i)}f.negatives=g;f.positives=p;f.result=collatePatterns(g,p,i);if(i.capture===true){f.result=`(${f.result})`}else if(i.wrap!==false&&p.length+g.length>1){f.result=`(?:${f.result})`}toRegexRange.cache[u]=f;return f.result};function collatePatterns(t,e,r){let s=filterPatterns(t,e,"-",false,r)||[];let i=filterPatterns(e,t,"",false,r)||[];let n=filterPatterns(t,e,"-?",true,r)||[];let o=s.concat(n).concat(i);return o.join("|")}function splitToRanges(t,e){let r=1;let s=1;let i=countNines(t,r);let n=new Set([e]);while(t<=i&&i<=e){n.add(i);r+=1;i=countNines(t,r)}i=countZeros(e+1,s)-1;while(t<i&&i<=e){n.add(i);s+=1;i=countZeros(e+1,s)-1}n=[...n];n.sort(compare);return n}function rangeToPattern(t,e,r){if(t===e){return{pattern:t,count:[],digits:0}}let s=zip(t,e);let i=s.length;let n="";let o=0;for(let t=0;t<i;t++){let[e,i]=s[t];if(e===i){n+=e}else if(e!=="0"||i!=="9"){n+=toCharacterClass(e,i,r)}else{o++}}if(o){n+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:n,count:[o],digits:i}}function splitToPatterns(t,e,r,s){let i=splitToRanges(t,e);let n=[];let o=t;let a;for(let t=0;t<i.length;t++){let e=i[t];let l=rangeToPattern(String(o),String(e),s);let u="";if(!r.isPadded&&a&&a.pattern===l.pattern){if(a.count.length>1){a.count.pop()}a.count.push(l.count[0]);a.string=a.pattern+toQuantifier(a.count);o=e+1;continue}if(r.isPadded){u=padZeros(e,r,s)}l.string=u+l.pattern+toQuantifier(l.count);n.push(l);o=e+1;a=l}return n}function filterPatterns(t,e,r,s,i){let n=[];for(let i of t){let{string:t}=i;if(!s&&!contains(e,"string",t)){n.push(r+t)}if(s&&contains(e,"string",t)){n.push(r+t)}}return n}function zip(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function compare(t,e){return t>e?1:e>t?-1:0}function contains(t,e,r){return t.some((t=>t[e]===r))}function countNines(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function countZeros(t,e){return t-t%Math.pow(10,e)}function toQuantifier(t){let[e=0,r=""]=t;if(r||e>1){return`{${e+(r?","+r:"")}}`}return""}function toCharacterClass(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function hasPadding(t){return/^-?(0+)\d/.test(t)}function padZeros(t,e,r){if(!e.isPadded){return t}let s=Math.abs(e.maxLen-String(t).length);let i=r.relaxZeros!==false;switch(s){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:{return i?`0{0,${s}}`:`0{${s}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};t.exports=toRegexRange},5418:(t,e,r)=>{const{URL:s}=r(7310);const{join:i}=r(1017);const n=r(7147);const{promisify:o}=r(3837);const{tmpdir:a}=r(2037);const l=r(2447);const u=o(n.writeFile);const c=o(n.mkdir);const h=o(n.readFile);const compareVersions=(t,e)=>t.localeCompare(e,"en-US",{numeric:true});const encode=t=>encodeURIComponent(t).replace(/^%40/,"@");const getFile=async(t,e)=>{const r=a();const s=i(r,"update-check");if(!n.existsSync(s)){await c(s)}let o=`${t.name}-${e}.json`;if(t.scope){o=`${t.scope}-${o}`}return i(s,o)};const evaluateCache=async(t,e,r)=>{if(n.existsSync(t)){const s=await h(t,"utf8");const{lastUpdate:i,latest:n}=JSON.parse(s);const o=i+r;if(o>e){return{shouldCheck:false,latest:n}}}return{shouldCheck:true,latest:null}};const updateCache=async(t,e,r)=>{const s=JSON.stringify({latest:e,lastUpdate:r});await u(t,s,"utf8")};const loadPackage=(t,e)=>new Promise(((s,i)=>{const n={host:t.hostname,path:t.pathname,port:t.port,headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},timeout:2e3};if(e){n.headers.authorization=`${e.type} ${e.token}`}const{get:o}=r(t.protocol==="https:"?5687:3685);o(n,(t=>{const{statusCode:e}=t;if(e!==200){const r=new Error(`Request failed with code ${e}`);r.code=e;i(r);t.resume();return}let r="";t.setEncoding("utf8");t.on("data",(t=>{r+=t}));t.on("end",(()=>{try{const t=JSON.parse(r);s(t)}catch(t){i(t)}}))})).on("error",i).on("timeout",i)}));const getMostRecent=async({full:t,scope:e},i)=>{const n=l(e);const o=new s(t,n);let a=null;try{a=await loadPackage(o)}catch(t){if(t.code&&String(t.code).startsWith(4)){const t=r(1384);const e=t(n,{recursive:true});a=await loadPackage(o,e)}else{throw t}}const u=a["dist-tags"][i];if(!u){throw new Error(`Distribution tag ${i} is not available`)}return u};const d={interval:36e5,distTag:"latest"};const getDetails=t=>{const e={full:encode(t)};if(t.includes("/")){const r=t.split("/");e.scope=r[0];e.name=r[1]}else{e.scope=null;e.name=t}return e};t.exports=async(t,e)=>{if(typeof t!=="object"){throw new Error("The first parameter should be your package.json file content")}const r=getDetails(t.name);const s=Date.now();const{distTag:i,interval:n}=Object.assign({},d,e);const o=await getFile(r,i);let a=null;let l=true;({shouldCheck:l,latest:a}=await evaluateCache(o,s,n));if(l){a=await getMostRecent(r,i);await updateCache(o,a,s)}const u=compareVersions(t.version,a);if(u===-1){return{latest:a,fromCache:!l}}return null}},5880:(t,e,r)=>{"use strict";var s=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var i=r(5462);var n=["node_modules","favicon.ico"];var o=t.exports=function(t){var e=[];var r=[];if(t===null){r.push("name cannot be null");return done(e,r)}if(t===undefined){r.push("name cannot be undefined");return done(e,r)}if(typeof t!=="string"){r.push("name must be a string");return done(e,r)}if(!t.length){r.push("name length must be greater than zero")}if(t.match(/^\./)){r.push("name cannot start with a period")}if(t.match(/^_/)){r.push("name cannot start with an underscore")}if(t.trim()!==t){r.push("name cannot contain leading or trailing spaces")}n.forEach((function(e){if(t.toLowerCase()===e){r.push(e+" is a blacklisted name")}}));i.forEach((function(r){if(t.toLowerCase()===r){e.push(r+" is a core module name")}}));if(t.length>214){e.push("name can no longer contain more than 214 characters")}if(t.toLowerCase()!==t){e.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(t.split("/").slice(-1)[0])){e.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(t)!==t){var o=t.match(s);if(o){var a=o[1];var l=o[2];if(encodeURIComponent(a)===a&&encodeURIComponent(l)===l){return done(e,r)}}r.push("name can only contain URL-friendly characters")}return done(e,r)};o.scopedPackagePattern=s;var done=function(t,e){var r={validForNewPackages:e.length===0&&t.length===0,validForOldPackages:e.length===0,warnings:t,errors:e};if(!r.warnings.length)delete r.warnings;if(!r.errors.length)delete r.errors;return r}},8201:(t,e,r)=>{const s=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const i=r(1017);const n=s?";":":";const o=r(228);const getNotFoundError=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"});const getPathInfo=(t,e)=>{const r=e.colon||n;const i=t.match(/\//)||s&&t.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)];const o=s?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=s?o.split(r):[""];if(s){if(t.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:i,pathExt:a,pathExtExe:o}};const which=(t,e,r)=>{if(typeof e==="function"){r=e;e={}}if(!e)e={};const{pathEnv:s,pathExt:n,pathExtExe:a}=getPathInfo(t,e);const l=[];const step=r=>new Promise(((n,o)=>{if(r===s.length)return e.all&&l.length?n(l):o(getNotFoundError(t));const a=s[r];const u=/^".*"$/.test(a)?a.slice(1,-1):a;const c=i.join(u,t);const h=!u&&/^\.[\\\/]/.test(t)?t.slice(0,2)+c:c;n(subStep(h,r,0))}));const subStep=(t,r,s)=>new Promise(((i,u)=>{if(s===n.length)return i(step(r+1));const c=n[s];o(t+c,{pathExt:a},((n,o)=>{if(!n&&o){if(e.all)l.push(t+c);else return i(t+c)}return i(subStep(t,r,s+1))}))}));return r?step(0).then((t=>r(null,t)),r):step(0)};const whichSync=(t,e)=>{e=e||{};const{pathEnv:r,pathExt:s,pathExtExe:n}=getPathInfo(t,e);const a=[];for(let l=0;l<r.length;l++){const u=r[l];const c=/^".*"$/.test(u)?u.slice(1,-1):u;const h=i.join(c,t);const d=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+h:h;for(let t=0;t<s.length;t++){const r=d+s[t];try{const t=o.sync(r,{pathExt:n});if(t){if(e.all)a.push(r);else return r}}catch(t){}}}if(e.all&&a.length)return a;if(e.nothrow)return null;throw getNotFoundError(t)};t.exports=which;which.sync=whichSync},7019:(t,e,r)=>{"use strict";r.r(e);var s=r(9397);var i=r(8018);var n=r.n(i);var o=r(1017);var a=r.n(o);var l=r(1112);var u=r.n(l);var c=r(5418);var h=r.n(c);var d=r(7147);var f=r.n(d);function makeDir(t,e={recursive:true}){return f().promises.mkdir(t,e)}var p=r(2081);function isInGitRepository(){try{(0,p.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(t){}return false}function isInMercurialRepository(){try{(0,p.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(t){}return false}function isDefaultBranchSet(){try{(0,p.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch(t){}return false}function tryGitInit(t){let e=false;try{(0,p.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,p.execSync)("git init",{stdio:"ignore"});e=true;if(!isDefaultBranchSet()){(0,p.execSync)("git checkout -b main",{stdio:"ignore"})}(0,p.execSync)("git add -A",{stdio:"ignore"});(0,p.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch(r){if(e){try{f().rmSync(a().join(t,".git"),{recursive:true,force:true})}catch(t){}}return false}}function isFolderEmpty(t,e){const r=[".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","yarnrc.yml",".yarn"];const i=f().readdirSync(t).filter((t=>!r.includes(t))).filter((t=>!/\.iml$/.test(t)));if(i.length>0){console.log(`The directory ${(0,s.green)(e)} contains files that could conflict:`);console.log();for(const e of i){try{const r=f().lstatSync(a().join(t,e));if(r.isDirectory()){console.log(` ${(0,s.blue)(e)}/`)}else{console.log(` ${e}`)}}catch{console.log(` ${e}`)}}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 f().promises.access(t,(f().constants||f()).W_OK);return true}catch(t){return false}}var g=r(7987);var m=r.n(g);async function install(t){let e=["install"];return new Promise(((r,s)=>{const i=m()(t,e,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});i.on("close",(i=>{if(i!==0){s({command:`${t} ${e.join(" ")}`});return}r()}))}))}var y=r(3909);const identity=t=>t;const copy=async(t,e,{cwd:r,rename:s=identity,parents:i=true}={})=>{const n=typeof t==="string"?[t]:t;if(n.length===0||!e){throw new TypeError("`src` and `dest` are required")}const o=await(0,y.async)(n,{cwd:r,dot:true,absolute:false,stats:false});const l=r?a().resolve(r,e):e;return Promise.all(o.map((async t=>{const e=a().dirname(t);const n=s(a().basename(t));const o=r?a().resolve(r,t):t;const u=i?a().join(l,e,n):a().join(l,n);await f().promises.mkdir(a().dirname(u),{recursive:true});return f().promises.copyFile(o,u)})))};var v=r(2037);var b=r.n(v);const _=require("fs/promises");var S=r.n(_);const w=JSON.parse('{"name":"create-xmlui-app","version":"0.4.3","scripts":{"dev":"mkdir -p dist && cp -r templates/default dist/ && ncc build ./index.ts -w -o dist/","build":"ncc build ./index.ts -o dist/ --minify --no-cache --no-source-map-register && cp -r templates/default dist/","prepublishOnly":"npm run build"},"bin":{"create-xmlui-app":"./dist/index.js"},"files":["dist"],"devDependencies":{"@types/cross-spawn":"6.0.0","@types/node":"^20.2.5","@types/prompts":"2.0.1","@types/validate-npm-package-name":"3.0.0","@vercel/ncc":"0.34.0","fast-glob":"3.3.1","commander":"2.20.0","cross-spawn":"7.0.3","picocolors":"1.0.0","prompts":"2.1.0","update-check":"1.5.4","validate-npm-package-name":"3.0.0"},"engines":{"node":">=18.12.0"},"repository":{"url":"https://github.com/xmlui-com/xmlui.git"}}');const installTemplate=async({appName:t,root:e,packageManager:r,template:i,useGit:n})=>{console.log((0,s.bold)(`Using ${r}.`));console.log("\nInitializing project with template:",i,"\n");const o=a().join(__dirname,i,"ts");const l=["**"];if(!n){l.push("!gitignore")}await copy(l,e,{parents:true,cwd:o,rename(t){switch(t){case"gitignore":case"eslintrc.json":{return`.${t}`}case"README-template.md":{return"README.md"}default:{return t}}}});const u={name:t,version:"0.1.0",private:true,scripts:{start:"xmlui start",build:"xmlui build",preview:"xmlui preview","build-prod":"npm run build -- --prod","release-ci":"npm run build-prod && xmlui zip-dist"},dependencies:{xmlui:w.version}};await S().writeFile(a().join(e,"package.json"),JSON.stringify(u,null,2)+b().EOL);console.log("\nInstalling dependencies:");for(const t in u.dependencies)console.log(`- ${(0,s.cyan)(t)}`);console.log();await install(r)};async function createApp({appPath:t,packageManager:e,useGit:r}){const i="default";const n=a().resolve(t);if(!await isWriteable(a().dirname(n))){console.error("The application 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 o=a().basename(n);await makeDir(n);if(!isFolderEmpty(n,o)){process.exit(1)}console.log(`Creating a new UI Engine app in ${(0,s.green)(n)}.`);console.log();process.chdir(n);await installTemplate({appName:o,root:n,template:i,packageManager:e,useGit:r});if(r&&tryGitInit(n)){console.log("Initialized a git repository.");console.log()}console.log(`${(0,s.green)("Success!")} Created ${o} at ${t}`);console.log()}var x=r(5880);var P=r.n(x);function validateNpmName(t){const e=P()(t);if(e.validForNewPackages){return{valid:true}}return{valid:false,problems:[...e.errors||[],...e.warnings||[]]}}let E="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=t=>{if(t.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const A=new(n().Command)(w.name).version(w.version).arguments("<project-directory>").usage(`${(0,s.green)("<project-directory>")} [options]`).action((t=>{E=t})).option("--use-git",`Explicitly tell the CLI to initialize a git repository`).allowUnknownOption().parse(process.argv);const C="npm";async function run(){if(typeof E==="string"){E=E.trim()}if(!E){const t=await u()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:t=>{const e=validateNpmName(a().basename(a().resolve(t)));if(e.valid){return true}return"Invalid project name: "+e.problems[0]}});if(typeof t.path==="string"){E=t.path.trim()}}if(!E){console.log("\nPlease specify the project directory:\n"+` ${(0,s.cyan)(A.name())} ${(0,s.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,s.cyan)(A.name())} ${(0,s.green)("my-xmlui-app")}\n\n`+`Run ${(0,s.cyan)(`${A.name()} --help`)} to see all options.`);process.exit(1)}const t=a().resolve(E);const e=a().basename(t);const{valid:r,problems:i}=validateNpmName(e);if(!r){console.error(`Could not create a project called ${(0,s.red)(`"${e}"`)} because of npm naming restrictions:`);i.forEach((t=>console.error(` ${(0,s.red)((0,s.bold)("*"))} ${t}`)));process.exit(1)}const n=a().resolve(t);const o=a().basename(n);const l=f().existsSync(n);if(l&&!isFolderEmpty(n,o)){process.exit(1)}if(A.useGit===undefined){const{useGit:t}=await u()({type:"toggle",name:"useGit",message:`Would you like to initialize a git repository?`,initial:false,active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});A.useGit=Boolean(t)}await createApp({appPath:t,packageManager:C,useGit:!!A.useGit})}const R=h()(w).catch((()=>null));async function notifyUpdate(){try{const t=await R;if(t===null||t===void 0?void 0:t.latest){const t="npm i -g create-xmlui-app";console.log((0,s.yellow)((0,s.bold)("A new version of `create-xmlui-app` is available!"))+"\n"+"You can update by running: "+(0,s.cyan)(t)+"\n")}process.exit()}catch{}}run().then(notifyUpdate).catch((async t=>{console.log();console.log("Aborting installation.");if(t.command){console.log(` ${(0,s.cyan)(t.command)} has failed.`)}else{console.log((0,s.red)("Unexpected error. Please report it as a bug:")+"\n",t)}console.log();await notifyUpdate();process.exit(1)}))},4300:t=>{"use strict";t.exports=require("buffer")},2081:t=>{"use strict";t.exports=require("child_process")},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")},4521:t=>{"use strict";t.exports=require("readline")},2781:t=>{"use strict";t.exports=require("stream")},6224:t=>{"use strict";t.exports=require("tty")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},5462:t=>{"use strict";t.exports=JSON.parse('["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"]')}};var e={};function __nccwpck_require__(r){var s=e[r];if(s!==undefined){return s.exports}var i=e[r]={exports:{}};var n=true;try{t[r](i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete e[r]}return i.exports}(()=>{__nccwpck_require__.n=t=>{var e=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(e,{a:e});return e}})();(()=>{__nccwpck_require__.d=(t,e)=>{for(var r in e){if(__nccwpck_require__.o(e,r)&&!__nccwpck_require__.o(t,r)){Object.defineProperty(t,r,{enumerable:true,get:e[r]})}}}})();(()=>{__nccwpck_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(7019);module.exports=r})();
64
+ */const s=r(6110);const toRegexRange=(t,e,r)=>{if(s(t)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(e===void 0||t===e){return String(t)}if(s(e)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let i={relaxZeros:true,...r};if(typeof i.strictZeros==="boolean"){i.relaxZeros=i.strictZeros===false}let n=String(i.relaxZeros);let o=String(i.shorthand);let a=String(i.capture);let l=String(i.wrap);let u=t+":"+e+"="+n+o+a+l;if(toRegexRange.cache.hasOwnProperty(u)){return toRegexRange.cache[u].result}let c=Math.min(t,e);let h=Math.max(t,e);if(Math.abs(c-h)===1){let r=t+"|"+e;if(i.capture){return`(${r})`}if(i.wrap===false){return r}return`(?:${r})`}let d=hasPadding(t)||hasPadding(e);let f={min:t,max:e,a:c,b:h};let p=[];let g=[];if(d){f.isPadded=d;f.maxLen=String(f.max).length}if(c<0){let t=h<0?Math.abs(h):1;g=splitToPatterns(t,Math.abs(c),f,i);c=f.a=0}if(h>=0){p=splitToPatterns(c,h,f,i)}f.negatives=g;f.positives=p;f.result=collatePatterns(g,p,i);if(i.capture===true){f.result=`(${f.result})`}else if(i.wrap!==false&&p.length+g.length>1){f.result=`(?:${f.result})`}toRegexRange.cache[u]=f;return f.result};function collatePatterns(t,e,r){let s=filterPatterns(t,e,"-",false,r)||[];let i=filterPatterns(e,t,"",false,r)||[];let n=filterPatterns(t,e,"-?",true,r)||[];let o=s.concat(n).concat(i);return o.join("|")}function splitToRanges(t,e){let r=1;let s=1;let i=countNines(t,r);let n=new Set([e]);while(t<=i&&i<=e){n.add(i);r+=1;i=countNines(t,r)}i=countZeros(e+1,s)-1;while(t<i&&i<=e){n.add(i);s+=1;i=countZeros(e+1,s)-1}n=[...n];n.sort(compare);return n}function rangeToPattern(t,e,r){if(t===e){return{pattern:t,count:[],digits:0}}let s=zip(t,e);let i=s.length;let n="";let o=0;for(let t=0;t<i;t++){let[e,i]=s[t];if(e===i){n+=e}else if(e!=="0"||i!=="9"){n+=toCharacterClass(e,i,r)}else{o++}}if(o){n+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:n,count:[o],digits:i}}function splitToPatterns(t,e,r,s){let i=splitToRanges(t,e);let n=[];let o=t;let a;for(let t=0;t<i.length;t++){let e=i[t];let l=rangeToPattern(String(o),String(e),s);let u="";if(!r.isPadded&&a&&a.pattern===l.pattern){if(a.count.length>1){a.count.pop()}a.count.push(l.count[0]);a.string=a.pattern+toQuantifier(a.count);o=e+1;continue}if(r.isPadded){u=padZeros(e,r,s)}l.string=u+l.pattern+toQuantifier(l.count);n.push(l);o=e+1;a=l}return n}function filterPatterns(t,e,r,s,i){let n=[];for(let i of t){let{string:t}=i;if(!s&&!contains(e,"string",t)){n.push(r+t)}if(s&&contains(e,"string",t)){n.push(r+t)}}return n}function zip(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function compare(t,e){return t>e?1:e>t?-1:0}function contains(t,e,r){return t.some((t=>t[e]===r))}function countNines(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function countZeros(t,e){return t-t%Math.pow(10,e)}function toQuantifier(t){let[e=0,r=""]=t;if(r||e>1){return`{${e+(r?","+r:"")}}`}return""}function toCharacterClass(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function hasPadding(t){return/^-?(0+)\d/.test(t)}function padZeros(t,e,r){if(!e.isPadded){return t}let s=Math.abs(e.maxLen-String(t).length);let i=r.relaxZeros!==false;switch(s){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:{return i?`0{0,${s}}`:`0{${s}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};t.exports=toRegexRange},5418:(t,e,r)=>{const{URL:s}=r(7310);const{join:i}=r(1017);const n=r(7147);const{promisify:o}=r(3837);const{tmpdir:a}=r(2037);const l=r(2447);const u=o(n.writeFile);const c=o(n.mkdir);const h=o(n.readFile);const compareVersions=(t,e)=>t.localeCompare(e,"en-US",{numeric:true});const encode=t=>encodeURIComponent(t).replace(/^%40/,"@");const getFile=async(t,e)=>{const r=a();const s=i(r,"update-check");if(!n.existsSync(s)){await c(s)}let o=`${t.name}-${e}.json`;if(t.scope){o=`${t.scope}-${o}`}return i(s,o)};const evaluateCache=async(t,e,r)=>{if(n.existsSync(t)){const s=await h(t,"utf8");const{lastUpdate:i,latest:n}=JSON.parse(s);const o=i+r;if(o>e){return{shouldCheck:false,latest:n}}}return{shouldCheck:true,latest:null}};const updateCache=async(t,e,r)=>{const s=JSON.stringify({latest:e,lastUpdate:r});await u(t,s,"utf8")};const loadPackage=(t,e)=>new Promise(((s,i)=>{const n={host:t.hostname,path:t.pathname,port:t.port,headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},timeout:2e3};if(e){n.headers.authorization=`${e.type} ${e.token}`}const{get:o}=r(t.protocol==="https:"?5687:3685);o(n,(t=>{const{statusCode:e}=t;if(e!==200){const r=new Error(`Request failed with code ${e}`);r.code=e;i(r);t.resume();return}let r="";t.setEncoding("utf8");t.on("data",(t=>{r+=t}));t.on("end",(()=>{try{const t=JSON.parse(r);s(t)}catch(t){i(t)}}))})).on("error",i).on("timeout",i)}));const getMostRecent=async({full:t,scope:e},i)=>{const n=l(e);const o=new s(t,n);let a=null;try{a=await loadPackage(o)}catch(t){if(t.code&&String(t.code).startsWith(4)){const t=r(1384);const e=t(n,{recursive:true});a=await loadPackage(o,e)}else{throw t}}const u=a["dist-tags"][i];if(!u){throw new Error(`Distribution tag ${i} is not available`)}return u};const d={interval:36e5,distTag:"latest"};const getDetails=t=>{const e={full:encode(t)};if(t.includes("/")){const r=t.split("/");e.scope=r[0];e.name=r[1]}else{e.scope=null;e.name=t}return e};t.exports=async(t,e)=>{if(typeof t!=="object"){throw new Error("The first parameter should be your package.json file content")}const r=getDetails(t.name);const s=Date.now();const{distTag:i,interval:n}=Object.assign({},d,e);const o=await getFile(r,i);let a=null;let l=true;({shouldCheck:l,latest:a}=await evaluateCache(o,s,n));if(l){a=await getMostRecent(r,i);await updateCache(o,a,s)}const u=compareVersions(t.version,a);if(u===-1){return{latest:a,fromCache:!l}}return null}},5880:(t,e,r)=>{"use strict";var s=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var i=r(5462);var n=["node_modules","favicon.ico"];var o=t.exports=function(t){var e=[];var r=[];if(t===null){r.push("name cannot be null");return done(e,r)}if(t===undefined){r.push("name cannot be undefined");return done(e,r)}if(typeof t!=="string"){r.push("name must be a string");return done(e,r)}if(!t.length){r.push("name length must be greater than zero")}if(t.match(/^\./)){r.push("name cannot start with a period")}if(t.match(/^_/)){r.push("name cannot start with an underscore")}if(t.trim()!==t){r.push("name cannot contain leading or trailing spaces")}n.forEach((function(e){if(t.toLowerCase()===e){r.push(e+" is a blacklisted name")}}));i.forEach((function(r){if(t.toLowerCase()===r){e.push(r+" is a core module name")}}));if(t.length>214){e.push("name can no longer contain more than 214 characters")}if(t.toLowerCase()!==t){e.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(t.split("/").slice(-1)[0])){e.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(t)!==t){var o=t.match(s);if(o){var a=o[1];var l=o[2];if(encodeURIComponent(a)===a&&encodeURIComponent(l)===l){return done(e,r)}}r.push("name can only contain URL-friendly characters")}return done(e,r)};o.scopedPackagePattern=s;var done=function(t,e){var r={validForNewPackages:e.length===0&&t.length===0,validForOldPackages:e.length===0,warnings:t,errors:e};if(!r.warnings.length)delete r.warnings;if(!r.errors.length)delete r.errors;return r}},8201:(t,e,r)=>{const s=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const i=r(1017);const n=s?";":":";const o=r(228);const getNotFoundError=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"});const getPathInfo=(t,e)=>{const r=e.colon||n;const i=t.match(/\//)||s&&t.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)];const o=s?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=s?o.split(r):[""];if(s){if(t.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:i,pathExt:a,pathExtExe:o}};const which=(t,e,r)=>{if(typeof e==="function"){r=e;e={}}if(!e)e={};const{pathEnv:s,pathExt:n,pathExtExe:a}=getPathInfo(t,e);const l=[];const step=r=>new Promise(((n,o)=>{if(r===s.length)return e.all&&l.length?n(l):o(getNotFoundError(t));const a=s[r];const u=/^".*"$/.test(a)?a.slice(1,-1):a;const c=i.join(u,t);const h=!u&&/^\.[\\\/]/.test(t)?t.slice(0,2)+c:c;n(subStep(h,r,0))}));const subStep=(t,r,s)=>new Promise(((i,u)=>{if(s===n.length)return i(step(r+1));const c=n[s];o(t+c,{pathExt:a},((n,o)=>{if(!n&&o){if(e.all)l.push(t+c);else return i(t+c)}return i(subStep(t,r,s+1))}))}));return r?step(0).then((t=>r(null,t)),r):step(0)};const whichSync=(t,e)=>{e=e||{};const{pathEnv:r,pathExt:s,pathExtExe:n}=getPathInfo(t,e);const a=[];for(let l=0;l<r.length;l++){const u=r[l];const c=/^".*"$/.test(u)?u.slice(1,-1):u;const h=i.join(c,t);const d=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+h:h;for(let t=0;t<s.length;t++){const r=d+s[t];try{const t=o.sync(r,{pathExt:n});if(t){if(e.all)a.push(r);else return r}}catch(t){}}}if(e.all&&a.length)return a;if(e.nothrow)return null;throw getNotFoundError(t)};t.exports=which;which.sync=whichSync},7019:(t,e,r)=>{"use strict";r.r(e);var s=r(9397);var i=r(8018);var n=r.n(i);var o=r(1017);var a=r.n(o);var l=r(1112);var u=r.n(l);var c=r(5418);var h=r.n(c);var d=r(7147);var f=r.n(d);function makeDir(t,e={recursive:true}){return f().promises.mkdir(t,e)}var p=r(2081);function isInGitRepository(){try{(0,p.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(t){}return false}function isInMercurialRepository(){try{(0,p.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(t){}return false}function isDefaultBranchSet(){try{(0,p.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch(t){}return false}function tryGitInit(t){let e=false;try{(0,p.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,p.execSync)("git init",{stdio:"ignore"});e=true;if(!isDefaultBranchSet()){(0,p.execSync)("git checkout -b main",{stdio:"ignore"})}(0,p.execSync)("git add -A",{stdio:"ignore"});(0,p.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch(r){if(e){try{f().rmSync(a().join(t,".git"),{recursive:true,force:true})}catch(t){}}return false}}function isFolderEmpty(t,e){const r=[".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","yarnrc.yml",".yarn"];const i=f().readdirSync(t).filter((t=>!r.includes(t))).filter((t=>!/\.iml$/.test(t)));if(i.length>0){console.log(`The directory ${(0,s.green)(e)} contains files that could conflict:`);console.log();for(const e of i){try{const r=f().lstatSync(a().join(t,e));if(r.isDirectory()){console.log(` ${(0,s.blue)(e)}/`)}else{console.log(` ${e}`)}}catch{console.log(` ${e}`)}}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 f().promises.access(t,(f().constants||f()).W_OK);return true}catch(t){return false}}var g=r(7987);var m=r.n(g);async function install(t){let e=["install"];return new Promise(((r,s)=>{const i=m()(t,e,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});i.on("close",(i=>{if(i!==0){s({command:`${t} ${e.join(" ")}`});return}r()}))}))}var y=r(3909);const identity=t=>t;const copy=async(t,e,{cwd:r,rename:s=identity,parents:i=true}={})=>{const n=typeof t==="string"?[t]:t;if(n.length===0||!e){throw new TypeError("`src` and `dest` are required")}const o=await(0,y.async)(n,{cwd:r,dot:true,absolute:false,stats:false});const l=r?a().resolve(r,e):e;return Promise.all(o.map((async t=>{const e=a().dirname(t);const n=s(a().basename(t));const o=r?a().resolve(r,t):t;const u=i?a().join(l,e,n):a().join(l,n);await f().promises.mkdir(a().dirname(u),{recursive:true});return f().promises.copyFile(o,u)})))};var v=r(2037);var b=r.n(v);const _=require("fs/promises");var S=r.n(_);const w=JSON.parse('{"name":"create-xmlui-app","version":"0.6.1","scripts":{"dev":"mkdir -p dist && cp -r templates/default dist/ && ncc build ./index.ts -w -o dist/","build":"ncc build ./index.ts -o dist/ --minify --no-cache --no-source-map-register && cp -r templates/default dist/","prepublishOnly":"npm run build"},"bin":{"create-xmlui-app":"./dist/index.js"},"files":["dist"],"devDependencies":{"@types/cross-spawn":"6.0.0","@types/node":"^20.2.5","@types/prompts":"2.0.1","@types/validate-npm-package-name":"3.0.0","@vercel/ncc":"0.34.0","fast-glob":"3.3.1","commander":"2.20.0","cross-spawn":"7.0.3","picocolors":"1.0.0","prompts":"2.1.0","update-check":"1.5.4","validate-npm-package-name":"3.0.0"},"engines":{"node":">=18.12.0"},"repository":{"url":"https://github.com/xmlui-com/xmlui.git"}}');const installTemplate=async({appName:t,root:e,packageManager:r,template:i,useGit:n})=>{console.log((0,s.bold)(`Using ${r}.`));console.log("\nInitializing project with template:",i,"\n");const o=a().join(__dirname,i,"ts");const l=["**"];if(!n){l.push("!gitignore")}await copy(l,e,{parents:true,cwd:o,rename(t){switch(t){case"gitignore":case"eslintrc.json":{return`.${t}`}case"README-template.md":{return"README.md"}default:{return t}}}});const u={name:t,version:"0.1.0",private:true,scripts:{start:"xmlui start",build:"xmlui build",preview:"xmlui preview","build-prod":"npm run build -- --prod","release-ci":"npm run build-prod && xmlui zip-dist"},dependencies:{xmlui:w.version}};await S().writeFile(a().join(e,"package.json"),JSON.stringify(u,null,2)+b().EOL);console.log("\nInstalling dependencies:");for(const t in u.dependencies)console.log(`- ${(0,s.cyan)(t)}`);console.log();await install(r)};async function createApp({appPath:t,packageManager:e,useGit:r}){const i="default";const n=a().resolve(t);if(!await isWriteable(a().dirname(n))){console.error("The application 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 o=a().basename(n);await makeDir(n);if(!isFolderEmpty(n,o)){process.exit(1)}console.log(`Creating a new UI Engine app in ${(0,s.green)(n)}.`);console.log();process.chdir(n);await installTemplate({appName:o,root:n,template:i,packageManager:e,useGit:r});if(r&&tryGitInit(n)){console.log("Initialized a git repository.");console.log()}console.log(`${(0,s.green)("Success!")} Created ${o} at ${t}`);console.log()}var x=r(5880);var P=r.n(x);function validateNpmName(t){const e=P()(t);if(e.validForNewPackages){return{valid:true}}return{valid:false,problems:[...e.errors||[],...e.warnings||[]]}}let E="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=t=>{if(t.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const A=new(n().Command)(w.name).version(w.version).arguments("<project-directory>").usage(`${(0,s.green)("<project-directory>")} [options]`).action((t=>{E=t})).option("--use-git",`Explicitly tell the CLI to initialize a git repository`).allowUnknownOption().parse(process.argv);const C="npm";async function run(){if(typeof E==="string"){E=E.trim()}if(!E){const t=await u()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:t=>{const e=validateNpmName(a().basename(a().resolve(t)));if(e.valid){return true}return"Invalid project name: "+e.problems[0]}});if(typeof t.path==="string"){E=t.path.trim()}}if(!E){console.log("\nPlease specify the project directory:\n"+` ${(0,s.cyan)(A.name())} ${(0,s.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,s.cyan)(A.name())} ${(0,s.green)("my-xmlui-app")}\n\n`+`Run ${(0,s.cyan)(`${A.name()} --help`)} to see all options.`);process.exit(1)}const t=a().resolve(E);const e=a().basename(t);const{valid:r,problems:i}=validateNpmName(e);if(!r){console.error(`Could not create a project called ${(0,s.red)(`"${e}"`)} because of npm naming restrictions:`);i.forEach((t=>console.error(` ${(0,s.red)((0,s.bold)("*"))} ${t}`)));process.exit(1)}const n=a().resolve(t);const o=a().basename(n);const l=f().existsSync(n);if(l&&!isFolderEmpty(n,o)){process.exit(1)}if(A.useGit===undefined){const{useGit:t}=await u()({type:"toggle",name:"useGit",message:`Would you like to initialize a git repository?`,initial:false,active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});A.useGit=Boolean(t)}await createApp({appPath:t,packageManager:C,useGit:!!A.useGit})}const R=h()(w).catch((()=>null));async function notifyUpdate(){try{const t=await R;if(t===null||t===void 0?void 0:t.latest){const t="npm i -g create-xmlui-app";console.log((0,s.yellow)((0,s.bold)("A new version of `create-xmlui-app` is available!"))+"\n"+"You can update by running: "+(0,s.cyan)(t)+"\n")}process.exit()}catch{}}run().then(notifyUpdate).catch((async t=>{console.log();console.log("Aborting installation.");if(t.command){console.log(` ${(0,s.cyan)(t.command)} has failed.`)}else{console.log((0,s.red)("Unexpected error. Please report it as a bug:")+"\n",t)}console.log();await notifyUpdate();process.exit(1)}))},4300:t=>{"use strict";t.exports=require("buffer")},2081:t=>{"use strict";t.exports=require("child_process")},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")},4521:t=>{"use strict";t.exports=require("readline")},2781:t=>{"use strict";t.exports=require("stream")},6224:t=>{"use strict";t.exports=require("tty")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},5462:t=>{"use strict";t.exports=JSON.parse('["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"]')}};var e={};function __nccwpck_require__(r){var s=e[r];if(s!==undefined){return s.exports}var i=e[r]={exports:{}};var n=true;try{t[r](i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete e[r]}return i.exports}(()=>{__nccwpck_require__.n=t=>{var e=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(e,{a:e});return e}})();(()=>{__nccwpck_require__.d=(t,e)=>{for(var r in e){if(__nccwpck_require__.o(e,r)&&!__nccwpck_require__.o(t,r)){Object.defineProperty(t,r,{enumerable:true,get:e[r]})}}}})();(()=>{__nccwpck_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(7019);module.exports=r})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-xmlui-app",
3
- "version": "0.4.3",
3
+ "version": "0.6.1",
4
4
  "scripts": {
5
5
  "dev": "mkdir -p dist && cp -r templates/default dist/ && ncc build ./index.ts -w -o dist/",
6
6
  "build": "ncc build ./index.ts -o dist/ --minify --no-cache --no-source-map-register && cp -r templates/default dist/",