create-reactive-vscode 0.0.1-beta.1 → 0.0.1-beta.3

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.cjs +21 -21
  3. package/package.json +7 -8
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 _Kerman <https://github.com/KermanX>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  var fo=Object.create;var ri=Object.defineProperty;var po=Object.getOwnPropertyDescriptor;var mo=Object.getOwnPropertyNames;var go=Object.getPrototypeOf,bo=Object.prototype.hasOwnProperty;var u=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports);var vo=(i,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of mo(e))!bo.call(i,r)&&r!==t&&ri(i,r,{get:()=>e[r],enumerable:!(s=po(e,r))||s.enumerable});return i};var B=(i,e,t)=>(t=i!=null?fo(go(i)):{},vo(e||!i||!i.__esModule?ri(t,"default",{value:i,enumerable:!0}):t,i));var m=u((Ku,bi)=>{"use strict";var{FORCE_COLOR:Ao,NODE_DISABLE_COLORS:Do,TERM:Ro}=process.env,c={enabled:!Do&&Ro!=="dumb"&&Ao!=="0",reset:d(0,0),bold:d(1,22),dim:d(2,22),italic:d(3,23),underline:d(4,24),inverse:d(7,27),hidden:d(8,28),strikethrough:d(9,29),black:d(30,39),red:d(31,39),green:d(32,39),yellow:d(33,39),blue:d(34,39),magenta:d(35,39),cyan:d(36,39),white:d(37,39),gray:d(90,39),grey:d(90,39),bgBlack:d(40,49),bgRed:d(41,49),bgGreen:d(42,49),bgYellow:d(43,49),bgBlue:d(44,49),bgMagenta:d(45,49),bgCyan:d(46,49),bgWhite:d(47,49)};function gi(i,e){let t=0,s,r="",n="";for(;t<i.length;t++)s=i[t],r+=s.open,n+=s.close,e.includes(s.close)&&(e=e.replace(s.rgx,s.close+s.open));return r+e+n}function ko(i,e){let t={has:i,keys:e};return t.reset=c.reset.bind(t),t.bold=c.bold.bind(t),t.dim=c.dim.bind(t),t.italic=c.italic.bind(t),t.underline=c.underline.bind(t),t.inverse=c.inverse.bind(t),t.hidden=c.hidden.bind(t),t.strikethrough=c.strikethrough.bind(t),t.black=c.black.bind(t),t.red=c.red.bind(t),t.green=c.green.bind(t),t.yellow=c.yellow.bind(t),t.blue=c.blue.bind(t),t.magenta=c.magenta.bind(t),t.cyan=c.cyan.bind(t),t.white=c.white.bind(t),t.gray=c.gray.bind(t),t.grey=c.grey.bind(t),t.bgBlack=c.bgBlack.bind(t),t.bgRed=c.bgRed.bind(t),t.bgGreen=c.bgGreen.bind(t),t.bgYellow=c.bgYellow.bind(t),t.bgBlue=c.bgBlue.bind(t),t.bgMagenta=c.bgMagenta.bind(t),t.bgCyan=c.bgCyan.bind(t),t.bgWhite=c.bgWhite.bind(t),t}function d(i,e){let t={open:`\x1B[${i}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(s){return this!==void 0&&this.has!==void 0?(this.has.includes(i)||(this.has.push(i),this.keys.push(t)),s===void 0?this:c.enabled?gi(this.keys,s+""):s+""):s===void 0?ko([i],[t]):c.enabled?gi([t],s+""):s+""}}bi.exports=c});var yi=u((Zu,vi)=>{"use strict";vi.exports=(i,e)=>{if(!(i.meta&&i.name!=="escape")){if(i.ctrl){if(i.name==="a")return"first";if(i.name==="c"||i.name==="d")return"abort";if(i.name==="e")return"last";if(i.name==="g")return"reset"}if(e){if(i.name==="j")return"down";if(i.name==="k")return"up"}return i.name==="return"||i.name==="enter"?"submit":i.name==="backspace"?"delete":i.name==="delete"?"deleteForward":i.name==="abort"?"abort":i.name==="escape"?"exit":i.name==="tab"?"next":i.name==="pagedown"?"nextPage":i.name==="pageup"?"prevPage":i.name==="home"?"home":i.name==="end"?"end":i.name==="up"?"up":i.name==="down"?"down":i.name==="right"?"right":i.name==="left"?"left":!1}}});var Oe=u((Xu,wi)=>{"use strict";wi.exports=i=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),t=new RegExp(e,"g");return typeof i=="string"?i.replace(t,""):i}});var b=u((Qu,xi)=>{"use strict";var He="\x1B",g=`${He}[`,jo="\x07",Ge={to(i,e){return e?`${g}${e+1};${i+1}H`:`${g}${i+1}G`},move(i,e){let t="";return i<0?t+=`${g}${-i}D`:i>0&&(t+=`${g}${i}C`),e<0?t+=`${g}${-e}A`:e>0&&(t+=`${g}${e}B`),t},up:(i=1)=>`${g}${i}A`,down:(i=1)=>`${g}${i}B`,forward:(i=1)=>`${g}${i}C`,backward:(i=1)=>`${g}${i}D`,nextLine:(i=1)=>`${g}E`.repeat(i),prevLine:(i=1)=>`${g}F`.repeat(i),left:`${g}G`,hide:`${g}?25l`,show:`${g}?25h`,save:`${He}7`,restore:`${He}8`},Fo={up:(i=1)=>`${g}S`.repeat(i),down:(i=1)=>`${g}T`.repeat(i)},No={screen:`${g}2J`,up:(i=1)=>`${g}1J`.repeat(i),down:(i=1)=>`${g}J`.repeat(i),line:`${g}2K`,lineEnd:`${g}K`,lineStart:`${g}1K`,lines(i){let e="";for(let t=0;t<i;t++)e+=this.line+(t<i-1?Ge.up():"");return i&&(e+=Ge.left),e}};xi.exports={cursor:Ge,scroll:Fo,erase:No,beep:jo}});var Ci=u((ea,Mi)=>{"use strict";function Vo(i,e){var t=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(!t){if(Array.isArray(i)||(t=Yo(i))||e&&i&&typeof i.length=="number"){t&&(i=t);var s=0,r=function(){};return{s:r,n:function(){return s>=i.length?{done:!0}:{done:!1,value:i[s++]}},e:function(a){throw a},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=!0,o=!1,h;return{s:function(){t=t.call(i)},n:function(){var a=t.next();return n=a.done,a},e:function(a){o=!0,h=a},f:function(){try{!n&&t.return!=null&&t.return()}finally{if(o)throw h}}}}function Yo(i,e){if(i){if(typeof i=="string")return Si(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Si(i,e)}}function Si(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,s=new Array(e);t<e;t++)s[t]=i[t];return s}var Lo=Oe(),Ti=b(),Oi=Ti.erase,Bo=Ti.cursor,Ho=i=>[...Lo(i)].length;Mi.exports=function(i,e){if(!e)return Oi.line+Bo.to(0);let t=0,s=i.split(/\r?\n/);var r=Vo(s),n;try{for(r.s();!(n=r.n()).done;){let o=n.value;t+=1+Math.floor(Math.max(Ho(o)-1,0)/e)}}catch(o){r.e(o)}finally{r.f()}return Oi.lines(t)}});var Ue=u((ta,qi)=>{"use strict";var oe={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},Go={arrowUp:oe.arrowUp,arrowDown:oe.arrowDown,arrowLeft:oe.arrowLeft,arrowRight:oe.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},Uo=process.platform==="win32"?Go:oe;qi.exports=Uo});var Ii=u((ia,$i)=>{"use strict";var Q=m(),z=Ue(),We=Object.freeze({password:{scale:1,render:i=>"*".repeat(i.length)},emoji:{scale:2,render:i=>"\u{1F603}".repeat(i.length)},invisible:{scale:0,render:i=>""},default:{scale:1,render:i=>`${i}`}}),Wo=i=>We[i]||We.default,he=Object.freeze({aborted:Q.red(z.cross),done:Q.green(z.tick),exited:Q.yellow(z.cross),default:Q.cyan("?")}),zo=(i,e,t)=>e?he.aborted:t?he.exited:i?he.done:he.default,Jo=i=>Q.gray(i?z.ellipsis:z.pointerSmall),Ko=(i,e)=>Q.gray(i?e?z.pointerSmall:"+":z.line);$i.exports={styles:We,render:Wo,symbols:he,symbol:zo,delimiter:Jo,item:Ko}});var _i=u((sa,Pi)=>{"use strict";var Zo=Oe();Pi.exports=function(i,e){let t=String(Zo(i)||"").split(/\r?\n/);return e?t.map(s=>Math.ceil(s.length/e)).reduce((s,r)=>s+r):t.length}});var Ai=u((ra,Ei)=>{"use strict";Ei.exports=(i,e={})=>{let t=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return(i||"").split(/\r?\n/g).map(r=>r.split(/\s+/g).reduce((n,o)=>(o.length+t.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${t}${o}`),n),[t]).join(`
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=!0,o=!1,h;return{s:function(){t=t.call(i)},n:function(){var a=t.next();return n=a.done,a},e:function(a){o=!0,h=a},f:function(){try{!n&&t.return!=null&&t.return()}finally{if(o)throw h}}}}function Yo(i,e){if(i){if(typeof i=="string")return Si(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Si(i,e)}}function Si(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,s=new Array(e);t<e;t++)s[t]=i[t];return s}var Lo=Oe(),Ti=b(),Oi=Ti.erase,Bo=Ti.cursor,Ho=i=>[...Lo(i)].length;Mi.exports=function(i,e){if(!e)return Oi.line+Bo.to(0);let t=0,s=i.split(/\r?\n/);var r=Vo(s),n;try{for(r.s();!(n=r.n()).done;){let o=n.value;t+=1+Math.floor(Math.max(Ho(o)-1,0)/e)}}catch(o){r.e(o)}finally{r.f()}return Oi.lines(t)}});var Ue=u((ta,qi)=>{"use strict";var oe={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},Go={arrowUp:oe.arrowUp,arrowDown:oe.arrowDown,arrowLeft:oe.arrowLeft,arrowRight:oe.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},Uo=process.platform==="win32"?Go:oe;qi.exports=Uo});var Ii=u((ia,$i)=>{"use strict";var Q=m(),z=Ue(),We=Object.freeze({password:{scale:1,render:i=>"*".repeat(i.length)},emoji:{scale:2,render:i=>"\u{1F603}".repeat(i.length)},invisible:{scale:0,render:i=>""},default:{scale:1,render:i=>`${i}`}}),Wo=i=>We[i]||We.default,he=Object.freeze({aborted:Q.red(z.cross),done:Q.green(z.tick),exited:Q.yellow(z.cross),default:Q.cyan("?")}),zo=(i,e,t)=>e?he.aborted:t?he.exited:i?he.done:he.default,Jo=i=>Q.gray(i?z.ellipsis:z.pointerSmall),Ko=(i,e)=>Q.gray(i?e?z.pointerSmall:"+":z.line);$i.exports={styles:We,render:Wo,symbols:he,symbol:zo,delimiter:Jo,item:Ko}});var Pi=u((sa,_i)=>{"use strict";var Zo=Oe();_i.exports=function(i,e){let t=String(Zo(i)||"").split(/\r?\n/);return e?t.map(s=>Math.ceil(s.length/e)).reduce((s,r)=>s+r):t.length}});var Ai=u((ra,Ei)=>{"use strict";Ei.exports=(i,e={})=>{let t=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return(i||"").split(/\r?\n/g).map(r=>r.split(/\s+/g).reduce((n,o)=>(o.length+t.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${t}${o}`),n),[t]).join(`
3
3
  `)).join(`
4
- `)}});var Ri=u((na,Di)=>{"use strict";Di.exports=(i,e,t)=>{t=t||e;let s=Math.min(e-t,i-Math.floor(t/2));s<0&&(s=0);let r=Math.min(s+t,e);return{startIndex:s,endIndex:r}}});var T=u((oa,ki)=>{"use strict";ki.exports={action:yi(),clear:Ci(),style:Ii(),strip:Oe(),figures:Ue(),lines:_i(),wrap:Ai(),entriesToDisplay:Ri()}});var R=u((ha,Ni)=>{"use strict";var ji=require("readline"),Xo=T(),Qo=Xo.action,eh=require("events"),Fi=b(),th=Fi.beep,ih=Fi.cursor,sh=m(),ze=class extends eh{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let t=ji.createInterface({input:this.in,escapeCodeTimeout:50});ji.emitKeypressEvents(this.in,t),this.in.isTTY&&this.in.setRawMode(!0);let s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,r=(n,o)=>{let h=Qo(o,s);h===!1?this._&&this._(n,o):typeof this[h]=="function"?this[h](o):this.bell()};this.close=()=>{this.out.write(ih.show),this.in.removeListener("keypress",r),this.in.isTTY&&this.in.setRawMode(!1),t.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",r)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(th)}render(){this.onRender(sh),this.firstRender&&(this.firstRender=!1)}};Ni.exports=ze});var Hi=u((la,Bi)=>{"use strict";function Vi(i,e,t,s,r,n,o){try{var h=i[n](o),l=h.value}catch(a){t(a);return}h.done?e(l):Promise.resolve(l).then(s,r)}function Yi(i){return function(){var e=this,t=arguments;return new Promise(function(s,r){var n=i.apply(e,t);function o(l){Vi(n,s,r,o,h,"next",l)}function h(l){Vi(n,s,r,o,h,"throw",l)}o(void 0)})}}var Te=m(),rh=R(),Li=b(),nh=Li.erase,le=Li.cursor,Me=T(),Je=Me.style,Ke=Me.clear,oh=Me.lines,hh=Me.figures,Ze=class extends rh{constructor(e={}){super(e),this.transform=Je.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=Ke("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=Te.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
4
+ `)}});var Ri=u((na,Di)=>{"use strict";Di.exports=(i,e,t)=>{t=t||e;let s=Math.min(e-t,i-Math.floor(t/2));s<0&&(s=0);let r=Math.min(s+t,e);return{startIndex:s,endIndex:r}}});var T=u((oa,ki)=>{"use strict";ki.exports={action:yi(),clear:Ci(),style:Ii(),strip:Oe(),figures:Ue(),lines:Pi(),wrap:Ai(),entriesToDisplay:Ri()}});var R=u((ha,Ni)=>{"use strict";var ji=require("readline"),Xo=T(),Qo=Xo.action,eh=require("events"),Fi=b(),th=Fi.beep,ih=Fi.cursor,sh=m(),ze=class extends eh{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let t=ji.createInterface({input:this.in,escapeCodeTimeout:50});ji.emitKeypressEvents(this.in,t),this.in.isTTY&&this.in.setRawMode(!0);let s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,r=(n,o)=>{let h=Qo(o,s);h===!1?this._&&this._(n,o):typeof this[h]=="function"?this[h](o):this.bell()};this.close=()=>{this.out.write(ih.show),this.in.removeListener("keypress",r),this.in.isTTY&&this.in.setRawMode(!1),t.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",r)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(th)}render(){this.onRender(sh),this.firstRender&&(this.firstRender=!1)}};Ni.exports=ze});var Hi=u((la,Bi)=>{"use strict";function Vi(i,e,t,s,r,n,o){try{var h=i[n](o),l=h.value}catch(a){t(a);return}h.done?e(l):Promise.resolve(l).then(s,r)}function Yi(i){return function(){var e=this,t=arguments;return new Promise(function(s,r){var n=i.apply(e,t);function o(l){Vi(n,s,r,o,h,"next",l)}function h(l){Vi(n,s,r,o,h,"throw",l)}o(void 0)})}}var Te=m(),rh=R(),Li=b(),nh=Li.erase,le=Li.cursor,Me=T(),Je=Me.style,Ke=Me.clear,oh=Me.lines,hh=Me.figures,Ze=class extends rh{constructor(e={}){super(e),this.transform=Je.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=Ke("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=Te.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
5
5
  `),this.close()}validate(){var e=this;return Yi(function*(){let t=yield e.validator(e.value);typeof t=="string"&&(e.errorMsg=t,t=!1),e.error=!t})()}submit(){var e=this;return Yi(function*(){if(e.value=e.value||e.initial,e.cursorOffset=0,e.cursor=e.rendered.length,yield e.validate(),e.error){e.red=!0,e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write(`
6
6
  `),e.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,t){let s=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor);this.value=`${s}${e}${r}`,this.red=!1,this.cursor=this.placeholder?0:s.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),t=this.value.slice(this.cursor);this.value=`${e}${t}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor+1);this.value=`${e}${t}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(le.down(oh(this.outputError,this.out.columns)-1)+Ke(this.outputError,this.out.columns)),this.out.write(Ke(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Je.symbol(this.done,this.aborted),Te.bold(this.msg),Je.delimiter(this.done),this.red?Te.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
7
7
  `).reduce((e,t,s)=>e+`
@@ -12,12 +12,12 @@ ${s?" ":hh.pointerSmall} ${Te.red().italic(t)}`,"")),this.out.write(nh.line+le.t
12
12
  `+uh(l.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${n}${k.gray(h)}
13
13
  `}}this.out.write(this.outputText)}};Wi.exports=Xe});var es=u((aa,Qi)=>{"use strict";var qe=m(),fh=R(),Zi=T(),Ji=Zi.style,ph=Zi.clear,Xi=b(),Ki=Xi.cursor,mh=Xi.erase,Qe=class extends fh{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
14
14
  `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
15
- `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,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()}_(e,t){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(Ki.hide):this.out.write(ph(this.outputText,this.out.columns)),super.render(),this.outputText=[Ji.symbol(this.done,this.aborted),qe.bold(this.msg),Ji.delimiter(this.done),this.value?this.inactive:qe.cyan().underline(this.inactive),qe.gray("/"),this.value?qe.cyan().underline(this.active):this.active].join(" "),this.out.write(mh.line+Ki.to(0)+this.outputText))}};Qi.exports=Qe});var q=u((ca,ts)=>{"use strict";var et=class i{constructor({token:e,date:t,parts:s,locales:r}){this.token=e,this.date=t||new Date,this.parts=s||[this],this.locales=r||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((t,s)=>s>e&&t instanceof i)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),t=e.indexOf(this);return e.find((s,r)=>r>t&&s instanceof i)}toString(){return String(this.date)}};ts.exports=et});var ss=u((da,is)=>{"use strict";var gh=q(),tt=class extends gh{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};is.exports=tt});var ns=u((fa,rs)=>{"use strict";var bh=q(),vh=i=>(i=i%10,i===1?"st":i===2?"nd":i===3?"rd":"th"),it=class extends bh{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),t=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+vh(e):this.token==="d"?t+1:this.token==="ddd"?this.locales.weekdaysShort[t]:this.token==="dddd"?this.locales.weekdays[t]:e}};rs.exports=it});var hs=u((pa,os)=>{"use strict";var yh=q(),st=class extends yh{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};os.exports=st});var us=u((ma,ls)=>{"use strict";var wh=q(),rt=class extends wh{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};ls.exports=rt});var cs=u((ga,as)=>{"use strict";var xh=q(),nt=class extends xh{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};as.exports=nt});var fs=u((ba,ds)=>{"use strict";var Sh=q(),ot=class extends Sh{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),t=this.token.length;return t===2?String(e+1).padStart(2,"0"):t===3?this.locales.monthsShort[e]:t===4?this.locales.months[e]:String(e+1)}};ds.exports=ot});var ms=u((va,ps)=>{"use strict";var Oh=q(),ht=class extends Oh{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};ps.exports=ht});var bs=u((ya,gs)=>{"use strict";var Th=q(),lt=class extends Th{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};gs.exports=lt});var ys=u((wa,vs)=>{"use strict";vs.exports={DatePart:q(),Meridiem:ss(),Day:ns(),Hours:hs(),Milliseconds:us(),Minutes:cs(),Month:fs(),Seconds:ms(),Year:bs()}});var Is=u((xa,$s)=>{"use strict";function ws(i,e,t,s,r,n,o){try{var h=i[n](o),l=h.value}catch(a){t(a);return}h.done?e(l):Promise.resolve(l).then(s,r)}function xs(i){return function(){var e=this,t=arguments;return new Promise(function(s,r){var n=i.apply(e,t);function o(l){ws(n,s,r,o,h,"next",l)}function h(l){ws(n,s,r,o,h,"throw",l)}o(void 0)})}}var ut=m(),Mh=R(),ct=T(),Ss=ct.style,Os=ct.clear,Ch=ct.figures,qs=b(),qh=qs.erase,Ts=qs.cursor,j=ys(),Ms=j.DatePart,$h=j.Meridiem,Ih=j.Day,Ph=j.Hours,_h=j.Milliseconds,Eh=j.Minutes,Ah=j.Month,Dh=j.Seconds,Rh=j.Year,kh=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,Cs={1:({token:i})=>i.replace(/\\(.)/g,"$1"),2:i=>new Ih(i),3:i=>new Ah(i),4:i=>new Rh(i),5:i=>new $h(i),6:i=>new Ph(i),7:i=>new Eh(i),8:i=>new Dh(i),9:i=>new _h(i)},jh={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(",")},at=class extends Mh{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(jh,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=Os("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let t;for(this.parts=[];t=kh.exec(e);){let r=t.shift(),n=t.findIndex(o=>o!=null);this.parts.push(n in Cs?Cs[n]({token:t[n]||r,date:this.date,parts:this.parts,locales:this.locales}):t[n]||r)}let s=this.parts.reduce((r,n)=>(typeof n=="string"&&typeof r[r.length-1]=="string"?r[r.length-1]+=n:r.push(n),r),[]);this.parts.splice(0),this.parts.push(...s),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof Ms)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
15
+ `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,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()}_(e,t){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(Ki.hide):this.out.write(ph(this.outputText,this.out.columns)),super.render(),this.outputText=[Ji.symbol(this.done,this.aborted),qe.bold(this.msg),Ji.delimiter(this.done),this.value?this.inactive:qe.cyan().underline(this.inactive),qe.gray("/"),this.value?qe.cyan().underline(this.active):this.active].join(" "),this.out.write(mh.line+Ki.to(0)+this.outputText))}};Qi.exports=Qe});var q=u((ca,ts)=>{"use strict";var et=class i{constructor({token:e,date:t,parts:s,locales:r}){this.token=e,this.date=t||new Date,this.parts=s||[this],this.locales=r||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((t,s)=>s>e&&t instanceof i)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),t=e.indexOf(this);return e.find((s,r)=>r>t&&s instanceof i)}toString(){return String(this.date)}};ts.exports=et});var ss=u((da,is)=>{"use strict";var gh=q(),tt=class extends gh{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};is.exports=tt});var ns=u((fa,rs)=>{"use strict";var bh=q(),vh=i=>(i=i%10,i===1?"st":i===2?"nd":i===3?"rd":"th"),it=class extends bh{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),t=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+vh(e):this.token==="d"?t+1:this.token==="ddd"?this.locales.weekdaysShort[t]:this.token==="dddd"?this.locales.weekdays[t]:e}};rs.exports=it});var hs=u((pa,os)=>{"use strict";var yh=q(),st=class extends yh{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};os.exports=st});var us=u((ma,ls)=>{"use strict";var wh=q(),rt=class extends wh{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};ls.exports=rt});var cs=u((ga,as)=>{"use strict";var xh=q(),nt=class extends xh{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};as.exports=nt});var fs=u((ba,ds)=>{"use strict";var Sh=q(),ot=class extends Sh{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),t=this.token.length;return t===2?String(e+1).padStart(2,"0"):t===3?this.locales.monthsShort[e]:t===4?this.locales.months[e]:String(e+1)}};ds.exports=ot});var ms=u((va,ps)=>{"use strict";var Oh=q(),ht=class extends Oh{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};ps.exports=ht});var bs=u((ya,gs)=>{"use strict";var Th=q(),lt=class extends Th{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};gs.exports=lt});var ys=u((wa,vs)=>{"use strict";vs.exports={DatePart:q(),Meridiem:ss(),Day:ns(),Hours:hs(),Milliseconds:us(),Minutes:cs(),Month:fs(),Seconds:ms(),Year:bs()}});var Is=u((xa,$s)=>{"use strict";function ws(i,e,t,s,r,n,o){try{var h=i[n](o),l=h.value}catch(a){t(a);return}h.done?e(l):Promise.resolve(l).then(s,r)}function xs(i){return function(){var e=this,t=arguments;return new Promise(function(s,r){var n=i.apply(e,t);function o(l){ws(n,s,r,o,h,"next",l)}function h(l){ws(n,s,r,o,h,"throw",l)}o(void 0)})}}var ut=m(),Mh=R(),ct=T(),Ss=ct.style,Os=ct.clear,Ch=ct.figures,qs=b(),qh=qs.erase,Ts=qs.cursor,j=ys(),Ms=j.DatePart,$h=j.Meridiem,Ih=j.Day,_h=j.Hours,Ph=j.Milliseconds,Eh=j.Minutes,Ah=j.Month,Dh=j.Seconds,Rh=j.Year,kh=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,Cs={1:({token:i})=>i.replace(/\\(.)/g,"$1"),2:i=>new Ih(i),3:i=>new Ah(i),4:i=>new Rh(i),5:i=>new $h(i),6:i=>new _h(i),7:i=>new Eh(i),8:i=>new Dh(i),9:i=>new Ph(i)},jh={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(",")},at=class extends Mh{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(jh,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=Os("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let t;for(this.parts=[];t=kh.exec(e);){let r=t.shift(),n=t.findIndex(o=>o!=null);this.parts.push(n in Cs?Cs[n]({token:t[n]||r,date:this.date,parts:this.parts,locales:this.locales}):t[n]||r)}let s=this.parts.reduce((r,n)=>(typeof n=="string"&&typeof r[r.length-1]=="string"?r[r.length-1]+=n:r.push(n),r),[]);this.parts.splice(0),this.parts.push(...s),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof Ms)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
16
16
  `),this.close()}validate(){var e=this;return xs(function*(){let t=yield e.validator(e.value);typeof t=="string"&&(e.errorMsg=t,t=!1),e.error=!t})()}submit(){var e=this;return xs(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write(`
17
17
  `),e.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(t=>t instanceof Ms)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(Ts.hide):this.out.write(Os(this.outputText,this.out.columns)),super.render(),this.outputText=[Ss.symbol(this.done,this.aborted),ut.bold(this.msg),Ss.delimiter(!1),this.parts.reduce((e,t,s)=>e.concat(s===this.cursor&&!this.done?ut.cyan().underline(t.toString()):t),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
18
18
  `).reduce((e,t,s)=>e+`
19
- ${s?" ":Ch.pointerSmall} ${ut.red().italic(t)}`,"")),this.out.write(qh.line+Ts.to(0)+this.outputText))}};$s.exports=at});var ks=u((Sa,Rs)=>{"use strict";function Ps(i,e,t,s,r,n,o){try{var h=i[n](o),l=h.value}catch(a){t(a);return}h.done?e(l):Promise.resolve(l).then(s,r)}function _s(i){return function(){var e=this,t=arguments;return new Promise(function(s,r){var n=i.apply(e,t);function o(l){Ps(n,s,r,o,h,"next",l)}function h(l){Ps(n,s,r,o,h,"throw",l)}o(void 0)})}}var $e=m(),Fh=R(),Ds=b(),Ie=Ds.cursor,Nh=Ds.erase,Pe=T(),dt=Pe.style,Vh=Pe.figures,Es=Pe.clear,Yh=Pe.lines,Lh=/[0-9]/,ft=i=>i!==void 0,As=(i,e)=>{let t=Math.pow(10,e);return Math.round(i*t)/t},pt=class extends Fh{constructor(e={}){super(e),this.transform=dt.render(e.style),this.msg=e.message,this.initial=ft(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=ft(e.min)?e.min:-1/0,this.max=ft(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=$e.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${As(e,this.round)}`),this._value=As(e,this.round)),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||Lh.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
20
- `),this.close()}validate(){var e=this;return _s(function*(){let t=yield e.validator(e.value);typeof t=="string"&&(e.errorMsg=t,t=!1),e.error=!t})()}submit(){var e=this;return _s(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}let t=e.value;e.value=t!==""?t:e.initial,e.done=!0,e.aborted=!1,e.error=!1,e.fire(),e.render(),e.out.write(`
19
+ ${s?" ":Ch.pointerSmall} ${ut.red().italic(t)}`,"")),this.out.write(qh.line+Ts.to(0)+this.outputText))}};$s.exports=at});var ks=u((Sa,Rs)=>{"use strict";function _s(i,e,t,s,r,n,o){try{var h=i[n](o),l=h.value}catch(a){t(a);return}h.done?e(l):Promise.resolve(l).then(s,r)}function Ps(i){return function(){var e=this,t=arguments;return new Promise(function(s,r){var n=i.apply(e,t);function o(l){_s(n,s,r,o,h,"next",l)}function h(l){_s(n,s,r,o,h,"throw",l)}o(void 0)})}}var $e=m(),Fh=R(),Ds=b(),Ie=Ds.cursor,Nh=Ds.erase,_e=T(),dt=_e.style,Vh=_e.figures,Es=_e.clear,Yh=_e.lines,Lh=/[0-9]/,ft=i=>i!==void 0,As=(i,e)=>{let t=Math.pow(10,e);return Math.round(i*t)/t},pt=class extends Fh{constructor(e={}){super(e),this.transform=dt.render(e.style),this.msg=e.message,this.initial=ft(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=ft(e.min)?e.min:-1/0,this.max=ft(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=$e.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${As(e,this.round)}`),this._value=As(e,this.round)),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||Lh.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
20
+ `),this.close()}validate(){var e=this;return Ps(function*(){let t=yield e.validator(e.value);typeof t=="string"&&(e.errorMsg=t,t=!1),e.error=!t})()}submit(){var e=this;return Ps(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}let t=e.value;e.value=t!==""?t:e.initial,e.done=!0,e.aborted=!1,e.error=!1,e.fire(),e.render(),e.out.write(`
21
21
  `),e.close()})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,t){if(!this.valid(e))return this.bell();let s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Ie.down(Yh(this.outputError,this.out.columns)-1)+Es(this.outputError,this.out.columns)),this.out.write(Es(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[dt.symbol(this.done,this.aborted),$e.bold(this.msg),dt.delimiter(this.done),!this.done||!this.done&&!this.placeholder?$e[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
22
22
  `).reduce((e,t,s)=>e+`
23
23
  ${s?" ":Vh.pointerSmall} ${$e.red().italic(t)}`,"")),this.out.write(Nh.line+Ie.to(0)+this.outputText+Ie.save+this.outputError+Ie.restore))}};Rs.exports=pt});var gt=u((Oa,Ns)=>{"use strict";var $=m(),Bh=b(),Hh=Bh.cursor,Gh=R(),ae=T(),js=ae.clear,H=ae.figures,Fs=ae.style,Uh=ae.wrap,Wh=ae.entriesToDisplay,mt=class extends Gh{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((t,s)=>(typeof t=="string"&&(t={title:t,value:s}),{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===void 0?s:t.value),selected:t&&t.selected,disabled:t&&t.disabled})),this.clear=js("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
@@ -46,21 +46,21 @@ Instructions:
46
46
  Filtered results for: ${this.inputValue?this.inputValue:F.gray("Enter something to filter")}
47
47
  `}renderOption(e,t,s){let r;return t.disabled?r=e===s?F.gray().underline(t.title):F.strikethrough().gray(t.title):r=e===s?F.cyan().underline(t.title):t.title,(t.selected?F.green(ee.radioOn):ee.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(t=>t.selected).map(t=>t.title).join(", ");let e=[F.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(F.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(il.hide),super.render();let e=[zs.symbol(this.done,this.aborted),F.bold(this.msg),zs.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=F.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=Ws(e,this.out.columns)}};Js.exports=wt});var sr=u((Ca,ir)=>{"use strict";var Zs=m(),rl=R(),er=T(),Xs=er.style,nl=er.clear,tr=b(),ol=tr.erase,Qs=tr.cursor,St=class extends rl{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
48
48
  `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
49
- `),this.close()}_(e,t){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Qs.hide):this.out.write(nl(this.outputText,this.out.columns)),super.render(),this.outputText=[Xs.symbol(this.done,this.aborted),Zs.bold(this.msg),Xs.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Zs.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(ol.line+Qs.to(0)+this.outputText))}};ir.exports=St});var nr=u((qa,rr)=>{"use strict";rr.exports={TextPrompt:Hi(),SelectPrompt:zi(),TogglePrompt:es(),DatePrompt:Is(),NumberPrompt:ks(),MultiselectPrompt:gt(),AutocompletePrompt:Us(),AutocompleteMultiselectPrompt:Ks(),ConfirmPrompt:sr()}});var hr=u(or=>{"use strict";var y=or,hl=nr(),_e=i=>i;function I(i,e,t={}){return new Promise((s,r)=>{let n=new hl[i](e),o=t.onAbort||_e,h=t.onSubmit||_e,l=t.onExit||_e;n.on("state",e.onState||_e),n.on("submit",a=>s(h(a))),n.on("exit",a=>s(l(a))),n.on("abort",a=>r(o(a)))})}y.text=i=>I("TextPrompt",i);y.password=i=>(i.style="password",y.text(i));y.invisible=i=>(i.style="invisible",y.text(i));y.number=i=>I("NumberPrompt",i);y.date=i=>I("DatePrompt",i);y.confirm=i=>I("ConfirmPrompt",i);y.list=i=>{let e=i.separator||",";return I("TextPrompt",i,{onSubmit:t=>t.split(e).map(s=>s.trim())})};y.toggle=i=>I("TogglePrompt",i);y.select=i=>I("SelectPrompt",i);y.multiselect=i=>{i.choices=[].concat(i.choices||[]);let e=t=>t.filter(s=>s.selected).map(s=>s.value);return I("MultiselectPrompt",i,{onAbort:e,onSubmit:e})};y.autocompleteMultiselect=i=>{i.choices=[].concat(i.choices||[]);let e=t=>t.filter(s=>s.selected).map(s=>s.value);return I("AutocompleteMultiselectPrompt",i,{onAbort:e,onSubmit:e})};var ll=(i,e)=>Promise.resolve(e.filter(t=>t.title.slice(0,i.length).toLowerCase()===i.toLowerCase()));y.autocomplete=i=>(i.suggest=i.suggest||ll,i.choices=[].concat(i.choices||[]),I("AutocompletePrompt",i))});var mr=u((Ia,pr)=>{"use strict";function lr(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);e&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,s)}return t}function ur(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?lr(Object(t),!0).forEach(function(s){ul(i,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):lr(Object(t)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(t,s))})}return i}function ul(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function al(i,e){var t=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(!t){if(Array.isArray(i)||(t=cl(i))||e&&i&&typeof i.length=="number"){t&&(i=t);var s=0,r=function(){};return{s:r,n:function(){return s>=i.length?{done:!0}:{done:!1,value:i[s++]}},e:function(a){throw a},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
50
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=!0,o=!1,h;return{s:function(){t=t.call(i)},n:function(){var a=t.next();return n=a.done,a},e:function(a){o=!0,h=a},f:function(){try{!n&&t.return!=null&&t.return()}finally{if(o)throw h}}}}function cl(i,e){if(i){if(typeof i=="string")return ar(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ar(i,e)}}function ar(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,s=new Array(e);t<e;t++)s[t]=i[t];return s}function cr(i,e,t,s,r,n,o){try{var h=i[n](o),l=h.value}catch(a){t(a);return}h.done?e(l):Promise.resolve(l).then(s,r)}function dr(i){return function(){var e=this,t=arguments;return new Promise(function(s,r){var n=i.apply(e,t);function o(l){cr(n,s,r,o,h,"next",l)}function h(l){cr(n,s,r,o,h,"throw",l)}o(void 0)})}}var Ot=hr(),dl=["suggest","format","onState","validate","onRender","type"],fr=()=>{};function G(){return Tt.apply(this,arguments)}function Tt(){return Tt=dr(function*(i=[],{onSubmit:e=fr,onCancel:t=fr}={}){let s={},r=G._override||{};i=[].concat(i);let n,o,h,l,a,K,se=function(){var L=dr(function*(A,ye,si=!1){if(!(!si&&A.validate&&A.validate(ye)!==!0))return A.format?yield A.format(ye,s):ye});return function(ye,si){return L.apply(this,arguments)}}();var v=al(i),C;try{for(v.s();!(C=v.n()).done;){o=C.value;var ve=o;if(l=ve.name,a=ve.type,typeof a=="function"&&(a=yield a(n,ur({},s),o),o.type=a),!!a){for(let L in o){if(dl.includes(L))continue;let A=o[L];o[L]=typeof A=="function"?yield A(n,ur({},s),K):A}if(K=o,typeof o.message!="string")throw new Error("prompt message is required");var ii=o;if(l=ii.name,a=ii.type,Ot[a]===void 0)throw new Error(`prompt type (${a}) is not defined`);if(r[o.name]!==void 0&&(n=yield se(o,r[o.name]),n!==void 0)){s[l]=n;continue}try{n=G._injected?fl(G._injected,o.initial):yield Ot[a](o),s[l]=n=yield se(o,n,!0),h=yield e(o,n,s)}catch{h=!(yield t(o,s))}if(h)return s}}}catch(L){v.e(L)}finally{v.f()}return s}),Tt.apply(this,arguments)}function fl(i,e){let t=i.shift();if(t instanceof Error)throw t;return t===void 0?e:t}function pl(i){G._injected=(G._injected||[]).concat(i)}function ml(i){G._override=Object.assign({},i)}pr.exports=Object.assign(G,{prompt:G,prompts:Ot,inject:pl,override:ml})});var br=u((Pa,gr)=>{"use strict";gr.exports=(i,e)=>{if(!(i.meta&&i.name!=="escape")){if(i.ctrl){if(i.name==="a")return"first";if(i.name==="c"||i.name==="d")return"abort";if(i.name==="e")return"last";if(i.name==="g")return"reset"}if(e){if(i.name==="j")return"down";if(i.name==="k")return"up"}return i.name==="return"||i.name==="enter"?"submit":i.name==="backspace"?"delete":i.name==="delete"?"deleteForward":i.name==="abort"?"abort":i.name==="escape"?"exit":i.name==="tab"?"next":i.name==="pagedown"?"nextPage":i.name==="pageup"?"prevPage":i.name==="home"?"home":i.name==="end"?"end":i.name==="up"?"up":i.name==="down"?"down":i.name==="right"?"right":i.name==="left"?"left":!1}}});var Ee=u((_a,vr)=>{"use strict";vr.exports=i=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),t=new RegExp(e,"g");return typeof i=="string"?i.replace(t,""):i}});var xr=u((Ea,wr)=>{"use strict";var gl=Ee(),{erase:yr,cursor:bl}=b(),vl=i=>[...gl(i)].length;wr.exports=function(i,e){if(!e)return yr.line+bl.to(0);let t=0,s=i.split(/\r?\n/);for(let r of s)t+=1+Math.floor(Math.max(vl(r)-1,0)/e);return yr.lines(t)}});var Mt=u((Aa,Sr)=>{"use strict";var fe={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},yl={arrowUp:fe.arrowUp,arrowDown:fe.arrowDown,arrowLeft:fe.arrowLeft,arrowRight:fe.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},wl=process.platform==="win32"?yl:fe;Sr.exports=wl});var Tr=u((Da,Or)=>{"use strict";var te=m(),J=Mt(),Ct=Object.freeze({password:{scale:1,render:i=>"*".repeat(i.length)},emoji:{scale:2,render:i=>"\u{1F603}".repeat(i.length)},invisible:{scale:0,render:i=>""},default:{scale:1,render:i=>`${i}`}}),xl=i=>Ct[i]||Ct.default,pe=Object.freeze({aborted:te.red(J.cross),done:te.green(J.tick),exited:te.yellow(J.cross),default:te.cyan("?")}),Sl=(i,e,t)=>e?pe.aborted:t?pe.exited:i?pe.done:pe.default,Ol=i=>te.gray(i?J.ellipsis:J.pointerSmall),Tl=(i,e)=>te.gray(i?e?J.pointerSmall:"+":J.line);Or.exports={styles:Ct,render:xl,symbols:pe,symbol:Sl,delimiter:Ol,item:Tl}});var Cr=u((Ra,Mr)=>{"use strict";var Ml=Ee();Mr.exports=function(i,e){let t=String(Ml(i)||"").split(/\r?\n/);return e?t.map(s=>Math.ceil(s.length/e)).reduce((s,r)=>s+r):t.length}});var $r=u((ka,qr)=>{"use strict";qr.exports=(i,e={})=>{let t=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return(i||"").split(/\r?\n/g).map(r=>r.split(/\s+/g).reduce((n,o)=>(o.length+t.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${t}${o}`),n),[t]).join(`
49
+ `),this.close()}_(e,t){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Qs.hide):this.out.write(nl(this.outputText,this.out.columns)),super.render(),this.outputText=[Xs.symbol(this.done,this.aborted),Zs.bold(this.msg),Xs.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Zs.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(ol.line+Qs.to(0)+this.outputText))}};ir.exports=St});var nr=u((qa,rr)=>{"use strict";rr.exports={TextPrompt:Hi(),SelectPrompt:zi(),TogglePrompt:es(),DatePrompt:Is(),NumberPrompt:ks(),MultiselectPrompt:gt(),AutocompletePrompt:Us(),AutocompleteMultiselectPrompt:Ks(),ConfirmPrompt:sr()}});var hr=u(or=>{"use strict";var y=or,hl=nr(),Pe=i=>i;function I(i,e,t={}){return new Promise((s,r)=>{let n=new hl[i](e),o=t.onAbort||Pe,h=t.onSubmit||Pe,l=t.onExit||Pe;n.on("state",e.onState||Pe),n.on("submit",a=>s(h(a))),n.on("exit",a=>s(l(a))),n.on("abort",a=>r(o(a)))})}y.text=i=>I("TextPrompt",i);y.password=i=>(i.style="password",y.text(i));y.invisible=i=>(i.style="invisible",y.text(i));y.number=i=>I("NumberPrompt",i);y.date=i=>I("DatePrompt",i);y.confirm=i=>I("ConfirmPrompt",i);y.list=i=>{let e=i.separator||",";return I("TextPrompt",i,{onSubmit:t=>t.split(e).map(s=>s.trim())})};y.toggle=i=>I("TogglePrompt",i);y.select=i=>I("SelectPrompt",i);y.multiselect=i=>{i.choices=[].concat(i.choices||[]);let e=t=>t.filter(s=>s.selected).map(s=>s.value);return I("MultiselectPrompt",i,{onAbort:e,onSubmit:e})};y.autocompleteMultiselect=i=>{i.choices=[].concat(i.choices||[]);let e=t=>t.filter(s=>s.selected).map(s=>s.value);return I("AutocompleteMultiselectPrompt",i,{onAbort:e,onSubmit:e})};var ll=(i,e)=>Promise.resolve(e.filter(t=>t.title.slice(0,i.length).toLowerCase()===i.toLowerCase()));y.autocomplete=i=>(i.suggest=i.suggest||ll,i.choices=[].concat(i.choices||[]),I("AutocompletePrompt",i))});var mr=u((Ia,pr)=>{"use strict";function lr(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(i);e&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),t.push.apply(t,s)}return t}function ur(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?lr(Object(t),!0).forEach(function(s){ul(i,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):lr(Object(t)).forEach(function(s){Object.defineProperty(i,s,Object.getOwnPropertyDescriptor(t,s))})}return i}function ul(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function al(i,e){var t=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(!t){if(Array.isArray(i)||(t=cl(i))||e&&i&&typeof i.length=="number"){t&&(i=t);var s=0,r=function(){};return{s:r,n:function(){return s>=i.length?{done:!0}:{done:!1,value:i[s++]}},e:function(a){throw a},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
50
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=!0,o=!1,h;return{s:function(){t=t.call(i)},n:function(){var a=t.next();return n=a.done,a},e:function(a){o=!0,h=a},f:function(){try{!n&&t.return!=null&&t.return()}finally{if(o)throw h}}}}function cl(i,e){if(i){if(typeof i=="string")return ar(i,e);var t=Object.prototype.toString.call(i).slice(8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Array.from(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ar(i,e)}}function ar(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,s=new Array(e);t<e;t++)s[t]=i[t];return s}function cr(i,e,t,s,r,n,o){try{var h=i[n](o),l=h.value}catch(a){t(a);return}h.done?e(l):Promise.resolve(l).then(s,r)}function dr(i){return function(){var e=this,t=arguments;return new Promise(function(s,r){var n=i.apply(e,t);function o(l){cr(n,s,r,o,h,"next",l)}function h(l){cr(n,s,r,o,h,"throw",l)}o(void 0)})}}var Ot=hr(),dl=["suggest","format","onState","validate","onRender","type"],fr=()=>{};function G(){return Tt.apply(this,arguments)}function Tt(){return Tt=dr(function*(i=[],{onSubmit:e=fr,onCancel:t=fr}={}){let s={},r=G._override||{};i=[].concat(i);let n,o,h,l,a,K,se=function(){var L=dr(function*(A,ye,si=!1){if(!(!si&&A.validate&&A.validate(ye)!==!0))return A.format?yield A.format(ye,s):ye});return function(ye,si){return L.apply(this,arguments)}}();var v=al(i),C;try{for(v.s();!(C=v.n()).done;){o=C.value;var ve=o;if(l=ve.name,a=ve.type,typeof a=="function"&&(a=yield a(n,ur({},s),o),o.type=a),!!a){for(let L in o){if(dl.includes(L))continue;let A=o[L];o[L]=typeof A=="function"?yield A(n,ur({},s),K):A}if(K=o,typeof o.message!="string")throw new Error("prompt message is required");var ii=o;if(l=ii.name,a=ii.type,Ot[a]===void 0)throw new Error(`prompt type (${a}) is not defined`);if(r[o.name]!==void 0&&(n=yield se(o,r[o.name]),n!==void 0)){s[l]=n;continue}try{n=G._injected?fl(G._injected,o.initial):yield Ot[a](o),s[l]=n=yield se(o,n,!0),h=yield e(o,n,s)}catch{h=!(yield t(o,s))}if(h)return s}}}catch(L){v.e(L)}finally{v.f()}return s}),Tt.apply(this,arguments)}function fl(i,e){let t=i.shift();if(t instanceof Error)throw t;return t===void 0?e:t}function pl(i){G._injected=(G._injected||[]).concat(i)}function ml(i){G._override=Object.assign({},i)}pr.exports=Object.assign(G,{prompt:G,prompts:Ot,inject:pl,override:ml})});var br=u((_a,gr)=>{"use strict";gr.exports=(i,e)=>{if(!(i.meta&&i.name!=="escape")){if(i.ctrl){if(i.name==="a")return"first";if(i.name==="c"||i.name==="d")return"abort";if(i.name==="e")return"last";if(i.name==="g")return"reset"}if(e){if(i.name==="j")return"down";if(i.name==="k")return"up"}return i.name==="return"||i.name==="enter"?"submit":i.name==="backspace"?"delete":i.name==="delete"?"deleteForward":i.name==="abort"?"abort":i.name==="escape"?"exit":i.name==="tab"?"next":i.name==="pagedown"?"nextPage":i.name==="pageup"?"prevPage":i.name==="home"?"home":i.name==="end"?"end":i.name==="up"?"up":i.name==="down"?"down":i.name==="right"?"right":i.name==="left"?"left":!1}}});var Ee=u((Pa,vr)=>{"use strict";vr.exports=i=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),t=new RegExp(e,"g");return typeof i=="string"?i.replace(t,""):i}});var xr=u((Ea,wr)=>{"use strict";var gl=Ee(),{erase:yr,cursor:bl}=b(),vl=i=>[...gl(i)].length;wr.exports=function(i,e){if(!e)return yr.line+bl.to(0);let t=0,s=i.split(/\r?\n/);for(let r of s)t+=1+Math.floor(Math.max(vl(r)-1,0)/e);return yr.lines(t)}});var Mt=u((Aa,Sr)=>{"use strict";var fe={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},yl={arrowUp:fe.arrowUp,arrowDown:fe.arrowDown,arrowLeft:fe.arrowLeft,arrowRight:fe.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},wl=process.platform==="win32"?yl:fe;Sr.exports=wl});var Tr=u((Da,Or)=>{"use strict";var te=m(),J=Mt(),Ct=Object.freeze({password:{scale:1,render:i=>"*".repeat(i.length)},emoji:{scale:2,render:i=>"\u{1F603}".repeat(i.length)},invisible:{scale:0,render:i=>""},default:{scale:1,render:i=>`${i}`}}),xl=i=>Ct[i]||Ct.default,pe=Object.freeze({aborted:te.red(J.cross),done:te.green(J.tick),exited:te.yellow(J.cross),default:te.cyan("?")}),Sl=(i,e,t)=>e?pe.aborted:t?pe.exited:i?pe.done:pe.default,Ol=i=>te.gray(i?J.ellipsis:J.pointerSmall),Tl=(i,e)=>te.gray(i?e?J.pointerSmall:"+":J.line);Or.exports={styles:Ct,render:xl,symbols:pe,symbol:Sl,delimiter:Ol,item:Tl}});var Cr=u((Ra,Mr)=>{"use strict";var Ml=Ee();Mr.exports=function(i,e){let t=String(Ml(i)||"").split(/\r?\n/);return e?t.map(s=>Math.ceil(s.length/e)).reduce((s,r)=>s+r):t.length}});var $r=u((ka,qr)=>{"use strict";qr.exports=(i,e={})=>{let t=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return(i||"").split(/\r?\n/g).map(r=>r.split(/\s+/g).reduce((n,o)=>(o.length+t.length>=s||n[n.length-1].length+o.length+1<s?n[n.length-1]+=` ${o}`:n.push(`${t}${o}`),n),[t]).join(`
51
51
  `)).join(`
52
- `)}});var Pr=u((ja,Ir)=>{"use strict";Ir.exports=(i,e,t)=>{t=t||e;let s=Math.min(e-t,i-Math.floor(t/2));s<0&&(s=0);let r=Math.min(s+t,e);return{startIndex:s,endIndex:r}}});var M=u((Fa,_r)=>{"use strict";_r.exports={action:br(),clear:xr(),style:Tr(),strip:Ee(),figures:Mt(),lines:Cr(),wrap:$r(),entriesToDisplay:Pr()}});var N=u((Na,Ar)=>{"use strict";var Er=require("readline"),{action:Cl}=M(),ql=require("events"),{beep:$l,cursor:Il}=b(),Pl=m(),qt=class extends ql{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let t=Er.createInterface({input:this.in,escapeCodeTimeout:50});Er.emitKeypressEvents(this.in,t),this.in.isTTY&&this.in.setRawMode(!0);let s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,r=(n,o)=>{let h=Cl(o,s);h===!1?this._&&this._(n,o):typeof this[h]=="function"?this[h](o):this.bell()};this.close=()=>{this.out.write(Il.show),this.in.removeListener("keypress",r),this.in.isTTY&&this.in.setRawMode(!1),t.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",r)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write($l)}render(){this.onRender(Pl),this.firstRender&&(this.firstRender=!1)}};Ar.exports=qt});var Rr=u((Va,Dr)=>{var Ae=m(),_l=N(),{erase:El,cursor:me}=b(),{style:$t,clear:It,lines:Al,figures:Dl}=M(),Pt=class extends _l{constructor(e={}){super(e),this.transform=$t.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=It("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=Ae.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
52
+ `)}});var _r=u((ja,Ir)=>{"use strict";Ir.exports=(i,e,t)=>{t=t||e;let s=Math.min(e-t,i-Math.floor(t/2));s<0&&(s=0);let r=Math.min(s+t,e);return{startIndex:s,endIndex:r}}});var M=u((Fa,Pr)=>{"use strict";Pr.exports={action:br(),clear:xr(),style:Tr(),strip:Ee(),figures:Mt(),lines:Cr(),wrap:$r(),entriesToDisplay:_r()}});var N=u((Na,Ar)=>{"use strict";var Er=require("readline"),{action:Cl}=M(),ql=require("events"),{beep:$l,cursor:Il}=b(),_l=m(),qt=class extends ql{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);let t=Er.createInterface({input:this.in,escapeCodeTimeout:50});Er.emitKeypressEvents(this.in,t),this.in.isTTY&&this.in.setRawMode(!0);let s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,r=(n,o)=>{let h=Cl(o,s);h===!1?this._&&this._(n,o):typeof this[h]=="function"?this[h](o):this.bell()};this.close=()=>{this.out.write(Il.show),this.in.removeListener("keypress",r),this.in.isTTY&&this.in.setRawMode(!1),t.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",r)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write($l)}render(){this.onRender(_l),this.firstRender&&(this.firstRender=!1)}};Ar.exports=qt});var Rr=u((Va,Dr)=>{var Ae=m(),Pl=N(),{erase:El,cursor:me}=b(),{style:$t,clear:It,lines:Al,figures:Dl}=M(),_t=class extends Pl{constructor(e={}){super(e),this.transform=$t.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=It("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=Ae.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
53
53
  `),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
54
54
  `),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,t){let s=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor);this.value=`${s}${e}${r}`,this.red=!1,this.cursor=this.placeholder?0:s.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),t=this.value.slice(this.cursor);this.value=`${e}${t}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor+1);this.value=`${e}${t}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(me.down(Al(this.outputError,this.out.columns)-1)+It(this.outputError,this.out.columns)),this.out.write(It(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[$t.symbol(this.done,this.aborted),Ae.bold(this.msg),$t.delimiter(this.done),this.red?Ae.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
55
55
  `).reduce((e,t,s)=>e+`
56
- ${s?" ":Dl.pointerSmall} ${Ae.red().italic(t)}`,"")),this.out.write(El.line+me.to(0)+this.outputText+me.save+this.outputError+me.restore+me.move(this.cursorOffset,0)))}};Dr.exports=Pt});var Nr=u((Ya,Fr)=>{"use strict";var V=m(),Rl=N(),{style:kr,clear:jr,figures:De,wrap:kl,entriesToDisplay:jl}=M(),{cursor:Fl}=b(),_t=class extends Rl{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((t,s)=>(typeof t=="string"&&(t={title:t,value:s}),{title:t&&(t.title||t.value||t),value:t&&(t.value===void 0?s:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=jr("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
56
+ ${s?" ":Dl.pointerSmall} ${Ae.red().italic(t)}`,"")),this.out.write(El.line+me.to(0)+this.outputText+me.save+this.outputError+me.restore+me.move(this.cursorOffset,0)))}};Dr.exports=_t});var Nr=u((Ya,Fr)=>{"use strict";var V=m(),Rl=N(),{style:kr,clear:jr,figures:De,wrap:kl,entriesToDisplay:jl}=M(),{cursor:Fl}=b(),Pt=class extends Rl{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((t,s)=>(typeof t=="string"&&(t={title:t,value:s}),{title:t&&(t.title||t.value||t),value:t&&(t.value===void 0?s:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=jr("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
57
57
  `),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
58
58
  `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,t){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(Fl.hide):this.out.write(jr(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:t}=jl(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[kr.symbol(this.done,this.aborted),V.bold(this.msg),kr.delimiter(!1),this.done?this.selection.title:this.selection.disabled?V.yellow(this.warn):V.gray(this.hint)].join(" "),!this.done){this.outputText+=`
59
59
  `;for(let s=e;s<t;s++){let r,n,o="",h=this.choices[s];s===e&&e>0?n=De.arrowUp:s===t-1&&t<this.choices.length?n=De.arrowDown:n=" ",h.disabled?(r=this.cursor===s?V.gray().underline(h.title):V.strikethrough().gray(h.title),n=(this.cursor===s?V.bold().gray(De.pointer)+" ":" ")+n):(r=this.cursor===s?V.cyan().underline(h.title):h.title,n=(this.cursor===s?V.cyan(De.pointer)+" ":" ")+n,h.description&&this.cursor===s&&(o=` - ${h.description}`,(n.length+r.length+o.length>=this.out.columns||h.description.split(/\r?\n/).length>1)&&(o=`
60
60
  `+kl(h.description,{margin:3,width:this.out.columns})))),this.outputText+=`${n} ${r}${V.gray(o)}
61
- `}}this.out.write(this.outputText)}};Fr.exports=_t});var Br=u((La,Lr)=>{var Re=m(),Nl=N(),{style:Vr,clear:Vl}=M(),{cursor:Yr,erase:Yl}=b(),Et=class extends Nl{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
61
+ `}}this.out.write(this.outputText)}};Fr.exports=Pt});var Br=u((La,Lr)=>{var Re=m(),Nl=N(),{style:Vr,clear:Vl}=M(),{cursor:Yr,erase:Yl}=b(),Et=class extends Nl{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
62
62
  `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
63
- `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,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()}_(e,t){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(Yr.hide):this.out.write(Vl(this.outputText,this.out.columns)),super.render(),this.outputText=[Vr.symbol(this.done,this.aborted),Re.bold(this.msg),Vr.delimiter(this.done),this.value?this.inactive:Re.cyan().underline(this.inactive),Re.gray("/"),this.value?Re.cyan().underline(this.active):this.active].join(" "),this.out.write(Yl.line+Yr.to(0)+this.outputText))}};Lr.exports=Et});var P=u((Ba,Hr)=>{"use strict";var At=class i{constructor({token:e,date:t,parts:s,locales:r}){this.token=e,this.date=t||new Date,this.parts=s||[this],this.locales=r||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((t,s)=>s>e&&t instanceof i)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),t=e.indexOf(this);return e.find((s,r)=>r>t&&s instanceof i)}toString(){return String(this.date)}};Hr.exports=At});var Ur=u((Ha,Gr)=>{"use strict";var Ll=P(),Dt=class extends Ll{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};Gr.exports=Dt});var zr=u((Ga,Wr)=>{"use strict";var Bl=P(),Hl=i=>(i=i%10,i===1?"st":i===2?"nd":i===3?"rd":"th"),Rt=class extends Bl{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),t=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+Hl(e):this.token==="d"?t+1:this.token==="ddd"?this.locales.weekdaysShort[t]:this.token==="dddd"?this.locales.weekdays[t]:e}};Wr.exports=Rt});var Kr=u((Ua,Jr)=>{"use strict";var Gl=P(),kt=class extends Gl{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};Jr.exports=kt});var Xr=u((Wa,Zr)=>{"use strict";var Ul=P(),jt=class extends Ul{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};Zr.exports=jt});var en=u((za,Qr)=>{"use strict";var Wl=P(),Ft=class extends Wl{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};Qr.exports=Ft});var sn=u((Ja,tn)=>{"use strict";var zl=P(),Nt=class extends zl{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),t=this.token.length;return t===2?String(e+1).padStart(2,"0"):t===3?this.locales.monthsShort[e]:t===4?this.locales.months[e]:String(e+1)}};tn.exports=Nt});var nn=u((Ka,rn)=>{"use strict";var Jl=P(),Vt=class extends Jl{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};rn.exports=Vt});var hn=u((Za,on)=>{"use strict";var Kl=P(),Yt=class extends Kl{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};on.exports=Yt});var un=u((Xa,ln)=>{"use strict";ln.exports={DatePart:P(),Meridiem:Ur(),Day:zr(),Hours:Kr(),Milliseconds:Xr(),Minutes:en(),Month:sn(),Seconds:nn(),Year:hn()}});var gn=u((Qa,mn)=>{"use strict";var Lt=m(),Zl=N(),{style:an,clear:cn,figures:Xl}=M(),{erase:Ql,cursor:dn}=b(),{DatePart:fn,Meridiem:eu,Day:tu,Hours:iu,Milliseconds:su,Minutes:ru,Month:nu,Seconds:ou,Year:hu}=un(),lu=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,pn={1:({token:i})=>i.replace(/\\(.)/g,"$1"),2:i=>new tu(i),3:i=>new nu(i),4:i=>new hu(i),5:i=>new eu(i),6:i=>new iu(i),7:i=>new ru(i),8:i=>new ou(i),9:i=>new su(i)},uu={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(",")},Bt=class extends Zl{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(uu,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=cn("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let t;for(this.parts=[];t=lu.exec(e);){let r=t.shift(),n=t.findIndex(o=>o!=null);this.parts.push(n in pn?pn[n]({token:t[n]||r,date:this.date,parts:this.parts,locales:this.locales}):t[n]||r)}let s=this.parts.reduce((r,n)=>(typeof n=="string"&&typeof r[r.length-1]=="string"?r[r.length-1]+=n:r.push(n),r),[]);this.parts.splice(0),this.parts.push(...s),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof fn)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
63
+ `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,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()}_(e,t){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(Yr.hide):this.out.write(Vl(this.outputText,this.out.columns)),super.render(),this.outputText=[Vr.symbol(this.done,this.aborted),Re.bold(this.msg),Vr.delimiter(this.done),this.value?this.inactive:Re.cyan().underline(this.inactive),Re.gray("/"),this.value?Re.cyan().underline(this.active):this.active].join(" "),this.out.write(Yl.line+Yr.to(0)+this.outputText))}};Lr.exports=Et});var _=u((Ba,Hr)=>{"use strict";var At=class i{constructor({token:e,date:t,parts:s,locales:r}){this.token=e,this.date=t||new Date,this.parts=s||[this],this.locales=r||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((t,s)=>s>e&&t instanceof i)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),t=e.indexOf(this);return e.find((s,r)=>r>t&&s instanceof i)}toString(){return String(this.date)}};Hr.exports=At});var Ur=u((Ha,Gr)=>{"use strict";var Ll=_(),Dt=class extends Ll{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};Gr.exports=Dt});var zr=u((Ga,Wr)=>{"use strict";var Bl=_(),Hl=i=>(i=i%10,i===1?"st":i===2?"nd":i===3?"rd":"th"),Rt=class extends Bl{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),t=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+Hl(e):this.token==="d"?t+1:this.token==="ddd"?this.locales.weekdaysShort[t]:this.token==="dddd"?this.locales.weekdays[t]:e}};Wr.exports=Rt});var Kr=u((Ua,Jr)=>{"use strict";var Gl=_(),kt=class extends Gl{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};Jr.exports=kt});var Xr=u((Wa,Zr)=>{"use strict";var Ul=_(),jt=class extends Ul{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};Zr.exports=jt});var en=u((za,Qr)=>{"use strict";var Wl=_(),Ft=class extends Wl{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};Qr.exports=Ft});var sn=u((Ja,tn)=>{"use strict";var zl=_(),Nt=class extends zl{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),t=this.token.length;return t===2?String(e+1).padStart(2,"0"):t===3?this.locales.monthsShort[e]:t===4?this.locales.months[e]:String(e+1)}};tn.exports=Nt});var nn=u((Ka,rn)=>{"use strict";var Jl=_(),Vt=class extends Jl{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};rn.exports=Vt});var hn=u((Za,on)=>{"use strict";var Kl=_(),Yt=class extends Kl{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};on.exports=Yt});var un=u((Xa,ln)=>{"use strict";ln.exports={DatePart:_(),Meridiem:Ur(),Day:zr(),Hours:Kr(),Milliseconds:Xr(),Minutes:en(),Month:sn(),Seconds:nn(),Year:hn()}});var gn=u((Qa,mn)=>{"use strict";var Lt=m(),Zl=N(),{style:an,clear:cn,figures:Xl}=M(),{erase:Ql,cursor:dn}=b(),{DatePart:fn,Meridiem:eu,Day:tu,Hours:iu,Milliseconds:su,Minutes:ru,Month:nu,Seconds:ou,Year:hu}=un(),lu=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,pn={1:({token:i})=>i.replace(/\\(.)/g,"$1"),2:i=>new tu(i),3:i=>new nu(i),4:i=>new hu(i),5:i=>new eu(i),6:i=>new iu(i),7:i=>new ru(i),8:i=>new ou(i),9:i=>new su(i)},uu={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(",")},Bt=class extends Zl{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(uu,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=cn("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let t;for(this.parts=[];t=lu.exec(e);){let r=t.shift(),n=t.findIndex(o=>o!=null);this.parts.push(n in pn?pn[n]({token:t[n]||r,date:this.date,parts:this.parts,locales:this.locales}):t[n]||r)}let s=this.parts.reduce((r,n)=>(typeof n=="string"&&typeof r[r.length-1]=="string"?r[r.length-1]+=n:r.push(n),r),[]);this.parts.splice(0),this.parts.push(...s),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof fn)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
64
64
  `),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
65
65
  `),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(t=>t instanceof fn)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(dn.hide):this.out.write(cn(this.outputText,this.out.columns)),super.render(),this.outputText=[an.symbol(this.done,this.aborted),Lt.bold(this.msg),an.delimiter(!1),this.parts.reduce((e,t,s)=>e.concat(s===this.cursor&&!this.done?Lt.cyan().underline(t.toString()):t),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
66
66
  `).reduce((e,t,s)=>e+`
@@ -68,23 +68,23 @@ ${s?" ":Xl.pointerSmall} ${Lt.red().italic(t)}`,"")),this.out.write(Ql.line+dn.t
68
68
  `),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let e=this.value;this.value=e!==""?e:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
69
69
  `),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,t){if(!this.valid(e))return this.bell();let s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(je.down(fu(this.outputError,this.out.columns)-1)+bn(this.outputError,this.out.columns)),this.out.write(bn(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Ht.symbol(this.done,this.aborted),ke.bold(this.msg),Ht.delimiter(this.done),!this.done||!this.done&&!this.placeholder?ke[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
70
70
  `).reduce((e,t,s)=>e+`
71
- ${s?" ":du.pointerSmall} ${ke.red().italic(t)}`,"")),this.out.write(cu.line+je.to(0)+this.outputText+je.save+this.outputError+je.restore))}};yn.exports=Ut});var zt=u((tc,On)=>{"use strict";var _=m(),{cursor:mu}=b(),gu=N(),{clear:xn,figures:U,style:Sn,wrap:bu,entriesToDisplay:vu}=M(),Wt=class extends gu{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((t,s)=>(typeof t=="string"&&(t={title:t,value:s}),{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===void 0?s:t.value),selected:t&&t.selected,disabled:t&&t.disabled})),this.clear=xn("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
71
+ ${s?" ":du.pointerSmall} ${ke.red().italic(t)}`,"")),this.out.write(cu.line+je.to(0)+this.outputText+je.save+this.outputError+je.restore))}};yn.exports=Ut});var zt=u((tc,On)=>{"use strict";var P=m(),{cursor:mu}=b(),gu=N(),{clear:xn,figures:U,style:Sn,wrap:bu,entriesToDisplay:vu}=M(),Wt=class extends gu{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((t,s)=>(typeof t=="string"&&(t={title:t,value:s}),{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(t.value===void 0?s:t.value),selected:t&&t.selected,disabled:t&&t.disabled})),this.clear=xn("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
72
72
  `),this.close()}submit(){let e=this.value.filter(t=>t.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
73
73
  `),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(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(t=>!t.disabled).forEach(t=>t.selected=e),this.render()}_(e,t){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
74
74
  Instructions:
75
75
  ${U.arrowUp}/${U.arrowDown}: Highlight option
76
76
  ${U.arrowLeft}/${U.arrowRight}/[space]: Toggle selection
77
77
  `+(this.maxChoices===void 0?` a: Toggle all
78
- `:"")+" enter/return: Complete answer":""}renderOption(e,t,s,r){let n=(t.selected?_.green(U.radioOn):U.radioOff)+" "+r+" ",o,h;return t.disabled?o=e===s?_.gray().underline(t.title):_.strikethrough().gray(t.title):(o=e===s?_.cyan().underline(t.title):t.title,e===s&&t.description&&(h=` - ${t.description}`,(n.length+o.length+h.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(h=`
79
- `+bu(t.description,{margin:n.length,width:this.out.columns})))),n+o+_.gray(h||"")}paginateOptions(e){if(e.length===0)return _.red("No matches for this query.");let{startIndex:t,endIndex:s}=vu(this.cursor,e.length,this.optionsPerPage),r,n=[];for(let o=t;o<s;o++)o===t&&t>0?r=U.arrowUp:o===s-1&&s<e.length?r=U.arrowDown:r=" ",n.push(this.renderOption(this.cursor,e[o],o,r));return`
78
+ `:"")+" enter/return: Complete answer":""}renderOption(e,t,s,r){let n=(t.selected?P.green(U.radioOn):U.radioOff)+" "+r+" ",o,h;return t.disabled?o=e===s?P.gray().underline(t.title):P.strikethrough().gray(t.title):(o=e===s?P.cyan().underline(t.title):t.title,e===s&&t.description&&(h=` - ${t.description}`,(n.length+o.length+h.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(h=`
79
+ `+bu(t.description,{margin:n.length,width:this.out.columns})))),n+o+P.gray(h||"")}paginateOptions(e){if(e.length===0)return P.red("No matches for this query.");let{startIndex:t,endIndex:s}=vu(this.cursor,e.length,this.optionsPerPage),r,n=[];for(let o=t;o<s;o++)o===t&&t>0?r=U.arrowUp:o===s-1&&s<e.length?r=U.arrowDown:r=" ",n.push(this.renderOption(this.cursor,e[o],o,r));return`
80
80
  `+n.join(`
81
- `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(t=>t.selected).map(t=>t.title).join(", ");let e=[_.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(_.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(mu.hide),super.render();let e=[Sn.symbol(this.done,this.aborted),_.bold(this.msg),Sn.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=_.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=xn(e,this.out.columns)}};On.exports=Wt});var $n=u((ic,qn)=>{"use strict";var ge=m(),yu=N(),{erase:wu,cursor:Tn}=b(),{style:Jt,clear:Mn,figures:Kt,wrap:xu,entriesToDisplay:Su}=M(),Cn=(i,e)=>i[e]&&(i[e].value||i[e].title||i[e]),Ou=(i,e)=>i[e]&&(i[e].title||i[e].value||i[e]),Tu=(i,e)=>{let t=i.findIndex(s=>s.value===e||s.title===e);return t>-1?t:void 0},Zt=class extends yu{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:Tu(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=Jt.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Mn("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=Cn(this.suggestions,e):this.value=this.fallback.value,this.fire()}async complete(e){let t=this.completing=this.suggest(this.input,this.choices),s=await t;if(this.completing!==t)return;this.suggestions=s.map((n,o,h)=>({title:Ou(h,o),value:Cn(h,o),description:n.description})),this.completing=!1;let r=Math.max(s.length-1,0);this.moveSelect(Math.min(r,this.select)),e&&e()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
81
+ `)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(t=>t.selected).map(t=>t.title).join(", ");let e=[P.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(P.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(mu.hide),super.render();let e=[Sn.symbol(this.done,this.aborted),P.bold(this.msg),Sn.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=P.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=xn(e,this.out.columns)}};On.exports=Wt});var $n=u((ic,qn)=>{"use strict";var ge=m(),yu=N(),{erase:wu,cursor:Tn}=b(),{style:Jt,clear:Mn,figures:Kt,wrap:xu,entriesToDisplay:Su}=M(),Cn=(i,e)=>i[e]&&(i[e].value||i[e].title||i[e]),Ou=(i,e)=>i[e]&&(i[e].title||i[e].value||i[e]),Tu=(i,e)=>{let t=i.findIndex(s=>s.value===e||s.title===e);return t>-1?t:void 0},Zt=class extends yu{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:Tu(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=Jt.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Mn("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=Cn(this.suggestions,e):this.value=this.fallback.value,this.fire()}async complete(e){let t=this.completing=this.suggest(this.input,this.choices),s=await t;if(this.completing!==t)return;this.suggestions=s.map((n,o,h)=>({title:Ou(h,o),value:Cn(h,o),description:n.description})),this.completing=!1;let r=Math.max(s.length-1,0);this.moveSelect(Math.min(r,this.select)),e&&e()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
82
82
  `),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
83
83
  `),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
84
84
  `),this.close()}_(e,t){let s=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor);this.input=`${s}${e}${r}`,this.cursor=s.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),t=this.input.slice(this.cursor);this.input=`${e}${t}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),t=this.input.slice(this.cursor+1);this.input=`${e}${t}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,t,s,r){let n,o=s?Kt.arrowUp:r?Kt.arrowDown:" ",h=t?ge.cyan().underline(e.title):e.title;return o=(t?ge.cyan(Kt.pointer)+" ":" ")+o,e.description&&(n=` - ${e.description}`,(o.length+h.length+n.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(n=`
85
85
  `+xu(e.description,{margin:3,width:this.out.columns}))),o+" "+h+ge.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(Tn.hide):this.out.write(Mn(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:t}=Su(this.select,this.choices.length,this.limit);if(this.outputText=[Jt.symbol(this.done,this.aborted,this.exited),ge.bold(this.msg),Jt.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let s=this.suggestions.slice(e,t).map((r,n)=>this.renderOption(r,this.select===n+e,n===0&&e>0,n+e===t-1&&t<this.choices.length)).join(`
86
86
  `);this.outputText+=`
87
- `+(s||ge.gray(this.fallback.title))}this.out.write(wu.line+Tn.to(0)+this.outputText)}};qn.exports=Zt});var En=u((sc,_n)=>{"use strict";var Y=m(),{cursor:Mu}=b(),Cu=zt(),{clear:In,style:Pn,figures:ie}=M(),Xt=class extends Cu{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=In("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(s=>this.inputValue?!!(typeof s.title=="string"&&s.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof s.value=="string"&&s.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let t=this.filteredOptions.findIndex(s=>s===e);this.cursor=t<0?0:t,this.render()}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,t){e===" "?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
87
+ `+(s||ge.gray(this.fallback.title))}this.out.write(wu.line+Tn.to(0)+this.outputText)}};qn.exports=Zt});var En=u((sc,Pn)=>{"use strict";var Y=m(),{cursor:Mu}=b(),Cu=zt(),{clear:In,style:_n,figures:ie}=M(),Xt=class extends Cu{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=In("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(s=>this.inputValue?!!(typeof s.title=="string"&&s.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof s.value=="string"&&s.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let t=this.filteredOptions.findIndex(s=>s===e);this.cursor=t<0?0:t,this.render()}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,t){e===" "?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
88
88
  Instructions:
89
89
  ${ie.arrowUp}/${ie.arrowDown}: Highlight option
90
90
  ${ie.arrowLeft}/${ie.arrowRight}/[space]: Toggle selection
@@ -92,13 +92,13 @@ Instructions:
92
92
  enter/return: Complete answer
93
93
  `:""}renderCurrentInput(){return`
94
94
  Filtered results for: ${this.inputValue?this.inputValue:Y.gray("Enter something to filter")}
95
- `}renderOption(e,t,s){let r;return t.disabled?r=e===s?Y.gray().underline(t.title):Y.strikethrough().gray(t.title):r=e===s?Y.cyan().underline(t.title):t.title,(t.selected?Y.green(ie.radioOn):ie.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(t=>t.selected).map(t=>t.title).join(", ");let e=[Y.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(Y.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(Mu.hide),super.render();let e=[Pn.symbol(this.done,this.aborted),Y.bold(this.msg),Pn.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=Y.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=In(e,this.out.columns)}};_n.exports=Xt});var jn=u((rc,kn)=>{var An=m(),qu=N(),{style:Dn,clear:$u}=M(),{erase:Iu,cursor:Rn}=b(),Qt=class extends qu{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
95
+ `}renderOption(e,t,s){let r;return t.disabled?r=e===s?Y.gray().underline(t.title):Y.strikethrough().gray(t.title):r=e===s?Y.cyan().underline(t.title):t.title,(t.selected?Y.green(ie.radioOn):ie.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(t=>t.selected).map(t=>t.title).join(", ");let e=[Y.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(Y.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(Mu.hide),super.render();let e=[_n.symbol(this.done,this.aborted),Y.bold(this.msg),_n.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=Y.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=In(e,this.out.columns)}};Pn.exports=Xt});var jn=u((rc,kn)=>{var An=m(),qu=N(),{style:Dn,clear:$u}=M(),{erase:Iu,cursor:Rn}=b(),Qt=class extends qu{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
96
96
  `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
97
- `),this.close()}_(e,t){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Rn.hide):this.out.write($u(this.outputText,this.out.columns)),super.render(),this.outputText=[Dn.symbol(this.done,this.aborted),An.bold(this.msg),Dn.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:An.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Iu.line+Rn.to(0)+this.outputText))}};kn.exports=Qt});var Nn=u((nc,Fn)=>{"use strict";Fn.exports={TextPrompt:Rr(),SelectPrompt:Nr(),TogglePrompt:Br(),DatePrompt:gn(),NumberPrompt:wn(),MultiselectPrompt:zt(),AutocompletePrompt:$n(),AutocompleteMultiselectPrompt:En(),ConfirmPrompt:jn()}});var Yn=u(Vn=>{"use strict";var w=Vn,Pu=Nn(),Fe=i=>i;function E(i,e,t={}){return new Promise((s,r)=>{let n=new Pu[i](e),o=t.onAbort||Fe,h=t.onSubmit||Fe,l=t.onExit||Fe;n.on("state",e.onState||Fe),n.on("submit",a=>s(h(a))),n.on("exit",a=>s(l(a))),n.on("abort",a=>r(o(a)))})}w.text=i=>E("TextPrompt",i);w.password=i=>(i.style="password",w.text(i));w.invisible=i=>(i.style="invisible",w.text(i));w.number=i=>E("NumberPrompt",i);w.date=i=>E("DatePrompt",i);w.confirm=i=>E("ConfirmPrompt",i);w.list=i=>{let e=i.separator||",";return E("TextPrompt",i,{onSubmit:t=>t.split(e).map(s=>s.trim())})};w.toggle=i=>E("TogglePrompt",i);w.select=i=>E("SelectPrompt",i);w.multiselect=i=>{i.choices=[].concat(i.choices||[]);let e=t=>t.filter(s=>s.selected).map(s=>s.value);return E("MultiselectPrompt",i,{onAbort:e,onSubmit:e})};w.autocompleteMultiselect=i=>{i.choices=[].concat(i.choices||[]);let e=t=>t.filter(s=>s.selected).map(s=>s.value);return E("AutocompleteMultiselectPrompt",i,{onAbort:e,onSubmit:e})};var _u=(i,e)=>Promise.resolve(e.filter(t=>t.title.slice(0,i.length).toLowerCase()===i.toLowerCase()));w.autocomplete=i=>(i.suggest=i.suggest||_u,i.choices=[].concat(i.choices||[]),E("AutocompletePrompt",i))});var Hn=u((hc,Bn)=>{"use strict";var ei=Yn(),Eu=["suggest","format","onState","validate","onRender","type"],Ln=()=>{};async function W(i=[],{onSubmit:e=Ln,onCancel:t=Ln}={}){let s={},r=W._override||{};i=[].concat(i);let n,o,h,l,a,K,se=async(v,C,ve=!1)=>{if(!(!ve&&v.validate&&v.validate(C)!==!0))return v.format?await v.format(C,s):C};for(o of i)if({name:l,type:a}=o,typeof a=="function"&&(a=await a(n,{...s},o),o.type=a),!!a){for(let v in o){if(Eu.includes(v))continue;let C=o[v];o[v]=typeof C=="function"?await C(n,{...s},K):C}if(K=o,typeof o.message!="string")throw new Error("prompt message is required");if({name:l,type:a}=o,ei[a]===void 0)throw new Error(`prompt type (${a}) is not defined`);if(r[o.name]!==void 0&&(n=await se(o,r[o.name]),n!==void 0)){s[l]=n;continue}try{n=W._injected?Au(W._injected,o.initial):await ei[a](o),s[l]=n=await se(o,n,!0),h=await e(o,n,s)}catch{h=!await t(o,s)}if(h)return s}return s}function Au(i,e){let t=i.shift();if(t instanceof Error)throw t;return t===void 0?e:t}function Du(i){W._injected=(W._injected||[]).concat(i)}function Ru(i){W._override=Object.assign({},i)}Bn.exports=Object.assign(W,{prompt:W,prompts:ei,inject:Du,override:Ru})});var Un=u((lc,Gn)=>{function ku(i){i=(Array.isArray(i)?i:i.split(".")).map(Number);let e=0,t=process.versions.node.split(".").map(Number);for(;e<i.length;e++){if(t[e]>i[e])return!1;if(i[e]>t[e])return!0}return!1}Gn.exports=ku("8.6.0")?mr():Hn()});var x=B(require("fs"),1),ti=B(require("path"),1),be=B(require("process"),1);var ni=(i=0)=>e=>`\x1B[${e+i}m`,oi=(i=0)=>e=>`\x1B[${38+i};5;${e}m`,hi=(i=0)=>(e,t,s)=>`\x1B[${38+i};2;${e};${t};${s}m`,f={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Vu=Object.keys(f.modifier),yo=Object.keys(f.color),wo=Object.keys(f.bgColor),Yu=[...yo,...wo];function xo(){let i=new Map;for(let[e,t]of Object.entries(f)){for(let[s,r]of Object.entries(t))f[s]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},t[s]=f[s],i.set(r[0],r[1]);Object.defineProperty(f,e,{value:t,enumerable:!1})}return Object.defineProperty(f,"codes",{value:i,enumerable:!1}),f.color.close="\x1B[39m",f.bgColor.close="\x1B[49m",f.color.ansi=ni(),f.color.ansi256=oi(),f.color.ansi16m=hi(),f.bgColor.ansi=ni(10),f.bgColor.ansi256=oi(10),f.bgColor.ansi16m=hi(10),Object.defineProperties(f,{rgbToAnsi256:{value(e,t,s){return e===t&&t===s?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(s/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[s]=t;s.length===3&&(s=[...s].map(n=>n+n).join(""));let r=Number.parseInt(s,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>f.rgbToAnsi256(...f.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,s,r;if(e>=232)t=((e-232)*10+8)/255,s=t,r=t;else{e-=16;let h=e%36;t=Math.floor(e/36)/5,s=Math.floor(h/6)/5,r=h%6/5}let n=Math.max(t,s,r)*2;if(n===0)return 30;let o=30+(Math.round(r)<<2|Math.round(s)<<1|Math.round(t));return n===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,t,s)=>f.ansi256ToAnsi(f.rgbToAnsi256(e,t,s)),enumerable:!1},hexToAnsi:{value:e=>f.ansi256ToAnsi(f.hexToAnsi256(e)),enumerable:!1}}),f}var So=xo(),O=So;var xe=B(require("process"),1),ui=B(require("os"),1),Ve=B(require("tty"),1);function S(i,e=globalThis.Deno?globalThis.Deno.args:xe.default.argv){let t=i.startsWith("-")?"":i.length===1?"-":"--",s=e.indexOf(t+i),r=e.indexOf("--");return s!==-1&&(r===-1||s<r)}var{env:p}=xe.default,we;S("no-color")||S("no-colors")||S("color=false")||S("color=never")?we=0:(S("color")||S("colors")||S("color=true")||S("color=always"))&&(we=1);function Oo(){if("FORCE_COLOR"in p)return p.FORCE_COLOR==="true"?1:p.FORCE_COLOR==="false"?0:p.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(p.FORCE_COLOR,10),3)}function To(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function Mo(i,{streamIsTTY:e,sniffFlags:t=!0}={}){let s=Oo();s!==void 0&&(we=s);let r=t?we:s;if(r===0)return 0;if(t){if(S("color=16m")||S("color=full")||S("color=truecolor"))return 3;if(S("color=256"))return 2}if("TF_BUILD"in p&&"AGENT_NAME"in p)return 1;if(i&&!e&&r===void 0)return 0;let n=r||0;if(p.TERM==="dumb")return n;if(xe.default.platform==="win32"){let o=ui.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in p)return"GITHUB_ACTIONS"in p||"GITEA_ACTIONS"in p?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in p)||p.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in p)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(p.TEAMCITY_VERSION)?1:0;if(p.COLORTERM==="truecolor"||p.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in p){let o=Number.parseInt((p.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(p.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(p.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(p.TERM)||"COLORTERM"in p?1:n}function li(i,e={}){let t=Mo(i,{streamIsTTY:i&&i.isTTY,...e});return To(t)}var Co={stdout:li({isTTY:Ve.default.isatty(1)}),stderr:li({isTTY:Ve.default.isatty(2)})},ai=Co;function ci(i,e,t){let s=i.indexOf(e);if(s===-1)return i;let r=e.length,n=0,o="";do o+=i.slice(n,s)+e+t,n=s+r,s=i.indexOf(e,n);while(s!==-1);return o+=i.slice(n),o}function di(i,e,t,s){let r=0,n="";do{let o=i[s-1]==="\r";n+=i.slice(r,o?s-1:s)+e+(o?`\r
97
+ `),this.close()}_(e,t){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Rn.hide):this.out.write($u(this.outputText,this.out.columns)),super.render(),this.outputText=[Dn.symbol(this.done,this.aborted),An.bold(this.msg),Dn.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:An.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(Iu.line+Rn.to(0)+this.outputText))}};kn.exports=Qt});var Nn=u((nc,Fn)=>{"use strict";Fn.exports={TextPrompt:Rr(),SelectPrompt:Nr(),TogglePrompt:Br(),DatePrompt:gn(),NumberPrompt:wn(),MultiselectPrompt:zt(),AutocompletePrompt:$n(),AutocompleteMultiselectPrompt:En(),ConfirmPrompt:jn()}});var Yn=u(Vn=>{"use strict";var w=Vn,_u=Nn(),Fe=i=>i;function E(i,e,t={}){return new Promise((s,r)=>{let n=new _u[i](e),o=t.onAbort||Fe,h=t.onSubmit||Fe,l=t.onExit||Fe;n.on("state",e.onState||Fe),n.on("submit",a=>s(h(a))),n.on("exit",a=>s(l(a))),n.on("abort",a=>r(o(a)))})}w.text=i=>E("TextPrompt",i);w.password=i=>(i.style="password",w.text(i));w.invisible=i=>(i.style="invisible",w.text(i));w.number=i=>E("NumberPrompt",i);w.date=i=>E("DatePrompt",i);w.confirm=i=>E("ConfirmPrompt",i);w.list=i=>{let e=i.separator||",";return E("TextPrompt",i,{onSubmit:t=>t.split(e).map(s=>s.trim())})};w.toggle=i=>E("TogglePrompt",i);w.select=i=>E("SelectPrompt",i);w.multiselect=i=>{i.choices=[].concat(i.choices||[]);let e=t=>t.filter(s=>s.selected).map(s=>s.value);return E("MultiselectPrompt",i,{onAbort:e,onSubmit:e})};w.autocompleteMultiselect=i=>{i.choices=[].concat(i.choices||[]);let e=t=>t.filter(s=>s.selected).map(s=>s.value);return E("AutocompleteMultiselectPrompt",i,{onAbort:e,onSubmit:e})};var Pu=(i,e)=>Promise.resolve(e.filter(t=>t.title.slice(0,i.length).toLowerCase()===i.toLowerCase()));w.autocomplete=i=>(i.suggest=i.suggest||Pu,i.choices=[].concat(i.choices||[]),E("AutocompletePrompt",i))});var Hn=u((hc,Bn)=>{"use strict";var ei=Yn(),Eu=["suggest","format","onState","validate","onRender","type"],Ln=()=>{};async function W(i=[],{onSubmit:e=Ln,onCancel:t=Ln}={}){let s={},r=W._override||{};i=[].concat(i);let n,o,h,l,a,K,se=async(v,C,ve=!1)=>{if(!(!ve&&v.validate&&v.validate(C)!==!0))return v.format?await v.format(C,s):C};for(o of i)if({name:l,type:a}=o,typeof a=="function"&&(a=await a(n,{...s},o),o.type=a),!!a){for(let v in o){if(Eu.includes(v))continue;let C=o[v];o[v]=typeof C=="function"?await C(n,{...s},K):C}if(K=o,typeof o.message!="string")throw new Error("prompt message is required");if({name:l,type:a}=o,ei[a]===void 0)throw new Error(`prompt type (${a}) is not defined`);if(r[o.name]!==void 0&&(n=await se(o,r[o.name]),n!==void 0)){s[l]=n;continue}try{n=W._injected?Au(W._injected,o.initial):await ei[a](o),s[l]=n=await se(o,n,!0),h=await e(o,n,s)}catch{h=!await t(o,s)}if(h)return s}return s}function Au(i,e){let t=i.shift();if(t instanceof Error)throw t;return t===void 0?e:t}function Du(i){W._injected=(W._injected||[]).concat(i)}function Ru(i){W._override=Object.assign({},i)}Bn.exports=Object.assign(W,{prompt:W,prompts:ei,inject:Du,override:Ru})});var Un=u((lc,Gn)=>{function ku(i){i=(Array.isArray(i)?i:i.split(".")).map(Number);let e=0,t=process.versions.node.split(".").map(Number);for(;e<i.length;e++){if(t[e]>i[e])return!1;if(i[e]>t[e])return!0}return!1}Gn.exports=ku("8.6.0")?mr():Hn()});var x=B(require("fs"),1),ti=B(require("path"),1),be=B(require("process"),1);var ni=(i=0)=>e=>`\x1B[${e+i}m`,oi=(i=0)=>e=>`\x1B[${38+i};5;${e}m`,hi=(i=0)=>(e,t,s)=>`\x1B[${38+i};2;${e};${t};${s}m`,f={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},Vu=Object.keys(f.modifier),yo=Object.keys(f.color),wo=Object.keys(f.bgColor),Yu=[...yo,...wo];function xo(){let i=new Map;for(let[e,t]of Object.entries(f)){for(let[s,r]of Object.entries(t))f[s]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},t[s]=f[s],i.set(r[0],r[1]);Object.defineProperty(f,e,{value:t,enumerable:!1})}return Object.defineProperty(f,"codes",{value:i,enumerable:!1}),f.color.close="\x1B[39m",f.bgColor.close="\x1B[49m",f.color.ansi=ni(),f.color.ansi256=oi(),f.color.ansi16m=hi(),f.bgColor.ansi=ni(10),f.bgColor.ansi256=oi(10),f.bgColor.ansi16m=hi(10),Object.defineProperties(f,{rgbToAnsi256:{value(e,t,s){return e===t&&t===s?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(s/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[s]=t;s.length===3&&(s=[...s].map(n=>n+n).join(""));let r=Number.parseInt(s,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>f.rgbToAnsi256(...f.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,s,r;if(e>=232)t=((e-232)*10+8)/255,s=t,r=t;else{e-=16;let h=e%36;t=Math.floor(e/36)/5,s=Math.floor(h/6)/5,r=h%6/5}let n=Math.max(t,s,r)*2;if(n===0)return 30;let o=30+(Math.round(r)<<2|Math.round(s)<<1|Math.round(t));return n===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(e,t,s)=>f.ansi256ToAnsi(f.rgbToAnsi256(e,t,s)),enumerable:!1},hexToAnsi:{value:e=>f.ansi256ToAnsi(f.hexToAnsi256(e)),enumerable:!1}}),f}var So=xo(),O=So;var xe=B(require("process"),1),ui=B(require("os"),1),Ve=B(require("tty"),1);function S(i,e=globalThis.Deno?globalThis.Deno.args:xe.default.argv){let t=i.startsWith("-")?"":i.length===1?"-":"--",s=e.indexOf(t+i),r=e.indexOf("--");return s!==-1&&(r===-1||s<r)}var{env:p}=xe.default,we;S("no-color")||S("no-colors")||S("color=false")||S("color=never")?we=0:(S("color")||S("colors")||S("color=true")||S("color=always"))&&(we=1);function Oo(){if("FORCE_COLOR"in p)return p.FORCE_COLOR==="true"?1:p.FORCE_COLOR==="false"?0:p.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(p.FORCE_COLOR,10),3)}function To(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}function Mo(i,{streamIsTTY:e,sniffFlags:t=!0}={}){let s=Oo();s!==void 0&&(we=s);let r=t?we:s;if(r===0)return 0;if(t){if(S("color=16m")||S("color=full")||S("color=truecolor"))return 3;if(S("color=256"))return 2}if("TF_BUILD"in p&&"AGENT_NAME"in p)return 1;if(i&&!e&&r===void 0)return 0;let n=r||0;if(p.TERM==="dumb")return n;if(xe.default.platform==="win32"){let o=ui.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in p)return"GITHUB_ACTIONS"in p||"GITEA_ACTIONS"in p?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in p)||p.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in p)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(p.TEAMCITY_VERSION)?1:0;if(p.COLORTERM==="truecolor"||p.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in p){let o=Number.parseInt((p.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(p.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(p.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(p.TERM)||"COLORTERM"in p?1:n}function li(i,e={}){let t=Mo(i,{streamIsTTY:i&&i.isTTY,...e});return To(t)}var Co={stdout:li({isTTY:Ve.default.isatty(1)}),stderr:li({isTTY:Ve.default.isatty(2)})},ai=Co;function ci(i,e,t){let s=i.indexOf(e);if(s===-1)return i;let r=e.length,n=0,o="";do o+=i.slice(n,s)+e+t,n=s+r,s=i.indexOf(e,n);while(s!==-1);return o+=i.slice(n),o}function di(i,e,t,s){let r=0,n="";do{let o=i[s-1]==="\r";n+=i.slice(r,o?s-1:s)+e+(o?`\r
98
98
  `:`
99
99
  `)+t,r=s+1,s=i.indexOf(`
100
- `,r)}while(s!==-1);return n+=i.slice(r),n}var{stdout:fi,stderr:pi}=ai,Ye=Symbol("GENERATOR"),Z=Symbol("STYLER"),re=Symbol("IS_EMPTY"),mi=["ansi","ansi","ansi256","ansi16m"],X=Object.create(null),qo=(i,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=fi?fi.level:0;i.level=e.level===void 0?t:e.level};var $o=i=>{let e=(...t)=>t.join(" ");return qo(e,i),Object.setPrototypeOf(e,ne.prototype),e};function ne(i){return $o(i)}Object.setPrototypeOf(ne.prototype,Function.prototype);for(let[i,e]of Object.entries(O))X[i]={get(){let t=Se(this,Be(e.open,e.close,this[Z]),this[re]);return Object.defineProperty(this,i,{value:t}),t}};X.visible={get(){let i=Se(this,this[Z],!0);return Object.defineProperty(this,"visible",{value:i}),i}};var Le=(i,e,t,...s)=>i==="rgb"?e==="ansi16m"?O[t].ansi16m(...s):e==="ansi256"?O[t].ansi256(O.rgbToAnsi256(...s)):O[t].ansi(O.rgbToAnsi(...s)):i==="hex"?Le("rgb",e,t,...O.hexToRgb(...s)):O[t][i](...s),Io=["rgb","hex","ansi256"];for(let i of Io){X[i]={get(){let{level:t}=this;return function(...s){let r=Be(Le(i,mi[t],"color",...s),O.color.close,this[Z]);return Se(this,r,this[re])}}};let e="bg"+i[0].toUpperCase()+i.slice(1);X[e]={get(){let{level:t}=this;return function(...s){let r=Be(Le(i,mi[t],"bgColor",...s),O.bgColor.close,this[Z]);return Se(this,r,this[re])}}}}var Po=Object.defineProperties(()=>{},{...X,level:{enumerable:!0,get(){return this[Ye].level},set(i){this[Ye].level=i}}}),Be=(i,e,t)=>{let s,r;return t===void 0?(s=i,r=e):(s=t.openAll+i,r=e+t.closeAll),{open:i,close:e,openAll:s,closeAll:r,parent:t}},Se=(i,e,t)=>{let s=(...r)=>_o(s,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(s,Po),s[Ye]=i,s[Z]=e,s[re]=t,s},_o=(i,e)=>{if(i.level<=0||!e)return i[re]?"":e;let t=i[Z];if(t===void 0)return e;let{openAll:s,closeAll:r}=t;if(e.includes("\x1B"))for(;t!==void 0;)e=ci(e,t.close,t.open),t=t.parent;let n=e.indexOf(`
101
- `);return n!==-1&&(e=di(e,r,s,n)),s+e+r};Object.defineProperties(ne.prototype,X);var Eo=ne(),zu=ne({level:pi?pi.level:0});var D=Eo;var co=B(Un(),1);var Wn={name:"reactive-vscode",type:"module",version:"0.0.1-beta.1",description:"Develop VSCode extension with Vue 3 Composition API",author:"_Kerman <kermanx@qq.com>",license:"MIT",homepage:"https://github.com/KermanX/reactive-vscode#readme",repository:{type:"git",url:"git+https://github.com/KermanX/reactive-vscode.git"},bugs:"https://github.com/KermanX/reactive-vscode/issues",keywords:["vscode","extension","extension-development","vue","composition-api","reactive","reactiviry"],sideEffects:!1,exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.mjs"}},main:"./dist/index.mjs",types:"./dist/index.d.ts",files:["README.md","dist"],scripts:{typecheck:"tsc --noEmit",build:"mkdist -d",prepublishOnly:"pnpm typecheck && pnpm build"},dependencies:{"@vue/runtime-core":"^3.4.27"},devDependencies:{"@types/vscode":"^1.89.0",mkdist:"^1.5.1",typescript:"^5.4.5"}};var zn=(i,e)=>`import { defineConfigs, defineExtension, useCommand, useIsDarkTheme, useLogger, watchEffect } from 'reactive-vscode'
100
+ `,r)}while(s!==-1);return n+=i.slice(r),n}var{stdout:fi,stderr:pi}=ai,Ye=Symbol("GENERATOR"),Z=Symbol("STYLER"),re=Symbol("IS_EMPTY"),mi=["ansi","ansi","ansi256","ansi16m"],X=Object.create(null),qo=(i,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=fi?fi.level:0;i.level=e.level===void 0?t:e.level};var $o=i=>{let e=(...t)=>t.join(" ");return qo(e,i),Object.setPrototypeOf(e,ne.prototype),e};function ne(i){return $o(i)}Object.setPrototypeOf(ne.prototype,Function.prototype);for(let[i,e]of Object.entries(O))X[i]={get(){let t=Se(this,Be(e.open,e.close,this[Z]),this[re]);return Object.defineProperty(this,i,{value:t}),t}};X.visible={get(){let i=Se(this,this[Z],!0);return Object.defineProperty(this,"visible",{value:i}),i}};var Le=(i,e,t,...s)=>i==="rgb"?e==="ansi16m"?O[t].ansi16m(...s):e==="ansi256"?O[t].ansi256(O.rgbToAnsi256(...s)):O[t].ansi(O.rgbToAnsi(...s)):i==="hex"?Le("rgb",e,t,...O.hexToRgb(...s)):O[t][i](...s),Io=["rgb","hex","ansi256"];for(let i of Io){X[i]={get(){let{level:t}=this;return function(...s){let r=Be(Le(i,mi[t],"color",...s),O.color.close,this[Z]);return Se(this,r,this[re])}}};let e="bg"+i[0].toUpperCase()+i.slice(1);X[e]={get(){let{level:t}=this;return function(...s){let r=Be(Le(i,mi[t],"bgColor",...s),O.bgColor.close,this[Z]);return Se(this,r,this[re])}}}}var _o=Object.defineProperties(()=>{},{...X,level:{enumerable:!0,get(){return this[Ye].level},set(i){this[Ye].level=i}}}),Be=(i,e,t)=>{let s,r;return t===void 0?(s=i,r=e):(s=t.openAll+i,r=e+t.closeAll),{open:i,close:e,openAll:s,closeAll:r,parent:t}},Se=(i,e,t)=>{let s=(...r)=>Po(s,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(s,_o),s[Ye]=i,s[Z]=e,s[re]=t,s},Po=(i,e)=>{if(i.level<=0||!e)return i[re]?"":e;let t=i[Z];if(t===void 0)return e;let{openAll:s,closeAll:r}=t;if(e.includes("\x1B"))for(;t!==void 0;)e=ci(e,t.close,t.open),t=t.parent;let n=e.indexOf(`
101
+ `);return n!==-1&&(e=di(e,r,s,n)),s+e+r};Object.defineProperties(ne.prototype,X);var Eo=ne(),zu=ne({level:pi?pi.level:0});var D=Eo;var co=B(Un(),1);var Wn={name:"reactive-vscode",type:"module",version:"0.0.1-beta.3",description:"Develop VSCode extension with Vue Reactivity API",author:"_Kerman <kermanx@qq.com>",license:"MIT",homepage:"https://github.com/KermanX/reactive-vscode#readme",repository:{type:"git",url:"git+https://github.com/KermanX/reactive-vscode.git"},bugs:"https://github.com/KermanX/reactive-vscode/issues",keywords:["vscode","extension","extension-development","vue","composition-api","reactive","reactiviry"],sideEffects:!1,exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js"}},main:"./dist/index.js",types:"./dist/index.d.ts",files:["README.md","dist","shim.d.ts","tsconfig.json"],scripts:{typecheck:"tsc --noEmit",build:"vite build",dev:"vite build --watch",prepublishOnly:"pnpm typecheck && pnpm build"},peerDependencies:{"@types/vscode":"^1.89.0"},dependencies:{},devDependencies:{"@types/node":"^20.14.2","@types/vscode":"^1.89.0","@vue/reactivity":"^3.4.27","@vue/shared":"^3.4.27",typescript:"^5.4.5",vite:"^5.2.12","vite-plugin-dts":"^3.9.1"}};var zn=(i,e)=>`import { defineConfigs, defineExtension, useCommand, useIsDarkTheme, useLogger, watchEffect } from 'reactive-vscode'
102
102
  import { window } from 'vscode'
103
103
 
104
104
  const logger = useLogger('${e}')
@@ -173,7 +173,7 @@ node_modules
173
173
  },
174
174
  "scripts": {
175
175
  "build": "tsup --env.NODE_ENV production",
176
- "dev": "tsup --watch ./src",
176
+ "dev": "tsup --watch ./src --env.NODE_ENV development",
177
177
  "typecheck": "tsc --noEmit",
178
178
  "vscode:prepublish": "pnpm run build"
179
179
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-reactive-vscode",
3
3
  "type": "module",
4
- "version": "0.0.1-beta.1",
4
+ "version": "0.0.1-beta.3",
5
5
  "description": "Reactive-vscode project creator",
6
6
  "author": "_Kerman <kermanx@qq.com>",
7
7
  "license": "MIT",
@@ -23,12 +23,6 @@
23
23
  "dist/index.cjs",
24
24
  "template"
25
25
  ],
26
- "scripts": {
27
- "dev": "tsup --watch",
28
- "build": "tsup",
29
- "check": "tsc --noEmit",
30
- "prepublishOnly": "npm run build"
31
- },
32
26
  "devDependencies": {
33
27
  "@types/node": "^20.11.26",
34
28
  "@types/prompts": "^2.4.9",
@@ -37,5 +31,10 @@
37
31
  "prompts": "^2.4.2",
38
32
  "tsup": "^8.0.2",
39
33
  "typescript": "^5.4.2"
34
+ },
35
+ "scripts": {
36
+ "dev": "tsup --watch",
37
+ "build": "tsup",
38
+ "check": "tsc --noEmit"
40
39
  }
41
- }
40
+ }