@shopify/create-app 0.6.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,560 +1,96 @@
1
- 'use strict';
2
-
3
- var core = require('@oclif/core');
4
- var path$1 = require('path');
5
- var require$$1 = require('fs');
6
- var require$$2 = require('util');
7
-
8
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
-
10
- var path__default = /*#__PURE__*/_interopDefaultLegacy(path$1);
11
- var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
12
- var require$$2__default = /*#__PURE__*/_interopDefaultLegacy(require$$2);
13
-
14
- function normalizeWindowsPath(input = "") {
15
- if (!input.includes("\\")) {
16
- return input;
17
- }
18
- return input.replace(/\\/g, "/");
19
- }
20
-
21
- const _UNC_REGEX = /^[/][/]/;
22
- const _UNC_DRIVE_REGEX = /^[/][/]([.]{1,2}[/])?([a-zA-Z]):[/]/;
23
- const _IS_ABSOLUTE_RE = /^\/|^\\|^[a-zA-Z]:[/\\]/;
24
- const sep = "/";
25
- const delimiter = ":";
26
- const normalize = function(path2) {
27
- if (path2.length === 0) {
28
- return ".";
29
- }
30
- path2 = normalizeWindowsPath(path2);
31
- const isUNCPath = path2.match(_UNC_REGEX);
32
- const hasUNCDrive = isUNCPath && path2.match(_UNC_DRIVE_REGEX);
33
- const isPathAbsolute = isAbsolute(path2);
34
- const trailingSeparator = path2[path2.length - 1] === "/";
35
- path2 = normalizeString(path2, !isPathAbsolute);
36
- if (path2.length === 0) {
37
- if (isPathAbsolute) {
38
- return "/";
39
- }
40
- return trailingSeparator ? "./" : ".";
41
- }
42
- if (trailingSeparator) {
43
- path2 += "/";
44
- }
45
- if (isUNCPath) {
46
- if (hasUNCDrive) {
47
- return `//./${path2}`;
48
- }
49
- return `//${path2}`;
50
- }
51
- return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2;
52
- };
53
- const join = function(...args) {
54
- if (args.length === 0) {
55
- return ".";
56
- }
57
- let joined;
58
- for (let i = 0; i < args.length; ++i) {
59
- const arg = args[i];
60
- if (arg.length > 0) {
61
- if (joined === void 0) {
62
- joined = arg;
63
- } else {
64
- joined += `/${arg}`;
65
- }
66
- }
67
- }
68
- if (joined === void 0) {
69
- return ".";
70
- }
71
- return normalize(joined);
72
- };
73
- const resolve = function(...args) {
74
- args = args.map((arg) => normalizeWindowsPath(arg));
75
- let resolvedPath = "";
76
- let resolvedAbsolute = false;
77
- for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
78
- const path2 = i >= 0 ? args[i] : process.cwd();
79
- if (path2.length === 0) {
80
- continue;
81
- }
82
- resolvedPath = `${path2}/${resolvedPath}`;
83
- resolvedAbsolute = isAbsolute(path2);
84
- }
85
- resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
86
- if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
87
- return `/${resolvedPath}`;
88
- }
89
- return resolvedPath.length > 0 ? resolvedPath : ".";
90
- };
91
- function normalizeString(path2, allowAboveRoot) {
92
- let res = "";
93
- let lastSegmentLength = 0;
94
- let lastSlash = -1;
95
- let dots = 0;
96
- let char = null;
97
- for (let i = 0; i <= path2.length; ++i) {
98
- if (i < path2.length) {
99
- char = path2[i];
100
- } else if (char === "/") {
101
- break;
102
- } else {
103
- char = "/";
104
- }
105
- if (char === "/") {
106
- if (lastSlash === i - 1 || dots === 1) ; else if (dots === 2) {
107
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
108
- if (res.length > 2) {
109
- const lastSlashIndex = res.lastIndexOf("/");
110
- if (lastSlashIndex === -1) {
111
- res = "";
112
- lastSegmentLength = 0;
113
- } else {
114
- res = res.slice(0, lastSlashIndex);
115
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
116
- }
117
- lastSlash = i;
118
- dots = 0;
119
- continue;
120
- } else if (res.length !== 0) {
121
- res = "";
122
- lastSegmentLength = 0;
123
- lastSlash = i;
124
- dots = 0;
125
- continue;
126
- }
127
- }
128
- if (allowAboveRoot) {
129
- res += res.length > 0 ? "/.." : "..";
130
- lastSegmentLength = 2;
131
- }
132
- } else {
133
- if (res.length > 0) {
134
- res += `/${path2.slice(lastSlash + 1, i)}`;
135
- } else {
136
- res = path2.slice(lastSlash + 1, i);
137
- }
138
- lastSegmentLength = i - lastSlash - 1;
139
- }
140
- lastSlash = i;
141
- dots = 0;
142
- } else if (char === "." && dots !== -1) {
143
- ++dots;
144
- } else {
145
- dots = -1;
146
- }
147
- }
148
- return res;
149
- }
150
- const isAbsolute = function(p) {
151
- return _IS_ABSOLUTE_RE.test(p);
152
- };
153
- const toNamespacedPath = function(p) {
154
- return normalizeWindowsPath(p);
155
- };
156
- const extname = function(p) {
157
- return path__default["default"].posix.extname(normalizeWindowsPath(p));
158
- };
159
- const relative = function(from, to) {
160
- return path__default["default"].posix.relative(normalizeWindowsPath(from), normalizeWindowsPath(to));
161
- };
162
- const dirname = function(p) {
163
- return path__default["default"].posix.dirname(normalizeWindowsPath(p));
164
- };
165
- const format = function(p) {
166
- return normalizeWindowsPath(path__default["default"].posix.format(p));
167
- };
168
- const basename = function(p, ext) {
169
- return path__default["default"].posix.basename(normalizeWindowsPath(p), ext);
170
- };
171
- const parse = function(p) {
172
- return path__default["default"].posix.parse(normalizeWindowsPath(p));
173
- };
174
-
175
- const _path = /*#__PURE__*/Object.freeze({
176
- __proto__: null,
177
- sep: sep,
178
- delimiter: delimiter,
179
- normalize: normalize,
180
- join: join,
181
- resolve: resolve,
182
- normalizeString: normalizeString,
183
- isAbsolute: isAbsolute,
184
- toNamespacedPath: toNamespacedPath,
185
- extname: extname,
186
- relative: relative,
187
- dirname: dirname,
188
- format: format,
189
- basename: basename,
190
- parse: parse
191
- });
192
-
193
- const index = {
194
- ..._path
195
- };
196
-
197
- var findUp$1 = {exports: {}};
198
-
199
- var locatePath = {exports: {}};
200
-
201
- var pLocate$2 = {exports: {}};
202
-
203
- var pLimit$2 = {exports: {}};
204
-
205
- var pTry$2 = {exports: {}};
206
-
207
- const pTry$1 = (fn, ...arguments_) => new Promise(resolve => {
208
- resolve(fn(...arguments_));
209
- });
210
-
211
- pTry$2.exports = pTry$1;
212
- // TODO: remove this in the next major version
213
- pTry$2.exports.default = pTry$1;
214
-
215
- const pTry = pTry$2.exports;
216
-
217
- const pLimit$1 = concurrency => {
218
- if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
219
- return Promise.reject(new TypeError('Expected `concurrency` to be a number from 1 and up'));
220
- }
221
-
222
- const queue = [];
223
- let activeCount = 0;
224
-
225
- const next = () => {
226
- activeCount--;
227
-
228
- if (queue.length > 0) {
229
- queue.shift()();
230
- }
231
- };
232
-
233
- const run = (fn, resolve, ...args) => {
234
- activeCount++;
235
-
236
- const result = pTry(fn, ...args);
237
-
238
- resolve(result);
239
-
240
- result.then(next, next);
241
- };
242
-
243
- const enqueue = (fn, resolve, ...args) => {
244
- if (activeCount < concurrency) {
245
- run(fn, resolve, ...args);
246
- } else {
247
- queue.push(run.bind(null, fn, resolve, ...args));
248
- }
249
- };
250
-
251
- const generator = (fn, ...args) => new Promise(resolve => enqueue(fn, resolve, ...args));
252
- Object.defineProperties(generator, {
253
- activeCount: {
254
- get: () => activeCount
255
- },
256
- pendingCount: {
257
- get: () => queue.length
258
- },
259
- clearQueue: {
260
- value: () => {
261
- queue.length = 0;
262
- }
263
- }
264
- });
265
-
266
- return generator;
267
- };
268
-
269
- pLimit$2.exports = pLimit$1;
270
- pLimit$2.exports.default = pLimit$1;
271
-
272
- const pLimit = pLimit$2.exports;
273
-
274
- class EndError extends Error {
275
- constructor(value) {
276
- super();
277
- this.value = value;
278
- }
279
- }
280
-
281
- // The input can also be a promise, so we await it
282
- const testElement = async (element, tester) => tester(await element);
283
-
284
- // The input can also be a promise, so we `Promise.all()` them both
285
- const finder = async element => {
286
- const values = await Promise.all(element);
287
- if (values[1] === true) {
288
- throw new EndError(values[0]);
289
- }
290
-
291
- return false;
292
- };
293
-
294
- const pLocate$1 = async (iterable, tester, options) => {
295
- options = {
296
- concurrency: Infinity,
297
- preserveOrder: true,
298
- ...options
299
- };
300
-
301
- const limit = pLimit(options.concurrency);
302
-
303
- // Start all the promises concurrently with optional limit
304
- const items = [...iterable].map(element => [element, limit(testElement, element, tester)]);
305
-
306
- // Check the promises either serially or concurrently
307
- const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity);
308
-
309
- try {
310
- await Promise.all(items.map(element => checkLimit(finder, element)));
311
- } catch (error) {
312
- if (error instanceof EndError) {
313
- return error.value;
314
- }
315
-
316
- throw error;
317
- }
318
- };
319
-
320
- pLocate$2.exports = pLocate$1;
321
- // TODO: Remove this for the next major release
322
- pLocate$2.exports.default = pLocate$1;
323
-
324
- const path = path__default["default"];
325
- const fs$1 = require$$1__default["default"];
326
- const {promisify: promisify$1} = require$$2__default["default"];
327
- const pLocate = pLocate$2.exports;
328
-
329
- const fsStat = promisify$1(fs$1.stat);
330
- const fsLStat = promisify$1(fs$1.lstat);
331
-
332
- const typeMappings = {
333
- directory: 'isDirectory',
334
- file: 'isFile'
335
- };
336
-
337
- function checkType({type}) {
338
- if (type in typeMappings) {
339
- return;
340
- }
341
-
342
- throw new Error(`Invalid type specified: ${type}`);
343
- }
344
-
345
- const matchType = (type, stat) => type === undefined || stat[typeMappings[type]]();
346
-
347
- locatePath.exports = async (paths, options) => {
348
- options = {
349
- cwd: process.cwd(),
350
- type: 'file',
351
- allowSymlinks: true,
352
- ...options
353
- };
354
- checkType(options);
355
- const statFn = options.allowSymlinks ? fsStat : fsLStat;
356
-
357
- return pLocate(paths, async path_ => {
358
- try {
359
- const stat = await statFn(path.resolve(options.cwd, path_));
360
- return matchType(options.type, stat);
361
- } catch (_) {
362
- return false;
363
- }
364
- }, options);
365
- };
366
-
367
- locatePath.exports.sync = (paths, options) => {
368
- options = {
369
- cwd: process.cwd(),
370
- allowSymlinks: true,
371
- type: 'file',
372
- ...options
373
- };
374
- checkType(options);
375
- const statFn = options.allowSymlinks ? fs$1.statSync : fs$1.lstatSync;
376
-
377
- for (const path_ of paths) {
378
- try {
379
- const stat = statFn(path.resolve(options.cwd, path_));
380
-
381
- if (matchType(options.type, stat)) {
382
- return path_;
383
- }
384
- } catch (_) {
385
- }
386
- }
387
- };
388
-
389
- var pathExists = {exports: {}};
390
-
391
- const fs = require$$1__default["default"];
392
- const {promisify} = require$$2__default["default"];
393
-
394
- const pAccess = promisify(fs.access);
395
-
396
- pathExists.exports = async path => {
397
- try {
398
- await pAccess(path);
399
- return true;
400
- } catch (_) {
401
- return false;
402
- }
403
- };
404
-
405
- pathExists.exports.sync = path => {
406
- try {
407
- fs.accessSync(path);
408
- return true;
409
- } catch (_) {
410
- return false;
411
- }
412
- };
413
-
414
- (function (module) {
415
- const path = path__default["default"];
416
- const locatePath$1 = locatePath.exports;
417
- const pathExists$1 = pathExists.exports;
418
-
419
- const stop = Symbol('findUp.stop');
420
-
421
- module.exports = async (name, options = {}) => {
422
- let directory = path.resolve(options.cwd || '');
423
- const {root} = path.parse(directory);
424
- const paths = [].concat(name);
425
-
426
- const runMatcher = async locateOptions => {
427
- if (typeof name !== 'function') {
428
- return locatePath$1(paths, locateOptions);
429
- }
430
-
431
- const foundPath = await name(locateOptions.cwd);
432
- if (typeof foundPath === 'string') {
433
- return locatePath$1([foundPath], locateOptions);
434
- }
435
-
436
- return foundPath;
437
- };
438
-
439
- // eslint-disable-next-line no-constant-condition
440
- while (true) {
441
- // eslint-disable-next-line no-await-in-loop
442
- const foundPath = await runMatcher({...options, cwd: directory});
443
-
444
- if (foundPath === stop) {
445
- return;
446
- }
447
-
448
- if (foundPath) {
449
- return path.resolve(directory, foundPath);
450
- }
451
-
452
- if (directory === root) {
453
- return;
454
- }
455
-
456
- directory = path.dirname(directory);
457
- }
458
- };
459
-
460
- module.exports.sync = (name, options = {}) => {
461
- let directory = path.resolve(options.cwd || '');
462
- const {root} = path.parse(directory);
463
- const paths = [].concat(name);
464
-
465
- const runMatcher = locateOptions => {
466
- if (typeof name !== 'function') {
467
- return locatePath$1.sync(paths, locateOptions);
468
- }
469
-
470
- const foundPath = name(locateOptions.cwd);
471
- if (typeof foundPath === 'string') {
472
- return locatePath$1.sync([foundPath], locateOptions);
473
- }
474
-
475
- return foundPath;
476
- };
477
-
478
- // eslint-disable-next-line no-constant-condition
479
- while (true) {
480
- const foundPath = runMatcher({...options, cwd: directory});
481
-
482
- if (foundPath === stop) {
483
- return;
484
- }
485
-
486
- if (foundPath) {
487
- return path.resolve(directory, foundPath);
488
- }
489
-
490
- if (directory === root) {
491
- return;
492
- }
493
-
494
- directory = path.dirname(directory);
495
- }
496
- };
497
-
498
- module.exports.exists = pathExists$1;
499
-
500
- module.exports.sync.exists = pathExists$1.sync;
501
-
502
- module.exports.stop = stop;
503
- }(findUp$1));
504
-
505
- var findUp = findUp$1.exports;
506
-
507
- function findPathUp(path, from, type) {
508
- return findUp(path, { cwd: from, type });
509
- }
510
-
511
- class FatalError extends Error {
512
- constructor(message, tryMessage = null) {
513
- super(message);
514
- this.tryMessage = tryMessage;
515
- }
516
- }
517
- class BugError extends FatalError {
518
- }
519
-
520
- async function template(name) {
521
- const templatePath = await findPathUp(`templates/${name}`, __dirname, "directory");
522
- if (templatePath) {
523
- return templatePath;
524
- } else {
525
- throw new BugError(`Couldn't find the template ${name} in @shopify/create-app.`);
526
- }
527
- }
528
-
529
- async function init(_) {
530
- console.log("it works");
531
- }
532
-
533
- const _Init = class extends core.Command {
534
- async run() {
535
- const templatePath = await template("app");
536
- const { flags } = await this.parse(_Init);
537
- const directory = flags.path ? index.resolve(flags.path) : process.cwd();
538
- await init({
539
- name: flags.name,
540
- templatePath,
541
- directory
542
- });
543
- }
544
- };
545
- let Init = _Init;
546
- Init.description = "Create a new Shopify app";
547
- Init.flags = {
548
- name: core.Flags.string({
549
- char: "n",
550
- description: "The name of the app to be initialized.",
551
- hidden: false
552
- }),
553
- path: core.Flags.string({
554
- char: "p",
555
- description: "The path to the directory where the app will be created.",
556
- hidden: false
557
- })
558
- };
559
-
560
- module.exports = Init;
1
+ var ho=Object.defineProperty;var fo=(t,e,r)=>e in t?ho(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Sr=(t,e,r)=>(fo(t,typeof e!="symbol"?e+"":e,r),r),hn=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var Ne=(t,e,r)=>(hn(t,e,"read from private field"),r?r.call(t):e.get(t)),Ft=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Ce=(t,e,r,i)=>(hn(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r),Er=(t,e,r,i)=>({set _(n){Ce(t,e,n,r)},get _(){return Ne(t,e,i)}});var Pe,tt,rt;import{Flags as xr,Command as po}from"@oclif/core";import mo from"assert";import Rr from"events";import go from"readline";import He,{statSync as yo,readFileSync as vo,readFile as bo,stat as wo}from"fs";import te,{sep as Ar,extname as _o,resolve as fn,dirname as So}from"path";import it from"node:path";import Eo from"node:process";import{promises as pn}from"node:fs";import dn from"os";import mn from"util";import Mt from"stream";import{fileURLToPath as Tr}from"url";import xo from"tty";var Ro=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},re={},me={exports:{}},gn={exports:{}};(function(t){const e=process.env.TERM_PROGRAM==="Hyper",r=process.platform==="win32",i=process.platform==="linux",n={ballotDisabled:"\u2612",ballotOff:"\u2610",ballotOn:"\u2611",bullet:"\u2022",bulletWhite:"\u25E6",fullBlock:"\u2588",heart:"\u2764",identicalTo:"\u2261",line:"\u2500",mark:"\u203B",middot:"\xB7",minus:"\uFF0D",multiplication:"\xD7",obelus:"\xF7",pencilDownRight:"\u270E",pencilRight:"\u270F",pencilUpRight:"\u2710",percent:"%",pilcrow2:"\u2761",pilcrow:"\xB6",plusMinus:"\xB1",section:"\xA7",starsOff:"\u2606",starsOn:"\u2605",upDownArrow:"\u2195"},s=Object.assign({},n,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),a=Object.assign({},n,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",question:"?",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:i?"\u25B8":"\u276F",pointerSmall:i?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});t.exports=r&&!e?s:a,Reflect.defineProperty(t.exports,"common",{enumerable:!1,value:n}),Reflect.defineProperty(t.exports,"windows",{enumerable:!1,value:s}),Reflect.defineProperty(t.exports,"other",{enumerable:!1,value:a})})(gn);const Ao=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),To=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,yn=()=>{const t={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(t.enabled=process.env.FORCE_COLOR!=="0");const e=s=>{let a=s.open=`\x1B[${s.codes[0]}m`,o=s.close=`\x1B[${s.codes[1]}m`,u=s.regex=new RegExp(`\\u001b\\[${s.codes[1]}m`,"g");return s.wrap=(l,c)=>{l.includes(o)&&(l=l.replace(u,o+a));let f=a+l+o;return c?f.replace(/\r*\n/g,`${o}$&${a}`):f},s},r=(s,a,o)=>typeof s=="function"?s(a):s.wrap(a,o),i=(s,a)=>{if(s===""||s==null)return"";if(t.enabled===!1)return s;if(t.visible===!1)return"";let o=""+s,u=o.includes(`
2
+ `),l=a.length;for(l>0&&a.includes("unstyle")&&(a=[...new Set(["unstyle",...a])].reverse());l-- >0;)o=r(t.styles[a[l]],o,u);return o},n=(s,a,o)=>{t.styles[s]=e({name:s,codes:a}),(t.keys[o]||(t.keys[o]=[])).push(s),Reflect.defineProperty(t,s,{configurable:!0,enumerable:!0,set(l){t.alias(s,l)},get(){let l=c=>i(c,l.stack);return Reflect.setPrototypeOf(l,t),l.stack=this.stack?this.stack.concat(s):[s],l}})};return n("reset",[0,0],"modifier"),n("bold",[1,22],"modifier"),n("dim",[2,22],"modifier"),n("italic",[3,23],"modifier"),n("underline",[4,24],"modifier"),n("inverse",[7,27],"modifier"),n("hidden",[8,28],"modifier"),n("strikethrough",[9,29],"modifier"),n("black",[30,39],"color"),n("red",[31,39],"color"),n("green",[32,39],"color"),n("yellow",[33,39],"color"),n("blue",[34,39],"color"),n("magenta",[35,39],"color"),n("cyan",[36,39],"color"),n("white",[37,39],"color"),n("gray",[90,39],"color"),n("grey",[90,39],"color"),n("bgBlack",[40,49],"bg"),n("bgRed",[41,49],"bg"),n("bgGreen",[42,49],"bg"),n("bgYellow",[43,49],"bg"),n("bgBlue",[44,49],"bg"),n("bgMagenta",[45,49],"bg"),n("bgCyan",[46,49],"bg"),n("bgWhite",[47,49],"bg"),n("blackBright",[90,39],"bright"),n("redBright",[91,39],"bright"),n("greenBright",[92,39],"bright"),n("yellowBright",[93,39],"bright"),n("blueBright",[94,39],"bright"),n("magentaBright",[95,39],"bright"),n("cyanBright",[96,39],"bright"),n("whiteBright",[97,39],"bright"),n("bgBlackBright",[100,49],"bgBright"),n("bgRedBright",[101,49],"bgBright"),n("bgGreenBright",[102,49],"bgBright"),n("bgYellowBright",[103,49],"bgBright"),n("bgBlueBright",[104,49],"bgBright"),n("bgMagentaBright",[105,49],"bgBright"),n("bgCyanBright",[106,49],"bgBright"),n("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=To,t.hasColor=t.hasAnsi=s=>(t.ansiRegex.lastIndex=0,typeof s=="string"&&s!==""&&t.ansiRegex.test(s)),t.alias=(s,a)=>{let o=typeof a=="string"?t[a]:a;if(typeof o!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");o.stack||(Reflect.defineProperty(o,"name",{value:s}),t.styles[s]=o,o.stack=[s]),Reflect.defineProperty(t,s,{configurable:!0,enumerable:!0,set(u){t.alias(s,u)},get(){let u=l=>i(l,u.stack);return Reflect.setPrototypeOf(u,t),u.stack=this.stack?this.stack.concat(o.stack):o.stack,u}})},t.theme=s=>{if(!Ao(s))throw new TypeError("Expected theme to be an object");for(let a of Object.keys(s))t.alias(a,s[a]);return t},t.alias("unstyle",s=>typeof s=="string"&&s!==""?(t.ansiRegex.lastIndex=0,s.replace(t.ansiRegex,"")):""),t.alias("noop",s=>s),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=gn.exports,t.define=n,t};me.exports=yn(),me.exports.create=yn,function(t){const e=Object.prototype.toString,r=me.exports;let i=!1,n=[];const s={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};t.longest=(o,u)=>o.reduce((l,c)=>Math.max(l,u?c[u].length:c.length),0),t.hasColor=o=>!!o&&r.hasColor(o);const a=t.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o);t.nativeType=o=>e.call(o).slice(8,-1).toLowerCase().replace(/\s/g,""),t.isAsyncFn=o=>t.nativeType(o)==="asyncfunction",t.isPrimitive=o=>o!=null&&typeof o!="object"&&typeof o!="function",t.resolve=(o,u,...l)=>typeof u=="function"?u.call(o,...l):u,t.scrollDown=(o=[])=>[...o.slice(1),o[0]],t.scrollUp=(o=[])=>[o.pop(),...o],t.reorder=(o=[])=>{let u=o.slice();return u.sort((l,c)=>l.index>c.index?1:l.index<c.index?-1:0),u},t.swap=(o,u,l)=>{let c=o.length,f=l===c?0:l<0?c-1:l,h=o[u];o[u]=o[f],o[f]=h},t.width=(o,u=80)=>{let l=o&&o.columns?o.columns:u;return o&&typeof o.getWindowSize=="function"&&(l=o.getWindowSize()[0]),process.platform==="win32"?l-1:l},t.height=(o,u=20)=>{let l=o&&o.rows?o.rows:u;return o&&typeof o.getWindowSize=="function"&&(l=o.getWindowSize()[1]),l},t.wordWrap=(o,u={})=>{if(!o)return o;typeof u=="number"&&(u={width:u});let{indent:l="",newline:c=`
3
+ `+l,width:f=80}=u;f-=((c+l).match(/[^\S\n]/g)||[]).length;let d=`.{1,${f}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,p=o.trim(),m=new RegExp(d,"g"),w=p.match(m)||[];return w=w.map(b=>b.replace(/\n$/,"")),u.padEnd&&(w=w.map(b=>b.padEnd(f," "))),u.padStart&&(w=w.map(b=>b.padStart(f," "))),l+w.join(c)},t.unmute=o=>{let u=o.stack.find(c=>r.keys.color.includes(c));return u?r[u]:o.stack.find(c=>c.slice(2)==="bg")?r[u.slice(2)]:c=>c},t.pascal=o=>o?o[0].toUpperCase()+o.slice(1):"",t.inverse=o=>{if(!o||!o.stack)return o;let u=o.stack.find(c=>r.keys.color.includes(c));if(u){let c=r["bg"+t.pascal(u)];return c?c.black:o}let l=o.stack.find(c=>c.slice(0,2)==="bg");return l?r[l.slice(2).toLowerCase()]||o:r.none},t.complement=o=>{if(!o||!o.stack)return o;let u=o.stack.find(c=>r.keys.color.includes(c)),l=o.stack.find(c=>c.slice(0,2)==="bg");if(u&&!l)return r[s[u]||u];if(l){let c=l.slice(2).toLowerCase(),f=s[c];return f&&r["bg"+t.pascal(f)]||o}return r.none},t.meridiem=o=>{let u=o.getHours(),l=o.getMinutes(),c=u>=12?"pm":"am";u=u%12;let f=u===0?12:u,h=l<10?"0"+l:l;return f+":"+h+" "+c},t.set=(o={},u="",l)=>u.split(".").reduce((c,f,h,d)=>{let p=d.length-1>h?c[f]||{}:l;return!t.isObject(p)&&h<d.length-1&&(p={}),c[f]=p},o),t.get=(o={},u="",l)=>{let c=o[u]==null?u.split(".").reduce((f,h)=>f&&f[h],o):o[u];return c??l},t.mixin=(o,u)=>{if(!a(o))return u;if(!a(u))return o;for(let l of Object.keys(u)){let c=Object.getOwnPropertyDescriptor(u,l);if(c.hasOwnProperty("value"))if(o.hasOwnProperty(l)&&a(c.value)){let f=Object.getOwnPropertyDescriptor(o,l);a(f.value)?o[l]=t.merge({},o[l],u[l]):Reflect.defineProperty(o,l,c)}else Reflect.defineProperty(o,l,c);else Reflect.defineProperty(o,l,c)}return o},t.merge=(...o)=>{let u={};for(let l of o)t.mixin(u,l);return u},t.mixinEmitter=(o,u)=>{let l=u.constructor.prototype;for(let c of Object.keys(l)){let f=l[c];typeof f=="function"?t.define(o,c,f.bind(u)):t.define(o,c,f)}},t.onExit=o=>{const u=(l,c)=>{i||(i=!0,n.forEach(f=>f()),l===!0&&process.exit(128+c))};n.length===0&&(process.once("SIGTERM",u.bind(null,!0,15)),process.once("SIGINT",u.bind(null,!0,2)),process.once("exit",u)),n.push(o)},t.define=(o,u,l)=>{Reflect.defineProperty(o,u,{value:l})},t.defineExport=(o,u,l)=>{let c;Reflect.defineProperty(o,u,{enumerable:!0,configurable:!0,set(f){c=f},get(){return c?c():l()}})}}(re);var nt={};nt.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"},nt.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"},nt.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"},nt.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"},nt.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"};const vn=go,$o=nt,Po=/^(?:\x1b)([a-zA-Z0-9])$/,Co=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,ko={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};function Oo(t){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(t)}function Lo(t){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(t)}const Nt=(t="",e={})=>{let r,i={name:e.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:t,raw:t,...e};if(Buffer.isBuffer(t)?t[0]>127&&t[1]===void 0?(t[0]-=128,t="\x1B"+String(t)):t=String(t):t!==void 0&&typeof t!="string"?t=String(t):t||(t=i.sequence||""),i.sequence=i.sequence||t||i.name,t==="\r")i.raw=void 0,i.name="return";else if(t===`
4
+ `)i.name="enter";else if(t===" ")i.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x1B\x7F"||t==="\x1B\b")i.name="backspace",i.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")i.name="escape",i.meta=t.length===2;else if(t===" "||t==="\x1B ")i.name="space",i.meta=t.length===2;else if(t<="")i.name=String.fromCharCode(t.charCodeAt(0)+"a".charCodeAt(0)-1),i.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")i.name="number";else if(t.length===1&&t>="a"&&t<="z")i.name=t;else if(t.length===1&&t>="A"&&t<="Z")i.name=t.toLowerCase(),i.shift=!0;else if(r=Po.exec(t))i.meta=!0,i.shift=/^[A-Z]$/.test(r[1]);else if(r=Co.exec(t)){let n=[...t];n[0]==="\x1B"&&n[1]==="\x1B"&&(i.option=!0);let s=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),a=(r[3]||r[5]||1)-1;i.ctrl=!!(a&4),i.meta=!!(a&10),i.shift=!!(a&1),i.code=s,i.name=ko[s],i.shift=Oo(s)||i.shift,i.ctrl=Lo(s)||i.ctrl}return i};Nt.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let i=vn.createInterface({terminal:!0,input:r});vn.emitKeypressEvents(r,i);let n=(o,u)=>e(o,Nt(o,u),i),s=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",n),i.resume(),()=>{r.isTTY&&r.setRawMode(s),r.removeListener("keypress",n),i.pause(),i.close()}},Nt.action=(t,e,r)=>{let i={...$o,...r};return e.ctrl?(e.action=i.ctrl[e.name],e):e.option&&i.option?(e.action=i.option[e.name],e):e.shift?(e.action=i.shift[e.name],e):(e.action=i.keys[e.name],e)};var Do=Nt,Io=t=>{t.timers=t.timers||{};let e=t.options.timers;if(!!e)for(let r of Object.keys(e)){let i=e[r];typeof i=="number"&&(i={interval:i}),Fo(t,r,i)}};function Fo(t,e,r={}){let i=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},n=r.interval||120;i.frames=r.frames||[],i.loading=!0;let s=setInterval(()=>{i.ms=Date.now()-i.start,i.tick++,t.render()},n);return i.stop=()=>{i.loading=!1,clearInterval(s)},Reflect.defineProperty(i,"interval",{value:s}),t.once("close",()=>i.stop()),i.stop}const{define:Mo,width:No}=re;class Ho{constructor(e){let r=e.options;Mo(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=No(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r=="function"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}}var Bo=Ho;const $r=re,X=me.exports,Pr={default:X.noop,noop:X.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||$r.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||$r.complement(this.primary)},primary:X.cyan,success:X.green,danger:X.magenta,strong:X.bold,warning:X.yellow,muted:X.dim,disabled:X.gray,dark:X.dim.gray,underline:X.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typing||this.dim},set placeholder(t){this._placeholder=t},get placeholder(){return this._placeholder||this.primary.dim},set highlight(t){this._highlight=t},get highlight(){return this._highlight||this.inverse}};Pr.merge=(t={})=>{t.styles&&typeof t.styles.enabled=="boolean"&&(X.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible=="boolean"&&(X.visible=t.styles.visible);let e=$r.merge({},Pr,t.styles);delete e.merge;for(let r of Object.keys(X))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>X[r]});for(let r of Object.keys(X.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>X[r]});return e};var jo=Pr;const Cr=process.platform==="win32",ke=me.exports,qo=re,kr={...ke.symbols,upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301",ellipsisLarge:"\u22EF",ellipsisSmall:"\u2026",fullBlock:"\u2588",identicalTo:"\u2261",indicator:ke.symbols.check,leftAngle:"\u2039",mark:"\u203B",minus:"\u2212",multiplication:"\xD7",obelus:"\xF7",percent:"%",pilcrow:"\xB6",pilcrow2:"\u2761",pencilUpRight:"\u2710",pencilDownRight:"\u270E",pencilRight:"\u270F",plus:"+",plusMinus:"\xB1",pointRight:"\u261E",rightAngle:"\u203A",section:"\xA7",hexagon:{off:"\u2B21",on:"\u2B22",disabled:"\u2B22"},ballot:{on:"\u2611",off:"\u2610",disabled:"\u2612"},stars:{on:"\u2605",off:"\u2606",disabled:"\u2606"},folder:{on:"\u25BC",off:"\u25B6",disabled:"\u25B6"},prefix:{pending:ke.symbols.question,submitted:ke.symbols.check,cancelled:ke.symbols.cross},separator:{pending:ke.symbols.pointerSmall,submitted:ke.symbols.middot,cancelled:ke.symbols.middot},radio:{off:Cr?"( )":"\u25EF",on:Cr?"(*)":"\u25C9",disabled:Cr?"(|)":"\u24BE"},numbers:["\u24EA","\u2460","\u2461","\u2462","\u2463","\u2464","\u2465","\u2466","\u2467","\u2468","\u2469","\u246A","\u246B","\u246C","\u246D","\u246E","\u246F","\u2470","\u2471","\u2472","\u2473","\u3251","\u3252","\u3253","\u3254","\u3255","\u3256","\u3257","\u3258","\u3259","\u325A","\u325B","\u325C","\u325D","\u325E","\u325F","\u32B1","\u32B2","\u32B3","\u32B4","\u32B5","\u32B6","\u32B7","\u32B8","\u32B9","\u32BA","\u32BB","\u32BC","\u32BD","\u32BE","\u32BF"]};kr.merge=t=>{let e=qo.merge({},ke.symbols,kr,t.symbols);return delete e.merge,e};var Uo=kr;const Vo=jo,zo=Uo,Go=re;var Wo=t=>{t.options=Go.merge({},t.options.theme,t.options),t.symbols=zo.merge(t.options),t.styles=Vo.merge(t.options)},Or={exports:{}};(function(t,e){const r=process.env.TERM_PROGRAM==="Apple_Terminal",i=me.exports,n=re,s=t.exports=e,a="\x1B[",o="\x07";let u=!1;const l=s.code={bell:o,beep:o,beginning:`${a}G`,down:`${a}J`,esc:a,getPosition:`${a}6n`,hide:`${a}?25l`,line:`${a}2K`,lineEnd:`${a}K`,lineStart:`${a}1K`,restorePosition:a+(r?"8":"u"),savePosition:a+(r?"7":"s"),screen:`${a}2J`,show:`${a}?25h`,up:`${a}1J`},c=s.cursor={get hidden(){return u},hide(){return u=!0,l.hide},show(){return u=!1,l.show},forward:(h=1)=>`${a}${h}C`,backward:(h=1)=>`${a}${h}D`,nextLine:(h=1)=>`${a}E`.repeat(h),prevLine:(h=1)=>`${a}F`.repeat(h),up:(h=1)=>h?`${a}${h}A`:"",down:(h=1)=>h?`${a}${h}B`:"",right:(h=1)=>h?`${a}${h}C`:"",left:(h=1)=>h?`${a}${h}D`:"",to(h,d){return d?`${a}${d+1};${h+1}H`:`${a}${h+1}G`},move(h=0,d=0){let p="";return p+=h<0?c.left(-h):h>0?c.right(h):"",p+=d<0?c.up(-d):d>0?c.down(d):"",p},restore(h={}){let{after:d,cursor:p,initial:m,input:w,prompt:b,size:R,value:_}=h;if(m=n.isPrimitive(m)?String(m):"",w=n.isPrimitive(w)?String(w):"",_=n.isPrimitive(_)?String(_):"",R){let $=s.cursor.up(R)+s.cursor.to(b.length),E=w.length-p;return E>0&&($+=s.cursor.left(E)),$}if(_||d){let $=!w&&!!m?-m.length:-w.length+p;return d&&($-=d.length),w===""&&m&&!b.includes(m)&&($+=m.length),s.cursor.move($)}}},f=s.erase={screen:l.screen,up:l.up,down:l.down,line:l.line,lineEnd:l.lineEnd,lineStart:l.lineStart,lines(h){let d="";for(let p=0;p<h;p++)d+=s.erase.line+(p<h-1?s.cursor.up(1):"");return h&&(d+=s.code.beginning),d}};s.clear=(h="",d=process.stdout.columns)=>{if(!d)return f.line+c.to(0);let p=b=>[...i.unstyle(b)].length,m=h.split(/\r?\n/),w=0;for(let b of m)w+=1+Math.floor(Math.max(p(b)-1,0)/d);return(f.line+c.prevLine()).repeat(w-1)+f.line+c.to(0)}})(Or,Or.exports);const Qo=Rr,bn=me.exports,Lr=Do,Yo=Io,Ko=Bo,Xo=Wo,le=re,ze=Or.exports;class cn extends Qo{constructor(e={}){super();this.name=e.name,this.type=e.type,this.options=e,Xo(this),Yo(this),this.state=new Ko(this),this.initial=[e.initial,e.default].find(r=>r!=null),this.stdout=e.stdout||process.stdout,this.stdin=e.stdin||process.stdin,this.scale=e.scale||1,this.term=this.options.term||process.env.TERM_PROGRAM,this.margin=Jo(this.options.margin),this.setMaxListeners(0),Zo(this)}async keypress(e,r={}){this.keypressed=!0;let i=Lr.action(e,Lr(e,r),this.options.actions);this.state.keypress=i,this.emit("keypress",e,i),this.emit("state",this.state.clone());let n=this.options[i.action]||this[i.action]||this.dispatch;if(typeof n=="function")return await n.call(this,e,i);this.alert()}alert(){delete this.state.alert,this.options.show===!1?this.emit("alert"):this.stdout.write(ze.code.beep)}cursorHide(){this.stdout.write(ze.cursor.hide()),le.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(ze.cursor.show())}write(e){!e||(this.stdout&&this.state.show!==!1&&this.stdout.write(e),this.state.buffer+=e)}clear(e=0){let r=this.state.buffer;this.state.buffer="",!(!r&&!e||this.options.show===!1)&&this.stdout.write(ze.cursor.down(e)+ze.clear(r,this.width))}restore(){if(this.state.closed||this.options.show===!1)return;let{prompt:e,after:r,rest:i}=this.sections(),{cursor:n,initial:s="",input:a="",value:o=""}=this,u=this.state.size=i.length,l={after:r,cursor:n,initial:s,input:a,prompt:e,size:u,value:o},c=ze.cursor.restore(l);c&&this.stdout.write(c)}sections(){let{buffer:e,input:r,prompt:i}=this.state;i=bn.unstyle(i);let n=bn.unstyle(e),s=n.indexOf(i),a=n.slice(0,s),u=n.slice(s).split(`
5
+ `),l=u[0],c=u[u.length-1],h=(i+(r?" "+r:"")).length,d=h<l.length?l.slice(h+1):"";return{header:a,prompt:l,after:d,rest:u.slice(1),last:c}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let e=this.state.error||await this.validate(this.value,this.state);if(e!==!0){let r=`
6
+ `+this.symbols.pointer+" ";typeof e=="string"?r+=e.trim():r+="Invalid input",this.state.error=`
7
+ `+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(e){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel=="function"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(e))}async close(){this.state.closed=!0;try{let e=this.sections(),r=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(ze.cursor.down(e.rest.length)),this.write(`
8
+ `.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=Lr.listen(this,this.keypress.bind(this)),this.once("close",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip=="function"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:e,options:r,result:i}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>i.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let n=r.onSubmit.bind(this),s=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await n(this.name,this.value,this),s())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,r)=>{if(this.once("submit",e),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,r,i){let{options:n,state:s,symbols:a,timers:o}=this,u=o&&o[e];s.timer=u;let l=n[e]||s[e]||a[e],c=r&&r[e]!=null?r[e]:await l;if(c==="")return c;let f=await this.resolve(c,s,r,i);return!f&&r&&r[e]?this.resolve(l,s,r,i):f}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,i=this.state;return i.timer=r,le.isObject(e)&&(e=e[i.status]||e.pending),le.hasColor(e)?e:(this.styles[i.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return le.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,i=this.state;i.timer=r;let n=e[i.status]||e.pending||i.separator,s=await this.resolve(n,i);return le.isObject(s)&&(s=s[i.status]||s.pending),le.hasColor(s)?s:this.styles.muted(s)}async pointer(e,r){let i=await this.element("pointer",e,r);if(typeof i=="string"&&le.hasColor(i))return i;if(i){let n=this.styles,s=this.index===r,a=s?n.primary:l=>l,o=await this.resolve(i[s?"on":"off"]||i,this.state),u=le.hasColor(o)?o:a(o);return s?u:" ".repeat(o.length)}}async indicator(e,r){let i=await this.element("indicator",e,r);if(typeof i=="string"&&le.hasColor(i))return i;if(i){let n=this.styles,s=e.enabled===!0,a=s?n.success:n.dark,o=i[s?"on":"off"]||i;return le.hasColor(o)?o:a(o)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let e=await this.element("hint");return le.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==""}resolve(e,...r){return le.resolve(this,e,...r)}get base(){return cn.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||le.height(this.stdout,25)}get width(){return this.options.columns||le.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,i=[r,e].find(this.isValue.bind(this));return this.isValue(i)?i:this.initial}static get prompt(){return e=>new this(e).run()}}function Zo(t){let e=n=>t[n]===void 0||typeof t[n]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],i=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let n of Object.keys(t.options)){if(r.includes(n)||/^on[A-Z]/.test(n))continue;let s=t.options[n];typeof s=="function"&&e(n)?i.includes(n)||(t[n]=s.bind(t)):typeof t[n]!="function"&&(t[n]=s)}}function Jo(t){typeof t=="number"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=n=>n%2===0?`
9
+ `:" ",i=[];for(let n=0;n<4;n++){let s=r(n);e[n]?i.push(s.repeat(e[n])):i.push("")}return i}var vt=cn,wn={};const eu=re,_n={default(t,e){return e},checkbox(t,e){throw new Error("checkbox role is not implemented yet")},editable(t,e){throw new Error("editable role is not implemented yet")},expandable(t,e){throw new Error("expandable role is not implemented yet")},heading(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||"",e},input(t,e){throw new Error("input role is not implemented yet")},option(t,e){return _n.default(t,e)},radio(t,e){throw new Error("radio role is not implemented yet")},separator(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};var tu=(t,e={})=>{let r=eu.merge({},_n,e.roles);return r[t]||r.default};const ru=me.exports,iu=vt,nu=tu,Ht=re,{reorder:Dr,scrollUp:su,scrollDown:au,isObject:Sn,swap:ou}=Ht;class uu extends iu{constructor(e){super(e);this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:i,suggest:n}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(s=>s.enabled=!1),typeof n!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");Sn(r)&&(r=Object.keys(r)),Array.isArray(r)?(i!=null&&(this.index=this.findIndex(i)),r.forEach(s=>this.enable(this.find(s))),await this.render()):(i!=null&&(r=i),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let i=[],n=0,s=async(a,o)=>{typeof a=="function"&&(a=await a.call(this)),a instanceof Promise&&(a=await a);for(let u=0;u<a.length;u++){let l=a[u]=await this.toChoice(a[u],n++,o);i.push(l),l.choices&&await s(l.choices,l)}return i};return s(e,r).then(a=>(this.state.loadingChoices=!1,a))}async toChoice(e,r,i){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let n=e.value;if(e=nu(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=r,e.cursor=0,Ht.define(e,"parent",i),e.level=i?i.level+1:1,e.indent==null&&(e.indent=i?i.indent+" ":e.indent||""),e.path=i?i.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,ru.unstyle(e.message).length));let a={...e};return e.reset=(o=a.input,u=a.value)=>{for(let l of Object.keys(a))e[l]=a[l];e.input=o,e.value=u},n==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit("choice",e,r,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,i){let n=await this.toChoice(e,r,i);return this.choices.push(n),this.index=this.choices.length-1,this.limit=this.choices.length,n}async newItem(e,r,i){let n={name:"New choice name?",editable:!0,newChoice:!0,...e},s=await this.addChoice(n,r,i);return s.updateChoice=()=>{delete s.newChoice,s.name=s.message=s.input,s.input="",s.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(e,r){return typeof r!="boolean"&&(r=e.enabled),r&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=r&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let e=this.selectable.every(r=>r.enabled);return this.choices.forEach(r=>r.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,r){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!="boolean"&&(r=!e.enabled),e.enabled=r,e.choices&&e.choices.forEach(n=>this.toggle(n,r));let i=e.parent;for(;i;){let n=i.choices.filter(s=>this.isDisabled(s));i.enabled=n.every(s=>s.enabled===!0),i=i.parent}return En(this,this.choices),this.emit("toggle",e,this),e}enable(e){return this.selected.length>=this.maxSelected?this.alert():(e.enabled=!this.isDisabled(e),e.choices&&e.choices.forEach(this.enable.bind(this)),e)}disable(e){return e.enabled=!1,e.choices&&e.choices.forEach(this.disable.bind(this)),e}number(e){this.num+=e;let r=i=>{let n=Number(i);if(n>this.choices.length-1)return this.alert();let s=this.focused,a=this.choices.find(o=>n===o.index);if(!a.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(this.visible.indexOf(a)===-1){let o=Dr(this.choices),u=o.indexOf(a);if(s.index>u){let l=o.slice(u,u+this.limit),c=o.filter(f=>!l.includes(f));this.choices=l.concat(c)}else{let l=u-this.limit+1;this.choices=o.slice(l).concat(o.slice(0,l))}}return this.index=this.choices.indexOf(a),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(i=>{let n=this.choices.length,s=this.num,a=(o=!1,u)=>{clearTimeout(this.numberTimeout),o&&(u=r(s)),this.num="",i(u)};if(s==="0"||s.length===1&&Number(s+"0")>n)return a(!0);if(Number(s)>n)return a(!1,this.alert());this.numberTimeout=setTimeout(()=>a(!0),this.delay)})}home(){return this.choices=Dr(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,r=Dr(this.choices);return this.choices=r.slice(e).concat(r.slice(0,e)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let e=this.choices.length,r=this.visible.length,i=this.index;return this.options.scroll===!1&&i===0?this.alert():e>r&&i===0?this.scrollUp():(this.index=(i-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,r=this.visible.length,i=this.index;return this.options.scroll===!1&&i===r-1?this.alert():e>r&&i===r-1?this.scrollDown():(this.index=(i+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=su(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=au(this.choices),this.index=e,this.isDisabled()?this.down():this.render()}async shiftUp(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index-1),await this.up(),this.sorting=!1;return}return this.scrollUp(this.index)}async shiftDown(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index+1),await this.down(),this.sorting=!1;return}return this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(e){ou(this.choices,this.index,e)}isDisabled(e=this.focused){return e&&["disabled","collapsed","hidden","completing","readonly"].some(i=>e[i]===!0)?!0:e&&e.role==="heading"}isEnabled(e=this.focused){if(Array.isArray(e))return e.every(r=>this.isEnabled(r));if(e.choices){let r=e.choices.filter(i=>!this.isDisabled(i));return e.enabled&&r.every(i=>this.isEnabled(i))}return e.enabled&&!this.isDisabled(e)}isChoice(e,r){return e.name===r||e.index===Number(r)}isSelected(e){return Array.isArray(this.initial)?this.initial.some(r=>this.isChoice(e,r)):this.isChoice(e,this.initial)}map(e=[],r="value"){return[].concat(e||[]).reduce((i,n)=>(i[n]=this.find(n,r),i),{})}filter(e,r){let n=typeof e=="function"?e:(o,u)=>[o.name,u].includes(e),a=(this.options.multiple?this.state._choices:this.choices).filter(n);return r?a.map(o=>o[r]):a}find(e,r){if(Sn(e))return r?e[r]:e;let n=typeof e=="function"?e:(a,o)=>[a.name,o].includes(e),s=this.choices.find(n);if(s)return r?s[r]:s}findIndex(e){return this.choices.indexOf(this.find(e))}async submit(){let e=this.focused;if(!e)return this.alert();if(e.newChoice)return e.input?(e.updateChoice(),this.render()):this.alert();if(this.choices.some(a=>a.newChoice))return this.alert();let{reorder:r,sort:i}=this.options,n=this.multiple===!0,s=this.selected;return s===void 0?this.alert():(Array.isArray(s)&&r!==!1&&i!==!0&&(s=Ht.reorder(s)),this.value=n?s.map(a=>a.name):s.name,super.submit())}set choices(e=[]){this.state._choices=this.state._choices||[],this.state.choices=e;for(let r of e)this.state._choices.some(i=>i.name===r.name)||this.state._choices.push(r);if(!this._initial&&this.options.initial){this._initial=!0;let r=this.initial;if(typeof r=="string"||typeof r=="number"){let i=this.find(r);i&&(this.initial=i.index,this.focus(i,!0))}}}get choices(){return En(this,this.state.choices||[])}set visible(e){this.state.visible=e}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(e){this.state.limit=e}get limit(){let{state:e,options:r,choices:i}=this,n=e.limit||this._limit||r.limit||i.length;return Math.min(n,this.height)}set value(e){super.value=e}get value(){return typeof super.value!="string"&&super.value===this.initial?this.input:super.value}set index(e){this.state.index=e}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let e=this.choices[this.index];return e&&this.state.submitted&&this.multiple!==!0&&(e.enabled=!0),e}get selectable(){return this.choices.filter(e=>!this.isDisabled(e))}get selected(){return this.multiple?this.enabled:this.focused}}function En(t,e){if(e instanceof Promise)return e;if(typeof e=="function"){if(Ht.isAsyncFn(e))return e;e=e.call(t,t)}for(let r of e){if(Array.isArray(r.choices)){let i=r.choices.filter(n=>!t.isDisabled(n));r.enabled=i.every(n=>n.enabled===!0)}t.isDisabled(r)===!0&&delete r.enabled}return e}var Bt=uu;const lu=Bt,Ir=re;class cu extends lu{constructor(e){super(e);this.emptyError=this.options.emptyError||"No items were selected"}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}separator(){if(this.options.separator)return super.separator();let e=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():e}pointer(e,r){return!this.multiple||this.options.pointer?super.pointer(e,r):""}indicator(e,r){return this.multiple?super.indicator(e,r):""}choiceMessage(e,r){let i=this.resolve(e.message,this.state,e,r);return e.role==="heading"&&!Ir.hasColor(i)&&(i=this.styles.strong(i)),this.resolve(i,this.state,e,r)}choiceSeparator(){return":"}async renderChoice(e,r){await this.onChoice(e,r);let i=this.index===r,n=await this.pointer(e,r),s=await this.indicator(e,r)+(e.pad||""),a=await this.resolve(e.hint,this.state,e,r);a&&!Ir.hasColor(a)&&(a=this.styles.muted(a));let o=this.indent(e),u=await this.choiceMessage(e,r),l=()=>[this.margin[3],o+n+s,u,this.margin[1],a].filter(Boolean).join(" ");return e.role==="heading"?l():e.disabled?(Ir.hasColor(u)||(u=this.styles.disabled(u)),l()):(i&&(u=this.styles.em(u)),l())}async renderChoices(){if(this.state.loading==="choices")return this.styles.warning("Loading choices");if(this.state.submitted)return"";let e=this.visible.map(async(s,a)=>await this.renderChoice(s,a)),r=await Promise.all(e);r.length||r.push(this.styles.danger("No matching choices"));let i=this.margin[0]+r.join(`
10
+ `),n;return this.options.choicesHeader&&(n=await this.resolve(this.options.choicesHeader,this.state)),[n,i].filter(Boolean).join(`
11
+ `)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,i="",n=await this.header(),s=await this.prefix(),a=await this.separator(),o=await this.message();this.options.promptLine!==!1&&(i=[s,o,a,""].join(" "),this.state.prompt=i);let u=await this.format(),l=await this.error()||await this.hint(),c=await this.renderChoices(),f=await this.footer();u&&(i+=u),l&&!i.includes(l)&&(i+=" "+l),e&&!u&&!c.trim()&&this.multiple&&this.emptyError!=null&&(i+=this.styles.danger(this.emptyError)),this.clear(r),this.write([n,i,c,f].filter(Boolean).join(`
12
+ `)),this.write(this.margin[2]),this.restore()}}var Ge=cu;const hu=Ge,fu=(t,e)=>{let r=t.toLowerCase();return i=>{let s=i.toLowerCase().indexOf(r),a=e(i.slice(s,s+r.length));return s>=0?i.slice(0,s)+a+i.slice(s+r.length):i}};class pu extends hu{constructor(e){super(e);this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:i}=this.state;return this.input=i.slice(0,r)+e+i.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,e,r);let i=e.toLowerCase();return r.filter(n=>n.message.toLowerCase().includes(i))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=fu(this.input,e),i=this.choices;this.choices=i.map(n=>({...n,message:r(n.message)})),await super.render(),this.choices=i}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}}var du=pu;const Fr=re;var xn=(t,e={})=>{t.cursorHide();let{input:r="",initial:i="",pos:n,showCursor:s=!0,color:a}=e,o=a||t.styles.placeholder,u=Fr.inverse(t.styles.primary),l=m=>u(t.styles.black(m)),c=r,f=" ",h=l(f);if(t.blink&&t.blink.off===!0&&(l=m=>m,h=""),s&&n===0&&i===""&&r==="")return l(f);if(s&&n===0&&(r===i||r===""))return l(i[0])+o(i.slice(1));i=Fr.isPrimitive(i)?`${i}`:"",r=Fr.isPrimitive(r)?`${r}`:"";let d=i&&i.startsWith(r)&&i!==r,p=d?l(i[r.length]):h;if(n!==r.length&&s===!0&&(c=r.slice(0,n)+l(r[n])+r.slice(n+1),p=""),s===!1&&(p=""),d){let m=t.styles.unstyle(c+p);return c+p+o(i.slice(m.length))}return c+p};const mu=me.exports,gu=Ge,yu=xn;class vu extends gu{constructor(e){super({...e,multiple:!0});this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:i,input:n}=r;return r.value=r.input=n.slice(0,i)+e+n.slice(i),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:i}=e;return e.value=e.input=i.slice(0,r-1)+i.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:i}=e;if(i[r]===void 0)return this.alert();let n=`${i}`.slice(0,r)+`${i}`.slice(r+1);return e.value=e.input=n,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:i}=e;return r&&r.startsWith(i)&&i!==r?(e.value=e.input=r,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?e.cursor===0?super.prev():(e.value=e.input="",e.cursor=0,this.render()):this.alert()}separator(){return""}format(e){return this.state.submitted?"":super.format(e)}pointer(){return""}indicator(e){return e.input?"\u29BF":"\u2299"}async choiceSeparator(e,r){let i=await this.resolve(e.separator,this.state,e,r)||":";return i?" "+this.styles.disabled(i):""}async renderChoice(e,r){await this.onChoice(e,r);let{state:i,styles:n}=this,{cursor:s,initial:a="",name:o,hint:u,input:l=""}=e,{muted:c,submitted:f,primary:h,danger:d}=n,p=u,m=this.index===r,w=e.validate||(()=>!0),b=await this.choiceSeparator(e,r),R=e.message;this.align==="right"&&(R=R.padStart(this.longest+1," ")),this.align==="left"&&(R=R.padEnd(this.longest+1," "));let _=this.values[o]=l||a,$=l?"success":"dark";await w.call(e,_,this.state)!==!0&&($="danger");let T=n[$](await this.indicator(e,r))+(e.pad||""),C=this.indent(e),A=()=>[C,T,R+b,l,p].filter(Boolean).join(" ");if(i.submitted)return R=mu.unstyle(R),l=f(l),p="",A();if(e.format)l=await e.format.call(this,l,e,r);else{let D=this.styles.muted;l=yu(this,{input:l,initial:a,pos:s,showCursor:m,color:D})}return this.isValue(l)||(l=this.styles.muted(this.symbols.ellipsis)),e.result&&(this.values[o]=await e.result.call(this,_,e,r)),m&&(R=h(R)),e.error?l+=(l?" ":"")+d(e.error.trim()):e.hint&&(l+=(l?" ":"")+c(e.hint.trim())),A()}async submit(){return this.value=this.values,super.base.submit.call(this)}}var Mr=vu;const bu=Mr,wu=()=>{throw new Error("expected prompt to have a custom authenticate method")},Rn=(t=wu)=>{class e extends bu{constructor(i){super(i)}async submit(){this.value=await t.call(this,this.values,this.state),super.base.submit.call(this)}static create(i){return Rn(i)}}return e};var An=Rn();const _u=An;function Su(t,e){return t.username===this.options.username&&t.password===this.options.password}const Tn=(t=Su)=>{const e=[{name:"username",message:"username"},{name:"password",message:"password",format(i){return this.options.showPassword?i:(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(i.length))}}];class r extends _u.create(t){constructor(n){super({...n,choices:e})}static create(n){return Tn(n)}}return r};var Eu=Tn();const xu=vt,{isPrimitive:Ru,hasColor:Au}=re;class Tu extends xu{constructor(e){super(e);this.cursorHide()}async initialize(){let e=await this.resolve(this.initial,this.state);this.input=await this.cast(e),await super.initialize()}dispatch(e){return this.isValue(e)?(this.input=e,this.submit()):this.alert()}format(e){let{styles:r,state:i}=this;return i.submitted?r.success(e):r.primary(e)}cast(e){return this.isTrue(e)}isTrue(e){return/^[ty1]/i.test(e)}isFalse(e){return/^[fn0]/i.test(e)}isValue(e){return Ru(e)&&(this.isTrue(e)||this.isFalse(e))}async hint(){if(this.state.status==="pending"){let e=await this.element("hint");return Au(e)?e:this.styles.muted(e)}}async render(){let{input:e,size:r}=this.state,i=await this.prefix(),n=await this.separator(),s=await this.message(),a=this.styles.muted(this.default),o=[i,s,a,n].filter(Boolean).join(" ");this.state.prompt=o;let u=await this.header(),l=this.value=this.cast(e),c=await this.format(l),f=await this.error()||await this.hint(),h=await this.footer();f&&!o.includes(f)&&(c+=" "+f),o+=" "+c,this.clear(r),this.write([u,o,h].filter(Boolean).join(`
13
+ `)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}}var Nr=Tu;const $u=Nr;class Pu extends $u{constructor(e){super(e);this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}}var Cu=Pu;const ku=Ge,Ou=Mr,st=Ou.prototype;class Lu extends ku{constructor(e){super({...e,multiple:!0});this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let i=this.focused,n=i.parent||{};return!i.editable&&!n.editable&&(e==="a"||e==="i")?super[e]():st.dispatch.call(this,e,r)}append(e,r){return st.append.call(this,e,r)}delete(e,r){return st.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?st.next.call(this):super.next()}prev(){return this.focused.editable?st.prev.call(this):super.prev()}async indicator(e,r){let i=e.indicator||"",n=e.editable?i:super.indicator(e,r);return await this.resolve(n,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?st.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let i=r.parent?this.value[r.parent.name]:this.value;if(r.editable?i=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(i=r.enabled===!0),e=await r.validate(i,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e=="string"?e:"Invalid Input"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role==="heading"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}}var Du=Lu;const Iu=vt,Fu=xn,{isPrimitive:Mu}=re;class Nu extends Iu{constructor(e){super(e);this.initial=Mu(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let i=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!i||i.name!=="return")?this.append(`
14
+ `,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:i}=this.state;this.input=`${i}`.slice(0,r)+e+`${i}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),i=this.input.slice(e),n=r.split(" ");this.state.clipboard.push(n.pop()),this.input=n.join(" "),this.cursor=this.input.length,this.input+=i,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):Fu(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),i=await this.separator(),n=await this.message(),s=[r,n,i].filter(Boolean).join(" ");this.state.prompt=s;let a=await this.header(),o=await this.format(),u=await this.error()||await this.hint(),l=await this.footer();u&&!o.includes(u)&&(o+=" "+u),s+=" "+o,this.clear(e),this.write([a,s,l].filter(Boolean).join(`
15
+ `)),this.restore()}}var at=Nu;const Hu=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),jt=t=>Hu(t).filter(Boolean);var Bu=(t,e={},r="")=>{let{past:i=[],present:n=""}=e,s,a;switch(t){case"prev":case"undo":return s=i.slice(0,i.length-1),a=i[i.length-1]||"",{past:jt([r,...s]),present:a};case"next":case"redo":return s=i.slice(1),a=i[0]||"",{past:jt([...s,r]),present:a};case"save":return{past:jt([...i,r]),present:""};case"remove":return a=jt(i.filter(o=>o!==r)),n="",a.length&&(n=a.pop()),{past:a,present:n};default:throw new Error(`Invalid action: "${t}"`)}};const ju=at,$n=Bu;class qu extends ju{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let i=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:i},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=$n(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){!this.store||(this.data=$n("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}}var Pn=qu;const Uu=at;class Vu extends Uu{format(){return""}}var zu=Vu;const Gu=at;class Wu extends Gu{constructor(e={}){super(e);this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(", ")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}}var Qu=Wu;const Yu=Ge;class Ku extends Yu{constructor(e){super({...e,multiple:!0})}}var Xu=Ku;const Zu=at;class Ju extends Zu{constructor(e={}){super({style:"number",...e});this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,i=this.toNumber(this.input);return i>this.max+r?this.alert():(this.input=`${i+r}`,this.render())}down(e){let r=e||this.minor,i=this.toNumber(this.input);return i<this.min-r?this.alert():(this.input=`${i-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(e=this.input){return typeof this.options.format=="function"?this.options.format.call(this,e):this.styles.info(e)}toNumber(e=""){return this.float?+e:Math.round(+e)}isValue(e){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(e)}submit(){let e=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(e||0),super.submit()}}var Cn=Ju,el=Cn;const tl=at;class rl extends tl{constructor(e){super(e);this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):""}}var il=rl;const nl=me.exports,sl=Bt,kn=re;class al extends sl{constructor(e={}){super(e);this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||"left"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||`
16
+ `;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((i,n)=>({name:n+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let i=0;i<this.scale.length;i++)r.scale.push({index:i})}this.widths[0]=Math.min(this.widths[0],e+3)}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}heading(e,r,i){return this.styles.strong(e)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIndex>=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){if(this.scaleKey===!1||this.state.submitted)return"";let e=this.scale.map(i=>` ${i.name} - ${i.message}`);return["",...e].map(i=>this.styles.muted(i)).join(`
17
+ `)}renderScaleHeading(e){let r=this.scale.map(u=>u.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let i=this.scaleLength-r.join("").length,n=Math.round(i/(r.length-1)),a=r.map(u=>this.styles.strong(u)).join(" ".repeat(n)),o=" ".repeat(this.widths[0]);return this.margin[3]+o+this.margin[1]+a}scaleIndicator(e,r,i){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,i);let n=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):n?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let i=e.scale.map(s=>this.scaleIndicator(e,s,r)),n=this.term==="Hyper"?"":" ";return i.join(n+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let i=this.index===r,n=await this.pointer(e,r),s=await e.hint;s&&!kn.hasColor(s)&&(s=this.styles.muted(s));let a=p=>this.margin[3]+p.replace(/\s+$/,"").padEnd(this.widths[0]," "),o=this.newline,u=this.indent(e),l=await this.resolve(e.message,this.state,e,r),c=await this.renderScale(e,r),f=this.margin[1]+this.margin[3];this.scaleLength=nl.unstyle(c).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-f.length);let d=kn.wordWrap(l,{width:this.widths[0],newline:o}).split(`
18
+ `).map(p=>a(p)+this.margin[1]);return i&&(c=this.styles.info(c),d=d.map(p=>this.styles.info(p))),d[0]+=c,this.linebreak&&d.push(""),[u+n,d.join(`
19
+ `)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(n,s)=>await this.renderChoice(n,s)),r=await Promise.all(e),i=await this.renderScaleHeading();return this.margin[0]+[i,...r.map(n=>n.join(" "))].join(`
20
+ `)}async render(){let{submitted:e,size:r}=this.state,i=await this.prefix(),n=await this.separator(),s=await this.message(),a="";this.options.promptLine!==!1&&(a=[i,s,n,""].join(" "),this.state.prompt=a);let o=await this.header(),u=await this.format(),l=await this.renderScaleKey(),c=await this.error()||await this.hint(),f=await this.renderChoices(),h=await this.footer(),d=this.emptyError;u&&(a+=u),c&&!a.includes(c)&&(a+=" "+c),e&&!u&&!f.trim()&&this.multiple&&d!=null&&(a+=this.styles.danger(d)),this.clear(r),this.write([o,a,l,f,h].filter(Boolean).join(`
21
+ `)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}}var ol=al;const On=me.exports,ul=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"";class ll{constructor(e){this.name=e.key,this.field=e.field||{},this.value=ul(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}}const cl=async(t={},e={},r=i=>i)=>{let i=new Set,n=t.fields||[],s=t.template,a=[],o=[],u=[],l=1;typeof s=="function"&&(s=await s());let c=-1,f=()=>s[++c],h=()=>s[c+1],d=p=>{p.line=l,a.push(p)};for(d({type:"bos",value:""});c<s.length-1;){let p=f();if(/^[^\S\n ]$/.test(p)){d({type:"text",value:p});continue}if(p===`
22
+ `){d({type:"newline",value:p}),l++;continue}if(p==="\\"){p+=f(),d({type:"text",value:p});continue}if((p==="$"||p==="#"||p==="{")&&h()==="{"){p+=f();let b={type:"template",open:p,inner:"",close:"",value:p},R;for(;R=f();){if(R==="}"){h()==="}"&&(R+=f()),b.value+=R,b.close=R;break}R===":"?(b.initial="",b.key=b.inner):b.initial!==void 0&&(b.initial+=R),b.value+=R,b.inner+=R}b.template=b.open+(b.initial||b.inner)+b.close,b.key=b.key||b.inner,e.hasOwnProperty(b.key)&&(b.initial=e[b.key]),b=r(b),d(b),u.push(b.key),i.add(b.key);let _=o.find($=>$.name===b.key);b.field=n.find($=>$.name===b.key),_||(_=new ll(b),o.push(_)),_.lines.push(b.line-1);continue}let m=a[a.length-1];m.type==="text"&&m.line===l?m.value+=p:d({type:"text",value:p})}return d({type:"eos",value:""}),{input:s,tabstops:a,unique:i,keys:u,items:o}};var hl=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),i={...e.values,...e.initial},{tabstops:n,items:s,keys:a}=await cl(e,i),o=Hr("result",t),u=Hr("format",t),l=Hr("validate",t,e,!0),c=t.isValue.bind(t);return async(f={},h=!1)=>{let d=0;f.required=r,f.items=s,f.keys=a,f.output="";let p=async(R,_,$,E)=>{let T=await l(R,_,$,E);return T===!1?"Invalid field "+$.name:T};for(let R of n){let _=R.value,$=R.key;if(R.type!=="template"){_&&(f.output+=_);continue}if(R.type==="template"){let E=s.find(H=>H.name===$);e.required===!0&&f.required.add(E.name);let T=[E.input,f.values[E.value],E.value,_].find(c),A=(E.field||{}).message||R.inner;if(h){let H=await p(f.values[$],f,E,d);if(H&&typeof H=="string"||H===!1){f.invalid.set($,H);continue}f.invalid.delete($);let v=await o(f.values[$],f,E,d);f.output+=On.unstyle(v);continue}E.placeholder=!1;let D=_;_=await u(_,f,E,d),T!==_?(f.values[$]=T,_=t.styles.typing(T),f.missing.delete(A)):(f.values[$]=void 0,T=`<${A}>`,_=t.styles.primary(T),E.placeholder=!0,f.required.has($)&&f.missing.add(A)),f.missing.has(A)&&f.validating&&(_=t.styles.warning(T)),f.invalid.has($)&&f.validating&&(_=t.styles.danger(T)),d===f.index&&(D!==_?_=t.styles.underline(_):_=t.styles.heading(On.unstyle(_))),d++}_&&(f.output+=_)}let m=f.output.split(`
23
+ `).map(R=>" "+R),w=s.length,b=0;for(let R of s)f.invalid.has(R.name)&&R.lines.forEach(_=>{m[_][0]===" "&&(m[_]=f.styles.danger(f.symbols.bullet)+m[_].slice(1))}),t.isValue(f.values[R.name])&&b++;return f.completed=(b/w*100).toFixed(0),f.output=m.join(`
24
+ `),f.output}};function Hr(t,e,r,i){return(n,s,a,o)=>typeof a.field[t]=="function"?a.field[t].call(e,n,s,a,o):[i,n].find(u=>e.isValue(u))}const fl=me.exports,pl=hl,dl=vt;class ml extends dl{constructor(e){super(e);this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await pl(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let i=this.getItem(),n=i.input.slice(0,this.cursor),s=i.input.slice(this.cursor);this.input=i.input=`${n}${e}${s}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),i=e.input.slice(0,this.cursor-1);this.input=e.input=`${i}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:i,size:n}=this.state,s=[this.options.newline,`
25
+ `].find(R=>R!=null),a=await this.prefix(),o=await this.separator(),u=await this.message(),l=[a,u,o].filter(Boolean).join(" ");this.state.prompt=l;let c=await this.header(),f=await this.error()||"",h=await this.hint()||"",d=i?"":await this.interpolate(this.state),p=this.state.key=r[e]||"",m=await this.format(p),w=await this.footer();m&&(l+=" "+m),h&&!m&&this.state.completed===0&&(l+=" "+h),this.clear(n);let b=[c,l,d,w,f.trim()];this.write(b.filter(Boolean).join(s)),this.restore()}getItem(e){let{items:r,keys:i,index:n}=this.state,s=r.find(a=>a.name===i[n]);return s&&s.input!=null&&(this.input=s.input,this.cursor=s.cursor),s}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:i,values:n}=this.state;if(e.size){let o="";for(let[u,l]of e)o+=`Invalid ${u}: ${l}
26
+ `;return this.state.error=o,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let a=fl.unstyle(i).split(`
27
+ `).map(o=>o.slice(1)).join(`
28
+ `);return this.value={values:n,result:a},super.submit()}}var gl=ml;const yl="(Use <shift>+<up/down> to sort)",vl=Ge;class bl extends vl{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0});this.state.hint=[this.options.hint,yl].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let i=await super.renderChoice(e,r),n=this.symbols.identicalTo+" ",s=this.index===r&&this.sorting?this.styles.muted(n):" ";return this.options.drag===!1&&(s=""),this.options.numbered===!0?s+`${r+1} - `+i:s+i}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}}var wl=bl;const _l=Bt;class Sl extends _l{constructor(e={}){super(e);if(this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(i=>this.styles.muted(i)),this.state.header=r.join(`
29
+ `)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let i of r)i.scale=El(5,this.options),i.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],i=r.selected;return e.scale.forEach(n=>n.selected=!1),r.selected=!i,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,r){await this.onChoice(e,r);let i=this.index===r,n=this.term==="Hyper",s=n?9:8,a=n?"":" ",o=this.symbols.line.repeat(s),u=" ".repeat(s+(n?0:1)),l=_=>(_?this.styles.success("\u25C9"):"\u25EF")+a,c=r+1+".",f=i?this.styles.heading:this.styles.noop,h=await this.resolve(e.message,this.state,e,r),d=this.indent(e),p=d+e.scale.map((_,$)=>l($===e.scaleIdx)).join(o),m=_=>_===e.scaleIdx?f(_):_,w=d+e.scale.map((_,$)=>m($)).join(u),b=()=>[c,h].filter(Boolean).join(" "),R=()=>[b(),p,w," "].filter(Boolean).join(`
30
+ `);return i&&(p=this.styles.cyan(p),w=this.styles.cyan(w)),R()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(i,n)=>await this.renderChoice(i,n)),r=await Promise.all(e);return r.length||r.push(this.styles.danger("No matching choices")),r.join(`
31
+ `)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:r}=this.state,i=await this.prefix(),n=await this.separator(),s=await this.message(),a=[i,s,n].filter(Boolean).join(" ");this.state.prompt=a;let o=await this.header(),u=await this.format(),l=await this.error()||await this.hint(),c=await this.renderChoices(),f=await this.footer();(u||!l)&&(a+=" "+u),l&&!a.includes(l)&&(a+=" "+l),e&&!u&&!c&&this.multiple&&this.type!=="form"&&(a+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,o,c,f].filter(Boolean).join(`
32
+ `)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}}function El(t,e={}){if(Array.isArray(e.scale))return e.scale.map(i=>({...i}));let r=[];for(let i=1;i<t+1;i++)r.push({i,selected:!1});return r}var xl=Sl,Rl=Pn;const Al=Nr;class Tl extends Al{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",r){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=i=>this.styles.primary.underline(i);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,r=await this.header(),i=await this.prefix(),n=await this.separator(),s=await this.message(),a=await this.format(),o=await this.error()||await this.hint(),u=await this.footer(),l=[i,s,n,a].join(" ");this.state.prompt=l,o&&!l.includes(o)&&(l+=" "+o),this.clear(e),this.write([r,l,u].filter(Boolean).join(`
33
+ `)),this.write(this.margin[2]),this.restore()}}var $l=Tl;const Pl=Ge;class Cl extends Pl{constructor(e){super(e);if(typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,r){let i=await super.toChoices(e,r);if(i.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>i.length)throw new Error("Please specify the index of the correct answer from the list of choices");return i}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}}var kl=Cl;(function(t){const e=re,r=(i,n)=>{e.defineExport(t,i,n),e.defineExport(t,i.toLowerCase(),n)};r("AutoComplete",()=>du),r("BasicAuth",()=>Eu),r("Confirm",()=>Cu),r("Editable",()=>Du),r("Form",()=>Mr),r("Input",()=>Pn),r("Invisible",()=>zu),r("List",()=>Qu),r("MultiSelect",()=>Xu),r("Numeral",()=>el),r("Password",()=>il),r("Scale",()=>ol),r("Select",()=>Ge),r("Snippet",()=>gl),r("Sort",()=>wl),r("Survey",()=>xl),r("Text",()=>Rl),r("Toggle",()=>$l),r("Quiz",()=>kl)})(wn);var Ol={ArrayPrompt:Bt,AuthPrompt:An,BooleanPrompt:Nr,NumberPrompt:Cn,StringPrompt:at};const Ln=mo,Br=Rr,Be=re;class Oe extends Br{constructor(e,r){super();this.options=Be.merge({},e),this.answers={...r}}register(e,r){if(Be.isObject(e)){for(let n of Object.keys(e))this.register(n,e[n]);return this}Ln.equal(typeof r,"function","expected a function");let i=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[i]=r:this.prompts[i]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(Be.merge({},this.options,r))}catch(i){return Promise.reject(i)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=Be.merge({},this.options,e),{type:i,name:n}=e,{set:s,get:a}=Be;if(typeof i=="function"&&(i=await i.call(this,e,this.answers)),!i)return this.answers[n];Ln(this.prompts[i],`Prompt "${i}" is not registered`);let o=new this.prompts[i](r),u=a(this.answers,n);o.state.answers=this.answers,o.enquirer=this,n&&o.on("submit",c=>{this.emit("answer",n,c,o),s(this.answers,n,c)});let l=o.emit.bind(o);return o.emit=(...c)=>(this.emit.call(this,...c),l(...c)),this.emit("prompt",o,this),r.autofill&&u!=null?(o.value=o.input=u,r.autofill==="show"&&await o.submit()):u=o.value=await o.run(),u}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||vt}static get prompts(){return wn}static get types(){return Ol}static get prompt(){const e=(r,...i)=>{let n=new this(...i),s=n.emit.bind(n);return n.emit=(...a)=>(e.emit(...a),s(...a)),n.prompt(r)};return Be.mixinEmitter(e,new Br),e}}Be.mixinEmitter(Oe,new Br);const jr=Oe.prompts;for(let t of Object.keys(jr)){let e=t.toLowerCase(),r=i=>new jr[t](i).run();Oe.prompt[e]=r,Oe[e]=r,Oe[t]||Reflect.defineProperty(Oe,t,{get:()=>jr[t]})}const bt=t=>{Be.defineExport(Oe,t,()=>Oe.types[t])};bt("ArrayPrompt"),bt("AuthPrompt"),bt("BooleanPrompt"),bt("NumberPrompt"),bt("StringPrompt");var Ll=Oe;const Dl=t=>Ll.prompt(t);class Il extends Error{constructor(e,r=null){super(e);this.tryMessage=r}}class Dn extends Il{}async function In(t){return He.promises.mkdir(t,{recursive:!0})}/*! *****************************************************************************
34
+ Copyright (c) Microsoft Corporation.
35
+
36
+ Permission to use, copy, modify, and/or distribute this software for any
37
+ purpose with or without fee is hereby granted.
38
+
39
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
40
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
41
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
42
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
43
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
44
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
45
+ PERFORMANCE OF THIS SOFTWARE.
46
+ ***************************************************************************** */var qr=function(t,e){return qr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])},qr(t,e)};function F(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");qr(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var oe=function(){return oe=Object.assign||function(e){for(var r,i=1,n=arguments.length;i<n;i++){r=arguments[i];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},oe.apply(this,arguments)};function We(t,e,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(c){try{l(i.next(c))}catch(f){a(f)}}function u(c){try{l(i.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):n(c.value).then(o,u)}l((i=i.apply(t,e||[])).next())})}function L(t,e){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(l){return function(c){return u([l,c])}}function u(l){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(s=l[0]&2?n.return:l[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,l[1])).done)return s;switch(n=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,n=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}s[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(c){l=[6,c],n=0}finally{i=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Z(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Q(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var i=r.call(t),n,s=[],a;try{for(;(e===void 0||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s}function ue(t,e,r){if(r||arguments.length===2)for(var i=0,n=e.length,s;i<n;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))}var ot=function(){function t(){}return t.prototype.valueOf=function(){},t.prototype.liquidMethodMissing=function(e){},t}(),Fl=Object.prototype.toString,Fn=String.prototype.toLowerCase;function Le(t){return typeof t=="string"}function De(t){return typeof t=="function"}function Ml(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function Mn(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new Promise(function(i,n){t.apply(void 0,ue(ue([],Q(e),!1),[function(s,a){s?n(s):i(a)}],!1))})}}function U(t){return t=Qe(t),Le(t)?t:ut(t)?"":String(t)}function Qe(t){return t instanceof ot?t.valueOf():t}function Ur(t){return typeof t=="number"}function Nn(t){return t&&De(t.toLiquid)?Nn(t.toLiquid()):t}function ut(t){return t==null}function ve(t){return Fl.call(t)==="[object Array]"}function Hn(t,e){t=t||{};for(var r in t)if(Object.hasOwnProperty.call(t,r)&&e(t[r],r,t)===!1)break;return t}function Bn(t){return t[t.length-1]}function jn(t){var e=typeof t;return t!==null&&(e==="object"||e==="function")}function qn(t,e,r){r===void 0&&(r=1);for(var i=[],n=t;n<e;n+=r)i.push(n);return i}function qt(t,e,r){return r===void 0&&(r=" "),Un(t,e,r,function(i,n){return n+i})}function Nl(t,e,r){return r===void 0&&(r=" "),Un(t,e,r,function(i,n){return i+n})}function Un(t,e,r,i){t=String(t);for(var n=e-t.length;n-- >0;)t=i(t,r);return t}function Hl(t){return t}function Vn(t){return t.replace(/(\w?)([A-Z])/g,function(e,r,i){return(r?r+"_":"")+i.toLowerCase()})}function Bl(t){var e=ue([],Q(t),!1).some(function(r){return r>="a"&&r<="z"});return e?t.toUpperCase():t.toLowerCase()}function jl(t,e){return t.length>e?t.substr(0,e-3)+"...":t}function zn(t,e){return t==null&&e==null?0:t==null?1:e==null||(t=Fn.call(t),e=Fn.call(e),t<e)?-1:t>e?1:0}var Vr=function(){function t(e,r,i,n){this.key=e,this.value=r,this.next=i,this.prev=n}return t}(),Gn=function(){function t(e,r){r===void 0&&(r=0),this.limit=e,this.size=r,this.cache={},this.head=new Vr("HEAD",null,null,null),this.tail=new Vr("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}return t.prototype.write=function(e,r){if(this.cache[e])this.cache[e].value=r;else{var i=new Vr(e,r,this.head.next,this.head);this.head.next.prev=i,this.head.next=i,this.cache[e]=i,this.size++,this.ensureLimit()}},t.prototype.read=function(e){if(!!this.cache[e]){var r=this.cache[e].value;return this.remove(e),this.write(e,r),r}},t.prototype.remove=function(e){var r=this.cache[e];r.prev.next=r.next,r.next.prev=r.prev,delete this.cache[e],this.size--},t.prototype.clear=function(){this.head.next=this.tail,this.tail.prev=this.head,this.size=0,this.cache={}},t.prototype.ensureLimit=function(){this.size>this.limit&&this.remove(this.tail.prev.key)},t}(),ql=Mn(wo),Ul=Mn(bo);function Vl(t){return We(this,void 0,void 0,function(){return L(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,ql(t)];case 1:return e.sent(),[2,!0];case 2:return e.sent(),[2,!1];case 3:return[2]}})})}function zl(t){return Ul(t,"utf8")}function Gl(t){try{return yo(t),!0}catch{return!1}}function Wl(t){return vo(t,"utf8")}function Ql(t,e,r){return _o(e)||(e+=r),fn(t,e)}function Yl(t){try{return require.resolve(t)}catch{}}function Kl(t){return So(t)}function Xl(t,e){return t=fn(t),t=t.endsWith(Ar)?t:t+Ar,e.startsWith(t)}var Zl=Object.freeze({__proto__:null,exists:Vl,readFile:zl,existsSync:Gl,readFileSync:Wl,resolve:Ql,fallback:Yl,dirname:Kl,contains:Xl,sep:Ar});function he(t){return t&&De(t.equals)}function Ye(t,e){return!zr(t,e)}function zr(t,e){return e.opts.jsTruthy?!t:t===!1||t===void 0||t===null}var Wn={"==":function(t,e){return he(t)?t.equals(e):he(e)?e.equals(t):t===e},"!=":function(t,e){return he(t)?!t.equals(e):he(e)?!e.equals(t):t!==e},">":function(t,e){return he(t)?t.gt(e):he(e)?e.lt(t):t>e},"<":function(t,e){return he(t)?t.lt(e):he(e)?e.gt(t):t<e},">=":function(t,e){return he(t)?t.geq(e):he(e)?e.leq(t):t>=e},"<=":function(t,e){return he(t)?t.leq(e):he(e)?e.geq(t):t<=e},contains:function(t,e){return t&&De(t.indexOf)?t.indexOf(e)>-1:!1},and:function(t,e,r){return Ye(t,r)&&Ye(e,r)},or:function(t,e,r){return Ye(t,r)||Ye(e,r)}},M=[0,0,0,0,0,0,0,0,0,20,4,4,4,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,8,0,0,0,0,8,0,0,0,64,0,65,0,0,33,33,33,33,33,33,33,33,33,33,0,0,2,2,2,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Gr=1,Ut=4,Qn=8,Yn=16,Jl=32,ec=64;M[160]=M[5760]=M[6158]=M[8192]=M[8193]=M[8194]=M[8195]=M[8196]=M[8197]=M[8198]=M[8199]=M[8200]=M[8201]=M[8202]=M[8232]=M[8233]=M[8239]=M[8287]=M[12288]=Ut;function Kn(t){var e,r,i={};try{for(var n=Z(Object.entries(t)),s=n.next();!s.done;s=n.next()){for(var a=Q(s.value,2),o=a[0],u=a[1],l=i,c=0;c<o.length;c++){var f=o[c];l[f]=l[f]||{},c===o.length-1&&M[o.charCodeAt(c)]&Gr&&(l[f].needBoundary=!0),l=l[f]}l.handler=u,l.end=!0}}catch(h){e={error:h}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return i}var lt={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,cache:void 0,extname:"",fs:Zl,dynamicPartials:!0,jsTruthy:!1,trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,ownPropertyOnly:!1,lenientIf:!1,globals:{},keepOutputType:!1,operators:Wn,operatorsTrie:Kn(Wn)};function tc(t){if(t.hasOwnProperty("operators")&&(t.operatorsTrie=Kn(t.operators)),t.hasOwnProperty("root")&&(t.hasOwnProperty("partials")||(t.partials=t.root),t.hasOwnProperty("layouts")||(t.layouts=t.root)),t.hasOwnProperty("cache")){var e=void 0;typeof t.cache=="number"?e=t.cache>0?new Gn(t.cache):void 0:typeof t.cache=="object"?e=t.cache:e=t.cache?new Gn(1024):void 0,t.cache=e}return t=oe(oe(oe({},lt),t.jekyllInclude?{dynamicPartials:!1}:{}),t),!t.fs.dirname&&t.relativeReference&&(console.warn("[LiquidJS] `fs.dirname` is required for relativeReference, set relativeReference to `false` to suppress this warning, or provide implementation for `fs.dirname`"),t.relativeReference=!1),t.root=Vt(t.root),t.partials=Vt(t.partials),t.layouts=Vt(t.layouts),t}function Vt(t){var e=[];return ve(t)&&(e=t),Le(t)&&(e=[t]),e}var zt=function(t){F(e,t);function e(r,i){var n=t.call(this,r.message)||this;return n.originalError=r,n.token=i,n.context="",n}return e.prototype.update=function(){var r=this.originalError;this.context=ac(this.token),this.message=oc(r.message,this.token),this.stack=this.message+`
47
+ `+this.context+`
48
+ `+this.stack+`
49
+ From `+r.stack},e}(Error),Wr=function(t){F(e,t);function e(r,i){var n=t.call(this,new Error(r),i)||this;return n.name="TokenizationError",t.prototype.update.call(n),n}return e}(zt),rc=function(t){F(e,t);function e(r,i){var n=t.call(this,r,i)||this;return n.name="ParseError",n.message=r.message,t.prototype.update.call(n),n}return e}(zt),Xn=function(t){F(e,t);function e(r,i){var n=t.call(this,r,i.token)||this;return n.name="RenderError",n.message=r.message,t.prototype.update.call(n),n}return e.is=function(r){return r.name==="RenderError"},e}(zt),ic=function(t){F(e,t);function e(r,i){var n=t.call(this,r,i)||this;return n.name="UndefinedVariableError",n.message=r.message,t.prototype.update.call(n),n}return e}(zt),nc=function(t){F(e,t);function e(r){var i=t.call(this,"undefined variable: ".concat(r))||this;return i.name="InternalUndefinedVariableError",i.variableName=r,i}return e}(Error),sc=function(t){F(e,t);function e(r){var i=t.call(this,r)||this;return i.name="AssertionError",i.message=r+"",i}return e}(Error);function ac(t){var e=Q(t.getPosition(),1),r=e[0],i=t.input.split(`
50
+ `),n=Math.max(r-2,1),s=Math.min(r+3,i.length),a=qn(n,s+1).map(function(o){var u=o===r?">> ":" ",l=qt(String(o),String(s).length),c=i[o-1];return"".concat(u).concat(l,"| ").concat(c)}).join(`
51
+ `);return a}function oc(t,e){e.file&&(t+=", file:".concat(e.file));var r=Q(e.getPosition(),2),i=r[0],n=r[1];return t+=", line:".concat(i,", col:").concat(n),t}var Qr=function(){function t(e,r,i){e===void 0&&(e={}),r===void 0&&(r=lt),i===void 0&&(i={});var n,s;this.scopes=[{}],this.registers={},this.sync=!!i.sync,this.opts=r,this.globals=(n=i.globals)!==null&&n!==void 0?n:r.globals,this.environments=e,this.strictVariables=(s=i.strictVariables)!==null&&s!==void 0?s:this.opts.strictVariables}return t.prototype.getRegister=function(e){return this.registers[e]=this.registers[e]||{}},t.prototype.setRegister=function(e,r){return this.registers[e]=r},t.prototype.saveRegister=function(){for(var e=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return r.map(function(n){return[n,e.getRegister(n)]})},t.prototype.restoreRegister=function(e){var r=this;return e.forEach(function(i){var n=Q(i,2),s=n[0],a=n[1];return r.setRegister(s,a)})},t.prototype.getAll=function(){return ue([this.globals,this.environments],Q(this.scopes),!1).reduce(function(e,r){return oe(e,r)},{})},t.prototype.get=function(e){var r=this.findScope(e[0]);return this.getFromScope(r,e)},t.prototype.getFromScope=function(e,r){var i=this;return Le(r)&&(r=r.split(".")),r.reduce(function(n,s,a){if(n=uc(n,s,i.opts.ownPropertyOnly),ut(n)&&i.strictVariables)throw new nc(r.slice(0,a+1).join("."));return n},e)},t.prototype.push=function(e){return this.scopes.push(e)},t.prototype.pop=function(){return this.scopes.pop()},t.prototype.bottom=function(){return this.scopes[0]},t.prototype.findScope=function(e){for(var r=this.scopes.length-1;r>=0;r--){var i=this.scopes[r];if(e in i)return i}return e in this.environments?this.environments:this.globals},t}();function uc(t,e,r){if(ut(t))return t;t=Nn(t);var i=lc(t,e,r);return De(i)?i.call(t):t instanceof ot?t.hasOwnProperty(e)?t[e]:t.liquidMethodMissing(e):e==="size"?fc(t):e==="first"?cc(t):e==="last"?hc(t):i}function lc(t,e,r){if(!(r&&!Object.hasOwnProperty.call(t,e)))return t[e]}function cc(t){return ve(t)?t[0]:t.first}function hc(t){return ve(t)?t[t.length-1]:t.last}function fc(t){if(t.hasOwnProperty("size")||t.size!==void 0)return t.size;if(ve(t)||Le(t))return t.length;if(typeof t=="object")return Object.keys(t).length}function J(t,e){if(!t){var r=typeof e=="function"?e():e||"expect ".concat(t," to be true");throw new sc(r)}}var Ke;(function(t){t.Partials="partials",t.Layouts="layouts",t.Root="root"})(Ke||(Ke={}));var pc=function(){function t(e){if(this.options=e,e.relativeReference){var r=e.fs.sep;J(r,"`fs.sep` is required for relative reference");var i=new RegExp(["."+r,".."+r,"./","../"].map(function(n){return Ml(n)}).join("|"));this.shouldLoadRelative=function(n){return i.test(n)}}else this.shouldLoadRelative=function(n){return!1};this.contains=this.options.fs.contains||function(){return!0}}return t.prototype.lookup=function(e,r,i,n){var s,a,o,u,l,c,f,h,d;return L(this,function(p){switch(p.label){case 0:s=this.options.fs,a=this.options[r],p.label=1;case 1:p.trys.push([1,8,9,10]),o=Z(this.candidates(e,a,n,r!==Ke.Root)),u=o.next(),p.label=2;case 2:return u.done?[3,7]:(l=u.value,i?(c=s.existsSync(l),[3,5]):[3,3]);case 3:return[4,s.exists(l)];case 4:c=p.sent(),p.label=5;case 5:if(c)return[2,l];p.label=6;case 6:return u=o.next(),[3,2];case 7:return[3,10];case 8:return f=p.sent(),h={error:f},[3,10];case 9:try{u&&!u.done&&(d=o.return)&&d.call(o)}finally{if(h)throw h.error}return[7];case 10:throw this.lookupError(e,a)}})},t.prototype.candidates=function(e,r,i,n){var s,a,o,p,u,l,d,c,f,h,d,p,m,w,b,R,_,$;return L(this,function(E){switch(E.label){case 0:if(s=this.options,a=s.fs,o=s.extname,!(this.shouldLoadRelative(e)&&i))return[3,8];p=a.resolve(this.dirname(i),e,o),E.label=1;case 1:E.trys.push([1,6,7,8]),u=Z(r),l=u.next(),E.label=2;case 2:return l.done?[3,5]:(d=l.value,!n||this.contains(d,p)?[4,p]:[3,4]);case 3:return E.sent(),[3,5];case 4:return l=u.next(),[3,2];case 5:return[3,8];case 6:return c=E.sent(),b={error:c},[3,8];case 7:try{l&&!l.done&&(R=u.return)&&R.call(u)}finally{if(b)throw b.error}return[7];case 8:E.trys.push([8,13,14,15]),f=Z(r),h=f.next(),E.label=9;case 9:return h.done?[3,12]:(d=h.value,p=a.resolve(d,e,o),!n||this.contains(d,p)?[4,p]:[3,11]);case 10:E.sent(),E.label=11;case 11:return h=f.next(),[3,9];case 12:return[3,15];case 13:return m=E.sent(),_={error:m},[3,15];case 14:try{h&&!h.done&&($=f.return)&&$.call(f)}finally{if(_)throw _.error}return[7];case 15:return a.fallback===void 0?[3,17]:(w=a.fallback(e),w===void 0?[3,17]:[4,w]);case 16:E.sent(),E.label=17;case 17:return[2]}})},t.prototype.dirname=function(e){var r=this.options.fs;return J(r.dirname,"`fs.dirname` is required for relative reference"),r.dirname(e)},t.prototype.lookupError=function(e,r){var i=new Error("ENOENT");return i.message='ENOENT: Failed to lookup "'.concat(e,'" in "').concat(r,'"'),i.code="ENOENT",i},t}(),dc=function(){function t(){this.buffer=""}return t.prototype.write=function(e){this.buffer+=U(e)},t}(),mc=function(){function t(){this.buffer="",this.stream=new(require("stream")).PassThrough}return t.prototype.write=function(e){this.stream.write(U(e))},t.prototype.error=function(e){this.stream.emit("error",e)},t.prototype.end=function(){this.stream.end()},t}();function Gt(t){var e={then:function(r){return r(t)},catch:function(){return e}};return e}function Zn(t){var e={then:function(r,i){return i?i(t):e},catch:function(r){return r(t)}};return e}function gc(t){return t&&De(t.then)}function yc(t){return t&&De(t.next)&&De(t.throw)&&De(t.return)}function wt(t){if(gc(t))return t;if(yc(t))return e();return Gt(t);function e(r){var i;try{i=t.next(r)}catch(n){return Zn(n)}return i.done?Gt(i.value):wt(i.value).then(e,function(n){var s;try{s=t.throw(n)}catch(a){return Zn(a)}return s.done?Gt(s.value):e(s.value)})}}function Wt(t){return Promise.resolve(wt(t))}function Qt(t){var e;return wt(t).then(function(r){return e=r,Gt(e)}).catch(function(r){throw r}),e}var vc=function(){function t(){this.buffer=""}return t.prototype.write=function(e){e=Qe(e),typeof e!="string"&&this.buffer===""?this.buffer=e:this.buffer=U(this.buffer)+U(e)},t}(),bc=function(){function t(){}return t.prototype.renderTemplatesToNodeStream=function(e,r){var i=this,n=new mc;return Promise.resolve().then(function(){return wt(i.renderTemplates(e,r,n))}).then(function(){return n.end()},function(s){return n.error(s)}),n.stream},t.prototype.renderTemplates=function(e,r,i){var n,s,a,o,u,l,c,f,h;return L(this,function(d){switch(d.label){case 0:i||(i=r.opts.keepOutputType?new vc:new dc),d.label=1;case 1:d.trys.push([1,8,9,10]),n=Z(e),s=n.next(),d.label=2;case 2:if(s.done)return[3,7];a=s.value,d.label=3;case 3:return d.trys.push([3,5,,6]),[4,a.render(r,i)];case 4:return o=d.sent(),o&&i.write(o),i.break||i.continue?[3,7]:[3,6];case 5:throw u=d.sent(),l=Xn.is(u)?u:new Xn(u,a),l;case 6:return s=n.next(),[3,2];case 7:return[3,10];case 8:return c=d.sent(),f={error:c},[3,10];case 9:try{s&&!s.done&&(h=n.return)&&h.call(n)}finally{if(f)throw f.error}return[7];case 10:return[2,i.buffer]}})},t}(),N;(function(t){t[t.Number=1]="Number",t[t.Literal=2]="Literal",t[t.Tag=4]="Tag",t[t.Output=8]="Output",t[t.HTML=16]="HTML",t[t.Filter=32]="Filter",t[t.Hash=64]="Hash",t[t.PropertyAccess=128]="PropertyAccess",t[t.Word=256]="Word",t[t.Range=512]="Range",t[t.Quoted=1024]="Quoted",t[t.Operator=2048]="Operator",t[t.Delimited=12]="Delimited"})(N||(N={}));function wc(t){return!!(be(t)&N.Delimited)}function Jn(t){return be(t)===N.Operator}function Yr(t){return be(t)===N.HTML}function _c(t){return be(t)===N.Output}function Kr(t){return be(t)===N.Tag}function es(t){return be(t)===N.Quoted}function Sc(t){return be(t)===N.Literal}function Ec(t){return be(t)===N.Number}function xc(t){return be(t)===N.PropertyAccess}function Rc(t){return be(t)===N.Word}function Ac(t){return be(t)===N.Range}function be(t){return t?t.kind:-1}var Tc=function(){function t(e,r){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=r}return t.prototype.on=function(e,r){return this.handlers[e]=r,this},t.prototype.trigger=function(e,r){var i=this.handlers[e];return i?(i.call(this,r),!0):!1},t.prototype.start=function(){this.trigger("start");for(var e;!this.stopRequested&&(e=this.tokens.shift());)if(!this.trigger("token",e)&&!(Kr(e)&&this.trigger("tag:".concat(e.name),e))){var r=this.parseToken(e,this.tokens);this.trigger("template",r)}return this.stopRequested||this.trigger("end"),this},t.prototype.stop=function(){return this.stopRequested=!0,this},t}(),Xr=function(){function t(e){this.token=e}return t}(),$c=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.equals=function(r){return ut(Qe(r))},e.prototype.gt=function(){return!1},e.prototype.geq=function(){return!1},e.prototype.lt=function(){return!1},e.prototype.leq=function(){return!1},e.prototype.valueOf=function(){return null},e}(ot),ts=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.equals=function(r){return r instanceof e?!1:(r=Qe(r),Le(r)||ve(r)?r.length===0:jn(r)?Object.keys(r).length===0:!1)},e.prototype.gt=function(){return!1},e.prototype.geq=function(){return!1},e.prototype.lt=function(){return!1},e.prototype.leq=function(){return!1},e.prototype.valueOf=function(){return""},e}(ot),Pc=function(t){F(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.equals=function(r){return r===!1||ut(Qe(r))?!0:Le(r)?/^\s*$/.test(r):t.prototype.equals.call(this,r)},e}(ts),rs=new $c,is={true:!0,false:!1,nil:rs,null:rs,empty:new ts,blank:new Pc},Cc=/[\da-fA-F]/,ns=/[0-7]/,ss={b:"\b",f:"\f",n:`
52
+ `,r:"\r",t:" ",v:"\v"};function as(t){var e=t.charCodeAt(0);return e>=97?e-87:e>=65?e-55:e-48}function os(t){for(var e="",r=1;r<t.length-1;r++){if(t[r]!=="\\"){e+=t[r];continue}if(ss[t[r+1]]!==void 0)e+=ss[t[++r]];else if(t[r+1]==="u"){for(var i=0,n=r+2;n<=r+5&&Cc.test(t[n]);)i=i*16+as(t[n++]);r=n-1,e+=String.fromCharCode(i)}else if(!ns.test(t[r+1]))e+=t[++r];else{for(var n=r+1,i=0;n<=r+3&&ns.test(t[n]);)i=i*8+as(t[n++]);r=n-1,e+=String.fromCharCode(i)}}return e}var kc=function(){function t(e){this.postfix=ue([],Q(Mc(e)),!1)}return t.prototype.evaluate=function(e,r){var i,n,s,a,o,u,l,c,f,h,d,p;return L(this,function(m){switch(m.label){case 0:J(e,"unable to evaluate: context not defined"),i=[],m.label=1;case 1:m.trys.push([1,9,10,11]),n=Z(this.postfix),s=n.next(),m.label=2;case 2:return s.done?[3,8]:(a=s.value,Jn(a)?[4,i.pop()]:[3,5]);case 3:return o=m.sent(),[4,i.pop()];case 4:return u=m.sent(),l=Dc(e.opts.operators,a,u,o,e),i.push(l),[3,7];case 5:return f=(c=i).push,[4,ie(a,e,r&&this.postfix.length===1)];case 6:f.apply(c,[m.sent()]),m.label=7;case 7:return s=n.next(),[3,2];case 8:return[3,11];case 9:return h=m.sent(),d={error:h},[3,11];case 10:try{s&&!s.done&&(p=n.return)&&p.call(n)}finally{if(d)throw d.error}return[7];case 11:return[2,i[0]]}})},t}();function ie(t,e,r){if(r===void 0&&(r=!1),xc(t))return Oc(t,e,r);if(Ac(t))return Fc(t,e);if(Sc(t))return Ic(t);if(Ec(t))return Lc(t);if(Rc(t))return t.getText();if(es(t))return Zr(t)}function Oc(t,e,r){var i=t.props.map(function(n){return ie(n,e,!1)});try{return e.get(ue([t.propertyName],Q(i),!1))}catch(n){if(r&&n.name==="InternalUndefinedVariableError")return null;throw new ic(n,t)}}function Lc(t){var e=t.whole.content+"."+(t.decimal?t.decimal.content:"");return Number(e)}function Zr(t){return os(t.getText())}function Dc(t,e,r,i,n){var s=t[e.operator];return s(r,i,n)}function Ic(t){return is[t.literal]}function Fc(t,e){var r=ie(t.lhs,e),i=ie(t.rhs,e);return qn(+r,+i+1)}function Mc(t){var e,r,i,n,s,a,o;return L(this,function(u){switch(u.label){case 0:e=[],u.label=1;case 1:u.trys.push([1,10,11,12]),r=Z(t),i=r.next(),u.label=2;case 2:if(i.done)return[3,9];if(n=i.value,!Jn(n))return[3,6];u.label=3;case 3:return e.length&&e[e.length-1].getPrecedence()>n.getPrecedence()?[4,e.pop()]:[3,5];case 4:return u.sent(),[3,3];case 5:return e.push(n),[3,8];case 6:return[4,n];case 7:u.sent(),u.label=8;case 8:return i=r.next(),[3,2];case 9:return[3,12];case 10:return s=u.sent(),a={error:s},[3,12];case 11:try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(a)throw a.error}return[7];case 12:return e.length?[4,e.pop()]:[3,14];case 13:return u.sent(),[3,12];case 14:return[2]}})}var we=function(){function t(e,r,i,n,s){this.kind=e,this.input=r,this.begin=i,this.end=n,this.file=s}return t.prototype.getText=function(){return this.input.slice(this.begin,this.end)},t.prototype.getPosition=function(){for(var e=Q([1,1],2),r=e[0],i=e[1],n=0;n<this.begin;n++)this.input[n]===`
53
+ `?(r++,i=1):i++;return[r,i]},t.prototype.size=function(){return this.end-this.begin},t}(),Jr=function(t){F(e,t);function e(r,i,n,s,a,o,u,l){var c=t.call(this,r,n,s,a,l)||this;c.trimLeft=!1,c.trimRight=!1,c.content=c.getText();var f=i[0]==="-",h=Bn(i)==="-";return c.content=i.slice(f?1:0,h?-1:i.length).trim(),c.trimLeft=f||o,c.trimRight=h||u,c}return e}(we);function Nc(t,e){for(var r=!1,i=0;i<t.length;i++){var n=t[i];!wc(n)||(!r&&n.trimLeft&&Hc(t[i-1],e.greedy),Kr(n)&&(n.name==="raw"?r=!0:n.name==="endraw"&&(r=!1)),!r&&n.trimRight&&Bc(t[i+1],e.greedy))}}function Hc(t,e){if(!(!t||!Yr(t)))for(var r=e?Ut:Yn;M[t.input.charCodeAt(t.end-1-t.trimRight)]&r;)t.trimRight++}function Bc(t,e){if(!(!t||!Yr(t))){for(var r=e?Ut:Yn;M[t.input.charCodeAt(t.begin+t.trimLeft)]&r;)t.trimLeft++;t.input.charAt(t.begin+t.trimLeft)===`
54
+ `&&t.trimLeft++}}var jc=function(t){F(e,t);function e(r,i){var n=t.call(this,N.Number,r.input,r.begin,i?i.end:r.end,r.file)||this;return n.whole=r,n.decimal=i,n}return e}(we),Yt=function(t){F(e,t);function e(r,i,n,s){var a=t.call(this,N.Word,r,i,n,s)||this;return a.input=r,a.begin=i,a.end=n,a.file=s,a.content=a.getText(),a}return e.prototype.isNumber=function(r){r===void 0&&(r=!1);for(var i=r&&M[this.input.charCodeAt(this.begin)]&ec?this.begin+1:this.begin,n=i;n<this.end;n++)if(!(M[this.input.charCodeAt(n)]&Jl))return!1;return!0},e}(we),qc=function(t){F(e,t);function e(r,i,n,s){var a=t.call(this,N.Literal,r,i,n,s)||this;return a.input=r,a.begin=i,a.end=n,a.file=s,a.literal=a.getText(),a}return e}(we),us={"==":1,"!=":1,">":1,"<":1,">=":1,"<=":1,contains:1,and:0,or:0},Uc=function(t){F(e,t);function e(r,i,n,s){var a=t.call(this,N.Operator,r,i,n,s)||this;return a.input=r,a.begin=i,a.end=n,a.file=s,a.operator=a.getText(),a}return e.prototype.getPrecedence=function(){var r=this.getText();return r in us?us[r]:1},e}(we),ls=function(t){F(e,t);function e(r,i,n){var s=t.call(this,N.PropertyAccess,r.input,r.begin,n,r.file)||this;return s.variable=r,s.props=i,s.propertyName=s.variable instanceof Yt?s.variable.getText():os(s.variable.getText()),s}return e}(we),Vc=function(t){F(e,t);function e(r,i,n,s,a,o){var u=t.call(this,N.Filter,n,s,a,o)||this;return u.name=r,u.args=i,u}return e}(we),zc=function(t){F(e,t);function e(r,i,n,s,a,o){var u=t.call(this,N.Hash,r,i,n,o)||this;return u.input=r,u.begin=i,u.end=n,u.name=s,u.value=a,u.file=o,u}return e}(we),Gc=function(t){F(e,t);function e(r,i,n,s){var a=t.call(this,N.Quoted,r,i,n,s)||this;return a.input=r,a.begin=i,a.end=n,a.file=s,a}return e}(we),cs=function(t){F(e,t);function e(r,i,n,s){var a=t.call(this,N.HTML,r,i,n,s)||this;return a.input=r,a.begin=i,a.end=n,a.file=s,a.trimLeft=0,a.trimRight=0,a}return e.prototype.getContent=function(){return this.input.slice(this.begin+this.trimLeft,this.end-this.trimRight)},e}(we),Wc=function(t){F(e,t);function e(r,i,n,s,a,o){var u=t.call(this,N.Range,r,i,n,o)||this;return u.input=r,u.begin=i,u.end=n,u.lhs=s,u.rhs=a,u.file=o,u}return e}(we),Qc=function(t){F(e,t);function e(r,i,n,s,a){var o=this,u=s.trimOutputLeft,l=s.trimOutputRight,c=s.outputDelimiterLeft,f=s.outputDelimiterRight,h=r.slice(i+c.length,n-f.length);return o=t.call(this,N.Output,h,r,i,n,u,l,a)||this,o}return e}(Jr);function Yc(t,e,r,i){i===void 0&&(i=t.length);for(var n=r,s=e,a;n[t[s]]&&s<i;)n=n[t[s++]],n.end&&(a=n);return!a||a.needBoundary&&M[t.charCodeAt(s)]&Gr?-1:s}var Kc=function(t){F(e,t);function e(r,i,n,s,a){var o=this,u=r.slice(i,n);if(o=t.call(this,N.Tag,u,r,i,n,!1,!1,a)||this,!/\S/.test(u))o.name="",o.args="";else{var l=new ee(o.content,s.operatorsTrie);if(o.name=l.readIdentifier().getText(),!o.name)throw new Wr("illegal liquid tag syntax",o);l.skipBlank(),o.args=l.remaining()}return o}return e}(Jr),ee=function(){function t(e,r,i){i===void 0&&(i=""),this.input=e,this.trie=r,this.file=i,this.p=0,this.rawBeginAt=-1,this.N=e.length}return t.prototype.readExpression=function(){return new kc(this.readExpressionTokens())},t.prototype.readExpressionTokens=function(){var e,r,i;return L(this,function(n){switch(n.label){case 0:return e=this.readValue(),e?[4,e]:[2];case 1:n.sent(),n.label=2;case 2:return this.p<this.N?(r=this.readOperator(),r?(i=this.readValue(),i?[4,r]:[2]):[2]):[3,5];case 3:return n.sent(),[4,i];case 4:return n.sent(),[3,2];case 5:return[2]}})},t.prototype.readOperator=function(){this.skipBlank();var e=Yc(this.input,this.p,this.trie);if(e!==-1)return new Uc(this.input,this.p,this.p=e,this.file)},t.prototype.readFilters=function(){for(var e=[];;){var r=this.readFilter();if(!r)return e;e.push(r)}},t.prototype.readFilter=function(){var e=this;if(this.skipBlank(),this.end())return null;J(this.peek()==="|",function(){return"unexpected token at ".concat(e.snapshot())}),this.p++;var r=this.p,i=this.readIdentifier();if(!i.size())return null;var n=[];if(this.skipBlank(),this.peek()===":")do{++this.p;var s=this.readFilterArg();for(s&&n.push(s);this.p<this.N&&this.peek()!==","&&this.peek()!=="|";)++this.p}while(this.peek()===",");return new Vc(i.getText(),n,this.input,r,this.p,this.file)},t.prototype.readFilterArg=function(){var e=this.readValue();if(!!e){if(this.skipBlank(),this.peek()!==":")return e;++this.p;var r=this.readValue();return[e.getText(),r]}},t.prototype.readTopLevelTokens=function(e){e===void 0&&(e=lt);for(var r=[];this.p<this.N;){var i=this.readTopLevelToken(e);r.push(i)}return Nc(r,e),r},t.prototype.readTopLevelToken=function(e){var r=e.tagDelimiterLeft,i=e.outputDelimiterLeft;return this.rawBeginAt>-1?this.readEndrawOrRawContent(e):this.match(r)?this.readTagToken(e):this.match(i)?this.readOutputToken(e):this.readHTMLToken([r,i])},t.prototype.readHTMLToken=function(e){for(var r=this,i=this.p;this.p<this.N&&!e.some(function(n){return r.match(n)});)++this.p;return new cs(this.input,i,this.p,this.file)},t.prototype.readTagToken=function(e){e===void 0&&(e=lt);var r=this,i=r.file,n=r.input,s=this.p;if(this.readToDelimiter(e.tagDelimiterRight)===-1)throw this.mkError("tag ".concat(this.snapshot(s)," not closed"),s);var a=new hs(n,s,this.p,e,i);return a.name==="raw"&&(this.rawBeginAt=s),a},t.prototype.readToDelimiter=function(e){for(;this.p<this.N;){if(this.peekType()&Qn){this.readQuoted();continue}if(++this.p,this.rmatch(e))return this.p}return-1},t.prototype.readOutputToken=function(e){e===void 0&&(e=lt);var r=this,i=r.file,n=r.input,s=e.outputDelimiterRight,a=this.p;if(this.readToDelimiter(s)===-1)throw this.mkError("output ".concat(this.snapshot(a)," not closed"),a);return new Qc(n,a,this.p,e,i)},t.prototype.readEndrawOrRawContent=function(e){for(var r=e.tagDelimiterLeft,i=e.tagDelimiterRight,n=this.p,s=this.readTo(r)-r.length;this.p<this.N;){if(this.readIdentifier().getText()!=="endraw"){s=this.readTo(r)-r.length;continue}for(;this.p<=this.N;){if(this.rmatch(i)){var a=this.p;return n===s?(this.rawBeginAt=-1,new hs(this.input,n,a,e,this.file)):(this.p=s,new cs(this.input,n,s,this.file))}if(this.rmatch(r))break;this.p++}}throw this.mkError("raw ".concat(this.snapshot(this.rawBeginAt)," not closed"),n)},t.prototype.readLiquidTagTokens=function(e){e===void 0&&(e=lt);for(var r=[];this.p<this.N;){var i=this.readLiquidTagToken(e);i.name&&r.push(i)}return r},t.prototype.readLiquidTagToken=function(e){var r=this,i=r.file,n=r.input,s=this.p,a=this.N;this.readToDelimiter(`
55
+ `)!==-1&&(a=this.p);var o=new Kc(n,s,a,e,i);return o},t.prototype.mkError=function(e,r){return new Wr(e,new Yt(this.input,r,this.N,this.file))},t.prototype.snapshot=function(e){return e===void 0&&(e=this.p),JSON.stringify(jl(this.input.slice(e),16))},t.prototype.readWord=function(){return console.warn("Tokenizer#readWord() will be removed, use #readIdentifier instead"),this.readIdentifier()},t.prototype.readIdentifier=function(){this.skipBlank();for(var e=this.p;this.peekType()&Gr;)++this.p;return new Yt(this.input,e,this.p,this.file)},t.prototype.readHashes=function(e){for(var r=[];;){var i=this.readHash(e);if(!i)return r;r.push(i)}},t.prototype.readHash=function(e){this.skipBlank(),this.peek()===","&&++this.p;var r=this.p,i=this.readIdentifier();if(!!i.size()){var n;this.skipBlank();var s=e?"=":":";return this.peek()===s&&(++this.p,n=this.readValue()),new zc(this.input,r,this.p,i,n,this.file)}},t.prototype.remaining=function(){return this.input.slice(this.p)},t.prototype.advance=function(e){e===void 0&&(e=1),this.p+=e},t.prototype.end=function(){return this.p>=this.N},t.prototype.readTo=function(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1},t.prototype.readValue=function(){var e=this.readQuoted()||this.readRange();if(e)return e;if(this.peek()==="["){this.p++;var r=this.readQuoted();return!r||this.peek()!=="]"?void 0:(this.p++,new ls(r,[],this.p))}var i=this.readIdentifier();if(!!i.size()){for(var n=i.isNumber(!0),s=[];;)if(this.peek()==="["){n=!1,this.p++;var r=this.readValue()||new Yt(this.input,this.p,this.p,this.file);this.readTo("]"),s.push(r)}else if(this.peek()==="."&&this.peek(1)!=="."){this.p++;var r=this.readIdentifier();if(!r.size())break;r.isNumber()||(n=!1),s.push(r)}else break;return!s.length&&is.hasOwnProperty(i.content)?new qc(this.input,i.begin,i.end,this.file):n?new jc(i,s[0]):new ls(i,s,this.p)}},t.prototype.readRange=function(){this.skipBlank();var e=this.p;if(this.peek()==="("){++this.p;var r=this.readValueOrThrow();this.p+=2;var i=this.readValueOrThrow();return++this.p,new Wc(this.input,e,this.p,r,i,this.file)}},t.prototype.readValueOrThrow=function(){var e=this,r=this.readValue();return J(r,function(){return"unexpected token ".concat(e.snapshot(),", value expected")}),r},t.prototype.readQuoted=function(){this.skipBlank();var e=this.p;if(!!(this.peekType()&Qn)){++this.p;for(var r=!1;this.p<this.N&&(++this.p,!(this.input[this.p-1]===this.input[e]&&!r));)r?r=!1:this.input[this.p-1]==="\\"&&(r=!0);return new Gc(this.input,e,this.p,this.file)}},t.prototype.readFileNameTemplate=function(e){var r,i,n;return L(this,function(s){switch(s.label){case 0:r=e.outputDelimiterLeft,i=[","," ",r],n=new Set(i),s.label=1;case 1:return this.p<this.N&&!n.has(this.peek())?[4,this.match(r)?this.readOutputToken(e):this.readHTMLToken(i)]:[3,3];case 2:return s.sent(),[3,1];case 3:return[2]}})},t.prototype.match=function(e){for(var r=0;r<e.length;r++)if(e[r]!==this.input[this.p+r])return!1;return!0},t.prototype.rmatch=function(e){for(var r=0;r<e.length;r++)if(e[e.length-1-r]!==this.input[this.p-1-r])return!1;return!0},t.prototype.peekType=function(e){return e===void 0&&(e=0),M[this.input.charCodeAt(this.p+e)]},t.prototype.peek=function(e){return e===void 0&&(e=0),this.input[this.p+e]},t.prototype.skipBlank=function(){for(;this.peekType()&Ut;)++this.p},t}(),hs=function(t){F(e,t);function e(r,i,n,s,a){var o=this,u=s.trimTagLeft,l=s.trimTagRight,c=s.tagDelimiterLeft,f=s.tagDelimiterRight,h=r.slice(i+c.length,n-f.length);o=t.call(this,N.Tag,h,r,i,n,u,l,a)||this;var d=new ee(o.content,s.operatorsTrie);if(o.name=d.readIdentifier().getText(),!o.name)throw new Wr("illegal tag syntax",o);return d.skipBlank(),o.args=d.remaining(),o}return e}(Jr),ct=function(){function t(e,r){var i,n;this.hash={};var s=new ee(e,{});try{for(var a=Z(s.readHashes(r)),o=a.next();!o.done;o=a.next()){var u=o.value;this.hash[u.name.content]=u.value}}catch(l){i={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}}return t.prototype.render=function(e){var r,i,n,s,a,o,u,l,c,f;return L(this,function(h){switch(h.label){case 0:r={},h.label=1;case 1:h.trys.push([1,8,9,10]),i=Z(Object.keys(this.hash)),n=i.next(),h.label=2;case 2:return n.done?[3,7]:(s=n.value,a=r,o=s,this.hash[s]!==void 0?[3,3]:(u=!0,[3,5]));case 3:return[4,ie(this.hash[s],e)];case 4:u=h.sent(),h.label=5;case 5:a[o]=u,h.label=6;case 6:return n=i.next(),[3,2];case 7:return[3,10];case 8:return l=h.sent(),c={error:l},[3,10];case 9:try{n&&!n.done&&(f=i.return)&&f.call(i)}finally{if(c)throw c.error}return[7];case 10:return[2,r]}})},t}();function Xc(t){return ve(t)}var fs=function(){function t(e,r,i,n){this.name=e,this.impl=r||Hl,this.args=i,this.liquid=n}return t.prototype.render=function(e,r){var i,n,s=[];try{for(var a=Z(this.args),o=a.next();!o.done;o=a.next()){var u=o.value;Xc(u)?s.push([u[0],ie(u[1],r)]):s.push(ie(u,r))}}catch(l){i={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return this.impl.apply({context:r,liquid:this.liquid},ue([e],Q(s),!1))},t}(),je=function(){function t(e,r){this.filters=[];var i=new ee(e,r.options.operatorsTrie);this.initial=i.readExpression(),this.filters=i.readFilters().map(function(n){var s=n.name,a=n.args;return new fs(s,r.filters.get(s),a,r)})}return t.prototype.value=function(e,r){var i,n,s,a,o,u,l;return L(this,function(c){switch(c.label){case 0:return r=r||e.opts.lenientIf&&this.filters.length>0&&this.filters[0].name==="default",[4,this.initial.evaluate(e,r)];case 1:i=c.sent(),c.label=2;case 2:c.trys.push([2,7,8,9]),n=Z(this.filters),s=n.next(),c.label=3;case 3:return s.done?[3,6]:(a=s.value,[4,a.render(i,e)]);case 4:i=c.sent(),c.label=5;case 5:return s=n.next(),[3,3];case 6:return[3,9];case 7:return o=c.sent(),u={error:o},[3,9];case 8:try{s&&!s.done&&(l=n.return)&&l.call(n)}finally{if(u)throw u.error}return[7];case 9:return[2,i]}})},t}(),Zc=function(t){F(e,t);function e(r,i,n){var s=t.call(this,r)||this;s.name=r.name;var a=n.tags.get(r.name);return s.impl=Object.create(a),s.impl.liquid=n,s.impl.parse&&s.impl.parse(r,i),s}return e.prototype.render=function(r,i){var n,s;return L(this,function(a){switch(a.label){case 0:return[4,new ct(this.token.args).render(r)];case 1:return n=a.sent(),s=this.impl,De(s.render)?[4,s.render(r,i,n)]:[3,3];case 2:return[2,a.sent()];case 3:return[2]}})},e}(Xr),Jc=function(t){F(e,t);function e(r,i){var n=t.call(this,r)||this;return n.value=new je(r.content,i),n}return e.prototype.render=function(r,i){var n;return L(this,function(s){switch(s.label){case 0:return[4,this.value.value(r,!1)];case 1:return n=s.sent(),i.write(n),[2]}})},e}(Xr),eh=function(t){F(e,t);function e(r){var i=t.call(this,r)||this;return i.str=r.getContent(),i}return e.prototype.render=function(r,i){return L(this,function(n){return i.write(this.str),[2]})},e}(Xr),th=function(){function t(e){this.liquid=e,this.cache=this.liquid.options.cache,this.fs=this.liquid.options.fs,this.parseFile=this.cache?this._parseFileCached:this._parseFile,this.loader=new pc(this.liquid.options)}return t.prototype.parse=function(e,r){var i=new ee(e,this.liquid.options.operatorsTrie,r),n=i.readTopLevelTokens(this.liquid.options);return this.parseTokens(n)},t.prototype.parseTokens=function(e){for(var r,i=[];r=e.shift();)i.push(this.parseToken(r,e));return i},t.prototype.parseToken=function(e,r){try{return Kr(e)?new Zc(e,r,this.liquid):_c(e)?new Jc(e,this.liquid):new eh(e)}catch(i){throw new rc(i,e)}},t.prototype.parseStream=function(e){var r=this;return new Tc(e,function(i,n){return r.parseToken(i,n)})},t.prototype._parseFileCached=function(e,r,i,n){var s,a,o;return i===void 0&&(i=Ke.Root),L(this,function(u){switch(u.label){case 0:return s=this.loader.shouldLoadRelative(e)?n+","+e:i+":"+e,[4,this.cache.read(s)];case 1:if(a=u.sent(),a)return[2,a];o=wt(this._parseFile(e,r,i,n)),this.cache.write(s,o),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,o];case 3:return[2,u.sent()];case 4:return u.sent(),this.cache.remove(s),[3,5];case 5:return[2,[]]}})},t.prototype._parseFile=function(e,r,i,n){var s,a,o,u;return i===void 0&&(i=Ke.Root),L(this,function(l){switch(l.label){case 0:return[4,this.loader.lookup(e,i,r,n)];case 1:return s=l.sent(),o=(a=this.liquid).parse,r?(u=this.fs.readFileSync(s),[3,4]):[3,2];case 2:return[4,this.fs.readFile(s)];case 3:u=l.sent(),l.label=4;case 4:return[2,o.apply(a,[u,s])]}})},t}(),rh={parse:function(t){var e=new ee(t.args,this.liquid.options.operatorsTrie);this.key=e.readIdentifier().content,e.skipBlank(),J(e.peek()==="=",function(){return"illegal token ".concat(t.getText())}),e.advance(),this.value=e.remaining()},render:function(t){var e,r;return L(this,function(i){switch(i.label){case 0:return e=t.bottom(),r=this.key,[4,this.liquid._evalValue(this.value,t)];case 1:return e[r]=i.sent(),[2]}})}};function ei(t){return ve(t)?t:Le(t)&&t.length>0?[t]:jn(t)?Object.keys(t).map(function(e){return[e,t[e]]}):[]}function _t(t){return ve(t)?t:[t]}var ti=function(t){F(e,t);function e(r,i,n){var s=t.call(this)||this;return s.i=0,s.length=r,s.name="".concat(n,"-").concat(i),s}return e.prototype.next=function(){this.i++},e.prototype.index0=function(){return this.i},e.prototype.index=function(){return this.i+1},e.prototype.first=function(){return this.i===0},e.prototype.last=function(){return this.i===this.length-1},e.prototype.rindex=function(){return this.length-this.i},e.prototype.rindex0=function(){return this.length-this.i-1},e.prototype.valueOf=function(){return JSON.stringify(this)},e}(ot),ps=["offset","limit","reversed"],ih={type:"block",parse:function(t,e){var r=this,i=new ee(t.args,this.liquid.options.operatorsTrie),n=i.readIdentifier(),s=i.readIdentifier(),a=i.readValue();J(n.size()&&s.content==="in"&&a,function(){return"illegal tag: ".concat(t.getText())}),this.variable=n.content,this.collection=a,this.hash=new ct(i.remaining()),this.templates=[],this.elseTemplates=[];var o,u=this.liquid.parser.parseStream(e).on("start",function(){return o=r.templates}).on("tag:else",function(){return o=r.elseTemplates}).on("tag:endfor",function(){return u.stop()}).on("template",function(l){return o.push(l)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))});u.start()},render:function(t,e){var r,i,n,s,a,o,u,l,c,f,h,d,p;return L(this,function(m){switch(m.label){case 0:return r=this.liquid.renderer,n=ei,[4,ie(this.collection,t)];case 1:return i=n.apply(void 0,[m.sent()]),i.length?[3,3]:[4,r.renderTemplates(this.elseTemplates,t,e)];case 2:return m.sent(),[2];case 3:return s="continue-"+this.variable+"-"+this.collection.getText(),t.push({continue:t.getRegister(s)}),[4,this.hash.render(t)];case 4:a=m.sent(),t.pop(),o=this.liquid.options.orderedFilterParameters?Object.keys(a).filter(function(w){return ps.includes(w)}):ps.filter(function(w){return a[w]!==void 0}),i=o.reduce(function(w,b){return b==="offset"?sh(w,a.offset):b==="limit"?ah(w,a.limit):nh(w)},i),t.setRegister(s,(a.offset||0)+i.length),u={forloop:new ti(i.length,this.collection.getText(),this.variable)},t.push(u),m.label=5;case 5:m.trys.push([5,10,11,12]),l=Z(i),c=l.next(),m.label=6;case 6:return c.done?[3,9]:(f=c.value,u[this.variable]=f,[4,r.renderTemplates(this.templates,t,e)]);case 7:if(m.sent(),e.break)return e.break=!1,[3,9];e.continue=!1,u.forloop.next(),m.label=8;case 8:return c=l.next(),[3,6];case 9:return[3,12];case 10:return h=m.sent(),d={error:h},[3,12];case 11:try{c&&!c.done&&(p=l.return)&&p.call(l)}finally{if(d)throw d.error}return[7];case 12:return t.pop(),[2]}})}};function nh(t){return ue([],Q(t),!1).reverse()}function sh(t,e){return t.slice(e)}function ah(t,e){return t.slice(0,e)}var oh={parse:function(t,e){var r=this,i=new ee(t.args,this.liquid.options.operatorsTrie);this.variable=uh(i),J(this.variable,function(){return"".concat(t.args," not valid identifier")}),this.templates=[];var n=this.liquid.parser.parseStream(e);n.on("tag:endcapture",function(){return n.stop()}).on("template",function(s){return r.templates.push(s)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}),n.start()},render:function(t){var e,r;return L(this,function(i){switch(i.label){case 0:return e=this.liquid.renderer,[4,e.renderTemplates(this.templates,t)];case 1:return r=i.sent(),t.bottom()[this.variable]=r,[2]}})}};function uh(t){var e=t.readIdentifier().content;if(e)return e;var r=t.readQuoted();if(r)return Zr(r)}var lh={parse:function(t,e){var r=this;this.cond=new je(t.args,this.liquid),this.cases=[],this.elseTemplates=[];var i=[],n=this.liquid.parser.parseStream(e).on("tag:when",function(s){i=[];for(var a=new ee(s.args,r.liquid.options.operatorsTrie);!a.end();){var o=a.readValue();r.cases.push({val:o,templates:i}),a.readTo(",")}}).on("tag:else",function(){return i=r.elseTemplates}).on("tag:endcase",function(){return n.stop()}).on("template",function(s){return i.push(s)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))});n.start()},render:function(t,e){var r,i,n,s,a,o,u,l,c,f;return L(this,function(h){switch(h.label){case 0:return r=this.liquid.renderer,n=Qe,[4,this.cond.value(t,t.opts.lenientIf)];case 1:i=n.apply(void 0,[h.sent()]),h.label=2;case 2:h.trys.push([2,7,8,9]),s=Z(this.cases),a=s.next(),h.label=3;case 3:return a.done?[3,6]:(o=a.value,u=ie(o.val,t,t.opts.lenientIf),u!==i?[3,5]:[4,r.renderTemplates(o.templates,t,e)]);case 4:return h.sent(),[2];case 5:return a=s.next(),[3,3];case 6:return[3,9];case 7:return l=h.sent(),c={error:l},[3,9];case 8:try{a&&!a.done&&(f=s.return)&&f.call(s)}finally{if(c)throw c.error}return[7];case 9:return[4,r.renderTemplates(this.elseTemplates,t,e)];case 10:return h.sent(),[2]}})}},ch={parse:function(t,e){var r=this.liquid.parser.parseStream(e);r.on("token",function(i){i.name==="endcomment"&&r.stop()}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}),r.start()}},ri;(function(t){t[t.OUTPUT=0]="OUTPUT",t[t.STORE=1]="STORE"})(ri||(ri={}));var St=ri,hh={parseFilePath:ii,renderFilePath:ni,parse:function(t){var e=t.args,r=new ee(e,this.liquid.options.operatorsTrie);for(this.file=this.parseFilePath(r,this.liquid),this.currentFile=t.file;!r.end();){r.skipBlank();var i=r.p,n=r.readIdentifier();if((n.content==="with"||n.content==="for")&&(r.skipBlank(),r.peek()!==":")){var s=r.readValue();if(s){var a=r.p,o=r.readIdentifier(),u=void 0;o.content==="as"?u=r.readIdentifier():r.p=a,this[n.content]={value:s,alias:u&&u.content},r.skipBlank(),r.peek()===","&&r.advance();continue}}r.p=i;break}this.hash=new ct(r.remaining())},render:function(t,e){var r,i,n,s,a,o,u,l,c,h,d,f,h,d,p,m,w,b,_,R,_,$,E;return L(this,function(T){switch(T.label){case 0:return r=this,i=r.liquid,n=r.hash,[4,this.renderFilePath(this.file,t,i)];case 1:return s=T.sent(),J(s,function(){return'illegal filename "'.concat(s,'"')}),a=new Qr({},t.opts,{sync:t.sync,globals:t.globals,strictVariables:t.strictVariables}),o=a.bottom(),u=oe,l=[o],[4,n.render(t)];case 2:if(u.apply(void 0,l.concat([T.sent()])),this.with&&(c=this.with,h=c.value,d=c.alias,o[d||s]=ie(h,t)),!this.for)return[3,12];f=this.for,h=f.value,d=f.alias,p=ie(h,t),p=ei(p),o.forloop=new ti(p.length,h.getText(),d),T.label=3;case 3:T.trys.push([3,9,10,11]),m=Z(p),w=m.next(),T.label=4;case 4:return w.done?[3,8]:(b=w.value,o[d]=b,[4,i._parsePartialFile(s,a.sync,this.currentFile)]);case 5:return _=T.sent(),[4,i.renderer.renderTemplates(_,a,e)];case 6:T.sent(),o.forloop.next(),T.label=7;case 7:return w=m.next(),[3,4];case 8:return[3,11];case 9:return R=T.sent(),$={error:R},[3,11];case 10:try{w&&!w.done&&(E=m.return)&&E.call(m)}finally{if($)throw $.error}return[7];case 11:return[3,15];case 12:return[4,i._parsePartialFile(s,a.sync,this.currentFile)];case 13:return _=T.sent(),[4,i.renderer.renderTemplates(_,a,e)];case 14:T.sent(),T.label=15;case 15:return[2]}})}};function ii(t,e){if(e.options.dynamicPartials){var r=t.readValue();if(r===void 0)throw new TypeError('illegal argument "'.concat(t.input,'"'));if(r.getText()==="none")return null;if(es(r)){var i=e.parse(Zr(r));return ds(i)}return r}var n=ue([],Q(t.readFileNameTemplate(e.options)),!1),s=ds(e.parser.parseTokens(n));return s==="none"?null:s}function ds(t){return t.length===1&&Yr(t[0].token)?t[0].token.getContent():t}function ni(t,e,r){return typeof t=="string"?t:Array.isArray(t)?r.renderer.renderTemplates(t,e):ie(t,e)}var fh={parseFilePath:ii,renderFilePath:ni,parse:function(t){var e=t.args,r=new ee(e,this.liquid.options.operatorsTrie);this.file=this.parseFilePath(r,this.liquid),this.currentFile=t.file;var i=r.p,n=r.readIdentifier();n.content==="with"?(r.skipBlank(),r.peek()!==":"?this.withVar=r.readValue():r.p=i):r.p=i,this.hash=new ct(r.remaining(),this.liquid.options.jekyllInclude)},render:function(t,e){var r,i,n,s,a,o,u,l,c;return L(this,function(f){switch(f.label){case 0:return r=this,i=r.liquid,n=r.hash,s=r.withVar,a=i.renderer,[4,this.renderFilePath(this.file,t,i)];case 1:return o=f.sent(),J(o,function(){return'illegal filename "'.concat(o,'"')}),u=t.saveRegister("blocks","blockMode"),t.setRegister("blocks",{}),t.setRegister("blockMode",St.OUTPUT),[4,n.render(t)];case 2:return l=f.sent(),s&&(l[o]=ie(s,t)),[4,i._parsePartialFile(o,t.sync,this.currentFile)];case 3:return c=f.sent(),t.push(t.opts.jekyllInclude?{include:l}:l),[4,a.renderTemplates(c,t,e)];case 4:return f.sent(),t.pop(),t.restoreRegister(u),[2]}})}},ph={parse:function(t){var e=new ee(t.args,this.liquid.options.operatorsTrie);this.variable=e.readIdentifier().content},render:function(t,e){var r=t.environments;Ur(r[this.variable])||(r[this.variable]=0),e.write(U(--r[this.variable]))}},dh={parse:function(t){var e=new ee(t.args,this.liquid.options.operatorsTrie),r=e.readValue();for(e.skipBlank(),this.candidates=[],r&&(e.peek()===":"?(this.group=r,e.advance()):this.candidates.push(r));!e.end();){var i=e.readValue();i&&this.candidates.push(i),e.readTo(",")}J(this.candidates.length,function(){return"empty candidates: ".concat(t.getText())})},render:function(t,e){var r=ie(this.group,t),i="cycle:".concat(r,":")+this.candidates.join(","),n=t.getRegister("cycle"),s=n[i];s===void 0&&(s=n[i]=0);var a=this.candidates[s];s=(s+1)%this.candidates.length,n[i]=s;var o=ie(a,t);e.write(o)}},mh={parse:function(t,e){var r=this;this.branches=[],this.elseTemplates=[];var i;this.liquid.parser.parseStream(e).on("start",function(){return r.branches.push({predicate:new je(t.args,r.liquid),templates:i=[]})}).on("tag:elsif",function(n){return r.branches.push({predicate:new je(n.args,r.liquid),templates:i=[]})}).on("tag:else",function(){return i=r.elseTemplates}).on("tag:endif",function(){this.stop()}).on("template",function(n){return i.push(n)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}).start()},render:function(t,e){var r,i,n,s,a,o,u,l,c,f;return L(this,function(h){switch(h.label){case 0:r=this.liquid.renderer,h.label=1;case 1:h.trys.push([1,7,8,9]),i=Z(this.branches),n=i.next(),h.label=2;case 2:return n.done?[3,6]:(s=n.value,a=s.predicate,o=s.templates,[4,a.value(t,t.opts.lenientIf)]);case 3:return u=h.sent(),Ye(u,t)?[4,r.renderTemplates(o,t,e)]:[3,5];case 4:return h.sent(),[2];case 5:return n=i.next(),[3,2];case 6:return[3,9];case 7:return l=h.sent(),c={error:l},[3,9];case 8:try{n&&!n.done&&(f=i.return)&&f.call(i)}finally{if(c)throw c.error}return[7];case 9:return[4,r.renderTemplates(this.elseTemplates,t,e)];case 10:return h.sent(),[2]}})}},gh={parse:function(t){var e=new ee(t.args,this.liquid.options.operatorsTrie);this.variable=e.readIdentifier().content},render:function(t,e){var r=t.environments;Ur(r[this.variable])||(r[this.variable]=0);var i=r[this.variable];r[this.variable]++,e.write(U(i))}},yh={parseFilePath:ii,renderFilePath:ni,parse:function(t,e){var r=new ee(t.args,this.liquid.options.operatorsTrie);this.file=this.parseFilePath(r,this.liquid),this.currentFile=t.file,this.hash=new ct(r.remaining()),this.tpls=this.liquid.parser.parseTokens(e)},render:function(t,e){var r,i,n,s,a,o,u,l,c,f,h;return L(this,function(d){switch(d.label){case 0:return r=this,i=r.liquid,n=r.hash,s=r.file,a=i.renderer,s!==null?[3,2]:(t.setRegister("blockMode",St.OUTPUT),[4,a.renderTemplates(this.tpls,t,e)]);case 1:return d.sent(),[2];case 2:return[4,this.renderFilePath(this.file,t,i)];case 3:return o=d.sent(),J(o,function(){return'illegal filename "'.concat(o,'"')}),[4,i._parseLayoutFile(o,t.sync,this.currentFile)];case 4:return u=d.sent(),t.setRegister("blockMode",St.STORE),[4,a.renderTemplates(this.tpls,t)];case 5:return l=d.sent(),c=t.getRegister("blocks"),c[""]===void 0&&(c[""]=function(p,m){return m.write(l)}),t.setRegister("blockMode",St.OUTPUT),h=(f=t).push,[4,n.render(t)];case 6:return h.apply(f,[d.sent()]),[4,a.renderTemplates(u,t,e)];case 7:return d.sent(),t.pop(),[2]}})}},ms=function(t){F(e,t);function e(r){r===void 0&&(r=function(){return""});var i=t.call(this)||this;return i.superBlockRender=r,i}return e.prototype.super=function(){return this.superBlockRender()},e}(ot),vh={parse:function(t,e){var r=this,i=/\w+/.exec(t.args);this.block=i?i[0]:"",this.tpls=[],this.liquid.parser.parseStream(e).on("tag:endblock",function(){this.stop()}).on("template",function(n){return r.tpls.push(n)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}).start()},render:function(t,e){var r;return L(this,function(i){switch(i.label){case 0:return r=this.getBlockRender(t),t.getRegister("blockMode")!==St.STORE?[3,1]:(t.getRegister("blocks")[this.block]=r,[3,3]);case 1:return[4,r(new ms,e)];case 2:i.sent(),i.label=3;case 3:return[2]}})},getBlockRender:function(t){var e=this,r=e.liquid,i=e.tpls,n=t.getRegister("blocks")[this.block],s=function(a,o){return L(this,function(u){switch(u.label){case 0:return t.push({block:a}),[4,r.renderer.renderTemplates(i,t,o)];case 1:return u.sent(),t.pop(),[2]}})};return n?function(a,o){return n(new ms(function(){return s(a,o)}),o)}:s}},bh={parse:function(t,e){var r=this;this.tokens=[];var i=this.liquid.parser.parseStream(e);i.on("token",function(n){n.name==="endraw"?i.stop():r.tokens.push(n)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}),i.start()},render:function(){return this.tokens.map(function(t){return t.getText()}).join("")}},wh=function(t){F(e,t);function e(r,i,n,s){var a=t.call(this,r,n,s)||this;return a.length=r,a.cols=i,a}return e.prototype.row=function(){return Math.floor(this.i/this.cols)+1},e.prototype.col0=function(){return this.i%this.cols},e.prototype.col=function(){return this.col0()+1},e.prototype.col_first=function(){return this.col0()===0},e.prototype.col_last=function(){return this.col()===this.cols},e}(ti),_h={parse:function(t,e){var r=this,i=new ee(t.args,this.liquid.options.operatorsTrie),n=i.readIdentifier();i.skipBlank();var s=i.readIdentifier();J(s&&s.content==="in",function(){return"illegal tag: ".concat(t.getText())}),this.variable=n.content,this.collection=i.readValue(),this.hash=new ct(i.remaining()),this.templates=[];var a,o=this.liquid.parser.parseStream(e).on("start",function(){return a=r.templates}).on("tag:endtablerow",function(){return o.stop()}).on("template",function(u){return a.push(u)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))});o.start()},render:function(t,e){var r,i,n,s,a,o,u,l,c,f;return L(this,function(h){switch(h.label){case 0:return i=ei,[4,ie(this.collection,t)];case 1:return r=i.apply(void 0,[h.sent()]),[4,this.hash.render(t)];case 2:n=h.sent(),s=n.offset||0,a=n.limit===void 0?r.length:n.limit,r=r.slice(s,s+a),o=n.cols||r.length,u=this.liquid.renderer,l=new wh(r.length,o,this.collection.getText(),this.variable),c={tablerowloop:l},t.push(c),f=0,h.label=3;case 3:return f<r.length?(c[this.variable]=r[f],l.col0()===0&&(l.row()!==1&&e.write("</tr>"),e.write('<tr class="row'.concat(l.row(),'">'))),e.write('<td class="col'.concat(l.col(),'">')),[4,u.renderTemplates(this.templates,t,e)]):[3,6];case 4:h.sent(),e.write("</td>"),h.label=5;case 5:return f++,l.next(),[3,3];case 6:return r.length&&e.write("</tr>"),t.pop(),[2]}})}},Sh={parse:function(t,e){var r=this;this.branches=[],this.elseTemplates=[];var i;this.liquid.parser.parseStream(e).on("start",function(){return r.branches.push({predicate:new je(t.args,r.liquid),test:zr,templates:i=[]})}).on("tag:elsif",function(n){return r.branches.push({predicate:new je(n.args,r.liquid),test:Ye,templates:i=[]})}).on("tag:else",function(){return i=r.elseTemplates}).on("tag:endunless",function(){this.stop()}).on("template",function(n){return i.push(n)}).on("end",function(){throw new Error("tag ".concat(t.getText()," not closed"))}).start()},render:function(t,e){var r,i,n,s,a,o,u,l,c,f,h;return L(this,function(d){switch(d.label){case 0:r=this.liquid.renderer,d.label=1;case 1:d.trys.push([1,7,8,9]),i=Z(this.branches),n=i.next(),d.label=2;case 2:return n.done?[3,6]:(s=n.value,a=s.predicate,o=s.test,u=s.templates,[4,a.value(t,t.opts.lenientIf)]);case 3:return l=d.sent(),o(l,t)?[4,r.renderTemplates(u,t,e)]:[3,5];case 4:return d.sent(),[2];case 5:return n=i.next(),[3,2];case 6:return[3,9];case 7:return c=d.sent(),f={error:c},[3,9];case 8:try{n&&!n.done&&(h=i.return)&&h.call(i)}finally{if(f)throw f.error}return[7];case 9:return[4,r.renderTemplates(this.elseTemplates,t,e)];case 10:return d.sent(),[2]}})}},Eh={render:function(t,e){e.break=!0}},xh={render:function(t,e){e.continue=!0}},Rh={parse:function(t){this.value=new je(t.args,this.liquid)},render:function(t,e){var r;return L(this,function(i){switch(i.label){case 0:return[4,this.value.value(t,!1)];case 1:return r=i.sent(),e.write(r),[2]}})}},Ah={parse:function(t){var e=new ee(t.args,this.liquid.options.operatorsTrie),r=e.readLiquidTagTokens(this.liquid.options);this.tpls=this.liquid.parser.parseTokens(r)},render:function(t,e){return L(this,function(r){switch(r.label){case 0:return[4,this.liquid.renderer.renderTemplates(this.tpls,t,e)];case 1:return r.sent(),[2]}})}},Th={assign:rh,for:ih,capture:oh,case:lh,comment:ch,include:fh,render:hh,decrement:ph,increment:gh,cycle:dh,if:mh,layout:yh,block:vh,raw:bh,tablerow:_h,unless:Sh,break:Eh,continue:xh,echo:Rh,liquid:Ah},$h={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},Ph={"&amp;":"&","&lt;":"<","&gt;":">","&#34;":'"',"&#39;":"'"};function gs(t){return U(t).replace(/&|<|>|"|'/g,function(e){return $h[e]})}function Ch(t){return String(t).replace(/&(amp|lt|gt|#34|#39);/g,function(e){return Ph[e]})}function kh(t){return gs(Ch(t))}function Oh(t){return t.replace(/\n/g,`<br />
56
+ `)}function Lh(t){return t.replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g,"")}var Dh=Math.abs,Ih=Math.max,Fh=Math.min,Mh=Math.ceil,Nh=function(t,e){return t/e},Hh=Math.floor,Bh=function(t,e){return t-e},jh=function(t,e){return t%e},qh=function(t,e){return t*e};function Uh(t,e){e===void 0&&(e=0);var r=Math.pow(10,e);return Math.round(t*r)/r}function Vh(t,e){return Number(t)+Number(e)}function zh(t,e){return!t||!t.sort?[]:e!==void 0?ue([],Q(t),!1).sort(function(r,i){return zn(r[e],i[e])}):ue([],Q(t),!1).sort(zn)}var Gh=function(t){return t.split("+").map(decodeURIComponent).join(" ")},Wh=function(t){return t.split(" ").map(encodeURIComponent).join("+")},Qh=function(t,e){return t.join(e===void 0?" ":e)},Yh=function(t){return ve(t)?Bn(t):""},Kh=function(t){return ve(t)?t[0]:""},Xh=function(t){return ue([],Q(t),!1).reverse()};function Zh(t,e){var r=this,i=function(n){return e?r.context.getFromScope(n,e.split(".")):n};return _t(t).sort(function(n,s){return n=i(n),s=i(s),n<s?-1:n>s?1:0})}var Jh=function(t){return t&&t.length||0};function ef(t,e){var r=this;return _t(t).map(function(i){return r.context.getFromScope(i,e.split("."))})}function tf(t){return _t(t).filter(function(e){return!ut(e)})}function rf(t,e){return _t(t).concat(e)}function nf(t,e,r){return r===void 0&&(r=1),e=e<0?t.length+e:e,t.slice(e,e+r)}function sf(t,e,r){var i=this;return _t(t).filter(function(n){var s=i.context.getFromScope(n,String(e).split("."));return r===void 0?Ye(s,i.context):he(r)?r.equals(s):s===r})}function af(t){var e={};return(t||[]).filter(function(r){return e.hasOwnProperty(String(r))?!1:(e[String(r)]=!0,!0)})}var of=/%([-_0^#:]+)?(\d+)?([EO])?(.)/,ys=["January","February","March","April","May","June","July","August","September","October","November","December"],vs=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],uf=ys.map(ws),lf=vs.map(ws),bs={1:"st",2:"nd",3:"rd",default:"th"};function ws(t){return t.slice(0,3)}function cf(t){var e=hf(t)?29:28;return[31,e,31,30,31,30,31,31,30,31,30,31]}function _s(t){for(var e=0,r=0;r<t.getMonth();++r)e+=cf(t)[r];return e+t.getDate()}function Ss(t,e){var r=_s(t)+(e-t.getDay()),i=new Date(t.getFullYear(),0,1),n=7-i.getDay()+e;return String(Math.floor((r-n)/7)+1)}function hf(t){var e=t.getFullYear();return!!((e&3)===0&&(e%100||e%400===0&&e))}function ff(t){var e=t.getDate().toString(),r=parseInt(e.slice(-1));return bs[r]||bs.default}function pf(t){return parseInt(t.getFullYear().toString().substring(0,2),10)}var df={d:2,e:2,H:2,I:2,j:3,k:2,l:2,L:3,m:2,M:2,S:2,U:2,W:2},mf={a:" ",A:" ",b:" ",B:" ",c:" ",e:" ",k:" ",l:" ",p:" ",P:" "},si={a:function(t){return lf[t.getDay()]},A:function(t){return vs[t.getDay()]},b:function(t){return uf[t.getMonth()]},B:function(t){return ys[t.getMonth()]},c:function(t){return t.toLocaleString()},C:function(t){return pf(t)},d:function(t){return t.getDate()},e:function(t){return t.getDate()},H:function(t){return t.getHours()},I:function(t){return String(t.getHours()%12||12)},j:function(t){return _s(t)},k:function(t){return t.getHours()},l:function(t){return String(t.getHours()%12||12)},L:function(t){return t.getMilliseconds()},m:function(t){return t.getMonth()+1},M:function(t){return t.getMinutes()},N:function(t,e){var r=Number(e.width)||9,i=String(t.getMilliseconds()).substr(0,r);return Nl(i,r,"0")},p:function(t){return t.getHours()<12?"AM":"PM"},P:function(t){return t.getHours()<12?"am":"pm"},q:function(t){return ff(t)},s:function(t){return Math.round(t.getTime()/1e3)},S:function(t){return t.getSeconds()},u:function(t){return t.getDay()||7},U:function(t){return Ss(t,0)},w:function(t){return t.getDay()},W:function(t){return Ss(t,1)},x:function(t){return t.toLocaleDateString()},X:function(t){return t.toLocaleTimeString()},y:function(t){return t.getFullYear().toString().substring(2,4)},Y:function(t){return t.getFullYear()},z:function(t,e){var r=Math.abs(t.getTimezoneOffset()),i=Math.floor(r/60),n=r%60;return(t.getTimezoneOffset()>0?"-":"+")+qt(i,2,"0")+(e.flags[":"]?":":"")+qt(n,2,"0")},t:function(){return" "},n:function(){return`
57
+ `},"%":function(){return"%"}};si.h=si.b;function gf(t,e){for(var r="",i=e,n;n=of.exec(i);)r+=i.slice(0,n.index),i=i.slice(n.index+n[0].length),r+=yf(t,n);return r+i}function yf(t,e){var r,i,n=Q(e,5),s=n[0],a=n[1],o=a===void 0?"":a,u=n[2],l=n[3],c=n[4],f=si[c];if(!f)return s;var h={};try{for(var d=Z(o),p=d.next();!p.done;p=d.next()){var m=p.value;h[m]=!0}}catch(_){r={error:_}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}var w=String(f(t,{flags:h,width:u,modifier:l})),b=mf[c]||"0",R=u||df[c]||0;return h["^"]?w=w.toUpperCase():h["#"]&&(w=Bl(w)),h._?b=" ":h["0"]&&(b="0"),h["-"]&&(R=0),qt(w,R,b)}var vf=6e4,bf=new Date().getTimezoneOffset(),wf=/([zZ]|([+-])(\d{2}):(\d{2}))$/,ai=function(){function t(e,r){if(e instanceof t)this.date=e.date,r=e.timezoneOffset;else{var i=(bf-r)*vf,n=new Date(e).getTime()+i;this.date=new Date(n)}this.timezoneOffset=r}return t.prototype.getTime=function(){return this.date.getTime()},t.prototype.getMilliseconds=function(){return this.date.getMilliseconds()},t.prototype.getSeconds=function(){return this.date.getSeconds()},t.prototype.getMinutes=function(){return this.date.getMinutes()},t.prototype.getHours=function(){return this.date.getHours()},t.prototype.getDay=function(){return this.date.getDay()},t.prototype.getDate=function(){return this.date.getDate()},t.prototype.getMonth=function(){return this.date.getMonth()},t.prototype.getFullYear=function(){return this.date.getFullYear()},t.prototype.toLocaleTimeString=function(e){return this.date.toLocaleTimeString(e)},t.prototype.toLocaleDateString=function(e){return this.date.toLocaleDateString(e)},t.prototype.getTimezoneOffset=function(){return this.timezoneOffset},t.createDateFixedToTimezone=function(e){var r=e.match(wf);if(r&&r[1]==="Z")return new t(+new Date(e),0);if(r&&r[2]&&r[3]&&r[4]){var i=Q(r,5),n=i[2],s=i[3],a=i[4],o=(n==="+"?-1:1)*(parseInt(s,10)*60+parseInt(a,10));return new t(+new Date(e),o)}return new Date(e)},t}();function _f(t,e){var r=this.context.opts,i;return t==="now"||t==="today"?i=new Date:Ur(t)?i=new Date(t*1e3):Le(t)?/^\d+$/.test(t)?i=new Date(+t*1e3):r.preserveTimezones?i=ai.createDateFixedToTimezone(t):i=new Date(t):i=t,Sf(i)?(r.hasOwnProperty("timezoneOffset")&&(i=new ai(i,r.timezoneOffset)),gf(i,e)):t}function Sf(t){return(t instanceof Date||t instanceof ai)&&!isNaN(t.getTime())}function Ef(t,e){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return ve(t)||Le(t)?t.length?t:e:(t=Qe(t),t===!1&&new Map(r).get("allow_false")?!1:zr(t,this.context)?e:t)}function xf(t){return JSON.stringify(t)}function Rf(t,e){return J(arguments.length===2,"append expect 2 arguments"),U(t)+U(e)}function Af(t,e){return J(arguments.length===2,"prepend expect 2 arguments"),U(e)+U(t)}function Tf(t){return U(t).replace(/^\s+/,"")}function $f(t){return U(t).toLowerCase()}function Pf(t){return U(t).toUpperCase()}function Cf(t,e){return U(t).split(String(e)).join("")}function kf(t,e){return U(t).replace(String(e),"")}function Of(t){return U(t).replace(/\s+$/,"")}function Lf(t,e){return U(t).split(String(e))}function Df(t){return U(t).trim()}function If(t){return U(t).replace(/\n/g,"")}function Ff(t){return t=U(t),t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function Mf(t,e,r){return U(t).split(String(e)).join(r)}function Nf(t,e,r){return U(t).replace(String(e),r)}function Hf(t,e,r){return e===void 0&&(e=50),r===void 0&&(r="..."),t=U(t),t.length<=e?t:t.substr(0,e-r.length)+r}function Bf(t,e,r){e===void 0&&(e=15),r===void 0&&(r="...");var i=t.split(/\s+/),n=i.slice(0,e).join(" ");return i.length>=e&&(n+=r),n}var jf=Object.freeze({__proto__:null,escape:gs,escapeOnce:kh,newlineToBr:Oh,stripHtml:Lh,abs:Dh,atLeast:Ih,atMost:Fh,ceil:Mh,dividedBy:Nh,floor:Hh,minus:Bh,modulo:jh,times:qh,round:Uh,plus:Vh,sortNatural:zh,urlDecode:Gh,urlEncode:Wh,join:Qh,last:Yh,first:Kh,reverse:Xh,sort:Zh,size:Jh,map:ef,compact:tf,concat:rf,slice:nf,where:sf,uniq:af,date:_f,Default:Ef,json:xf,append:Rf,prepend:Af,lstrip:Tf,downcase:$f,upcase:Pf,remove:Cf,removeFirst:kf,rstrip:Of,split:Lf,strip:Df,stripNewlines:If,capitalize:Ff,replace:Mf,replaceFirst:Nf,truncate:Hf,truncatewords:Bf}),qf=function(){function t(){this.impls={}}return t.prototype.get=function(e){var r=this.impls[e];return J(r,function(){return'tag "'.concat(e,'" not found')}),r},t.prototype.set=function(e,r){this.impls[e]=r},t}(),Uf=function(){function t(e,r){this.strictFilters=e,this.liquid=r,this.impls={}}return t.prototype.get=function(e){var r=this.impls[e];return J(r||!this.strictFilters,function(){return"undefined filter: ".concat(e)}),r},t.prototype.set=function(e,r){this.impls[e]=r},t.prototype.create=function(e,r){return new fs(e,this.get(e),r,this.liquid)},t}(),Vf=function(){function t(e){var r=this;e===void 0&&(e={}),this.options=tc(e),this.parser=new th(this),this.renderer=new bc,this.filters=new Uf(this.options.strictFilters,this),this.tags=new qf,Hn(Th,function(i,n){return r.registerTag(Vn(n),i)}),Hn(jf,function(i,n){return r.registerFilter(Vn(n),i)})}return t.prototype.parse=function(e,r){return this.parser.parse(e,r)},t.prototype._render=function(e,r,i){var n=new Qr(r,this.options,i);return this.renderer.renderTemplates(e,n)},t.prototype.render=function(e,r,i){return We(this,void 0,void 0,function(){return L(this,function(n){return[2,Wt(this._render(e,r,oe(oe({},i),{sync:!1})))]})})},t.prototype.renderSync=function(e,r,i){return Qt(this._render(e,r,oe(oe({},i),{sync:!0})))},t.prototype.renderToNodeStream=function(e,r,i){i===void 0&&(i={});var n=new Qr(r,this.options,i);return this.renderer.renderTemplatesToNodeStream(e,n)},t.prototype._parseAndRender=function(e,r,i){var n=this.parse(e);return this._render(n,r,i)},t.prototype.parseAndRender=function(e,r,i){return We(this,void 0,void 0,function(){return L(this,function(n){return[2,Wt(this._parseAndRender(e,r,oe(oe({},i),{sync:!1})))]})})},t.prototype.parseAndRenderSync=function(e,r,i){return Qt(this._parseAndRender(e,r,oe(oe({},i),{sync:!0})))},t.prototype._parsePartialFile=function(e,r,i){return this.parser.parseFile(e,r,Ke.Partials,i)},t.prototype._parseLayoutFile=function(e,r,i){return this.parser.parseFile(e,r,Ke.Layouts,i)},t.prototype.parseFile=function(e){return We(this,void 0,void 0,function(){return L(this,function(r){return[2,Wt(this.parser.parseFile(e,!1))]})})},t.prototype.parseFileSync=function(e){return Qt(this.parser.parseFile(e,!0))},t.prototype.renderFile=function(e,r,i){return We(this,void 0,void 0,function(){var n;return L(this,function(s){switch(s.label){case 0:return[4,this.parseFile(e)];case 1:return n=s.sent(),[2,this.render(n,r,i)]}})})},t.prototype.renderFileSync=function(e,r,i){var n=this.parseFileSync(e);return this.renderSync(n,r,i)},t.prototype.renderFileToNodeStream=function(e,r,i){return We(this,void 0,void 0,function(){var n;return L(this,function(s){switch(s.label){case 0:return[4,this.parseFile(e)];case 1:return n=s.sent(),[2,this.renderToNodeStream(n,r,i)]}})})},t.prototype._evalValue=function(e,r){var i=new je(e,this);return i.value(r,!1)},t.prototype.evalValue=function(e,r){return We(this,void 0,void 0,function(){return L(this,function(i){return[2,Wt(this._evalValue(e,r))]})})},t.prototype.evalValueSync=function(e,r){return Qt(this._evalValue(e,r))},t.prototype.registerFilter=function(e,r){this.filters.set(e,r)},t.prototype.registerTag=function(e,r){this.tags.set(e,r)},t.prototype.plugin=function(e){return e.call(this,t)},t.prototype.express=function(){var e=this,r=!0;return function(i,n,s){var a,o,u;if(r){r=!1;var l=Vt(this.root);(a=e.options.root).unshift.apply(a,ue([],Q(l),!1)),(o=e.options.layouts).unshift.apply(o,ue([],Q(l),!1)),(u=e.options.partials).unshift.apply(u,ue([],Q(l),!1))}e.renderFile(i,n).then(function(c){return s(null,c)},s)}},t}();function Es(t){return e=>{const r=new Vf;return r.render(r.parse(t),e)}}var xs={exports:{}};const zf=/[\p{Lu}]/u,Gf=/[\p{Ll}]/u,Rs=/^[\p{Lu}](?![\p{Lu}])/gu,As=/([\p{Alpha}\p{N}_]|$)/u,Ts=/[_.\- ]+/,Wf=new RegExp("^"+Ts.source),$s=new RegExp(Ts.source+As.source,"gu"),Ps=new RegExp("\\d+"+As.source,"gu"),Qf=(t,e,r)=>{let i=!1,n=!1,s=!1;for(let a=0;a<t.length;a++){const o=t[a];i&&zf.test(o)?(t=t.slice(0,a)+"-"+t.slice(a),i=!1,s=n,n=!0,a++):n&&s&&Gf.test(o)?(t=t.slice(0,a-1)+"-"+t.slice(a-1),s=n,n=!1,i=!0):(i=e(o)===o&&r(o)!==o,s=n,n=r(o)===o&&e(o)!==o)}return t},Yf=(t,e)=>(Rs.lastIndex=0,t.replace(Rs,r=>e(r))),Kf=(t,e)=>($s.lastIndex=0,Ps.lastIndex=0,t.replace($s,(r,i)=>e(i)).replace(Ps,r=>e(r))),Cs=(t,e)=>{if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");if(e={pascalCase:!1,preserveConsecutiveUppercase:!1,...e},Array.isArray(t)?t=t.map(s=>s.trim()).filter(s=>s.length).join("-"):t=t.trim(),t.length===0)return"";const r=e.locale===!1?s=>s.toLowerCase():s=>s.toLocaleLowerCase(e.locale),i=e.locale===!1?s=>s.toUpperCase():s=>s.toLocaleUpperCase(e.locale);return t.length===1?e.pascalCase?i(t):r(t):(t!==r(t)&&(t=Qf(t,r,i)),t=t.replace(Wf,""),e.preserveConsecutiveUppercase?t=Yf(t,r):t=r(t),e.pascalCase&&(t=i(t.charAt(0))+t.slice(1)),Kf(t,i))};xs.exports=Cs,xs.exports.default=Cs;/*! *****************************************************************************
58
+ Copyright (c) Microsoft Corporation.
59
+
60
+ Permission to use, copy, modify, and/or distribute this software for any
61
+ purpose with or without fee is hereby granted.
62
+
63
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
64
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
65
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
66
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
67
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
68
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
69
+ PERFORMANCE OF THIS SOFTWARE.
70
+ ***************************************************************************** */var Kt=function(){return Kt=Object.assign||function(e){for(var r,i=1,n=arguments.length;i<n;i++){r=arguments[i];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},Kt.apply(this,arguments)};function Xf(t){return t.toLowerCase()}var Zf=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Jf=/[^A-Z0-9]+/gi;function ep(t,e){e===void 0&&(e={});for(var r=e.splitRegexp,i=r===void 0?Zf:r,n=e.stripRegexp,s=n===void 0?Jf:n,a=e.transform,o=a===void 0?Xf:a,u=e.delimiter,l=u===void 0?" ":u,c=ks(ks(t,i,"$1\0$2"),s,"\0"),f=0,h=c.length;c.charAt(f)==="\0";)f++;for(;c.charAt(h-1)==="\0";)h--;return c.slice(f,h).split("\0").map(o).join(l)}function ks(t,e,r){return e instanceof RegExp?t.replace(e,r):e.reduce(function(i,n){return i.replace(n,r)},t)}function tp(t,e){return e===void 0&&(e={}),ep(t,Kt({delimiter:"."},e))}function rp(t,e){return e===void 0&&(e={}),tp(t,Kt({delimiter:"-"},e))}function xe(t=""){return t.includes("\\")?t.replace(/\\/g,"/"):t}const ip=/^[/][/]/,np=/^[/][/]([.]{1,2}[/])?([a-zA-Z]):[/]/,sp=/^\/|^\\|^[a-zA-Z]:[/\\]/,ap="/",op=":",Os=function(t){if(t.length===0)return".";t=xe(t);const e=t.match(ip),r=e&&t.match(np),i=Et(t),n=t[t.length-1]==="/";return t=oi(t,!i),t.length===0?i?"/":n?"./":".":(n&&(t+="/"),e?r?`//./${t}`:`//${t}`:i&&!Et(t)?`/${t}`:t)},Xt=function(...t){if(t.length===0)return".";let e;for(let r=0;r<t.length;++r){const i=t[r];i.length>0&&(e===void 0?e=i:e+=`/${i}`)}return e===void 0?".":Os(e)},Ls=function(...t){t=t.map(i=>xe(i));let e="",r=!1;for(let i=t.length-1;i>=-1&&!r;i--){const n=i>=0?t[i]:process.cwd();n.length!==0&&(e=`${n}/${e}`,r=Et(n))}return e=oi(e,!r),r&&!Et(e)?`/${e}`:e.length>0?e:"."};function oi(t,e){let r="",i=0,n=-1,s=0,a=null;for(let o=0;o<=t.length;++o){if(o<t.length)a=t[o];else{if(a==="/")break;a="/"}if(a==="/"){if(!(n===o-1||s===1))if(s===2){if(r.length<2||i!==2||r[r.length-1]!=="."||r[r.length-2]!=="."){if(r.length>2){const u=r.lastIndexOf("/");u===-1?(r="",i=0):(r=r.slice(0,u),i=r.length-1-r.lastIndexOf("/")),n=o,s=0;continue}else if(r.length!==0){r="",i=0,n=o,s=0;continue}}e&&(r+=r.length>0?"/..":"..",i=2)}else r.length>0?r+=`/${t.slice(n+1,o)}`:r=t.slice(n+1,o),i=o-n-1;n=o,s=0}else a==="."&&s!==-1?++s:s=-1}return r}const Et=function(t){return sp.test(t)},up=function(t){return xe(t)},lp=function(t){return te.posix.extname(xe(t))},Ds=function(t,e){return te.posix.relative(xe(t),xe(e))},xt=function(t){return te.posix.dirname(xe(t))},cp=function(t){return xe(te.posix.format(t))},hp=function(t,e){return te.posix.basename(xe(t),e)},fp=function(t){return te.posix.parse(xe(t))},pp=Object.freeze({__proto__:null,sep:ap,delimiter:op,normalize:Os,join:Xt,resolve:Ls,normalizeString:oi,isAbsolute:Et,toNamespacedPath:up,extname:lp,relative:Ds,dirname:xt,format:cp,basename:hp,parse:fp});({...pp});class dp{constructor(e){Sr(this,"value");Sr(this,"next");this.value=e}}class mp{constructor(){Ft(this,Pe,void 0);Ft(this,tt,void 0);Ft(this,rt,void 0);this.clear()}enqueue(e){const r=new dp(e);Ne(this,Pe)?(Ne(this,tt).next=r,Ce(this,tt,r)):(Ce(this,Pe,r),Ce(this,tt,r)),Er(this,rt)._++}dequeue(){const e=Ne(this,Pe);if(!!e)return Ce(this,Pe,Ne(this,Pe).next),Er(this,rt)._--,e.value}clear(){Ce(this,Pe,void 0),Ce(this,tt,void 0),Ce(this,rt,0)}get size(){return Ne(this,rt)}*[Symbol.iterator](){let e=Ne(this,Pe);for(;e;)yield e.value,e=e.next}}Pe=new WeakMap,tt=new WeakMap,rt=new WeakMap;function Is(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");const e=new mp;let r=0;const i=()=>{r--,e.size>0&&e.dequeue()()},n=async(o,u,l)=>{r++;const c=(async()=>o(...l))();u(c);try{await c}catch{}i()},s=(o,u,l)=>{e.enqueue(n.bind(void 0,o,u,l)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},a=(o,...u)=>new Promise(l=>{s(o,l,u)});return Object.defineProperties(a,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),a}class Fs extends Error{constructor(e){super();this.value=e}}const gp=async(t,e)=>e(await t),yp=async t=>{const e=await Promise.all(t);if(e[1]===!0)throw new Fs(e[0]);return!1};async function vp(t,e,{concurrency:r=Number.POSITIVE_INFINITY,preserveOrder:i=!0}={}){const n=Is(r),s=[...t].map(o=>[o,n(gp,o,e)]),a=Is(i?1:Number.POSITIVE_INFINITY);try{await Promise.all(s.map(o=>a(yp,o)))}catch(o){if(o instanceof Fs)return o.value;throw o}}const Ms={directory:"isDirectory",file:"isFile"};function bp(t){if(!(t in Ms))throw new Error(`Invalid type specified: ${t}`)}const wp=(t,e)=>t===void 0||e[Ms[t]]();async function Ns(t,{cwd:e=Eo.cwd(),type:r="file",allowSymlinks:i=!0,concurrency:n,preserveOrder:s}={}){bp(r);const a=i?pn.stat:pn.lstat;return vp(t,async o=>{try{const u=await a(it.resolve(e,o));return wp(r,u)}catch{return!1}},{concurrency:n,preserveOrder:s})}const _p=Symbol("findUpStop");async function Sp(t,e={}){let r=it.resolve(e.cwd||"");const{root:i}=it.parse(r),n=it.resolve(r,e.stopAt||i),s=e.limit||Number.POSITIVE_INFINITY,a=[t].flat(),o=async l=>{if(typeof t!="function")return Ns(a,l);const c=await t(l.cwd);return typeof c=="string"?Ns([c],l):c},u=[];for(;;){const l=await o({...e,cwd:r});if(l===_p||(l&&u.push(it.resolve(r,l)),r===n||u.length>=s))break;r=it.dirname(r)}return u}async function ui(t,e={}){return(await Sp(t,{...e,limit:1}))[0]}var ne={},W={},ht={};Object.defineProperty(ht,"__esModule",{value:!0}),ht.splitWhen=ht.flatten=void 0;function Ep(t){return t.reduce((e,r)=>[].concat(e,r),[])}ht.flatten=Ep;function xp(t,e){const r=[[]];let i=0;for(const n of t)e(n)?(i++,r[i]=[]):r[i].push(n);return r}ht.splitWhen=xp;var Zt={};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.isEnoentCodeError=void 0;function Rp(t){return t.code==="ENOENT"}Zt.isEnoentCodeError=Rp;var Jt={};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.createDirentFromStats=void 0;class Ap{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function Tp(t,e){return new Ap(t,e)}Jt.createDirentFromStats=Tp;var Re={};Object.defineProperty(Re,"__esModule",{value:!0}),Re.removeLeadingDotSegment=Re.escape=Re.makeAbsolute=Re.unixify=void 0;const $p=te,Pp=2,Cp=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function kp(t){return t.replace(/\\/g,"/")}Re.unixify=kp;function Op(t,e){return $p.resolve(t,e)}Re.makeAbsolute=Op;function Lp(t){return t.replace(Cp,"\\$2")}Re.escape=Lp;function Dp(t){if(t.charAt(0)==="."){const e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(Pp)}return t}Re.removeLeadingDotSegment=Dp;var P={};/*!
71
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
72
+ *
73
+ * Copyright (c) 2014-2016, Jon Schlinkert.
74
+ * Licensed under the MIT License.
75
+ */var Ip=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1};/*!
76
+ * is-glob <https://github.com/jonschlinkert/is-glob>
77
+ *
78
+ * Copyright (c) 2014-2017, Jon Schlinkert.
79
+ * Released under the MIT License.
80
+ */var Fp=Ip,Hs={"{":"}","(":")","[":"]"},Mp=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,i=-2,n=-2,s=-2,a=-2;e<t.length;){if(t[e]==="*"||t[e+1]==="?"&&/[\].+)]/.test(t[e])||i!==-1&&t[e]==="["&&t[e+1]!=="]"&&(i<e&&(i=t.indexOf("]",e)),i>e&&(a===-1||a>i||(a=t.indexOf("\\",e),a===-1||a>i)))||n!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(n=t.indexOf("}",e),n>e&&(a=t.indexOf("\\",e),a===-1||a>n))||s!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(s=t.indexOf(")",e),s>e&&(a=t.indexOf("\\",e),a===-1||a>s))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(r<e&&(r=t.indexOf("|",e)),r!==-1&&t[r+1]!==")"&&(s=t.indexOf(")",r),s>r&&(a=t.indexOf("\\",r),a===-1||a>s))))return!0;if(t[e]==="\\"){var o=t[e+1];e+=2;var u=Hs[o];if(u){var l=t.indexOf(u,e);l!==-1&&(e=l+1)}if(t[e]==="!")return!0}else e++}return!1},Np=function(t){if(t[0]==="!")return!0;for(var e=0;e<t.length;){if(/[*?{}()[\]]/.test(t[e]))return!0;if(t[e]==="\\"){var r=t[e+1];e+=2;var i=Hs[r];if(i){var n=t.indexOf(i,e);n!==-1&&(e=n+1)}if(t[e]==="!")return!0}else e++}return!1},Hp=function(e,r){if(typeof e!="string"||e==="")return!1;if(Fp(e))return!0;var i=Mp;return r&&r.strict===!1&&(i=Np),i(e)},Bp=Hp,jp=te.posix.dirname,qp=dn.platform()==="win32",li="/",Up=/\\/g,Vp=/[\{\[].*[\}\]]$/,zp=/(^|[^\\])([\{\[]|\([^\)]+$)/,Gp=/\\([\!\*\?\|\[\]\(\)\{\}])/g,Wp=function(e,r){var i=Object.assign({flipBackslashes:!0},r);i.flipBackslashes&&qp&&e.indexOf(li)<0&&(e=e.replace(Up,li)),Vp.test(e)&&(e+=li),e+="a";do e=jp(e);while(Bp(e)||zp.test(e));return e.replace(Gp,"$1")},er={};(function(t){t.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1,t.find=(e,r)=>e.nodes.find(i=>i.type===r),t.exceedsLimit=(e,r,i=1,n)=>n===!1||!t.isInteger(e)||!t.isInteger(r)?!1:(Number(r)-Number(e))/Number(i)>=n,t.escapeNode=(e,r=0,i)=>{let n=e.nodes[r];!n||(i&&n.type===i||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)},t.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1,t.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1,t.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0,t.reduce=e=>e.reduce((r,i)=>(i.type==="text"&&r.push(i.value),i.type==="range"&&(i.type="text"),r),[]),t.flatten=(...e)=>{const r=[],i=n=>{for(let s=0;s<n.length;s++){let a=n[s];Array.isArray(a)?i(a):a!==void 0&&r.push(a)}return r};return i(e),r}})(er);const Bs=er;var ci=(t,e={})=>{let r=(i,n={})=>{let s=e.escapeInvalid&&Bs.isInvalidBrace(n),a=i.invalid===!0&&e.escapeInvalid===!0,o="";if(i.value)return(s||a)&&Bs.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(let u of i.nodes)o+=r(u);return o};return r(t)};/*!
81
+ * is-number <https://github.com/jonschlinkert/is-number>
82
+ *
83
+ * Copyright (c) 2014-present, Jon Schlinkert.
84
+ * Released under the MIT License.
85
+ */var Qp=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1};/*!
86
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
87
+ *
88
+ * Copyright (c) 2015-present, Jon Schlinkert.
89
+ * Released under the MIT License.
90
+ */const js=Qp,Xe=(t,e,r)=>{if(js(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(js(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let i={relaxZeros:!0,...r};typeof i.strictZeros=="boolean"&&(i.relaxZeros=i.strictZeros===!1);let n=String(i.relaxZeros),s=String(i.shorthand),a=String(i.capture),o=String(i.wrap),u=t+":"+e+"="+n+s+a+o;if(Xe.cache.hasOwnProperty(u))return Xe.cache[u].result;let l=Math.min(t,e),c=Math.max(t,e);if(Math.abs(l-c)===1){let m=t+"|"+e;return i.capture?`(${m})`:i.wrap===!1?m:`(?:${m})`}let f=Ws(t)||Ws(e),h={min:t,max:e,a:l,b:c},d=[],p=[];if(f&&(h.isPadded=f,h.maxLen=String(h.max).length),l<0){let m=c<0?Math.abs(c):1;p=qs(m,Math.abs(l),h,i),l=h.a=0}return c>=0&&(d=qs(l,c,h,i)),h.negatives=p,h.positives=d,h.result=Yp(p,d),i.capture===!0?h.result=`(${h.result})`:i.wrap!==!1&&d.length+p.length>1&&(h.result=`(?:${h.result})`),Xe.cache[u]=h,h.result};function Yp(t,e,r){let i=hi(t,e,"-",!1)||[],n=hi(e,t,"",!1)||[],s=hi(t,e,"-?",!0)||[];return i.concat(s).concat(n).join("|")}function Kp(t,e){let r=1,i=1,n=Vs(t,r),s=new Set([e]);for(;t<=n&&n<=e;)s.add(n),r+=1,n=Vs(t,r);for(n=zs(e+1,i)-1;t<n&&n<=e;)s.add(n),i+=1,n=zs(e+1,i)-1;return s=[...s],s.sort(Jp),s}function Xp(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let i=Zp(t,e),n=i.length,s="",a=0;for(let o=0;o<n;o++){let[u,l]=i[o];u===l?s+=u:u!=="0"||l!=="9"?s+=ed(u,l):a++}return a&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[a],digits:n}}function qs(t,e,r,i){let n=Kp(t,e),s=[],a=t,o;for(let u=0;u<n.length;u++){let l=n[u],c=Xp(String(a),String(l),i),f="";if(!r.isPadded&&o&&o.pattern===c.pattern){o.count.length>1&&o.count.pop(),o.count.push(c.count[0]),o.string=o.pattern+Gs(o.count),a=l+1;continue}r.isPadded&&(f=td(l,r,i)),c.string=f+c.pattern+Gs(c.count),s.push(c),a=l+1,o=c}return s}function hi(t,e,r,i,n){let s=[];for(let a of t){let{string:o}=a;!i&&!Us(e,"string",o)&&s.push(r+o),i&&Us(e,"string",o)&&s.push(r+o)}return s}function Zp(t,e){let r=[];for(let i=0;i<t.length;i++)r.push([t[i],e[i]]);return r}function Jp(t,e){return t>e?1:e>t?-1:0}function Us(t,e,r){return t.some(i=>i[e]===r)}function Vs(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function zs(t,e){return t-t%Math.pow(10,e)}function Gs(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function ed(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function Ws(t){return/^-?(0+)\d/.test(t)}function td(t,e,r){if(!e.isPadded)return t;let i=Math.abs(e.maxLen-String(t).length),n=r.relaxZeros!==!1;switch(i){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${i}}`:`0{${i}}`}}Xe.cache={},Xe.clearCache=()=>Xe.cache={};var rd=Xe;/*!
91
+ * fill-range <https://github.com/jonschlinkert/fill-range>
92
+ *
93
+ * Copyright (c) 2014-present, Jon Schlinkert.
94
+ * Licensed under the MIT License.
95
+ */const id=mn,Qs=rd,Ys=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),nd=t=>e=>t===!0?Number(e):String(e),fi=t=>typeof t=="number"||typeof t=="string"&&t!=="",Rt=t=>Number.isInteger(+t),pi=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},sd=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,ad=(t,e,r)=>{if(e>0){let i=t[0]==="-"?"-":"";i&&(t=t.slice(1)),t=i+t.padStart(i?e-1:e,"0")}return r===!1?String(t):t},Ks=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length<e;)t="0"+t;return r?"-"+t:t},od=(t,e)=>{t.negatives.sort((a,o)=>a<o?-1:a>o?1:0),t.positives.sort((a,o)=>a<o?-1:a>o?1:0);let r=e.capture?"":"?:",i="",n="",s;return t.positives.length&&(i=t.positives.join("|")),t.negatives.length&&(n=`-(${r}${t.negatives.join("|")})`),i&&n?s=`${i}|${n}`:s=i||n,e.wrap?`(${r}${s})`:s},Xs=(t,e,r,i)=>{if(r)return Qs(t,e,{wrap:!1,...i});let n=String.fromCharCode(t);if(t===e)return n;let s=String.fromCharCode(e);return`[${n}-${s}]`},Zs=(t,e,r)=>{if(Array.isArray(t)){let i=r.wrap===!0,n=r.capture?"":"?:";return i?`(${n}${t.join("|")})`:t.join("|")}return Qs(t,e,r)},Js=(...t)=>new RangeError("Invalid range arguments: "+id.inspect(...t)),ea=(t,e,r)=>{if(r.strictRanges===!0)throw Js([t,e]);return[]},ud=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},ld=(t,e,r=1,i={})=>{let n=Number(t),s=Number(e);if(!Number.isInteger(n)||!Number.isInteger(s)){if(i.strictRanges===!0)throw Js([t,e]);return[]}n===0&&(n=0),s===0&&(s=0);let a=n>s,o=String(t),u=String(e),l=String(r);r=Math.max(Math.abs(r),1);let c=pi(o)||pi(u)||pi(l),f=c?Math.max(o.length,u.length,l.length):0,h=c===!1&&sd(t,e,i)===!1,d=i.transform||nd(h);if(i.toRegex&&r===1)return Xs(Ks(t,f),Ks(e,f),!0,i);let p={negatives:[],positives:[]},m=R=>p[R<0?"negatives":"positives"].push(Math.abs(R)),w=[],b=0;for(;a?n>=s:n<=s;)i.toRegex===!0&&r>1?m(n):w.push(ad(d(n,b),f,h)),n=a?n-r:n+r,b++;return i.toRegex===!0?r>1?od(p,i):Zs(w,null,{wrap:!1,...i}):w},cd=(t,e,r=1,i={})=>{if(!Rt(t)&&t.length>1||!Rt(e)&&e.length>1)return ea(t,e,i);let n=i.transform||(h=>String.fromCharCode(h)),s=`${t}`.charCodeAt(0),a=`${e}`.charCodeAt(0),o=s>a,u=Math.min(s,a),l=Math.max(s,a);if(i.toRegex&&r===1)return Xs(u,l,!1,i);let c=[],f=0;for(;o?s>=a:s<=a;)c.push(n(s,f)),s=o?s-r:s+r,f++;return i.toRegex===!0?Zs(c,null,{wrap:!1,options:i}):c},tr=(t,e,r,i={})=>{if(e==null&&fi(t))return[t];if(!fi(t)||!fi(e))return ea(t,e,i);if(typeof r=="function")return tr(t,e,1,{transform:r});if(Ys(r))return tr(t,e,0,r);let n={...i};return n.capture===!0&&(n.wrap=!0),r=r||n.step||1,Rt(r)?Rt(t)&&Rt(e)?ld(t,e,r,n):cd(t,e,Math.max(Math.abs(r),1),n):r!=null&&!Ys(r)?ud(r,n):tr(t,e,1,r)};var ta=tr;const hd=ta,ra=er,fd=(t,e={})=>{let r=(i,n={})=>{let s=ra.isInvalidBrace(n),a=i.invalid===!0&&e.escapeInvalid===!0,o=s===!0||a===!0,u=e.escapeInvalid===!0?"\\":"",l="";if(i.isOpen===!0||i.isClose===!0)return u+i.value;if(i.type==="open")return o?u+i.value:"(";if(i.type==="close")return o?u+i.value:")";if(i.type==="comma")return i.prev.type==="comma"?"":o?i.value:"|";if(i.value)return i.value;if(i.nodes&&i.ranges>0){let c=ra.reduce(i.nodes),f=hd(...c,{...e,wrap:!1,toRegex:!0});if(f.length!==0)return c.length>1&&f.length>1?`(${f})`:f}if(i.nodes)for(let c of i.nodes)l+=r(c,i);return l};return r(t)};var pd=fd;const dd=ta,ia=ci,ft=er,Ze=(t="",e="",r=!1)=>{let i=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?ft.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let s of n)i.push(Ze(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),i.push(Array.isArray(s)?Ze(n,s,r):n+s);return ft.flatten(i)},md=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,i=(n,s={})=>{n.queue=[];let a=s,o=s.queue;for(;a.type!=="brace"&&a.type!=="root"&&a.parent;)a=a.parent,o=a.queue;if(n.invalid||n.dollar){o.push(Ze(o.pop(),ia(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){o.push(Ze(o.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let f=ft.reduce(n.nodes);if(ft.exceedsLimit(...f,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let h=dd(...f,e);h.length===0&&(h=ia(n,e)),o.push(Ze(o.pop(),h)),n.nodes=[];return}let u=ft.encloseBrace(n),l=n.queue,c=n;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,l=c.queue;for(let f=0;f<n.nodes.length;f++){let h=n.nodes[f];if(h.type==="comma"&&n.type==="brace"){f===1&&l.push(""),l.push("");continue}if(h.type==="close"){o.push(Ze(o.pop(),l,u));continue}if(h.value&&h.type!=="open"){l.push(Ze(l.pop(),h.value));continue}h.nodes&&i(h,n)}return l};return ft.flatten(i(t))};var gd=md,yd={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
96
+ `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const vd=ci,{MAX_LENGTH:na,CHAR_BACKSLASH:di,CHAR_BACKTICK:bd,CHAR_COMMA:wd,CHAR_DOT:_d,CHAR_LEFT_PARENTHESES:Sd,CHAR_RIGHT_PARENTHESES:Ed,CHAR_LEFT_CURLY_BRACE:xd,CHAR_RIGHT_CURLY_BRACE:Rd,CHAR_LEFT_SQUARE_BRACKET:sa,CHAR_RIGHT_SQUARE_BRACKET:aa,CHAR_DOUBLE_QUOTE:Ad,CHAR_SINGLE_QUOTE:Td,CHAR_NO_BREAK_SPACE:$d,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Pd}=yd,Cd=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},i=typeof r.maxLength=="number"?Math.min(na,r.maxLength):na;if(t.length>i)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${i})`);let n={type:"root",input:t,nodes:[]},s=[n],a=n,o=n,u=0,l=t.length,c=0,f=0,h;const d=()=>t[c++],p=m=>{if(m.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&m.type==="text"){o.value+=m.value;return}return a.nodes.push(m),m.parent=a,m.prev=o,o=m,m};for(p({type:"bos"});c<l;)if(a=s[s.length-1],h=d(),!(h===Pd||h===$d)){if(h===di){p({type:"text",value:(e.keepEscaping?h:"")+d()});continue}if(h===aa){p({type:"text",value:"\\"+h});continue}if(h===sa){u++;let m;for(;c<l&&(m=d());){if(h+=m,m===sa){u++;continue}if(m===di){h+=d();continue}if(m===aa&&(u--,u===0))break}p({type:"text",value:h});continue}if(h===Sd){a=p({type:"paren",nodes:[]}),s.push(a),p({type:"text",value:h});continue}if(h===Ed){if(a.type!=="paren"){p({type:"text",value:h});continue}a=s.pop(),p({type:"text",value:h}),a=s[s.length-1];continue}if(h===Ad||h===Td||h===bd){let m=h,w;for(e.keepQuotes!==!0&&(h="");c<l&&(w=d());){if(w===di){h+=w+d();continue}if(w===m){e.keepQuotes===!0&&(h+=w);break}h+=w}p({type:"text",value:h});continue}if(h===xd){f++;let m=o.value&&o.value.slice(-1)==="$"||a.dollar===!0;a=p({type:"brace",open:!0,close:!1,dollar:m,depth:f,commas:0,ranges:0,nodes:[]}),s.push(a),p({type:"open",value:h});continue}if(h===Rd){if(a.type!=="brace"){p({type:"text",value:h});continue}let m="close";a=s.pop(),a.close=!0,p({type:m,value:h}),f--,a=s[s.length-1];continue}if(h===wd&&f>0){if(a.ranges>0){a.ranges=0;let m=a.nodes.shift();a.nodes=[m,{type:"text",value:vd(a)}]}p({type:"comma",value:h}),a.commas++;continue}if(h===_d&&f>0&&a.commas===0){let m=a.nodes;if(f===0||m.length===0){p({type:"text",value:h});continue}if(o.type==="dot"){if(a.range=[],o.value+=h,o.type="range",a.nodes.length!==3&&a.nodes.length!==5){a.invalid=!0,a.ranges=0,o.type="text";continue}a.ranges++,a.args=[];continue}if(o.type==="range"){m.pop();let w=m[m.length-1];w.value+=o.value+h,o=w,a.ranges--;continue}p({type:"dot",value:h});continue}p({type:"text",value:h})}do if(a=s.pop(),a.type!=="root"){a.nodes.forEach(b=>{b.nodes||(b.type==="open"&&(b.isOpen=!0),b.type==="close"&&(b.isClose=!0),b.nodes||(b.type="text"),b.invalid=!0)});let m=s[s.length-1],w=m.nodes.indexOf(a);m.nodes.splice(w,1,...a.nodes)}while(s.length>0);return p({type:"eos"}),n};var kd=Cd;const oa=ci,Od=pd,Ld=gd,Dd=kd,fe=(t,e={})=>{let r=[];if(Array.isArray(t))for(let i of t){let n=fe.create(i,e);Array.isArray(n)?r.push(...n):r.push(n)}else r=[].concat(fe.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};fe.parse=(t,e={})=>Dd(t,e),fe.stringify=(t,e={})=>oa(typeof t=="string"?fe.parse(t,e):t,e),fe.compile=(t,e={})=>(typeof t=="string"&&(t=fe.parse(t,e)),Od(t,e)),fe.expand=(t,e={})=>{typeof t=="string"&&(t=fe.parse(t,e));let r=Ld(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r},fe.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?fe.compile(t,e):fe.expand(t,e);var Id=fe,At={};const Fd=te,Ae="\\\\/",ua=`[^${Ae}]`,Ie="\\.",Md="\\+",Nd="\\?",rr="\\/",Hd="(?=.)",la="[^/]",mi=`(?:${rr}|$)`,ca=`(?:^|${rr})`,gi=`${Ie}{1,2}${mi}`,Bd=`(?!${Ie})`,jd=`(?!${ca}${gi})`,qd=`(?!${Ie}{0,1}${mi})`,Ud=`(?!${gi})`,Vd=`[^.${rr}]`,zd=`${la}*?`,ha={DOT_LITERAL:Ie,PLUS_LITERAL:Md,QMARK_LITERAL:Nd,SLASH_LITERAL:rr,ONE_CHAR:Hd,QMARK:la,END_ANCHOR:mi,DOTS_SLASH:gi,NO_DOT:Bd,NO_DOTS:jd,NO_DOT_SLASH:qd,NO_DOTS_SLASH:Ud,QMARK_NO_DOT:Vd,STAR:zd,START_ANCHOR:ca},Gd={...ha,SLASH_LITERAL:`[${Ae}]`,QMARK:ua,STAR:`${ua}*?`,DOTS_SLASH:`${Ie}{1,2}(?:[${Ae}]|$)`,NO_DOT:`(?!${Ie})`,NO_DOTS:`(?!(?:^|[${Ae}])${Ie}{1,2}(?:[${Ae}]|$))`,NO_DOT_SLASH:`(?!${Ie}{0,1}(?:[${Ae}]|$))`,NO_DOTS_SLASH:`(?!${Ie}{1,2}(?:[${Ae}]|$))`,QMARK_NO_DOT:`[^.${Ae}]`,START_ANCHOR:`(?:^|[${Ae}])`,END_ANCHOR:`(?:[${Ae}]|$)`},Wd={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"};var ir={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Wd,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:Fd.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===!0?Gd:ha}};(function(t){const e=te,r=process.platform==="win32",{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:a}=ir;t.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),t.hasRegexChars=o=>s.test(o),t.isRegexChar=o=>o.length===1&&t.hasRegexChars(o),t.escapeRegex=o=>o.replace(a,"\\$1"),t.toPosixSlashes=o=>o.replace(i,"/"),t.removeBackslashes=o=>o.replace(n,u=>u==="\\"?"":u),t.supportsLookbehinds=()=>{const o=process.version.slice(1).split(".").map(Number);return o.length===3&&o[0]>=9||o[0]===8&&o[1]>=10},t.isWindows=o=>o&&typeof o.windows=="boolean"?o.windows:r===!0||e.sep==="\\",t.escapeLast=(o,u,l)=>{const c=o.lastIndexOf(u,l);return c===-1?o:o[c-1]==="\\"?t.escapeLast(o,u,c-1):`${o.slice(0,c)}\\${o.slice(c)}`},t.removePrefix=(o,u={})=>{let l=o;return l.startsWith("./")&&(l=l.slice(2),u.prefix="./"),l},t.wrapOutput=(o,u={},l={})=>{const c=l.contains?"":"^",f=l.contains?"":"$";let h=`${c}(?:${o})${f}`;return u.negated===!0&&(h=`(?:^(?!${h}).*$)`),h}})(At);const fa=At,{CHAR_ASTERISK:yi,CHAR_AT:Qd,CHAR_BACKWARD_SLASH:Tt,CHAR_COMMA:Yd,CHAR_DOT:vi,CHAR_EXCLAMATION_MARK:bi,CHAR_FORWARD_SLASH:pa,CHAR_LEFT_CURLY_BRACE:wi,CHAR_LEFT_PARENTHESES:_i,CHAR_LEFT_SQUARE_BRACKET:Kd,CHAR_PLUS:Xd,CHAR_QUESTION_MARK:da,CHAR_RIGHT_CURLY_BRACE:Zd,CHAR_RIGHT_PARENTHESES:ma,CHAR_RIGHT_SQUARE_BRACKET:Jd}=ir,ga=t=>t===pa||t===Tt,ya=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},em=(t,e)=>{const r=e||{},i=t.length-1,n=r.parts===!0||r.scanToEnd===!0,s=[],a=[],o=[];let u=t,l=-1,c=0,f=0,h=!1,d=!1,p=!1,m=!1,w=!1,b=!1,R=!1,_=!1,$=!1,E=!1,T=0,C,A,D={value:"",depth:0,isGlob:!1};const H=()=>l>=i,v=()=>u.charCodeAt(l+1),q=()=>(C=A,u.charCodeAt(++l));for(;l<i;){A=q();let se;if(A===Tt){R=D.backslashes=!0,A=q(),A===wi&&(b=!0);continue}if(b===!0||A===wi){for(T++;H()!==!0&&(A=q());){if(A===Tt){R=D.backslashes=!0,q();continue}if(A===wi){T++;continue}if(b!==!0&&A===vi&&(A=q())===vi){if(h=D.isBrace=!0,p=D.isGlob=!0,E=!0,n===!0)continue;break}if(b!==!0&&A===Yd){if(h=D.isBrace=!0,p=D.isGlob=!0,E=!0,n===!0)continue;break}if(A===Zd&&(T--,T===0)){b=!1,h=D.isBrace=!0,E=!0;break}}if(n===!0)continue;break}if(A===pa){if(s.push(l),a.push(D),D={value:"",depth:0,isGlob:!1},E===!0)continue;if(C===vi&&l===c+1){c+=2;continue}f=l+1;continue}if(r.noext!==!0&&(A===Xd||A===Qd||A===yi||A===da||A===bi)===!0&&v()===_i){if(p=D.isGlob=!0,m=D.isExtglob=!0,E=!0,A===bi&&l===c&&($=!0),n===!0){for(;H()!==!0&&(A=q());){if(A===Tt){R=D.backslashes=!0,A=q();continue}if(A===ma){p=D.isGlob=!0,E=!0;break}}continue}break}if(A===yi){if(C===yi&&(w=D.isGlobstar=!0),p=D.isGlob=!0,E=!0,n===!0)continue;break}if(A===da){if(p=D.isGlob=!0,E=!0,n===!0)continue;break}if(A===Kd){for(;H()!==!0&&(se=q());){if(se===Tt){R=D.backslashes=!0,q();continue}if(se===Jd){d=D.isBracket=!0,p=D.isGlob=!0,E=!0;break}}if(n===!0)continue;break}if(r.nonegate!==!0&&A===bi&&l===c){_=D.negated=!0,c++;continue}if(r.noparen!==!0&&A===_i){if(p=D.isGlob=!0,n===!0){for(;H()!==!0&&(A=q());){if(A===_i){R=D.backslashes=!0,A=q();continue}if(A===ma){E=!0;break}}continue}break}if(p===!0){if(E=!0,n===!0)continue;break}}r.noext===!0&&(m=!1,p=!1);let B=u,Me="",g="";c>0&&(Me=u.slice(0,c),u=u.slice(c),f-=c),B&&p===!0&&f>0?(B=u.slice(0,f),g=u.slice(f)):p===!0?(B="",g=u):B=u,B&&B!==""&&B!=="/"&&B!==u&&ga(B.charCodeAt(B.length-1))&&(B=B.slice(0,-1)),r.unescape===!0&&(g&&(g=fa.removeBackslashes(g)),B&&R===!0&&(B=fa.removeBackslashes(B)));const y={prefix:Me,input:t,start:c,base:B,glob:g,isBrace:h,isBracket:d,isGlob:p,isExtglob:m,isGlobstar:w,negated:_,negatedExtglob:$};if(r.tokens===!0&&(y.maxDepth=0,ga(A)||a.push(D),y.tokens=a),r.parts===!0||r.tokens===!0){let se;for(let I=0;I<s.length;I++){const Se=se?se+1:c,Ee=s[I],ce=t.slice(Se,Ee);r.tokens&&(I===0&&c!==0?(a[I].isPrefix=!0,a[I].value=Me):a[I].value=ce,ya(a[I]),y.maxDepth+=a[I].depth),(I!==0||ce!=="")&&o.push(ce),se=Ee}if(se&&se+1<t.length){const I=t.slice(se+1);o.push(I),r.tokens&&(a[a.length-1].value=I,ya(a[a.length-1]),y.maxDepth+=a[a.length-1].depth)}y.slashes=s,y.parts=o}return y};var tm=em;const nr=ir,pe=At,{MAX_LENGTH:sr,POSIX_REGEX_SOURCE:rm,REGEX_NON_SPECIAL_CHARS:im,REGEX_SPECIAL_CHARS_BACKREF:nm,REPLACEMENTS:va}=nr,sm=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(n=>pe.escapeRegex(n)).join("..")}return r},pt=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Si=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=va[t]||t;const r={...e},i=typeof r.maxLength=="number"?Math.min(sr,r.maxLength):sr;let n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);const s={type:"bos",value:"",output:r.prepend||""},a=[s],o=r.capture?"":"?:",u=pe.isWindows(e),l=nr.globChars(u),c=nr.extglobChars(l),{DOT_LITERAL:f,PLUS_LITERAL:h,SLASH_LITERAL:d,ONE_CHAR:p,DOTS_SLASH:m,NO_DOT:w,NO_DOT_SLASH:b,NO_DOTS_SLASH:R,QMARK:_,QMARK_NO_DOT:$,STAR:E,START_ANCHOR:T}=l,C=x=>`(${o}(?:(?!${T}${x.dot?m:f}).)*?)`,A=r.dot?"":w,D=r.dot?_:$;let H=r.bash===!0?C(r):E;r.capture&&(H=`(${H})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);const v={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:a};t=pe.removePrefix(t,v),n=t.length;const q=[],B=[],Me=[];let g=s,y;const se=()=>v.index===n-1,I=v.peek=(x=1)=>t[v.index+x],Se=v.advance=()=>t[++v.index]||"",Ee=()=>t.slice(v.index+1),ce=(x="",j=0)=>{v.consumed+=x,v.index+=j},Ot=x=>{v.output+=x.output!=null?x.output:x.value,ce(x.value)},lo=()=>{let x=1;for(;I()==="!"&&(I(2)!=="("||I(3)==="?");)Se(),v.start++,x++;return x%2===0?!1:(v.negated=!0,v.start++,!0)},Lt=x=>{v[x]++,Me.push(x)},Ve=x=>{v[x]--,Me.pop()},O=x=>{if(g.type==="globstar"){const j=v.braces>0&&(x.type==="comma"||x.type==="brace"),S=x.extglob===!0||q.length&&(x.type==="pipe"||x.type==="paren");x.type!=="slash"&&x.type!=="paren"&&!j&&!S&&(v.output=v.output.slice(0,-g.output.length),g.type="star",g.value="*",g.output=H,v.output+=g.output)}if(q.length&&x.type!=="paren"&&(q[q.length-1].inner+=x.value),(x.value||x.output)&&Ot(x),g&&g.type==="text"&&x.type==="text"){g.value+=x.value,g.output=(g.output||"")+x.value;return}x.prev=g,a.push(x),g=x},Dt=(x,j)=>{const S={...c[j],conditions:1,inner:""};S.prev=g,S.parens=v.parens,S.output=v.output;const k=(r.capture?"(":"")+S.open;Lt("parens"),O({type:x,value:j,output:v.output?"":p}),O({type:"paren",extglob:!0,value:Se(),output:k}),q.push(S)},co=x=>{let j=x.close+(r.capture?")":""),S;if(x.type==="negate"){let k=H;if(x.inner&&x.inner.length>1&&x.inner.includes("/")&&(k=C(r)),(k!==H||se()||/^\)+$/.test(Ee()))&&(j=x.close=`)$))${k}`),x.inner.includes("*")&&(S=Ee())&&/^\.[^\\/.]+$/.test(S)){const G=Si(S,{...e,fastpaths:!1}).output;j=x.close=`)${G})${k})`}x.prev.type==="bos"&&(v.negatedExtglob=!0)}O({type:"paren",extglob:!0,value:y,output:j}),Ve("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let x=!1,j=t.replace(nm,(S,k,G,ae,K,_r)=>ae==="\\"?(x=!0,S):ae==="?"?k?k+ae+(K?_.repeat(K.length):""):_r===0?D+(K?_.repeat(K.length):""):_.repeat(G.length):ae==="."?f.repeat(G.length):ae==="*"?k?k+ae+(K?H:""):H:k?S:`\\${S}`);return x===!0&&(r.unescape===!0?j=j.replace(/\\/g,""):j=j.replace(/\\+/g,S=>S.length%2===0?"\\\\":S?"\\":"")),j===t&&r.contains===!0?(v.output=t,v):(v.output=pe.wrapOutput(j,v,e),v)}for(;!se();){if(y=Se(),y==="\0")continue;if(y==="\\"){const S=I();if(S==="/"&&r.bash!==!0||S==="."||S===";")continue;if(!S){y+="\\",O({type:"text",value:y});continue}const k=/^\\+/.exec(Ee());let G=0;if(k&&k[0].length>2&&(G=k[0].length,v.index+=G,G%2!==0&&(y+="\\")),r.unescape===!0?y=Se():y+=Se(),v.brackets===0){O({type:"text",value:y});continue}}if(v.brackets>0&&(y!=="]"||g.value==="["||g.value==="[^")){if(r.posix!==!1&&y===":"){const S=g.value.slice(1);if(S.includes("[")&&(g.posix=!0,S.includes(":"))){const k=g.value.lastIndexOf("["),G=g.value.slice(0,k),ae=g.value.slice(k+2),K=rm[ae];if(K){g.value=G+K,v.backtrack=!0,Se(),!s.output&&a.indexOf(g)===1&&(s.output=p);continue}}}(y==="["&&I()!==":"||y==="-"&&I()==="]")&&(y=`\\${y}`),y==="]"&&(g.value==="["||g.value==="[^")&&(y=`\\${y}`),r.posix===!0&&y==="!"&&g.value==="["&&(y="^"),g.value+=y,Ot({value:y});continue}if(v.quotes===1&&y!=='"'){y=pe.escapeRegex(y),g.value+=y,Ot({value:y});continue}if(y==='"'){v.quotes=v.quotes===1?0:1,r.keepQuotes===!0&&O({type:"text",value:y});continue}if(y==="("){Lt("parens"),O({type:"paren",value:y});continue}if(y===")"){if(v.parens===0&&r.strictBrackets===!0)throw new SyntaxError(pt("opening","("));const S=q[q.length-1];if(S&&v.parens===S.parens+1){co(q.pop());continue}O({type:"paren",value:y,output:v.parens?")":"\\)"}),Ve("parens");continue}if(y==="["){if(r.nobracket===!0||!Ee().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(pt("closing","]"));y=`\\${y}`}else Lt("brackets");O({type:"bracket",value:y});continue}if(y==="]"){if(r.nobracket===!0||g&&g.type==="bracket"&&g.value.length===1){O({type:"text",value:y,output:`\\${y}`});continue}if(v.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(pt("opening","["));O({type:"text",value:y,output:`\\${y}`});continue}Ve("brackets");const S=g.value.slice(1);if(g.posix!==!0&&S[0]==="^"&&!S.includes("/")&&(y=`/${y}`),g.value+=y,Ot({value:y}),r.literalBrackets===!1||pe.hasRegexChars(S))continue;const k=pe.escapeRegex(g.value);if(v.output=v.output.slice(0,-g.value.length),r.literalBrackets===!0){v.output+=k,g.value=k;continue}g.value=`(${o}${k}|${g.value})`,v.output+=g.value;continue}if(y==="{"&&r.nobrace!==!0){Lt("braces");const S={type:"brace",value:y,output:"(",outputIndex:v.output.length,tokensIndex:v.tokens.length};B.push(S),O(S);continue}if(y==="}"){const S=B[B.length-1];if(r.nobrace===!0||!S){O({type:"text",value:y,output:y});continue}let k=")";if(S.dots===!0){const G=a.slice(),ae=[];for(let K=G.length-1;K>=0&&(a.pop(),G[K].type!=="brace");K--)G[K].type!=="dots"&&ae.unshift(G[K].value);k=sm(ae,r),v.backtrack=!0}if(S.comma!==!0&&S.dots!==!0){const G=v.output.slice(0,S.outputIndex),ae=v.tokens.slice(S.tokensIndex);S.value=S.output="\\{",y=k="\\}",v.output=G;for(const K of ae)v.output+=K.output||K.value}O({type:"brace",value:y,output:k}),Ve("braces"),B.pop();continue}if(y==="|"){q.length>0&&q[q.length-1].conditions++,O({type:"text",value:y});continue}if(y===","){let S=y;const k=B[B.length-1];k&&Me[Me.length-1]==="braces"&&(k.comma=!0,S="|"),O({type:"comma",value:y,output:S});continue}if(y==="/"){if(g.type==="dot"&&v.index===v.start+1){v.start=v.index+1,v.consumed="",v.output="",a.pop(),g=s;continue}O({type:"slash",value:y,output:d});continue}if(y==="."){if(v.braces>0&&g.type==="dot"){g.value==="."&&(g.output=f);const S=B[B.length-1];g.type="dots",g.output+=y,g.value+=y,S.dots=!0;continue}if(v.braces+v.parens===0&&g.type!=="bos"&&g.type!=="slash"){O({type:"text",value:y,output:f});continue}O({type:"dot",value:y,output:f});continue}if(y==="?"){if(!(g&&g.value==="(")&&r.noextglob!==!0&&I()==="("&&I(2)!=="?"){Dt("qmark",y);continue}if(g&&g.type==="paren"){const k=I();let G=y;if(k==="<"&&!pe.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(g.value==="("&&!/[!=<:]/.test(k)||k==="<"&&!/<([!=]|\w+>)/.test(Ee()))&&(G=`\\${y}`),O({type:"text",value:y,output:G});continue}if(r.dot!==!0&&(g.type==="slash"||g.type==="bos")){O({type:"qmark",value:y,output:$});continue}O({type:"qmark",value:y,output:_});continue}if(y==="!"){if(r.noextglob!==!0&&I()==="("&&(I(2)!=="?"||!/[!=<:]/.test(I(3)))){Dt("negate",y);continue}if(r.nonegate!==!0&&v.index===0){lo();continue}}if(y==="+"){if(r.noextglob!==!0&&I()==="("&&I(2)!=="?"){Dt("plus",y);continue}if(g&&g.value==="("||r.regex===!1){O({type:"plus",value:y,output:h});continue}if(g&&(g.type==="bracket"||g.type==="paren"||g.type==="brace")||v.parens>0){O({type:"plus",value:y});continue}O({type:"plus",value:h});continue}if(y==="@"){if(r.noextglob!==!0&&I()==="("&&I(2)!=="?"){O({type:"at",extglob:!0,value:y,output:""});continue}O({type:"text",value:y});continue}if(y!=="*"){(y==="$"||y==="^")&&(y=`\\${y}`);const S=im.exec(Ee());S&&(y+=S[0],v.index+=S[0].length),O({type:"text",value:y});continue}if(g&&(g.type==="globstar"||g.star===!0)){g.type="star",g.star=!0,g.value+=y,g.output=H,v.backtrack=!0,v.globstar=!0,ce(y);continue}let x=Ee();if(r.noextglob!==!0&&/^\([^?]/.test(x)){Dt("star",y);continue}if(g.type==="star"){if(r.noglobstar===!0){ce(y);continue}const S=g.prev,k=S.prev,G=S.type==="slash"||S.type==="bos",ae=k&&(k.type==="star"||k.type==="globstar");if(r.bash===!0&&(!G||x[0]&&x[0]!=="/")){O({type:"star",value:y,output:""});continue}const K=v.braces>0&&(S.type==="comma"||S.type==="brace"),_r=q.length&&(S.type==="pipe"||S.type==="paren");if(!G&&S.type!=="paren"&&!K&&!_r){O({type:"star",value:y,output:""});continue}for(;x.slice(0,3)==="/**";){const It=t[v.index+4];if(It&&It!=="/")break;x=x.slice(3),ce("/**",3)}if(S.type==="bos"&&se()){g.type="globstar",g.value+=y,g.output=C(r),v.output=g.output,v.globstar=!0,ce(y);continue}if(S.type==="slash"&&S.prev.type!=="bos"&&!ae&&se()){v.output=v.output.slice(0,-(S.output+g.output).length),S.output=`(?:${S.output}`,g.type="globstar",g.output=C(r)+(r.strictSlashes?")":"|$)"),g.value+=y,v.globstar=!0,v.output+=S.output+g.output,ce(y);continue}if(S.type==="slash"&&S.prev.type!=="bos"&&x[0]==="/"){const It=x[1]!==void 0?"|$":"";v.output=v.output.slice(0,-(S.output+g.output).length),S.output=`(?:${S.output}`,g.type="globstar",g.output=`${C(r)}${d}|${d}${It})`,g.value+=y,v.output+=S.output+g.output,v.globstar=!0,ce(y+Se()),O({type:"slash",value:"/",output:""});continue}if(S.type==="bos"&&x[0]==="/"){g.type="globstar",g.value+=y,g.output=`(?:^|${d}|${C(r)}${d})`,v.output=g.output,v.globstar=!0,ce(y+Se()),O({type:"slash",value:"/",output:""});continue}v.output=v.output.slice(0,-g.output.length),g.type="globstar",g.output=C(r),g.value+=y,v.output+=g.output,v.globstar=!0,ce(y);continue}const j={type:"star",value:y,output:H};if(r.bash===!0){j.output=".*?",(g.type==="bos"||g.type==="slash")&&(j.output=A+j.output),O(j);continue}if(g&&(g.type==="bracket"||g.type==="paren")&&r.regex===!0){j.output=y,O(j);continue}(v.index===v.start||g.type==="slash"||g.type==="dot")&&(g.type==="dot"?(v.output+=b,g.output+=b):r.dot===!0?(v.output+=R,g.output+=R):(v.output+=A,g.output+=A),I()!=="*"&&(v.output+=p,g.output+=p)),O(j)}for(;v.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(pt("closing","]"));v.output=pe.escapeLast(v.output,"["),Ve("brackets")}for(;v.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(pt("closing",")"));v.output=pe.escapeLast(v.output,"("),Ve("parens")}for(;v.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(pt("closing","}"));v.output=pe.escapeLast(v.output,"{"),Ve("braces")}if(r.strictSlashes!==!0&&(g.type==="star"||g.type==="bracket")&&O({type:"maybe_slash",value:"",output:`${d}?`}),v.backtrack===!0){v.output="";for(const x of v.tokens)v.output+=x.output!=null?x.output:x.value,x.suffix&&(v.output+=x.suffix)}return v};Si.fastpaths=(t,e)=>{const r={...e},i=typeof r.maxLength=="number"?Math.min(sr,r.maxLength):sr,n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);t=va[t]||t;const s=pe.isWindows(e),{DOT_LITERAL:a,SLASH_LITERAL:o,ONE_CHAR:u,DOTS_SLASH:l,NO_DOT:c,NO_DOTS:f,NO_DOTS_SLASH:h,STAR:d,START_ANCHOR:p}=nr.globChars(s),m=r.dot?f:c,w=r.dot?h:c,b=r.capture?"":"?:",R={negated:!1,prefix:""};let _=r.bash===!0?".*?":d;r.capture&&(_=`(${_})`);const $=A=>A.noglobstar===!0?_:`(${b}(?:(?!${p}${A.dot?l:a}).)*?)`,E=A=>{switch(A){case"*":return`${m}${u}${_}`;case".*":return`${a}${u}${_}`;case"*.*":return`${m}${_}${a}${u}${_}`;case"*/*":return`${m}${_}${o}${u}${w}${_}`;case"**":return m+$(r);case"**/*":return`(?:${m}${$(r)}${o})?${w}${u}${_}`;case"**/*.*":return`(?:${m}${$(r)}${o})?${w}${_}${a}${u}${_}`;case"**/.*":return`(?:${m}${$(r)}${o})?${a}${u}${_}`;default:{const D=/^(.*?)\.(\w+)$/.exec(A);if(!D)return;const H=E(D[1]);return H?H+a+D[2]:void 0}}},T=pe.removePrefix(t,R);let C=E(T);return C&&r.strictSlashes!==!0&&(C+=`${o}?`),C};var am=Si;const om=te,um=tm,Ei=am,xi=At,lm=ir,cm=t=>t&&typeof t=="object"&&!Array.isArray(t),Y=(t,e,r=!1)=>{if(Array.isArray(t)){const c=t.map(h=>Y(h,e,r));return h=>{for(const d of c){const p=d(h);if(p)return p}return!1}}const i=cm(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!i)throw new TypeError("Expected pattern to be a non-empty string");const n=e||{},s=xi.isWindows(e),a=i?Y.compileRe(t,e):Y.makeRe(t,e,!1,!0),o=a.state;delete a.state;let u=()=>!1;if(n.ignore){const c={...e,ignore:null,onMatch:null,onResult:null};u=Y(n.ignore,c,r)}const l=(c,f=!1)=>{const{isMatch:h,match:d,output:p}=Y.test(c,a,e,{glob:t,posix:s}),m={glob:t,state:o,regex:a,posix:s,input:c,output:p,match:d,isMatch:h};return typeof n.onResult=="function"&&n.onResult(m),h===!1?(m.isMatch=!1,f?m:!1):u(c)?(typeof n.onIgnore=="function"&&n.onIgnore(m),m.isMatch=!1,f?m:!1):(typeof n.onMatch=="function"&&n.onMatch(m),f?m:!0)};return r&&(l.state=o),l};Y.test=(t,e,r,{glob:i,posix:n}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};const s=r||{},a=s.format||(n?xi.toPosixSlashes:null);let o=t===i,u=o&&a?a(t):t;return o===!1&&(u=a?a(t):t,o=u===i),(o===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?o=Y.matchBase(t,e,r,n):o=e.exec(u)),{isMatch:Boolean(o),match:o,output:u}},Y.matchBase=(t,e,r,i=xi.isWindows(r))=>(e instanceof RegExp?e:Y.makeRe(e,r)).test(om.basename(t)),Y.isMatch=(t,e,r)=>Y(e,r)(t),Y.parse=(t,e)=>Array.isArray(t)?t.map(r=>Y.parse(r,e)):Ei(t,{...e,fastpaths:!1}),Y.scan=(t,e)=>um(t,e),Y.compileRe=(t,e,r=!1,i=!1)=>{if(r===!0)return t.output;const n=e||{},s=n.contains?"":"^",a=n.contains?"":"$";let o=`${s}(?:${t.output})${a}`;t&&t.negated===!0&&(o=`^(?!${o}).*$`);const u=Y.toRegex(o,e);return i===!0&&(u.state=t),u},Y.makeRe=(t,e={},r=!1,i=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let n={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(n.output=Ei.fastpaths(t,e)),n.output||(n=Ei(t,e)),Y.compileRe(n,e,r,i)},Y.toRegex=(t,e)=>{try{const r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}},Y.constants=lm;var hm=Y,fm=hm;const ba=mn,wa=Id,Te=fm,Ri=At,_a=t=>t===""||t==="./",V=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let i=new Set,n=new Set,s=new Set,a=0,o=c=>{s.add(c.output),r&&r.onResult&&r.onResult(c)};for(let c=0;c<e.length;c++){let f=Te(String(e[c]),{...r,onResult:o},!0),h=f.state.negated||f.state.negatedExtglob;h&&a++;for(let d of t){let p=f(d,!0);!(h?!p.isMatch:p.isMatch)||(h?i.add(p.output):(i.delete(p.output),n.add(p.output)))}}let l=(a===e.length?[...s]:[...n]).filter(c=>!i.has(c));if(r&&l.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(c=>c.replace(/\\/g,"")):e}return l};V.match=V,V.matcher=(t,e)=>Te(t,e),V.isMatch=(t,e,r)=>Te(e,r)(t),V.any=V.isMatch,V.not=(t,e,r={})=>{e=[].concat(e).map(String);let i=new Set,n=[],a=V(t,e,{...r,onResult:o=>{r.onResult&&r.onResult(o),n.push(o.output)}});for(let o of n)a.includes(o)||i.add(o);return[...i]},V.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${ba.inspect(t)}"`);if(Array.isArray(e))return e.some(i=>V.contains(t,i,r));if(typeof e=="string"){if(_a(t)||_a(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return V.isMatch(t,e,{...r,contains:!0})},V.matchKeys=(t,e,r)=>{if(!Ri.isObject(t))throw new TypeError("Expected the first argument to be an object");let i=V(Object.keys(t),e,r),n={};for(let s of i)n[s]=t[s];return n},V.some=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=Te(String(n),r);if(i.some(a=>s(a)))return!0}return!1},V.every=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=Te(String(n),r);if(!i.every(a=>s(a)))return!1}return!0},V.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${ba.inspect(t)}"`);return[].concat(e).every(i=>Te(i,r)(t))},V.capture=(t,e,r)=>{let i=Ri.isWindows(r),s=Te.makeRe(String(t),{...r,capture:!0}).exec(i?Ri.toPosixSlashes(e):e);if(s)return s.slice(1).map(a=>a===void 0?"":a)},V.makeRe=(...t)=>Te.makeRe(...t),V.scan=(...t)=>Te.scan(...t),V.parse=(t,e)=>{let r=[];for(let i of[].concat(t||[]))for(let n of wa(String(i),e))r.push(Te.parse(n,e));return r},V.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:wa(t,e)},V.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return V.braces(t,{...e,expand:!0})};var pm=V;Object.defineProperty(P,"__esModule",{value:!0}),P.matchAny=P.convertPatternsToRe=P.makeRe=P.getPatternParts=P.expandBraceExpansion=P.expandPatternsWithBraceExpansion=P.isAffectDepthOfReadingPattern=P.endsWithSlashGlobStar=P.hasGlobStar=P.getBaseDirectory=P.isPatternRelatedToParentDirectory=P.getPatternsOutsideCurrentDirectory=P.getPatternsInsideCurrentDirectory=P.getPositivePatterns=P.getNegativePatterns=P.isPositivePattern=P.isNegativePattern=P.convertToNegativePattern=P.convertToPositivePattern=P.isDynamicPattern=P.isStaticPattern=void 0;const dm=te,mm=Wp,Ai=pm,Sa="**",gm="\\",ym=/[*?]|^!/,vm=/\[[^[]*]/,bm=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,wm=/[!*+?@]\([^(]*\)/,_m=/,|\.\./;function Ea(t,e={}){return!xa(t,e)}P.isStaticPattern=Ea;function xa(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(gm)||ym.test(t)||vm.test(t)||bm.test(t)||e.extglob!==!1&&wm.test(t)||e.braceExpansion!==!1&&Sm(t))}P.isDynamicPattern=xa;function Sm(t){const e=t.indexOf("{");if(e===-1)return!1;const r=t.indexOf("}",e+1);if(r===-1)return!1;const i=t.slice(e,r);return _m.test(i)}function Em(t){return ar(t)?t.slice(1):t}P.convertToPositivePattern=Em;function xm(t){return"!"+t}P.convertToNegativePattern=xm;function ar(t){return t.startsWith("!")&&t[1]!=="("}P.isNegativePattern=ar;function Ra(t){return!ar(t)}P.isPositivePattern=Ra;function Rm(t){return t.filter(ar)}P.getNegativePatterns=Rm;function Am(t){return t.filter(Ra)}P.getPositivePatterns=Am;function Tm(t){return t.filter(e=>!Ti(e))}P.getPatternsInsideCurrentDirectory=Tm;function $m(t){return t.filter(Ti)}P.getPatternsOutsideCurrentDirectory=$m;function Ti(t){return t.startsWith("..")||t.startsWith("./..")}P.isPatternRelatedToParentDirectory=Ti;function Pm(t){return mm(t,{flipBackslashes:!1})}P.getBaseDirectory=Pm;function Cm(t){return t.includes(Sa)}P.hasGlobStar=Cm;function Aa(t){return t.endsWith("/"+Sa)}P.endsWithSlashGlobStar=Aa;function km(t){const e=dm.basename(t);return Aa(t)||Ea(e)}P.isAffectDepthOfReadingPattern=km;function Om(t){return t.reduce((e,r)=>e.concat(Ta(r)),[])}P.expandPatternsWithBraceExpansion=Om;function Ta(t){return Ai.braces(t,{expand:!0,nodupes:!0})}P.expandBraceExpansion=Ta;function Lm(t,e){let{parts:r}=Ai.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}P.getPatternParts=Lm;function $a(t,e){return Ai.makeRe(t,e)}P.makeRe=$a;function Dm(t,e){return t.map(r=>$a(r,e))}P.convertPatternsToRe=Dm;function Im(t,e){return e.some(r=>r.test(t))}P.matchAny=Im;var or={};const Fm=Mt,Pa=Fm.PassThrough,Mm=Array.prototype.slice;var Nm=Hm;function Hm(){const t=[],e=Mm.call(arguments);let r=!1,i=e[e.length-1];i&&!Array.isArray(i)&&i.pipe==null?e.pop():i={};const n=i.end!==!1,s=i.pipeError===!0;i.objectMode==null&&(i.objectMode=!0),i.highWaterMark==null&&(i.highWaterMark=64*1024);const a=Pa(i);function o(){for(let c=0,f=arguments.length;c<f;c++)t.push(Ca(arguments[c],i));return u(),this}function u(){if(r)return;r=!0;let c=t.shift();if(!c){process.nextTick(l);return}Array.isArray(c)||(c=[c]);let f=c.length+1;function h(){--f>0||(r=!1,u())}function d(p){function m(){p.removeListener("merge2UnpipeEnd",m),p.removeListener("end",m),s&&p.removeListener("error",w),h()}function w(b){a.emit("error",b)}if(p._readableState.endEmitted)return h();p.on("merge2UnpipeEnd",m),p.on("end",m),s&&p.on("error",w),p.pipe(a,{end:!1}),p.resume()}for(let p=0;p<c.length;p++)d(c[p]);h()}function l(){r=!1,a.emit("queueDrain"),n&&a.end()}return a.setMaxListeners(0),a.add=o,a.on("unpipe",function(c){c.emit("merge2UnpipeEnd")}),e.length&&o.apply(null,e),a}function Ca(t,e){if(Array.isArray(t))for(let r=0,i=t.length;r<i;r++)t[r]=Ca(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(Pa(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}Object.defineProperty(or,"__esModule",{value:!0}),or.merge=void 0;const Bm=Nm;function jm(t){const e=Bm(t);return t.forEach(r=>{r.once("error",i=>e.emit("error",i))}),e.once("close",()=>ka(t)),e.once("end",()=>ka(t)),e}or.merge=jm;function ka(t){t.forEach(e=>e.emit("close"))}var dt={};Object.defineProperty(dt,"__esModule",{value:!0}),dt.isEmpty=dt.isString=void 0;function qm(t){return typeof t=="string"}dt.isString=qm;function Um(t){return t===""}dt.isEmpty=Um,Object.defineProperty(W,"__esModule",{value:!0}),W.string=W.stream=W.pattern=W.path=W.fs=W.errno=W.array=void 0;const Vm=ht;W.array=Vm;const zm=Zt;W.errno=zm;const Gm=Jt;W.fs=Gm;const Wm=Re;W.path=Wm;const Qm=P;W.pattern=Qm;const Ym=or;W.stream=Ym;const Km=dt;W.string=Km,Object.defineProperty(ne,"__esModule",{value:!0}),ne.convertPatternGroupToTask=ne.convertPatternGroupsToTasks=ne.groupPatternsByBaseDirectory=ne.getNegativePatternsAsPositive=ne.getPositivePatterns=ne.convertPatternsToTasks=ne.generate=void 0;const Fe=W;function Xm(t,e){const r=Oa(t),i=La(t,e.ignore),n=r.filter(u=>Fe.pattern.isStaticPattern(u,e)),s=r.filter(u=>Fe.pattern.isDynamicPattern(u,e)),a=$i(n,i,!1),o=$i(s,i,!0);return a.concat(o)}ne.generate=Xm;function $i(t,e,r){const i=[],n=Fe.pattern.getPatternsOutsideCurrentDirectory(t),s=Fe.pattern.getPatternsInsideCurrentDirectory(t),a=Pi(n),o=Pi(s);return i.push(...Ci(a,e,r)),"."in o?i.push(ki(".",s,e,r)):i.push(...Ci(o,e,r)),i}ne.convertPatternsToTasks=$i;function Oa(t){return Fe.pattern.getPositivePatterns(t)}ne.getPositivePatterns=Oa;function La(t,e){return Fe.pattern.getNegativePatterns(t).concat(e).map(Fe.pattern.convertToPositivePattern)}ne.getNegativePatternsAsPositive=La;function Pi(t){const e={};return t.reduce((r,i)=>{const n=Fe.pattern.getBaseDirectory(i);return n in r?r[n].push(i):r[n]=[i],r},e)}ne.groupPatternsByBaseDirectory=Pi;function Ci(t,e,r){return Object.keys(t).map(i=>ki(i,t[i],e,r))}ne.convertPatternGroupsToTasks=Ci;function ki(t,e,r,i){return{dynamic:i,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(Fe.pattern.convertToNegativePattern))}}ne.convertPatternGroupToTask=ki;var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.removeDuplicateSlashes=mt.transform=void 0;const Zm=/(?!^)\/{2,}/g;function Jm(t){return t.map(e=>Da(e))}mt.transform=Jm;function Da(t){return t.replace(Zm,"/")}mt.removeDuplicateSlashes=Da;var Oi={},ur={},de={},lr={};Object.defineProperty(lr,"__esModule",{value:!0}),lr.read=void 0;function eg(t,e,r){e.fs.lstat(t,(i,n)=>{if(i!==null){Ia(r,i);return}if(!n.isSymbolicLink()||!e.followSymbolicLink){Li(r,n);return}e.fs.stat(t,(s,a)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){Ia(r,s);return}Li(r,n);return}e.markSymbolicLink&&(a.isSymbolicLink=()=>!0),Li(r,a)})})}lr.read=eg;function Ia(t,e){t(e)}function Li(t,e){t(null,e)}var cr={};Object.defineProperty(cr,"__esModule",{value:!0}),cr.read=void 0;function tg(t,e){const r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{const i=e.fs.statSync(t);return e.markSymbolicLink&&(i.isSymbolicLink=()=>!0),i}catch(i){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw i}}cr.read=tg;var Di={},Fa={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=He;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync};function r(i){return i===void 0?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),i)}t.createFileSystemAdapter=r})(Fa),Object.defineProperty(Di,"__esModule",{value:!0});const rg=Fa;class ig{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=rg.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}}Di.default=ig,Object.defineProperty(de,"__esModule",{value:!0}),de.statSync=de.stat=de.Settings=void 0;const Ma=lr,ng=cr,Ii=Di;de.Settings=Ii.default;function sg(t,e,r){if(typeof e=="function"){Ma.read(t,Fi(),e);return}Ma.read(t,Fi(e),r)}de.stat=sg;function ag(t,e){const r=Fi(e);return ng.read(t,r)}de.statSync=ag;function Fi(t={}){return t instanceof Ii.default?t:new Ii.default(t)}var _e={},Mi={},hr={},$e={},qe={};/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */let Na;var og=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window!="undefined"?window:Ro):t=>(Na||(Na=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0));/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ug=cg;const lg=og;function cg(t,e){let r,i,n,s=!0;Array.isArray(t)?(r=[],i=t.length):(n=Object.keys(t),r={},i=n.length);function a(u){function l(){e&&e(u,r),e=null}s?lg(l):l()}function o(u,l,c){r[u]=c,(--i===0||l)&&a(l)}i?n?n.forEach(function(u){t[u](function(l,c){o(u,l,c)})}):t.forEach(function(u,l){u(function(c,f){o(l,c,f)})}):a(null),s=!1}var $t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const fr=process.versions.node.split(".");if(fr[0]===void 0||fr[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const Ha=Number.parseInt(fr[0],10),hg=Number.parseInt(fr[1],10),Ba=10,fg=10,pg=Ha>Ba,dg=Ha===Ba&&hg>=fg;$t.IS_SUPPORT_READDIR_WITH_FILE_TYPES=pg||dg;var Pt={},pr={};Object.defineProperty(pr,"__esModule",{value:!0}),pr.createDirentFromStats=void 0;class mg{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function gg(t,e){return new mg(t,e)}pr.createDirentFromStats=gg,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.fs=void 0;const yg=pr;Pt.fs=yg;var Ct={};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.joinPathSegments=void 0;function vg(t,e,r){return t.endsWith(r)?t+e:t+r+e}Ct.joinPathSegments=vg,Object.defineProperty(qe,"__esModule",{value:!0}),qe.readdir=qe.readdirWithFileTypes=qe.read=void 0;const bg=de,ja=ug,wg=$t,qa=Pt,Ua=Ct;function _g(t,e,r){if(!e.stats&&wg.IS_SUPPORT_READDIR_WITH_FILE_TYPES){Va(t,e,r);return}za(t,e,r)}qe.read=_g;function Va(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(i,n)=>{if(i!==null){dr(r,i);return}const s=n.map(o=>({dirent:o,name:o.name,path:Ua.joinPathSegments(t,o.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){Ni(r,s);return}const a=s.map(o=>Sg(o,e));ja(a,(o,u)=>{if(o!==null){dr(r,o);return}Ni(r,u)})})}qe.readdirWithFileTypes=Va;function Sg(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(i,n)=>{if(i!==null){if(e.throwErrorOnBrokenSymbolicLink){r(i);return}r(null,t);return}t.dirent=qa.fs.createDirentFromStats(t.name,n),r(null,t)})}}function za(t,e,r){e.fs.readdir(t,(i,n)=>{if(i!==null){dr(r,i);return}const s=n.map(a=>{const o=Ua.joinPathSegments(t,a,e.pathSegmentSeparator);return u=>{bg.stat(o,e.fsStatSettings,(l,c)=>{if(l!==null){u(l);return}const f={name:a,path:o,dirent:qa.fs.createDirentFromStats(a,c)};e.stats&&(f.stats=c),u(null,f)})}});ja(s,(a,o)=>{if(a!==null){dr(r,a);return}Ni(r,o)})})}qe.readdir=za;function dr(t,e){t(e)}function Ni(t,e){t(null,e)}var Ue={};Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.readdir=Ue.readdirWithFileTypes=Ue.read=void 0;const Eg=de,xg=$t,Ga=Pt,Wa=Ct;function Rg(t,e){return!e.stats&&xg.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Qa(t,e):Ya(t,e)}Ue.read=Rg;function Qa(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(i=>{const n={dirent:i,name:i.name,path:Wa.joinPathSegments(t,i.name,e.pathSegmentSeparator)};if(n.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{const s=e.fs.statSync(n.path);n.dirent=Ga.fs.createDirentFromStats(n.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return n})}Ue.readdirWithFileTypes=Qa;function Ya(t,e){return e.fs.readdirSync(t).map(i=>{const n=Wa.joinPathSegments(t,i,e.pathSegmentSeparator),s=Eg.statSync(n,e.fsStatSettings),a={name:i,path:n,dirent:Ga.fs.createDirentFromStats(i,s)};return e.stats&&(a.stats=s),a})}Ue.readdir=Ya;var Hi={},Ka={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=He;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync};function r(i){return i===void 0?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),i)}t.createFileSystemAdapter=r})(Ka),Object.defineProperty(Hi,"__esModule",{value:!0});const Ag=te,Tg=de,$g=Ka;class Pg{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=$g.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Ag.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new Tg.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}}Hi.default=Pg,Object.defineProperty($e,"__esModule",{value:!0}),$e.Settings=$e.scandirSync=$e.scandir=void 0;const Xa=qe,Cg=Ue,Bi=Hi;$e.Settings=Bi.default;function kg(t,e,r){if(typeof e=="function"){Xa.read(t,ji(),e);return}Xa.read(t,ji(e),r)}$e.scandir=kg;function Og(t,e){const r=ji(e);return Cg.read(t,r)}$e.scandirSync=Og;function ji(t={}){return t instanceof Bi.default?t:new Bi.default(t)}var qi={exports:{}};function Lg(t){var e=new t,r=e;function i(){var s=e;return s.next?e=s.next:(e=new t,r=e),s.next=null,s}function n(s){r.next=s,r=s}return{get:i,release:n}}var Dg=Lg,Ig=Dg;function Za(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var i=Ig(Fg),n=null,s=null,a=0,o=null,u={push:m,drain:ge,saturated:ge,pause:c,paused:!1,concurrency:r,running:l,resume:d,idle:p,length:f,getQueue:h,unshift:w,empty:ge,kill:R,killAndDrain:_,error:$};return u;function l(){return a}function c(){u.paused=!0}function f(){for(var E=n,T=0;E;)E=E.next,T++;return T}function h(){for(var E=n,T=[];E;)T.push(E.value),E=E.next;return T}function d(){if(!!u.paused){u.paused=!1;for(var E=0;E<u.concurrency;E++)a++,b()}}function p(){return a===0&&u.length()===0}function m(E,T){var C=i.get();C.context=t,C.release=b,C.value=E,C.callback=T||ge,C.errorHandler=o,a===u.concurrency||u.paused?s?(s.next=C,s=C):(n=C,s=C,u.saturated()):(a++,e.call(t,C.value,C.worked))}function w(E,T){var C=i.get();C.context=t,C.release=b,C.value=E,C.callback=T||ge,a===u.concurrency||u.paused?n?(C.next=n,n=C):(n=C,s=C,u.saturated()):(a++,e.call(t,C.value,C.worked))}function b(E){E&&i.release(E);var T=n;T?u.paused?a--:(s===n&&(s=null),n=T.next,T.next=null,e.call(t,T.value,T.worked),s===null&&u.empty()):--a===0&&u.drain()}function R(){n=null,s=null,u.drain=ge}function _(){n=null,s=null,u.drain(),u.drain=ge}function $(E){o=E}}function ge(){}function Fg(){this.value=null,this.callback=ge,this.next=null,this.release=ge,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,i){var n=t.callback,s=t.errorHandler,a=t.value;t.value=null,t.callback=ge,t.errorHandler&&s(r,a),n.call(t.context,r,i),t.release(t)}}function Mg(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function i(c,f){e.call(this,c).then(function(h){f(null,h)},f)}var n=Za(t,i,r),s=n.push,a=n.unshift;return n.push=o,n.unshift=u,n.drained=l,n;function o(c){var f=new Promise(function(h,d){s(c,function(p,m){if(p){d(p);return}h(m)})});return f.catch(ge),f}function u(c){var f=new Promise(function(h,d){a(c,function(p,m){if(p){d(p);return}h(m)})});return f.catch(ge),f}function l(){var c=n.drain,f=new Promise(function(h){n.drain=function(){c(),h()}});return f}}qi.exports=Za,qi.exports.promise=Mg;var ye={};Object.defineProperty(ye,"__esModule",{value:!0}),ye.joinPathSegments=ye.replacePathSegmentSeparator=ye.isAppliedFilter=ye.isFatalError=void 0;function Ng(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}ye.isFatalError=Ng;function Hg(t,e){return t===null||t(e)}ye.isAppliedFilter=Hg;function Bg(t,e){return t.split(/[/\\]/).join(e)}ye.replacePathSegmentSeparator=Bg;function jg(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}ye.joinPathSegments=jg;var mr={};Object.defineProperty(mr,"__esModule",{value:!0});const qg=ye;class Ug{constructor(e,r){this._root=e,this._settings=r,this._root=qg.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}}mr.default=Ug,Object.defineProperty(hr,"__esModule",{value:!0});const Vg=Rr,zg=$e,Gg=qi.exports,gr=ye,Wg=mr;class Qg extends Wg.default{constructor(e,r){super(e,r);this._settings=r,this._scandir=zg.scandir,this._emitter=new Vg.EventEmitter,this._queue=Gg(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){const i={directory:e,base:r};this._queue.push(i,n=>{n!==null&&this._handleError(n)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(i,n)=>{if(i!==null){r(i,void 0);return}for(const s of n)this._handleEntry(s,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!gr.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;const i=e.path;r!==void 0&&(e.path=gr.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),gr.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&gr.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(i,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}hr.default=Qg,Object.defineProperty(Mi,"__esModule",{value:!0});const Yg=hr;class Kg{constructor(e,r){this._root=e,this._settings=r,this._reader=new Yg.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{Xg(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{Zg(e,this._storage)}),this._reader.read()}}Mi.default=Kg;function Xg(t,e){t(e)}function Zg(t,e){t(null,e)}var Ui={};Object.defineProperty(Ui,"__esModule",{value:!0});const Jg=Mt,ey=hr;class ty{constructor(e,r){this._root=e,this._settings=r,this._reader=new ey.default(this._root,this._settings),this._stream=new Jg.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}}Ui.default=ty;var Vi={},zi={};Object.defineProperty(zi,"__esModule",{value:!0});const ry=$e,yr=ye,iy=mr;class ny extends iy.default{constructor(){super(...arguments);this._scandir=ry.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{const i=this._scandir(e,this._settings.fsScandirSettings);for(const n of i)this._handleEntry(n,r)}catch(i){this._handleError(i)}}_handleError(e){if(!!yr.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const i=e.path;r!==void 0&&(e.path=yr.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),yr.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&yr.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(i,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}zi.default=ny,Object.defineProperty(Vi,"__esModule",{value:!0});const sy=zi;class ay{constructor(e,r){this._root=e,this._settings=r,this._reader=new sy.default(this._root,this._settings)}read(){return this._reader.read()}}Vi.default=ay;var Gi={};Object.defineProperty(Gi,"__esModule",{value:!0});const oy=te,uy=$e;class ly{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,oy.sep),this.fsScandirSettings=new uy.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}}Gi.default=ly,Object.defineProperty(_e,"__esModule",{value:!0}),_e.Settings=_e.walkStream=_e.walkSync=_e.walk=void 0;const Ja=Mi,cy=Ui,hy=Vi,Wi=Gi;_e.Settings=Wi.default;function fy(t,e,r){if(typeof e=="function"){new Ja.default(t,vr()).read(e);return}new Ja.default(t,vr(e)).read(r)}_e.walk=fy;function py(t,e){const r=vr(e);return new hy.default(t,r).read()}_e.walkSync=py;function dy(t,e){const r=vr(e);return new cy.default(t,r).read()}_e.walkStream=dy;function vr(t={}){return t instanceof Wi.default?t:new Wi.default(t)}var br={};Object.defineProperty(br,"__esModule",{value:!0});const my=te,gy=de,eo=W;class yy{constructor(e){this._settings=e,this._fsStatSettings=new gy.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return my.resolve(this._settings.cwd,e)}_makeEntry(e,r){const i={name:r,path:r,dirent:eo.fs.createDirentFromStats(r,e)};return this._settings.stats&&(i.stats=e),i}_isFatalError(e){return!eo.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}}br.default=yy,Object.defineProperty(ur,"__esModule",{value:!0});const vy=Mt,by=de,wy=_e,_y=br;class Sy extends _y.default{constructor(){super(...arguments);this._walkStream=wy.walkStream,this._stat=by.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){const i=e.map(this._getFullEntryPath,this),n=new vy.PassThrough({objectMode:!0});n._write=(s,a,o)=>this._getEntry(i[s],e[s],r).then(u=>{u!==null&&r.entryFilter(u)&&n.push(u),s===i.length-1&&n.end(),o()}).catch(o);for(let s=0;s<i.length;s++)n.write(s);return n}_getEntry(e,r,i){return this._getStat(e).then(n=>this._makeEntry(n,r)).catch(n=>{if(i.errorFilter(n))return null;throw n})}_getStat(e){return new Promise((r,i)=>{this._stat(e,this._fsStatSettings,(n,s)=>n===null?r(s):i(n))})}}ur.default=Sy;var kt={},Qi={},Yi={},Ki={};Object.defineProperty(Ki,"__esModule",{value:!0});const gt=W;class Ey{constructor(e,r,i){this._patterns=e,this._settings=r,this._micromatchOptions=i,this._storage=[],this._fillStorage()}_fillStorage(){const e=gt.pattern.expandPatternsWithBraceExpansion(this._patterns);for(const r of e){const i=this._getPatternSegments(r),n=this._splitSegmentsIntoSections(i);this._storage.push({complete:n.length<=1,pattern:r,segments:i,sections:n})}}_getPatternSegments(e){return gt.pattern.getPatternParts(e,this._micromatchOptions).map(i=>gt.pattern.isDynamicPattern(i,this._settings)?{dynamic:!0,pattern:i,patternRe:gt.pattern.makeRe(i,this._micromatchOptions)}:{dynamic:!1,pattern:i})}_splitSegmentsIntoSections(e){return gt.array.splitWhen(e,r=>r.dynamic&&gt.pattern.hasGlobStar(r.pattern))}}Ki.default=Ey,Object.defineProperty(Yi,"__esModule",{value:!0});const xy=Ki;class Ry extends xy.default{match(e){const r=e.split("/"),i=r.length,n=this._storage.filter(s=>!s.complete||s.segments.length>i);for(const s of n){const a=s.sections[0];if(!s.complete&&i>a.length||r.every((u,l)=>{const c=s.segments[l];return!!(c.dynamic&&c.patternRe.test(u)||!c.dynamic&&c.pattern===u)}))return!0}return!1}}Yi.default=Ry,Object.defineProperty(Qi,"__esModule",{value:!0});const wr=W,Ay=Yi;class Ty{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,i){const n=this._getMatcher(r),s=this._getNegativePatternsRe(i);return a=>this._filter(e,a,n,s)}_getMatcher(e){return new Ay.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){const r=e.filter(wr.pattern.isAffectDepthOfReadingPattern);return wr.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,i,n){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;const s=wr.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,i)?!1:this._isSkippedByNegativePatterns(s,n)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){const i=r.split("/").length;if(e==="")return i;const n=e.split("/").length;return i-n}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!wr.pattern.matchAny(e,r)}}Qi.default=Ty;var Xi={};Object.defineProperty(Xi,"__esModule",{value:!0});const Je=W;class $y{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){const i=Je.pattern.convertPatternsToRe(e,this._micromatchOptions),n=Je.pattern.convertPatternsToRe(r,this._micromatchOptions);return s=>this._filter(s,i,n)}_filter(e,r,i){if(this._settings.unique&&this._isDuplicateEntry(e)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(e.path,i))return!1;const n=this._settings.baseNameMatch?e.name:e.path,s=this._isMatchToPatterns(n,r)&&!this._isMatchToPatterns(e.path,i);return this._settings.unique&&s&&this._createIndexRecord(e),s}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;const i=Je.path.makeAbsolute(this._settings.cwd,e);return Je.pattern.matchAny(i,r)}_isMatchToPatterns(e,r){const i=Je.path.removeLeadingDotSegment(e);return Je.pattern.matchAny(i,r)||Je.pattern.matchAny(i+"/",r)}}Xi.default=$y;var Zi={};Object.defineProperty(Zi,"__esModule",{value:!0});const Py=W;class Cy{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return Py.errno.isEnoentCodeError(e)||this._settings.suppressErrors}}Zi.default=Cy;var Ji={};Object.defineProperty(Ji,"__esModule",{value:!0});const to=W;class ky{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=to.path.makeAbsolute(this._settings.cwd,r),r=to.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}}Ji.default=ky,Object.defineProperty(kt,"__esModule",{value:!0});const Oy=te,Ly=Qi,Dy=Xi,Iy=Zi,Fy=Ji;class My{constructor(e){this._settings=e,this.errorFilter=new Iy.default(this._settings),this.entryFilter=new Dy.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new Ly.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new Fy.default(this._settings)}_getRootDirectory(e){return Oy.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){const r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.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:!0,strictSlashes:!1}}}kt.default=My,Object.defineProperty(Oi,"__esModule",{value:!0});const Ny=ur,Hy=kt;class By extends Hy.default{constructor(){super(...arguments);this._reader=new Ny.default(this._settings)}read(e){const r=this._getRootDirectory(e),i=this._getReaderOptions(e),n=[];return new Promise((s,a)=>{const o=this.api(r,e,i);o.once("error",a),o.on("data",u=>n.push(i.transform(u))),o.once("end",()=>s(n))})}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}}Oi.default=By;var en={};Object.defineProperty(en,"__esModule",{value:!0});const jy=Mt,qy=ur,Uy=kt;class Vy extends Uy.default{constructor(){super(...arguments);this._reader=new qy.default(this._settings)}read(e){const r=this._getRootDirectory(e),i=this._getReaderOptions(e),n=this.api(r,e,i),s=new jy.Readable({objectMode:!0,read:()=>{}});return n.once("error",a=>s.emit("error",a)).on("data",a=>s.emit("data",i.transform(a))).once("end",()=>s.emit("end")),s.once("close",()=>n.destroy()),s}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}}en.default=Vy;var tn={},rn={};Object.defineProperty(rn,"__esModule",{value:!0});const zy=de,Gy=_e,Wy=br;class Qy extends Wy.default{constructor(){super(...arguments);this._walkSync=Gy.walkSync,this._statSync=zy.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){const i=[];for(const n of e){const s=this._getFullEntryPath(n),a=this._getEntry(s,n,r);a===null||!r.entryFilter(a)||i.push(a)}return i}_getEntry(e,r,i){try{const n=this._getStat(e);return this._makeEntry(n,r)}catch(n){if(i.errorFilter(n))return null;throw n}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}rn.default=Qy,Object.defineProperty(tn,"__esModule",{value:!0});const Yy=rn,Ky=kt;class Xy extends Ky.default{constructor(){super(...arguments);this._reader=new Yy.default(this._settings)}read(e){const r=this._getRootDirectory(e),i=this._getReaderOptions(e);return this.api(r,e,i).map(i.transform)}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}}tn.default=Xy;var ro={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const e=He,i=Math.max(dn.cpus().length,1);t.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:e.lstat,lstatSync:e.lstatSync,stat:e.stat,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync};class n{constructor(a={}){this._options=a,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,i),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(a,o){return a===void 0?o:a}_getFileSystemMethods(a={}){return Object.assign(Object.assign({},t.DEFAULT_FILE_SYSTEM_ADAPTER),a)}}t.default=n})(ro);const io=ne,no=mt,Zy=Oi,Jy=en,ev=tn,nn=ro,et=W;async function sn(t,e){yt(t);const r=an(t,Zy.default,e),i=await Promise.all(r);return et.array.flatten(i)}(function(t){function e(a,o){yt(a);const u=an(a,ev.default,o);return et.array.flatten(u)}t.sync=e;function r(a,o){yt(a);const u=an(a,Jy.default,o);return et.stream.merge(u)}t.stream=r;function i(a,o){yt(a);const u=no.transform([].concat(a)),l=new nn.default(o);return io.generate(u,l)}t.generateTasks=i;function n(a,o){yt(a);const u=new nn.default(o);return et.pattern.isDynamicPattern(a,u)}t.isDynamicPattern=n;function s(a){return yt(a),et.path.escape(a)}t.escapePath=s})(sn||(sn={}));function an(t,e,r){const i=no.transform([].concat(t)),n=new nn.default(r),s=io.generate(i,n),a=new e(n);return s.map(a.read,a)}function yt(t){if(![].concat(t).every(i=>et.string.isString(i)&&!et.string.isEmpty(i)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}var tv=sn;const rv=async t=>He.promises.readFile(t,{encoding:"utf-8"}),iv=async(t,e)=>He.promises.writeFile(t,e),nv=t=>He.lstatSync(t).isDirectory();var on={exports:{}};let sv=xo,av=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||sv.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),z=(t,e,r=t)=>i=>{let n=""+i,s=n.indexOf(e,t.length);return~s?t+so(n,e,r,s)+e:t+n+e},so=(t,e,r,i)=>{let n=t.substring(0,i)+r,s=t.substring(i+e.length),a=s.indexOf(e);return~a?n+so(s,e,r,a):n+s},ao=(t=av)=>({isColorSupported:t,reset:t?e=>`\x1B[0m${e}\x1B[0m`:String,bold:t?z("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:t?z("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:t?z("\x1B[3m","\x1B[23m"):String,underline:t?z("\x1B[4m","\x1B[24m"):String,inverse:t?z("\x1B[7m","\x1B[27m"):String,hidden:t?z("\x1B[8m","\x1B[28m"):String,strikethrough:t?z("\x1B[9m","\x1B[29m"):String,black:t?z("\x1B[30m","\x1B[39m"):String,red:t?z("\x1B[31m","\x1B[39m"):String,green:t?z("\x1B[32m","\x1B[39m"):String,yellow:t?z("\x1B[33m","\x1B[39m"):String,blue:t?z("\x1B[34m","\x1B[39m"):String,magenta:t?z("\x1B[35m","\x1B[39m"):String,cyan:t?z("\x1B[36m","\x1B[39m"):String,white:t?z("\x1B[37m","\x1B[39m"):String,gray:t?z("\x1B[90m","\x1B[39m"):String,bgBlack:t?z("\x1B[40m","\x1B[49m"):String,bgRed:t?z("\x1B[41m","\x1B[49m"):String,bgGreen:t?z("\x1B[42m","\x1B[49m"):String,bgYellow:t?z("\x1B[43m","\x1B[49m"):String,bgBlue:t?z("\x1B[44m","\x1B[49m"):String,bgMagenta:t?z("\x1B[45m","\x1B[49m"):String,bgCyan:t?z("\x1B[46m","\x1B[49m"):String,bgWhite:t?z("\x1B[47m","\x1B[49m"):String});on.exports=ao(),on.exports.createColors=ao;var un=on.exports;class oo{constructor(e,r){this.type=r,this.value=e}}const ov={command:t=>new oo(t,0),path:t=>new oo(t,1)};class uv{constructor(e){this.value=e}}function lv(t,...e){let r="";return t.forEach((i,n)=>{if(r+=i,n>=e.length)return;const s=e[n];switch(s.type){case 0:r+=un.bold(s.value);break;case 1:r+=un.italic(s.value);break}}),new uv(r)}const cv=t=>{console.log(un.green(`\u{1F389} ${t.value}`))};async function hv(t){const e=await ui(`templates/${t}`,{cwd:xt(Tr(import.meta.url)),type:"directory"});if(e)return e;throw new Dn(`Couldn't find the template ${t} in @shopify/create-app.`)}const fv=async(t,e=Dl)=>{const r=[];return t.name||r.push({type:"input",name:"name",message:"How would you like to name the app?"}),t.description||r.push({type:"input",name:"description",message:"What's the application for?"}),e(r)};async function pv(){const t=await ui("@shopify/cli/package.json",{cwd:xt(Tr(import.meta.url)),type:"file"})??await ui("packages/cli/package.json",{cwd:xt(Tr(import.meta.url)),type:"file"});if(!t)throw new Dn("Couldn't determine the version of the CLI");return JSON.parse(He.readFileSync(t,"utf-8")).version}async function dv(t){const e=Xt(t.directory,rp(t.name));console.log("Creating the app..."),mv({...t,outputDirectory:e}),cv(lv`App successfully created at ${ov.path(e)}`)}async function mv(t){const r=(await tv(Xt(t.templatePath,"**/*"))).map(n=>n.split("/")).sort((n,s)=>n.length<s.length?1:-1).map(n=>n.join("/")),i={name:t.name,description:t.description,cliVersion:pv};r.forEach(async n=>{const s=await Es(Xt(t.outputDirectory,Ds(t.templatePath,n)))(i);if(nv(n))await In(s);else{await In(xt(s));const a=await rv(n),o=await Es(a)(i);await iv(s,o)}})}const uo=class extends po{async run(){const t=await hv("app"),{flags:e}=await this.parse(uo),r=e.path?Ls(e.path):process.cwd(),i=await fv({name:e.name,description:e.description});await dv({name:i.name,description:i.description,templatePath:t,directory:r})}};let ln=uo;ln.description="Create a new Shopify app",ln.flags={name:xr.string({char:"n",description:"The name of the app to be initialized.",hidden:!1}),path:xr.string({char:"p",description:"The path to the directory where the app will be created.",hidden:!1}),description:xr.string({char:"d",description:"The description of the app that will be created",hidden:!1})};export{ln as default};