create-xmlui-app 0.9.37 → 0.9.39

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.
@@ -2,13 +2,14 @@
2
2
  /* tslint:disable */
3
3
 
4
4
  /**
5
- * Mock Service Worker (2.0.1).
5
+ * Mock Service Worker.
6
6
  * @see https://github.com/mswjs/msw
7
7
  * - Please do NOT modify this file.
8
8
  * - Please do NOT serve this file on production.
9
9
  */
10
10
 
11
- const INTEGRITY_CHECKSUM = '0877fcdc026242810f5bfde0d7178db4'
11
+ const PACKAGE_VERSION = '2.8.4'
12
+ const INTEGRITY_CHECKSUM = '00729d72e3b82faf54ca8b9621dbb96f'
12
13
  const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
13
14
  const activeClientIds = new Set()
14
15
 
@@ -48,7 +49,10 @@ self.addEventListener('message', async function (event) {
48
49
  case 'INTEGRITY_CHECK_REQUEST': {
49
50
  sendToClient(client, {
50
51
  type: 'INTEGRITY_CHECK_RESPONSE',
51
- payload: INTEGRITY_CHECKSUM,
52
+ payload: {
53
+ packageVersion: PACKAGE_VERSION,
54
+ checksum: INTEGRITY_CHECKSUM,
55
+ },
52
56
  })
53
57
  break
54
58
  }
@@ -58,7 +62,12 @@ self.addEventListener('message', async function (event) {
58
62
 
59
63
  sendToClient(client, {
60
64
  type: 'MOCKING_ENABLED',
61
- payload: true,
65
+ payload: {
66
+ client: {
67
+ id: client.id,
68
+ frameType: client.frameType,
69
+ },
70
+ },
62
71
  })
63
72
  break
64
73
  }
@@ -121,11 +130,6 @@ async function handleRequest(event, requestId) {
121
130
  if (client && activeClientIds.has(client.id)) {
122
131
  ;(async function () {
123
132
  const responseClone = response.clone()
124
- // When performing original requests, response body will
125
- // always be a ReadableStream, even for 204 responses.
126
- // But when creating a new Response instance on the client,
127
- // the body for a 204 response must be null.
128
- const responseBody = response.status === 204 ? null : responseClone.body
129
133
 
130
134
  sendToClient(
131
135
  client,
@@ -137,11 +141,11 @@ async function handleRequest(event, requestId) {
137
141
  type: responseClone.type,
138
142
  status: responseClone.status,
139
143
  statusText: responseClone.statusText,
140
- body: responseBody,
144
+ body: responseClone.body,
141
145
  headers: Object.fromEntries(responseClone.headers.entries()),
142
146
  },
143
147
  },
144
- [responseBody],
148
+ [responseClone.body],
145
149
  )
146
150
  })()
147
151
  }
@@ -156,6 +160,10 @@ async function handleRequest(event, requestId) {
156
160
  async function resolveMainClient(event) {
157
161
  const client = await self.clients.get(event.clientId)
158
162
 
163
+ if (activeClientIds.has(event.clientId)) {
164
+ return client
165
+ }
166
+
159
167
  if (client?.frameType === 'top-level') {
160
168
  return client
161
169
  }
@@ -184,12 +192,26 @@ async function getResponse(event, client, requestId) {
184
192
  const requestClone = request.clone()
185
193
 
186
194
  function passthrough() {
187
- const headers = Object.fromEntries(requestClone.headers.entries())
195
+ // Cast the request headers to a new Headers instance
196
+ // so the headers can be manipulated with.
197
+ const headers = new Headers(requestClone.headers)
198
+
199
+ // Remove the "accept" header value that marked this request as passthrough.
200
+ // This prevents request alteration and also keeps it compliant with the
201
+ // user-defined CORS policies.
202
+ const acceptHeader = headers.get('accept')
203
+ if (acceptHeader) {
204
+ const values = acceptHeader.split(',').map((value) => value.trim())
205
+ const filteredValues = values.filter(
206
+ (value) => value !== 'msw/passthrough',
207
+ )
188
208
 
189
- // Remove internal MSW request header so the passthrough request
190
- // complies with any potential CORS preflight checks on the server.
191
- // Some servers forbid unknown request headers.
192
- delete headers['x-msw-intention']
209
+ if (filteredValues.length > 0) {
210
+ headers.set('accept', filteredValues.join(', '))
211
+ } else {
212
+ headers.delete('accept')
213
+ }
214
+ }
193
215
 
194
216
  return fetch(requestClone, { headers })
195
217
  }
@@ -207,13 +229,6 @@ async function getResponse(event, client, requestId) {
207
229
  return passthrough()
208
230
  }
209
231
 
210
- // Bypass requests with the explicit bypass header.
211
- // Such requests can be issued by "ctx.fetch()".
212
- const mswIntention = request.headers.get('x-msw-intention')
213
- if (['bypass', 'passthrough'].includes(mswIntention)) {
214
- return passthrough()
215
- }
216
-
217
232
  // Notify the client that a request has been intercepted.
218
233
  const requestBuffer = await request.arrayBuffer()
219
234
  const clientMessage = await sendToClient(
@@ -245,7 +260,7 @@ async function getResponse(event, client, requestId) {
245
260
  return respondWithMock(clientMessage.data)
246
261
  }
247
262
 
248
- case 'MOCK_NOT_FOUND': {
263
+ case 'PASSTHROUGH': {
249
264
  return passthrough()
250
265
  }
251
266
  }
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@
25
25
  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
26
26
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27
27
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
- */function isSpecificValue(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp?true:false}function cloneSpecificValue(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);t.copy(e);return e}else if(t instanceof Date){return new Date(t.getTime())}else if(t instanceof RegExp){return new RegExp(t)}else{throw new Error("Unexpected situation")}}function deepCloneArray(t){var r=[];t.forEach((function(t,s){if(typeof t==="object"&&t!==null){if(Array.isArray(t)){r[s]=deepCloneArray(t)}else if(isSpecificValue(t)){r[s]=cloneSpecificValue(t)}else{r[s]=e({},t)}}else{r[s]=t}}));return r}function safeGetProperty(t,e){return e==="__proto__"?undefined:t[e]}var e=t.exports=function(){if(arguments.length<1||typeof arguments[0]!=="object"){return false}if(arguments.length<2){return arguments[0]}var t=arguments[0];var r=Array.prototype.slice.call(arguments,1);var s,i,n;r.forEach((function(r){if(typeof r!=="object"||r===null||Array.isArray(r)){return}Object.keys(r).forEach((function(n){i=safeGetProperty(t,n);s=safeGetProperty(r,n);if(s===t){return}else if(typeof s!=="object"||s===null){t[n]=s;return}else if(Array.isArray(s)){t[n]=deepCloneArray(s);return}else if(isSpecificValue(s)){t[n]=cloneSpecificValue(s);return}else if(typeof i!=="object"||i===null||Array.isArray(i)){t[n]=e({},s);return}else{t[n]=e(i,s);return}}))}));return t}},7058:(t,e,r)=>{"use strict";var s=r(4042);var i=r(1017).posix.dirname;var n=r(2037).platform()==="win32";var o="/";var a=/\\/g;var l=/[\{\[].*[\}\]]$/;var u=/(^|[^\\])([\{\[]|\([^\)]+$)/;var c=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=function globParent(t,e){var r=Object.assign({flipBackslashes:true},e);if(r.flipBackslashes&&n&&t.indexOf(o)<0){t=t.replace(a,o)}if(l.test(t)){t+=o}t+="a";do{t=i(t)}while(s(t)||u.test(t));return t.replace(c,"$1")}},3909:(t,e,r)=>{"use strict";const s=r(132);const i=r(8363);const n=r(342);const o=r(98);const a=r(7960);const l=r(7956);async function FastGlob(t,e){assertPatternsInput(t);const r=getWorks(t,i.default,e);const s=await Promise.all(r);return l.array.flatten(s)}(function(t){t.glob=t;t.globSync=sync;t.globStream=stream;t.async=t;function sync(t,e){assertPatternsInput(t);const r=getWorks(t,o.default,e);return l.array.flatten(r)}t.sync=sync;function stream(t,e){assertPatternsInput(t);const r=getWorks(t,n.default,e);return l.stream.merge(r)}t.stream=stream;function generateTasks(t,e){assertPatternsInput(t);const r=[].concat(t);const i=new a.default(e);return s.generate(r,i)}t.generateTasks=generateTasks;function isDynamicPattern(t,e){assertPatternsInput(t);const r=new a.default(e);return l.pattern.isDynamicPattern(t,r)}t.isDynamicPattern=isDynamicPattern;function escapePath(t){assertPatternsInput(t);return l.path.escape(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return l.path.convertPathToPattern(t)}t.convertPathToPattern=convertPathToPattern;let e;(function(t){function escapePath(t){assertPatternsInput(t);return l.path.escapePosixPath(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return l.path.convertPosixPathToPattern(t)}t.convertPathToPattern=convertPathToPattern})(e=t.posix||(t.posix={}));let r;(function(t){function escapePath(t){assertPatternsInput(t);return l.path.escapeWindowsPath(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return l.path.convertWindowsPathToPattern(t)}t.convertPathToPattern=convertPathToPattern})(r=t.win32||(t.win32={}))})(FastGlob||(FastGlob={}));function getWorks(t,e,r){const i=[].concat(t);const n=new a.default(r);const o=s.generate(i,n);const l=new e(n);return o.map(l.read,l)}function assertPatternsInput(t){const e=[].concat(t);const r=e.every((t=>l.string.isString(t)&&!l.string.isEmpty(t)));if(!r){throw new TypeError("Patterns must be a string (non empty) or an array of strings")}}t.exports=FastGlob},132:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.convertPatternGroupToTask=e.convertPatternGroupsToTasks=e.groupPatternsByBaseDirectory=e.getNegativePatternsAsPositive=e.getPositivePatterns=e.convertPatternsToTasks=e.generate=void 0;const s=r(7956);function generate(t,e){const r=processPatterns(t,e);const i=processPatterns(e.ignore,e);const n=getPositivePatterns(r);const o=getNegativePatternsAsPositive(r,i);const a=n.filter((t=>s.pattern.isStaticPattern(t,e)));const l=n.filter((t=>s.pattern.isDynamicPattern(t,e)));const u=convertPatternsToTasks(a,o,false);const c=convertPatternsToTasks(l,o,true);return u.concat(c)}e.generate=generate;function processPatterns(t,e){let r=t;if(e.braceExpansion){r=s.pattern.expandPatternsWithBraceExpansion(r)}if(e.baseNameMatch){r=r.map((t=>t.includes("/")?t:`**/${t}`))}return r.map((t=>s.pattern.removeDuplicateSlashes(t)))}function convertPatternsToTasks(t,e,r){const i=[];const n=s.pattern.getPatternsOutsideCurrentDirectory(t);const o=s.pattern.getPatternsInsideCurrentDirectory(t);const a=groupPatternsByBaseDirectory(n);const l=groupPatternsByBaseDirectory(o);i.push(...convertPatternGroupsToTasks(a,e,r));if("."in l){i.push(convertPatternGroupToTask(".",o,e,r))}else{i.push(...convertPatternGroupsToTasks(l,e,r))}return i}e.convertPatternsToTasks=convertPatternsToTasks;function getPositivePatterns(t){return s.pattern.getPositivePatterns(t)}e.getPositivePatterns=getPositivePatterns;function getNegativePatternsAsPositive(t,e){const r=s.pattern.getNegativePatterns(t).concat(e);const i=r.map(s.pattern.convertToPositivePattern);return i}e.getNegativePatternsAsPositive=getNegativePatternsAsPositive;function groupPatternsByBaseDirectory(t){const e={};return t.reduce(((t,e)=>{const r=s.pattern.getBaseDirectory(e);if(r in t){t[r].push(e)}else{t[r]=[e]}return t}),e)}e.groupPatternsByBaseDirectory=groupPatternsByBaseDirectory;function convertPatternGroupsToTasks(t,e,r){return Object.keys(t).map((s=>convertPatternGroupToTask(s,t[s],e,r)))}e.convertPatternGroupsToTasks=convertPatternGroupsToTasks;function convertPatternGroupToTask(t,e,r,i){return{dynamic:i,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(s.pattern.convertToNegativePattern))}}e.convertPatternGroupToTask=convertPatternGroupToTask},8363:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1104);const i=r(5306);class ProviderAsync extends i.default{constructor(){super(...arguments);this._reader=new s.default(this._settings)}async read(t){const e=this._getRootDirectory(t);const r=this._getReaderOptions(t);const s=await this.api(e,t,r);return s.map((t=>r.transform(t)))}api(t,e,r){if(e.dynamic){return this._reader.dynamic(t,r)}return this._reader.static(e.patterns,r)}}e["default"]=ProviderAsync},5357:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7956);const i=r(5349);class DeepFilter{constructor(t,e){this._settings=t;this._micromatchOptions=e}getFilter(t,e,r){const s=this._getMatcher(e);const i=this._getNegativePatternsRe(r);return e=>this._filter(t,e,s,i)}_getMatcher(t){return new i.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const e=t.filter(s.pattern.isAffectDepthOfReadingPattern);return s.pattern.convertPatternsToRe(e,this._micromatchOptions)}_filter(t,e,r,i){if(this._isSkippedByDeep(t,e.path)){return false}if(this._isSkippedSymbolicLink(e)){return false}const n=s.path.removeLeadingDotSegment(e.path);if(this._isSkippedByPositivePatterns(n,r)){return false}return this._isSkippedByNegativePatterns(n,i)}_isSkippedByDeep(t,e){if(this._settings.deep===Infinity){return false}return this._getEntryLevel(t,e)>=this._settings.deep}_getEntryLevel(t,e){const r=e.split("/").length;if(t===""){return r}const s=t.split("/").length;return r-s}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,e){return!this._settings.baseNameMatch&&!e.match(t)}_isSkippedByNegativePatterns(t,e){return!s.pattern.matchAny(t,e)}}e["default"]=DeepFilter},9929:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7956);class EntryFilter{constructor(t,e){this._settings=t;this._micromatchOptions=e;this.index=new Map}getFilter(t,e){const r=s.pattern.convertPatternsToRe(t,this._micromatchOptions);const i=s.pattern.convertPatternsToRe(e,Object.assign(Object.assign({},this._micromatchOptions),{dot:true}));return t=>this._filter(t,r,i)}_filter(t,e,r){const i=s.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(i)){return false}if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t)){return false}if(this._isSkippedByAbsoluteNegativePatterns(i,r)){return false}const n=t.dirent.isDirectory();const o=this._isMatchToPatterns(i,e,n)&&!this._isMatchToPatterns(i,r,n);if(this._settings.unique&&o){this._createIndexRecord(i)}return o}_isDuplicateEntry(t){return this.index.has(t)}_createIndexRecord(t){this.index.set(t,undefined)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(t,e){if(!this._settings.absolute){return false}const r=s.path.makeAbsolute(this._settings.cwd,t);return s.pattern.matchAny(r,e)}_isMatchToPatterns(t,e,r){const i=s.pattern.matchAny(t,e);if(!i&&r){return s.pattern.matchAny(t+"/",e)}return i}}e["default"]=EntryFilter},299:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7956);class ErrorFilter{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return s.errno.isEnoentCodeError(t)||this._settings.suppressErrors}}e["default"]=ErrorFilter},90:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7956);class Matcher{constructor(t,e,r){this._patterns=t;this._settings=e;this._micromatchOptions=r;this._storage=[];this._fillStorage()}_fillStorage(){for(const t of this._patterns){const e=this._getPatternSegments(t);const r=this._splitSegmentsIntoSections(e);this._storage.push({complete:r.length<=1,pattern:t,segments:e,sections:r})}}_getPatternSegments(t){const e=s.pattern.getPatternParts(t,this._micromatchOptions);return e.map((t=>{const e=s.pattern.isDynamicPattern(t,this._settings);if(!e){return{dynamic:false,pattern:t}}return{dynamic:true,pattern:t,patternRe:s.pattern.makeRe(t,this._micromatchOptions)}}))}_splitSegmentsIntoSections(t){return s.array.splitWhen(t,(t=>t.dynamic&&s.pattern.hasGlobStar(t.pattern)))}}e["default"]=Matcher},5349:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(90);class PartialMatcher extends s.default{match(t){const e=t.split("/");const r=e.length;const s=this._storage.filter((t=>!t.complete||t.segments.length>r));for(const t of s){const s=t.sections[0];if(!t.complete&&r>s.length){return true}const i=e.every(((e,r)=>{const s=t.segments[r];if(s.dynamic&&s.patternRe.test(e)){return true}if(!s.dynamic&&s.pattern===e){return true}return false}));if(i){return true}}return false}}e["default"]=PartialMatcher},5306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1017);const i=r(5357);const n=r(9929);const o=r(299);const a=r(9769);class Provider{constructor(t){this._settings=t;this.errorFilter=new o.default(this._settings);this.entryFilter=new n.default(this._settings,this._getMicromatchOptions());this.deepFilter=new i.default(this._settings,this._getMicromatchOptions());this.entryTransformer=new a.default(this._settings)}_getRootDirectory(t){return s.resolve(this._settings.cwd,t.base)}_getReaderOptions(t){const e=t.base==="."?"":t.base;return{basePath:e,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(e,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:true,strictSlashes:false}}}e["default"]=Provider},342:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2781);const i=r(722);const n=r(5306);class ProviderStream extends n.default{constructor(){super(...arguments);this._reader=new i.default(this._settings)}read(t){const e=this._getRootDirectory(t);const r=this._getReaderOptions(t);const i=this.api(e,t,r);const n=new s.Readable({objectMode:true,read:()=>{}});i.once("error",(t=>n.emit("error",t))).on("data",(t=>n.emit("data",r.transform(t)))).once("end",(()=>n.emit("end")));n.once("close",(()=>i.destroy()));return n}api(t,e,r){if(e.dynamic){return this._reader.dynamic(t,r)}return this._reader.static(e.patterns,r)}}e["default"]=ProviderStream},98:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(5623);const i=r(5306);class ProviderSync extends i.default{constructor(){super(...arguments);this._reader=new s.default(this._settings)}read(t){const e=this._getRootDirectory(t);const r=this._getReaderOptions(t);const s=this.api(e,t,r);return s.map(r.transform)}api(t,e,r){if(e.dynamic){return this._reader.dynamic(t,r)}return this._reader.static(e.patterns,r)}}e["default"]=ProviderSync},9769:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7956);class EntryTransformer{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let e=t.path;if(this._settings.absolute){e=s.path.makeAbsolute(this._settings.cwd,e);e=s.path.unixify(e)}if(this._settings.markDirectories&&t.dirent.isDirectory()){e+="/"}if(!this._settings.objectMode){return e}return Object.assign(Object.assign({},t),{path:e})}}e["default"]=EntryTransformer},1104:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(803);const i=r(1762);const n=r(722);class ReaderAsync extends i.default{constructor(){super(...arguments);this._walkAsync=s.walk;this._readerStream=new n.default(this._settings)}dynamic(t,e){return new Promise(((r,s)=>{this._walkAsync(t,e,((t,e)=>{if(t===null){r(e)}else{s(t)}}))}))}async static(t,e){const r=[];const s=this._readerStream.static(t,e);return new Promise(((t,e)=>{s.once("error",e);s.on("data",(t=>r.push(t)));s.once("end",(()=>t(r)))}))}}e["default"]=ReaderAsync},1762:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1017);const i=r(2580);const n=r(7956);class Reader{constructor(t){this._settings=t;this._fsStatSettings=new i.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return s.resolve(this._settings.cwd,t)}_makeEntry(t,e){const r={name:e,path:e,dirent:n.fs.createDirentFromStats(e,t)};if(this._settings.stats){r.stats=t}return r}_isFatalError(t){return!n.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}}e["default"]=Reader},722:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2781);const i=r(2580);const n=r(803);const o=r(1762);class ReaderStream extends o.default{constructor(){super(...arguments);this._walkStream=n.walkStream;this._stat=i.stat}dynamic(t,e){return this._walkStream(t,e)}static(t,e){const r=t.map(this._getFullEntryPath,this);const i=new s.PassThrough({objectMode:true});i._write=(s,n,o)=>this._getEntry(r[s],t[s],e).then((t=>{if(t!==null&&e.entryFilter(t)){i.push(t)}if(s===r.length-1){i.end()}o()})).catch(o);for(let t=0;t<r.length;t++){i.write(t)}return i}_getEntry(t,e,r){return this._getStat(t).then((t=>this._makeEntry(t,e))).catch((t=>{if(r.errorFilter(t)){return null}throw t}))}_getStat(t){return new Promise(((e,r)=>{this._stat(t,this._fsStatSettings,((t,s)=>t===null?e(s):r(t)))}))}}e["default"]=ReaderStream},5623:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2580);const i=r(803);const n=r(1762);class ReaderSync extends n.default{constructor(){super(...arguments);this._walkSync=i.walkSync;this._statSync=s.statSync}dynamic(t,e){return this._walkSync(t,e)}static(t,e){const r=[];for(const s of t){const t=this._getFullEntryPath(s);const i=this._getEntry(t,s,e);if(i===null||!e.entryFilter(i)){continue}r.push(i)}return r}_getEntry(t,e,r){try{const r=this._getStat(t);return this._makeEntry(r,e)}catch(t){if(r.errorFilter(t)){return null}throw t}}_getStat(t){return this._statSync(t,this._fsStatSettings)}}e["default"]=ReaderSync},7960:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const s=r(7147);const i=r(2037);const n=Math.max(i.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:s.lstat,lstatSync:s.lstatSync,stat:s.stat,statSync:s.statSync,readdir:s.readdir,readdirSync:s.readdirSync};class Settings{constructor(t={}){this._options=t;this.absolute=this._getValue(this._options.absolute,false);this.baseNameMatch=this._getValue(this._options.baseNameMatch,false);this.braceExpansion=this._getValue(this._options.braceExpansion,true);this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,true);this.concurrency=this._getValue(this._options.concurrency,n);this.cwd=this._getValue(this._options.cwd,process.cwd());this.deep=this._getValue(this._options.deep,Infinity);this.dot=this._getValue(this._options.dot,false);this.extglob=this._getValue(this._options.extglob,true);this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,true);this.fs=this._getFileSystemMethods(this._options.fs);this.globstar=this._getValue(this._options.globstar,true);this.ignore=this._getValue(this._options.ignore,[]);this.markDirectories=this._getValue(this._options.markDirectories,false);this.objectMode=this._getValue(this._options.objectMode,false);this.onlyDirectories=this._getValue(this._options.onlyDirectories,false);this.onlyFiles=this._getValue(this._options.onlyFiles,true);this.stats=this._getValue(this._options.stats,false);this.suppressErrors=this._getValue(this._options.suppressErrors,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,false);this.unique=this._getValue(this._options.unique,true);if(this.onlyDirectories){this.onlyFiles=false}if(this.stats){this.objectMode=true}this.ignore=[].concat(this.ignore)}_getValue(t,e){return t===undefined?e:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}e["default"]=Settings},8689:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.splitWhen=e.flatten=void 0;function flatten(t){return t.reduce(((t,e)=>[].concat(t,e)),[])}e.flatten=flatten;function splitWhen(t,e){const r=[[]];let s=0;for(const i of t){if(e(i)){s++;r[s]=[]}else{r[s].push(i)}}return r}e.splitWhen=splitWhen},3940:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.isEnoentCodeError=void 0;function isEnoentCodeError(t){return t.code==="ENOENT"}e.isEnoentCodeError=isEnoentCodeError},9562:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createDirentFromStats=void 0;class DirentFromStats{constructor(t,e){this.name=t;this.isBlockDevice=e.isBlockDevice.bind(e);this.isCharacterDevice=e.isCharacterDevice.bind(e);this.isDirectory=e.isDirectory.bind(e);this.isFIFO=e.isFIFO.bind(e);this.isFile=e.isFile.bind(e);this.isSocket=e.isSocket.bind(e);this.isSymbolicLink=e.isSymbolicLink.bind(e)}}function createDirentFromStats(t,e){return new DirentFromStats(t,e)}e.createDirentFromStats=createDirentFromStats},7956:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.string=e.stream=e.pattern=e.path=e.fs=e.errno=e.array=void 0;const s=r(8689);e.array=s;const i=r(3940);e.errno=i;const n=r(9562);e.fs=n;const o=r(9128);e.path=o;const a=r(8655);e.pattern=a;const l=r(5114);e.stream=l;const u=r(3050);e.string=u},9128:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.convertPosixPathToPattern=e.convertWindowsPathToPattern=e.convertPathToPattern=e.escapePosixPath=e.escapeWindowsPath=e.escape=e.removeLeadingDotSegment=e.makeAbsolute=e.unixify=void 0;const s=r(2037);const i=r(1017);const n=s.platform()==="win32";const o=2;const a=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;const l=/(\\?)([(){}]|^!|[!+@](?=\())/g;const u=/^\\\\([.?])/;const c=/\\(?![!()+@{}])/g;function unixify(t){return t.replace(/\\/g,"/")}e.unixify=unixify;function makeAbsolute(t,e){return i.resolve(t,e)}e.makeAbsolute=makeAbsolute;function removeLeadingDotSegment(t){if(t.charAt(0)==="."){const e=t.charAt(1);if(e==="/"||e==="\\"){return t.slice(o)}}return t}e.removeLeadingDotSegment=removeLeadingDotSegment;e.escape=n?escapeWindowsPath:escapePosixPath;function escapeWindowsPath(t){return t.replace(l,"\\$2")}e.escapeWindowsPath=escapeWindowsPath;function escapePosixPath(t){return t.replace(a,"\\$2")}e.escapePosixPath=escapePosixPath;e.convertPathToPattern=n?convertWindowsPathToPattern:convertPosixPathToPattern;function convertWindowsPathToPattern(t){return escapeWindowsPath(t).replace(u,"//$1").replace(c,"/")}e.convertWindowsPathToPattern=convertWindowsPathToPattern;function convertPosixPathToPattern(t){return escapePosixPath(t)}e.convertPosixPathToPattern=convertPosixPathToPattern},8655:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.removeDuplicateSlashes=e.matchAny=e.convertPatternsToRe=e.makeRe=e.getPatternParts=e.expandBraceExpansion=e.expandPatternsWithBraceExpansion=e.isAffectDepthOfReadingPattern=e.endsWithSlashGlobStar=e.hasGlobStar=e.getBaseDirectory=e.isPatternRelatedToParentDirectory=e.getPatternsOutsideCurrentDirectory=e.getPatternsInsideCurrentDirectory=e.getPositivePatterns=e.getNegativePatterns=e.isPositivePattern=e.isNegativePattern=e.convertToNegativePattern=e.convertToPositivePattern=e.isDynamicPattern=e.isStaticPattern=void 0;const s=r(1017);const i=r(7058);const n=r(9015);const o="**";const a="\\";const l=/[*?]|^!/;const u=/\[[^[]*]/;const c=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;const h=/[!*+?@]\([^(]*\)/;const d=/,|\.\./;const f=/(?!^)\/{2,}/g;function isStaticPattern(t,e={}){return!isDynamicPattern(t,e)}e.isStaticPattern=isStaticPattern;function isDynamicPattern(t,e={}){if(t===""){return false}if(e.caseSensitiveMatch===false||t.includes(a)){return true}if(l.test(t)||u.test(t)||c.test(t)){return true}if(e.extglob!==false&&h.test(t)){return true}if(e.braceExpansion!==false&&hasBraceExpansion(t)){return true}return false}e.isDynamicPattern=isDynamicPattern;function hasBraceExpansion(t){const e=t.indexOf("{");if(e===-1){return false}const r=t.indexOf("}",e+1);if(r===-1){return false}const s=t.slice(e,r);return d.test(s)}function convertToPositivePattern(t){return isNegativePattern(t)?t.slice(1):t}e.convertToPositivePattern=convertToPositivePattern;function convertToNegativePattern(t){return"!"+t}e.convertToNegativePattern=convertToNegativePattern;function isNegativePattern(t){return t.startsWith("!")&&t[1]!=="("}e.isNegativePattern=isNegativePattern;function isPositivePattern(t){return!isNegativePattern(t)}e.isPositivePattern=isPositivePattern;function getNegativePatterns(t){return t.filter(isNegativePattern)}e.getNegativePatterns=getNegativePatterns;function getPositivePatterns(t){return t.filter(isPositivePattern)}e.getPositivePatterns=getPositivePatterns;function getPatternsInsideCurrentDirectory(t){return t.filter((t=>!isPatternRelatedToParentDirectory(t)))}e.getPatternsInsideCurrentDirectory=getPatternsInsideCurrentDirectory;function getPatternsOutsideCurrentDirectory(t){return t.filter(isPatternRelatedToParentDirectory)}e.getPatternsOutsideCurrentDirectory=getPatternsOutsideCurrentDirectory;function isPatternRelatedToParentDirectory(t){return t.startsWith("..")||t.startsWith("./..")}e.isPatternRelatedToParentDirectory=isPatternRelatedToParentDirectory;function getBaseDirectory(t){return i(t,{flipBackslashes:false})}e.getBaseDirectory=getBaseDirectory;function hasGlobStar(t){return t.includes(o)}e.hasGlobStar=hasGlobStar;function endsWithSlashGlobStar(t){return t.endsWith("/"+o)}e.endsWithSlashGlobStar=endsWithSlashGlobStar;function isAffectDepthOfReadingPattern(t){const e=s.basename(t);return endsWithSlashGlobStar(t)||isStaticPattern(e)}e.isAffectDepthOfReadingPattern=isAffectDepthOfReadingPattern;function expandPatternsWithBraceExpansion(t){return t.reduce(((t,e)=>t.concat(expandBraceExpansion(e))),[])}e.expandPatternsWithBraceExpansion=expandPatternsWithBraceExpansion;function expandBraceExpansion(t){const e=n.braces(t,{expand:true,nodupes:true});e.sort(((t,e)=>t.length-e.length));return e.filter((t=>t!==""))}e.expandBraceExpansion=expandBraceExpansion;function getPatternParts(t,e){let{parts:r}=n.scan(t,Object.assign(Object.assign({},e),{parts:true}));if(r.length===0){r=[t]}if(r[0].startsWith("/")){r[0]=r[0].slice(1);r.unshift("")}return r}e.getPatternParts=getPatternParts;function makeRe(t,e){return n.makeRe(t,e)}e.makeRe=makeRe;function convertPatternsToRe(t,e){return t.map((t=>makeRe(t,e)))}e.convertPatternsToRe=convertPatternsToRe;function matchAny(t,e){return e.some((e=>e.test(t)))}e.matchAny=matchAny;function removeDuplicateSlashes(t){return t.replace(f,"/")}e.removeDuplicateSlashes=removeDuplicateSlashes},5114:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.merge=void 0;const s=r(2375);function merge(t){const e=s(t);t.forEach((t=>{t.once("error",(t=>e.emit("error",t)))}));e.once("close",(()=>propagateCloseEventToSources(t)));e.once("end",(()=>propagateCloseEventToSources(t)));return e}e.merge=merge;function propagateCloseEventToSources(t){t.forEach((t=>t.emit("close")))}},3050:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.isEmpty=e.isString=void 0;function isString(t){return typeof t==="string"}e.isString=isString;function isEmpty(t){return t===""}e.isEmpty=isEmpty},2696:(t,e,r)=>{"use strict";var s=r(7226);function fastqueue(t,e,r){if(typeof t==="function"){r=e;e=t;t=null}if(!(r>=1)){throw new Error("fastqueue concurrency must be equal to or greater than 1")}var i=s(Task);var n=null;var o=null;var a=0;var l=null;var u={push:push,drain:noop,saturated:noop,pause:pause,paused:false,get concurrency(){return r},set concurrency(t){if(!(t>=1)){throw new Error("fastqueue concurrency must be equal to or greater than 1")}r=t;if(u.paused)return;for(;n&&a<r;){a++;release()}},running:running,resume:resume,idle:idle,length:length,getQueue:getQueue,unshift:unshift,empty:noop,kill:kill,killAndDrain:killAndDrain,error:error};return u;function running(){return a}function pause(){u.paused=true}function length(){var t=n;var e=0;while(t){t=t.next;e++}return e}function getQueue(){var t=n;var e=[];while(t){e.push(t.value);t=t.next}return e}function resume(){if(!u.paused)return;u.paused=false;if(n===null){a++;release();return}for(;n&&a<r;){a++;release()}}function idle(){return a===0&&u.length()===0}function push(s,c){var h=i.get();h.context=t;h.release=release;h.value=s;h.callback=c||noop;h.errorHandler=l;if(a>=r||u.paused){if(o){o.next=h;o=h}else{n=h;o=h;u.saturated()}}else{a++;e.call(t,h.value,h.worked)}}function unshift(s,c){var h=i.get();h.context=t;h.release=release;h.value=s;h.callback=c||noop;h.errorHandler=l;if(a>=r||u.paused){if(n){h.next=n;n=h}else{n=h;o=h;u.saturated()}}else{a++;e.call(t,h.value,h.worked)}}function release(s){if(s){i.release(s)}var l=n;if(l&&a<=r){if(!u.paused){if(o===n){o=null}n=l.next;l.next=null;e.call(t,l.value,l.worked);if(o===null){u.empty()}}else{a--}}else if(--a===0){u.drain()}}function kill(){n=null;o=null;u.drain=noop}function killAndDrain(){n=null;o=null;u.drain();u.drain=noop}function error(t){l=t}}function noop(){}function Task(){this.value=null;this.callback=noop;this.next=null;this.release=noop;this.context=null;this.errorHandler=null;var t=this;this.worked=function worked(e,r){var s=t.callback;var i=t.errorHandler;var n=t.value;t.value=null;t.callback=noop;if(t.errorHandler){i(e,n)}s.call(t.context,e,r);t.release(t)}}function queueAsPromised(t,e,r){if(typeof t==="function"){r=e;e=t;t=null}function asyncWrapper(t,r){e.call(this,t).then((function(t){r(null,t)}),r)}var s=fastqueue(t,asyncWrapper,r);var i=s.push;var n=s.unshift;s.push=push;s.unshift=unshift;s.drained=drained;return s;function push(t){var e=new Promise((function(e,r){i(t,(function(t,s){if(t){r(t);return}e(s)}))}));e.catch(noop);return e}function unshift(t){var e=new Promise((function(e,r){n(t,(function(t,s){if(t){r(t);return}e(s)}))}));e.catch(noop);return e}function drained(){var t=new Promise((function(t){process.nextTick((function(){if(s.idle()){t()}else{var e=s.drain;s.drain=function(){if(typeof e==="function")e();t();s.drain=e}}}))}));return t}}t.exports=fastqueue;t.exports.promise=queueAsPromised},3488:(t,e,r)=>{"use strict";
28
+ */function isSpecificValue(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp?true:false}function cloneSpecificValue(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);t.copy(e);return e}else if(t instanceof Date){return new Date(t.getTime())}else if(t instanceof RegExp){return new RegExp(t)}else{throw new Error("Unexpected situation")}}function deepCloneArray(t){var r=[];t.forEach((function(t,s){if(typeof t==="object"&&t!==null){if(Array.isArray(t)){r[s]=deepCloneArray(t)}else if(isSpecificValue(t)){r[s]=cloneSpecificValue(t)}else{r[s]=e({},t)}}else{r[s]=t}}));return r}function safeGetProperty(t,e){return e==="__proto__"?undefined:t[e]}var e=t.exports=function(){if(arguments.length<1||typeof arguments[0]!=="object"){return false}if(arguments.length<2){return arguments[0]}var t=arguments[0];var r=Array.prototype.slice.call(arguments,1);var s,i,n;r.forEach((function(r){if(typeof r!=="object"||r===null||Array.isArray(r)){return}Object.keys(r).forEach((function(n){i=safeGetProperty(t,n);s=safeGetProperty(r,n);if(s===t){return}else if(typeof s!=="object"||s===null){t[n]=s;return}else if(Array.isArray(s)){t[n]=deepCloneArray(s);return}else if(isSpecificValue(s)){t[n]=cloneSpecificValue(s);return}else if(typeof i!=="object"||i===null||Array.isArray(i)){t[n]=e({},s);return}else{t[n]=e(i,s);return}}))}));return t}},2696:(t,e,r)=>{"use strict";var s=r(7226);function fastqueue(t,e,r){if(typeof t==="function"){r=e;e=t;t=null}if(!(r>=1)){throw new Error("fastqueue concurrency must be equal to or greater than 1")}var i=s(Task);var n=null;var o=null;var a=0;var l=null;var u={push:push,drain:noop,saturated:noop,pause:pause,paused:false,get concurrency(){return r},set concurrency(t){if(!(t>=1)){throw new Error("fastqueue concurrency must be equal to or greater than 1")}r=t;if(u.paused)return;for(;n&&a<r;){a++;release()}},running:running,resume:resume,idle:idle,length:length,getQueue:getQueue,unshift:unshift,empty:noop,kill:kill,killAndDrain:killAndDrain,error:error};return u;function running(){return a}function pause(){u.paused=true}function length(){var t=n;var e=0;while(t){t=t.next;e++}return e}function getQueue(){var t=n;var e=[];while(t){e.push(t.value);t=t.next}return e}function resume(){if(!u.paused)return;u.paused=false;if(n===null){a++;release();return}for(;n&&a<r;){a++;release()}}function idle(){return a===0&&u.length()===0}function push(s,c){var h=i.get();h.context=t;h.release=release;h.value=s;h.callback=c||noop;h.errorHandler=l;if(a>=r||u.paused){if(o){o.next=h;o=h}else{n=h;o=h;u.saturated()}}else{a++;e.call(t,h.value,h.worked)}}function unshift(s,c){var h=i.get();h.context=t;h.release=release;h.value=s;h.callback=c||noop;h.errorHandler=l;if(a>=r||u.paused){if(n){h.next=n;n=h}else{n=h;o=h;u.saturated()}}else{a++;e.call(t,h.value,h.worked)}}function release(s){if(s){i.release(s)}var l=n;if(l&&a<=r){if(!u.paused){if(o===n){o=null}n=l.next;l.next=null;e.call(t,l.value,l.worked);if(o===null){u.empty()}}else{a--}}else if(--a===0){u.drain()}}function kill(){n=null;o=null;u.drain=noop}function killAndDrain(){n=null;o=null;u.drain();u.drain=noop}function error(t){l=t}}function noop(){}function Task(){this.value=null;this.callback=noop;this.next=null;this.release=noop;this.context=null;this.errorHandler=null;var t=this;this.worked=function worked(e,r){var s=t.callback;var i=t.errorHandler;var n=t.value;t.value=null;t.callback=noop;if(t.errorHandler){i(e,n)}s.call(t.context,e,r);t.release(t)}}function queueAsPromised(t,e,r){if(typeof t==="function"){r=e;e=t;t=null}function asyncWrapper(t,r){e.call(this,t).then((function(t){r(null,t)}),r)}var s=fastqueue(t,asyncWrapper,r);var i=s.push;var n=s.unshift;s.push=push;s.unshift=unshift;s.drained=drained;return s;function push(t){var e=new Promise((function(e,r){i(t,(function(t,s){if(t){r(t);return}e(s)}))}));e.catch(noop);return e}function unshift(t){var e=new Promise((function(e,r){n(t,(function(t,s){if(t){r(t);return}e(s)}))}));e.catch(noop);return e}function drained(){var t=new Promise((function(t){process.nextTick((function(){if(s.idle()){t()}else{var e=s.drain;s.drain=function(){if(typeof e==="function")e();t();s.drain=e}}}))}));return t}}t.exports=fastqueue;t.exports.promise=queueAsPromised},3488:(t,e,r)=>{"use strict";
29
29
  /*!
30
30
  * fill-range <https://github.com/jonschlinkert/fill-range>
31
31
  *
@@ -51,7 +51,7 @@ var s=r(6546);var i={"{":"}","(":")","[":"]"};var strictCheck=function(t){if(t[0
51
51
  *
52
52
  * Copyright (c) 2014-present, Jon Schlinkert.
53
53
  * Released under the MIT License.
54
- */t.exports=function(t){if(typeof t==="number"){return t-t===0}if(typeof t==="string"&&t.trim()!==""){return Number.isFinite?Number.isFinite(+t):isFinite(+t)}return false}},228:(t,e,r)=>{var s=r(7147);var i;if(process.platform==="win32"||global.TESTING_WINDOWS){i=r(7214)}else{i=r(5211)}t.exports=isexe;isexe.sync=sync;function isexe(t,e,r){if(typeof e==="function"){r=e;e={}}if(!r){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(r,s){isexe(t,e||{},(function(t,e){if(t){s(t)}else{r(e)}}))}))}i(t,e||{},(function(t,s){if(t){if(t.code==="EACCES"||e&&e.ignoreErrors){t=null;s=false}}r(t,s)}))}function sync(t,e){try{return i.sync(t,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES"){return false}else{throw t}}}},5211:(t,e,r)=>{t.exports=isexe;isexe.sync=sync;var s=r(7147);function isexe(t,e,r){s.stat(t,(function(t,s){r(t,t?false:checkStat(s,e))}))}function sync(t,e){return checkStat(s.statSync(t),e)}function checkStat(t,e){return t.isFile()&&checkMode(t,e)}function checkMode(t,e){var r=t.mode;var s=t.uid;var i=t.gid;var n=e.uid!==undefined?e.uid:process.getuid&&process.getuid();var o=e.gid!==undefined?e.gid:process.getgid&&process.getgid();var a=parseInt("100",8);var l=parseInt("010",8);var u=parseInt("001",8);var c=a|l;var h=r&u||r&l&&i===o||r&a&&s===n||r&c&&n===0;return h}},7214:(t,e,r)=>{t.exports=isexe;isexe.sync=sync;var s=r(7147);function checkPathExt(t,e){var r=e.pathExt!==undefined?e.pathExt:process.env.PATHEXT;if(!r){return true}r=r.split(";");if(r.indexOf("")!==-1){return true}for(var s=0;s<r.length;s++){var i=r[s].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i){return true}}return false}function checkStat(t,e,r){if(!t.isSymbolicLink()&&!t.isFile()){return false}return checkPathExt(e,r)}function isexe(t,e,r){s.stat(t,(function(s,i){r(s,s?false:checkStat(i,t,e))}))}function sync(t,e){return checkStat(s.statSync(t),t,e)}},9439:t=>{"use strict";const{FORCE_COLOR:e,NODE_DISABLE_COLORS:r,TERM:s}=process.env;const i={enabled:!r&&s!=="dumb"&&e!=="0",reset:init(0,0),bold:init(1,22),dim:init(2,22),italic:init(3,23),underline:init(4,24),inverse:init(7,27),hidden:init(8,28),strikethrough:init(9,29),black:init(30,39),red:init(31,39),green:init(32,39),yellow:init(33,39),blue:init(34,39),magenta:init(35,39),cyan:init(36,39),white:init(37,39),gray:init(90,39),grey:init(90,39),bgBlack:init(40,49),bgRed:init(41,49),bgGreen:init(42,49),bgYellow:init(43,49),bgBlue:init(44,49),bgMagenta:init(45,49),bgCyan:init(46,49),bgWhite:init(47,49)};function run(t,e){let r=0,s,i="",n="";for(;r<t.length;r++){s=t[r];i+=s.open;n+=s.close;if(e.includes(s.close)){e=e.replace(s.rgx,s.close+s.open)}}return i+e+n}function chain(t,e){let r={has:t,keys:e};r.reset=i.reset.bind(r);r.bold=i.bold.bind(r);r.dim=i.dim.bind(r);r.italic=i.italic.bind(r);r.underline=i.underline.bind(r);r.inverse=i.inverse.bind(r);r.hidden=i.hidden.bind(r);r.strikethrough=i.strikethrough.bind(r);r.black=i.black.bind(r);r.red=i.red.bind(r);r.green=i.green.bind(r);r.yellow=i.yellow.bind(r);r.blue=i.blue.bind(r);r.magenta=i.magenta.bind(r);r.cyan=i.cyan.bind(r);r.white=i.white.bind(r);r.gray=i.gray.bind(r);r.grey=i.grey.bind(r);r.bgBlack=i.bgBlack.bind(r);r.bgRed=i.bgRed.bind(r);r.bgGreen=i.bgGreen.bind(r);r.bgYellow=i.bgYellow.bind(r);r.bgBlue=i.bgBlue.bind(r);r.bgMagenta=i.bgMagenta.bind(r);r.bgCyan=i.bgCyan.bind(r);r.bgWhite=i.bgWhite.bind(r);return r}function init(t,e){let r={open:`[${t}m`,close:`[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(e){if(this!==void 0&&this.has!==void 0){this.has.includes(t)||(this.has.push(t),this.keys.push(r));return e===void 0?this:i.enabled?run(this.keys,e+""):e+""}return e===void 0?chain([t],[r]):i.enabled?run([r],e+""):e+""}}t.exports=i},2375:(t,e,r)=>{"use strict";const s=r(2781);const i=s.PassThrough;const n=Array.prototype.slice;t.exports=merge2;function merge2(){const t=[];const e=n.call(arguments);let r=false;let s=e[e.length-1];if(s&&!Array.isArray(s)&&s.pipe==null){e.pop()}else{s={}}const o=s.end!==false;const a=s.pipeError===true;if(s.objectMode==null){s.objectMode=true}if(s.highWaterMark==null){s.highWaterMark=64*1024}const l=i(s);function addStream(){for(let e=0,r=arguments.length;e<r;e++){t.push(pauseStreams(arguments[e],s))}mergeStream();return this}function mergeStream(){if(r){return}r=true;let e=t.shift();if(!e){process.nextTick(endStream);return}if(!Array.isArray(e)){e=[e]}let s=e.length+1;function next(){if(--s>0){return}r=false;mergeStream()}function pipe(t){function onend(){t.removeListener("merge2UnpipeEnd",onend);t.removeListener("end",onend);if(a){t.removeListener("error",onerror)}next()}function onerror(t){l.emit("error",t)}if(t._readableState.endEmitted){return next()}t.on("merge2UnpipeEnd",onend);t.on("end",onend);if(a){t.on("error",onerror)}t.pipe(l,{end:false});t.resume()}for(let t=0;t<e.length;t++){pipe(e[t])}next()}function endStream(){r=false;l.emit("queueDrain");if(o){l.end()}}l.setMaxListeners(0);l.add=addStream;l.on("unpipe",(function(t){t.emit("merge2UnpipeEnd")}));if(e.length){addStream.apply(null,e)}return l}function pauseStreams(t,e){if(!Array.isArray(t)){if(!t._readableState&&t.pipe){t=t.pipe(i(e))}if(!t._readableState||!t.pause||!t.pipe){throw new Error("Only readable stream can be merged.")}t.pause()}else{for(let r=0,s=t.length;r<s;r++){t[r]=pauseStreams(t[r],e)}}return t}},9015:(t,e,r)=>{"use strict";const s=r(3837);const i=r(538);const n=r(9138);const o=r(2924);const isEmptyString=t=>t===""||t==="./";const hasBraces=t=>{const e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1};const micromatch=(t,e,r)=>{e=[].concat(e);t=[].concat(t);let s=new Set;let i=new Set;let o=new Set;let a=0;let onResult=t=>{o.add(t.output);if(r&&r.onResult){r.onResult(t)}};for(let o=0;o<e.length;o++){let l=n(String(e[o]),{...r,onResult:onResult},true);let u=l.state.negated||l.state.negatedExtglob;if(u)a++;for(let e of t){let t=l(e,true);let r=u?!t.isMatch:t.isMatch;if(!r)continue;if(u){s.add(t.output)}else{s.delete(t.output);i.add(t.output)}}}let l=a===e.length?[...o]:[...i];let u=l.filter((t=>!s.has(t)));if(r&&u.length===0){if(r.failglob===true){throw new Error(`No matches found for "${e.join(", ")}"`)}if(r.nonull===true||r.nullglob===true){return r.unescape?e.map((t=>t.replace(/\\/g,""))):e}}return u};micromatch.match=micromatch;micromatch.matcher=(t,e)=>n(t,e);micromatch.isMatch=(t,e,r)=>n(e,r)(t);micromatch.any=micromatch.isMatch;micromatch.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set;let i=[];let onResult=t=>{if(r.onResult)r.onResult(t);i.push(t.output)};let n=new Set(micromatch(t,e,{...r,onResult:onResult}));for(let t of i){if(!n.has(t)){s.add(t)}}return[...s]};micromatch.contains=(t,e,r)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${s.inspect(t)}"`)}if(Array.isArray(e)){return e.some((e=>micromatch.contains(t,e,r)))}if(typeof e==="string"){if(isEmptyString(t)||isEmptyString(e)){return false}if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e)){return true}}return micromatch.isMatch(t,e,{...r,contains:true})};micromatch.matchKeys=(t,e,r)=>{if(!o.isObject(t)){throw new TypeError("Expected the first argument to be an object")}let s=micromatch(Object.keys(t),e,r);let i={};for(let e of s)i[e]=t[e];return i};micromatch.some=(t,e,r)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),r);if(s.some((t=>e(t)))){return true}}return false};micromatch.every=(t,e,r)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),r);if(!s.every((t=>e(t)))){return false}}return true};micromatch.all=(t,e,r)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${s.inspect(t)}"`)}return[].concat(e).every((e=>n(e,r)(t)))};micromatch.capture=(t,e,r)=>{let s=o.isWindows(r);let i=n.makeRe(String(t),{...r,capture:true});let a=i.exec(s?o.toPosixSlashes(e):e);if(a){return a.slice(1).map((t=>t===void 0?"":t))}};micromatch.makeRe=(...t)=>n.makeRe(...t);micromatch.scan=(...t)=>n.scan(...t);micromatch.parse=(t,e)=>{let r=[];for(let s of[].concat(t||[])){for(let t of i(String(s),e)){r.push(n.parse(t,e))}}return r};micromatch.braces=(t,e)=>{if(typeof t!=="string")throw new TypeError("Expected a string");if(e&&e.nobrace===true||!hasBraces(t)){return[t]}return i(t,e)};micromatch.braceExpand=(t,e)=>{if(typeof t!=="string")throw new TypeError("Expected a string");return micromatch.braces(t,{...e,expand:true})};micromatch.hasBraces=hasBraces;t.exports=micromatch},5912:t=>{"use strict";function hasKey(t,e){var r=t;e.slice(0,-1).forEach((function(t){r=r[t]||{}}));var s=e[e.length-1];return s in r}function isNumber(t){if(typeof t==="number"){return true}if(/^0x[0-9a-f]+$/i.test(t)){return true}return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function isConstructorOrProto(t,e){return e==="constructor"&&typeof t[e]==="function"||e==="__proto__"}t.exports=function(t,e){if(!e){e={}}var r={bools:{},strings:{},unknownFn:null};if(typeof e.unknown==="function"){r.unknownFn=e.unknown}if(typeof e.boolean==="boolean"&&e.boolean){r.allBools=true}else{[].concat(e.boolean).filter(Boolean).forEach((function(t){r.bools[t]=true}))}var s={};function aliasIsBoolean(t){return s[t].some((function(t){return r.bools[t]}))}Object.keys(e.alias||{}).forEach((function(t){s[t]=[].concat(e.alias[t]);s[t].forEach((function(e){s[e]=[t].concat(s[t].filter((function(t){return e!==t})))}))}));[].concat(e.string).filter(Boolean).forEach((function(t){r.strings[t]=true;if(s[t]){[].concat(s[t]).forEach((function(t){r.strings[t]=true}))}}));var i=e.default||{};var n={_:[]};function argDefined(t,e){return r.allBools&&/^--[^=]+$/.test(e)||r.strings[t]||r.bools[t]||s[t]}function setKey(t,e,s){var i=t;for(var n=0;n<e.length-1;n++){var o=e[n];if(isConstructorOrProto(i,o)){return}if(i[o]===undefined){i[o]={}}if(i[o]===Object.prototype||i[o]===Number.prototype||i[o]===String.prototype){i[o]={}}if(i[o]===Array.prototype){i[o]=[]}i=i[o]}var a=e[e.length-1];if(isConstructorOrProto(i,a)){return}if(i===Object.prototype||i===Number.prototype||i===String.prototype){i={}}if(i===Array.prototype){i=[]}if(i[a]===undefined||r.bools[a]||typeof i[a]==="boolean"){i[a]=s}else if(Array.isArray(i[a])){i[a].push(s)}else{i[a]=[i[a],s]}}function setArg(t,e,i){if(i&&r.unknownFn&&!argDefined(t,i)){if(r.unknownFn(i)===false){return}}var o=!r.strings[t]&&isNumber(e)?Number(e):e;setKey(n,t.split("."),o);(s[t]||[]).forEach((function(t){setKey(n,t.split("."),o)}))}Object.keys(r.bools).forEach((function(t){setArg(t,i[t]===undefined?false:i[t])}));var o=[];if(t.indexOf("--")!==-1){o=t.slice(t.indexOf("--")+1);t=t.slice(0,t.indexOf("--"))}for(var a=0;a<t.length;a++){var l=t[a];var u;var c;if(/^--.+=/.test(l)){var h=l.match(/^--([^=]+)=([\s\S]*)$/);u=h[1];var d=h[2];if(r.bools[u]){d=d!=="false"}setArg(u,d,l)}else if(/^--no-.+/.test(l)){u=l.match(/^--no-(.+)/)[1];setArg(u,false,l)}else if(/^--.+/.test(l)){u=l.match(/^--(.+)/)[1];c=t[a+1];if(c!==undefined&&!/^(-|--)[^-]/.test(c)&&!r.bools[u]&&!r.allBools&&(s[u]?!aliasIsBoolean(u):true)){setArg(u,c,l);a+=1}else if(/^(true|false)$/.test(c)){setArg(u,c==="true",l);a+=1}else{setArg(u,r.strings[u]?"":true,l)}}else if(/^-[^-]+/.test(l)){var f=l.slice(1,-1).split("");var p=false;for(var g=0;g<f.length;g++){c=l.slice(g+2);if(c==="-"){setArg(f[g],c,l);continue}if(/[A-Za-z]/.test(f[g])&&c[0]==="="){setArg(f[g],c.slice(1),l);p=true;break}if(/[A-Za-z]/.test(f[g])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(c)){setArg(f[g],c,l);p=true;break}if(f[g+1]&&f[g+1].match(/\W/)){setArg(f[g],l.slice(g+2),l);p=true;break}else{setArg(f[g],r.strings[f[g]]?"":true,l)}}u=l.slice(-1)[0];if(!p&&u!=="-"){if(t[a+1]&&!/^(-|--)[^-]/.test(t[a+1])&&!r.bools[u]&&(s[u]?!aliasIsBoolean(u):true)){setArg(u,t[a+1],l);a+=1}else if(t[a+1]&&/^(true|false)$/.test(t[a+1])){setArg(u,t[a+1]==="true",l);a+=1}else{setArg(u,r.strings[u]?"":true,l)}}}else{if(!r.unknownFn||r.unknownFn(l)!==false){n._.push(r.strings._||!isNumber(l)?l:Number(l))}if(e.stopEarly){n._.push.apply(n._,t.slice(a+1));break}}}Object.keys(i).forEach((function(t){if(!hasKey(n,t.split("."))){setKey(n,t.split("."),i[t]);(s[t]||[]).forEach((function(e){setKey(n,e.split("."),i[t])}))}}));if(e["--"]){n["--"]=o.slice()}else{o.forEach((function(t){n._.push(t)}))}return n}},2170:t=>{"use strict";const pathKey=(t={})=>{const e=t.env||process.env;const r=t.platform||process.platform;if(r!=="win32"){return"PATH"}return Object.keys(e).reverse().find((t=>t.toUpperCase()==="PATH"))||"Path"};t.exports=pathKey;t.exports["default"]=pathKey},9397:(t,e,r)=>{let s=r(6224);let i=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||s.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env);let formatter=(t,e,r=t)=>s=>{let i=""+s;let n=i.indexOf(e,t.length);return~n?t+replaceClose(i,e,r,n)+e:t+i+e};let replaceClose=(t,e,r,s)=>{let i=t.substring(0,s)+r;let n=t.substring(s+e.length);let o=n.indexOf(e);return~o?i+replaceClose(n,e,r,o):i+n};let createColors=(t=i)=>({isColorSupported:t,reset:t?t=>`${t}`:String,bold:t?formatter("","",""):String,dim:t?formatter("","",""):String,italic:t?formatter("",""):String,underline:t?formatter("",""):String,inverse:t?formatter("",""):String,hidden:t?formatter("",""):String,strikethrough:t?formatter("",""):String,black:t?formatter("",""):String,red:t?formatter("",""):String,green:t?formatter("",""):String,yellow:t?formatter("",""):String,blue:t?formatter("",""):String,magenta:t?formatter("",""):String,cyan:t?formatter("",""):String,white:t?formatter("",""):String,gray:t?formatter("",""):String,bgBlack:t?formatter("",""):String,bgRed:t?formatter("",""):String,bgGreen:t?formatter("",""):String,bgYellow:t?formatter("",""):String,bgBlue:t?formatter("",""):String,bgMagenta:t?formatter("",""):String,bgCyan:t?formatter("",""):String,bgWhite:t?formatter("",""):String});t.exports=createColors();t.exports.createColors=createColors},9138:(t,e,r)=>{"use strict";t.exports=r(4755)},8223:(t,e,r)=>{"use strict";const s=r(1017);const i="\\\\/";const n=`[^${i}]`;const o="\\.";const a="\\+";const l="\\?";const u="\\/";const c="(?=.)";const h="[^/]";const d=`(?:${u}|$)`;const f=`(?:^|${u})`;const p=`${o}{1,2}${d}`;const g=`(?!${o})`;const m=`(?!${f}${p})`;const y=`(?!${o}{0,1}${d})`;const v=`(?!${p})`;const b=`[^.${u}]`;const _=`${h}*?`;const S={DOT_LITERAL:o,PLUS_LITERAL:a,QMARK_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:c,QMARK:h,END_ANCHOR:d,DOTS_SLASH:p,NO_DOT:g,NO_DOTS:m,NO_DOT_SLASH:y,NO_DOTS_SLASH:v,QMARK_NO_DOT:b,STAR:_,START_ANCHOR:f};const w={...S,SLASH_LITERAL:`[${i}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${o}{1,2}(?:[${i}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${i}])${o}{1,2}(?:[${i}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${i}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${i}]|$))`,QMARK_NO_DOT:`[^.${i}]`,START_ANCHOR:`(?:^|[${i}])`,END_ANCHOR:`(?:[${i}]|$)`};const x={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:x,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:s.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===true?w:S}}},1833:(t,e,r)=>{"use strict";const s=r(8223);const i=r(2924);const{MAX_LENGTH:n,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:l,REPLACEMENTS:u}=s;const expandRange=(t,e)=>{if(typeof e.expandRange==="function"){return e.expandRange(...t,e)}t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch(e){return t.map((t=>i.escapeRegex(t))).join("..")}return r};const syntaxError=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`;const parse=(t,e)=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}t=u[t]||t;const r={...e};const c=typeof r.maxLength==="number"?Math.min(n,r.maxLength):n;let h=t.length;if(h>c){throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${c}`)}const d={type:"bos",value:"",output:r.prepend||""};const f=[d];const p=r.capture?"":"?:";const g=i.isWindows(e);const m=s.globChars(g);const y=s.extglobChars(m);const{DOT_LITERAL:v,PLUS_LITERAL:b,SLASH_LITERAL:_,ONE_CHAR:S,DOTS_SLASH:w,NO_DOT:x,NO_DOT_SLASH:P,NO_DOTS_SLASH:E,QMARK:A,QMARK_NO_DOT:C,STAR:R,START_ANCHOR:k}=m;const globstar=t=>`(${p}(?:(?!${k}${t.dot?w:v}).)*?)`;const O=r.dot?"":x;const T=r.dot?A:C;let $=r.bash===true?globstar(r):R;if(r.capture){$=`(${$})`}if(typeof r.noext==="boolean"){r.noextglob=r.noext}const M={input:t,index:-1,start:0,dot:r.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:f};t=i.removePrefix(t,M);h=t.length;const D=[];const L=[];const F=[];let I=d;let H;const eos=()=>M.index===h-1;const N=M.peek=(e=1)=>t[M.index+e];const j=M.advance=()=>t[++M.index]||"";const remaining=()=>t.slice(M.index+1);const consume=(t="",e=0)=>{M.consumed+=t;M.index+=e};const append=t=>{M.output+=t.output!=null?t.output:t.value;consume(t.value)};const negate=()=>{let t=1;while(N()==="!"&&(N(2)!=="("||N(3)==="?")){j();M.start++;t++}if(t%2===0){return false}M.negated=true;M.start++;return true};const increment=t=>{M[t]++;F.push(t)};const decrement=t=>{M[t]--;F.pop()};const push=t=>{if(I.type==="globstar"){const e=M.braces>0&&(t.type==="comma"||t.type==="brace");const r=t.extglob===true||D.length&&(t.type==="pipe"||t.type==="paren");if(t.type!=="slash"&&t.type!=="paren"&&!e&&!r){M.output=M.output.slice(0,-I.output.length);I.type="star";I.value="*";I.output=$;M.output+=I.output}}if(D.length&&t.type!=="paren"){D[D.length-1].inner+=t.value}if(t.value||t.output)append(t);if(I&&I.type==="text"&&t.type==="text"){I.value+=t.value;I.output=(I.output||"")+t.value;return}t.prev=I;f.push(t);I=t};const extglobOpen=(t,e)=>{const s={...y[e],conditions:1,inner:""};s.prev=I;s.parens=M.parens;s.output=M.output;const i=(r.capture?"(":"")+s.open;increment("parens");push({type:t,value:e,output:M.output?"":S});push({type:"paren",extglob:true,value:j(),output:i});D.push(s)};const extglobClose=t=>{let s=t.close+(r.capture?")":"");let i;if(t.type==="negate"){let n=$;if(t.inner&&t.inner.length>1&&t.inner.includes("/")){n=globstar(r)}if(n!==$||eos()||/^\)+$/.test(remaining())){s=t.close=`)$))${n}`}if(t.inner.includes("*")&&(i=remaining())&&/^\.[^\\/.]+$/.test(i)){const r=parse(i,{...e,fastpaths:false}).output;s=t.close=`)${r})${n})`}if(t.prev.type==="bos"){M.negatedExtglob=true}}push({type:"paren",extglob:true,value:H,output:s});decrement("parens")};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let s=false;let n=t.replace(l,((t,e,r,i,n,o)=>{if(i==="\\"){s=true;return t}if(i==="?"){if(e){return e+i+(n?A.repeat(n.length):"")}if(o===0){return T+(n?A.repeat(n.length):"")}return A.repeat(r.length)}if(i==="."){return v.repeat(r.length)}if(i==="*"){if(e){return e+i+(n?$:"")}return $}return e?t:`\\${t}`}));if(s===true){if(r.unescape===true){n=n.replace(/\\/g,"")}else{n=n.replace(/\\+/g,(t=>t.length%2===0?"\\\\":t?"\\":""))}}if(n===t&&r.contains===true){M.output=t;return M}M.output=i.wrapOutput(n,M,e);return M}while(!eos()){H=j();if(H==="\0"){continue}if(H==="\\"){const t=N();if(t==="/"&&r.bash!==true){continue}if(t==="."||t===";"){continue}if(!t){H+="\\";push({type:"text",value:H});continue}const e=/^\\+/.exec(remaining());let s=0;if(e&&e[0].length>2){s=e[0].length;M.index+=s;if(s%2!==0){H+="\\"}}if(r.unescape===true){H=j()}else{H+=j()}if(M.brackets===0){push({type:"text",value:H});continue}}if(M.brackets>0&&(H!=="]"||I.value==="["||I.value==="[^")){if(r.posix!==false&&H===":"){const t=I.value.slice(1);if(t.includes("[")){I.posix=true;if(t.includes(":")){const t=I.value.lastIndexOf("[");const e=I.value.slice(0,t);const r=I.value.slice(t+2);const s=o[r];if(s){I.value=e+s;M.backtrack=true;j();if(!d.output&&f.indexOf(I)===1){d.output=S}continue}}}}if(H==="["&&N()!==":"||H==="-"&&N()==="]"){H=`\\${H}`}if(H==="]"&&(I.value==="["||I.value==="[^")){H=`\\${H}`}if(r.posix===true&&H==="!"&&I.value==="["){H="^"}I.value+=H;append({value:H});continue}if(M.quotes===1&&H!=='"'){H=i.escapeRegex(H);I.value+=H;append({value:H});continue}if(H==='"'){M.quotes=M.quotes===1?0:1;if(r.keepQuotes===true){push({type:"text",value:H})}continue}if(H==="("){increment("parens");push({type:"paren",value:H});continue}if(H===")"){if(M.parens===0&&r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const t=D[D.length-1];if(t&&M.parens===t.parens+1){extglobClose(D.pop());continue}push({type:"paren",value:H,output:M.parens?")":"\\)"});decrement("parens");continue}if(H==="["){if(r.nobracket===true||!remaining().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}H=`\\${H}`}else{increment("brackets")}push({type:"bracket",value:H});continue}if(H==="]"){if(r.nobracket===true||I&&I.type==="bracket"&&I.value.length===1){push({type:"text",value:H,output:`\\${H}`});continue}if(M.brackets===0){if(r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:H,output:`\\${H}`});continue}decrement("brackets");const t=I.value.slice(1);if(I.posix!==true&&t[0]==="^"&&!t.includes("/")){H=`/${H}`}I.value+=H;append({value:H});if(r.literalBrackets===false||i.hasRegexChars(t)){continue}const e=i.escapeRegex(I.value);M.output=M.output.slice(0,-I.value.length);if(r.literalBrackets===true){M.output+=e;I.value=e;continue}I.value=`(${p}${e}|${I.value})`;M.output+=I.value;continue}if(H==="{"&&r.nobrace!==true){increment("braces");const t={type:"brace",value:H,output:"(",outputIndex:M.output.length,tokensIndex:M.tokens.length};L.push(t);push(t);continue}if(H==="}"){const t=L[L.length-1];if(r.nobrace===true||!t){push({type:"text",value:H,output:H});continue}let e=")";if(t.dots===true){const t=f.slice();const s=[];for(let e=t.length-1;e>=0;e--){f.pop();if(t[e].type==="brace"){break}if(t[e].type!=="dots"){s.unshift(t[e].value)}}e=expandRange(s,r);M.backtrack=true}if(t.comma!==true&&t.dots!==true){const r=M.output.slice(0,t.outputIndex);const s=M.tokens.slice(t.tokensIndex);t.value=t.output="\\{";H=e="\\}";M.output=r;for(const t of s){M.output+=t.output||t.value}}push({type:"brace",value:H,output:e});decrement("braces");L.pop();continue}if(H==="|"){if(D.length>0){D[D.length-1].conditions++}push({type:"text",value:H});continue}if(H===","){let t=H;const e=L[L.length-1];if(e&&F[F.length-1]==="braces"){e.comma=true;t="|"}push({type:"comma",value:H,output:t});continue}if(H==="/"){if(I.type==="dot"&&M.index===M.start+1){M.start=M.index+1;M.consumed="";M.output="";f.pop();I=d;continue}push({type:"slash",value:H,output:_});continue}if(H==="."){if(M.braces>0&&I.type==="dot"){if(I.value===".")I.output=v;const t=L[L.length-1];I.type="dots";I.output+=H;I.value+=H;t.dots=true;continue}if(M.braces+M.parens===0&&I.type!=="bos"&&I.type!=="slash"){push({type:"text",value:H,output:v});continue}push({type:"dot",value:H,output:v});continue}if(H==="?"){const t=I&&I.value==="(";if(!t&&r.noextglob!==true&&N()==="("&&N(2)!=="?"){extglobOpen("qmark",H);continue}if(I&&I.type==="paren"){const t=N();let e=H;if(t==="<"&&!i.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(I.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(remaining())){e=`\\${H}`}push({type:"text",value:H,output:e});continue}if(r.dot!==true&&(I.type==="slash"||I.type==="bos")){push({type:"qmark",value:H,output:C});continue}push({type:"qmark",value:H,output:A});continue}if(H==="!"){if(r.noextglob!==true&&N()==="("){if(N(2)!=="?"||!/[!=<:]/.test(N(3))){extglobOpen("negate",H);continue}}if(r.nonegate!==true&&M.index===0){negate();continue}}if(H==="+"){if(r.noextglob!==true&&N()==="("&&N(2)!=="?"){extglobOpen("plus",H);continue}if(I&&I.value==="("||r.regex===false){push({type:"plus",value:H,output:b});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||M.parens>0){push({type:"plus",value:H});continue}push({type:"plus",value:b});continue}if(H==="@"){if(r.noextglob!==true&&N()==="("&&N(2)!=="?"){push({type:"at",extglob:true,value:H,output:""});continue}push({type:"text",value:H});continue}if(H!=="*"){if(H==="$"||H==="^"){H=`\\${H}`}const t=a.exec(remaining());if(t){H+=t[0];M.index+=t[0].length}push({type:"text",value:H});continue}if(I&&(I.type==="globstar"||I.star===true)){I.type="star";I.star=true;I.value+=H;I.output=$;M.backtrack=true;M.globstar=true;consume(H);continue}let e=remaining();if(r.noextglob!==true&&/^\([^?]/.test(e)){extglobOpen("star",H);continue}if(I.type==="star"){if(r.noglobstar===true){consume(H);continue}const s=I.prev;const i=s.prev;const n=s.type==="slash"||s.type==="bos";const o=i&&(i.type==="star"||i.type==="globstar");if(r.bash===true&&(!n||e[0]&&e[0]!=="/")){push({type:"star",value:H,output:""});continue}const a=M.braces>0&&(s.type==="comma"||s.type==="brace");const l=D.length&&(s.type==="pipe"||s.type==="paren");if(!n&&s.type!=="paren"&&!a&&!l){push({type:"star",value:H,output:""});continue}while(e.slice(0,3)==="/**"){const r=t[M.index+4];if(r&&r!=="/"){break}e=e.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){I.type="globstar";I.value+=H;I.output=globstar(r);M.output=I.output;M.globstar=true;consume(H);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!o&&eos()){M.output=M.output.slice(0,-(s.output+I.output).length);s.output=`(?:${s.output}`;I.type="globstar";I.output=globstar(r)+(r.strictSlashes?")":"|$)");I.value+=H;M.globstar=true;M.output+=s.output+I.output;consume(H);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&e[0]==="/"){const t=e[1]!==void 0?"|$":"";M.output=M.output.slice(0,-(s.output+I.output).length);s.output=`(?:${s.output}`;I.type="globstar";I.output=`${globstar(r)}${_}|${_}${t})`;I.value+=H;M.output+=s.output+I.output;M.globstar=true;consume(H+j());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&e[0]==="/"){I.type="globstar";I.value+=H;I.output=`(?:^|${_}|${globstar(r)}${_})`;M.output=I.output;M.globstar=true;consume(H+j());push({type:"slash",value:"/",output:""});continue}M.output=M.output.slice(0,-I.output.length);I.type="globstar";I.output=globstar(r);I.value+=H;M.output+=I.output;M.globstar=true;consume(H);continue}const s={type:"star",value:H,output:$};if(r.bash===true){s.output=".*?";if(I.type==="bos"||I.type==="slash"){s.output=O+s.output}push(s);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&r.regex===true){s.output=H;push(s);continue}if(M.index===M.start||I.type==="slash"||I.type==="dot"){if(I.type==="dot"){M.output+=P;I.output+=P}else if(r.dot===true){M.output+=E;I.output+=E}else{M.output+=O;I.output+=O}if(N()!=="*"){M.output+=S;I.output+=S}}push(s)}while(M.brackets>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));M.output=i.escapeLast(M.output,"[");decrement("brackets")}while(M.parens>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));M.output=i.escapeLast(M.output,"(");decrement("parens")}while(M.braces>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));M.output=i.escapeLast(M.output,"{");decrement("braces")}if(r.strictSlashes!==true&&(I.type==="star"||I.type==="bracket")){push({type:"maybe_slash",value:"",output:`${_}?`})}if(M.backtrack===true){M.output="";for(const t of M.tokens){M.output+=t.output!=null?t.output:t.value;if(t.suffix){M.output+=t.suffix}}}return M};parse.fastpaths=(t,e)=>{const r={...e};const o=typeof r.maxLength==="number"?Math.min(n,r.maxLength):n;const a=t.length;if(a>o){throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`)}t=u[t]||t;const l=i.isWindows(e);const{DOT_LITERAL:c,SLASH_LITERAL:h,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:g,NO_DOTS_SLASH:m,STAR:y,START_ANCHOR:v}=s.globChars(l);const b=r.dot?g:p;const _=r.dot?m:p;const S=r.capture?"":"?:";const w={negated:false,prefix:""};let x=r.bash===true?".*?":y;if(r.capture){x=`(${x})`}const globstar=t=>{if(t.noglobstar===true)return x;return`(${S}(?:(?!${v}${t.dot?f:c}).)*?)`};const create=t=>{switch(t){case"*":return`${b}${d}${x}`;case".*":return`${c}${d}${x}`;case"*.*":return`${b}${x}${c}${d}${x}`;case"*/*":return`${b}${x}${h}${d}${_}${x}`;case"**":return b+globstar(r);case"**/*":return`(?:${b}${globstar(r)}${h})?${_}${d}${x}`;case"**/*.*":return`(?:${b}${globstar(r)}${h})?${_}${x}${c}${d}${x}`;case"**/.*":return`(?:${b}${globstar(r)}${h})?${c}${d}${x}`;default:{const e=/^(.*?)\.(\w+)$/.exec(t);if(!e)return;const r=create(e[1]);if(!r)return;return r+c+e[2]}}};const P=i.removePrefix(t,w);let E=create(P);if(E&&r.strictSlashes!==true){E+=`${h}?`}return E};t.exports=parse},4755:(t,e,r)=>{"use strict";const s=r(1017);const i=r(2017);const n=r(1833);const o=r(2924);const a=r(8223);const isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);const picomatch=(t,e,r=false)=>{if(Array.isArray(t)){const s=t.map((t=>picomatch(t,e,r)));const arrayMatcher=t=>{for(const e of s){const r=e(t);if(r)return r}return false};return arrayMatcher}const s=isObject(t)&&t.tokens&&t.input;if(t===""||typeof t!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const i=e||{};const n=o.isWindows(e);const a=s?picomatch.compileRe(t,e):picomatch.makeRe(t,e,false,true);const l=a.state;delete a.state;let isIgnored=()=>false;if(i.ignore){const t={...e,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(i.ignore,t,r)}const matcher=(r,s=false)=>{const{isMatch:o,match:u,output:c}=picomatch.test(r,a,e,{glob:t,posix:n});const h={glob:t,state:l,regex:a,posix:n,input:r,output:c,match:u,isMatch:o};if(typeof i.onResult==="function"){i.onResult(h)}if(o===false){h.isMatch=false;return s?h:false}if(isIgnored(r)){if(typeof i.onIgnore==="function"){i.onIgnore(h)}h.isMatch=false;return s?h:false}if(typeof i.onMatch==="function"){i.onMatch(h)}return s?h:true};if(r){matcher.state=l}return matcher};picomatch.test=(t,e,r,{glob:s,posix:i}={})=>{if(typeof t!=="string"){throw new TypeError("Expected input to be a string")}if(t===""){return{isMatch:false,output:""}}const n=r||{};const a=n.format||(i?o.toPosixSlashes:null);let l=t===s;let u=l&&a?a(t):t;if(l===false){u=a?a(t):t;l=u===s}if(l===false||n.capture===true){if(n.matchBase===true||n.basename===true){l=picomatch.matchBase(t,e,r,i)}else{l=e.exec(u)}}return{isMatch:Boolean(l),match:l,output:u}};picomatch.matchBase=(t,e,r,i=o.isWindows(r))=>{const n=e instanceof RegExp?e:picomatch.makeRe(e,r);return n.test(s.basename(t))};picomatch.isMatch=(t,e,r)=>picomatch(e,r)(t);picomatch.parse=(t,e)=>{if(Array.isArray(t))return t.map((t=>picomatch.parse(t,e)));return n(t,{...e,fastpaths:false})};picomatch.scan=(t,e)=>i(t,e);picomatch.compileRe=(t,e,r=false,s=false)=>{if(r===true){return t.output}const i=e||{};const n=i.contains?"":"^";const o=i.contains?"":"$";let a=`${n}(?:${t.output})${o}`;if(t&&t.negated===true){a=`^(?!${a}).*$`}const l=picomatch.toRegex(a,e);if(s===true){l.state=t}return l};picomatch.makeRe=(t,e={},r=false,s=false)=>{if(!t||typeof t!=="string"){throw new TypeError("Expected a non-empty string")}let i={negated:false,fastpaths:true};if(e.fastpaths!==false&&(t[0]==="."||t[0]==="*")){i.output=n.fastpaths(t,e)}if(!i.output){i=n(t,e)}return picomatch.compileRe(i,e,r,s)};picomatch.toRegex=(t,e)=>{try{const r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(t){if(e&&e.debug===true)throw t;return/$^/}};picomatch.constants=a;t.exports=picomatch},2017:(t,e,r)=>{"use strict";const s=r(2924);const{CHAR_ASTERISK:i,CHAR_AT:n,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:l,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:c,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:y,CHAR_RIGHT_SQUARE_BRACKET:v}=r(8223);const isPathSeparator=t=>t===c||t===o;const depth=t=>{if(t.isPrefix!==true){t.depth=t.isGlobstar?Infinity:1}};const scan=(t,e)=>{const r=e||{};const b=t.length-1;const _=r.parts===true||r.scanToEnd===true;const S=[];const w=[];const x=[];let P=t;let E=-1;let A=0;let C=0;let R=false;let k=false;let O=false;let T=false;let $=false;let M=false;let D=false;let L=false;let F=false;let I=false;let H=0;let N;let j;let B={value:"",depth:0,isGlob:false};const eos=()=>E>=b;const peek=()=>P.charCodeAt(E+1);const advance=()=>{N=j;return P.charCodeAt(++E)};while(E<b){j=advance();let t;if(j===o){D=B.backslashes=true;j=advance();if(j===h){M=true}continue}if(M===true||j===h){H++;while(eos()!==true&&(j=advance())){if(j===o){D=B.backslashes=true;advance();continue}if(j===h){H++;continue}if(M!==true&&j===l&&(j=advance())===l){R=B.isBrace=true;O=B.isGlob=true;I=true;if(_===true){continue}break}if(M!==true&&j===a){R=B.isBrace=true;O=B.isGlob=true;I=true;if(_===true){continue}break}if(j===m){H--;if(H===0){M=false;R=B.isBrace=true;I=true;break}}}if(_===true){continue}break}if(j===c){S.push(E);w.push(B);B={value:"",depth:0,isGlob:false};if(I===true)continue;if(N===l&&E===A+1){A+=2;continue}C=E+1;continue}if(r.noext!==true){const t=j===p||j===n||j===i||j===g||j===u;if(t===true&&peek()===d){O=B.isGlob=true;T=B.isExtglob=true;I=true;if(j===u&&E===A){F=true}if(_===true){while(eos()!==true&&(j=advance())){if(j===o){D=B.backslashes=true;j=advance();continue}if(j===y){O=B.isGlob=true;I=true;break}}continue}break}}if(j===i){if(N===i)$=B.isGlobstar=true;O=B.isGlob=true;I=true;if(_===true){continue}break}if(j===g){O=B.isGlob=true;I=true;if(_===true){continue}break}if(j===f){while(eos()!==true&&(t=advance())){if(t===o){D=B.backslashes=true;advance();continue}if(t===v){k=B.isBracket=true;O=B.isGlob=true;I=true;break}}if(_===true){continue}break}if(r.nonegate!==true&&j===u&&E===A){L=B.negated=true;A++;continue}if(r.noparen!==true&&j===d){O=B.isGlob=true;if(_===true){while(eos()!==true&&(j=advance())){if(j===d){D=B.backslashes=true;j=advance();continue}if(j===y){I=true;break}}continue}break}if(O===true){I=true;if(_===true){continue}break}}if(r.noext===true){T=false;O=false}let G=P;let U="";let W="";if(A>0){U=P.slice(0,A);P=P.slice(A);C-=A}if(G&&O===true&&C>0){G=P.slice(0,C);W=P.slice(C)}else if(O===true){G="";W=P}else{G=P}if(G&&G!==""&&G!=="/"&&G!==P){if(isPathSeparator(G.charCodeAt(G.length-1))){G=G.slice(0,-1)}}if(r.unescape===true){if(W)W=s.removeBackslashes(W);if(G&&D===true){G=s.removeBackslashes(G)}}const V={prefix:U,input:t,start:A,base:G,glob:W,isBrace:R,isBracket:k,isGlob:O,isExtglob:T,isGlobstar:$,negated:L,negatedExtglob:F};if(r.tokens===true){V.maxDepth=0;if(!isPathSeparator(j)){w.push(B)}V.tokens=w}if(r.parts===true||r.tokens===true){let e;for(let s=0;s<S.length;s++){const i=e?e+1:A;const n=S[s];const o=t.slice(i,n);if(r.tokens){if(s===0&&A!==0){w[s].isPrefix=true;w[s].value=U}else{w[s].value=o}depth(w[s]);V.maxDepth+=w[s].depth}if(s!==0||o!==""){x.push(o)}e=n}if(e&&e+1<t.length){const s=t.slice(e+1);x.push(s);if(r.tokens){w[w.length-1].value=s;depth(w[w.length-1]);V.maxDepth+=w[w.length-1].depth}}V.slashes=S;V.parts=x}return V};t.exports=scan},2924:(t,e,r)=>{"use strict";const s=r(1017);const i=process.platform==="win32";const{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:l}=r(8223);e.isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);e.hasRegexChars=t=>a.test(t);e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t);e.escapeRegex=t=>t.replace(l,"\\$1");e.toPosixSlashes=t=>t.replace(n,"/");e.removeBackslashes=t=>t.replace(o,(t=>t==="\\"?"":t));e.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);if(t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10){return true}return false};e.isWindows=t=>{if(t&&typeof t.windows==="boolean"){return t.windows}return i===true||s.sep==="\\"};e.escapeLast=(t,r,s)=>{const i=t.lastIndexOf(r,s);if(i===-1)return t;if(t[i-1]==="\\")return e.escapeLast(t,r,i-1);return`${t.slice(0,i)}\\${t.slice(i)}`};e.removePrefix=(t,e={})=>{let r=t;if(r.startsWith("./")){r=r.slice(2);e.prefix="./"}return r};e.wrapOutput=(t,e={},r={})=>{const s=r.contains?"":"^";const i=r.contains?"":"$";let n=`${s}(?:${t})${i}`;if(e.negated===true){n=`(?:^(?!${n}).*$)`}return n}},399:t=>{"use strict";class DatePart{constructor({token:t,date:e,parts:r,locales:s}){this.token=t;this.date=e||new Date;this.parts=r||[this];this.locales=s||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((e,r)=>r>t&&e instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const e=t.indexOf(this);return t.find(((t,r)=>r>e&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},7967:(t,e,r)=>{"use strict";const s=r(399);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends s{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let e=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?e+1:this.token==="ddd"?this.locales.weekdaysShort[e]:this.token==="dddd"?this.locales.weekdays[e]:t}}t.exports=Day},4102:(t,e,r)=>{"use strict";const s=r(399);class Hours extends s{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},7517:(t,e,r)=>{"use strict";t.exports={DatePart:r(399),Meridiem:r(4128),Day:r(7967),Hours:r(4102),Milliseconds:r(6945),Minutes:r(7829),Month:r(8608),Seconds:r(812),Year:r(5227)}},4128:(t,e,r)=>{"use strict";const s=r(399);class Meridiem extends s{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},6945:(t,e,r)=>{"use strict";const s=r(399);class Milliseconds extends s{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},7829:(t,e,r)=>{"use strict";const s=r(399);class Minutes extends s{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},8608:(t,e,r)=>{"use strict";const s=r(399);class Month extends s{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let e=this.token.length;return e===2?String(t+1).padStart(2,"0"):e===3?this.locales.monthsShort[t]:e===4?this.locales.months[t]:String(t+1)}}t.exports=Month},812:(t,e,r)=>{"use strict";const s=r(399);class Seconds extends s{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},5227:(t,e,r)=>{"use strict";const s=r(399);class Year extends s{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},935:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor;const a=r(2800),l=a.style,u=a.clear,c=a.figures,h=a.strip;const getVal=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]);const getTitle=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]);const getIndex=(t,e)=>{const r=t.findIndex((t=>t.value===e||t.title===e));return r>-1?r:undefined};class AutocompletePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.fallback=t.fallback||(t.initial!==undefined?`${c.pointerSmall} ${getTitle(this.choices,this.initial)}`:`${c.pointerSmall} ${t.noMatches||"no matches found"}`);this.suggestions=[[]];this.page=0;this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=l.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=u("");this.complete(this.render);this.render()}moveSelect(t){this.select=t;if(this.suggestions[this.page].length>0){this.value=getVal(this.suggestions[this.page],t)}else{this.value=this.initial!==undefined?getVal(this.choices,this.initial):null}this.fire()}complete(t){var e=this;return _asyncToGenerator((function*(){const r=e.completing=e.suggest(e.input,e.choices);const s=yield r;if(e.completing!==r)return;e.suggestions=s.map(((t,e,r)=>({title:getTitle(r,e),value:getVal(r,e)}))).reduce(((t,r)=>{if(t[t.length-1].length<e.limit)t[t.length-1].push(r);else t.push([r]);return t}),[[]]);e.isFallback=false;e.completing=false;if(!e.suggestions[e.page])e.page=0;if(!e.suggestions.length&&e.fallback){const t=getIndex(e.choices,e.fallback);e.suggestions=[[]];if(t!==undefined)e.suggestions[0].push({title:getTitle(e.choices,t),value:getVal(e.choices,t)});e.isFallback=true}const i=Math.max(s.length-1,0);e.moveSelect(Math.min(i,e.select));t&&t()}))()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,e){let r=this.input.slice(0,this.cursor);let s=this.input.slice(this.cursor);this.input=`${r}${t}${s}`;this.cursor=r.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let e=this.input.slice(this.cursor);this.input=`${t}${e}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let e=this.input.slice(this.cursor+1);this.input=`${t}${e}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions[this.page].length-1);this.render()}up(){if(this.select<=0)return this.bell();this.moveSelect(this.select-1);this.render()}down(){if(this.select>=this.suggestions[this.page].length-1)return this.bell();this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions[this.page].length-1){this.page=(this.page+1)%this.suggestions.length;this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){if(this.page>=this.suggestions.length-1)return this.bell();this.page++;this.moveSelect(0);this.render()}prevPage(){if(this.page<=0)return this.bell();this.page--;this.moveSelect(0);this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}render(){if(this.closed)return;super.render();if(this.lineCount)this.out.write(o.down(this.lineCount));let t=s.bold(`${l.symbol(this.done,this.aborted)} ${this.msg} `)+`${l.delimiter(this.completing)} `;let e=h(t).length;if(this.done&&this.suggestions[this.page][this.select]){t+=`${this.suggestions[this.page][this.select].title}`}else{this.rendered=`${this.transform.render(this.input)}`;e+=this.rendered.length;t+=this.rendered}if(!this.done){this.lineCount=this.suggestions[this.page].length;let e=this.suggestions[this.page].reduce(((t,e,r)=>t+`\n${r===this.select?s.cyan(e.title):e.title}`),"");if(e&&!this.isFallback){t+=e;if(this.suggestions.length>1){this.lineCount++;t+=s.blue(`\nPage ${this.page+1}/${this.suggestions.length}`)}}else{const e=getIndex(this.choices,this.fallback);const r=e!==undefined?getTitle(this.choices,e):this.fallback;t+=`\n${s.gray(r)}`;this.lineCount++}}this.out.write(this.clear+t);this.clear=u(t);if(this.lineCount&&!this.done){let t=o.up(this.lineCount);t+=o.left+o.to(e);t+=o.move(-this.rendered.length+this.cursor*this.scale);this.out.write(t)}}}t.exports=AutocompletePrompt},2040:(t,e,r)=>{"use strict";const s=r(9439);const i=r(332),n=i.cursor;const o=r(4047);const a=r(2800),l=a.clear,u=a.style,c=a.figures;class AutocompleteMultiselectPrompt extends o{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=l("");this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const e=this.filteredOptions.findIndex((e=>e===t));this.cursor=e<0?0:e;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,e){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){return`\nInstructions:\n ${c.arrowUp}/${c.arrowDown}: Highlight option\n ${c.arrowLeft}/${c.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n `}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:s.gray("Enter something to filter")}\n`}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(c.radioOn):c.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);super.render();let t=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=l(t)}}t.exports=AutocompleteMultiselectPrompt},5680:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style;const a=r(332),l=a.erase,u=a.cursor;class ConfirmPrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,e){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);super.render();this.out.write(l.line+u.to(0)+[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:s.gray(this.initialValue?this.yesOption:this.noOption)].join(" "))}}t.exports=ConfirmPrompt},3031:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear,l=n.figures,u=n.strip;const c=r(332),h=c.erase,d=c.cursor;const f=r(7517),p=f.DatePart,g=f.Meridiem,m=f.Day,y=f.Hours,v=f.Milliseconds,b=f.Minutes,_=f.Month,S=f.Seconds,w=f.Year;const x=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const P={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new m(t),3:t=>new _(t),4:t=>new w(t),5:t=>new g(t),6:t=>new y(t),7:t=>new b(t),8:t=>new S(t),9:t=>new v(t)};const E={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(E,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=a("");this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let e;this.parts=[];while(e=x.exec(t)){let t=e.shift();let r=e.findIndex((t=>t!=null));this.parts.push(r in P?P[r]({token:e[r]||t,date:this.date,parts:this.parts,locales:this.locales}):e[r]||t)}let r=this.parts.reduce(((t,e)=>{if(typeof e==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=e;else t.push(e);return t}),[]);this.parts.splice(0);this.parts.push(...r);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof p)));this.fire();this.render()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let e=yield t.validator(t.value);if(typeof e==="string"){t.errorMsg=e;e=false}t.error=!e}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color="red";t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof p)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(h.lines(1));super.render();let t=h.line+(this.lines?h.down(this.lines):"")+d.to(0);this.lines=0;let e="";if(this.error){let t=this.errorMsg.split("\n");e=t.reduce(((t,e,r)=>t+`\n${r?` `:l.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(false),this.parts.reduce(((t,e,r)=>t.concat(r===this.cursor&&!this.done?s.cyan().underline(e.toString()):e)),[]).join("")].join(" ");let i="";if(this.lines){i+=d.up(this.lines);i+=d.left+d.to(u(r).length)}this.out.write(t+r+e+i)}}t.exports=DatePrompt},9956:(t,e,r)=>{"use strict";t.exports={TextPrompt:r(5430),SelectPrompt:r(8856),TogglePrompt:r(9692),DatePrompt:r(3031),NumberPrompt:r(8831),MultiselectPrompt:r(4047),AutocompletePrompt:r(935),AutocompleteMultiselectPrompt:r(2040),ConfirmPrompt:r(5680)}},4047:(t,e,r)=>{"use strict";const s=r(9439);const i=r(332),n=i.cursor;const o=r(5876);const a=r(2800),l=a.clear,u=a.figures,c=a.style;class MultiselectPrompt extends o{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.value=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=l("");if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}_(t,e){if(t===" "){this.handleSpaceToggle()}else{return this.bell()}}renderInstructions(){return`\nInstructions:\n ${u.arrowUp}/${u.arrowDown}: Highlight option\n ${u.arrowLeft}/${u.arrowRight}/[space]: Toggle selection\n enter/return: Complete answer\n `}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(u.radioOn):u.radioOff)+" "+i}paginateOptions(t){const e=this.cursor;let r=t.map(((t,r)=>this.renderOption(e,t,r)));const i=10;let n=r;let o="";if(r.length===0){return s.red("No matches for this query.")}else if(r.length>i){let a=e-i/2;let l=e+i/2;if(a<0){a=0;l=i}else if(l>t.length){l=t.length;a=l-i}n=r.slice(a,l);o=s.dim("(Move up and down to reveal more choices)")}return"\n"+n.join("\n")+"\n"+o}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);super.render();let t=[c.symbol(this.done,this.aborted),s.bold(this.msg),c.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=l(t)}}t.exports=MultiselectPrompt},8831:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor,a=n.erase;const l=r(2800),u=l.style,c=l.clear,h=l.figures,d=l.strip;const f=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r};class NumberPrompt extends i{constructor(t={}){super(t);this.transform=u.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=s.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||f.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let e=yield t.validator(t.value);if(typeof e===`string`){t.errorMsg=e;e=false}t.error=!e}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color=`red`;t.fire();t.render();return}let e=t.value;t.value=e!==``?e:t.initial;t.done=true;t.aborted=false;t.error=false;t.fire();t.render();t.out.write(`\n`);t.close()}))()}up(){this.typed=``;if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,e){if(!this.valid(t))return this.bell();const r=Date.now();if(r-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=r;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;super.render();let t=a.line+(this.lines?a.down(this.lines):``)+o.to(0);this.lines=0;let e=``;if(this.error){let t=this.errorMsg.split(`\n`);e+=t.reduce(((t,e,r)=>t+`\n${r?` `:h.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=!this.done||!this.done&&!this.placeholder;let i=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(this.done),r?s[this.color]().underline(this.rendered):this.rendered].join(` `);let n=``;if(this.lines){n+=o.up(this.lines);n+=o.left+o.to(d(i).length)}this.out.write(t+i+e+n)}}t.exports=NumberPrompt},5876:(t,e,r)=>{"use strict";const s=r(4521);const i=r(2800),n=i.action;const o=r(2361);const a=r(332),l=a.beep,u=a.cursor;const c=r(9439);class Prompt extends o{constructor(t={}){super();this.firstRender=true;this.in=t.in||process.stdin;this.out=t.out||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const e=s.createInterface(this.in);s.emitKeypressEvents(this.in,e);if(this.in.isTTY)this.in.setRawMode(true);const keypress=(t,e)=>{let r=n(e);if(r===false){this._&&this._(t,e)}else if(typeof this[r]==="function"){this[r](e)}else{this.bell()}};this.close=()=>{this.out.write(u.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);e.close();this.emit(this.aborted?"abort":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted})}bell(){this.out.write(l)}render(){this.onRender(c);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},8856:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear,l=n.figures;const u=r(332),c=u.erase,h=u.cursor;class SelectPrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.value=(this.choices[this.cursor]||{}).value;this.clear=a("");this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0)return this.bell();this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)return this.bell();this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,e){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(c.lines(this.choices.length+1));super.render();this.out.write([o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(false),this.done?this.selection.title:this.selection.disabled?s.yellow(this.warn):s.gray(this.hint)].join(" "));if(!this.done){this.out.write("\n"+this.choices.map(((t,e)=>{let r,i;if(t.disabled){r=this.cursor===e?s.gray().underline(t.title):s.strikethrough().gray(t.title);i=this.cursor===e?s.bold().gray(l.pointer)+" ":" "}else{r=this.cursor===e?s.cyan().underline(t.title):t.title;i=this.cursor===e?s.cyan(l.pointer)+" ":" "}return`${i} ${r}`})).join("\n"))}}}t.exports=SelectPrompt},5430:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor;const a=r(2800),l=a.style,u=a.clear,c=a.strip,h=a.figures;class TextPrompt extends i{constructor(t={}){super(t);this.transform=l.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.clear=u(``);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=s.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.fire();this.render()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let e=yield t.validator(t.value);if(typeof e===`string`){t.errorMsg=e;e=false}t.error=!e}))()}submit(){var t=this;return _asyncToGenerator((function*(){t.value=t.value||t.initial;yield t.validate();if(t.error){t.red=true;t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t}_(t,e){let r=this.value.slice(0,this.cursor);let s=this.value.slice(this.cursor);this.value=`${r}${t}${s}`;this.red=false;this.cursor=this.placeholder?0:r.length+1;this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.value.slice(0,this.cursor-1);let e=this.value.slice(this.cursor);this.value=`${t}${e}`;this.red=false;this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let e=this.value.slice(this.cursor+1);this.value=`${t}${e}`;this.red=false;this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}render(){if(this.closed)return;super.render();let t=(this.lines?o.down(this.lines):``)+this.clear;this.lines=0;let e=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(` `);let r=``;if(this.error){let t=this.errorMsg.split(`\n`);r+=t.reduce(((t,e,r)=>t+=`\n${r?" ":h.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let i=``;if(this.lines){i+=o.up(this.lines);i+=o.left+o.to(c(e).length)}i+=o.move(this.placeholder?-this.initial.length*this.scale:-this.rendered.length+this.cursor*this.scale);this.out.write(t+e+r+i);this.clear=u(e+r)}}t.exports=TextPrompt},9692:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear;const l=r(332),u=l.cursor,c=l.erase;class TogglePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,e){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);super.render();this.out.write(c.lines(this.first?1:this.msg.split(/\n/g).length)+u.to(0)+[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.value?this.inactive:s.cyan().underline(this.inactive),s.gray("/"),this.value?s.cyan().underline(this.active):this.active].join(" "))}}t.exports=TogglePrompt},6598:(t,e,r)=>{"use strict";function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};var s=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){s=s.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))}s.forEach((function(e){_defineProperty(t,e,r[e])}))}return t}function _defineProperty(t,e,r){if(e in t){Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true})}else{t[e]=r}return t}function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(4591);const i=["suggest","format","onState","validate","onRender"];const noop=()=>{};function prompt(){return _prompt.apply(this,arguments)}function _prompt(){_prompt=_asyncToGenerator((function*(t=[],{onSubmit:e=noop,onCancel:r=noop}={}){const n={};const o=prompt._override||{};t=[].concat(t);let a,l,u,c,h;const d=function(){var t=_asyncToGenerator((function*(t,e,r=false){if(!r&&t.validate&&t.validate(e)!==true){return}return t.format?yield t.format(e,n):e}));return function getFormattedAnswer(e,r){return t.apply(this,arguments)}}();var f=true;var p=false;var g=undefined;try{for(var m=t[Symbol.iterator](),y;!(f=(y=m.next()).done);f=true){l=y.value;var v=l;c=v.name;h=v.type;for(let t in l){if(i.includes(t))continue;let e=l[t];l[t]=typeof e==="function"?yield e(a,_objectSpread({},n),l):e}if(typeof l.message!=="string"){throw new Error("prompt message is required")}var b=l;c=b.name;h=b.type;if(!h)continue;if(s[h]===void 0){throw new Error(`prompt type (${h}) is not defined`)}if(o[l.name]!==undefined){a=yield d(l,o[l.name]);if(a!==undefined){n[c]=a;continue}}try{a=prompt._injected?getInjectedAnswer(prompt._injected):yield s[h](l);n[c]=a=yield d(l,a,true);u=yield e(l,a,n)}catch(t){u=!(yield r(l,n))}if(u)return n}}catch(t){p=true;g=t}finally{try{if(!f&&m.return!=null){m.return()}}finally{if(p){throw g}}}return n}));return _prompt.apply(this,arguments)}function getInjectedAnswer(t){const e=t.shift();if(e instanceof Error){throw e}return e}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:s,inject:inject,override:override})},4591:(t,e,r)=>{"use strict";const s=e;const i=r(9956);const noop=t=>t;function toPrompt(t,e,r={}){return new Promise(((s,n)=>{const o=new i[t](e);const a=r.onAbort||noop;const l=r.onSubmit||noop;o.on("state",e.onState||noop);o.on("submit",(t=>s(l(t))));o.on("abort",(t=>n(a(t))))}))}s.text=t=>toPrompt("TextPrompt",t);s.password=t=>{t.style="password";return s.text(t)};s.invisible=t=>{t.style="invisible";return s.text(t)};s.number=t=>toPrompt("NumberPrompt",t);s.date=t=>toPrompt("DatePrompt",t);s.confirm=t=>toPrompt("ConfirmPrompt",t);s.list=t=>{const e=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(e).map((t=>t.trim()))})};s.toggle=t=>toPrompt("TogglePrompt",t);s.select=t=>toPrompt("SelectPrompt",t);s.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};s.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,e)=>Promise.resolve(e.filter((e=>e.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));s.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},8692:t=>{"use strict";t.exports=t=>{if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"abort";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},3513:(t,e,r)=>{"use strict";const s=r(8760);const i=r(332),n=i.erase,o=i.cursor;const width=t=>[...s(t)].length;t.exports=function(t,e=process.stdout.columns){if(!e)return n.line+o.to(0);let r=0;const s=t.split(/\r?\n/);var i=true;var a=false;var l=undefined;try{for(var u=s[Symbol.iterator](),c;!(i=(c=u.next()).done);i=true){let t=c.value;r+=1+Math.floor(Math.max(width(t)-1,0)/e)}}catch(t){a=true;l=t}finally{try{if(!i&&u.return!=null){u.return()}}finally{if(a){throw l}}}return(n.line+o.prevLine()).repeat(r-1)+n.line+o.to(0)}},6217:t=>{"use strict";const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const s=process.platform==="win32"?r:e;t.exports=s},2800:(t,e,r)=>{"use strict";t.exports={action:r(8692),clear:r(3513),style:r(5012),strip:r(8760),figures:r(6217)}},8760:t=>{"use strict";t.exports=t=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const r=new RegExp(e,"g");return typeof t==="string"?t.replace(r,""):t}},5012:(t,e,r)=>{"use strict";const s=r(9439);const i=r(6217);const n=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>n[t]||n.default;const o=Object.freeze({aborted:s.red(i.cross),done:s.green(i.tick),default:s.cyan("?")});const symbol=(t,e)=>e?o.aborted:t?o.done:o.default;const delimiter=t=>s.gray(t?i.ellipsis:i.pointerSmall);const item=(t,e)=>s.gray(t?e?i.pointerSmall:"+":i.line);t.exports={styles:n,render:render,symbols:o,symbol:symbol,delimiter:delimiter,item:item}},1112:(t,e,r)=>{function isNodeLT(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let e=0,r=process.versions.node.split(".").map(Number);for(;e<t.length;e++){if(r[e]>t[e])return false;if(t[e]>r[e])return true}return false}t.exports=isNodeLT("8.6.0")?r(6598):r(9590)},8994:t=>{"use strict";class DatePart{constructor({token:t,date:e,parts:r,locales:s}){this.token=t;this.date=e||new Date;this.parts=r||[this];this.locales=s||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((e,r)=>r>t&&e instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const e=t.indexOf(this);return t.find(((t,r)=>r>e&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},5513:(t,e,r)=>{"use strict";const s=r(8994);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends s{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let e=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?e+1:this.token==="ddd"?this.locales.weekdaysShort[e]:this.token==="dddd"?this.locales.weekdays[e]:t}}t.exports=Day},9270:(t,e,r)=>{"use strict";const s=r(8994);class Hours extends s{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},1190:(t,e,r)=>{"use strict";t.exports={DatePart:r(8994),Meridiem:r(8135),Day:r(5513),Hours:r(9270),Milliseconds:r(2397),Minutes:r(9246),Month:r(5763),Seconds:r(5579),Year:r(4191)}},8135:(t,e,r)=>{"use strict";const s=r(8994);class Meridiem extends s{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},2397:(t,e,r)=>{"use strict";const s=r(8994);class Milliseconds extends s{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},9246:(t,e,r)=>{"use strict";const s=r(8994);class Minutes extends s{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},5763:(t,e,r)=>{"use strict";const s=r(8994);class Month extends s{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let e=this.token.length;return e===2?String(t+1).padStart(2,"0"):e===3?this.locales.monthsShort[t]:e===4?this.locales.months[t]:String(t+1)}}t.exports=Month},5579:(t,e,r)=>{"use strict";const s=r(8994);class Seconds extends s{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},4191:(t,e,r)=>{"use strict";const s=r(8994);class Year extends s{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},514:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{cursor:n}=r(332);const{style:o,clear:a,figures:l,strip:u}=r(9807);const getVal=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]);const getTitle=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]);const getIndex=(t,e)=>{const r=t.findIndex((t=>t.value===e||t.title===e));return r>-1?r:undefined};class AutocompletePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.fallback=t.fallback||(t.initial!==undefined?`${l.pointerSmall} ${getTitle(this.choices,this.initial)}`:`${l.pointerSmall} ${t.noMatches||"no matches found"}`);this.suggestions=[[]];this.page=0;this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=o.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=a("");this.complete(this.render);this.render()}moveSelect(t){this.select=t;if(this.suggestions[this.page].length>0){this.value=getVal(this.suggestions[this.page],t)}else{this.value=this.initial!==undefined?getVal(this.choices,this.initial):null}this.fire()}async complete(t){const e=this.completing=this.suggest(this.input,this.choices);const r=await e;if(this.completing!==e)return;this.suggestions=r.map(((t,e,r)=>({title:getTitle(r,e),value:getVal(r,e)}))).reduce(((t,e)=>{if(t[t.length-1].length<this.limit)t[t.length-1].push(e);else t.push([e]);return t}),[[]]);this.isFallback=false;this.completing=false;if(!this.suggestions[this.page])this.page=0;if(!this.suggestions.length&&this.fallback){const t=getIndex(this.choices,this.fallback);this.suggestions=[[]];if(t!==undefined)this.suggestions[0].push({title:getTitle(this.choices,t),value:getVal(this.choices,t)});this.isFallback=true}const s=Math.max(r.length-1,0);this.moveSelect(Math.min(s,this.select));t&&t()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,e){let r=this.input.slice(0,this.cursor);let s=this.input.slice(this.cursor);this.input=`${r}${t}${s}`;this.cursor=r.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let e=this.input.slice(this.cursor);this.input=`${t}${e}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let e=this.input.slice(this.cursor+1);this.input=`${t}${e}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions[this.page].length-1);this.render()}up(){if(this.select<=0)return this.bell();this.moveSelect(this.select-1);this.render()}down(){if(this.select>=this.suggestions[this.page].length-1)return this.bell();this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions[this.page].length-1){this.page=(this.page+1)%this.suggestions.length;this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){if(this.page>=this.suggestions.length-1)return this.bell();this.page++;this.moveSelect(0);this.render()}prevPage(){if(this.page<=0)return this.bell();this.page--;this.moveSelect(0);this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}render(){if(this.closed)return;super.render();if(this.lineCount)this.out.write(n.down(this.lineCount));let t=s.bold(`${o.symbol(this.done,this.aborted)} ${this.msg} `)+`${o.delimiter(this.completing)} `;let e=u(t).length;if(this.done&&this.suggestions[this.page][this.select]){t+=`${this.suggestions[this.page][this.select].title}`}else{this.rendered=`${this.transform.render(this.input)}`;e+=this.rendered.length;t+=this.rendered}if(!this.done){this.lineCount=this.suggestions[this.page].length;let e=this.suggestions[this.page].reduce(((t,e,r)=>t+`\n${r===this.select?s.cyan(e.title):e.title}`),"");if(e&&!this.isFallback){t+=e;if(this.suggestions.length>1){this.lineCount++;t+=s.blue(`\nPage ${this.page+1}/${this.suggestions.length}`)}}else{const e=getIndex(this.choices,this.fallback);const r=e!==undefined?getTitle(this.choices,e):this.fallback;t+=`\n${s.gray(r)}`;this.lineCount++}}this.out.write(this.clear+t);this.clear=a(t);if(this.lineCount&&!this.done){let t=n.up(this.lineCount);t+=n.left+n.to(e);t+=n.move(-this.rendered.length+this.cursor*this.scale);this.out.write(t)}}}t.exports=AutocompletePrompt},7685:(t,e,r)=>{"use strict";const s=r(9439);const{cursor:i}=r(332);const n=r(92);const{clear:o,style:a,figures:l}=r(9807);class AutocompleteMultiselectPrompt extends n{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=o("");this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const e=this.filteredOptions.findIndex((e=>e===t));this.cursor=e<0?0:e;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,e){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){return`\nInstructions:\n ${l.arrowUp}/${l.arrowDown}: Highlight option\n ${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n `}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:s.gray("Enter something to filter")}\n`}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(l.radioOn):l.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);super.render();let t=[a.symbol(this.done,this.aborted),s.bold(this.msg),a.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=o(t)}}t.exports=AutocompleteMultiselectPrompt},3037:(t,e,r)=>{const s=r(9439);const i=r(9126);const{style:n}=r(9807);const{erase:o,cursor:a}=r(332);class ConfirmPrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,e){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();this.out.write(o.line+a.to(0)+[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:s.gray(this.initialValue?this.yesOption:this.noOption)].join(" "))}}t.exports=ConfirmPrompt},5048:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{style:n,clear:o,figures:a,strip:l}=r(9807);const{erase:u,cursor:c}=r(332);const{DatePart:h,Meridiem:d,Day:f,Hours:p,Milliseconds:g,Minutes:m,Month:y,Seconds:v,Year:b}=r(1190);const _=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const S={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new f(t),3:t=>new y(t),4:t=>new b(t),5:t=>new d(t),6:t=>new p(t),7:t=>new m(t),8:t=>new v(t),9:t=>new g(t)};const w={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(w,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=o("");this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let e;this.parts=[];while(e=_.exec(t)){let t=e.shift();let r=e.findIndex((t=>t!=null));this.parts.push(r in S?S[r]({token:e[r]||t,date:this.date,parts:this.parts,locales:this.locales}):e[r]||t)}let r=this.parts.reduce(((t,e)=>{if(typeof e==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=e;else t.push(e);return t}),[]);this.parts.splice(0);this.parts.push(...r);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof h)));this.fire();this.render()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t==="string"){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color="red";this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof h)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(c.hide);else this.out.write(u.lines(1));super.render();let t=u.line+(this.lines?u.down(this.lines):"")+c.to(0);this.lines=0;let e="";if(this.error){let t=this.errorMsg.split("\n");e=t.reduce(((t,e,r)=>t+`\n${r?` `:a.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(false),this.parts.reduce(((t,e,r)=>t.concat(r===this.cursor&&!this.done?s.cyan().underline(e.toString()):e)),[]).join("")].join(" ");let i="";if(this.lines){i+=c.up(this.lines);i+=c.left+c.to(l(r).length)}this.out.write(t+r+e+i)}}t.exports=DatePrompt},6529:(t,e,r)=>{"use strict";t.exports={TextPrompt:r(1551),SelectPrompt:r(6515),TogglePrompt:r(181),DatePrompt:r(5048),NumberPrompt:r(3686),MultiselectPrompt:r(92),AutocompletePrompt:r(514),AutocompleteMultiselectPrompt:r(7685),ConfirmPrompt:r(3037)}},92:(t,e,r)=>{"use strict";const s=r(9439);const{cursor:i}=r(332);const n=r(9126);const{clear:o,figures:a,style:l}=r(9807);class MultiselectPrompt extends n{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.value=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=o("");if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}_(t,e){if(t===" "){this.handleSpaceToggle()}else{return this.bell()}}renderInstructions(){return`\nInstructions:\n ${a.arrowUp}/${a.arrowDown}: Highlight option\n ${a.arrowLeft}/${a.arrowRight}/[space]: Toggle selection\n enter/return: Complete answer\n `}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(a.radioOn):a.radioOff)+" "+i}paginateOptions(t){const e=this.cursor;let r=t.map(((t,r)=>this.renderOption(e,t,r)));const i=10;let n=r;let o="";if(r.length===0){return s.red("No matches for this query.")}else if(r.length>i){let a=e-i/2;let l=e+i/2;if(a<0){a=0;l=i}else if(l>t.length){l=t.length;a=l-i}n=r.slice(a,l);o=s.dim("(Move up and down to reveal more choices)")}return"\n"+n.join("\n")+"\n"+o}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);super.render();let t=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=o(t)}}t.exports=MultiselectPrompt},3686:(t,e,r)=>{const s=r(9439);const i=r(9126);const{cursor:n,erase:o}=r(332);const{style:a,clear:l,figures:u,strip:c}=r(9807);const h=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r};class NumberPrompt extends i{constructor(t={}){super(t);this.transform=a.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=s.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||h.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color=`red`;this.fire();this.render();return}let t=this.value;this.value=t!==``?t:this.initial;this.done=true;this.aborted=false;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}up(){this.typed=``;if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,e){if(!this.valid(t))return this.bell();const r=Date.now();if(r-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=r;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;super.render();let t=o.line+(this.lines?o.down(this.lines):``)+n.to(0);this.lines=0;let e=``;if(this.error){let t=this.errorMsg.split(`\n`);e+=t.reduce(((t,e,r)=>t+`\n${r?` `:u.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=!this.done||!this.done&&!this.placeholder;let i=[a.symbol(this.done,this.aborted),s.bold(this.msg),a.delimiter(this.done),r?s[this.color]().underline(this.rendered):this.rendered].join(` `);let l=``;if(this.lines){l+=n.up(this.lines);l+=n.left+n.to(c(i).length)}this.out.write(t+i+e+l)}}t.exports=NumberPrompt},9126:(t,e,r)=>{"use strict";const s=r(4521);const{action:i}=r(9807);const n=r(2361);const{beep:o,cursor:a}=r(332);const l=r(9439);class Prompt extends n{constructor(t={}){super();this.firstRender=true;this.in=t.in||process.stdin;this.out=t.out||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const e=s.createInterface(this.in);s.emitKeypressEvents(this.in,e);if(this.in.isTTY)this.in.setRawMode(true);const keypress=(t,e)=>{let r=i(e);if(r===false){this._&&this._(t,e)}else if(typeof this[r]==="function"){this[r](e)}else{this.bell()}};this.close=()=>{this.out.write(a.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);e.close();this.emit(this.aborted?"abort":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted})}bell(){this.out.write(o)}render(){this.onRender(l);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},6515:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{style:n,clear:o,figures:a}=r(9807);const{erase:l,cursor:u}=r(332);class SelectPrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.value=(this.choices[this.cursor]||{}).value;this.clear=o("");this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0)return this.bell();this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)return this.bell();this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,e){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);else this.out.write(l.lines(this.choices.length+1));super.render();this.out.write([n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(false),this.done?this.selection.title:this.selection.disabled?s.yellow(this.warn):s.gray(this.hint)].join(" "));if(!this.done){this.out.write("\n"+this.choices.map(((t,e)=>{let r,i;if(t.disabled){r=this.cursor===e?s.gray().underline(t.title):s.strikethrough().gray(t.title);i=this.cursor===e?s.bold().gray(a.pointer)+" ":" "}else{r=this.cursor===e?s.cyan().underline(t.title):t.title;i=this.cursor===e?s.cyan(a.pointer)+" ":" "}return`${i} ${r}`})).join("\n"))}}}t.exports=SelectPrompt},1551:(t,e,r)=>{const s=r(9439);const i=r(9126);const{cursor:n}=r(332);const{style:o,clear:a,strip:l,figures:u}=r(9807);class TextPrompt extends i{constructor(t={}){super(t);this.transform=o.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.clear=a(``);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=s.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.fire();this.render()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){this.value=this.value||this.initial;await this.validate();if(this.error){this.red=true;this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t}_(t,e){let r=this.value.slice(0,this.cursor);let s=this.value.slice(this.cursor);this.value=`${r}${t}${s}`;this.red=false;this.cursor=this.placeholder?0:r.length+1;this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.value.slice(0,this.cursor-1);let e=this.value.slice(this.cursor);this.value=`${t}${e}`;this.red=false;this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let e=this.value.slice(this.cursor+1);this.value=`${t}${e}`;this.red=false;this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}render(){if(this.closed)return;super.render();let t=(this.lines?n.down(this.lines):``)+this.clear;this.lines=0;let e=[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(` `);let r=``;if(this.error){let t=this.errorMsg.split(`\n`);r+=t.reduce(((t,e,r)=>t+=`\n${r?" ":u.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let i=``;if(this.lines){i+=n.up(this.lines);i+=n.left+n.to(l(e).length)}i+=n.move(this.placeholder?-this.initial.length*this.scale:-this.rendered.length+this.cursor*this.scale);this.out.write(t+e+r+i);this.clear=a(e+r)}}t.exports=TextPrompt},181:(t,e,r)=>{const s=r(9439);const i=r(9126);const{style:n,clear:o}=r(9807);const{cursor:a,erase:l}=r(332);class TogglePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,e){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();this.out.write(l.lines(this.first?1:this.msg.split(/\n/g).length)+a.to(0)+[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(this.done),this.value?this.inactive:s.cyan().underline(this.inactive),s.gray("/"),this.value?s.cyan().underline(this.active):this.active].join(" "))}}t.exports=TogglePrompt},9590:(t,e,r)=>{"use strict";const s=r(4450);const i=["suggest","format","onState","validate","onRender"];const noop=()=>{};async function prompt(t=[],{onSubmit:e=noop,onCancel:r=noop}={}){const n={};const o=prompt._override||{};t=[].concat(t);let a,l,u,c,h;const getFormattedAnswer=async(t,e,r=false)=>{if(!r&&t.validate&&t.validate(e)!==true){return}return t.format?await t.format(e,n):e};for(l of t){({name:c,type:h}=l);for(let t in l){if(i.includes(t))continue;let e=l[t];l[t]=typeof e==="function"?await e(a,{...n},l):e}if(typeof l.message!=="string"){throw new Error("prompt message is required")}({name:c,type:h}=l);if(!h)continue;if(s[h]===void 0){throw new Error(`prompt type (${h}) is not defined`)}if(o[l.name]!==undefined){a=await getFormattedAnswer(l,o[l.name]);if(a!==undefined){n[c]=a;continue}}try{a=prompt._injected?getInjectedAnswer(prompt._injected):await s[h](l);n[c]=a=await getFormattedAnswer(l,a,true);u=await e(l,a,n)}catch(t){u=!await r(l,n)}if(u)return n}return n}function getInjectedAnswer(t){const e=t.shift();if(e instanceof Error){throw e}return e}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:s,inject:inject,override:override})},4450:(t,e,r)=>{"use strict";const s=e;const i=r(6529);const noop=t=>t;function toPrompt(t,e,r={}){return new Promise(((s,n)=>{const o=new i[t](e);const a=r.onAbort||noop;const l=r.onSubmit||noop;o.on("state",e.onState||noop);o.on("submit",(t=>s(l(t))));o.on("abort",(t=>n(a(t))))}))}s.text=t=>toPrompt("TextPrompt",t);s.password=t=>{t.style="password";return s.text(t)};s.invisible=t=>{t.style="invisible";return s.text(t)};s.number=t=>toPrompt("NumberPrompt",t);s.date=t=>toPrompt("DatePrompt",t);s.confirm=t=>toPrompt("ConfirmPrompt",t);s.list=t=>{const e=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(e).map((t=>t.trim()))})};s.toggle=t=>toPrompt("TogglePrompt",t);s.select=t=>toPrompt("SelectPrompt",t);s.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};s.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,e)=>Promise.resolve(e.filter((e=>e.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));s.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},8573:t=>{"use strict";t.exports=t=>{if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"abort";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},6747:(t,e,r)=>{"use strict";const s=r(2714);const{erase:i,cursor:n}=r(332);const width=t=>[...s(t)].length;t.exports=function(t,e=process.stdout.columns){if(!e)return i.line+n.to(0);let r=0;const s=t.split(/\r?\n/);for(let t of s){r+=1+Math.floor(Math.max(width(t)-1,0)/e)}return(i.line+n.prevLine()).repeat(r-1)+i.line+n.to(0)}},3034:t=>{"use strict";const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const s=process.platform==="win32"?r:e;t.exports=s},9807:(t,e,r)=>{"use strict";t.exports={action:r(8573),clear:r(6747),style:r(7357),strip:r(2714),figures:r(3034)}},2714:t=>{"use strict";t.exports=t=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const r=new RegExp(e,"g");return typeof t==="string"?t.replace(r,""):t}},7357:(t,e,r)=>{"use strict";const s=r(9439);const i=r(3034);const n=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>n[t]||n.default;const o=Object.freeze({aborted:s.red(i.cross),done:s.green(i.tick),default:s.cyan("?")});const symbol=(t,e)=>e?o.aborted:t?o.done:o.default;const delimiter=t=>s.gray(t?i.ellipsis:i.pointerSmall);const item=(t,e)=>s.gray(t?e?i.pointerSmall:"+":i.line);t.exports={styles:n,render:render,symbols:o,symbol:symbol,delimiter:delimiter,item:item}},3135:t=>{
54
+ */t.exports=function(t){if(typeof t==="number"){return t-t===0}if(typeof t==="string"&&t.trim()!==""){return Number.isFinite?Number.isFinite(+t):isFinite(+t)}return false}},228:(t,e,r)=>{var s=r(7147);var i;if(process.platform==="win32"||global.TESTING_WINDOWS){i=r(7214)}else{i=r(5211)}t.exports=isexe;isexe.sync=sync;function isexe(t,e,r){if(typeof e==="function"){r=e;e={}}if(!r){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(r,s){isexe(t,e||{},(function(t,e){if(t){s(t)}else{r(e)}}))}))}i(t,e||{},(function(t,s){if(t){if(t.code==="EACCES"||e&&e.ignoreErrors){t=null;s=false}}r(t,s)}))}function sync(t,e){try{return i.sync(t,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES"){return false}else{throw t}}}},5211:(t,e,r)=>{t.exports=isexe;isexe.sync=sync;var s=r(7147);function isexe(t,e,r){s.stat(t,(function(t,s){r(t,t?false:checkStat(s,e))}))}function sync(t,e){return checkStat(s.statSync(t),e)}function checkStat(t,e){return t.isFile()&&checkMode(t,e)}function checkMode(t,e){var r=t.mode;var s=t.uid;var i=t.gid;var n=e.uid!==undefined?e.uid:process.getuid&&process.getuid();var o=e.gid!==undefined?e.gid:process.getgid&&process.getgid();var a=parseInt("100",8);var l=parseInt("010",8);var u=parseInt("001",8);var c=a|l;var h=r&u||r&l&&i===o||r&a&&s===n||r&c&&n===0;return h}},7214:(t,e,r)=>{t.exports=isexe;isexe.sync=sync;var s=r(7147);function checkPathExt(t,e){var r=e.pathExt!==undefined?e.pathExt:process.env.PATHEXT;if(!r){return true}r=r.split(";");if(r.indexOf("")!==-1){return true}for(var s=0;s<r.length;s++){var i=r[s].toLowerCase();if(i&&t.substr(-i.length).toLowerCase()===i){return true}}return false}function checkStat(t,e,r){if(!t.isSymbolicLink()&&!t.isFile()){return false}return checkPathExt(e,r)}function isexe(t,e,r){s.stat(t,(function(s,i){r(s,s?false:checkStat(i,t,e))}))}function sync(t,e){return checkStat(s.statSync(t),t,e)}},9439:t=>{"use strict";const{FORCE_COLOR:e,NODE_DISABLE_COLORS:r,TERM:s}=process.env;const i={enabled:!r&&s!=="dumb"&&e!=="0",reset:init(0,0),bold:init(1,22),dim:init(2,22),italic:init(3,23),underline:init(4,24),inverse:init(7,27),hidden:init(8,28),strikethrough:init(9,29),black:init(30,39),red:init(31,39),green:init(32,39),yellow:init(33,39),blue:init(34,39),magenta:init(35,39),cyan:init(36,39),white:init(37,39),gray:init(90,39),grey:init(90,39),bgBlack:init(40,49),bgRed:init(41,49),bgGreen:init(42,49),bgYellow:init(43,49),bgBlue:init(44,49),bgMagenta:init(45,49),bgCyan:init(46,49),bgWhite:init(47,49)};function run(t,e){let r=0,s,i="",n="";for(;r<t.length;r++){s=t[r];i+=s.open;n+=s.close;if(e.includes(s.close)){e=e.replace(s.rgx,s.close+s.open)}}return i+e+n}function chain(t,e){let r={has:t,keys:e};r.reset=i.reset.bind(r);r.bold=i.bold.bind(r);r.dim=i.dim.bind(r);r.italic=i.italic.bind(r);r.underline=i.underline.bind(r);r.inverse=i.inverse.bind(r);r.hidden=i.hidden.bind(r);r.strikethrough=i.strikethrough.bind(r);r.black=i.black.bind(r);r.red=i.red.bind(r);r.green=i.green.bind(r);r.yellow=i.yellow.bind(r);r.blue=i.blue.bind(r);r.magenta=i.magenta.bind(r);r.cyan=i.cyan.bind(r);r.white=i.white.bind(r);r.gray=i.gray.bind(r);r.grey=i.grey.bind(r);r.bgBlack=i.bgBlack.bind(r);r.bgRed=i.bgRed.bind(r);r.bgGreen=i.bgGreen.bind(r);r.bgYellow=i.bgYellow.bind(r);r.bgBlue=i.bgBlue.bind(r);r.bgMagenta=i.bgMagenta.bind(r);r.bgCyan=i.bgCyan.bind(r);r.bgWhite=i.bgWhite.bind(r);return r}function init(t,e){let r={open:`[${t}m`,close:`[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(e){if(this!==void 0&&this.has!==void 0){this.has.includes(t)||(this.has.push(t),this.keys.push(r));return e===void 0?this:i.enabled?run(this.keys,e+""):e+""}return e===void 0?chain([t],[r]):i.enabled?run([r],e+""):e+""}}t.exports=i},2375:(t,e,r)=>{"use strict";const s=r(2781);const i=s.PassThrough;const n=Array.prototype.slice;t.exports=merge2;function merge2(){const t=[];const e=n.call(arguments);let r=false;let s=e[e.length-1];if(s&&!Array.isArray(s)&&s.pipe==null){e.pop()}else{s={}}const o=s.end!==false;const a=s.pipeError===true;if(s.objectMode==null){s.objectMode=true}if(s.highWaterMark==null){s.highWaterMark=64*1024}const l=i(s);function addStream(){for(let e=0,r=arguments.length;e<r;e++){t.push(pauseStreams(arguments[e],s))}mergeStream();return this}function mergeStream(){if(r){return}r=true;let e=t.shift();if(!e){process.nextTick(endStream);return}if(!Array.isArray(e)){e=[e]}let s=e.length+1;function next(){if(--s>0){return}r=false;mergeStream()}function pipe(t){function onend(){t.removeListener("merge2UnpipeEnd",onend);t.removeListener("end",onend);if(a){t.removeListener("error",onerror)}next()}function onerror(t){l.emit("error",t)}if(t._readableState.endEmitted){return next()}t.on("merge2UnpipeEnd",onend);t.on("end",onend);if(a){t.on("error",onerror)}t.pipe(l,{end:false});t.resume()}for(let t=0;t<e.length;t++){pipe(e[t])}next()}function endStream(){r=false;l.emit("queueDrain");if(o){l.end()}}l.setMaxListeners(0);l.add=addStream;l.on("unpipe",(function(t){t.emit("merge2UnpipeEnd")}));if(e.length){addStream.apply(null,e)}return l}function pauseStreams(t,e){if(!Array.isArray(t)){if(!t._readableState&&t.pipe){t=t.pipe(i(e))}if(!t._readableState||!t.pause||!t.pipe){throw new Error("Only readable stream can be merged.")}t.pause()}else{for(let r=0,s=t.length;r<s;r++){t[r]=pauseStreams(t[r],e)}}return t}},9015:(t,e,r)=>{"use strict";const s=r(3837);const i=r(538);const n=r(9138);const o=r(2924);const isEmptyString=t=>t===""||t==="./";const hasBraces=t=>{const e=t.indexOf("{");return e>-1&&t.indexOf("}",e)>-1};const micromatch=(t,e,r)=>{e=[].concat(e);t=[].concat(t);let s=new Set;let i=new Set;let o=new Set;let a=0;let onResult=t=>{o.add(t.output);if(r&&r.onResult){r.onResult(t)}};for(let o=0;o<e.length;o++){let l=n(String(e[o]),{...r,onResult:onResult},true);let u=l.state.negated||l.state.negatedExtglob;if(u)a++;for(let e of t){let t=l(e,true);let r=u?!t.isMatch:t.isMatch;if(!r)continue;if(u){s.add(t.output)}else{s.delete(t.output);i.add(t.output)}}}let l=a===e.length?[...o]:[...i];let u=l.filter((t=>!s.has(t)));if(r&&u.length===0){if(r.failglob===true){throw new Error(`No matches found for "${e.join(", ")}"`)}if(r.nonull===true||r.nullglob===true){return r.unescape?e.map((t=>t.replace(/\\/g,""))):e}}return u};micromatch.match=micromatch;micromatch.matcher=(t,e)=>n(t,e);micromatch.isMatch=(t,e,r)=>n(e,r)(t);micromatch.any=micromatch.isMatch;micromatch.not=(t,e,r={})=>{e=[].concat(e).map(String);let s=new Set;let i=[];let onResult=t=>{if(r.onResult)r.onResult(t);i.push(t.output)};let n=new Set(micromatch(t,e,{...r,onResult:onResult}));for(let t of i){if(!n.has(t)){s.add(t)}}return[...s]};micromatch.contains=(t,e,r)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${s.inspect(t)}"`)}if(Array.isArray(e)){return e.some((e=>micromatch.contains(t,e,r)))}if(typeof e==="string"){if(isEmptyString(t)||isEmptyString(e)){return false}if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e)){return true}}return micromatch.isMatch(t,e,{...r,contains:true})};micromatch.matchKeys=(t,e,r)=>{if(!o.isObject(t)){throw new TypeError("Expected the first argument to be an object")}let s=micromatch(Object.keys(t),e,r);let i={};for(let e of s)i[e]=t[e];return i};micromatch.some=(t,e,r)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),r);if(s.some((t=>e(t)))){return true}}return false};micromatch.every=(t,e,r)=>{let s=[].concat(t);for(let t of[].concat(e)){let e=n(String(t),r);if(!s.every((t=>e(t)))){return false}}return true};micromatch.all=(t,e,r)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${s.inspect(t)}"`)}return[].concat(e).every((e=>n(e,r)(t)))};micromatch.capture=(t,e,r)=>{let s=o.isWindows(r);let i=n.makeRe(String(t),{...r,capture:true});let a=i.exec(s?o.toPosixSlashes(e):e);if(a){return a.slice(1).map((t=>t===void 0?"":t))}};micromatch.makeRe=(...t)=>n.makeRe(...t);micromatch.scan=(...t)=>n.scan(...t);micromatch.parse=(t,e)=>{let r=[];for(let s of[].concat(t||[])){for(let t of i(String(s),e)){r.push(n.parse(t,e))}}return r};micromatch.braces=(t,e)=>{if(typeof t!=="string")throw new TypeError("Expected a string");if(e&&e.nobrace===true||!hasBraces(t)){return[t]}return i(t,e)};micromatch.braceExpand=(t,e)=>{if(typeof t!=="string")throw new TypeError("Expected a string");return micromatch.braces(t,{...e,expand:true})};micromatch.hasBraces=hasBraces;t.exports=micromatch},5912:t=>{"use strict";function hasKey(t,e){var r=t;e.slice(0,-1).forEach((function(t){r=r[t]||{}}));var s=e[e.length-1];return s in r}function isNumber(t){if(typeof t==="number"){return true}if(/^0x[0-9a-f]+$/i.test(t)){return true}return/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function isConstructorOrProto(t,e){return e==="constructor"&&typeof t[e]==="function"||e==="__proto__"}t.exports=function(t,e){if(!e){e={}}var r={bools:{},strings:{},unknownFn:null};if(typeof e.unknown==="function"){r.unknownFn=e.unknown}if(typeof e.boolean==="boolean"&&e.boolean){r.allBools=true}else{[].concat(e.boolean).filter(Boolean).forEach((function(t){r.bools[t]=true}))}var s={};function aliasIsBoolean(t){return s[t].some((function(t){return r.bools[t]}))}Object.keys(e.alias||{}).forEach((function(t){s[t]=[].concat(e.alias[t]);s[t].forEach((function(e){s[e]=[t].concat(s[t].filter((function(t){return e!==t})))}))}));[].concat(e.string).filter(Boolean).forEach((function(t){r.strings[t]=true;if(s[t]){[].concat(s[t]).forEach((function(t){r.strings[t]=true}))}}));var i=e.default||{};var n={_:[]};function argDefined(t,e){return r.allBools&&/^--[^=]+$/.test(e)||r.strings[t]||r.bools[t]||s[t]}function setKey(t,e,s){var i=t;for(var n=0;n<e.length-1;n++){var o=e[n];if(isConstructorOrProto(i,o)){return}if(i[o]===undefined){i[o]={}}if(i[o]===Object.prototype||i[o]===Number.prototype||i[o]===String.prototype){i[o]={}}if(i[o]===Array.prototype){i[o]=[]}i=i[o]}var a=e[e.length-1];if(isConstructorOrProto(i,a)){return}if(i===Object.prototype||i===Number.prototype||i===String.prototype){i={}}if(i===Array.prototype){i=[]}if(i[a]===undefined||r.bools[a]||typeof i[a]==="boolean"){i[a]=s}else if(Array.isArray(i[a])){i[a].push(s)}else{i[a]=[i[a],s]}}function setArg(t,e,i){if(i&&r.unknownFn&&!argDefined(t,i)){if(r.unknownFn(i)===false){return}}var o=!r.strings[t]&&isNumber(e)?Number(e):e;setKey(n,t.split("."),o);(s[t]||[]).forEach((function(t){setKey(n,t.split("."),o)}))}Object.keys(r.bools).forEach((function(t){setArg(t,i[t]===undefined?false:i[t])}));var o=[];if(t.indexOf("--")!==-1){o=t.slice(t.indexOf("--")+1);t=t.slice(0,t.indexOf("--"))}for(var a=0;a<t.length;a++){var l=t[a];var u;var c;if(/^--.+=/.test(l)){var h=l.match(/^--([^=]+)=([\s\S]*)$/);u=h[1];var d=h[2];if(r.bools[u]){d=d!=="false"}setArg(u,d,l)}else if(/^--no-.+/.test(l)){u=l.match(/^--no-(.+)/)[1];setArg(u,false,l)}else if(/^--.+/.test(l)){u=l.match(/^--(.+)/)[1];c=t[a+1];if(c!==undefined&&!/^(-|--)[^-]/.test(c)&&!r.bools[u]&&!r.allBools&&(s[u]?!aliasIsBoolean(u):true)){setArg(u,c,l);a+=1}else if(/^(true|false)$/.test(c)){setArg(u,c==="true",l);a+=1}else{setArg(u,r.strings[u]?"":true,l)}}else if(/^-[^-]+/.test(l)){var f=l.slice(1,-1).split("");var p=false;for(var g=0;g<f.length;g++){c=l.slice(g+2);if(c==="-"){setArg(f[g],c,l);continue}if(/[A-Za-z]/.test(f[g])&&c[0]==="="){setArg(f[g],c.slice(1),l);p=true;break}if(/[A-Za-z]/.test(f[g])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(c)){setArg(f[g],c,l);p=true;break}if(f[g+1]&&f[g+1].match(/\W/)){setArg(f[g],l.slice(g+2),l);p=true;break}else{setArg(f[g],r.strings[f[g]]?"":true,l)}}u=l.slice(-1)[0];if(!p&&u!=="-"){if(t[a+1]&&!/^(-|--)[^-]/.test(t[a+1])&&!r.bools[u]&&(s[u]?!aliasIsBoolean(u):true)){setArg(u,t[a+1],l);a+=1}else if(t[a+1]&&/^(true|false)$/.test(t[a+1])){setArg(u,t[a+1]==="true",l);a+=1}else{setArg(u,r.strings[u]?"":true,l)}}}else{if(!r.unknownFn||r.unknownFn(l)!==false){n._.push(r.strings._||!isNumber(l)?l:Number(l))}if(e.stopEarly){n._.push.apply(n._,t.slice(a+1));break}}}Object.keys(i).forEach((function(t){if(!hasKey(n,t.split("."))){setKey(n,t.split("."),i[t]);(s[t]||[]).forEach((function(e){setKey(n,e.split("."),i[t])}))}}));if(e["--"]){n["--"]=o.slice()}else{o.forEach((function(t){n._.push(t)}))}return n}},2170:t=>{"use strict";const pathKey=(t={})=>{const e=t.env||process.env;const r=t.platform||process.platform;if(r!=="win32"){return"PATH"}return Object.keys(e).reverse().find((t=>t.toUpperCase()==="PATH"))||"Path"};t.exports=pathKey;t.exports["default"]=pathKey},9138:(t,e,r)=>{"use strict";t.exports=r(4755)},8223:(t,e,r)=>{"use strict";const s=r(1017);const i="\\\\/";const n=`[^${i}]`;const o="\\.";const a="\\+";const l="\\?";const u="\\/";const c="(?=.)";const h="[^/]";const d=`(?:${u}|$)`;const f=`(?:^|${u})`;const p=`${o}{1,2}${d}`;const g=`(?!${o})`;const m=`(?!${f}${p})`;const y=`(?!${o}{0,1}${d})`;const v=`(?!${p})`;const b=`[^.${u}]`;const _=`${h}*?`;const S={DOT_LITERAL:o,PLUS_LITERAL:a,QMARK_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:c,QMARK:h,END_ANCHOR:d,DOTS_SLASH:p,NO_DOT:g,NO_DOTS:m,NO_DOT_SLASH:y,NO_DOTS_SLASH:v,QMARK_NO_DOT:b,STAR:_,START_ANCHOR:f};const w={...S,SLASH_LITERAL:`[${i}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${o}{1,2}(?:[${i}]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[${i}])${o}{1,2}(?:[${i}]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[${i}]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[${i}]|$))`,QMARK_NO_DOT:`[^.${i}]`,START_ANCHOR:`(?:^|[${i}])`,END_ANCHOR:`(?:[${i}]|$)`};const x={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:x,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:s.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===true?w:S}}},1833:(t,e,r)=>{"use strict";const s=r(8223);const i=r(2924);const{MAX_LENGTH:n,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:l,REPLACEMENTS:u}=s;const expandRange=(t,e)=>{if(typeof e.expandRange==="function"){return e.expandRange(...t,e)}t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch(e){return t.map((t=>i.escapeRegex(t))).join("..")}return r};const syntaxError=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`;const parse=(t,e)=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}t=u[t]||t;const r={...e};const c=typeof r.maxLength==="number"?Math.min(n,r.maxLength):n;let h=t.length;if(h>c){throw new SyntaxError(`Input length: ${h}, exceeds maximum allowed length: ${c}`)}const d={type:"bos",value:"",output:r.prepend||""};const f=[d];const p=r.capture?"":"?:";const g=i.isWindows(e);const m=s.globChars(g);const y=s.extglobChars(m);const{DOT_LITERAL:v,PLUS_LITERAL:b,SLASH_LITERAL:_,ONE_CHAR:S,DOTS_SLASH:w,NO_DOT:x,NO_DOT_SLASH:P,NO_DOTS_SLASH:E,QMARK:A,QMARK_NO_DOT:C,STAR:R,START_ANCHOR:k}=m;const globstar=t=>`(${p}(?:(?!${k}${t.dot?w:v}).)*?)`;const O=r.dot?"":x;const T=r.dot?A:C;let $=r.bash===true?globstar(r):R;if(r.capture){$=`(${$})`}if(typeof r.noext==="boolean"){r.noextglob=r.noext}const M={input:t,index:-1,start:0,dot:r.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:f};t=i.removePrefix(t,M);h=t.length;const D=[];const L=[];const F=[];let I=d;let H;const eos=()=>M.index===h-1;const N=M.peek=(e=1)=>t[M.index+e];const j=M.advance=()=>t[++M.index]||"";const remaining=()=>t.slice(M.index+1);const consume=(t="",e=0)=>{M.consumed+=t;M.index+=e};const append=t=>{M.output+=t.output!=null?t.output:t.value;consume(t.value)};const negate=()=>{let t=1;while(N()==="!"&&(N(2)!=="("||N(3)==="?")){j();M.start++;t++}if(t%2===0){return false}M.negated=true;M.start++;return true};const increment=t=>{M[t]++;F.push(t)};const decrement=t=>{M[t]--;F.pop()};const push=t=>{if(I.type==="globstar"){const e=M.braces>0&&(t.type==="comma"||t.type==="brace");const r=t.extglob===true||D.length&&(t.type==="pipe"||t.type==="paren");if(t.type!=="slash"&&t.type!=="paren"&&!e&&!r){M.output=M.output.slice(0,-I.output.length);I.type="star";I.value="*";I.output=$;M.output+=I.output}}if(D.length&&t.type!=="paren"){D[D.length-1].inner+=t.value}if(t.value||t.output)append(t);if(I&&I.type==="text"&&t.type==="text"){I.value+=t.value;I.output=(I.output||"")+t.value;return}t.prev=I;f.push(t);I=t};const extglobOpen=(t,e)=>{const s={...y[e],conditions:1,inner:""};s.prev=I;s.parens=M.parens;s.output=M.output;const i=(r.capture?"(":"")+s.open;increment("parens");push({type:t,value:e,output:M.output?"":S});push({type:"paren",extglob:true,value:j(),output:i});D.push(s)};const extglobClose=t=>{let s=t.close+(r.capture?")":"");let i;if(t.type==="negate"){let n=$;if(t.inner&&t.inner.length>1&&t.inner.includes("/")){n=globstar(r)}if(n!==$||eos()||/^\)+$/.test(remaining())){s=t.close=`)$))${n}`}if(t.inner.includes("*")&&(i=remaining())&&/^\.[^\\/.]+$/.test(i)){const r=parse(i,{...e,fastpaths:false}).output;s=t.close=`)${r})${n})`}if(t.prev.type==="bos"){M.negatedExtglob=true}}push({type:"paren",extglob:true,value:H,output:s});decrement("parens")};if(r.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let s=false;let n=t.replace(l,((t,e,r,i,n,o)=>{if(i==="\\"){s=true;return t}if(i==="?"){if(e){return e+i+(n?A.repeat(n.length):"")}if(o===0){return T+(n?A.repeat(n.length):"")}return A.repeat(r.length)}if(i==="."){return v.repeat(r.length)}if(i==="*"){if(e){return e+i+(n?$:"")}return $}return e?t:`\\${t}`}));if(s===true){if(r.unescape===true){n=n.replace(/\\/g,"")}else{n=n.replace(/\\+/g,(t=>t.length%2===0?"\\\\":t?"\\":""))}}if(n===t&&r.contains===true){M.output=t;return M}M.output=i.wrapOutput(n,M,e);return M}while(!eos()){H=j();if(H==="\0"){continue}if(H==="\\"){const t=N();if(t==="/"&&r.bash!==true){continue}if(t==="."||t===";"){continue}if(!t){H+="\\";push({type:"text",value:H});continue}const e=/^\\+/.exec(remaining());let s=0;if(e&&e[0].length>2){s=e[0].length;M.index+=s;if(s%2!==0){H+="\\"}}if(r.unescape===true){H=j()}else{H+=j()}if(M.brackets===0){push({type:"text",value:H});continue}}if(M.brackets>0&&(H!=="]"||I.value==="["||I.value==="[^")){if(r.posix!==false&&H===":"){const t=I.value.slice(1);if(t.includes("[")){I.posix=true;if(t.includes(":")){const t=I.value.lastIndexOf("[");const e=I.value.slice(0,t);const r=I.value.slice(t+2);const s=o[r];if(s){I.value=e+s;M.backtrack=true;j();if(!d.output&&f.indexOf(I)===1){d.output=S}continue}}}}if(H==="["&&N()!==":"||H==="-"&&N()==="]"){H=`\\${H}`}if(H==="]"&&(I.value==="["||I.value==="[^")){H=`\\${H}`}if(r.posix===true&&H==="!"&&I.value==="["){H="^"}I.value+=H;append({value:H});continue}if(M.quotes===1&&H!=='"'){H=i.escapeRegex(H);I.value+=H;append({value:H});continue}if(H==='"'){M.quotes=M.quotes===1?0:1;if(r.keepQuotes===true){push({type:"text",value:H})}continue}if(H==="("){increment("parens");push({type:"paren",value:H});continue}if(H===")"){if(M.parens===0&&r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const t=D[D.length-1];if(t&&M.parens===t.parens+1){extglobClose(D.pop());continue}push({type:"paren",value:H,output:M.parens?")":"\\)"});decrement("parens");continue}if(H==="["){if(r.nobracket===true||!remaining().includes("]")){if(r.nobracket!==true&&r.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}H=`\\${H}`}else{increment("brackets")}push({type:"bracket",value:H});continue}if(H==="]"){if(r.nobracket===true||I&&I.type==="bracket"&&I.value.length===1){push({type:"text",value:H,output:`\\${H}`});continue}if(M.brackets===0){if(r.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:H,output:`\\${H}`});continue}decrement("brackets");const t=I.value.slice(1);if(I.posix!==true&&t[0]==="^"&&!t.includes("/")){H=`/${H}`}I.value+=H;append({value:H});if(r.literalBrackets===false||i.hasRegexChars(t)){continue}const e=i.escapeRegex(I.value);M.output=M.output.slice(0,-I.value.length);if(r.literalBrackets===true){M.output+=e;I.value=e;continue}I.value=`(${p}${e}|${I.value})`;M.output+=I.value;continue}if(H==="{"&&r.nobrace!==true){increment("braces");const t={type:"brace",value:H,output:"(",outputIndex:M.output.length,tokensIndex:M.tokens.length};L.push(t);push(t);continue}if(H==="}"){const t=L[L.length-1];if(r.nobrace===true||!t){push({type:"text",value:H,output:H});continue}let e=")";if(t.dots===true){const t=f.slice();const s=[];for(let e=t.length-1;e>=0;e--){f.pop();if(t[e].type==="brace"){break}if(t[e].type!=="dots"){s.unshift(t[e].value)}}e=expandRange(s,r);M.backtrack=true}if(t.comma!==true&&t.dots!==true){const r=M.output.slice(0,t.outputIndex);const s=M.tokens.slice(t.tokensIndex);t.value=t.output="\\{";H=e="\\}";M.output=r;for(const t of s){M.output+=t.output||t.value}}push({type:"brace",value:H,output:e});decrement("braces");L.pop();continue}if(H==="|"){if(D.length>0){D[D.length-1].conditions++}push({type:"text",value:H});continue}if(H===","){let t=H;const e=L[L.length-1];if(e&&F[F.length-1]==="braces"){e.comma=true;t="|"}push({type:"comma",value:H,output:t});continue}if(H==="/"){if(I.type==="dot"&&M.index===M.start+1){M.start=M.index+1;M.consumed="";M.output="";f.pop();I=d;continue}push({type:"slash",value:H,output:_});continue}if(H==="."){if(M.braces>0&&I.type==="dot"){if(I.value===".")I.output=v;const t=L[L.length-1];I.type="dots";I.output+=H;I.value+=H;t.dots=true;continue}if(M.braces+M.parens===0&&I.type!=="bos"&&I.type!=="slash"){push({type:"text",value:H,output:v});continue}push({type:"dot",value:H,output:v});continue}if(H==="?"){const t=I&&I.value==="(";if(!t&&r.noextglob!==true&&N()==="("&&N(2)!=="?"){extglobOpen("qmark",H);continue}if(I&&I.type==="paren"){const t=N();let e=H;if(t==="<"&&!i.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(I.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(remaining())){e=`\\${H}`}push({type:"text",value:H,output:e});continue}if(r.dot!==true&&(I.type==="slash"||I.type==="bos")){push({type:"qmark",value:H,output:C});continue}push({type:"qmark",value:H,output:A});continue}if(H==="!"){if(r.noextglob!==true&&N()==="("){if(N(2)!=="?"||!/[!=<:]/.test(N(3))){extglobOpen("negate",H);continue}}if(r.nonegate!==true&&M.index===0){negate();continue}}if(H==="+"){if(r.noextglob!==true&&N()==="("&&N(2)!=="?"){extglobOpen("plus",H);continue}if(I&&I.value==="("||r.regex===false){push({type:"plus",value:H,output:b});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||M.parens>0){push({type:"plus",value:H});continue}push({type:"plus",value:b});continue}if(H==="@"){if(r.noextglob!==true&&N()==="("&&N(2)!=="?"){push({type:"at",extglob:true,value:H,output:""});continue}push({type:"text",value:H});continue}if(H!=="*"){if(H==="$"||H==="^"){H=`\\${H}`}const t=a.exec(remaining());if(t){H+=t[0];M.index+=t[0].length}push({type:"text",value:H});continue}if(I&&(I.type==="globstar"||I.star===true)){I.type="star";I.star=true;I.value+=H;I.output=$;M.backtrack=true;M.globstar=true;consume(H);continue}let e=remaining();if(r.noextglob!==true&&/^\([^?]/.test(e)){extglobOpen("star",H);continue}if(I.type==="star"){if(r.noglobstar===true){consume(H);continue}const s=I.prev;const i=s.prev;const n=s.type==="slash"||s.type==="bos";const o=i&&(i.type==="star"||i.type==="globstar");if(r.bash===true&&(!n||e[0]&&e[0]!=="/")){push({type:"star",value:H,output:""});continue}const a=M.braces>0&&(s.type==="comma"||s.type==="brace");const l=D.length&&(s.type==="pipe"||s.type==="paren");if(!n&&s.type!=="paren"&&!a&&!l){push({type:"star",value:H,output:""});continue}while(e.slice(0,3)==="/**"){const r=t[M.index+4];if(r&&r!=="/"){break}e=e.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){I.type="globstar";I.value+=H;I.output=globstar(r);M.output=I.output;M.globstar=true;consume(H);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!o&&eos()){M.output=M.output.slice(0,-(s.output+I.output).length);s.output=`(?:${s.output}`;I.type="globstar";I.output=globstar(r)+(r.strictSlashes?")":"|$)");I.value+=H;M.globstar=true;M.output+=s.output+I.output;consume(H);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&e[0]==="/"){const t=e[1]!==void 0?"|$":"";M.output=M.output.slice(0,-(s.output+I.output).length);s.output=`(?:${s.output}`;I.type="globstar";I.output=`${globstar(r)}${_}|${_}${t})`;I.value+=H;M.output+=s.output+I.output;M.globstar=true;consume(H+j());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&e[0]==="/"){I.type="globstar";I.value+=H;I.output=`(?:^|${_}|${globstar(r)}${_})`;M.output=I.output;M.globstar=true;consume(H+j());push({type:"slash",value:"/",output:""});continue}M.output=M.output.slice(0,-I.output.length);I.type="globstar";I.output=globstar(r);I.value+=H;M.output+=I.output;M.globstar=true;consume(H);continue}const s={type:"star",value:H,output:$};if(r.bash===true){s.output=".*?";if(I.type==="bos"||I.type==="slash"){s.output=O+s.output}push(s);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&r.regex===true){s.output=H;push(s);continue}if(M.index===M.start||I.type==="slash"||I.type==="dot"){if(I.type==="dot"){M.output+=P;I.output+=P}else if(r.dot===true){M.output+=E;I.output+=E}else{M.output+=O;I.output+=O}if(N()!=="*"){M.output+=S;I.output+=S}}push(s)}while(M.brackets>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));M.output=i.escapeLast(M.output,"[");decrement("brackets")}while(M.parens>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));M.output=i.escapeLast(M.output,"(");decrement("parens")}while(M.braces>0){if(r.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));M.output=i.escapeLast(M.output,"{");decrement("braces")}if(r.strictSlashes!==true&&(I.type==="star"||I.type==="bracket")){push({type:"maybe_slash",value:"",output:`${_}?`})}if(M.backtrack===true){M.output="";for(const t of M.tokens){M.output+=t.output!=null?t.output:t.value;if(t.suffix){M.output+=t.suffix}}}return M};parse.fastpaths=(t,e)=>{const r={...e};const o=typeof r.maxLength==="number"?Math.min(n,r.maxLength):n;const a=t.length;if(a>o){throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`)}t=u[t]||t;const l=i.isWindows(e);const{DOT_LITERAL:c,SLASH_LITERAL:h,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:g,NO_DOTS_SLASH:m,STAR:y,START_ANCHOR:v}=s.globChars(l);const b=r.dot?g:p;const _=r.dot?m:p;const S=r.capture?"":"?:";const w={negated:false,prefix:""};let x=r.bash===true?".*?":y;if(r.capture){x=`(${x})`}const globstar=t=>{if(t.noglobstar===true)return x;return`(${S}(?:(?!${v}${t.dot?f:c}).)*?)`};const create=t=>{switch(t){case"*":return`${b}${d}${x}`;case".*":return`${c}${d}${x}`;case"*.*":return`${b}${x}${c}${d}${x}`;case"*/*":return`${b}${x}${h}${d}${_}${x}`;case"**":return b+globstar(r);case"**/*":return`(?:${b}${globstar(r)}${h})?${_}${d}${x}`;case"**/*.*":return`(?:${b}${globstar(r)}${h})?${_}${x}${c}${d}${x}`;case"**/.*":return`(?:${b}${globstar(r)}${h})?${c}${d}${x}`;default:{const e=/^(.*?)\.(\w+)$/.exec(t);if(!e)return;const r=create(e[1]);if(!r)return;return r+c+e[2]}}};const P=i.removePrefix(t,w);let E=create(P);if(E&&r.strictSlashes!==true){E+=`${h}?`}return E};t.exports=parse},4755:(t,e,r)=>{"use strict";const s=r(1017);const i=r(2017);const n=r(1833);const o=r(2924);const a=r(8223);const isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);const picomatch=(t,e,r=false)=>{if(Array.isArray(t)){const s=t.map((t=>picomatch(t,e,r)));const arrayMatcher=t=>{for(const e of s){const r=e(t);if(r)return r}return false};return arrayMatcher}const s=isObject(t)&&t.tokens&&t.input;if(t===""||typeof t!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const i=e||{};const n=o.isWindows(e);const a=s?picomatch.compileRe(t,e):picomatch.makeRe(t,e,false,true);const l=a.state;delete a.state;let isIgnored=()=>false;if(i.ignore){const t={...e,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(i.ignore,t,r)}const matcher=(r,s=false)=>{const{isMatch:o,match:u,output:c}=picomatch.test(r,a,e,{glob:t,posix:n});const h={glob:t,state:l,regex:a,posix:n,input:r,output:c,match:u,isMatch:o};if(typeof i.onResult==="function"){i.onResult(h)}if(o===false){h.isMatch=false;return s?h:false}if(isIgnored(r)){if(typeof i.onIgnore==="function"){i.onIgnore(h)}h.isMatch=false;return s?h:false}if(typeof i.onMatch==="function"){i.onMatch(h)}return s?h:true};if(r){matcher.state=l}return matcher};picomatch.test=(t,e,r,{glob:s,posix:i}={})=>{if(typeof t!=="string"){throw new TypeError("Expected input to be a string")}if(t===""){return{isMatch:false,output:""}}const n=r||{};const a=n.format||(i?o.toPosixSlashes:null);let l=t===s;let u=l&&a?a(t):t;if(l===false){u=a?a(t):t;l=u===s}if(l===false||n.capture===true){if(n.matchBase===true||n.basename===true){l=picomatch.matchBase(t,e,r,i)}else{l=e.exec(u)}}return{isMatch:Boolean(l),match:l,output:u}};picomatch.matchBase=(t,e,r,i=o.isWindows(r))=>{const n=e instanceof RegExp?e:picomatch.makeRe(e,r);return n.test(s.basename(t))};picomatch.isMatch=(t,e,r)=>picomatch(e,r)(t);picomatch.parse=(t,e)=>{if(Array.isArray(t))return t.map((t=>picomatch.parse(t,e)));return n(t,{...e,fastpaths:false})};picomatch.scan=(t,e)=>i(t,e);picomatch.compileRe=(t,e,r=false,s=false)=>{if(r===true){return t.output}const i=e||{};const n=i.contains?"":"^";const o=i.contains?"":"$";let a=`${n}(?:${t.output})${o}`;if(t&&t.negated===true){a=`^(?!${a}).*$`}const l=picomatch.toRegex(a,e);if(s===true){l.state=t}return l};picomatch.makeRe=(t,e={},r=false,s=false)=>{if(!t||typeof t!=="string"){throw new TypeError("Expected a non-empty string")}let i={negated:false,fastpaths:true};if(e.fastpaths!==false&&(t[0]==="."||t[0]==="*")){i.output=n.fastpaths(t,e)}if(!i.output){i=n(t,e)}return picomatch.compileRe(i,e,r,s)};picomatch.toRegex=(t,e)=>{try{const r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(t){if(e&&e.debug===true)throw t;return/$^/}};picomatch.constants=a;t.exports=picomatch},2017:(t,e,r)=>{"use strict";const s=r(2924);const{CHAR_ASTERISK:i,CHAR_AT:n,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:l,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:c,CHAR_LEFT_CURLY_BRACE:h,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:y,CHAR_RIGHT_SQUARE_BRACKET:v}=r(8223);const isPathSeparator=t=>t===c||t===o;const depth=t=>{if(t.isPrefix!==true){t.depth=t.isGlobstar?Infinity:1}};const scan=(t,e)=>{const r=e||{};const b=t.length-1;const _=r.parts===true||r.scanToEnd===true;const S=[];const w=[];const x=[];let P=t;let E=-1;let A=0;let C=0;let R=false;let k=false;let O=false;let T=false;let $=false;let M=false;let D=false;let L=false;let F=false;let I=false;let H=0;let N;let j;let B={value:"",depth:0,isGlob:false};const eos=()=>E>=b;const peek=()=>P.charCodeAt(E+1);const advance=()=>{N=j;return P.charCodeAt(++E)};while(E<b){j=advance();let t;if(j===o){D=B.backslashes=true;j=advance();if(j===h){M=true}continue}if(M===true||j===h){H++;while(eos()!==true&&(j=advance())){if(j===o){D=B.backslashes=true;advance();continue}if(j===h){H++;continue}if(M!==true&&j===l&&(j=advance())===l){R=B.isBrace=true;O=B.isGlob=true;I=true;if(_===true){continue}break}if(M!==true&&j===a){R=B.isBrace=true;O=B.isGlob=true;I=true;if(_===true){continue}break}if(j===m){H--;if(H===0){M=false;R=B.isBrace=true;I=true;break}}}if(_===true){continue}break}if(j===c){S.push(E);w.push(B);B={value:"",depth:0,isGlob:false};if(I===true)continue;if(N===l&&E===A+1){A+=2;continue}C=E+1;continue}if(r.noext!==true){const t=j===p||j===n||j===i||j===g||j===u;if(t===true&&peek()===d){O=B.isGlob=true;T=B.isExtglob=true;I=true;if(j===u&&E===A){F=true}if(_===true){while(eos()!==true&&(j=advance())){if(j===o){D=B.backslashes=true;j=advance();continue}if(j===y){O=B.isGlob=true;I=true;break}}continue}break}}if(j===i){if(N===i)$=B.isGlobstar=true;O=B.isGlob=true;I=true;if(_===true){continue}break}if(j===g){O=B.isGlob=true;I=true;if(_===true){continue}break}if(j===f){while(eos()!==true&&(t=advance())){if(t===o){D=B.backslashes=true;advance();continue}if(t===v){k=B.isBracket=true;O=B.isGlob=true;I=true;break}}if(_===true){continue}break}if(r.nonegate!==true&&j===u&&E===A){L=B.negated=true;A++;continue}if(r.noparen!==true&&j===d){O=B.isGlob=true;if(_===true){while(eos()!==true&&(j=advance())){if(j===d){D=B.backslashes=true;j=advance();continue}if(j===y){I=true;break}}continue}break}if(O===true){I=true;if(_===true){continue}break}}if(r.noext===true){T=false;O=false}let G=P;let U="";let W="";if(A>0){U=P.slice(0,A);P=P.slice(A);C-=A}if(G&&O===true&&C>0){G=P.slice(0,C);W=P.slice(C)}else if(O===true){G="";W=P}else{G=P}if(G&&G!==""&&G!=="/"&&G!==P){if(isPathSeparator(G.charCodeAt(G.length-1))){G=G.slice(0,-1)}}if(r.unescape===true){if(W)W=s.removeBackslashes(W);if(G&&D===true){G=s.removeBackslashes(G)}}const V={prefix:U,input:t,start:A,base:G,glob:W,isBrace:R,isBracket:k,isGlob:O,isExtglob:T,isGlobstar:$,negated:L,negatedExtglob:F};if(r.tokens===true){V.maxDepth=0;if(!isPathSeparator(j)){w.push(B)}V.tokens=w}if(r.parts===true||r.tokens===true){let e;for(let s=0;s<S.length;s++){const i=e?e+1:A;const n=S[s];const o=t.slice(i,n);if(r.tokens){if(s===0&&A!==0){w[s].isPrefix=true;w[s].value=U}else{w[s].value=o}depth(w[s]);V.maxDepth+=w[s].depth}if(s!==0||o!==""){x.push(o)}e=n}if(e&&e+1<t.length){const s=t.slice(e+1);x.push(s);if(r.tokens){w[w.length-1].value=s;depth(w[w.length-1]);V.maxDepth+=w[w.length-1].depth}}V.slashes=S;V.parts=x}return V};t.exports=scan},2924:(t,e,r)=>{"use strict";const s=r(1017);const i=process.platform==="win32";const{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:l}=r(8223);e.isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);e.hasRegexChars=t=>a.test(t);e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t);e.escapeRegex=t=>t.replace(l,"\\$1");e.toPosixSlashes=t=>t.replace(n,"/");e.removeBackslashes=t=>t.replace(o,(t=>t==="\\"?"":t));e.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);if(t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10){return true}return false};e.isWindows=t=>{if(t&&typeof t.windows==="boolean"){return t.windows}return i===true||s.sep==="\\"};e.escapeLast=(t,r,s)=>{const i=t.lastIndexOf(r,s);if(i===-1)return t;if(t[i-1]==="\\")return e.escapeLast(t,r,i-1);return`${t.slice(0,i)}\\${t.slice(i)}`};e.removePrefix=(t,e={})=>{let r=t;if(r.startsWith("./")){r=r.slice(2);e.prefix="./"}return r};e.wrapOutput=(t,e={},r={})=>{const s=r.contains?"":"^";const i=r.contains?"":"$";let n=`${s}(?:${t})${i}`;if(e.negated===true){n=`(?:^(?!${n}).*$)`}return n}},399:t=>{"use strict";class DatePart{constructor({token:t,date:e,parts:r,locales:s}){this.token=t;this.date=e||new Date;this.parts=r||[this];this.locales=s||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((e,r)=>r>t&&e instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const e=t.indexOf(this);return t.find(((t,r)=>r>e&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},7967:(t,e,r)=>{"use strict";const s=r(399);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends s{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let e=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?e+1:this.token==="ddd"?this.locales.weekdaysShort[e]:this.token==="dddd"?this.locales.weekdays[e]:t}}t.exports=Day},4102:(t,e,r)=>{"use strict";const s=r(399);class Hours extends s{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},7517:(t,e,r)=>{"use strict";t.exports={DatePart:r(399),Meridiem:r(4128),Day:r(7967),Hours:r(4102),Milliseconds:r(6945),Minutes:r(7829),Month:r(8608),Seconds:r(812),Year:r(5227)}},4128:(t,e,r)=>{"use strict";const s=r(399);class Meridiem extends s{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},6945:(t,e,r)=>{"use strict";const s=r(399);class Milliseconds extends s{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},7829:(t,e,r)=>{"use strict";const s=r(399);class Minutes extends s{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},8608:(t,e,r)=>{"use strict";const s=r(399);class Month extends s{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let e=this.token.length;return e===2?String(t+1).padStart(2,"0"):e===3?this.locales.monthsShort[t]:e===4?this.locales.months[t]:String(t+1)}}t.exports=Month},812:(t,e,r)=>{"use strict";const s=r(399);class Seconds extends s{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},5227:(t,e,r)=>{"use strict";const s=r(399);class Year extends s{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},935:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor;const a=r(2800),l=a.style,u=a.clear,c=a.figures,h=a.strip;const getVal=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]);const getTitle=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]);const getIndex=(t,e)=>{const r=t.findIndex((t=>t.value===e||t.title===e));return r>-1?r:undefined};class AutocompletePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.fallback=t.fallback||(t.initial!==undefined?`${c.pointerSmall} ${getTitle(this.choices,this.initial)}`:`${c.pointerSmall} ${t.noMatches||"no matches found"}`);this.suggestions=[[]];this.page=0;this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=l.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=u("");this.complete(this.render);this.render()}moveSelect(t){this.select=t;if(this.suggestions[this.page].length>0){this.value=getVal(this.suggestions[this.page],t)}else{this.value=this.initial!==undefined?getVal(this.choices,this.initial):null}this.fire()}complete(t){var e=this;return _asyncToGenerator((function*(){const r=e.completing=e.suggest(e.input,e.choices);const s=yield r;if(e.completing!==r)return;e.suggestions=s.map(((t,e,r)=>({title:getTitle(r,e),value:getVal(r,e)}))).reduce(((t,r)=>{if(t[t.length-1].length<e.limit)t[t.length-1].push(r);else t.push([r]);return t}),[[]]);e.isFallback=false;e.completing=false;if(!e.suggestions[e.page])e.page=0;if(!e.suggestions.length&&e.fallback){const t=getIndex(e.choices,e.fallback);e.suggestions=[[]];if(t!==undefined)e.suggestions[0].push({title:getTitle(e.choices,t),value:getVal(e.choices,t)});e.isFallback=true}const i=Math.max(s.length-1,0);e.moveSelect(Math.min(i,e.select));t&&t()}))()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,e){let r=this.input.slice(0,this.cursor);let s=this.input.slice(this.cursor);this.input=`${r}${t}${s}`;this.cursor=r.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let e=this.input.slice(this.cursor);this.input=`${t}${e}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let e=this.input.slice(this.cursor+1);this.input=`${t}${e}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions[this.page].length-1);this.render()}up(){if(this.select<=0)return this.bell();this.moveSelect(this.select-1);this.render()}down(){if(this.select>=this.suggestions[this.page].length-1)return this.bell();this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions[this.page].length-1){this.page=(this.page+1)%this.suggestions.length;this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){if(this.page>=this.suggestions.length-1)return this.bell();this.page++;this.moveSelect(0);this.render()}prevPage(){if(this.page<=0)return this.bell();this.page--;this.moveSelect(0);this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}render(){if(this.closed)return;super.render();if(this.lineCount)this.out.write(o.down(this.lineCount));let t=s.bold(`${l.symbol(this.done,this.aborted)} ${this.msg} `)+`${l.delimiter(this.completing)} `;let e=h(t).length;if(this.done&&this.suggestions[this.page][this.select]){t+=`${this.suggestions[this.page][this.select].title}`}else{this.rendered=`${this.transform.render(this.input)}`;e+=this.rendered.length;t+=this.rendered}if(!this.done){this.lineCount=this.suggestions[this.page].length;let e=this.suggestions[this.page].reduce(((t,e,r)=>t+`\n${r===this.select?s.cyan(e.title):e.title}`),"");if(e&&!this.isFallback){t+=e;if(this.suggestions.length>1){this.lineCount++;t+=s.blue(`\nPage ${this.page+1}/${this.suggestions.length}`)}}else{const e=getIndex(this.choices,this.fallback);const r=e!==undefined?getTitle(this.choices,e):this.fallback;t+=`\n${s.gray(r)}`;this.lineCount++}}this.out.write(this.clear+t);this.clear=u(t);if(this.lineCount&&!this.done){let t=o.up(this.lineCount);t+=o.left+o.to(e);t+=o.move(-this.rendered.length+this.cursor*this.scale);this.out.write(t)}}}t.exports=AutocompletePrompt},2040:(t,e,r)=>{"use strict";const s=r(9439);const i=r(332),n=i.cursor;const o=r(4047);const a=r(2800),l=a.clear,u=a.style,c=a.figures;class AutocompleteMultiselectPrompt extends o{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=l("");this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const e=this.filteredOptions.findIndex((e=>e===t));this.cursor=e<0?0:e;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,e){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){return`\nInstructions:\n ${c.arrowUp}/${c.arrowDown}: Highlight option\n ${c.arrowLeft}/${c.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n `}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:s.gray("Enter something to filter")}\n`}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(c.radioOn):c.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);super.render();let t=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=l(t)}}t.exports=AutocompleteMultiselectPrompt},5680:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style;const a=r(332),l=a.erase,u=a.cursor;class ConfirmPrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,e){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);super.render();this.out.write(l.line+u.to(0)+[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:s.gray(this.initialValue?this.yesOption:this.noOption)].join(" "))}}t.exports=ConfirmPrompt},3031:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear,l=n.figures,u=n.strip;const c=r(332),h=c.erase,d=c.cursor;const f=r(7517),p=f.DatePart,g=f.Meridiem,m=f.Day,y=f.Hours,v=f.Milliseconds,b=f.Minutes,_=f.Month,S=f.Seconds,w=f.Year;const x=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const P={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new m(t),3:t=>new _(t),4:t=>new w(t),5:t=>new g(t),6:t=>new y(t),7:t=>new b(t),8:t=>new S(t),9:t=>new v(t)};const E={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(E,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=a("");this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let e;this.parts=[];while(e=x.exec(t)){let t=e.shift();let r=e.findIndex((t=>t!=null));this.parts.push(r in P?P[r]({token:e[r]||t,date:this.date,parts:this.parts,locales:this.locales}):e[r]||t)}let r=this.parts.reduce(((t,e)=>{if(typeof e==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=e;else t.push(e);return t}),[]);this.parts.splice(0);this.parts.push(...r);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof p)));this.fire();this.render()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let e=yield t.validator(t.value);if(typeof e==="string"){t.errorMsg=e;e=false}t.error=!e}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color="red";t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof p)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(d.hide);else this.out.write(h.lines(1));super.render();let t=h.line+(this.lines?h.down(this.lines):"")+d.to(0);this.lines=0;let e="";if(this.error){let t=this.errorMsg.split("\n");e=t.reduce(((t,e,r)=>t+`\n${r?` `:l.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(false),this.parts.reduce(((t,e,r)=>t.concat(r===this.cursor&&!this.done?s.cyan().underline(e.toString()):e)),[]).join("")].join(" ");let i="";if(this.lines){i+=d.up(this.lines);i+=d.left+d.to(u(r).length)}this.out.write(t+r+e+i)}}t.exports=DatePrompt},9956:(t,e,r)=>{"use strict";t.exports={TextPrompt:r(5430),SelectPrompt:r(8856),TogglePrompt:r(9692),DatePrompt:r(3031),NumberPrompt:r(8831),MultiselectPrompt:r(4047),AutocompletePrompt:r(935),AutocompleteMultiselectPrompt:r(2040),ConfirmPrompt:r(5680)}},4047:(t,e,r)=>{"use strict";const s=r(9439);const i=r(332),n=i.cursor;const o=r(5876);const a=r(2800),l=a.clear,u=a.figures,c=a.style;class MultiselectPrompt extends o{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.value=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=l("");if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}_(t,e){if(t===" "){this.handleSpaceToggle()}else{return this.bell()}}renderInstructions(){return`\nInstructions:\n ${u.arrowUp}/${u.arrowDown}: Highlight option\n ${u.arrowLeft}/${u.arrowRight}/[space]: Toggle selection\n enter/return: Complete answer\n `}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(u.radioOn):u.radioOff)+" "+i}paginateOptions(t){const e=this.cursor;let r=t.map(((t,r)=>this.renderOption(e,t,r)));const i=10;let n=r;let o="";if(r.length===0){return s.red("No matches for this query.")}else if(r.length>i){let a=e-i/2;let l=e+i/2;if(a<0){a=0;l=i}else if(l>t.length){l=t.length;a=l-i}n=r.slice(a,l);o=s.dim("(Move up and down to reveal more choices)")}return"\n"+n.join("\n")+"\n"+o}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(n.hide);super.render();let t=[c.symbol(this.done,this.aborted),s.bold(this.msg),c.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=l(t)}}t.exports=MultiselectPrompt},8831:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor,a=n.erase;const l=r(2800),u=l.style,c=l.clear,h=l.figures,d=l.strip;const f=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r};class NumberPrompt extends i{constructor(t={}){super(t);this.transform=u.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=s.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||f.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let e=yield t.validator(t.value);if(typeof e===`string`){t.errorMsg=e;e=false}t.error=!e}))()}submit(){var t=this;return _asyncToGenerator((function*(){yield t.validate();if(t.error){t.color=`red`;t.fire();t.render();return}let e=t.value;t.value=e!==``?e:t.initial;t.done=true;t.aborted=false;t.error=false;t.fire();t.render();t.out.write(`\n`);t.close()}))()}up(){this.typed=``;if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,e){if(!this.valid(t))return this.bell();const r=Date.now();if(r-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=r;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;super.render();let t=a.line+(this.lines?a.down(this.lines):``)+o.to(0);this.lines=0;let e=``;if(this.error){let t=this.errorMsg.split(`\n`);e+=t.reduce(((t,e,r)=>t+`\n${r?` `:h.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=!this.done||!this.done&&!this.placeholder;let i=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(this.done),r?s[this.color]().underline(this.rendered):this.rendered].join(` `);let n=``;if(this.lines){n+=o.up(this.lines);n+=o.left+o.to(d(i).length)}this.out.write(t+i+e+n)}}t.exports=NumberPrompt},5876:(t,e,r)=>{"use strict";const s=r(4521);const i=r(2800),n=i.action;const o=r(2361);const a=r(332),l=a.beep,u=a.cursor;const c=r(9439);class Prompt extends o{constructor(t={}){super();this.firstRender=true;this.in=t.in||process.stdin;this.out=t.out||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const e=s.createInterface(this.in);s.emitKeypressEvents(this.in,e);if(this.in.isTTY)this.in.setRawMode(true);const keypress=(t,e)=>{let r=n(e);if(r===false){this._&&this._(t,e)}else if(typeof this[r]==="function"){this[r](e)}else{this.bell()}};this.close=()=>{this.out.write(u.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);e.close();this.emit(this.aborted?"abort":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted})}bell(){this.out.write(l)}render(){this.onRender(c);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},8856:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear,l=n.figures;const u=r(332),c=u.erase,h=u.cursor;class SelectPrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.value=(this.choices[this.cursor]||{}).value;this.clear=a("");this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0)return this.bell();this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)return this.bell();this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,e){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(h.hide);else this.out.write(c.lines(this.choices.length+1));super.render();this.out.write([o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(false),this.done?this.selection.title:this.selection.disabled?s.yellow(this.warn):s.gray(this.hint)].join(" "));if(!this.done){this.out.write("\n"+this.choices.map(((t,e)=>{let r,i;if(t.disabled){r=this.cursor===e?s.gray().underline(t.title):s.strikethrough().gray(t.title);i=this.cursor===e?s.bold().gray(l.pointer)+" ":" "}else{r=this.cursor===e?s.cyan().underline(t.title):t.title;i=this.cursor===e?s.cyan(l.pointer)+" ":" "}return`${i} ${r}`})).join("\n"))}}}t.exports=SelectPrompt},5430:(t,e,r)=>{"use strict";function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(9439);const i=r(5876);const n=r(332),o=n.cursor;const a=r(2800),l=a.style,u=a.clear,c=a.strip,h=a.figures;class TextPrompt extends i{constructor(t={}){super(t);this.transform=l.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.clear=u(``);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=s.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.fire();this.render()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}validate(){var t=this;return _asyncToGenerator((function*(){let e=yield t.validator(t.value);if(typeof e===`string`){t.errorMsg=e;e=false}t.error=!e}))()}submit(){var t=this;return _asyncToGenerator((function*(){t.value=t.value||t.initial;yield t.validate();if(t.error){t.red=true;t.fire();t.render();return}t.done=true;t.aborted=false;t.fire();t.render();t.out.write("\n");t.close()}))()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t}_(t,e){let r=this.value.slice(0,this.cursor);let s=this.value.slice(this.cursor);this.value=`${r}${t}${s}`;this.red=false;this.cursor=this.placeholder?0:r.length+1;this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.value.slice(0,this.cursor-1);let e=this.value.slice(this.cursor);this.value=`${t}${e}`;this.red=false;this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let e=this.value.slice(this.cursor+1);this.value=`${t}${e}`;this.red=false;this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}render(){if(this.closed)return;super.render();let t=(this.lines?o.down(this.lines):``)+this.clear;this.lines=0;let e=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(` `);let r=``;if(this.error){let t=this.errorMsg.split(`\n`);r+=t.reduce(((t,e,r)=>t+=`\n${r?" ":h.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let i=``;if(this.lines){i+=o.up(this.lines);i+=o.left+o.to(c(e).length)}i+=o.move(this.placeholder?-this.initial.length*this.scale:-this.rendered.length+this.cursor*this.scale);this.out.write(t+e+r+i);this.clear=u(e+r)}}t.exports=TextPrompt},9692:(t,e,r)=>{"use strict";const s=r(9439);const i=r(5876);const n=r(2800),o=n.style,a=n.clear;const l=r(332),u=l.cursor,c=l.erase;class TogglePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,e){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);super.render();this.out.write(c.lines(this.first?1:this.msg.split(/\n/g).length)+u.to(0)+[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.value?this.inactive:s.cyan().underline(this.inactive),s.gray("/"),this.value?s.cyan().underline(this.active):this.active].join(" "))}}t.exports=TogglePrompt},6598:(t,e,r)=>{"use strict";function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};var s=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){s=s.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))}s.forEach((function(e){_defineProperty(t,e,r[e])}))}return t}function _defineProperty(t,e,r){if(e in t){Object.defineProperty(t,e,{value:r,enumerable:true,configurable:true,writable:true})}else{t[e]=r}return t}function asyncGeneratorStep(t,e,r,s,i,n,o){try{var a=t[n](o);var l=a.value}catch(t){r(t);return}if(a.done){e(l)}else{Promise.resolve(l).then(s,i)}}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(s,i){var n=t.apply(e,r);function _next(t){asyncGeneratorStep(n,s,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(n,s,i,_next,_throw,"throw",t)}_next(undefined)}))}}const s=r(4591);const i=["suggest","format","onState","validate","onRender"];const noop=()=>{};function prompt(){return _prompt.apply(this,arguments)}function _prompt(){_prompt=_asyncToGenerator((function*(t=[],{onSubmit:e=noop,onCancel:r=noop}={}){const n={};const o=prompt._override||{};t=[].concat(t);let a,l,u,c,h;const d=function(){var t=_asyncToGenerator((function*(t,e,r=false){if(!r&&t.validate&&t.validate(e)!==true){return}return t.format?yield t.format(e,n):e}));return function getFormattedAnswer(e,r){return t.apply(this,arguments)}}();var f=true;var p=false;var g=undefined;try{for(var m=t[Symbol.iterator](),y;!(f=(y=m.next()).done);f=true){l=y.value;var v=l;c=v.name;h=v.type;for(let t in l){if(i.includes(t))continue;let e=l[t];l[t]=typeof e==="function"?yield e(a,_objectSpread({},n),l):e}if(typeof l.message!=="string"){throw new Error("prompt message is required")}var b=l;c=b.name;h=b.type;if(!h)continue;if(s[h]===void 0){throw new Error(`prompt type (${h}) is not defined`)}if(o[l.name]!==undefined){a=yield d(l,o[l.name]);if(a!==undefined){n[c]=a;continue}}try{a=prompt._injected?getInjectedAnswer(prompt._injected):yield s[h](l);n[c]=a=yield d(l,a,true);u=yield e(l,a,n)}catch(t){u=!(yield r(l,n))}if(u)return n}}catch(t){p=true;g=t}finally{try{if(!f&&m.return!=null){m.return()}}finally{if(p){throw g}}}return n}));return _prompt.apply(this,arguments)}function getInjectedAnswer(t){const e=t.shift();if(e instanceof Error){throw e}return e}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:s,inject:inject,override:override})},4591:(t,e,r)=>{"use strict";const s=e;const i=r(9956);const noop=t=>t;function toPrompt(t,e,r={}){return new Promise(((s,n)=>{const o=new i[t](e);const a=r.onAbort||noop;const l=r.onSubmit||noop;o.on("state",e.onState||noop);o.on("submit",(t=>s(l(t))));o.on("abort",(t=>n(a(t))))}))}s.text=t=>toPrompt("TextPrompt",t);s.password=t=>{t.style="password";return s.text(t)};s.invisible=t=>{t.style="invisible";return s.text(t)};s.number=t=>toPrompt("NumberPrompt",t);s.date=t=>toPrompt("DatePrompt",t);s.confirm=t=>toPrompt("ConfirmPrompt",t);s.list=t=>{const e=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(e).map((t=>t.trim()))})};s.toggle=t=>toPrompt("TogglePrompt",t);s.select=t=>toPrompt("SelectPrompt",t);s.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};s.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,e)=>Promise.resolve(e.filter((e=>e.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));s.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},8692:t=>{"use strict";t.exports=t=>{if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"abort";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},3513:(t,e,r)=>{"use strict";const s=r(8760);const i=r(332),n=i.erase,o=i.cursor;const width=t=>[...s(t)].length;t.exports=function(t,e=process.stdout.columns){if(!e)return n.line+o.to(0);let r=0;const s=t.split(/\r?\n/);var i=true;var a=false;var l=undefined;try{for(var u=s[Symbol.iterator](),c;!(i=(c=u.next()).done);i=true){let t=c.value;r+=1+Math.floor(Math.max(width(t)-1,0)/e)}}catch(t){a=true;l=t}finally{try{if(!i&&u.return!=null){u.return()}}finally{if(a){throw l}}}return(n.line+o.prevLine()).repeat(r-1)+n.line+o.to(0)}},6217:t=>{"use strict";const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const s=process.platform==="win32"?r:e;t.exports=s},2800:(t,e,r)=>{"use strict";t.exports={action:r(8692),clear:r(3513),style:r(5012),strip:r(8760),figures:r(6217)}},8760:t=>{"use strict";t.exports=t=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const r=new RegExp(e,"g");return typeof t==="string"?t.replace(r,""):t}},5012:(t,e,r)=>{"use strict";const s=r(9439);const i=r(6217);const n=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>n[t]||n.default;const o=Object.freeze({aborted:s.red(i.cross),done:s.green(i.tick),default:s.cyan("?")});const symbol=(t,e)=>e?o.aborted:t?o.done:o.default;const delimiter=t=>s.gray(t?i.ellipsis:i.pointerSmall);const item=(t,e)=>s.gray(t?e?i.pointerSmall:"+":i.line);t.exports={styles:n,render:render,symbols:o,symbol:symbol,delimiter:delimiter,item:item}},1112:(t,e,r)=>{function isNodeLT(t){t=(Array.isArray(t)?t:t.split(".")).map(Number);let e=0,r=process.versions.node.split(".").map(Number);for(;e<t.length;e++){if(r[e]>t[e])return false;if(t[e]>r[e])return true}return false}t.exports=isNodeLT("8.6.0")?r(6598):r(9590)},8994:t=>{"use strict";class DatePart{constructor({token:t,date:e,parts:r,locales:s}){this.token=t;this.date=e||new Date;this.parts=r||[this];this.locales=s||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((e,r)=>r>t&&e instanceof DatePart))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const e=t.indexOf(this);return t.find(((t,r)=>r>e&&t instanceof DatePart))}toString(){return String(this.date)}}t.exports=DatePart},5513:(t,e,r)=>{"use strict";const s=r(8994);const pos=t=>{t=t%10;return t===1?"st":t===2?"nd":t===3?"rd":"th"};class Day extends s{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate();let e=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+pos(t):this.token==="d"?e+1:this.token==="ddd"?this.locales.weekdaysShort[e]:this.token==="dddd"?this.locales.weekdays[e]:t}}t.exports=Day},9270:(t,e,r)=>{"use strict";const s=r(8994);class Hours extends s{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();if(/h/.test(this.token))t=t%12||12;return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Hours},1190:(t,e,r)=>{"use strict";t.exports={DatePart:r(8994),Meridiem:r(8135),Day:r(5513),Hours:r(9270),Milliseconds:r(2397),Minutes:r(9246),Month:r(5763),Seconds:r(5579),Year:r(4191)}},8135:(t,e,r)=>{"use strict";const s=r(8994);class Meridiem extends s{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}t.exports=Meridiem},2397:(t,e,r)=>{"use strict";const s=r(8994);class Milliseconds extends s{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=Milliseconds},9246:(t,e,r)=>{"use strict";const s=r(8994);class Minutes extends s{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Minutes},5763:(t,e,r)=>{"use strict";const s=r(8994);class Month extends s{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1;this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth();let e=this.token.length;return e===2?String(t+1).padStart(2,"0"):e===3?this.locales.monthsShort[t]:e===4?this.locales.months[t]:String(t+1)}}t.exports=Month},5579:(t,e,r)=>{"use strict";const s=r(8994);class Seconds extends s{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}t.exports=Seconds},4191:(t,e,r)=>{"use strict";const s=r(8994);class Year extends s{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}}t.exports=Year},514:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{cursor:n}=r(332);const{style:o,clear:a,figures:l,strip:u}=r(9807);const getVal=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]);const getTitle=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]);const getIndex=(t,e)=>{const r=t.findIndex((t=>t.value===e||t.title===e));return r>-1?r:undefined};class AutocompletePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.suggest=t.suggest;this.choices=t.choices;this.initial=typeof t.initial==="number"?t.initial:getIndex(t.choices,t.initial);this.select=this.initial||t.cursor||0;this.fallback=t.fallback||(t.initial!==undefined?`${l.pointerSmall} ${getTitle(this.choices,this.initial)}`:`${l.pointerSmall} ${t.noMatches||"no matches found"}`);this.suggestions=[[]];this.page=0;this.input="";this.limit=t.limit||10;this.cursor=0;this.transform=o.render(t.style);this.scale=this.transform.scale;this.render=this.render.bind(this);this.complete=this.complete.bind(this);this.clear=a("");this.complete(this.render);this.render()}moveSelect(t){this.select=t;if(this.suggestions[this.page].length>0){this.value=getVal(this.suggestions[this.page],t)}else{this.value=this.initial!==undefined?getVal(this.choices,this.initial):null}this.fire()}async complete(t){const e=this.completing=this.suggest(this.input,this.choices);const r=await e;if(this.completing!==e)return;this.suggestions=r.map(((t,e,r)=>({title:getTitle(r,e),value:getVal(r,e)}))).reduce(((t,e)=>{if(t[t.length-1].length<this.limit)t[t.length-1].push(e);else t.push([e]);return t}),[[]]);this.isFallback=false;this.completing=false;if(!this.suggestions[this.page])this.page=0;if(!this.suggestions.length&&this.fallback){const t=getIndex(this.choices,this.fallback);this.suggestions=[[]];if(t!==undefined)this.suggestions[0].push({title:getTitle(this.choices,t),value:getVal(this.choices,t)});this.isFallback=true}const s=Math.max(r.length-1,0);this.moveSelect(Math.min(s,this.select));t&&t()}reset(){this.input="";this.complete((()=>{this.moveSelect(this.initial!==void 0?this.initial:0);this.render()}));this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,e){let r=this.input.slice(0,this.cursor);let s=this.input.slice(this.cursor);this.input=`${r}${t}${s}`;this.cursor=r.length+1;this.complete(this.render);this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1);let e=this.input.slice(this.cursor);this.input=`${t}${e}`;this.complete(this.render);this.cursor=this.cursor-1;this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor);let e=this.input.slice(this.cursor+1);this.input=`${t}${e}`;this.complete(this.render);this.render()}first(){this.moveSelect(0);this.render()}last(){this.moveSelect(this.suggestions[this.page].length-1);this.render()}up(){if(this.select<=0)return this.bell();this.moveSelect(this.select-1);this.render()}down(){if(this.select>=this.suggestions[this.page].length-1)return this.bell();this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions[this.page].length-1){this.page=(this.page+1)%this.suggestions.length;this.moveSelect(0)}else this.moveSelect(this.select+1);this.render()}nextPage(){if(this.page>=this.suggestions.length-1)return this.bell();this.page++;this.moveSelect(0);this.render()}prevPage(){if(this.page<=0)return this.bell();this.page--;this.moveSelect(0);this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1;this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1;this.render()}render(){if(this.closed)return;super.render();if(this.lineCount)this.out.write(n.down(this.lineCount));let t=s.bold(`${o.symbol(this.done,this.aborted)} ${this.msg} `)+`${o.delimiter(this.completing)} `;let e=u(t).length;if(this.done&&this.suggestions[this.page][this.select]){t+=`${this.suggestions[this.page][this.select].title}`}else{this.rendered=`${this.transform.render(this.input)}`;e+=this.rendered.length;t+=this.rendered}if(!this.done){this.lineCount=this.suggestions[this.page].length;let e=this.suggestions[this.page].reduce(((t,e,r)=>t+`\n${r===this.select?s.cyan(e.title):e.title}`),"");if(e&&!this.isFallback){t+=e;if(this.suggestions.length>1){this.lineCount++;t+=s.blue(`\nPage ${this.page+1}/${this.suggestions.length}`)}}else{const e=getIndex(this.choices,this.fallback);const r=e!==undefined?getTitle(this.choices,e):this.fallback;t+=`\n${s.gray(r)}`;this.lineCount++}}this.out.write(this.clear+t);this.clear=a(t);if(this.lineCount&&!this.done){let t=n.up(this.lineCount);t+=n.left+n.to(e);t+=n.move(-this.rendered.length+this.cursor*this.scale);this.out.write(t)}}}t.exports=AutocompletePrompt},7685:(t,e,r)=>{"use strict";const s=r(9439);const{cursor:i}=r(332);const n=r(92);const{clear:o,style:a,figures:l}=r(9807);class AutocompleteMultiselectPrompt extends n{constructor(t={}){t.overrideRender=true;super(t);this.inputValue="";this.clear=o("");this.filteredOptions=this.value;this.render()}last(){this.cursor=this.filteredOptions.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length;this.render()}up(){if(this.cursor===0){this.cursor=this.filteredOptions.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.filteredOptions.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.filteredOptions[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=true;this.render()}delete(){if(this.inputValue.length){this.inputValue=this.inputValue.substr(0,this.inputValue.length-1);this.updateFilteredOptions()}}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>{if(this.inputValue){if(typeof t.title==="string"){if(t.title.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}if(typeof t.value==="string"){if(t.value.toLowerCase().includes(this.inputValue.toLowerCase())){return true}}return false}return true}));const e=this.filteredOptions.findIndex((e=>e===t));this.cursor=e<0?0:e;this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t;this.updateFilteredOptions()}_(t,e){if(t===" "){this.handleSpaceToggle()}else{this.handleInputChange(t)}}renderInstructions(){return`\nInstructions:\n ${l.arrowUp}/${l.arrowDown}: Highlight option\n ${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n `}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:s.gray("Enter something to filter")}\n`}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(l.radioOn):l.radioOff)+" "+i}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);super.render();let t=[a.symbol(this.done,this.aborted),s.bold(this.msg),a.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.filteredOptions);this.out.write(this.clear+t);this.clear=o(t)}}t.exports=AutocompleteMultiselectPrompt},3037:(t,e,r)=>{const s=r(9439);const i=r(9126);const{style:n}=r(9807);const{erase:o,cursor:a}=r(332);class ConfirmPrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.value=t.initial;this.initialValue=!!t.initial;this.yesMsg=t.yes||"yes";this.yesOption=t.yesOption||"(Y/n)";this.noMsg=t.no||"no";this.noOption=t.noOption||"(y/N)";this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.value=this.value||false;this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}_(t,e){if(t.toLowerCase()==="y"){this.value=true;return this.submit()}if(t.toLowerCase()==="n"){this.value=false;return this.submit()}return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();this.out.write(o.line+a.to(0)+[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:s.gray(this.initialValue?this.yesOption:this.noOption)].join(" "))}}t.exports=ConfirmPrompt},5048:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{style:n,clear:o,figures:a,strip:l}=r(9807);const{erase:u,cursor:c}=r(332);const{DatePart:h,Meridiem:d,Day:f,Hours:p,Milliseconds:g,Minutes:m,Month:y,Seconds:v,Year:b}=r(1190);const _=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;const S={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new f(t),3:t=>new y(t),4:t=>new b(t),5:t=>new d(t),6:t=>new p(t),7:t=>new m(t),8:t=>new v(t),9:t=>new g(t)};const w={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class DatePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.cursor=0;this.typed="";this.locales=Object.assign(w,t.locales);this._date=t.initial||new Date;this.errorMsg=t.error||"Please Enter A Valid Value";this.validator=t.validate||(()=>true);this.mask=t.mask||"YYYY-MM-DD HH:mm:ss";this.clear=o("");this.render()}get value(){return this.date}get date(){return this._date}set date(t){if(t)this._date.setTime(t.getTime())}set mask(t){let e;this.parts=[];while(e=_.exec(t)){let t=e.shift();let r=e.findIndex((t=>t!=null));this.parts.push(r in S?S[r]({token:e[r]||t,date:this.date,parts:this.parts,locales:this.locales}):e[r]||t)}let r=this.parts.reduce(((t,e)=>{if(typeof e==="string"&&typeof t[t.length-1]==="string")t[t.length-1]+=e;else t.push(e);return t}),[]);this.parts.splice(0);this.parts.push(...r);this.reset()}moveCursor(t){this.typed="";this.cursor=t;this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof h)));this.fire();this.render()}abort(){this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t==="string"){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color="red";this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}up(){this.typed="";this.parts[this.cursor].up();this.render()}down(){this.typed="";this.parts[this.cursor].down();this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t));this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof h)));this.render()}_(t){if(/\d/.test(t)){this.typed+=t;this.parts[this.cursor].setTo(this.typed);this.render()}}render(){if(this.closed)return;if(this.firstRender)this.out.write(c.hide);else this.out.write(u.lines(1));super.render();let t=u.line+(this.lines?u.down(this.lines):"")+c.to(0);this.lines=0;let e="";if(this.error){let t=this.errorMsg.split("\n");e=t.reduce(((t,e,r)=>t+`\n${r?` `:a.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(false),this.parts.reduce(((t,e,r)=>t.concat(r===this.cursor&&!this.done?s.cyan().underline(e.toString()):e)),[]).join("")].join(" ");let i="";if(this.lines){i+=c.up(this.lines);i+=c.left+c.to(l(r).length)}this.out.write(t+r+e+i)}}t.exports=DatePrompt},6529:(t,e,r)=>{"use strict";t.exports={TextPrompt:r(1551),SelectPrompt:r(6515),TogglePrompt:r(181),DatePrompt:r(5048),NumberPrompt:r(3686),MultiselectPrompt:r(92),AutocompletePrompt:r(514),AutocompleteMultiselectPrompt:r(7685),ConfirmPrompt:r(3037)}},92:(t,e,r)=>{"use strict";const s=r(9439);const{cursor:i}=r(332);const n=r(9126);const{clear:o,figures:a,style:l}=r(9807);class MultiselectPrompt extends n{constructor(t={}){super(t);this.msg=t.message;this.cursor=t.cursor||0;this.scrollIndex=t.cursor||0;this.hint=t.hint||"";this.warn=t.warn||"- This option is disabled -";this.minSelected=t.min;this.showMinError=false;this.maxChoices=t.max;this.value=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.clear=o("");if(!t.overrideRender){this.render()}}reset(){this.value.map((t=>!t.selected));this.cursor=0;this.fire();this.render()}selected(){return this.value.filter((t=>t.selected))}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){const t=this.value.filter((t=>t.selected));if(this.minSelected&&t.length<this.minSelected){this.showMinError=true;this.render()}else{this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length-1;this.render()}next(){this.cursor=(this.cursor+1)%this.value.length;this.render()}up(){if(this.cursor===0){this.cursor=this.value.length-1}else{this.cursor--}this.render()}down(){if(this.cursor===this.value.length-1){this.cursor=0}else{this.cursor++}this.render()}left(){this.value[this.cursor].selected=false;this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=true;this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected){t.selected=false;this.render()}else if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices){return this.bell()}else{t.selected=true;this.render()}}_(t,e){if(t===" "){this.handleSpaceToggle()}else{return this.bell()}}renderInstructions(){return`\nInstructions:\n ${a.arrowUp}/${a.arrowDown}: Highlight option\n ${a.arrowLeft}/${a.arrowRight}/[space]: Toggle selection\n enter/return: Complete answer\n `}renderOption(t,e,r){let i;if(e.disabled)i=t===r?s.gray().underline(e.title):s.strikethrough().gray(e.title);else i=t===r?s.cyan().underline(e.title):e.title;return(e.selected?s.green(a.radioOn):a.radioOff)+" "+i}paginateOptions(t){const e=this.cursor;let r=t.map(((t,r)=>this.renderOption(e,t,r)));const i=10;let n=r;let o="";if(r.length===0){return s.red("No matches for this query.")}else if(r.length>i){let a=e-i/2;let l=e+i/2;if(a<0){a=0;l=i}else if(l>t.length){l=t.length;a=l-i}n=r.slice(a,l);o=s.dim("(Move up and down to reveal more choices)")}return"\n"+n.join("\n")+"\n"+o}renderOptions(t){if(!this.done){return this.paginateOptions(t)}return""}renderDoneOrInstructions(){if(this.done){const t=this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");return t}const t=[s.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled){t.push(s.yellow(this.warn))}return t.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(i.hide);super.render();let t=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(false),this.renderDoneOrInstructions()].join(" ");if(this.showMinError){t+=s.red(`You must select a minimum of ${this.minSelected} choices.`);this.showMinError=false}t+=this.renderOptions(this.value);this.out.write(this.clear+t);this.clear=o(t)}}t.exports=MultiselectPrompt},3686:(t,e,r)=>{const s=r(9439);const i=r(9126);const{cursor:n,erase:o}=r(332);const{style:a,clear:l,figures:u,strip:c}=r(9807);const h=/[0-9]/;const isDef=t=>t!==undefined;const round=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r};class NumberPrompt extends i{constructor(t={}){super(t);this.transform=a.render(t.style);this.msg=t.message;this.initial=isDef(t.initial)?t.initial:"";this.float=!!t.float;this.round=t.round||2;this.inc=t.increment||1;this.min=isDef(t.min)?t.min:-Infinity;this.max=isDef(t.max)?t.max:Infinity;this.errorMsg=t.error||`Please Enter A Valid Value`;this.validator=t.validate||(()=>true);this.color=`cyan`;this.value=``;this.typed=``;this.lastHit=0;this.render()}set value(t){if(!t&&t!==0){this.placeholder=true;this.rendered=s.gray(this.transform.render(`${this.initial}`));this._value=``}else{this.placeholder=false;this.rendered=this.transform.render(`${round(t,this.round)}`);this._value=round(t,this.round)}this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t===`-`||t===`.`&&this.float||h.test(t)}reset(){this.typed=``;this.value=``;this.fire();this.render()}abort(){let t=this.value;this.value=t!==``?t:this.initial;this.done=this.aborted=true;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){await this.validate();if(this.error){this.color=`red`;this.fire();this.render();return}let t=this.value;this.value=t!==``?t:this.initial;this.done=true;this.aborted=false;this.error=false;this.fire();this.render();this.out.write(`\n`);this.close()}up(){this.typed=``;if(this.value>=this.max)return this.bell();this.value+=this.inc;this.color=`cyan`;this.fire();this.render()}down(){this.typed=``;if(this.value<=this.min)return this.bell();this.value-=this.inc;this.color=`cyan`;this.fire();this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||``;this.color=`cyan`;this.fire();this.render()}next(){this.value=this.initial;this.fire();this.render()}_(t,e){if(!this.valid(t))return this.bell();const r=Date.now();if(r-this.lastHit>1e3)this.typed=``;this.typed+=t;this.lastHit=r;this.color=`cyan`;if(t===`.`)return this.fire();this.value=Math.min(this.parse(this.typed),this.max);if(this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire();this.render()}render(){if(this.closed)return;super.render();let t=o.line+(this.lines?o.down(this.lines):``)+n.to(0);this.lines=0;let e=``;if(this.error){let t=this.errorMsg.split(`\n`);e+=t.reduce(((t,e,r)=>t+`\n${r?` `:u.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let r=!this.done||!this.done&&!this.placeholder;let i=[a.symbol(this.done,this.aborted),s.bold(this.msg),a.delimiter(this.done),r?s[this.color]().underline(this.rendered):this.rendered].join(` `);let l=``;if(this.lines){l+=n.up(this.lines);l+=n.left+n.to(c(i).length)}this.out.write(t+i+e+l)}}t.exports=NumberPrompt},9126:(t,e,r)=>{"use strict";const s=r(4521);const{action:i}=r(9807);const n=r(2361);const{beep:o,cursor:a}=r(332);const l=r(9439);class Prompt extends n{constructor(t={}){super();this.firstRender=true;this.in=t.in||process.stdin;this.out=t.out||process.stdout;this.onRender=(t.onRender||(()=>void 0)).bind(this);const e=s.createInterface(this.in);s.emitKeypressEvents(this.in,e);if(this.in.isTTY)this.in.setRawMode(true);const keypress=(t,e)=>{let r=i(e);if(r===false){this._&&this._(t,e)}else if(typeof this[r]==="function"){this[r](e)}else{this.bell()}};this.close=()=>{this.out.write(a.show);this.in.removeListener("keypress",keypress);if(this.in.isTTY)this.in.setRawMode(false);e.close();this.emit(this.aborted?"abort":"submit",this.value);this.closed=true};this.in.on("keypress",keypress)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted})}bell(){this.out.write(o)}render(){this.onRender(l);if(this.firstRender)this.firstRender=false}}t.exports=Prompt},6515:(t,e,r)=>{"use strict";const s=r(9439);const i=r(9126);const{style:n,clear:o,figures:a}=r(9807);const{erase:l,cursor:u}=r(332);class SelectPrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.hint=t.hint||"- Use arrow-keys. Return to submit.";this.warn=t.warn||"- This option is disabled";this.cursor=t.initial||0;this.choices=t.choices.map(((t,e)=>{if(typeof t==="string")t={title:t,value:e};return{title:t&&(t.title||t.value||t),value:t&&(t.value||e),selected:t&&t.selected,disabled:t&&t.disabled}}));this.value=(this.choices[this.cursor]||{}).value;this.clear=o("");this.render()}moveCursor(t){this.cursor=t;this.value=this.choices[t].value;this.fire()}reset(){this.moveCursor(0);this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){if(!this.selection.disabled){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}else this.bell()}first(){this.moveCursor(0);this.render()}last(){this.moveCursor(this.choices.length-1);this.render()}up(){if(this.cursor===0)return this.bell();this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)return this.bell();this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length);this.render()}_(t,e){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(u.hide);else this.out.write(l.lines(this.choices.length+1));super.render();this.out.write([n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(false),this.done?this.selection.title:this.selection.disabled?s.yellow(this.warn):s.gray(this.hint)].join(" "));if(!this.done){this.out.write("\n"+this.choices.map(((t,e)=>{let r,i;if(t.disabled){r=this.cursor===e?s.gray().underline(t.title):s.strikethrough().gray(t.title);i=this.cursor===e?s.bold().gray(a.pointer)+" ":" "}else{r=this.cursor===e?s.cyan().underline(t.title):t.title;i=this.cursor===e?s.cyan(a.pointer)+" ":" "}return`${i} ${r}`})).join("\n"))}}}t.exports=SelectPrompt},1551:(t,e,r)=>{const s=r(9439);const i=r(9126);const{cursor:n}=r(332);const{style:o,clear:a,strip:l,figures:u}=r(9807);class TextPrompt extends i{constructor(t={}){super(t);this.transform=o.render(t.style);this.scale=this.transform.scale;this.msg=t.message;this.initial=t.initial||``;this.validator=t.validate||(()=>true);this.value=``;this.errorMsg=t.error||`Please Enter A Valid Value`;this.cursor=Number(!!this.initial);this.clear=a(``);this.render()}set value(t){if(!t&&this.initial){this.placeholder=true;this.rendered=s.gray(this.transform.render(this.initial))}else{this.placeholder=false;this.rendered=this.transform.render(t)}this._value=t;this.fire()}get value(){return this._value}reset(){this.value=``;this.cursor=Number(!!this.initial);this.fire();this.render()}abort(){this.value=this.value||this.initial;this.done=this.aborted=true;this.error=false;this.red=false;this.fire();this.render();this.out.write("\n");this.close()}async validate(){let t=await this.validator(this.value);if(typeof t===`string`){this.errorMsg=t;t=false}this.error=!t}async submit(){this.value=this.value||this.initial;await this.validate();if(this.error){this.red=true;this.fire();this.render();return}this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial;this.cursor=this.rendered.length;this.fire();this.render()}moveCursor(t){if(this.placeholder)return;this.cursor=this.cursor+t}_(t,e){let r=this.value.slice(0,this.cursor);let s=this.value.slice(this.cursor);this.value=`${r}${t}${s}`;this.red=false;this.cursor=this.placeholder?0:r.length+1;this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.value.slice(0,this.cursor-1);let e=this.value.slice(this.cursor);this.value=`${t}${e}`;this.red=false;this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor);let e=this.value.slice(this.cursor+1);this.value=`${t}${e}`;this.red=false;this.render()}first(){this.cursor=0;this.render()}last(){this.cursor=this.value.length;this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1);this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1);this.render()}render(){if(this.closed)return;super.render();let t=(this.lines?n.down(this.lines):``)+this.clear;this.lines=0;let e=[o.symbol(this.done,this.aborted),s.bold(this.msg),o.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(` `);let r=``;if(this.error){let t=this.errorMsg.split(`\n`);r+=t.reduce(((t,e,r)=>t+=`\n${r?" ":u.pointerSmall} ${s.red().italic(e)}`),``);this.lines=t.length}let i=``;if(this.lines){i+=n.up(this.lines);i+=n.left+n.to(l(e).length)}i+=n.move(this.placeholder?-this.initial.length*this.scale:-this.rendered.length+this.cursor*this.scale);this.out.write(t+e+r+i);this.clear=a(e+r)}}t.exports=TextPrompt},181:(t,e,r)=>{const s=r(9439);const i=r(9126);const{style:n,clear:o}=r(9807);const{cursor:a,erase:l}=r(332);class TogglePrompt extends i{constructor(t={}){super(t);this.msg=t.message;this.value=!!t.initial;this.active=t.active||"on";this.inactive=t.inactive||"off";this.initialValue=this.value;this.render()}reset(){this.value=this.initialValue;this.fire();this.render()}abort(){this.done=this.aborted=true;this.fire();this.render();this.out.write("\n");this.close()}submit(){this.done=true;this.aborted=false;this.fire();this.render();this.out.write("\n");this.close()}deactivate(){if(this.value===false)return this.bell();this.value=false;this.render()}activate(){if(this.value===true)return this.bell();this.value=true;this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value;this.fire();this.render()}_(t,e){if(t===" "){this.value=!this.value}else if(t==="1"){this.value=true}else if(t==="0"){this.value=false}else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(a.hide);super.render();this.out.write(l.lines(this.first?1:this.msg.split(/\n/g).length)+a.to(0)+[n.symbol(this.done,this.aborted),s.bold(this.msg),n.delimiter(this.done),this.value?this.inactive:s.cyan().underline(this.inactive),s.gray("/"),this.value?s.cyan().underline(this.active):this.active].join(" "))}}t.exports=TogglePrompt},9590:(t,e,r)=>{"use strict";const s=r(4450);const i=["suggest","format","onState","validate","onRender"];const noop=()=>{};async function prompt(t=[],{onSubmit:e=noop,onCancel:r=noop}={}){const n={};const o=prompt._override||{};t=[].concat(t);let a,l,u,c,h;const getFormattedAnswer=async(t,e,r=false)=>{if(!r&&t.validate&&t.validate(e)!==true){return}return t.format?await t.format(e,n):e};for(l of t){({name:c,type:h}=l);for(let t in l){if(i.includes(t))continue;let e=l[t];l[t]=typeof e==="function"?await e(a,{...n},l):e}if(typeof l.message!=="string"){throw new Error("prompt message is required")}({name:c,type:h}=l);if(!h)continue;if(s[h]===void 0){throw new Error(`prompt type (${h}) is not defined`)}if(o[l.name]!==undefined){a=await getFormattedAnswer(l,o[l.name]);if(a!==undefined){n[c]=a;continue}}try{a=prompt._injected?getInjectedAnswer(prompt._injected):await s[h](l);n[c]=a=await getFormattedAnswer(l,a,true);u=await e(l,a,n)}catch(t){u=!await r(l,n)}if(u)return n}return n}function getInjectedAnswer(t){const e=t.shift();if(e instanceof Error){throw e}return e}function inject(t){prompt._injected=(prompt._injected||[]).concat(t)}function override(t){prompt._override=Object.assign({},t)}t.exports=Object.assign(prompt,{prompt:prompt,prompts:s,inject:inject,override:override})},4450:(t,e,r)=>{"use strict";const s=e;const i=r(6529);const noop=t=>t;function toPrompt(t,e,r={}){return new Promise(((s,n)=>{const o=new i[t](e);const a=r.onAbort||noop;const l=r.onSubmit||noop;o.on("state",e.onState||noop);o.on("submit",(t=>s(l(t))));o.on("abort",(t=>n(a(t))))}))}s.text=t=>toPrompt("TextPrompt",t);s.password=t=>{t.style="password";return s.text(t)};s.invisible=t=>{t.style="invisible";return s.text(t)};s.number=t=>toPrompt("NumberPrompt",t);s.date=t=>toPrompt("DatePrompt",t);s.confirm=t=>toPrompt("ConfirmPrompt",t);s.list=t=>{const e=t.separator||",";return toPrompt("TextPrompt",t,{onSubmit:t=>t.split(e).map((t=>t.trim()))})};s.toggle=t=>toPrompt("TogglePrompt",t);s.select=t=>toPrompt("SelectPrompt",t);s.multiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("MultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};s.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const toSelected=t=>t.filter((t=>t.selected)).map((t=>t.value));return toPrompt("AutocompleteMultiselectPrompt",t,{onAbort:toSelected,onSubmit:toSelected})};const byTitle=(t,e)=>Promise.resolve(e.filter((e=>e.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));s.autocomplete=t=>{t.suggest=t.suggest||byTitle;t.choices=[].concat(t.choices||[]);return toPrompt("AutocompletePrompt",t)}},8573:t=>{"use strict";t.exports=t=>{if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c")return"abort";if(t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(t.name==="return")return"submit";if(t.name==="enter")return"submit";if(t.name==="backspace")return"delete";if(t.name==="delete")return"deleteForward";if(t.name==="abort")return"abort";if(t.name==="escape")return"abort";if(t.name==="tab")return"next";if(t.name==="pagedown")return"nextPage";if(t.name==="pageup")return"prevPage";if(t.name==="up")return"up";if(t.name==="down")return"down";if(t.name==="right")return"right";if(t.name==="left")return"left";return false}},6747:(t,e,r)=>{"use strict";const s=r(2714);const{erase:i,cursor:n}=r(332);const width=t=>[...s(t)].length;t.exports=function(t,e=process.stdout.columns){if(!e)return i.line+n.to(0);let r=0;const s=t.split(/\r?\n/);for(let t of s){r+=1+Math.floor(Math.max(width(t)-1,0)/e)}return(i.line+n.prevLine()).repeat(r-1)+i.line+n.to(0)}},3034:t=>{"use strict";const e={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};const r={arrowUp:e.arrowUp,arrowDown:e.arrowDown,arrowLeft:e.arrowLeft,arrowRight:e.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"};const s=process.platform==="win32"?r:e;t.exports=s},9807:(t,e,r)=>{"use strict";t.exports={action:r(8573),clear:r(6747),style:r(7357),strip:r(2714),figures:r(3034)}},2714:t=>{"use strict";t.exports=t=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|");const r=new RegExp(e,"g");return typeof t==="string"?t.replace(r,""):t}},7357:(t,e,r)=>{"use strict";const s=r(9439);const i=r(3034);const n=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}});const render=t=>n[t]||n.default;const o=Object.freeze({aborted:s.red(i.cross),done:s.green(i.tick),default:s.cyan("?")});const symbol=(t,e)=>e?o.aborted:t?o.done:o.default;const delimiter=t=>s.gray(t?i.ellipsis:i.pointerSmall);const item=(t,e)=>s.gray(t?e?i.pointerSmall:"+":i.line);t.exports={styles:n,render:render,symbols:o,symbol:symbol,delimiter:delimiter,item:item}},3135:t=>{
55
55
  /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
56
56
  let e;t.exports=typeof queueMicrotask==="function"?queueMicrotask.bind(typeof window!=="undefined"?window:global):t=>(e||(e=Promise.resolve())).then(t).catch((t=>setTimeout((()=>{throw t}),0)))},8271:(t,e,r)=>{var s=r(7563);var i=r(1017).join;var n=r(5134);var o="/etc";var a=process.platform==="win32";var l=a?process.env.USERPROFILE:process.env.HOME;t.exports=function(t,e,u,c){if("string"!==typeof t)throw new Error("rc(name): name *must* be string");if(!u)u=r(5912)(process.argv.slice(2));e=("string"===typeof e?s.json(e):e)||{};c=c||s.parse;var h=s.env(t+"_");var d=[e];var f=[];function addConfigFile(t){if(f.indexOf(t)>=0)return;var e=s.file(t);if(e){d.push(c(e));f.push(t)}}if(!a)[i(o,t,"config"),i(o,t+"rc")].forEach(addConfigFile);if(l)[i(l,".config",t,"config"),i(l,".config",t),i(l,"."+t,"config"),i(l,"."+t+"rc")].forEach(addConfigFile);addConfigFile(s.find("."+t+"rc"));if(h.config)addConfigFile(h.config);if(u.config)addConfigFile(u.config);return n.apply(null,d.concat([h,u,f.length?{configs:f,config:f[f.length-1]}:undefined]))}},7563:(t,e,r)=>{"use strict";var s=r(7147);var i=r(1923);var n=r(1017);var o=r(6397);var a=e.parse=function(t){if(/^\s*{/.test(t))return JSON.parse(o(t));return i.parse(t)};var l=e.file=function(){var t=[].slice.call(arguments).filter((function(t){return t!=null}));for(var e in t)if("string"!==typeof t[e])return;var r=n.join.apply(null,t);var i;try{return s.readFileSync(r,"utf-8")}catch(t){return}};var u=e.json=function(){var t=l.apply(null,arguments);return t?a(t):null};var c=e.env=function(t,e){e=e||process.env;var r={};var s=t.length;for(var i in e){if(i.toLowerCase().indexOf(t.toLowerCase())===0){var n=i.substring(s).split("__");var o;while((o=n.indexOf(""))>-1){n.splice(o,1)}var a=r;n.forEach((function _buildSubObj(t,r){if(!t||typeof a!=="object")return;if(r===n.length-1)a[t]=e[i];if(a[t]===undefined)a[t]={};a=a[t]}))}}return r};var h=e.find=function(){var t=n.join.apply(null,[].slice.call(arguments));function find(t,e){var r=n.join(t,e);try{s.statSync(r);return r}catch(r){if(n.dirname(t)!==t)return find(n.dirname(t),e)}}return find(process.cwd(),t)}},6397:t=>{"use strict";var e=1;var r=2;function stripWithoutWhitespace(){return""}function stripWithWhitespace(t,e,r){return t.slice(e,r).replace(/\S/g," ")}t.exports=function(t,s){s=s||{};var i;var n;var o=false;var a=false;var l=0;var u="";var c=s.whitespace===false?stripWithoutWhitespace:stripWithWhitespace;for(var h=0;h<t.length;h++){i=t[h];n=t[h+1];if(!a&&i==='"'){var d=t[h-1]==="\\"&&t[h-2]!=="\\";if(!d){o=!o}}if(o){continue}if(!a&&i+n==="//"){u+=t.slice(l,h);l=h;a=e;h++}else if(a===e&&i+n==="\r\n"){h++;a=false;u+=c(t,l,h);l=h;continue}else if(a===e&&i==="\n"){a=false;u+=c(t,l,h);l=h}else if(!a&&i+n==="/*"){u+=t.slice(l,h);l=h;a=r;h++;continue}else if(a===r&&i+n==="*/"){h++;a=false;u+=c(t,l,h+1);l=h+1;continue}}return u+(a?c(t.substr(l)):t.substr(l))}},4955:(t,e,r)=>{const s=r(3118).Buffer;function decodeBase64(t){return s.from(t,"base64").toString("utf8")}function encodeBase64(t){return s.from(t,"utf8").toString("base64")}t.exports={decodeBase64:decodeBase64,encodeBase64:encodeBase64}},1384:(t,e,r)=>{var s=r(7310);var i=r(4955);var n=i.decodeBase64;var o=i.encodeBase64;var a=":_authToken";var l=":username";var u=":_password";t.exports=function(){var t;var e;if(arguments.length>=2){t=arguments[0];e=arguments[1]}else if(typeof arguments[0]==="string"){t=arguments[0]}else{e=arguments[0]}e=e||{};e.npmrc=e.npmrc||r(8271)("npm",{registry:"https://registry.npmjs.org/"});t=t||e.npmrc.registry;return getRegistryAuthInfo(t,e)||getLegacyAuthInfo(e.npmrc)};function getRegistryAuthInfo(t,e){var r=s.parse(t,false,true);var i;while(i!=="/"&&r.pathname!==i){i=r.pathname||"/";var n="//"+r.host+i.replace(/\/$/,"");var o=getAuthInfoForUrl(n,e.npmrc);if(o){return o}if(!e.recursive){return/\/$/.test(t)?undefined:getRegistryAuthInfo(s.resolve(t,"."),e)}r.pathname=s.resolve(normalizePath(i),"..")||"/"}return undefined}function getLegacyAuthInfo(t){if(t._auth){return{token:t._auth,type:"Basic"}}return undefined}function normalizePath(t){return t[t.length-1]==="/"?t:t+"/"}function getAuthInfoForUrl(t,e){var r=getBearerToken(e[t+a]||e[t+"/"+a]);if(r){return r}var s=e[t+l]||e[t+"/"+l];var i=e[t+u]||e[t+"/"+u];var n=getTokenForUsernameAndPassword(s,i);if(n){return n}return undefined}function getBearerToken(t){if(!t){return undefined}var e=t.replace(/^\$\{?([^}]*)\}?$/,(function(t,e){return process.env[e]}));return{token:e,type:"Bearer"}}function getTokenForUsernameAndPassword(t,e){if(!t||!e){return undefined}var r=n(e.replace(/^\$\{?([^}]*)\}?$/,(function(t,e){return process.env[e]})));var s=o(t+":"+r);return{token:s,type:"Basic",password:r,username:t}}},2447:(t,e,r)=>{"use strict";t.exports=function(t){var e=r(8271)("npm",{registry:"https://registry.npmjs.org/"});var s=e[t+":registry"]||e.registry;return s.slice(-1)==="/"?s:s+"/"}},7226:t=>{"use strict";function reusify(t){var e=new t;var r=e;function get(){var s=e;if(s.next){e=s.next}else{e=new t;r=e}s.next=null;return s}function release(t){r.next=t;r=t}return{get:get,release:release}}t.exports=reusify},1188:(t,e,r)=>{
57
57
  /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
@@ -63,4 +63,4 @@ var s=r(4300);var i=s.Buffer;function copyProps(t,e){for(var r in t){e[r]=t[r]}}
63
63
  *
64
64
  * Copyright (c) 2015-present, Jon Schlinkert.
65
65
  * Released under the MIT License.
66
- */const s=r(6110);const toRegexRange=(t,e,r)=>{if(s(t)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(e===void 0||t===e){return String(t)}if(s(e)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let i={relaxZeros:true,...r};if(typeof i.strictZeros==="boolean"){i.relaxZeros=i.strictZeros===false}let n=String(i.relaxZeros);let o=String(i.shorthand);let a=String(i.capture);let l=String(i.wrap);let u=t+":"+e+"="+n+o+a+l;if(toRegexRange.cache.hasOwnProperty(u)){return toRegexRange.cache[u].result}let c=Math.min(t,e);let h=Math.max(t,e);if(Math.abs(c-h)===1){let r=t+"|"+e;if(i.capture){return`(${r})`}if(i.wrap===false){return r}return`(?:${r})`}let d=hasPadding(t)||hasPadding(e);let f={min:t,max:e,a:c,b:h};let p=[];let g=[];if(d){f.isPadded=d;f.maxLen=String(f.max).length}if(c<0){let t=h<0?Math.abs(h):1;g=splitToPatterns(t,Math.abs(c),f,i);c=f.a=0}if(h>=0){p=splitToPatterns(c,h,f,i)}f.negatives=g;f.positives=p;f.result=collatePatterns(g,p,i);if(i.capture===true){f.result=`(${f.result})`}else if(i.wrap!==false&&p.length+g.length>1){f.result=`(?:${f.result})`}toRegexRange.cache[u]=f;return f.result};function collatePatterns(t,e,r){let s=filterPatterns(t,e,"-",false,r)||[];let i=filterPatterns(e,t,"",false,r)||[];let n=filterPatterns(t,e,"-?",true,r)||[];let o=s.concat(n).concat(i);return o.join("|")}function splitToRanges(t,e){let r=1;let s=1;let i=countNines(t,r);let n=new Set([e]);while(t<=i&&i<=e){n.add(i);r+=1;i=countNines(t,r)}i=countZeros(e+1,s)-1;while(t<i&&i<=e){n.add(i);s+=1;i=countZeros(e+1,s)-1}n=[...n];n.sort(compare);return n}function rangeToPattern(t,e,r){if(t===e){return{pattern:t,count:[],digits:0}}let s=zip(t,e);let i=s.length;let n="";let o=0;for(let t=0;t<i;t++){let[e,i]=s[t];if(e===i){n+=e}else if(e!=="0"||i!=="9"){n+=toCharacterClass(e,i,r)}else{o++}}if(o){n+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:n,count:[o],digits:i}}function splitToPatterns(t,e,r,s){let i=splitToRanges(t,e);let n=[];let o=t;let a;for(let t=0;t<i.length;t++){let e=i[t];let l=rangeToPattern(String(o),String(e),s);let u="";if(!r.isPadded&&a&&a.pattern===l.pattern){if(a.count.length>1){a.count.pop()}a.count.push(l.count[0]);a.string=a.pattern+toQuantifier(a.count);o=e+1;continue}if(r.isPadded){u=padZeros(e,r,s)}l.string=u+l.pattern+toQuantifier(l.count);n.push(l);o=e+1;a=l}return n}function filterPatterns(t,e,r,s,i){let n=[];for(let i of t){let{string:t}=i;if(!s&&!contains(e,"string",t)){n.push(r+t)}if(s&&contains(e,"string",t)){n.push(r+t)}}return n}function zip(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function compare(t,e){return t>e?1:e>t?-1:0}function contains(t,e,r){return t.some((t=>t[e]===r))}function countNines(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function countZeros(t,e){return t-t%Math.pow(10,e)}function toQuantifier(t){let[e=0,r=""]=t;if(r||e>1){return`{${e+(r?","+r:"")}}`}return""}function toCharacterClass(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function hasPadding(t){return/^-?(0+)\d/.test(t)}function padZeros(t,e,r){if(!e.isPadded){return t}let s=Math.abs(e.maxLen-String(t).length);let i=r.relaxZeros!==false;switch(s){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:{return i?`0{0,${s}}`:`0{${s}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};t.exports=toRegexRange},5418:(t,e,r)=>{const{URL:s}=r(7310);const{join:i}=r(1017);const n=r(7147);const{promisify:o}=r(3837);const{tmpdir:a}=r(2037);const l=r(2447);const u=o(n.writeFile);const c=o(n.mkdir);const h=o(n.readFile);const compareVersions=(t,e)=>t.localeCompare(e,"en-US",{numeric:true});const encode=t=>encodeURIComponent(t).replace(/^%40/,"@");const getFile=async(t,e)=>{const r=a();const s=i(r,"update-check");if(!n.existsSync(s)){await c(s)}let o=`${t.name}-${e}.json`;if(t.scope){o=`${t.scope}-${o}`}return i(s,o)};const evaluateCache=async(t,e,r)=>{if(n.existsSync(t)){const s=await h(t,"utf8");const{lastUpdate:i,latest:n}=JSON.parse(s);const o=i+r;if(o>e){return{shouldCheck:false,latest:n}}}return{shouldCheck:true,latest:null}};const updateCache=async(t,e,r)=>{const s=JSON.stringify({latest:e,lastUpdate:r});await u(t,s,"utf8")};const loadPackage=(t,e)=>new Promise(((s,i)=>{const n={host:t.hostname,path:t.pathname,port:t.port,headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},timeout:2e3};if(e){n.headers.authorization=`${e.type} ${e.token}`}const{get:o}=r(t.protocol==="https:"?5687:3685);o(n,(t=>{const{statusCode:e}=t;if(e!==200){const r=new Error(`Request failed with code ${e}`);r.code=e;i(r);t.resume();return}let r="";t.setEncoding("utf8");t.on("data",(t=>{r+=t}));t.on("end",(()=>{try{const t=JSON.parse(r);s(t)}catch(t){i(t)}}))})).on("error",i).on("timeout",i)}));const getMostRecent=async({full:t,scope:e},i)=>{const n=l(e);const o=new s(t,n);let a=null;try{a=await loadPackage(o)}catch(t){if(t.code&&String(t.code).startsWith(4)){const t=r(1384);const e=t(n,{recursive:true});a=await loadPackage(o,e)}else{throw t}}const u=a["dist-tags"][i];if(!u){throw new Error(`Distribution tag ${i} is not available`)}return u};const d={interval:36e5,distTag:"latest"};const getDetails=t=>{const e={full:encode(t)};if(t.includes("/")){const r=t.split("/");e.scope=r[0];e.name=r[1]}else{e.scope=null;e.name=t}return e};t.exports=async(t,e)=>{if(typeof t!=="object"){throw new Error("The first parameter should be your package.json file content")}const r=getDetails(t.name);const s=Date.now();const{distTag:i,interval:n}=Object.assign({},d,e);const o=await getFile(r,i);let a=null;let l=true;({shouldCheck:l,latest:a}=await evaluateCache(o,s,n));if(l){a=await getMostRecent(r,i);await updateCache(o,a,s)}const u=compareVersions(t.version,a);if(u===-1){return{latest:a,fromCache:!l}}return null}},5880:(t,e,r)=>{"use strict";var s=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var i=r(5462);var n=["node_modules","favicon.ico"];var o=t.exports=function(t){var e=[];var r=[];if(t===null){r.push("name cannot be null");return done(e,r)}if(t===undefined){r.push("name cannot be undefined");return done(e,r)}if(typeof t!=="string"){r.push("name must be a string");return done(e,r)}if(!t.length){r.push("name length must be greater than zero")}if(t.match(/^\./)){r.push("name cannot start with a period")}if(t.match(/^_/)){r.push("name cannot start with an underscore")}if(t.trim()!==t){r.push("name cannot contain leading or trailing spaces")}n.forEach((function(e){if(t.toLowerCase()===e){r.push(e+" is a blacklisted name")}}));i.forEach((function(r){if(t.toLowerCase()===r){e.push(r+" is a core module name")}}));if(t.length>214){e.push("name can no longer contain more than 214 characters")}if(t.toLowerCase()!==t){e.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(t.split("/").slice(-1)[0])){e.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(t)!==t){var o=t.match(s);if(o){var a=o[1];var l=o[2];if(encodeURIComponent(a)===a&&encodeURIComponent(l)===l){return done(e,r)}}r.push("name can only contain URL-friendly characters")}return done(e,r)};o.scopedPackagePattern=s;var done=function(t,e){var r={validForNewPackages:e.length===0&&t.length===0,validForOldPackages:e.length===0,warnings:t,errors:e};if(!r.warnings.length)delete r.warnings;if(!r.errors.length)delete r.errors;return r}},8201:(t,e,r)=>{const s=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const i=r(1017);const n=s?";":":";const o=r(228);const getNotFoundError=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"});const getPathInfo=(t,e)=>{const r=e.colon||n;const i=t.match(/\//)||s&&t.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)];const o=s?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=s?o.split(r):[""];if(s){if(t.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:i,pathExt:a,pathExtExe:o}};const which=(t,e,r)=>{if(typeof e==="function"){r=e;e={}}if(!e)e={};const{pathEnv:s,pathExt:n,pathExtExe:a}=getPathInfo(t,e);const l=[];const step=r=>new Promise(((n,o)=>{if(r===s.length)return e.all&&l.length?n(l):o(getNotFoundError(t));const a=s[r];const u=/^".*"$/.test(a)?a.slice(1,-1):a;const c=i.join(u,t);const h=!u&&/^\.[\\\/]/.test(t)?t.slice(0,2)+c:c;n(subStep(h,r,0))}));const subStep=(t,r,s)=>new Promise(((i,u)=>{if(s===n.length)return i(step(r+1));const c=n[s];o(t+c,{pathExt:a},((n,o)=>{if(!n&&o){if(e.all)l.push(t+c);else return i(t+c)}return i(subStep(t,r,s+1))}))}));return r?step(0).then((t=>r(null,t)),r):step(0)};const whichSync=(t,e)=>{e=e||{};const{pathEnv:r,pathExt:s,pathExtExe:n}=getPathInfo(t,e);const a=[];for(let l=0;l<r.length;l++){const u=r[l];const c=/^".*"$/.test(u)?u.slice(1,-1):u;const h=i.join(c,t);const d=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+h:h;for(let t=0;t<s.length;t++){const r=d+s[t];try{const t=o.sync(r,{pathExt:n});if(t){if(e.all)a.push(r);else return r}}catch(t){}}}if(e.all&&a.length)return a;if(e.nothrow)return null;throw getNotFoundError(t)};t.exports=which;which.sync=whichSync},7019:(t,e,r)=>{"use strict";r.r(e);var s=r(9397);var i=r(8018);var n=r.n(i);var o=r(1017);var a=r.n(o);var l=r(1112);var u=r.n(l);var c=r(5418);var h=r.n(c);var d=r(7147);var f=r.n(d);function makeDir(t,e={recursive:true}){return f().promises.mkdir(t,e)}var p=r(2081);function isInGitRepository(){try{(0,p.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(t){}return false}function isInMercurialRepository(){try{(0,p.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(t){}return false}function isDefaultBranchSet(){try{(0,p.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch(t){}return false}function tryGitInit(t){let e=false;try{(0,p.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,p.execSync)("git init",{stdio:"ignore"});e=true;if(!isDefaultBranchSet()){(0,p.execSync)("git checkout -b main",{stdio:"ignore"})}(0,p.execSync)("git add -A",{stdio:"ignore"});(0,p.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch(r){if(e){try{f().rmSync(a().join(t,".git"),{recursive:true,force:true})}catch(t){}}return false}}function isFolderEmpty(t,e){const r=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];const i=f().readdirSync(t).filter((t=>!r.includes(t))).filter((t=>!/\.iml$/.test(t)));if(i.length>0){console.log(`The directory ${(0,s.green)(e)} contains files that could conflict:`);console.log();for(const e of i){try{const r=f().lstatSync(a().join(t,e));if(r.isDirectory()){console.log(` ${(0,s.blue)(e)}/`)}else{console.log(` ${e}`)}}catch{console.log(` ${e}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}async function isWriteable(t){try{await f().promises.access(t,(f().constants||f()).W_OK);return true}catch(t){return false}}var g=r(7987);var m=r.n(g);async function install(t){let e=["install"];return new Promise(((r,s)=>{const i=m()(t,e,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});i.on("close",(i=>{if(i!==0){s({command:`${t} ${e.join(" ")}`});return}r()}))}))}var y=r(3909);const identity=t=>t;const copy=async(t,e,{cwd:r,rename:s=identity,parents:i=true}={})=>{const n=typeof t==="string"?[t]:t;if(n.length===0||!e){throw new TypeError("`src` and `dest` are required")}const o=await(0,y.async)(n,{cwd:r,dot:true,absolute:false,stats:false});const l=r?a().resolve(r,e):e;return Promise.all(o.map((async t=>{const e=a().dirname(t);const n=s(a().basename(t));const o=r?a().resolve(r,t):t;const u=i?a().join(l,e,n):a().join(l,n);await f().promises.mkdir(a().dirname(u),{recursive:true});return f().promises.copyFile(o,u)})))};var v=r(2037);var b=r.n(v);const _=require("fs/promises");var S=r.n(_);const w=JSON.parse('{"name":"create-xmlui-app","version":"0.9.37","scripts":{"dev":"mkdir -p dist && cp -r templates/default dist/ && ncc build ./index.ts -w -o dist/","build":"ncc build ./index.ts -o dist/ --minify --no-cache --no-source-map-register && cp -r templates/default dist/","prepublishOnly":"npm run build"},"bin":{"create-xmlui-app":"./dist/index.js"},"files":["dist"],"devDependencies":{"@types/cross-spawn":"6.0.0","@types/node":"^20.2.5","@types/prompts":"2.0.1","@types/validate-npm-package-name":"3.0.0","@vercel/ncc":"0.34.0","fast-glob":"3.3.1","commander":"2.20.0","cross-spawn":"7.0.5","picocolors":"1.0.0","prompts":"2.1.0","update-check":"1.5.4","validate-npm-package-name":"3.0.0"},"engines":{"node":">=18.12.0"},"repository":{"url":"https://github.com/xmlui-com/xmlui.git"}}');const installTemplate=async({appName:t,root:e,packageManager:r,template:i,useGit:n})=>{console.log((0,s.bold)(`Using ${r}.`));console.log("\nInitializing project with template:",i,"\n");const o=a().join(__dirname,i,"ts");const l=["**"];if(!n){l.push("!gitignore")}await copy(l,e,{parents:true,cwd:o,rename(t){switch(t){case"gitignore":case"eslintrc.json":{return`.${t}`}case"README-template.md":{return"README.md"}default:{return t}}}});const u={name:t,version:"0.1.0",private:true,scripts:{start:"xmlui start",build:"xmlui build",preview:"xmlui preview","build-prod":"npm run build -- --prod","release-ci":"npm run build-prod && xmlui zip-dist"},dependencies:{xmlui:w.version}};await S().writeFile(a().join(e,"package.json"),JSON.stringify(u,null,2)+b().EOL);console.log("\nInstalling dependencies:");for(const t in u.dependencies)console.log(`- ${(0,s.cyan)(t)}`);console.log();await install(r)};async function createApp({appPath:t,packageManager:e,useGit:r}){const i="default";const n=a().resolve(t);if(!await isWriteable(a().dirname(n))){console.error("The application path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const o=a().basename(n);await makeDir(n);if(!isFolderEmpty(n,o)){process.exit(1)}console.log(`Creating a new UI Engine app in ${(0,s.green)(n)}.`);console.log();process.chdir(n);await installTemplate({appName:o,root:n,template:i,packageManager:e,useGit:r});if(r&&tryGitInit(n)){console.log("Initialized a git repository.");console.log()}console.log(`${(0,s.green)("Success!")} Created ${o} at ${t}`);console.log()}var x=r(5880);var P=r.n(x);function validateNpmName(t){const e=P()(t);if(e.validForNewPackages){return{valid:true}}return{valid:false,problems:[...e.errors||[],...e.warnings||[]]}}let E="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=t=>{if(t.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const A=new(n().Command)(w.name).version(w.version).arguments("<project-directory>").usage(`${(0,s.green)("<project-directory>")} [options]`).action((t=>{E=t})).option("--use-git",`Explicitly tell the CLI to initialize a git repository`).allowUnknownOption().parse(process.argv);const C="npm";async function run(){if(typeof E==="string"){E=E.trim()}if(!E){const t=await u()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:t=>{const e=validateNpmName(a().basename(a().resolve(t)));if(e.valid){return true}return"Invalid project name: "+e.problems[0]}});if(typeof t.path==="string"){E=t.path.trim()}}if(!E){console.log("\nPlease specify the project directory:\n"+` ${(0,s.cyan)(A.name())} ${(0,s.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,s.cyan)(A.name())} ${(0,s.green)("my-xmlui-app")}\n\n`+`Run ${(0,s.cyan)(`${A.name()} --help`)} to see all options.`);process.exit(1)}const t=a().resolve(E);const e=a().basename(t);const{valid:r,problems:i}=validateNpmName(e);if(!r){console.error(`Could not create a project called ${(0,s.red)(`"${e}"`)} because of npm naming restrictions:`);i.forEach((t=>console.error(` ${(0,s.red)((0,s.bold)("*"))} ${t}`)));process.exit(1)}const n=a().resolve(t);const o=a().basename(n);const l=f().existsSync(n);if(l&&!isFolderEmpty(n,o)){process.exit(1)}if(A.useGit===undefined){const{useGit:t}=await u()({type:"toggle",name:"useGit",message:`Would you like to initialize a git repository?`,initial:false,active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});A.useGit=Boolean(t)}await createApp({appPath:t,packageManager:C,useGit:!!A.useGit})}const R=h()(w).catch((()=>null));async function notifyUpdate(){try{const t=await R;if(t===null||t===void 0?void 0:t.latest){const t="npm i -g create-xmlui-app";console.log((0,s.yellow)((0,s.bold)("A new version of `create-xmlui-app` is available!"))+"\n"+"You can update by running: "+(0,s.cyan)(t)+"\n")}process.exit()}catch{}}run().then(notifyUpdate).catch((async t=>{console.log();console.log("Aborting installation.");if(t.command){console.log(` ${(0,s.cyan)(t.command)} has failed.`)}else{console.log((0,s.red)("Unexpected error. Please report it as a bug:")+"\n",t)}console.log();await notifyUpdate();process.exit(1)}))},4300:t=>{"use strict";t.exports=require("buffer")},2081:t=>{"use strict";t.exports=require("child_process")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},4521:t=>{"use strict";t.exports=require("readline")},2781:t=>{"use strict";t.exports=require("stream")},6224:t=>{"use strict";t.exports=require("tty")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},5462:t=>{"use strict";t.exports=JSON.parse('["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"]')}};var e={};function __nccwpck_require__(r){var s=e[r];if(s!==undefined){return s.exports}var i=e[r]={exports:{}};var n=true;try{t[r](i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete e[r]}return i.exports}(()=>{__nccwpck_require__.n=t=>{var e=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(e,{a:e});return e}})();(()=>{__nccwpck_require__.d=(t,e)=>{for(var r in e){if(__nccwpck_require__.o(e,r)&&!__nccwpck_require__.o(t,r)){Object.defineProperty(t,r,{enumerable:true,get:e[r]})}}}})();(()=>{__nccwpck_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(7019);module.exports=r})();
66
+ */const s=r(6110);const toRegexRange=(t,e,r)=>{if(s(t)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(e===void 0||t===e){return String(t)}if(s(e)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let i={relaxZeros:true,...r};if(typeof i.strictZeros==="boolean"){i.relaxZeros=i.strictZeros===false}let n=String(i.relaxZeros);let o=String(i.shorthand);let a=String(i.capture);let l=String(i.wrap);let u=t+":"+e+"="+n+o+a+l;if(toRegexRange.cache.hasOwnProperty(u)){return toRegexRange.cache[u].result}let c=Math.min(t,e);let h=Math.max(t,e);if(Math.abs(c-h)===1){let r=t+"|"+e;if(i.capture){return`(${r})`}if(i.wrap===false){return r}return`(?:${r})`}let d=hasPadding(t)||hasPadding(e);let f={min:t,max:e,a:c,b:h};let p=[];let g=[];if(d){f.isPadded=d;f.maxLen=String(f.max).length}if(c<0){let t=h<0?Math.abs(h):1;g=splitToPatterns(t,Math.abs(c),f,i);c=f.a=0}if(h>=0){p=splitToPatterns(c,h,f,i)}f.negatives=g;f.positives=p;f.result=collatePatterns(g,p,i);if(i.capture===true){f.result=`(${f.result})`}else if(i.wrap!==false&&p.length+g.length>1){f.result=`(?:${f.result})`}toRegexRange.cache[u]=f;return f.result};function collatePatterns(t,e,r){let s=filterPatterns(t,e,"-",false,r)||[];let i=filterPatterns(e,t,"",false,r)||[];let n=filterPatterns(t,e,"-?",true,r)||[];let o=s.concat(n).concat(i);return o.join("|")}function splitToRanges(t,e){let r=1;let s=1;let i=countNines(t,r);let n=new Set([e]);while(t<=i&&i<=e){n.add(i);r+=1;i=countNines(t,r)}i=countZeros(e+1,s)-1;while(t<i&&i<=e){n.add(i);s+=1;i=countZeros(e+1,s)-1}n=[...n];n.sort(compare);return n}function rangeToPattern(t,e,r){if(t===e){return{pattern:t,count:[],digits:0}}let s=zip(t,e);let i=s.length;let n="";let o=0;for(let t=0;t<i;t++){let[e,i]=s[t];if(e===i){n+=e}else if(e!=="0"||i!=="9"){n+=toCharacterClass(e,i,r)}else{o++}}if(o){n+=r.shorthand===true?"\\d":"[0-9]"}return{pattern:n,count:[o],digits:i}}function splitToPatterns(t,e,r,s){let i=splitToRanges(t,e);let n=[];let o=t;let a;for(let t=0;t<i.length;t++){let e=i[t];let l=rangeToPattern(String(o),String(e),s);let u="";if(!r.isPadded&&a&&a.pattern===l.pattern){if(a.count.length>1){a.count.pop()}a.count.push(l.count[0]);a.string=a.pattern+toQuantifier(a.count);o=e+1;continue}if(r.isPadded){u=padZeros(e,r,s)}l.string=u+l.pattern+toQuantifier(l.count);n.push(l);o=e+1;a=l}return n}function filterPatterns(t,e,r,s,i){let n=[];for(let i of t){let{string:t}=i;if(!s&&!contains(e,"string",t)){n.push(r+t)}if(s&&contains(e,"string",t)){n.push(r+t)}}return n}function zip(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function compare(t,e){return t>e?1:e>t?-1:0}function contains(t,e,r){return t.some((t=>t[e]===r))}function countNines(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function countZeros(t,e){return t-t%Math.pow(10,e)}function toQuantifier(t){let[e=0,r=""]=t;if(r||e>1){return`{${e+(r?","+r:"")}}`}return""}function toCharacterClass(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function hasPadding(t){return/^-?(0+)\d/.test(t)}function padZeros(t,e,r){if(!e.isPadded){return t}let s=Math.abs(e.maxLen-String(t).length);let i=r.relaxZeros!==false;switch(s){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:{return i?`0{0,${s}}`:`0{${s}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};t.exports=toRegexRange},5418:(t,e,r)=>{const{URL:s}=r(7310);const{join:i}=r(1017);const n=r(7147);const{promisify:o}=r(3837);const{tmpdir:a}=r(2037);const l=r(2447);const u=o(n.writeFile);const c=o(n.mkdir);const h=o(n.readFile);const compareVersions=(t,e)=>t.localeCompare(e,"en-US",{numeric:true});const encode=t=>encodeURIComponent(t).replace(/^%40/,"@");const getFile=async(t,e)=>{const r=a();const s=i(r,"update-check");if(!n.existsSync(s)){await c(s)}let o=`${t.name}-${e}.json`;if(t.scope){o=`${t.scope}-${o}`}return i(s,o)};const evaluateCache=async(t,e,r)=>{if(n.existsSync(t)){const s=await h(t,"utf8");const{lastUpdate:i,latest:n}=JSON.parse(s);const o=i+r;if(o>e){return{shouldCheck:false,latest:n}}}return{shouldCheck:true,latest:null}};const updateCache=async(t,e,r)=>{const s=JSON.stringify({latest:e,lastUpdate:r});await u(t,s,"utf8")};const loadPackage=(t,e)=>new Promise(((s,i)=>{const n={host:t.hostname,path:t.pathname,port:t.port,headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},timeout:2e3};if(e){n.headers.authorization=`${e.type} ${e.token}`}const{get:o}=r(t.protocol==="https:"?5687:3685);o(n,(t=>{const{statusCode:e}=t;if(e!==200){const r=new Error(`Request failed with code ${e}`);r.code=e;i(r);t.resume();return}let r="";t.setEncoding("utf8");t.on("data",(t=>{r+=t}));t.on("end",(()=>{try{const t=JSON.parse(r);s(t)}catch(t){i(t)}}))})).on("error",i).on("timeout",i)}));const getMostRecent=async({full:t,scope:e},i)=>{const n=l(e);const o=new s(t,n);let a=null;try{a=await loadPackage(o)}catch(t){if(t.code&&String(t.code).startsWith(4)){const t=r(1384);const e=t(n,{recursive:true});a=await loadPackage(o,e)}else{throw t}}const u=a["dist-tags"][i];if(!u){throw new Error(`Distribution tag ${i} is not available`)}return u};const d={interval:36e5,distTag:"latest"};const getDetails=t=>{const e={full:encode(t)};if(t.includes("/")){const r=t.split("/");e.scope=r[0];e.name=r[1]}else{e.scope=null;e.name=t}return e};t.exports=async(t,e)=>{if(typeof t!=="object"){throw new Error("The first parameter should be your package.json file content")}const r=getDetails(t.name);const s=Date.now();const{distTag:i,interval:n}=Object.assign({},d,e);const o=await getFile(r,i);let a=null;let l=true;({shouldCheck:l,latest:a}=await evaluateCache(o,s,n));if(l){a=await getMostRecent(r,i);await updateCache(o,a,s)}const u=compareVersions(t.version,a);if(u===-1){return{latest:a,fromCache:!l}}return null}},5880:(t,e,r)=>{"use strict";var s=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var i=r(5462);var n=["node_modules","favicon.ico"];var o=t.exports=function(t){var e=[];var r=[];if(t===null){r.push("name cannot be null");return done(e,r)}if(t===undefined){r.push("name cannot be undefined");return done(e,r)}if(typeof t!=="string"){r.push("name must be a string");return done(e,r)}if(!t.length){r.push("name length must be greater than zero")}if(t.match(/^\./)){r.push("name cannot start with a period")}if(t.match(/^_/)){r.push("name cannot start with an underscore")}if(t.trim()!==t){r.push("name cannot contain leading or trailing spaces")}n.forEach((function(e){if(t.toLowerCase()===e){r.push(e+" is a blacklisted name")}}));i.forEach((function(r){if(t.toLowerCase()===r){e.push(r+" is a core module name")}}));if(t.length>214){e.push("name can no longer contain more than 214 characters")}if(t.toLowerCase()!==t){e.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(t.split("/").slice(-1)[0])){e.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(t)!==t){var o=t.match(s);if(o){var a=o[1];var l=o[2];if(encodeURIComponent(a)===a&&encodeURIComponent(l)===l){return done(e,r)}}r.push("name can only contain URL-friendly characters")}return done(e,r)};o.scopedPackagePattern=s;var done=function(t,e){var r={validForNewPackages:e.length===0&&t.length===0,validForOldPackages:e.length===0,warnings:t,errors:e};if(!r.warnings.length)delete r.warnings;if(!r.errors.length)delete r.errors;return r}},8201:(t,e,r)=>{const s=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const i=r(1017);const n=s?";":":";const o=r(228);const getNotFoundError=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"});const getPathInfo=(t,e)=>{const r=e.colon||n;const i=t.match(/\//)||s&&t.match(/\\/)?[""]:[...s?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)];const o=s?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=s?o.split(r):[""];if(s){if(t.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:i,pathExt:a,pathExtExe:o}};const which=(t,e,r)=>{if(typeof e==="function"){r=e;e={}}if(!e)e={};const{pathEnv:s,pathExt:n,pathExtExe:a}=getPathInfo(t,e);const l=[];const step=r=>new Promise(((n,o)=>{if(r===s.length)return e.all&&l.length?n(l):o(getNotFoundError(t));const a=s[r];const u=/^".*"$/.test(a)?a.slice(1,-1):a;const c=i.join(u,t);const h=!u&&/^\.[\\\/]/.test(t)?t.slice(0,2)+c:c;n(subStep(h,r,0))}));const subStep=(t,r,s)=>new Promise(((i,u)=>{if(s===n.length)return i(step(r+1));const c=n[s];o(t+c,{pathExt:a},((n,o)=>{if(!n&&o){if(e.all)l.push(t+c);else return i(t+c)}return i(subStep(t,r,s+1))}))}));return r?step(0).then((t=>r(null,t)),r):step(0)};const whichSync=(t,e)=>{e=e||{};const{pathEnv:r,pathExt:s,pathExtExe:n}=getPathInfo(t,e);const a=[];for(let l=0;l<r.length;l++){const u=r[l];const c=/^".*"$/.test(u)?u.slice(1,-1):u;const h=i.join(c,t);const d=!c&&/^\.[\\\/]/.test(t)?t.slice(0,2)+h:h;for(let t=0;t<s.length;t++){const r=d+s[t];try{const t=o.sync(r,{pathExt:n});if(t){if(e.all)a.push(r);else return r}}catch(t){}}}if(e.all&&a.length)return a;if(e.nothrow)return null;throw getNotFoundError(t)};t.exports=which;which.sync=whichSync},6573:(t,e,r)=>{"use strict";const s=r(7079);const i=r(9245);const n=r(4060);const o=r(335);const a=r(6596);const l=r(9157);async function FastGlob(t,e){assertPatternsInput(t);const r=getWorks(t,i.default,e);const s=await Promise.all(r);return l.array.flatten(s)}(function(t){t.glob=t;t.globSync=sync;t.globStream=stream;t.async=t;function sync(t,e){assertPatternsInput(t);const r=getWorks(t,o.default,e);return l.array.flatten(r)}t.sync=sync;function stream(t,e){assertPatternsInput(t);const r=getWorks(t,n.default,e);return l.stream.merge(r)}t.stream=stream;function generateTasks(t,e){assertPatternsInput(t);const r=[].concat(t);const i=new a.default(e);return s.generate(r,i)}t.generateTasks=generateTasks;function isDynamicPattern(t,e){assertPatternsInput(t);const r=new a.default(e);return l.pattern.isDynamicPattern(t,r)}t.isDynamicPattern=isDynamicPattern;function escapePath(t){assertPatternsInput(t);return l.path.escape(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return l.path.convertPathToPattern(t)}t.convertPathToPattern=convertPathToPattern;let e;(function(t){function escapePath(t){assertPatternsInput(t);return l.path.escapePosixPath(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return l.path.convertPosixPathToPattern(t)}t.convertPathToPattern=convertPathToPattern})(e=t.posix||(t.posix={}));let r;(function(t){function escapePath(t){assertPatternsInput(t);return l.path.escapeWindowsPath(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return l.path.convertWindowsPathToPattern(t)}t.convertPathToPattern=convertPathToPattern})(r=t.win32||(t.win32={}))})(FastGlob||(FastGlob={}));function getWorks(t,e,r){const i=[].concat(t);const n=new a.default(r);const o=s.generate(i,n);const l=new e(n);return o.map(l.read,l)}function assertPatternsInput(t){const e=[].concat(t);const r=e.every((t=>l.string.isString(t)&&!l.string.isEmpty(t)));if(!r){throw new TypeError("Patterns must be a string (non empty) or an array of strings")}}t.exports=FastGlob},7079:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.convertPatternGroupToTask=e.convertPatternGroupsToTasks=e.groupPatternsByBaseDirectory=e.getNegativePatternsAsPositive=e.getPositivePatterns=e.convertPatternsToTasks=e.generate=void 0;const s=r(9157);function generate(t,e){const r=processPatterns(t,e);const i=processPatterns(e.ignore,e);const n=getPositivePatterns(r);const o=getNegativePatternsAsPositive(r,i);const a=n.filter((t=>s.pattern.isStaticPattern(t,e)));const l=n.filter((t=>s.pattern.isDynamicPattern(t,e)));const u=convertPatternsToTasks(a,o,false);const c=convertPatternsToTasks(l,o,true);return u.concat(c)}e.generate=generate;function processPatterns(t,e){let r=t;if(e.braceExpansion){r=s.pattern.expandPatternsWithBraceExpansion(r)}if(e.baseNameMatch){r=r.map((t=>t.includes("/")?t:`**/${t}`))}return r.map((t=>s.pattern.removeDuplicateSlashes(t)))}function convertPatternsToTasks(t,e,r){const i=[];const n=s.pattern.getPatternsOutsideCurrentDirectory(t);const o=s.pattern.getPatternsInsideCurrentDirectory(t);const a=groupPatternsByBaseDirectory(n);const l=groupPatternsByBaseDirectory(o);i.push(...convertPatternGroupsToTasks(a,e,r));if("."in l){i.push(convertPatternGroupToTask(".",o,e,r))}else{i.push(...convertPatternGroupsToTasks(l,e,r))}return i}e.convertPatternsToTasks=convertPatternsToTasks;function getPositivePatterns(t){return s.pattern.getPositivePatterns(t)}e.getPositivePatterns=getPositivePatterns;function getNegativePatternsAsPositive(t,e){const r=s.pattern.getNegativePatterns(t).concat(e);const i=r.map(s.pattern.convertToPositivePattern);return i}e.getNegativePatternsAsPositive=getNegativePatternsAsPositive;function groupPatternsByBaseDirectory(t){const e={};return t.reduce(((t,e)=>{const r=s.pattern.getBaseDirectory(e);if(r in t){t[r].push(e)}else{t[r]=[e]}return t}),e)}e.groupPatternsByBaseDirectory=groupPatternsByBaseDirectory;function convertPatternGroupsToTasks(t,e,r){return Object.keys(t).map((s=>convertPatternGroupToTask(s,t[s],e,r)))}e.convertPatternGroupsToTasks=convertPatternGroupsToTasks;function convertPatternGroupToTask(t,e,r,i){return{dynamic:i,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(s.pattern.convertToNegativePattern))}}e.convertPatternGroupToTask=convertPatternGroupToTask},9245:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(3260);const i=r(5261);class ProviderAsync extends i.default{constructor(){super(...arguments);this._reader=new s.default(this._settings)}async read(t){const e=this._getRootDirectory(t);const r=this._getReaderOptions(t);const s=await this.api(e,t,r);return s.map((t=>r.transform(t)))}api(t,e,r){if(e.dynamic){return this._reader.dynamic(t,r)}return this._reader.static(e.patterns,r)}}e["default"]=ProviderAsync},4306:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(9157);const i=r(5212);class DeepFilter{constructor(t,e){this._settings=t;this._micromatchOptions=e}getFilter(t,e,r){const s=this._getMatcher(e);const i=this._getNegativePatternsRe(r);return e=>this._filter(t,e,s,i)}_getMatcher(t){return new i.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const e=t.filter(s.pattern.isAffectDepthOfReadingPattern);return s.pattern.convertPatternsToRe(e,this._micromatchOptions)}_filter(t,e,r,i){if(this._isSkippedByDeep(t,e.path)){return false}if(this._isSkippedSymbolicLink(e)){return false}const n=s.path.removeLeadingDotSegment(e.path);if(this._isSkippedByPositivePatterns(n,r)){return false}return this._isSkippedByNegativePatterns(n,i)}_isSkippedByDeep(t,e){if(this._settings.deep===Infinity){return false}return this._getEntryLevel(t,e)>=this._settings.deep}_getEntryLevel(t,e){const r=e.split("/").length;if(t===""){return r}const s=t.split("/").length;return r-s}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,e){return!this._settings.baseNameMatch&&!e.match(t)}_isSkippedByNegativePatterns(t,e){return!s.pattern.matchAny(t,e)}}e["default"]=DeepFilter},180:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(9157);class EntryFilter{constructor(t,e){this._settings=t;this._micromatchOptions=e;this.index=new Map}getFilter(t,e){const r=s.pattern.convertPatternsToRe(t,this._micromatchOptions);const i=s.pattern.convertPatternsToRe(e,Object.assign(Object.assign({},this._micromatchOptions),{dot:true}));return t=>this._filter(t,r,i)}_filter(t,e,r){const i=s.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(i)){return false}if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t)){return false}if(this._isSkippedByAbsoluteNegativePatterns(i,r)){return false}const n=t.dirent.isDirectory();const o=this._isMatchToPatterns(i,e,n)&&!this._isMatchToPatterns(i,r,n);if(this._settings.unique&&o){this._createIndexRecord(i)}return o}_isDuplicateEntry(t){return this.index.has(t)}_createIndexRecord(t){this.index.set(t,undefined)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(t,e){if(!this._settings.absolute){return false}const r=s.path.makeAbsolute(this._settings.cwd,t);return s.pattern.matchAny(r,e)}_isMatchToPatterns(t,e,r){const i=s.pattern.matchAny(t,e);if(!i&&r){return s.pattern.matchAny(t+"/",e)}return i}}e["default"]=EntryFilter},1139:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(9157);class ErrorFilter{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return s.errno.isEnoentCodeError(t)||this._settings.suppressErrors}}e["default"]=ErrorFilter},6801:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(9157);class Matcher{constructor(t,e,r){this._patterns=t;this._settings=e;this._micromatchOptions=r;this._storage=[];this._fillStorage()}_fillStorage(){for(const t of this._patterns){const e=this._getPatternSegments(t);const r=this._splitSegmentsIntoSections(e);this._storage.push({complete:r.length<=1,pattern:t,segments:e,sections:r})}}_getPatternSegments(t){const e=s.pattern.getPatternParts(t,this._micromatchOptions);return e.map((t=>{const e=s.pattern.isDynamicPattern(t,this._settings);if(!e){return{dynamic:false,pattern:t}}return{dynamic:true,pattern:t,patternRe:s.pattern.makeRe(t,this._micromatchOptions)}}))}_splitSegmentsIntoSections(t){return s.array.splitWhen(t,(t=>t.dynamic&&s.pattern.hasGlobStar(t.pattern)))}}e["default"]=Matcher},5212:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(6801);class PartialMatcher extends s.default{match(t){const e=t.split("/");const r=e.length;const s=this._storage.filter((t=>!t.complete||t.segments.length>r));for(const t of s){const s=t.sections[0];if(!t.complete&&r>s.length){return true}const i=e.every(((e,r)=>{const s=t.segments[r];if(s.dynamic&&s.patternRe.test(e)){return true}if(!s.dynamic&&s.pattern===e){return true}return false}));if(i){return true}}return false}}e["default"]=PartialMatcher},5261:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1017);const i=r(4306);const n=r(180);const o=r(1139);const a=r(3181);class Provider{constructor(t){this._settings=t;this.errorFilter=new o.default(this._settings);this.entryFilter=new n.default(this._settings,this._getMicromatchOptions());this.deepFilter=new i.default(this._settings,this._getMicromatchOptions());this.entryTransformer=new a.default(this._settings)}_getRootDirectory(t){return s.resolve(this._settings.cwd,t.base)}_getReaderOptions(t){const e=t.base==="."?"":t.base;return{basePath:e,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(e,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:true,strictSlashes:false}}}e["default"]=Provider},4060:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2781);const i=r(5754);const n=r(5261);class ProviderStream extends n.default{constructor(){super(...arguments);this._reader=new i.default(this._settings)}read(t){const e=this._getRootDirectory(t);const r=this._getReaderOptions(t);const i=this.api(e,t,r);const n=new s.Readable({objectMode:true,read:()=>{}});i.once("error",(t=>n.emit("error",t))).on("data",(t=>n.emit("data",r.transform(t)))).once("end",(()=>n.emit("end")));n.once("close",(()=>i.destroy()));return n}api(t,e,r){if(e.dynamic){return this._reader.dynamic(t,r)}return this._reader.static(e.patterns,r)}}e["default"]=ProviderStream},335:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(7046);const i=r(5261);class ProviderSync extends i.default{constructor(){super(...arguments);this._reader=new s.default(this._settings)}read(t){const e=this._getRootDirectory(t);const r=this._getReaderOptions(t);const s=this.api(e,t,r);return s.map(r.transform)}api(t,e,r){if(e.dynamic){return this._reader.dynamic(t,r)}return this._reader.static(e.patterns,r)}}e["default"]=ProviderSync},3181:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(9157);class EntryTransformer{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let e=t.path;if(this._settings.absolute){e=s.path.makeAbsolute(this._settings.cwd,e);e=s.path.unixify(e)}if(this._settings.markDirectories&&t.dirent.isDirectory()){e+="/"}if(!this._settings.objectMode){return e}return Object.assign(Object.assign({},t),{path:e})}}e["default"]=EntryTransformer},3260:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(803);const i=r(5788);const n=r(5754);class ReaderAsync extends i.default{constructor(){super(...arguments);this._walkAsync=s.walk;this._readerStream=new n.default(this._settings)}dynamic(t,e){return new Promise(((r,s)=>{this._walkAsync(t,e,((t,e)=>{if(t===null){r(e)}else{s(t)}}))}))}async static(t,e){const r=[];const s=this._readerStream.static(t,e);return new Promise(((t,e)=>{s.once("error",e);s.on("data",(t=>r.push(t)));s.once("end",(()=>t(r)))}))}}e["default"]=ReaderAsync},5788:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(1017);const i=r(2580);const n=r(9157);class Reader{constructor(t){this._settings=t;this._fsStatSettings=new i.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return s.resolve(this._settings.cwd,t)}_makeEntry(t,e){const r={name:e,path:e,dirent:n.fs.createDirentFromStats(e,t)};if(this._settings.stats){r.stats=t}return r}_isFatalError(t){return!n.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}}e["default"]=Reader},5754:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2781);const i=r(2580);const n=r(803);const o=r(5788);class ReaderStream extends o.default{constructor(){super(...arguments);this._walkStream=n.walkStream;this._stat=i.stat}dynamic(t,e){return this._walkStream(t,e)}static(t,e){const r=t.map(this._getFullEntryPath,this);const i=new s.PassThrough({objectMode:true});i._write=(s,n,o)=>this._getEntry(r[s],t[s],e).then((t=>{if(t!==null&&e.entryFilter(t)){i.push(t)}if(s===r.length-1){i.end()}o()})).catch(o);for(let t=0;t<r.length;t++){i.write(t)}return i}_getEntry(t,e,r){return this._getStat(t).then((t=>this._makeEntry(t,e))).catch((t=>{if(r.errorFilter(t)){return null}throw t}))}_getStat(t){return new Promise(((e,r)=>{this._stat(t,this._fsStatSettings,((t,s)=>t===null?e(s):r(t)))}))}}e["default"]=ReaderStream},7046:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const s=r(2580);const i=r(803);const n=r(5788);class ReaderSync extends n.default{constructor(){super(...arguments);this._walkSync=i.walkSync;this._statSync=s.statSync}dynamic(t,e){return this._walkSync(t,e)}static(t,e){const r=[];for(const s of t){const t=this._getFullEntryPath(s);const i=this._getEntry(t,s,e);if(i===null||!e.entryFilter(i)){continue}r.push(i)}return r}_getEntry(t,e,r){try{const r=this._getStat(t);return this._makeEntry(r,e)}catch(t){if(r.errorFilter(t)){return null}throw t}}_getStat(t){return this._statSync(t,this._fsStatSettings)}}e["default"]=ReaderSync},6596:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const s=r(7147);const i=r(2037);const n=Math.max(i.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:s.lstat,lstatSync:s.lstatSync,stat:s.stat,statSync:s.statSync,readdir:s.readdir,readdirSync:s.readdirSync};class Settings{constructor(t={}){this._options=t;this.absolute=this._getValue(this._options.absolute,false);this.baseNameMatch=this._getValue(this._options.baseNameMatch,false);this.braceExpansion=this._getValue(this._options.braceExpansion,true);this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,true);this.concurrency=this._getValue(this._options.concurrency,n);this.cwd=this._getValue(this._options.cwd,process.cwd());this.deep=this._getValue(this._options.deep,Infinity);this.dot=this._getValue(this._options.dot,false);this.extglob=this._getValue(this._options.extglob,true);this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,true);this.fs=this._getFileSystemMethods(this._options.fs);this.globstar=this._getValue(this._options.globstar,true);this.ignore=this._getValue(this._options.ignore,[]);this.markDirectories=this._getValue(this._options.markDirectories,false);this.objectMode=this._getValue(this._options.objectMode,false);this.onlyDirectories=this._getValue(this._options.onlyDirectories,false);this.onlyFiles=this._getValue(this._options.onlyFiles,true);this.stats=this._getValue(this._options.stats,false);this.suppressErrors=this._getValue(this._options.suppressErrors,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,false);this.unique=this._getValue(this._options.unique,true);if(this.onlyDirectories){this.onlyFiles=false}if(this.stats){this.objectMode=true}this.ignore=[].concat(this.ignore)}_getValue(t,e){return t===undefined?e:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}e["default"]=Settings},4716:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.splitWhen=e.flatten=void 0;function flatten(t){return t.reduce(((t,e)=>[].concat(t,e)),[])}e.flatten=flatten;function splitWhen(t,e){const r=[[]];let s=0;for(const i of t){if(e(i)){s++;r[s]=[]}else{r[s].push(i)}}return r}e.splitWhen=splitWhen},5375:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.isEnoentCodeError=void 0;function isEnoentCodeError(t){return t.code==="ENOENT"}e.isEnoentCodeError=isEnoentCodeError},2916:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.createDirentFromStats=void 0;class DirentFromStats{constructor(t,e){this.name=t;this.isBlockDevice=e.isBlockDevice.bind(e);this.isCharacterDevice=e.isCharacterDevice.bind(e);this.isDirectory=e.isDirectory.bind(e);this.isFIFO=e.isFIFO.bind(e);this.isFile=e.isFile.bind(e);this.isSocket=e.isSocket.bind(e);this.isSymbolicLink=e.isSymbolicLink.bind(e)}}function createDirentFromStats(t,e){return new DirentFromStats(t,e)}e.createDirentFromStats=createDirentFromStats},9157:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.string=e.stream=e.pattern=e.path=e.fs=e.errno=e.array=void 0;const s=r(4716);e.array=s;const i=r(5375);e.errno=i;const n=r(2916);e.fs=n;const o=r(1156);e.path=o;const a=r(2208);e.pattern=a;const l=r(5233);e.stream=l;const u=r(264);e.string=u},1156:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.convertPosixPathToPattern=e.convertWindowsPathToPattern=e.convertPathToPattern=e.escapePosixPath=e.escapeWindowsPath=e.escape=e.removeLeadingDotSegment=e.makeAbsolute=e.unixify=void 0;const s=r(2037);const i=r(1017);const n=s.platform()==="win32";const o=2;const a=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;const l=/(\\?)([(){}]|^!|[!+@](?=\())/g;const u=/^\\\\([.?])/;const c=/\\(?![!()+@{}])/g;function unixify(t){return t.replace(/\\/g,"/")}e.unixify=unixify;function makeAbsolute(t,e){return i.resolve(t,e)}e.makeAbsolute=makeAbsolute;function removeLeadingDotSegment(t){if(t.charAt(0)==="."){const e=t.charAt(1);if(e==="/"||e==="\\"){return t.slice(o)}}return t}e.removeLeadingDotSegment=removeLeadingDotSegment;e.escape=n?escapeWindowsPath:escapePosixPath;function escapeWindowsPath(t){return t.replace(l,"\\$2")}e.escapeWindowsPath=escapeWindowsPath;function escapePosixPath(t){return t.replace(a,"\\$2")}e.escapePosixPath=escapePosixPath;e.convertPathToPattern=n?convertWindowsPathToPattern:convertPosixPathToPattern;function convertWindowsPathToPattern(t){return escapeWindowsPath(t).replace(u,"//$1").replace(c,"/")}e.convertWindowsPathToPattern=convertWindowsPathToPattern;function convertPosixPathToPattern(t){return escapePosixPath(t)}e.convertPosixPathToPattern=convertPosixPathToPattern},2208:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.removeDuplicateSlashes=e.matchAny=e.convertPatternsToRe=e.makeRe=e.getPatternParts=e.expandBraceExpansion=e.expandPatternsWithBraceExpansion=e.isAffectDepthOfReadingPattern=e.endsWithSlashGlobStar=e.hasGlobStar=e.getBaseDirectory=e.isPatternRelatedToParentDirectory=e.getPatternsOutsideCurrentDirectory=e.getPatternsInsideCurrentDirectory=e.getPositivePatterns=e.getNegativePatterns=e.isPositivePattern=e.isNegativePattern=e.convertToNegativePattern=e.convertToPositivePattern=e.isDynamicPattern=e.isStaticPattern=void 0;const s=r(1017);const i=r(1532);const n=r(9015);const o="**";const a="\\";const l=/[*?]|^!/;const u=/\[[^[]*]/;const c=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;const h=/[!*+?@]\([^(]*\)/;const d=/,|\.\./;const f=/(?!^)\/{2,}/g;function isStaticPattern(t,e={}){return!isDynamicPattern(t,e)}e.isStaticPattern=isStaticPattern;function isDynamicPattern(t,e={}){if(t===""){return false}if(e.caseSensitiveMatch===false||t.includes(a)){return true}if(l.test(t)||u.test(t)||c.test(t)){return true}if(e.extglob!==false&&h.test(t)){return true}if(e.braceExpansion!==false&&hasBraceExpansion(t)){return true}return false}e.isDynamicPattern=isDynamicPattern;function hasBraceExpansion(t){const e=t.indexOf("{");if(e===-1){return false}const r=t.indexOf("}",e+1);if(r===-1){return false}const s=t.slice(e,r);return d.test(s)}function convertToPositivePattern(t){return isNegativePattern(t)?t.slice(1):t}e.convertToPositivePattern=convertToPositivePattern;function convertToNegativePattern(t){return"!"+t}e.convertToNegativePattern=convertToNegativePattern;function isNegativePattern(t){return t.startsWith("!")&&t[1]!=="("}e.isNegativePattern=isNegativePattern;function isPositivePattern(t){return!isNegativePattern(t)}e.isPositivePattern=isPositivePattern;function getNegativePatterns(t){return t.filter(isNegativePattern)}e.getNegativePatterns=getNegativePatterns;function getPositivePatterns(t){return t.filter(isPositivePattern)}e.getPositivePatterns=getPositivePatterns;function getPatternsInsideCurrentDirectory(t){return t.filter((t=>!isPatternRelatedToParentDirectory(t)))}e.getPatternsInsideCurrentDirectory=getPatternsInsideCurrentDirectory;function getPatternsOutsideCurrentDirectory(t){return t.filter(isPatternRelatedToParentDirectory)}e.getPatternsOutsideCurrentDirectory=getPatternsOutsideCurrentDirectory;function isPatternRelatedToParentDirectory(t){return t.startsWith("..")||t.startsWith("./..")}e.isPatternRelatedToParentDirectory=isPatternRelatedToParentDirectory;function getBaseDirectory(t){return i(t,{flipBackslashes:false})}e.getBaseDirectory=getBaseDirectory;function hasGlobStar(t){return t.includes(o)}e.hasGlobStar=hasGlobStar;function endsWithSlashGlobStar(t){return t.endsWith("/"+o)}e.endsWithSlashGlobStar=endsWithSlashGlobStar;function isAffectDepthOfReadingPattern(t){const e=s.basename(t);return endsWithSlashGlobStar(t)||isStaticPattern(e)}e.isAffectDepthOfReadingPattern=isAffectDepthOfReadingPattern;function expandPatternsWithBraceExpansion(t){return t.reduce(((t,e)=>t.concat(expandBraceExpansion(e))),[])}e.expandPatternsWithBraceExpansion=expandPatternsWithBraceExpansion;function expandBraceExpansion(t){const e=n.braces(t,{expand:true,nodupes:true});e.sort(((t,e)=>t.length-e.length));return e.filter((t=>t!==""))}e.expandBraceExpansion=expandBraceExpansion;function getPatternParts(t,e){let{parts:r}=n.scan(t,Object.assign(Object.assign({},e),{parts:true}));if(r.length===0){r=[t]}if(r[0].startsWith("/")){r[0]=r[0].slice(1);r.unshift("")}return r}e.getPatternParts=getPatternParts;function makeRe(t,e){return n.makeRe(t,e)}e.makeRe=makeRe;function convertPatternsToRe(t,e){return t.map((t=>makeRe(t,e)))}e.convertPatternsToRe=convertPatternsToRe;function matchAny(t,e){return e.some((e=>e.test(t)))}e.matchAny=matchAny;function removeDuplicateSlashes(t){return t.replace(f,"/")}e.removeDuplicateSlashes=removeDuplicateSlashes},5233:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.merge=void 0;const s=r(2375);function merge(t){const e=s(t);t.forEach((t=>{t.once("error",(t=>e.emit("error",t)))}));e.once("close",(()=>propagateCloseEventToSources(t)));e.once("end",(()=>propagateCloseEventToSources(t)));return e}e.merge=merge;function propagateCloseEventToSources(t){t.forEach((t=>t.emit("close")))}},264:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.isEmpty=e.isString=void 0;function isString(t){return typeof t==="string"}e.isString=isString;function isEmpty(t){return t===""}e.isEmpty=isEmpty},1532:(t,e,r)=>{"use strict";var s=r(4042);var i=r(1017).posix.dirname;var n=r(2037).platform()==="win32";var o="/";var a=/\\/g;var l=/[\{\[].*[\}\]]$/;var u=/(^|[^\\])([\{\[]|\([^\)]+$)/;var c=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=function globParent(t,e){var r=Object.assign({flipBackslashes:true},e);if(r.flipBackslashes&&n&&t.indexOf(o)<0){t=t.replace(a,o)}if(l.test(t)){t+=o}t+="a";do{t=i(t)}while(s(t)||u.test(t));return t.replace(c,"$1")}},8276:(t,e,r)=>{let s=r(6224);let i=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||s.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env);let formatter=(t,e,r=t)=>s=>{let i=""+s;let n=i.indexOf(e,t.length);return~n?t+replaceClose(i,e,r,n)+e:t+i+e};let replaceClose=(t,e,r,s)=>{let i=t.substring(0,s)+r;let n=t.substring(s+e.length);let o=n.indexOf(e);return~o?i+replaceClose(n,e,r,o):i+n};let createColors=(t=i)=>({isColorSupported:t,reset:t?t=>`${t}`:String,bold:t?formatter("","",""):String,dim:t?formatter("","",""):String,italic:t?formatter("",""):String,underline:t?formatter("",""):String,inverse:t?formatter("",""):String,hidden:t?formatter("",""):String,strikethrough:t?formatter("",""):String,black:t?formatter("",""):String,red:t?formatter("",""):String,green:t?formatter("",""):String,yellow:t?formatter("",""):String,blue:t?formatter("",""):String,magenta:t?formatter("",""):String,cyan:t?formatter("",""):String,white:t?formatter("",""):String,gray:t?formatter("",""):String,bgBlack:t?formatter("",""):String,bgRed:t?formatter("",""):String,bgGreen:t?formatter("",""):String,bgYellow:t?formatter("",""):String,bgBlue:t?formatter("",""):String,bgMagenta:t?formatter("",""):String,bgCyan:t?formatter("",""):String,bgWhite:t?formatter("",""):String});t.exports=createColors();t.exports.createColors=createColors},7019:(t,e,r)=>{"use strict";r.r(e);var s=r(8276);var i=r(8018);var n=r.n(i);var o=r(1017);var a=r.n(o);var l=r(1112);var u=r.n(l);var c=r(5418);var h=r.n(c);var d=r(7147);var f=r.n(d);function makeDir(t,e={recursive:true}){return f().promises.mkdir(t,e)}var p=r(2081);function isInGitRepository(){try{(0,p.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(t){}return false}function isInMercurialRepository(){try{(0,p.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(t){}return false}function isDefaultBranchSet(){try{(0,p.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch(t){}return false}function tryGitInit(t){let e=false;try{(0,p.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,p.execSync)("git init",{stdio:"ignore"});e=true;if(!isDefaultBranchSet()){(0,p.execSync)("git checkout -b main",{stdio:"ignore"})}(0,p.execSync)("git add -A",{stdio:"ignore"});(0,p.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch(r){if(e){try{f().rmSync(a().join(t,".git"),{recursive:true,force:true})}catch(t){}}return false}}function isFolderEmpty(t,e){const r=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];const i=f().readdirSync(t).filter((t=>!r.includes(t))).filter((t=>!/\.iml$/.test(t)));if(i.length>0){console.log(`The directory ${(0,s.green)(e)} contains files that could conflict:`);console.log();for(const e of i){try{const r=f().lstatSync(a().join(t,e));if(r.isDirectory()){console.log(` ${(0,s.blue)(e)}/`)}else{console.log(` ${e}`)}}catch{console.log(` ${e}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}async function isWriteable(t){try{await f().promises.access(t,(f().constants||f()).W_OK);return true}catch(t){return false}}var g=r(7987);var m=r.n(g);async function install(t){let e=["install"];return new Promise(((r,s)=>{const i=m()(t,e,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});i.on("close",(i=>{if(i!==0){s({command:`${t} ${e.join(" ")}`});return}r()}))}))}var y=r(6573);const identity=t=>t;const copy=async(t,e,{cwd:r,rename:s=identity,parents:i=true}={})=>{const n=typeof t==="string"?[t]:t;if(n.length===0||!e){throw new TypeError("`src` and `dest` are required")}const o=await(0,y.async)(n,{cwd:r,dot:true,absolute:false,stats:false});const l=r?a().resolve(r,e):e;return Promise.all(o.map((async t=>{const e=a().dirname(t);const n=s(a().basename(t));const o=r?a().resolve(r,t):t;const u=i?a().join(l,e,n):a().join(l,n);await f().promises.mkdir(a().dirname(u),{recursive:true});return f().promises.copyFile(o,u)})))};var v=r(2037);var b=r.n(v);const _=require("fs/promises");var S=r.n(_);const w=JSON.parse('{"name":"create-xmlui-app","version":"0.9.39","scripts":{"dev":"mkdir -p dist && cp -r templates/default dist/ && ncc build ./index.ts -w -o dist/","build":"ncc build ./index.ts -o dist/ --minify --no-cache --no-source-map-register && cp -r templates/default dist/","prepublishOnly":"npm run build"},"bin":{"create-xmlui-app":"./dist/index.js"},"files":["dist"],"devDependencies":{"@types/cross-spawn":"6.0.0","@types/node":"^20.2.5","@types/prompts":"2.0.1","@types/validate-npm-package-name":"3.0.0","@vercel/ncc":"0.34.0","fast-glob":"3.3.1","commander":"2.20.0","cross-spawn":"7.0.5","picocolors":"1.0.0","prompts":"2.1.0","update-check":"1.5.4","validate-npm-package-name":"3.0.0"},"engines":{"node":">=18.12.0"},"repository":{"url":"https://github.com/xmlui-com/xmlui.git"}}');const installTemplate=async({appName:t,root:e,packageManager:r,template:i,useGit:n})=>{console.log((0,s.bold)(`Using ${r}.`));console.log("\nInitializing project with template:",i,"\n");const o=a().join(__dirname,i,"ts");const l=["**"];if(!n){l.push("!gitignore")}await copy(l,e,{parents:true,cwd:o,rename(t){switch(t){case"gitignore":case"eslintrc.json":{return`.${t}`}case"README-template.md":{return"README.md"}default:{return t}}}});const u={name:t,version:"0.1.0",private:true,scripts:{start:"xmlui start",build:"xmlui build",preview:"xmlui preview","build-prod":"npm run build -- --prod","release-ci":"npm run build-prod && xmlui zip-dist"},dependencies:{xmlui:w.version}};await S().writeFile(a().join(e,"package.json"),JSON.stringify(u,null,2)+b().EOL);console.log("\nInstalling dependencies:");for(const t in u.dependencies)console.log(`- ${(0,s.cyan)(t)}`);console.log();await install(r)};async function createApp({appPath:t,packageManager:e,useGit:r}){const i="default";const n=a().resolve(t);if(!await isWriteable(a().dirname(n))){console.error("The application path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const o=a().basename(n);await makeDir(n);if(!isFolderEmpty(n,o)){process.exit(1)}console.log(`Creating a new UI Engine app in ${(0,s.green)(n)}.`);console.log();process.chdir(n);await installTemplate({appName:o,root:n,template:i,packageManager:e,useGit:r});if(r&&tryGitInit(n)){console.log("Initialized a git repository.");console.log()}console.log(`${(0,s.green)("Success!")} Created ${o} at ${t}`);console.log()}var x=r(5880);var P=r.n(x);function validateNpmName(t){const e=P()(t);if(e.validForNewPackages){return{valid:true}}return{valid:false,problems:[...e.errors||[],...e.warnings||[]]}}let E="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=t=>{if(t.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const A=new(n().Command)(w.name).version(w.version).arguments("<project-directory>").usage(`${(0,s.green)("<project-directory>")} [options]`).action((t=>{E=t})).option("--use-git",`Explicitly tell the CLI to initialize a git repository`).allowUnknownOption().parse(process.argv);const C="npm";async function run(){if(typeof E==="string"){E=E.trim()}if(!E){const t=await u()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:t=>{const e=validateNpmName(a().basename(a().resolve(t)));if(e.valid){return true}return"Invalid project name: "+e.problems[0]}});if(typeof t.path==="string"){E=t.path.trim()}}if(!E){console.log("\nPlease specify the project directory:\n"+` ${(0,s.cyan)(A.name())} ${(0,s.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,s.cyan)(A.name())} ${(0,s.green)("my-xmlui-app")}\n\n`+`Run ${(0,s.cyan)(`${A.name()} --help`)} to see all options.`);process.exit(1)}const t=a().resolve(E);const e=a().basename(t);const{valid:r,problems:i}=validateNpmName(e);if(!r){console.error(`Could not create a project called ${(0,s.red)(`"${e}"`)} because of npm naming restrictions:`);i.forEach((t=>console.error(` ${(0,s.red)((0,s.bold)("*"))} ${t}`)));process.exit(1)}const n=a().resolve(t);const o=a().basename(n);const l=f().existsSync(n);if(l&&!isFolderEmpty(n,o)){process.exit(1)}if(A.useGit===undefined){const{useGit:t}=await u()({type:"toggle",name:"useGit",message:`Would you like to initialize a git repository?`,initial:false,active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});A.useGit=Boolean(t)}await createApp({appPath:t,packageManager:C,useGit:!!A.useGit})}const R=h()(w).catch((()=>null));async function notifyUpdate(){try{const t=await R;if(t===null||t===void 0?void 0:t.latest){const t="npm i -g create-xmlui-app";console.log((0,s.yellow)((0,s.bold)("A new version of `create-xmlui-app` is available!"))+"\n"+"You can update by running: "+(0,s.cyan)(t)+"\n")}process.exit()}catch{}}run().then(notifyUpdate).catch((async t=>{console.log();console.log("Aborting installation.");if(t.command){console.log(` ${(0,s.cyan)(t.command)} has failed.`)}else{console.log((0,s.red)("Unexpected error. Please report it as a bug:")+"\n",t)}console.log();await notifyUpdate();process.exit(1)}))},4300:t=>{"use strict";t.exports=require("buffer")},2081:t=>{"use strict";t.exports=require("child_process")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},4521:t=>{"use strict";t.exports=require("readline")},2781:t=>{"use strict";t.exports=require("stream")},6224:t=>{"use strict";t.exports=require("tty")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},5462:t=>{"use strict";t.exports=JSON.parse('["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"]')}};var e={};function __nccwpck_require__(r){var s=e[r];if(s!==undefined){return s.exports}var i=e[r]={exports:{}};var n=true;try{t[r](i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete e[r]}return i.exports}(()=>{__nccwpck_require__.n=t=>{var e=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(e,{a:e});return e}})();(()=>{__nccwpck_require__.d=(t,e)=>{for(var r in e){if(__nccwpck_require__.o(e,r)&&!__nccwpck_require__.o(t,r)){Object.defineProperty(t,r,{enumerable:true,get:e[r]})}}}})();(()=>{__nccwpck_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(7019);module.exports=r})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-xmlui-app",
3
- "version": "0.9.37",
3
+ "version": "0.9.39",
4
4
  "scripts": {
5
5
  "dev": "mkdir -p dist && cp -r templates/default dist/ && ncc build ./index.ts -w -o dist/",
6
6
  "build": "ncc build ./index.ts -o dist/ --minify --no-cache --no-source-map-register && cp -r templates/default dist/",