@markw65/monkeyc-optimizer 1.0.0 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/util.cjs ADDED
@@ -0,0 +1,4158 @@
1
+ /******/ (() => { // webpackBootstrap
2
+ /******/ var __webpack_modules__ = ({
3
+
4
+ /***/ 5623:
5
+ /***/ ((module) => {
6
+
7
+ "use strict";
8
+
9
+ module.exports = balanced;
10
+ function balanced(a, b, str) {
11
+ if (a instanceof RegExp) a = maybeMatch(a, str);
12
+ if (b instanceof RegExp) b = maybeMatch(b, str);
13
+
14
+ var r = range(a, b, str);
15
+
16
+ return r && {
17
+ start: r[0],
18
+ end: r[1],
19
+ pre: str.slice(0, r[0]),
20
+ body: str.slice(r[0] + a.length, r[1]),
21
+ post: str.slice(r[1] + b.length)
22
+ };
23
+ }
24
+
25
+ function maybeMatch(reg, str) {
26
+ var m = str.match(reg);
27
+ return m ? m[0] : null;
28
+ }
29
+
30
+ balanced.range = range;
31
+ function range(a, b, str) {
32
+ var begs, beg, left, right, result;
33
+ var ai = str.indexOf(a);
34
+ var bi = str.indexOf(b, ai + 1);
35
+ var i = ai;
36
+
37
+ if (ai >= 0 && bi > 0) {
38
+ if(a===b) {
39
+ return [ai, bi];
40
+ }
41
+ begs = [];
42
+ left = str.length;
43
+
44
+ while (i >= 0 && !result) {
45
+ if (i == ai) {
46
+ begs.push(i);
47
+ ai = str.indexOf(a, i + 1);
48
+ } else if (begs.length == 1) {
49
+ result = [ begs.pop(), bi ];
50
+ } else {
51
+ beg = begs.pop();
52
+ if (beg < left) {
53
+ left = beg;
54
+ right = bi;
55
+ }
56
+
57
+ bi = str.indexOf(b, i + 1);
58
+ }
59
+
60
+ i = ai < bi && ai >= 0 ? ai : bi;
61
+ }
62
+
63
+ if (begs.length) {
64
+ result = [ left, right ];
65
+ }
66
+ }
67
+
68
+ return result;
69
+ }
70
+
71
+
72
+ /***/ }),
73
+
74
+ /***/ 3644:
75
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
76
+
77
+ var concatMap = __webpack_require__(1048);
78
+ var balanced = __webpack_require__(5623);
79
+
80
+ module.exports = expandTop;
81
+
82
+ var escSlash = '\0SLASH'+Math.random()+'\0';
83
+ var escOpen = '\0OPEN'+Math.random()+'\0';
84
+ var escClose = '\0CLOSE'+Math.random()+'\0';
85
+ var escComma = '\0COMMA'+Math.random()+'\0';
86
+ var escPeriod = '\0PERIOD'+Math.random()+'\0';
87
+
88
+ function numeric(str) {
89
+ return parseInt(str, 10) == str
90
+ ? parseInt(str, 10)
91
+ : str.charCodeAt(0);
92
+ }
93
+
94
+ function escapeBraces(str) {
95
+ return str.split('\\\\').join(escSlash)
96
+ .split('\\{').join(escOpen)
97
+ .split('\\}').join(escClose)
98
+ .split('\\,').join(escComma)
99
+ .split('\\.').join(escPeriod);
100
+ }
101
+
102
+ function unescapeBraces(str) {
103
+ return str.split(escSlash).join('\\')
104
+ .split(escOpen).join('{')
105
+ .split(escClose).join('}')
106
+ .split(escComma).join(',')
107
+ .split(escPeriod).join('.');
108
+ }
109
+
110
+
111
+ // Basically just str.split(","), but handling cases
112
+ // where we have nested braced sections, which should be
113
+ // treated as individual members, like {a,{b,c},d}
114
+ function parseCommaParts(str) {
115
+ if (!str)
116
+ return [''];
117
+
118
+ var parts = [];
119
+ var m = balanced('{', '}', str);
120
+
121
+ if (!m)
122
+ return str.split(',');
123
+
124
+ var pre = m.pre;
125
+ var body = m.body;
126
+ var post = m.post;
127
+ var p = pre.split(',');
128
+
129
+ p[p.length-1] += '{' + body + '}';
130
+ var postParts = parseCommaParts(post);
131
+ if (post.length) {
132
+ p[p.length-1] += postParts.shift();
133
+ p.push.apply(p, postParts);
134
+ }
135
+
136
+ parts.push.apply(parts, p);
137
+
138
+ return parts;
139
+ }
140
+
141
+ function expandTop(str) {
142
+ if (!str)
143
+ return [];
144
+
145
+ // I don't know why Bash 4.3 does this, but it does.
146
+ // Anything starting with {} will have the first two bytes preserved
147
+ // but *only* at the top level, so {},a}b will not expand to anything,
148
+ // but a{},b}c will be expanded to [a}c,abc].
149
+ // One could argue that this is a bug in Bash, but since the goal of
150
+ // this module is to match Bash's rules, we escape a leading {}
151
+ if (str.substr(0, 2) === '{}') {
152
+ str = '\\{\\}' + str.substr(2);
153
+ }
154
+
155
+ return expand(escapeBraces(str), true).map(unescapeBraces);
156
+ }
157
+
158
+ function identity(e) {
159
+ return e;
160
+ }
161
+
162
+ function embrace(str) {
163
+ return '{' + str + '}';
164
+ }
165
+ function isPadded(el) {
166
+ return /^-?0\d/.test(el);
167
+ }
168
+
169
+ function lte(i, y) {
170
+ return i <= y;
171
+ }
172
+ function gte(i, y) {
173
+ return i >= y;
174
+ }
175
+
176
+ function expand(str, isTop) {
177
+ var expansions = [];
178
+
179
+ var m = balanced('{', '}', str);
180
+ if (!m || /\$$/.test(m.pre)) return [str];
181
+
182
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
183
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
184
+ var isSequence = isNumericSequence || isAlphaSequence;
185
+ var isOptions = m.body.indexOf(',') >= 0;
186
+ if (!isSequence && !isOptions) {
187
+ // {a},b}
188
+ if (m.post.match(/,.*\}/)) {
189
+ str = m.pre + '{' + m.body + escClose + m.post;
190
+ return expand(str);
191
+ }
192
+ return [str];
193
+ }
194
+
195
+ var n;
196
+ if (isSequence) {
197
+ n = m.body.split(/\.\./);
198
+ } else {
199
+ n = parseCommaParts(m.body);
200
+ if (n.length === 1) {
201
+ // x{{a,b}}y ==> x{a}y x{b}y
202
+ n = expand(n[0], false).map(embrace);
203
+ if (n.length === 1) {
204
+ var post = m.post.length
205
+ ? expand(m.post, false)
206
+ : [''];
207
+ return post.map(function(p) {
208
+ return m.pre + n[0] + p;
209
+ });
210
+ }
211
+ }
212
+ }
213
+
214
+ // at this point, n is the parts, and we know it's not a comma set
215
+ // with a single entry.
216
+
217
+ // no need to expand pre, since it is guaranteed to be free of brace-sets
218
+ var pre = m.pre;
219
+ var post = m.post.length
220
+ ? expand(m.post, false)
221
+ : [''];
222
+
223
+ var N;
224
+
225
+ if (isSequence) {
226
+ var x = numeric(n[0]);
227
+ var y = numeric(n[1]);
228
+ var width = Math.max(n[0].length, n[1].length)
229
+ var incr = n.length == 3
230
+ ? Math.abs(numeric(n[2]))
231
+ : 1;
232
+ var test = lte;
233
+ var reverse = y < x;
234
+ if (reverse) {
235
+ incr *= -1;
236
+ test = gte;
237
+ }
238
+ var pad = n.some(isPadded);
239
+
240
+ N = [];
241
+
242
+ for (var i = x; test(i, y); i += incr) {
243
+ var c;
244
+ if (isAlphaSequence) {
245
+ c = String.fromCharCode(i);
246
+ if (c === '\\')
247
+ c = '';
248
+ } else {
249
+ c = String(i);
250
+ if (pad) {
251
+ var need = width - c.length;
252
+ if (need > 0) {
253
+ var z = new Array(need + 1).join('0');
254
+ if (i < 0)
255
+ c = '-' + z + c.slice(1);
256
+ else
257
+ c = z + c;
258
+ }
259
+ }
260
+ }
261
+ N.push(c);
262
+ }
263
+ } else {
264
+ N = concatMap(n, function(el) { return expand(el, false) });
265
+ }
266
+
267
+ for (var j = 0; j < N.length; j++) {
268
+ for (var k = 0; k < post.length; k++) {
269
+ var expansion = pre + N[j] + post[k];
270
+ if (!isTop || isSequence || expansion)
271
+ expansions.push(expansion);
272
+ }
273
+ }
274
+
275
+ return expansions;
276
+ }
277
+
278
+
279
+
280
+ /***/ }),
281
+
282
+ /***/ 1048:
283
+ /***/ ((module) => {
284
+
285
+ module.exports = function (xs, fn) {
286
+ var res = [];
287
+ for (var i = 0; i < xs.length; i++) {
288
+ var x = fn(xs[i], i);
289
+ if (isArray(x)) res.push.apply(res, x);
290
+ else res.push(x);
291
+ }
292
+ return res;
293
+ };
294
+
295
+ var isArray = Array.isArray || function (xs) {
296
+ return Object.prototype.toString.call(xs) === '[object Array]';
297
+ };
298
+
299
+
300
+ /***/ }),
301
+
302
+ /***/ 7187:
303
+ /***/ ((module) => {
304
+
305
+ "use strict";
306
+ // Copyright Joyent, Inc. and other Node contributors.
307
+ //
308
+ // Permission is hereby granted, free of charge, to any person obtaining a
309
+ // copy of this software and associated documentation files (the
310
+ // "Software"), to deal in the Software without restriction, including
311
+ // without limitation the rights to use, copy, modify, merge, publish,
312
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
313
+ // persons to whom the Software is furnished to do so, subject to the
314
+ // following conditions:
315
+ //
316
+ // The above copyright notice and this permission notice shall be included
317
+ // in all copies or substantial portions of the Software.
318
+ //
319
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
320
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
321
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
322
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
323
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
324
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
325
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
326
+
327
+
328
+
329
+ var R = typeof Reflect === 'object' ? Reflect : null
330
+ var ReflectApply = R && typeof R.apply === 'function'
331
+ ? R.apply
332
+ : function ReflectApply(target, receiver, args) {
333
+ return Function.prototype.apply.call(target, receiver, args);
334
+ }
335
+
336
+ var ReflectOwnKeys
337
+ if (R && typeof R.ownKeys === 'function') {
338
+ ReflectOwnKeys = R.ownKeys
339
+ } else if (Object.getOwnPropertySymbols) {
340
+ ReflectOwnKeys = function ReflectOwnKeys(target) {
341
+ return Object.getOwnPropertyNames(target)
342
+ .concat(Object.getOwnPropertySymbols(target));
343
+ };
344
+ } else {
345
+ ReflectOwnKeys = function ReflectOwnKeys(target) {
346
+ return Object.getOwnPropertyNames(target);
347
+ };
348
+ }
349
+
350
+ function ProcessEmitWarning(warning) {
351
+ if (console && console.warn) console.warn(warning);
352
+ }
353
+
354
+ var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
355
+ return value !== value;
356
+ }
357
+
358
+ function EventEmitter() {
359
+ EventEmitter.init.call(this);
360
+ }
361
+ module.exports = EventEmitter;
362
+ module.exports.once = once;
363
+
364
+ // Backwards-compat with node 0.10.x
365
+ EventEmitter.EventEmitter = EventEmitter;
366
+
367
+ EventEmitter.prototype._events = undefined;
368
+ EventEmitter.prototype._eventsCount = 0;
369
+ EventEmitter.prototype._maxListeners = undefined;
370
+
371
+ // By default EventEmitters will print a warning if more than 10 listeners are
372
+ // added to it. This is a useful default which helps finding memory leaks.
373
+ var defaultMaxListeners = 10;
374
+
375
+ function checkListener(listener) {
376
+ if (typeof listener !== 'function') {
377
+ throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
378
+ }
379
+ }
380
+
381
+ Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
382
+ enumerable: true,
383
+ get: function() {
384
+ return defaultMaxListeners;
385
+ },
386
+ set: function(arg) {
387
+ if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
388
+ throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
389
+ }
390
+ defaultMaxListeners = arg;
391
+ }
392
+ });
393
+
394
+ EventEmitter.init = function() {
395
+
396
+ if (this._events === undefined ||
397
+ this._events === Object.getPrototypeOf(this)._events) {
398
+ this._events = Object.create(null);
399
+ this._eventsCount = 0;
400
+ }
401
+
402
+ this._maxListeners = this._maxListeners || undefined;
403
+ };
404
+
405
+ // Obviously not all Emitters should be limited to 10. This function allows
406
+ // that to be increased. Set to zero for unlimited.
407
+ EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
408
+ if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
409
+ throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
410
+ }
411
+ this._maxListeners = n;
412
+ return this;
413
+ };
414
+
415
+ function _getMaxListeners(that) {
416
+ if (that._maxListeners === undefined)
417
+ return EventEmitter.defaultMaxListeners;
418
+ return that._maxListeners;
419
+ }
420
+
421
+ EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
422
+ return _getMaxListeners(this);
423
+ };
424
+
425
+ EventEmitter.prototype.emit = function emit(type) {
426
+ var args = [];
427
+ for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
428
+ var doError = (type === 'error');
429
+
430
+ var events = this._events;
431
+ if (events !== undefined)
432
+ doError = (doError && events.error === undefined);
433
+ else if (!doError)
434
+ return false;
435
+
436
+ // If there is no 'error' event listener then throw.
437
+ if (doError) {
438
+ var er;
439
+ if (args.length > 0)
440
+ er = args[0];
441
+ if (er instanceof Error) {
442
+ // Note: The comments on the `throw` lines are intentional, they show
443
+ // up in Node's output if this results in an unhandled exception.
444
+ throw er; // Unhandled 'error' event
445
+ }
446
+ // At least give some kind of context to the user
447
+ var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
448
+ err.context = er;
449
+ throw err; // Unhandled 'error' event
450
+ }
451
+
452
+ var handler = events[type];
453
+
454
+ if (handler === undefined)
455
+ return false;
456
+
457
+ if (typeof handler === 'function') {
458
+ ReflectApply(handler, this, args);
459
+ } else {
460
+ var len = handler.length;
461
+ var listeners = arrayClone(handler, len);
462
+ for (var i = 0; i < len; ++i)
463
+ ReflectApply(listeners[i], this, args);
464
+ }
465
+
466
+ return true;
467
+ };
468
+
469
+ function _addListener(target, type, listener, prepend) {
470
+ var m;
471
+ var events;
472
+ var existing;
473
+
474
+ checkListener(listener);
475
+
476
+ events = target._events;
477
+ if (events === undefined) {
478
+ events = target._events = Object.create(null);
479
+ target._eventsCount = 0;
480
+ } else {
481
+ // To avoid recursion in the case that type === "newListener"! Before
482
+ // adding it to the listeners, first emit "newListener".
483
+ if (events.newListener !== undefined) {
484
+ target.emit('newListener', type,
485
+ listener.listener ? listener.listener : listener);
486
+
487
+ // Re-assign `events` because a newListener handler could have caused the
488
+ // this._events to be assigned to a new object
489
+ events = target._events;
490
+ }
491
+ existing = events[type];
492
+ }
493
+
494
+ if (existing === undefined) {
495
+ // Optimize the case of one listener. Don't need the extra array object.
496
+ existing = events[type] = listener;
497
+ ++target._eventsCount;
498
+ } else {
499
+ if (typeof existing === 'function') {
500
+ // Adding the second element, need to change to array.
501
+ existing = events[type] =
502
+ prepend ? [listener, existing] : [existing, listener];
503
+ // If we've already got an array, just append.
504
+ } else if (prepend) {
505
+ existing.unshift(listener);
506
+ } else {
507
+ existing.push(listener);
508
+ }
509
+
510
+ // Check for listener leak
511
+ m = _getMaxListeners(target);
512
+ if (m > 0 && existing.length > m && !existing.warned) {
513
+ existing.warned = true;
514
+ // No error code for this since it is a Warning
515
+ // eslint-disable-next-line no-restricted-syntax
516
+ var w = new Error('Possible EventEmitter memory leak detected. ' +
517
+ existing.length + ' ' + String(type) + ' listeners ' +
518
+ 'added. Use emitter.setMaxListeners() to ' +
519
+ 'increase limit');
520
+ w.name = 'MaxListenersExceededWarning';
521
+ w.emitter = target;
522
+ w.type = type;
523
+ w.count = existing.length;
524
+ ProcessEmitWarning(w);
525
+ }
526
+ }
527
+
528
+ return target;
529
+ }
530
+
531
+ EventEmitter.prototype.addListener = function addListener(type, listener) {
532
+ return _addListener(this, type, listener, false);
533
+ };
534
+
535
+ EventEmitter.prototype.on = EventEmitter.prototype.addListener;
536
+
537
+ EventEmitter.prototype.prependListener =
538
+ function prependListener(type, listener) {
539
+ return _addListener(this, type, listener, true);
540
+ };
541
+
542
+ function onceWrapper() {
543
+ if (!this.fired) {
544
+ this.target.removeListener(this.type, this.wrapFn);
545
+ this.fired = true;
546
+ if (arguments.length === 0)
547
+ return this.listener.call(this.target);
548
+ return this.listener.apply(this.target, arguments);
549
+ }
550
+ }
551
+
552
+ function _onceWrap(target, type, listener) {
553
+ var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
554
+ var wrapped = onceWrapper.bind(state);
555
+ wrapped.listener = listener;
556
+ state.wrapFn = wrapped;
557
+ return wrapped;
558
+ }
559
+
560
+ EventEmitter.prototype.once = function once(type, listener) {
561
+ checkListener(listener);
562
+ this.on(type, _onceWrap(this, type, listener));
563
+ return this;
564
+ };
565
+
566
+ EventEmitter.prototype.prependOnceListener =
567
+ function prependOnceListener(type, listener) {
568
+ checkListener(listener);
569
+ this.prependListener(type, _onceWrap(this, type, listener));
570
+ return this;
571
+ };
572
+
573
+ // Emits a 'removeListener' event if and only if the listener was removed.
574
+ EventEmitter.prototype.removeListener =
575
+ function removeListener(type, listener) {
576
+ var list, events, position, i, originalListener;
577
+
578
+ checkListener(listener);
579
+
580
+ events = this._events;
581
+ if (events === undefined)
582
+ return this;
583
+
584
+ list = events[type];
585
+ if (list === undefined)
586
+ return this;
587
+
588
+ if (list === listener || list.listener === listener) {
589
+ if (--this._eventsCount === 0)
590
+ this._events = Object.create(null);
591
+ else {
592
+ delete events[type];
593
+ if (events.removeListener)
594
+ this.emit('removeListener', type, list.listener || listener);
595
+ }
596
+ } else if (typeof list !== 'function') {
597
+ position = -1;
598
+
599
+ for (i = list.length - 1; i >= 0; i--) {
600
+ if (list[i] === listener || list[i].listener === listener) {
601
+ originalListener = list[i].listener;
602
+ position = i;
603
+ break;
604
+ }
605
+ }
606
+
607
+ if (position < 0)
608
+ return this;
609
+
610
+ if (position === 0)
611
+ list.shift();
612
+ else {
613
+ spliceOne(list, position);
614
+ }
615
+
616
+ if (list.length === 1)
617
+ events[type] = list[0];
618
+
619
+ if (events.removeListener !== undefined)
620
+ this.emit('removeListener', type, originalListener || listener);
621
+ }
622
+
623
+ return this;
624
+ };
625
+
626
+ EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
627
+
628
+ EventEmitter.prototype.removeAllListeners =
629
+ function removeAllListeners(type) {
630
+ var listeners, events, i;
631
+
632
+ events = this._events;
633
+ if (events === undefined)
634
+ return this;
635
+
636
+ // not listening for removeListener, no need to emit
637
+ if (events.removeListener === undefined) {
638
+ if (arguments.length === 0) {
639
+ this._events = Object.create(null);
640
+ this._eventsCount = 0;
641
+ } else if (events[type] !== undefined) {
642
+ if (--this._eventsCount === 0)
643
+ this._events = Object.create(null);
644
+ else
645
+ delete events[type];
646
+ }
647
+ return this;
648
+ }
649
+
650
+ // emit removeListener for all listeners on all events
651
+ if (arguments.length === 0) {
652
+ var keys = Object.keys(events);
653
+ var key;
654
+ for (i = 0; i < keys.length; ++i) {
655
+ key = keys[i];
656
+ if (key === 'removeListener') continue;
657
+ this.removeAllListeners(key);
658
+ }
659
+ this.removeAllListeners('removeListener');
660
+ this._events = Object.create(null);
661
+ this._eventsCount = 0;
662
+ return this;
663
+ }
664
+
665
+ listeners = events[type];
666
+
667
+ if (typeof listeners === 'function') {
668
+ this.removeListener(type, listeners);
669
+ } else if (listeners !== undefined) {
670
+ // LIFO order
671
+ for (i = listeners.length - 1; i >= 0; i--) {
672
+ this.removeListener(type, listeners[i]);
673
+ }
674
+ }
675
+
676
+ return this;
677
+ };
678
+
679
+ function _listeners(target, type, unwrap) {
680
+ var events = target._events;
681
+
682
+ if (events === undefined)
683
+ return [];
684
+
685
+ var evlistener = events[type];
686
+ if (evlistener === undefined)
687
+ return [];
688
+
689
+ if (typeof evlistener === 'function')
690
+ return unwrap ? [evlistener.listener || evlistener] : [evlistener];
691
+
692
+ return unwrap ?
693
+ unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
694
+ }
695
+
696
+ EventEmitter.prototype.listeners = function listeners(type) {
697
+ return _listeners(this, type, true);
698
+ };
699
+
700
+ EventEmitter.prototype.rawListeners = function rawListeners(type) {
701
+ return _listeners(this, type, false);
702
+ };
703
+
704
+ EventEmitter.listenerCount = function(emitter, type) {
705
+ if (typeof emitter.listenerCount === 'function') {
706
+ return emitter.listenerCount(type);
707
+ } else {
708
+ return listenerCount.call(emitter, type);
709
+ }
710
+ };
711
+
712
+ EventEmitter.prototype.listenerCount = listenerCount;
713
+ function listenerCount(type) {
714
+ var events = this._events;
715
+
716
+ if (events !== undefined) {
717
+ var evlistener = events[type];
718
+
719
+ if (typeof evlistener === 'function') {
720
+ return 1;
721
+ } else if (evlistener !== undefined) {
722
+ return evlistener.length;
723
+ }
724
+ }
725
+
726
+ return 0;
727
+ }
728
+
729
+ EventEmitter.prototype.eventNames = function eventNames() {
730
+ return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
731
+ };
732
+
733
+ function arrayClone(arr, n) {
734
+ var copy = new Array(n);
735
+ for (var i = 0; i < n; ++i)
736
+ copy[i] = arr[i];
737
+ return copy;
738
+ }
739
+
740
+ function spliceOne(list, index) {
741
+ for (; index + 1 < list.length; index++)
742
+ list[index] = list[index + 1];
743
+ list.pop();
744
+ }
745
+
746
+ function unwrapListeners(arr) {
747
+ var ret = new Array(arr.length);
748
+ for (var i = 0; i < ret.length; ++i) {
749
+ ret[i] = arr[i].listener || arr[i];
750
+ }
751
+ return ret;
752
+ }
753
+
754
+ function once(emitter, name) {
755
+ return new Promise(function (resolve, reject) {
756
+ function errorListener(err) {
757
+ emitter.removeListener(name, resolver);
758
+ reject(err);
759
+ }
760
+
761
+ function resolver() {
762
+ if (typeof emitter.removeListener === 'function') {
763
+ emitter.removeListener('error', errorListener);
764
+ }
765
+ resolve([].slice.call(arguments));
766
+ };
767
+
768
+ eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
769
+ if (name !== 'error') {
770
+ addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
771
+ }
772
+ });
773
+ }
774
+
775
+ function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
776
+ if (typeof emitter.on === 'function') {
777
+ eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
778
+ }
779
+ }
780
+
781
+ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
782
+ if (typeof emitter.on === 'function') {
783
+ if (flags.once) {
784
+ emitter.once(name, listener);
785
+ } else {
786
+ emitter.on(name, listener);
787
+ }
788
+ } else if (typeof emitter.addEventListener === 'function') {
789
+ // EventTarget does not have `error` event semantics like Node
790
+ // EventEmitters, we do not listen for `error` events here.
791
+ emitter.addEventListener(name, function wrapListener(arg) {
792
+ // IE does not have builtin `{ once: true }` support so we
793
+ // have to do it manually.
794
+ if (flags.once) {
795
+ emitter.removeEventListener(name, wrapListener);
796
+ }
797
+ listener(arg);
798
+ });
799
+ } else {
800
+ throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
801
+ }
802
+ }
803
+
804
+
805
+ /***/ }),
806
+
807
+ /***/ 7334:
808
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
809
+
810
+ module.exports = realpath
811
+ realpath.realpath = realpath
812
+ realpath.sync = realpathSync
813
+ realpath.realpathSync = realpathSync
814
+ realpath.monkeypatch = monkeypatch
815
+ realpath.unmonkeypatch = unmonkeypatch
816
+
817
+ var fs = __webpack_require__(6231)
818
+ var origRealpath = fs.realpath
819
+ var origRealpathSync = fs.realpathSync
820
+
821
+ var version = process.version
822
+ var ok = /^v[0-5]\./.test(version)
823
+ var old = __webpack_require__(7059)
824
+
825
+ function newError (er) {
826
+ return er && er.syscall === 'realpath' && (
827
+ er.code === 'ELOOP' ||
828
+ er.code === 'ENOMEM' ||
829
+ er.code === 'ENAMETOOLONG'
830
+ )
831
+ }
832
+
833
+ function realpath (p, cache, cb) {
834
+ if (ok) {
835
+ return origRealpath(p, cache, cb)
836
+ }
837
+
838
+ if (typeof cache === 'function') {
839
+ cb = cache
840
+ cache = null
841
+ }
842
+ origRealpath(p, cache, function (er, result) {
843
+ if (newError(er)) {
844
+ old.realpath(p, cache, cb)
845
+ } else {
846
+ cb(er, result)
847
+ }
848
+ })
849
+ }
850
+
851
+ function realpathSync (p, cache) {
852
+ if (ok) {
853
+ return origRealpathSync(p, cache)
854
+ }
855
+
856
+ try {
857
+ return origRealpathSync(p, cache)
858
+ } catch (er) {
859
+ if (newError(er)) {
860
+ return old.realpathSync(p, cache)
861
+ } else {
862
+ throw er
863
+ }
864
+ }
865
+ }
866
+
867
+ function monkeypatch () {
868
+ fs.realpath = realpath
869
+ fs.realpathSync = realpathSync
870
+ }
871
+
872
+ function unmonkeypatch () {
873
+ fs.realpath = origRealpath
874
+ fs.realpathSync = origRealpathSync
875
+ }
876
+
877
+
878
+ /***/ }),
879
+
880
+ /***/ 7059:
881
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
882
+
883
+ // Copyright Joyent, Inc. and other Node contributors.
884
+ //
885
+ // Permission is hereby granted, free of charge, to any person obtaining a
886
+ // copy of this software and associated documentation files (the
887
+ // "Software"), to deal in the Software without restriction, including
888
+ // without limitation the rights to use, copy, modify, merge, publish,
889
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
890
+ // persons to whom the Software is furnished to do so, subject to the
891
+ // following conditions:
892
+ //
893
+ // The above copyright notice and this permission notice shall be included
894
+ // in all copies or substantial portions of the Software.
895
+ //
896
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
897
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
898
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
899
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
900
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
901
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
902
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
903
+
904
+ var pathModule = __webpack_require__(1423);
905
+ var isWindows = process.platform === 'win32';
906
+ var fs = __webpack_require__(6231);
907
+
908
+ // JavaScript implementation of realpath, ported from node pre-v6
909
+
910
+ var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
911
+
912
+ function rethrow() {
913
+ // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and
914
+ // is fairly slow to generate.
915
+ var callback;
916
+ if (DEBUG) {
917
+ var backtrace = new Error;
918
+ callback = debugCallback;
919
+ } else
920
+ callback = missingCallback;
921
+
922
+ return callback;
923
+
924
+ function debugCallback(err) {
925
+ if (err) {
926
+ backtrace.message = err.message;
927
+ err = backtrace;
928
+ missingCallback(err);
929
+ }
930
+ }
931
+
932
+ function missingCallback(err) {
933
+ if (err) {
934
+ if (process.throwDeprecation)
935
+ throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs
936
+ else if (!process.noDeprecation) {
937
+ var msg = 'fs: missing callback ' + (err.stack || err.message);
938
+ if (process.traceDeprecation)
939
+ console.trace(msg);
940
+ else
941
+ console.error(msg);
942
+ }
943
+ }
944
+ }
945
+ }
946
+
947
+ function maybeCallback(cb) {
948
+ return typeof cb === 'function' ? cb : rethrow();
949
+ }
950
+
951
+ var normalize = pathModule.normalize;
952
+
953
+ // Regexp that finds the next partion of a (partial) path
954
+ // result is [base_with_slash, base], e.g. ['somedir/', 'somedir']
955
+ if (isWindows) {
956
+ var nextPartRe = /(.*?)(?:[\/\\]+|$)/g;
957
+ } else {
958
+ var nextPartRe = /(.*?)(?:[\/]+|$)/g;
959
+ }
960
+
961
+ // Regex to find the device root, including trailing slash. E.g. 'c:\\'.
962
+ if (isWindows) {
963
+ var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;
964
+ } else {
965
+ var splitRootRe = /^[\/]*/;
966
+ }
967
+
968
+ exports.realpathSync = function realpathSync(p, cache) {
969
+ // make p is absolute
970
+ p = pathModule.resolve(p);
971
+
972
+ if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
973
+ return cache[p];
974
+ }
975
+
976
+ var original = p,
977
+ seenLinks = {},
978
+ knownHard = {};
979
+
980
+ // current character position in p
981
+ var pos;
982
+ // the partial path so far, including a trailing slash if any
983
+ var current;
984
+ // the partial path without a trailing slash (except when pointing at a root)
985
+ var base;
986
+ // the partial path scanned in the previous round, with slash
987
+ var previous;
988
+
989
+ start();
990
+
991
+ function start() {
992
+ // Skip over roots
993
+ var m = splitRootRe.exec(p);
994
+ pos = m[0].length;
995
+ current = m[0];
996
+ base = m[0];
997
+ previous = '';
998
+
999
+ // On windows, check that the root exists. On unix there is no need.
1000
+ if (isWindows && !knownHard[base]) {
1001
+ fs.lstatSync(base);
1002
+ knownHard[base] = true;
1003
+ }
1004
+ }
1005
+
1006
+ // walk down the path, swapping out linked pathparts for their real
1007
+ // values
1008
+ // NB: p.length changes.
1009
+ while (pos < p.length) {
1010
+ // find the next part
1011
+ nextPartRe.lastIndex = pos;
1012
+ var result = nextPartRe.exec(p);
1013
+ previous = current;
1014
+ current += result[0];
1015
+ base = previous + result[1];
1016
+ pos = nextPartRe.lastIndex;
1017
+
1018
+ // continue if not a symlink
1019
+ if (knownHard[base] || (cache && cache[base] === base)) {
1020
+ continue;
1021
+ }
1022
+
1023
+ var resolvedLink;
1024
+ if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
1025
+ // some known symbolic link. no need to stat again.
1026
+ resolvedLink = cache[base];
1027
+ } else {
1028
+ var stat = fs.lstatSync(base);
1029
+ if (!stat.isSymbolicLink()) {
1030
+ knownHard[base] = true;
1031
+ if (cache) cache[base] = base;
1032
+ continue;
1033
+ }
1034
+
1035
+ // read the link if it wasn't read before
1036
+ // dev/ino always return 0 on windows, so skip the check.
1037
+ var linkTarget = null;
1038
+ if (!isWindows) {
1039
+ var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
1040
+ if (seenLinks.hasOwnProperty(id)) {
1041
+ linkTarget = seenLinks[id];
1042
+ }
1043
+ }
1044
+ if (linkTarget === null) {
1045
+ fs.statSync(base);
1046
+ linkTarget = fs.readlinkSync(base);
1047
+ }
1048
+ resolvedLink = pathModule.resolve(previous, linkTarget);
1049
+ // track this, if given a cache.
1050
+ if (cache) cache[base] = resolvedLink;
1051
+ if (!isWindows) seenLinks[id] = linkTarget;
1052
+ }
1053
+
1054
+ // resolve the link, then start over
1055
+ p = pathModule.resolve(resolvedLink, p.slice(pos));
1056
+ start();
1057
+ }
1058
+
1059
+ if (cache) cache[original] = p;
1060
+
1061
+ return p;
1062
+ };
1063
+
1064
+
1065
+ exports.realpath = function realpath(p, cache, cb) {
1066
+ if (typeof cb !== 'function') {
1067
+ cb = maybeCallback(cache);
1068
+ cache = null;
1069
+ }
1070
+
1071
+ // make p is absolute
1072
+ p = pathModule.resolve(p);
1073
+
1074
+ if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {
1075
+ return process.nextTick(cb.bind(null, null, cache[p]));
1076
+ }
1077
+
1078
+ var original = p,
1079
+ seenLinks = {},
1080
+ knownHard = {};
1081
+
1082
+ // current character position in p
1083
+ var pos;
1084
+ // the partial path so far, including a trailing slash if any
1085
+ var current;
1086
+ // the partial path without a trailing slash (except when pointing at a root)
1087
+ var base;
1088
+ // the partial path scanned in the previous round, with slash
1089
+ var previous;
1090
+
1091
+ start();
1092
+
1093
+ function start() {
1094
+ // Skip over roots
1095
+ var m = splitRootRe.exec(p);
1096
+ pos = m[0].length;
1097
+ current = m[0];
1098
+ base = m[0];
1099
+ previous = '';
1100
+
1101
+ // On windows, check that the root exists. On unix there is no need.
1102
+ if (isWindows && !knownHard[base]) {
1103
+ fs.lstat(base, function(err) {
1104
+ if (err) return cb(err);
1105
+ knownHard[base] = true;
1106
+ LOOP();
1107
+ });
1108
+ } else {
1109
+ process.nextTick(LOOP);
1110
+ }
1111
+ }
1112
+
1113
+ // walk down the path, swapping out linked pathparts for their real
1114
+ // values
1115
+ function LOOP() {
1116
+ // stop if scanned past end of path
1117
+ if (pos >= p.length) {
1118
+ if (cache) cache[original] = p;
1119
+ return cb(null, p);
1120
+ }
1121
+
1122
+ // find the next part
1123
+ nextPartRe.lastIndex = pos;
1124
+ var result = nextPartRe.exec(p);
1125
+ previous = current;
1126
+ current += result[0];
1127
+ base = previous + result[1];
1128
+ pos = nextPartRe.lastIndex;
1129
+
1130
+ // continue if not a symlink
1131
+ if (knownHard[base] || (cache && cache[base] === base)) {
1132
+ return process.nextTick(LOOP);
1133
+ }
1134
+
1135
+ if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {
1136
+ // known symbolic link. no need to stat again.
1137
+ return gotResolvedLink(cache[base]);
1138
+ }
1139
+
1140
+ return fs.lstat(base, gotStat);
1141
+ }
1142
+
1143
+ function gotStat(err, stat) {
1144
+ if (err) return cb(err);
1145
+
1146
+ // if not a symlink, skip to the next path part
1147
+ if (!stat.isSymbolicLink()) {
1148
+ knownHard[base] = true;
1149
+ if (cache) cache[base] = base;
1150
+ return process.nextTick(LOOP);
1151
+ }
1152
+
1153
+ // stat & read the link if not read before
1154
+ // call gotTarget as soon as the link target is known
1155
+ // dev/ino always return 0 on windows, so skip the check.
1156
+ if (!isWindows) {
1157
+ var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);
1158
+ if (seenLinks.hasOwnProperty(id)) {
1159
+ return gotTarget(null, seenLinks[id], base);
1160
+ }
1161
+ }
1162
+ fs.stat(base, function(err) {
1163
+ if (err) return cb(err);
1164
+
1165
+ fs.readlink(base, function(err, target) {
1166
+ if (!isWindows) seenLinks[id] = target;
1167
+ gotTarget(err, target);
1168
+ });
1169
+ });
1170
+ }
1171
+
1172
+ function gotTarget(err, target, base) {
1173
+ if (err) return cb(err);
1174
+
1175
+ var resolvedLink = pathModule.resolve(previous, target);
1176
+ if (cache) cache[base] = resolvedLink;
1177
+ gotResolvedLink(resolvedLink);
1178
+ }
1179
+
1180
+ function gotResolvedLink(resolvedLink) {
1181
+ // resolve the link, then start over
1182
+ p = pathModule.resolve(resolvedLink, p.slice(pos));
1183
+ start();
1184
+ }
1185
+ };
1186
+
1187
+
1188
+ /***/ }),
1189
+
1190
+ /***/ 6772:
1191
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1192
+
1193
+ exports.setopts = setopts
1194
+ exports.ownProp = ownProp
1195
+ exports.makeAbs = makeAbs
1196
+ exports.finish = finish
1197
+ exports.mark = mark
1198
+ exports.isIgnored = isIgnored
1199
+ exports.childrenIgnored = childrenIgnored
1200
+
1201
+ function ownProp (obj, field) {
1202
+ return Object.prototype.hasOwnProperty.call(obj, field)
1203
+ }
1204
+
1205
+ var fs = __webpack_require__(6231)
1206
+ var path = __webpack_require__(1423)
1207
+ var minimatch = __webpack_require__(1171)
1208
+ var isAbsolute = __webpack_require__(4095)
1209
+ var Minimatch = minimatch.Minimatch
1210
+
1211
+ function alphasort (a, b) {
1212
+ return a.localeCompare(b, 'en')
1213
+ }
1214
+
1215
+ function setupIgnores (self, options) {
1216
+ self.ignore = options.ignore || []
1217
+
1218
+ if (!Array.isArray(self.ignore))
1219
+ self.ignore = [self.ignore]
1220
+
1221
+ if (self.ignore.length) {
1222
+ self.ignore = self.ignore.map(ignoreMap)
1223
+ }
1224
+ }
1225
+
1226
+ // ignore patterns are always in dot:true mode.
1227
+ function ignoreMap (pattern) {
1228
+ var gmatcher = null
1229
+ if (pattern.slice(-3) === '/**') {
1230
+ var gpattern = pattern.replace(/(\/\*\*)+$/, '')
1231
+ gmatcher = new Minimatch(gpattern, { dot: true })
1232
+ }
1233
+
1234
+ return {
1235
+ matcher: new Minimatch(pattern, { dot: true }),
1236
+ gmatcher: gmatcher
1237
+ }
1238
+ }
1239
+
1240
+ function setopts (self, pattern, options) {
1241
+ if (!options)
1242
+ options = {}
1243
+
1244
+ // base-matching: just use globstar for that.
1245
+ if (options.matchBase && -1 === pattern.indexOf("/")) {
1246
+ if (options.noglobstar) {
1247
+ throw new Error("base matching requires globstar")
1248
+ }
1249
+ pattern = "**/" + pattern
1250
+ }
1251
+
1252
+ self.silent = !!options.silent
1253
+ self.pattern = pattern
1254
+ self.strict = options.strict !== false
1255
+ self.realpath = !!options.realpath
1256
+ self.realpathCache = options.realpathCache || Object.create(null)
1257
+ self.follow = !!options.follow
1258
+ self.dot = !!options.dot
1259
+ self.mark = !!options.mark
1260
+ self.nodir = !!options.nodir
1261
+ if (self.nodir)
1262
+ self.mark = true
1263
+ self.sync = !!options.sync
1264
+ self.nounique = !!options.nounique
1265
+ self.nonull = !!options.nonull
1266
+ self.nosort = !!options.nosort
1267
+ self.nocase = !!options.nocase
1268
+ self.stat = !!options.stat
1269
+ self.noprocess = !!options.noprocess
1270
+ self.absolute = !!options.absolute
1271
+ self.fs = options.fs || fs
1272
+
1273
+ self.maxLength = options.maxLength || Infinity
1274
+ self.cache = options.cache || Object.create(null)
1275
+ self.statCache = options.statCache || Object.create(null)
1276
+ self.symlinks = options.symlinks || Object.create(null)
1277
+
1278
+ setupIgnores(self, options)
1279
+
1280
+ self.changedCwd = false
1281
+ var cwd = process.cwd()
1282
+ if (!ownProp(options, "cwd"))
1283
+ self.cwd = cwd
1284
+ else {
1285
+ self.cwd = path.resolve(options.cwd)
1286
+ self.changedCwd = self.cwd !== cwd
1287
+ }
1288
+
1289
+ self.root = options.root || path.resolve(self.cwd, "/")
1290
+ self.root = path.resolve(self.root)
1291
+ if (process.platform === "win32")
1292
+ self.root = self.root.replace(/\\/g, "/")
1293
+
1294
+ // TODO: is an absolute `cwd` supposed to be resolved against `root`?
1295
+ // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')
1296
+ self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)
1297
+ if (process.platform === "win32")
1298
+ self.cwdAbs = self.cwdAbs.replace(/\\/g, "/")
1299
+ self.nomount = !!options.nomount
1300
+
1301
+ // disable comments and negation in Minimatch.
1302
+ // Note that they are not supported in Glob itself anyway.
1303
+ options.nonegate = true
1304
+ options.nocomment = true
1305
+
1306
+ self.minimatch = new Minimatch(pattern, options)
1307
+ self.options = self.minimatch.options
1308
+ }
1309
+
1310
+ function finish (self) {
1311
+ var nou = self.nounique
1312
+ var all = nou ? [] : Object.create(null)
1313
+
1314
+ for (var i = 0, l = self.matches.length; i < l; i ++) {
1315
+ var matches = self.matches[i]
1316
+ if (!matches || Object.keys(matches).length === 0) {
1317
+ if (self.nonull) {
1318
+ // do like the shell, and spit out the literal glob
1319
+ var literal = self.minimatch.globSet[i]
1320
+ if (nou)
1321
+ all.push(literal)
1322
+ else
1323
+ all[literal] = true
1324
+ }
1325
+ } else {
1326
+ // had matches
1327
+ var m = Object.keys(matches)
1328
+ if (nou)
1329
+ all.push.apply(all, m)
1330
+ else
1331
+ m.forEach(function (m) {
1332
+ all[m] = true
1333
+ })
1334
+ }
1335
+ }
1336
+
1337
+ if (!nou)
1338
+ all = Object.keys(all)
1339
+
1340
+ if (!self.nosort)
1341
+ all = all.sort(alphasort)
1342
+
1343
+ // at *some* point we statted all of these
1344
+ if (self.mark) {
1345
+ for (var i = 0; i < all.length; i++) {
1346
+ all[i] = self._mark(all[i])
1347
+ }
1348
+ if (self.nodir) {
1349
+ all = all.filter(function (e) {
1350
+ var notDir = !(/\/$/.test(e))
1351
+ var c = self.cache[e] || self.cache[makeAbs(self, e)]
1352
+ if (notDir && c)
1353
+ notDir = c !== 'DIR' && !Array.isArray(c)
1354
+ return notDir
1355
+ })
1356
+ }
1357
+ }
1358
+
1359
+ if (self.ignore.length)
1360
+ all = all.filter(function(m) {
1361
+ return !isIgnored(self, m)
1362
+ })
1363
+
1364
+ self.found = all
1365
+ }
1366
+
1367
+ function mark (self, p) {
1368
+ var abs = makeAbs(self, p)
1369
+ var c = self.cache[abs]
1370
+ var m = p
1371
+ if (c) {
1372
+ var isDir = c === 'DIR' || Array.isArray(c)
1373
+ var slash = p.slice(-1) === '/'
1374
+
1375
+ if (isDir && !slash)
1376
+ m += '/'
1377
+ else if (!isDir && slash)
1378
+ m = m.slice(0, -1)
1379
+
1380
+ if (m !== p) {
1381
+ var mabs = makeAbs(self, m)
1382
+ self.statCache[mabs] = self.statCache[abs]
1383
+ self.cache[mabs] = self.cache[abs]
1384
+ }
1385
+ }
1386
+
1387
+ return m
1388
+ }
1389
+
1390
+ // lotta situps...
1391
+ function makeAbs (self, f) {
1392
+ var abs = f
1393
+ if (f.charAt(0) === '/') {
1394
+ abs = path.join(self.root, f)
1395
+ } else if (isAbsolute(f) || f === '') {
1396
+ abs = f
1397
+ } else if (self.changedCwd) {
1398
+ abs = path.resolve(self.cwd, f)
1399
+ } else {
1400
+ abs = path.resolve(f)
1401
+ }
1402
+
1403
+ if (process.platform === 'win32')
1404
+ abs = abs.replace(/\\/g, '/')
1405
+
1406
+ return abs
1407
+ }
1408
+
1409
+
1410
+ // Return true, if pattern ends with globstar '**', for the accompanying parent directory.
1411
+ // Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents
1412
+ function isIgnored (self, path) {
1413
+ if (!self.ignore.length)
1414
+ return false
1415
+
1416
+ return self.ignore.some(function(item) {
1417
+ return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))
1418
+ })
1419
+ }
1420
+
1421
+ function childrenIgnored (self, path) {
1422
+ if (!self.ignore.length)
1423
+ return false
1424
+
1425
+ return self.ignore.some(function(item) {
1426
+ return !!(item.gmatcher && item.gmatcher.match(path))
1427
+ })
1428
+ }
1429
+
1430
+
1431
+ /***/ }),
1432
+
1433
+ /***/ 2884:
1434
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1435
+
1436
+ // Approach:
1437
+ //
1438
+ // 1. Get the minimatch set
1439
+ // 2. For each pattern in the set, PROCESS(pattern, false)
1440
+ // 3. Store matches per-set, then uniq them
1441
+ //
1442
+ // PROCESS(pattern, inGlobStar)
1443
+ // Get the first [n] items from pattern that are all strings
1444
+ // Join these together. This is PREFIX.
1445
+ // If there is no more remaining, then stat(PREFIX) and
1446
+ // add to matches if it succeeds. END.
1447
+ //
1448
+ // If inGlobStar and PREFIX is symlink and points to dir
1449
+ // set ENTRIES = []
1450
+ // else readdir(PREFIX) as ENTRIES
1451
+ // If fail, END
1452
+ //
1453
+ // with ENTRIES
1454
+ // If pattern[n] is GLOBSTAR
1455
+ // // handle the case where the globstar match is empty
1456
+ // // by pruning it out, and testing the resulting pattern
1457
+ // PROCESS(pattern[0..n] + pattern[n+1 .. $], false)
1458
+ // // handle other cases.
1459
+ // for ENTRY in ENTRIES (not dotfiles)
1460
+ // // attach globstar + tail onto the entry
1461
+ // // Mark that this entry is a globstar match
1462
+ // PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)
1463
+ //
1464
+ // else // not globstar
1465
+ // for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
1466
+ // Test ENTRY against pattern[n]
1467
+ // If fails, continue
1468
+ // If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
1469
+ //
1470
+ // Caveat:
1471
+ // Cache all stats and readdirs results to minimize syscall. Since all
1472
+ // we ever care about is existence and directory-ness, we can just keep
1473
+ // `true` for files, and [children,...] for directories, or `false` for
1474
+ // things that don't exist.
1475
+
1476
+ module.exports = glob
1477
+
1478
+ var rp = __webpack_require__(7334)
1479
+ var minimatch = __webpack_require__(1171)
1480
+ var Minimatch = minimatch.Minimatch
1481
+ var inherits = __webpack_require__(5717)
1482
+ var EE = (__webpack_require__(7187).EventEmitter)
1483
+ var path = __webpack_require__(1423)
1484
+ var assert = __webpack_require__(9084)
1485
+ var isAbsolute = __webpack_require__(4095)
1486
+ var globSync = __webpack_require__(4751)
1487
+ var common = __webpack_require__(6772)
1488
+ var setopts = common.setopts
1489
+ var ownProp = common.ownProp
1490
+ var inflight = __webpack_require__(7844)
1491
+ var util = __webpack_require__(6464)
1492
+ var childrenIgnored = common.childrenIgnored
1493
+ var isIgnored = common.isIgnored
1494
+
1495
+ var once = __webpack_require__(778)
1496
+
1497
+ function glob (pattern, options, cb) {
1498
+ if (typeof options === 'function') cb = options, options = {}
1499
+ if (!options) options = {}
1500
+
1501
+ if (options.sync) {
1502
+ if (cb)
1503
+ throw new TypeError('callback provided to sync glob')
1504
+ return globSync(pattern, options)
1505
+ }
1506
+
1507
+ return new Glob(pattern, options, cb)
1508
+ }
1509
+
1510
+ glob.sync = globSync
1511
+ var GlobSync = glob.GlobSync = globSync.GlobSync
1512
+
1513
+ // old api surface
1514
+ glob.glob = glob
1515
+
1516
+ function extend (origin, add) {
1517
+ if (add === null || typeof add !== 'object') {
1518
+ return origin
1519
+ }
1520
+
1521
+ var keys = Object.keys(add)
1522
+ var i = keys.length
1523
+ while (i--) {
1524
+ origin[keys[i]] = add[keys[i]]
1525
+ }
1526
+ return origin
1527
+ }
1528
+
1529
+ glob.hasMagic = function (pattern, options_) {
1530
+ var options = extend({}, options_)
1531
+ options.noprocess = true
1532
+
1533
+ var g = new Glob(pattern, options)
1534
+ var set = g.minimatch.set
1535
+
1536
+ if (!pattern)
1537
+ return false
1538
+
1539
+ if (set.length > 1)
1540
+ return true
1541
+
1542
+ for (var j = 0; j < set[0].length; j++) {
1543
+ if (typeof set[0][j] !== 'string')
1544
+ return true
1545
+ }
1546
+
1547
+ return false
1548
+ }
1549
+
1550
+ glob.Glob = Glob
1551
+ inherits(Glob, EE)
1552
+ function Glob (pattern, options, cb) {
1553
+ if (typeof options === 'function') {
1554
+ cb = options
1555
+ options = null
1556
+ }
1557
+
1558
+ if (options && options.sync) {
1559
+ if (cb)
1560
+ throw new TypeError('callback provided to sync glob')
1561
+ return new GlobSync(pattern, options)
1562
+ }
1563
+
1564
+ if (!(this instanceof Glob))
1565
+ return new Glob(pattern, options, cb)
1566
+
1567
+ setopts(this, pattern, options)
1568
+ this._didRealPath = false
1569
+
1570
+ // process each pattern in the minimatch set
1571
+ var n = this.minimatch.set.length
1572
+
1573
+ // The matches are stored as {<filename>: true,...} so that
1574
+ // duplicates are automagically pruned.
1575
+ // Later, we do an Object.keys() on these.
1576
+ // Keep them as a list so we can fill in when nonull is set.
1577
+ this.matches = new Array(n)
1578
+
1579
+ if (typeof cb === 'function') {
1580
+ cb = once(cb)
1581
+ this.on('error', cb)
1582
+ this.on('end', function (matches) {
1583
+ cb(null, matches)
1584
+ })
1585
+ }
1586
+
1587
+ var self = this
1588
+ this._processing = 0
1589
+
1590
+ this._emitQueue = []
1591
+ this._processQueue = []
1592
+ this.paused = false
1593
+
1594
+ if (this.noprocess)
1595
+ return this
1596
+
1597
+ if (n === 0)
1598
+ return done()
1599
+
1600
+ var sync = true
1601
+ for (var i = 0; i < n; i ++) {
1602
+ this._process(this.minimatch.set[i], i, false, done)
1603
+ }
1604
+ sync = false
1605
+
1606
+ function done () {
1607
+ --self._processing
1608
+ if (self._processing <= 0) {
1609
+ if (sync) {
1610
+ process.nextTick(function () {
1611
+ self._finish()
1612
+ })
1613
+ } else {
1614
+ self._finish()
1615
+ }
1616
+ }
1617
+ }
1618
+ }
1619
+
1620
+ Glob.prototype._finish = function () {
1621
+ assert(this instanceof Glob)
1622
+ if (this.aborted)
1623
+ return
1624
+
1625
+ if (this.realpath && !this._didRealpath)
1626
+ return this._realpath()
1627
+
1628
+ common.finish(this)
1629
+ this.emit('end', this.found)
1630
+ }
1631
+
1632
+ Glob.prototype._realpath = function () {
1633
+ if (this._didRealpath)
1634
+ return
1635
+
1636
+ this._didRealpath = true
1637
+
1638
+ var n = this.matches.length
1639
+ if (n === 0)
1640
+ return this._finish()
1641
+
1642
+ var self = this
1643
+ for (var i = 0; i < this.matches.length; i++)
1644
+ this._realpathSet(i, next)
1645
+
1646
+ function next () {
1647
+ if (--n === 0)
1648
+ self._finish()
1649
+ }
1650
+ }
1651
+
1652
+ Glob.prototype._realpathSet = function (index, cb) {
1653
+ var matchset = this.matches[index]
1654
+ if (!matchset)
1655
+ return cb()
1656
+
1657
+ var found = Object.keys(matchset)
1658
+ var self = this
1659
+ var n = found.length
1660
+
1661
+ if (n === 0)
1662
+ return cb()
1663
+
1664
+ var set = this.matches[index] = Object.create(null)
1665
+ found.forEach(function (p, i) {
1666
+ // If there's a problem with the stat, then it means that
1667
+ // one or more of the links in the realpath couldn't be
1668
+ // resolved. just return the abs value in that case.
1669
+ p = self._makeAbs(p)
1670
+ rp.realpath(p, self.realpathCache, function (er, real) {
1671
+ if (!er)
1672
+ set[real] = true
1673
+ else if (er.syscall === 'stat')
1674
+ set[p] = true
1675
+ else
1676
+ self.emit('error', er) // srsly wtf right here
1677
+
1678
+ if (--n === 0) {
1679
+ self.matches[index] = set
1680
+ cb()
1681
+ }
1682
+ })
1683
+ })
1684
+ }
1685
+
1686
+ Glob.prototype._mark = function (p) {
1687
+ return common.mark(this, p)
1688
+ }
1689
+
1690
+ Glob.prototype._makeAbs = function (f) {
1691
+ return common.makeAbs(this, f)
1692
+ }
1693
+
1694
+ Glob.prototype.abort = function () {
1695
+ this.aborted = true
1696
+ this.emit('abort')
1697
+ }
1698
+
1699
+ Glob.prototype.pause = function () {
1700
+ if (!this.paused) {
1701
+ this.paused = true
1702
+ this.emit('pause')
1703
+ }
1704
+ }
1705
+
1706
+ Glob.prototype.resume = function () {
1707
+ if (this.paused) {
1708
+ this.emit('resume')
1709
+ this.paused = false
1710
+ if (this._emitQueue.length) {
1711
+ var eq = this._emitQueue.slice(0)
1712
+ this._emitQueue.length = 0
1713
+ for (var i = 0; i < eq.length; i ++) {
1714
+ var e = eq[i]
1715
+ this._emitMatch(e[0], e[1])
1716
+ }
1717
+ }
1718
+ if (this._processQueue.length) {
1719
+ var pq = this._processQueue.slice(0)
1720
+ this._processQueue.length = 0
1721
+ for (var i = 0; i < pq.length; i ++) {
1722
+ var p = pq[i]
1723
+ this._processing--
1724
+ this._process(p[0], p[1], p[2], p[3])
1725
+ }
1726
+ }
1727
+ }
1728
+ }
1729
+
1730
+ Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
1731
+ assert(this instanceof Glob)
1732
+ assert(typeof cb === 'function')
1733
+
1734
+ if (this.aborted)
1735
+ return
1736
+
1737
+ this._processing++
1738
+ if (this.paused) {
1739
+ this._processQueue.push([pattern, index, inGlobStar, cb])
1740
+ return
1741
+ }
1742
+
1743
+ //console.error('PROCESS %d', this._processing, pattern)
1744
+
1745
+ // Get the first [n] parts of pattern that are all strings.
1746
+ var n = 0
1747
+ while (typeof pattern[n] === 'string') {
1748
+ n ++
1749
+ }
1750
+ // now n is the index of the first one that is *not* a string.
1751
+
1752
+ // see if there's anything else
1753
+ var prefix
1754
+ switch (n) {
1755
+ // if not, then this is rather simple
1756
+ case pattern.length:
1757
+ this._processSimple(pattern.join('/'), index, cb)
1758
+ return
1759
+
1760
+ case 0:
1761
+ // pattern *starts* with some non-trivial item.
1762
+ // going to readdir(cwd), but not include the prefix in matches.
1763
+ prefix = null
1764
+ break
1765
+
1766
+ default:
1767
+ // pattern has some string bits in the front.
1768
+ // whatever it starts with, whether that's 'absolute' like /foo/bar,
1769
+ // or 'relative' like '../baz'
1770
+ prefix = pattern.slice(0, n).join('/')
1771
+ break
1772
+ }
1773
+
1774
+ var remain = pattern.slice(n)
1775
+
1776
+ // get the list of entries.
1777
+ var read
1778
+ if (prefix === null)
1779
+ read = '.'
1780
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
1781
+ if (!prefix || !isAbsolute(prefix))
1782
+ prefix = '/' + prefix
1783
+ read = prefix
1784
+ } else
1785
+ read = prefix
1786
+
1787
+ var abs = this._makeAbs(read)
1788
+
1789
+ //if ignored, skip _processing
1790
+ if (childrenIgnored(this, read))
1791
+ return cb()
1792
+
1793
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR
1794
+ if (isGlobStar)
1795
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)
1796
+ else
1797
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)
1798
+ }
1799
+
1800
+ Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {
1801
+ var self = this
1802
+ this._readdir(abs, inGlobStar, function (er, entries) {
1803
+ return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
1804
+ })
1805
+ }
1806
+
1807
+ Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
1808
+
1809
+ // if the abs isn't a dir, then nothing can match!
1810
+ if (!entries)
1811
+ return cb()
1812
+
1813
+ // It will only match dot entries if it starts with a dot, or if
1814
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
1815
+ var pn = remain[0]
1816
+ var negate = !!this.minimatch.negate
1817
+ var rawGlob = pn._glob
1818
+ var dotOk = this.dot || rawGlob.charAt(0) === '.'
1819
+
1820
+ var matchedEntries = []
1821
+ for (var i = 0; i < entries.length; i++) {
1822
+ var e = entries[i]
1823
+ if (e.charAt(0) !== '.' || dotOk) {
1824
+ var m
1825
+ if (negate && !prefix) {
1826
+ m = !e.match(pn)
1827
+ } else {
1828
+ m = e.match(pn)
1829
+ }
1830
+ if (m)
1831
+ matchedEntries.push(e)
1832
+ }
1833
+ }
1834
+
1835
+ //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)
1836
+
1837
+ var len = matchedEntries.length
1838
+ // If there are no matched entries, then nothing matches.
1839
+ if (len === 0)
1840
+ return cb()
1841
+
1842
+ // if this is the last remaining pattern bit, then no need for
1843
+ // an additional stat *unless* the user has specified mark or
1844
+ // stat explicitly. We know they exist, since readdir returned
1845
+ // them.
1846
+
1847
+ if (remain.length === 1 && !this.mark && !this.stat) {
1848
+ if (!this.matches[index])
1849
+ this.matches[index] = Object.create(null)
1850
+
1851
+ for (var i = 0; i < len; i ++) {
1852
+ var e = matchedEntries[i]
1853
+ if (prefix) {
1854
+ if (prefix !== '/')
1855
+ e = prefix + '/' + e
1856
+ else
1857
+ e = prefix + e
1858
+ }
1859
+
1860
+ if (e.charAt(0) === '/' && !this.nomount) {
1861
+ e = path.join(this.root, e)
1862
+ }
1863
+ this._emitMatch(index, e)
1864
+ }
1865
+ // This was the last one, and no stats were needed
1866
+ return cb()
1867
+ }
1868
+
1869
+ // now test all matched entries as stand-ins for that part
1870
+ // of the pattern.
1871
+ remain.shift()
1872
+ for (var i = 0; i < len; i ++) {
1873
+ var e = matchedEntries[i]
1874
+ var newPattern
1875
+ if (prefix) {
1876
+ if (prefix !== '/')
1877
+ e = prefix + '/' + e
1878
+ else
1879
+ e = prefix + e
1880
+ }
1881
+ this._process([e].concat(remain), index, inGlobStar, cb)
1882
+ }
1883
+ cb()
1884
+ }
1885
+
1886
+ Glob.prototype._emitMatch = function (index, e) {
1887
+ if (this.aborted)
1888
+ return
1889
+
1890
+ if (isIgnored(this, e))
1891
+ return
1892
+
1893
+ if (this.paused) {
1894
+ this._emitQueue.push([index, e])
1895
+ return
1896
+ }
1897
+
1898
+ var abs = isAbsolute(e) ? e : this._makeAbs(e)
1899
+
1900
+ if (this.mark)
1901
+ e = this._mark(e)
1902
+
1903
+ if (this.absolute)
1904
+ e = abs
1905
+
1906
+ if (this.matches[index][e])
1907
+ return
1908
+
1909
+ if (this.nodir) {
1910
+ var c = this.cache[abs]
1911
+ if (c === 'DIR' || Array.isArray(c))
1912
+ return
1913
+ }
1914
+
1915
+ this.matches[index][e] = true
1916
+
1917
+ var st = this.statCache[abs]
1918
+ if (st)
1919
+ this.emit('stat', e, st)
1920
+
1921
+ this.emit('match', e)
1922
+ }
1923
+
1924
+ Glob.prototype._readdirInGlobStar = function (abs, cb) {
1925
+ if (this.aborted)
1926
+ return
1927
+
1928
+ // follow all symlinked directories forever
1929
+ // just proceed as if this is a non-globstar situation
1930
+ if (this.follow)
1931
+ return this._readdir(abs, false, cb)
1932
+
1933
+ var lstatkey = 'lstat\0' + abs
1934
+ var self = this
1935
+ var lstatcb = inflight(lstatkey, lstatcb_)
1936
+
1937
+ if (lstatcb)
1938
+ self.fs.lstat(abs, lstatcb)
1939
+
1940
+ function lstatcb_ (er, lstat) {
1941
+ if (er && er.code === 'ENOENT')
1942
+ return cb()
1943
+
1944
+ var isSym = lstat && lstat.isSymbolicLink()
1945
+ self.symlinks[abs] = isSym
1946
+
1947
+ // If it's not a symlink or a dir, then it's definitely a regular file.
1948
+ // don't bother doing a readdir in that case.
1949
+ if (!isSym && lstat && !lstat.isDirectory()) {
1950
+ self.cache[abs] = 'FILE'
1951
+ cb()
1952
+ } else
1953
+ self._readdir(abs, false, cb)
1954
+ }
1955
+ }
1956
+
1957
+ Glob.prototype._readdir = function (abs, inGlobStar, cb) {
1958
+ if (this.aborted)
1959
+ return
1960
+
1961
+ cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb)
1962
+ if (!cb)
1963
+ return
1964
+
1965
+ //console.error('RD %j %j', +inGlobStar, abs)
1966
+ if (inGlobStar && !ownProp(this.symlinks, abs))
1967
+ return this._readdirInGlobStar(abs, cb)
1968
+
1969
+ if (ownProp(this.cache, abs)) {
1970
+ var c = this.cache[abs]
1971
+ if (!c || c === 'FILE')
1972
+ return cb()
1973
+
1974
+ if (Array.isArray(c))
1975
+ return cb(null, c)
1976
+ }
1977
+
1978
+ var self = this
1979
+ self.fs.readdir(abs, readdirCb(this, abs, cb))
1980
+ }
1981
+
1982
+ function readdirCb (self, abs, cb) {
1983
+ return function (er, entries) {
1984
+ if (er)
1985
+ self._readdirError(abs, er, cb)
1986
+ else
1987
+ self._readdirEntries(abs, entries, cb)
1988
+ }
1989
+ }
1990
+
1991
+ Glob.prototype._readdirEntries = function (abs, entries, cb) {
1992
+ if (this.aborted)
1993
+ return
1994
+
1995
+ // if we haven't asked to stat everything, then just
1996
+ // assume that everything in there exists, so we can avoid
1997
+ // having to stat it a second time.
1998
+ if (!this.mark && !this.stat) {
1999
+ for (var i = 0; i < entries.length; i ++) {
2000
+ var e = entries[i]
2001
+ if (abs === '/')
2002
+ e = abs + e
2003
+ else
2004
+ e = abs + '/' + e
2005
+ this.cache[e] = true
2006
+ }
2007
+ }
2008
+
2009
+ this.cache[abs] = entries
2010
+ return cb(null, entries)
2011
+ }
2012
+
2013
+ Glob.prototype._readdirError = function (f, er, cb) {
2014
+ if (this.aborted)
2015
+ return
2016
+
2017
+ // handle errors, and cache the information
2018
+ switch (er.code) {
2019
+ case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
2020
+ case 'ENOTDIR': // totally normal. means it *does* exist.
2021
+ var abs = this._makeAbs(f)
2022
+ this.cache[abs] = 'FILE'
2023
+ if (abs === this.cwdAbs) {
2024
+ var error = new Error(er.code + ' invalid cwd ' + this.cwd)
2025
+ error.path = this.cwd
2026
+ error.code = er.code
2027
+ this.emit('error', error)
2028
+ this.abort()
2029
+ }
2030
+ break
2031
+
2032
+ case 'ENOENT': // not terribly unusual
2033
+ case 'ELOOP':
2034
+ case 'ENAMETOOLONG':
2035
+ case 'UNKNOWN':
2036
+ this.cache[this._makeAbs(f)] = false
2037
+ break
2038
+
2039
+ default: // some unusual error. Treat as failure.
2040
+ this.cache[this._makeAbs(f)] = false
2041
+ if (this.strict) {
2042
+ this.emit('error', er)
2043
+ // If the error is handled, then we abort
2044
+ // if not, we threw out of here
2045
+ this.abort()
2046
+ }
2047
+ if (!this.silent)
2048
+ console.error('glob error', er)
2049
+ break
2050
+ }
2051
+
2052
+ return cb()
2053
+ }
2054
+
2055
+ Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {
2056
+ var self = this
2057
+ this._readdir(abs, inGlobStar, function (er, entries) {
2058
+ self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
2059
+ })
2060
+ }
2061
+
2062
+
2063
+ Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
2064
+ //console.error('pgs2', prefix, remain[0], entries)
2065
+
2066
+ // no entries means not a dir, so it can never have matches
2067
+ // foo.txt/** doesn't match foo.txt
2068
+ if (!entries)
2069
+ return cb()
2070
+
2071
+ // test without the globstar, and with every child both below
2072
+ // and replacing the globstar.
2073
+ var remainWithoutGlobStar = remain.slice(1)
2074
+ var gspref = prefix ? [ prefix ] : []
2075
+ var noGlobStar = gspref.concat(remainWithoutGlobStar)
2076
+
2077
+ // the noGlobStar pattern exits the inGlobStar state
2078
+ this._process(noGlobStar, index, false, cb)
2079
+
2080
+ var isSym = this.symlinks[abs]
2081
+ var len = entries.length
2082
+
2083
+ // If it's a symlink, and we're in a globstar, then stop
2084
+ if (isSym && inGlobStar)
2085
+ return cb()
2086
+
2087
+ for (var i = 0; i < len; i++) {
2088
+ var e = entries[i]
2089
+ if (e.charAt(0) === '.' && !this.dot)
2090
+ continue
2091
+
2092
+ // these two cases enter the inGlobStar state
2093
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar)
2094
+ this._process(instead, index, true, cb)
2095
+
2096
+ var below = gspref.concat(entries[i], remain)
2097
+ this._process(below, index, true, cb)
2098
+ }
2099
+
2100
+ cb()
2101
+ }
2102
+
2103
+ Glob.prototype._processSimple = function (prefix, index, cb) {
2104
+ // XXX review this. Shouldn't it be doing the mounting etc
2105
+ // before doing stat? kinda weird?
2106
+ var self = this
2107
+ this._stat(prefix, function (er, exists) {
2108
+ self._processSimple2(prefix, index, er, exists, cb)
2109
+ })
2110
+ }
2111
+ Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {
2112
+
2113
+ //console.error('ps2', prefix, exists)
2114
+
2115
+ if (!this.matches[index])
2116
+ this.matches[index] = Object.create(null)
2117
+
2118
+ // If it doesn't exist, then just mark the lack of results
2119
+ if (!exists)
2120
+ return cb()
2121
+
2122
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
2123
+ var trail = /[\/\\]$/.test(prefix)
2124
+ if (prefix.charAt(0) === '/') {
2125
+ prefix = path.join(this.root, prefix)
2126
+ } else {
2127
+ prefix = path.resolve(this.root, prefix)
2128
+ if (trail)
2129
+ prefix += '/'
2130
+ }
2131
+ }
2132
+
2133
+ if (process.platform === 'win32')
2134
+ prefix = prefix.replace(/\\/g, '/')
2135
+
2136
+ // Mark this as a match
2137
+ this._emitMatch(index, prefix)
2138
+ cb()
2139
+ }
2140
+
2141
+ // Returns either 'DIR', 'FILE', or false
2142
+ Glob.prototype._stat = function (f, cb) {
2143
+ var abs = this._makeAbs(f)
2144
+ var needDir = f.slice(-1) === '/'
2145
+
2146
+ if (f.length > this.maxLength)
2147
+ return cb()
2148
+
2149
+ if (!this.stat && ownProp(this.cache, abs)) {
2150
+ var c = this.cache[abs]
2151
+
2152
+ if (Array.isArray(c))
2153
+ c = 'DIR'
2154
+
2155
+ // It exists, but maybe not how we need it
2156
+ if (!needDir || c === 'DIR')
2157
+ return cb(null, c)
2158
+
2159
+ if (needDir && c === 'FILE')
2160
+ return cb()
2161
+
2162
+ // otherwise we have to stat, because maybe c=true
2163
+ // if we know it exists, but not what it is.
2164
+ }
2165
+
2166
+ var exists
2167
+ var stat = this.statCache[abs]
2168
+ if (stat !== undefined) {
2169
+ if (stat === false)
2170
+ return cb(null, stat)
2171
+ else {
2172
+ var type = stat.isDirectory() ? 'DIR' : 'FILE'
2173
+ if (needDir && type === 'FILE')
2174
+ return cb()
2175
+ else
2176
+ return cb(null, type, stat)
2177
+ }
2178
+ }
2179
+
2180
+ var self = this
2181
+ var statcb = inflight('stat\0' + abs, lstatcb_)
2182
+ if (statcb)
2183
+ self.fs.lstat(abs, statcb)
2184
+
2185
+ function lstatcb_ (er, lstat) {
2186
+ if (lstat && lstat.isSymbolicLink()) {
2187
+ // If it's a symlink, then treat it as the target, unless
2188
+ // the target does not exist, then treat it as a file.
2189
+ return self.fs.stat(abs, function (er, stat) {
2190
+ if (er)
2191
+ self._stat2(f, abs, null, lstat, cb)
2192
+ else
2193
+ self._stat2(f, abs, er, stat, cb)
2194
+ })
2195
+ } else {
2196
+ self._stat2(f, abs, er, lstat, cb)
2197
+ }
2198
+ }
2199
+ }
2200
+
2201
+ Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
2202
+ if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
2203
+ this.statCache[abs] = false
2204
+ return cb()
2205
+ }
2206
+
2207
+ var needDir = f.slice(-1) === '/'
2208
+ this.statCache[abs] = stat
2209
+
2210
+ if (abs.slice(-1) === '/' && stat && !stat.isDirectory())
2211
+ return cb(null, false, stat)
2212
+
2213
+ var c = true
2214
+ if (stat)
2215
+ c = stat.isDirectory() ? 'DIR' : 'FILE'
2216
+ this.cache[abs] = this.cache[abs] || c
2217
+
2218
+ if (needDir && c === 'FILE')
2219
+ return cb()
2220
+
2221
+ return cb(null, c, stat)
2222
+ }
2223
+
2224
+
2225
+ /***/ }),
2226
+
2227
+ /***/ 4751:
2228
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2229
+
2230
+ module.exports = globSync
2231
+ globSync.GlobSync = GlobSync
2232
+
2233
+ var rp = __webpack_require__(7334)
2234
+ var minimatch = __webpack_require__(1171)
2235
+ var Minimatch = minimatch.Minimatch
2236
+ var Glob = (__webpack_require__(2884).Glob)
2237
+ var util = __webpack_require__(6464)
2238
+ var path = __webpack_require__(1423)
2239
+ var assert = __webpack_require__(9084)
2240
+ var isAbsolute = __webpack_require__(4095)
2241
+ var common = __webpack_require__(6772)
2242
+ var setopts = common.setopts
2243
+ var ownProp = common.ownProp
2244
+ var childrenIgnored = common.childrenIgnored
2245
+ var isIgnored = common.isIgnored
2246
+
2247
+ function globSync (pattern, options) {
2248
+ if (typeof options === 'function' || arguments.length === 3)
2249
+ throw new TypeError('callback provided to sync glob\n'+
2250
+ 'See: https://github.com/isaacs/node-glob/issues/167')
2251
+
2252
+ return new GlobSync(pattern, options).found
2253
+ }
2254
+
2255
+ function GlobSync (pattern, options) {
2256
+ if (!pattern)
2257
+ throw new Error('must provide pattern')
2258
+
2259
+ if (typeof options === 'function' || arguments.length === 3)
2260
+ throw new TypeError('callback provided to sync glob\n'+
2261
+ 'See: https://github.com/isaacs/node-glob/issues/167')
2262
+
2263
+ if (!(this instanceof GlobSync))
2264
+ return new GlobSync(pattern, options)
2265
+
2266
+ setopts(this, pattern, options)
2267
+
2268
+ if (this.noprocess)
2269
+ return this
2270
+
2271
+ var n = this.minimatch.set.length
2272
+ this.matches = new Array(n)
2273
+ for (var i = 0; i < n; i ++) {
2274
+ this._process(this.minimatch.set[i], i, false)
2275
+ }
2276
+ this._finish()
2277
+ }
2278
+
2279
+ GlobSync.prototype._finish = function () {
2280
+ assert(this instanceof GlobSync)
2281
+ if (this.realpath) {
2282
+ var self = this
2283
+ this.matches.forEach(function (matchset, index) {
2284
+ var set = self.matches[index] = Object.create(null)
2285
+ for (var p in matchset) {
2286
+ try {
2287
+ p = self._makeAbs(p)
2288
+ var real = rp.realpathSync(p, self.realpathCache)
2289
+ set[real] = true
2290
+ } catch (er) {
2291
+ if (er.syscall === 'stat')
2292
+ set[self._makeAbs(p)] = true
2293
+ else
2294
+ throw er
2295
+ }
2296
+ }
2297
+ })
2298
+ }
2299
+ common.finish(this)
2300
+ }
2301
+
2302
+
2303
+ GlobSync.prototype._process = function (pattern, index, inGlobStar) {
2304
+ assert(this instanceof GlobSync)
2305
+
2306
+ // Get the first [n] parts of pattern that are all strings.
2307
+ var n = 0
2308
+ while (typeof pattern[n] === 'string') {
2309
+ n ++
2310
+ }
2311
+ // now n is the index of the first one that is *not* a string.
2312
+
2313
+ // See if there's anything else
2314
+ var prefix
2315
+ switch (n) {
2316
+ // if not, then this is rather simple
2317
+ case pattern.length:
2318
+ this._processSimple(pattern.join('/'), index)
2319
+ return
2320
+
2321
+ case 0:
2322
+ // pattern *starts* with some non-trivial item.
2323
+ // going to readdir(cwd), but not include the prefix in matches.
2324
+ prefix = null
2325
+ break
2326
+
2327
+ default:
2328
+ // pattern has some string bits in the front.
2329
+ // whatever it starts with, whether that's 'absolute' like /foo/bar,
2330
+ // or 'relative' like '../baz'
2331
+ prefix = pattern.slice(0, n).join('/')
2332
+ break
2333
+ }
2334
+
2335
+ var remain = pattern.slice(n)
2336
+
2337
+ // get the list of entries.
2338
+ var read
2339
+ if (prefix === null)
2340
+ read = '.'
2341
+ else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
2342
+ if (!prefix || !isAbsolute(prefix))
2343
+ prefix = '/' + prefix
2344
+ read = prefix
2345
+ } else
2346
+ read = prefix
2347
+
2348
+ var abs = this._makeAbs(read)
2349
+
2350
+ //if ignored, skip processing
2351
+ if (childrenIgnored(this, read))
2352
+ return
2353
+
2354
+ var isGlobStar = remain[0] === minimatch.GLOBSTAR
2355
+ if (isGlobStar)
2356
+ this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)
2357
+ else
2358
+ this._processReaddir(prefix, read, abs, remain, index, inGlobStar)
2359
+ }
2360
+
2361
+
2362
+ GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {
2363
+ var entries = this._readdir(abs, inGlobStar)
2364
+
2365
+ // if the abs isn't a dir, then nothing can match!
2366
+ if (!entries)
2367
+ return
2368
+
2369
+ // It will only match dot entries if it starts with a dot, or if
2370
+ // dot is set. Stuff like @(.foo|.bar) isn't allowed.
2371
+ var pn = remain[0]
2372
+ var negate = !!this.minimatch.negate
2373
+ var rawGlob = pn._glob
2374
+ var dotOk = this.dot || rawGlob.charAt(0) === '.'
2375
+
2376
+ var matchedEntries = []
2377
+ for (var i = 0; i < entries.length; i++) {
2378
+ var e = entries[i]
2379
+ if (e.charAt(0) !== '.' || dotOk) {
2380
+ var m
2381
+ if (negate && !prefix) {
2382
+ m = !e.match(pn)
2383
+ } else {
2384
+ m = e.match(pn)
2385
+ }
2386
+ if (m)
2387
+ matchedEntries.push(e)
2388
+ }
2389
+ }
2390
+
2391
+ var len = matchedEntries.length
2392
+ // If there are no matched entries, then nothing matches.
2393
+ if (len === 0)
2394
+ return
2395
+
2396
+ // if this is the last remaining pattern bit, then no need for
2397
+ // an additional stat *unless* the user has specified mark or
2398
+ // stat explicitly. We know they exist, since readdir returned
2399
+ // them.
2400
+
2401
+ if (remain.length === 1 && !this.mark && !this.stat) {
2402
+ if (!this.matches[index])
2403
+ this.matches[index] = Object.create(null)
2404
+
2405
+ for (var i = 0; i < len; i ++) {
2406
+ var e = matchedEntries[i]
2407
+ if (prefix) {
2408
+ if (prefix.slice(-1) !== '/')
2409
+ e = prefix + '/' + e
2410
+ else
2411
+ e = prefix + e
2412
+ }
2413
+
2414
+ if (e.charAt(0) === '/' && !this.nomount) {
2415
+ e = path.join(this.root, e)
2416
+ }
2417
+ this._emitMatch(index, e)
2418
+ }
2419
+ // This was the last one, and no stats were needed
2420
+ return
2421
+ }
2422
+
2423
+ // now test all matched entries as stand-ins for that part
2424
+ // of the pattern.
2425
+ remain.shift()
2426
+ for (var i = 0; i < len; i ++) {
2427
+ var e = matchedEntries[i]
2428
+ var newPattern
2429
+ if (prefix)
2430
+ newPattern = [prefix, e]
2431
+ else
2432
+ newPattern = [e]
2433
+ this._process(newPattern.concat(remain), index, inGlobStar)
2434
+ }
2435
+ }
2436
+
2437
+
2438
+ GlobSync.prototype._emitMatch = function (index, e) {
2439
+ if (isIgnored(this, e))
2440
+ return
2441
+
2442
+ var abs = this._makeAbs(e)
2443
+
2444
+ if (this.mark)
2445
+ e = this._mark(e)
2446
+
2447
+ if (this.absolute) {
2448
+ e = abs
2449
+ }
2450
+
2451
+ if (this.matches[index][e])
2452
+ return
2453
+
2454
+ if (this.nodir) {
2455
+ var c = this.cache[abs]
2456
+ if (c === 'DIR' || Array.isArray(c))
2457
+ return
2458
+ }
2459
+
2460
+ this.matches[index][e] = true
2461
+
2462
+ if (this.stat)
2463
+ this._stat(e)
2464
+ }
2465
+
2466
+
2467
+ GlobSync.prototype._readdirInGlobStar = function (abs) {
2468
+ // follow all symlinked directories forever
2469
+ // just proceed as if this is a non-globstar situation
2470
+ if (this.follow)
2471
+ return this._readdir(abs, false)
2472
+
2473
+ var entries
2474
+ var lstat
2475
+ var stat
2476
+ try {
2477
+ lstat = this.fs.lstatSync(abs)
2478
+ } catch (er) {
2479
+ if (er.code === 'ENOENT') {
2480
+ // lstat failed, doesn't exist
2481
+ return null
2482
+ }
2483
+ }
2484
+
2485
+ var isSym = lstat && lstat.isSymbolicLink()
2486
+ this.symlinks[abs] = isSym
2487
+
2488
+ // If it's not a symlink or a dir, then it's definitely a regular file.
2489
+ // don't bother doing a readdir in that case.
2490
+ if (!isSym && lstat && !lstat.isDirectory())
2491
+ this.cache[abs] = 'FILE'
2492
+ else
2493
+ entries = this._readdir(abs, false)
2494
+
2495
+ return entries
2496
+ }
2497
+
2498
+ GlobSync.prototype._readdir = function (abs, inGlobStar) {
2499
+ var entries
2500
+
2501
+ if (inGlobStar && !ownProp(this.symlinks, abs))
2502
+ return this._readdirInGlobStar(abs)
2503
+
2504
+ if (ownProp(this.cache, abs)) {
2505
+ var c = this.cache[abs]
2506
+ if (!c || c === 'FILE')
2507
+ return null
2508
+
2509
+ if (Array.isArray(c))
2510
+ return c
2511
+ }
2512
+
2513
+ try {
2514
+ return this._readdirEntries(abs, this.fs.readdirSync(abs))
2515
+ } catch (er) {
2516
+ this._readdirError(abs, er)
2517
+ return null
2518
+ }
2519
+ }
2520
+
2521
+ GlobSync.prototype._readdirEntries = function (abs, entries) {
2522
+ // if we haven't asked to stat everything, then just
2523
+ // assume that everything in there exists, so we can avoid
2524
+ // having to stat it a second time.
2525
+ if (!this.mark && !this.stat) {
2526
+ for (var i = 0; i < entries.length; i ++) {
2527
+ var e = entries[i]
2528
+ if (abs === '/')
2529
+ e = abs + e
2530
+ else
2531
+ e = abs + '/' + e
2532
+ this.cache[e] = true
2533
+ }
2534
+ }
2535
+
2536
+ this.cache[abs] = entries
2537
+
2538
+ // mark and cache dir-ness
2539
+ return entries
2540
+ }
2541
+
2542
+ GlobSync.prototype._readdirError = function (f, er) {
2543
+ // handle errors, and cache the information
2544
+ switch (er.code) {
2545
+ case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
2546
+ case 'ENOTDIR': // totally normal. means it *does* exist.
2547
+ var abs = this._makeAbs(f)
2548
+ this.cache[abs] = 'FILE'
2549
+ if (abs === this.cwdAbs) {
2550
+ var error = new Error(er.code + ' invalid cwd ' + this.cwd)
2551
+ error.path = this.cwd
2552
+ error.code = er.code
2553
+ throw error
2554
+ }
2555
+ break
2556
+
2557
+ case 'ENOENT': // not terribly unusual
2558
+ case 'ELOOP':
2559
+ case 'ENAMETOOLONG':
2560
+ case 'UNKNOWN':
2561
+ this.cache[this._makeAbs(f)] = false
2562
+ break
2563
+
2564
+ default: // some unusual error. Treat as failure.
2565
+ this.cache[this._makeAbs(f)] = false
2566
+ if (this.strict)
2567
+ throw er
2568
+ if (!this.silent)
2569
+ console.error('glob error', er)
2570
+ break
2571
+ }
2572
+ }
2573
+
2574
+ GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {
2575
+
2576
+ var entries = this._readdir(abs, inGlobStar)
2577
+
2578
+ // no entries means not a dir, so it can never have matches
2579
+ // foo.txt/** doesn't match foo.txt
2580
+ if (!entries)
2581
+ return
2582
+
2583
+ // test without the globstar, and with every child both below
2584
+ // and replacing the globstar.
2585
+ var remainWithoutGlobStar = remain.slice(1)
2586
+ var gspref = prefix ? [ prefix ] : []
2587
+ var noGlobStar = gspref.concat(remainWithoutGlobStar)
2588
+
2589
+ // the noGlobStar pattern exits the inGlobStar state
2590
+ this._process(noGlobStar, index, false)
2591
+
2592
+ var len = entries.length
2593
+ var isSym = this.symlinks[abs]
2594
+
2595
+ // If it's a symlink, and we're in a globstar, then stop
2596
+ if (isSym && inGlobStar)
2597
+ return
2598
+
2599
+ for (var i = 0; i < len; i++) {
2600
+ var e = entries[i]
2601
+ if (e.charAt(0) === '.' && !this.dot)
2602
+ continue
2603
+
2604
+ // these two cases enter the inGlobStar state
2605
+ var instead = gspref.concat(entries[i], remainWithoutGlobStar)
2606
+ this._process(instead, index, true)
2607
+
2608
+ var below = gspref.concat(entries[i], remain)
2609
+ this._process(below, index, true)
2610
+ }
2611
+ }
2612
+
2613
+ GlobSync.prototype._processSimple = function (prefix, index) {
2614
+ // XXX review this. Shouldn't it be doing the mounting etc
2615
+ // before doing stat? kinda weird?
2616
+ var exists = this._stat(prefix)
2617
+
2618
+ if (!this.matches[index])
2619
+ this.matches[index] = Object.create(null)
2620
+
2621
+ // If it doesn't exist, then just mark the lack of results
2622
+ if (!exists)
2623
+ return
2624
+
2625
+ if (prefix && isAbsolute(prefix) && !this.nomount) {
2626
+ var trail = /[\/\\]$/.test(prefix)
2627
+ if (prefix.charAt(0) === '/') {
2628
+ prefix = path.join(this.root, prefix)
2629
+ } else {
2630
+ prefix = path.resolve(this.root, prefix)
2631
+ if (trail)
2632
+ prefix += '/'
2633
+ }
2634
+ }
2635
+
2636
+ if (process.platform === 'win32')
2637
+ prefix = prefix.replace(/\\/g, '/')
2638
+
2639
+ // Mark this as a match
2640
+ this._emitMatch(index, prefix)
2641
+ }
2642
+
2643
+ // Returns either 'DIR', 'FILE', or false
2644
+ GlobSync.prototype._stat = function (f) {
2645
+ var abs = this._makeAbs(f)
2646
+ var needDir = f.slice(-1) === '/'
2647
+
2648
+ if (f.length > this.maxLength)
2649
+ return false
2650
+
2651
+ if (!this.stat && ownProp(this.cache, abs)) {
2652
+ var c = this.cache[abs]
2653
+
2654
+ if (Array.isArray(c))
2655
+ c = 'DIR'
2656
+
2657
+ // It exists, but maybe not how we need it
2658
+ if (!needDir || c === 'DIR')
2659
+ return c
2660
+
2661
+ if (needDir && c === 'FILE')
2662
+ return false
2663
+
2664
+ // otherwise we have to stat, because maybe c=true
2665
+ // if we know it exists, but not what it is.
2666
+ }
2667
+
2668
+ var exists
2669
+ var stat = this.statCache[abs]
2670
+ if (!stat) {
2671
+ var lstat
2672
+ try {
2673
+ lstat = this.fs.lstatSync(abs)
2674
+ } catch (er) {
2675
+ if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
2676
+ this.statCache[abs] = false
2677
+ return false
2678
+ }
2679
+ }
2680
+
2681
+ if (lstat && lstat.isSymbolicLink()) {
2682
+ try {
2683
+ stat = this.fs.statSync(abs)
2684
+ } catch (er) {
2685
+ stat = lstat
2686
+ }
2687
+ } else {
2688
+ stat = lstat
2689
+ }
2690
+ }
2691
+
2692
+ this.statCache[abs] = stat
2693
+
2694
+ var c = true
2695
+ if (stat)
2696
+ c = stat.isDirectory() ? 'DIR' : 'FILE'
2697
+
2698
+ this.cache[abs] = this.cache[abs] || c
2699
+
2700
+ if (needDir && c === 'FILE')
2701
+ return false
2702
+
2703
+ return c
2704
+ }
2705
+
2706
+ GlobSync.prototype._mark = function (p) {
2707
+ return common.mark(this, p)
2708
+ }
2709
+
2710
+ GlobSync.prototype._makeAbs = function (f) {
2711
+ return common.makeAbs(this, f)
2712
+ }
2713
+
2714
+
2715
+ /***/ }),
2716
+
2717
+ /***/ 7844:
2718
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2719
+
2720
+ var wrappy = __webpack_require__(2479)
2721
+ var reqs = Object.create(null)
2722
+ var once = __webpack_require__(778)
2723
+
2724
+ module.exports = wrappy(inflight)
2725
+
2726
+ function inflight (key, cb) {
2727
+ if (reqs[key]) {
2728
+ reqs[key].push(cb)
2729
+ return null
2730
+ } else {
2731
+ reqs[key] = [cb]
2732
+ return makeres(key)
2733
+ }
2734
+ }
2735
+
2736
+ function makeres (key) {
2737
+ return once(function RES () {
2738
+ var cbs = reqs[key]
2739
+ var len = cbs.length
2740
+ var args = slice(arguments)
2741
+
2742
+ // XXX It's somewhat ambiguous whether a new callback added in this
2743
+ // pass should be queued for later execution if something in the
2744
+ // list of callbacks throws, or if it should just be discarded.
2745
+ // However, it's such an edge case that it hardly matters, and either
2746
+ // choice is likely as surprising as the other.
2747
+ // As it happens, we do go ahead and schedule it for later execution.
2748
+ try {
2749
+ for (var i = 0; i < len; i++) {
2750
+ cbs[i].apply(null, args)
2751
+ }
2752
+ } finally {
2753
+ if (cbs.length > len) {
2754
+ // added more in the interim.
2755
+ // de-zalgo, just in case, but don't call again.
2756
+ cbs.splice(0, len)
2757
+ process.nextTick(function () {
2758
+ RES.apply(null, args)
2759
+ })
2760
+ } else {
2761
+ delete reqs[key]
2762
+ }
2763
+ }
2764
+ })
2765
+ }
2766
+
2767
+ function slice (args) {
2768
+ var length = args.length
2769
+ var array = []
2770
+
2771
+ for (var i = 0; i < length; i++) array[i] = args[i]
2772
+ return array
2773
+ }
2774
+
2775
+
2776
+ /***/ }),
2777
+
2778
+ /***/ 5717:
2779
+ /***/ ((module) => {
2780
+
2781
+ if (typeof Object.create === 'function') {
2782
+ // implementation from standard node.js 'util' module
2783
+ module.exports = function inherits(ctor, superCtor) {
2784
+ if (superCtor) {
2785
+ ctor.super_ = superCtor
2786
+ ctor.prototype = Object.create(superCtor.prototype, {
2787
+ constructor: {
2788
+ value: ctor,
2789
+ enumerable: false,
2790
+ writable: true,
2791
+ configurable: true
2792
+ }
2793
+ })
2794
+ }
2795
+ };
2796
+ } else {
2797
+ // old school shim for old browsers
2798
+ module.exports = function inherits(ctor, superCtor) {
2799
+ if (superCtor) {
2800
+ ctor.super_ = superCtor
2801
+ var TempCtor = function () {}
2802
+ TempCtor.prototype = superCtor.prototype
2803
+ ctor.prototype = new TempCtor()
2804
+ ctor.prototype.constructor = ctor
2805
+ }
2806
+ }
2807
+ }
2808
+
2809
+
2810
+ /***/ }),
2811
+
2812
+ /***/ 1171:
2813
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2814
+
2815
+ module.exports = minimatch
2816
+ minimatch.Minimatch = Minimatch
2817
+
2818
+ var path = (function () { try { return __webpack_require__(1423) } catch (e) {}}()) || {
2819
+ sep: '/'
2820
+ }
2821
+ minimatch.sep = path.sep
2822
+
2823
+ var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
2824
+ var expand = __webpack_require__(3644)
2825
+
2826
+ var plTypes = {
2827
+ '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
2828
+ '?': { open: '(?:', close: ')?' },
2829
+ '+': { open: '(?:', close: ')+' },
2830
+ '*': { open: '(?:', close: ')*' },
2831
+ '@': { open: '(?:', close: ')' }
2832
+ }
2833
+
2834
+ // any single thing other than /
2835
+ // don't need to escape / when using new RegExp()
2836
+ var qmark = '[^/]'
2837
+
2838
+ // * => any number of characters
2839
+ var star = qmark + '*?'
2840
+
2841
+ // ** when dots are allowed. Anything goes, except .. and .
2842
+ // not (^ or / followed by one or two dots followed by $ or /),
2843
+ // followed by anything, any number of times.
2844
+ var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?'
2845
+
2846
+ // not a ^ or / followed by a dot,
2847
+ // followed by anything, any number of times.
2848
+ var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?'
2849
+
2850
+ // characters that need to be escaped in RegExp.
2851
+ var reSpecials = charSet('().*{}+?[]^$\\!')
2852
+
2853
+ // "abc" -> { a:true, b:true, c:true }
2854
+ function charSet (s) {
2855
+ return s.split('').reduce(function (set, c) {
2856
+ set[c] = true
2857
+ return set
2858
+ }, {})
2859
+ }
2860
+
2861
+ // normalizes slashes.
2862
+ var slashSplit = /\/+/
2863
+
2864
+ minimatch.filter = filter
2865
+ function filter (pattern, options) {
2866
+ options = options || {}
2867
+ return function (p, i, list) {
2868
+ return minimatch(p, pattern, options)
2869
+ }
2870
+ }
2871
+
2872
+ function ext (a, b) {
2873
+ b = b || {}
2874
+ var t = {}
2875
+ Object.keys(a).forEach(function (k) {
2876
+ t[k] = a[k]
2877
+ })
2878
+ Object.keys(b).forEach(function (k) {
2879
+ t[k] = b[k]
2880
+ })
2881
+ return t
2882
+ }
2883
+
2884
+ minimatch.defaults = function (def) {
2885
+ if (!def || typeof def !== 'object' || !Object.keys(def).length) {
2886
+ return minimatch
2887
+ }
2888
+
2889
+ var orig = minimatch
2890
+
2891
+ var m = function minimatch (p, pattern, options) {
2892
+ return orig(p, pattern, ext(def, options))
2893
+ }
2894
+
2895
+ m.Minimatch = function Minimatch (pattern, options) {
2896
+ return new orig.Minimatch(pattern, ext(def, options))
2897
+ }
2898
+ m.Minimatch.defaults = function defaults (options) {
2899
+ return orig.defaults(ext(def, options)).Minimatch
2900
+ }
2901
+
2902
+ m.filter = function filter (pattern, options) {
2903
+ return orig.filter(pattern, ext(def, options))
2904
+ }
2905
+
2906
+ m.defaults = function defaults (options) {
2907
+ return orig.defaults(ext(def, options))
2908
+ }
2909
+
2910
+ m.makeRe = function makeRe (pattern, options) {
2911
+ return orig.makeRe(pattern, ext(def, options))
2912
+ }
2913
+
2914
+ m.braceExpand = function braceExpand (pattern, options) {
2915
+ return orig.braceExpand(pattern, ext(def, options))
2916
+ }
2917
+
2918
+ m.match = function (list, pattern, options) {
2919
+ return orig.match(list, pattern, ext(def, options))
2920
+ }
2921
+
2922
+ return m
2923
+ }
2924
+
2925
+ Minimatch.defaults = function (def) {
2926
+ return minimatch.defaults(def).Minimatch
2927
+ }
2928
+
2929
+ function minimatch (p, pattern, options) {
2930
+ assertValidPattern(pattern)
2931
+
2932
+ if (!options) options = {}
2933
+
2934
+ // shortcut: comments match nothing.
2935
+ if (!options.nocomment && pattern.charAt(0) === '#') {
2936
+ return false
2937
+ }
2938
+
2939
+ return new Minimatch(pattern, options).match(p)
2940
+ }
2941
+
2942
+ function Minimatch (pattern, options) {
2943
+ if (!(this instanceof Minimatch)) {
2944
+ return new Minimatch(pattern, options)
2945
+ }
2946
+
2947
+ assertValidPattern(pattern)
2948
+
2949
+ if (!options) options = {}
2950
+
2951
+ pattern = pattern.trim()
2952
+
2953
+ // windows support: need to use /, not \
2954
+ if (!options.allowWindowsEscape && path.sep !== '/') {
2955
+ pattern = pattern.split(path.sep).join('/')
2956
+ }
2957
+
2958
+ this.options = options
2959
+ this.set = []
2960
+ this.pattern = pattern
2961
+ this.regexp = null
2962
+ this.negate = false
2963
+ this.comment = false
2964
+ this.empty = false
2965
+ this.partial = !!options.partial
2966
+
2967
+ // make the set of regexps etc.
2968
+ this.make()
2969
+ }
2970
+
2971
+ Minimatch.prototype.debug = function () {}
2972
+
2973
+ Minimatch.prototype.make = make
2974
+ function make () {
2975
+ var pattern = this.pattern
2976
+ var options = this.options
2977
+
2978
+ // empty patterns and comments match nothing.
2979
+ if (!options.nocomment && pattern.charAt(0) === '#') {
2980
+ this.comment = true
2981
+ return
2982
+ }
2983
+ if (!pattern) {
2984
+ this.empty = true
2985
+ return
2986
+ }
2987
+
2988
+ // step 1: figure out negation, etc.
2989
+ this.parseNegate()
2990
+
2991
+ // step 2: expand braces
2992
+ var set = this.globSet = this.braceExpand()
2993
+
2994
+ if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }
2995
+
2996
+ this.debug(this.pattern, set)
2997
+
2998
+ // step 3: now we have a set, so turn each one into a series of path-portion
2999
+ // matching patterns.
3000
+ // These will be regexps, except in the case of "**", which is
3001
+ // set to the GLOBSTAR object for globstar behavior,
3002
+ // and will not contain any / characters
3003
+ set = this.globParts = set.map(function (s) {
3004
+ return s.split(slashSplit)
3005
+ })
3006
+
3007
+ this.debug(this.pattern, set)
3008
+
3009
+ // glob --> regexps
3010
+ set = set.map(function (s, si, set) {
3011
+ return s.map(this.parse, this)
3012
+ }, this)
3013
+
3014
+ this.debug(this.pattern, set)
3015
+
3016
+ // filter out everything that didn't compile properly.
3017
+ set = set.filter(function (s) {
3018
+ return s.indexOf(false) === -1
3019
+ })
3020
+
3021
+ this.debug(this.pattern, set)
3022
+
3023
+ this.set = set
3024
+ }
3025
+
3026
+ Minimatch.prototype.parseNegate = parseNegate
3027
+ function parseNegate () {
3028
+ var pattern = this.pattern
3029
+ var negate = false
3030
+ var options = this.options
3031
+ var negateOffset = 0
3032
+
3033
+ if (options.nonegate) return
3034
+
3035
+ for (var i = 0, l = pattern.length
3036
+ ; i < l && pattern.charAt(i) === '!'
3037
+ ; i++) {
3038
+ negate = !negate
3039
+ negateOffset++
3040
+ }
3041
+
3042
+ if (negateOffset) this.pattern = pattern.substr(negateOffset)
3043
+ this.negate = negate
3044
+ }
3045
+
3046
+ // Brace expansion:
3047
+ // a{b,c}d -> abd acd
3048
+ // a{b,}c -> abc ac
3049
+ // a{0..3}d -> a0d a1d a2d a3d
3050
+ // a{b,c{d,e}f}g -> abg acdfg acefg
3051
+ // a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
3052
+ //
3053
+ // Invalid sets are not expanded.
3054
+ // a{2..}b -> a{2..}b
3055
+ // a{b}c -> a{b}c
3056
+ minimatch.braceExpand = function (pattern, options) {
3057
+ return braceExpand(pattern, options)
3058
+ }
3059
+
3060
+ Minimatch.prototype.braceExpand = braceExpand
3061
+
3062
+ function braceExpand (pattern, options) {
3063
+ if (!options) {
3064
+ if (this instanceof Minimatch) {
3065
+ options = this.options
3066
+ } else {
3067
+ options = {}
3068
+ }
3069
+ }
3070
+
3071
+ pattern = typeof pattern === 'undefined'
3072
+ ? this.pattern : pattern
3073
+
3074
+ assertValidPattern(pattern)
3075
+
3076
+ // Thanks to Yeting Li <https://github.com/yetingli> for
3077
+ // improving this regexp to avoid a ReDOS vulnerability.
3078
+ if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
3079
+ // shortcut. no need to expand.
3080
+ return [pattern]
3081
+ }
3082
+
3083
+ return expand(pattern)
3084
+ }
3085
+
3086
+ var MAX_PATTERN_LENGTH = 1024 * 64
3087
+ var assertValidPattern = function (pattern) {
3088
+ if (typeof pattern !== 'string') {
3089
+ throw new TypeError('invalid pattern')
3090
+ }
3091
+
3092
+ if (pattern.length > MAX_PATTERN_LENGTH) {
3093
+ throw new TypeError('pattern is too long')
3094
+ }
3095
+ }
3096
+
3097
+ // parse a component of the expanded set.
3098
+ // At this point, no pattern may contain "/" in it
3099
+ // so we're going to return a 2d array, where each entry is the full
3100
+ // pattern, split on '/', and then turned into a regular expression.
3101
+ // A regexp is made at the end which joins each array with an
3102
+ // escaped /, and another full one which joins each regexp with |.
3103
+ //
3104
+ // Following the lead of Bash 4.1, note that "**" only has special meaning
3105
+ // when it is the *only* thing in a path portion. Otherwise, any series
3106
+ // of * is equivalent to a single *. Globstar behavior is enabled by
3107
+ // default, and can be disabled by setting options.noglobstar.
3108
+ Minimatch.prototype.parse = parse
3109
+ var SUBPARSE = {}
3110
+ function parse (pattern, isSub) {
3111
+ assertValidPattern(pattern)
3112
+
3113
+ var options = this.options
3114
+
3115
+ // shortcuts
3116
+ if (pattern === '**') {
3117
+ if (!options.noglobstar)
3118
+ return GLOBSTAR
3119
+ else
3120
+ pattern = '*'
3121
+ }
3122
+ if (pattern === '') return ''
3123
+
3124
+ var re = ''
3125
+ var hasMagic = !!options.nocase
3126
+ var escaping = false
3127
+ // ? => one single character
3128
+ var patternListStack = []
3129
+ var negativeLists = []
3130
+ var stateChar
3131
+ var inClass = false
3132
+ var reClassStart = -1
3133
+ var classStart = -1
3134
+ // . and .. never match anything that doesn't start with .,
3135
+ // even when options.dot is set.
3136
+ var patternStart = pattern.charAt(0) === '.' ? '' // anything
3137
+ // not (start or / followed by . or .. followed by / or end)
3138
+ : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
3139
+ : '(?!\\.)'
3140
+ var self = this
3141
+
3142
+ function clearStateChar () {
3143
+ if (stateChar) {
3144
+ // we had some state-tracking character
3145
+ // that wasn't consumed by this pass.
3146
+ switch (stateChar) {
3147
+ case '*':
3148
+ re += star
3149
+ hasMagic = true
3150
+ break
3151
+ case '?':
3152
+ re += qmark
3153
+ hasMagic = true
3154
+ break
3155
+ default:
3156
+ re += '\\' + stateChar
3157
+ break
3158
+ }
3159
+ self.debug('clearStateChar %j %j', stateChar, re)
3160
+ stateChar = false
3161
+ }
3162
+ }
3163
+
3164
+ for (var i = 0, len = pattern.length, c
3165
+ ; (i < len) && (c = pattern.charAt(i))
3166
+ ; i++) {
3167
+ this.debug('%s\t%s %s %j', pattern, i, re, c)
3168
+
3169
+ // skip over any that are escaped.
3170
+ if (escaping && reSpecials[c]) {
3171
+ re += '\\' + c
3172
+ escaping = false
3173
+ continue
3174
+ }
3175
+
3176
+ switch (c) {
3177
+ /* istanbul ignore next */
3178
+ case '/': {
3179
+ // completely not allowed, even escaped.
3180
+ // Should already be path-split by now.
3181
+ return false
3182
+ }
3183
+
3184
+ case '\\':
3185
+ clearStateChar()
3186
+ escaping = true
3187
+ continue
3188
+
3189
+ // the various stateChar values
3190
+ // for the "extglob" stuff.
3191
+ case '?':
3192
+ case '*':
3193
+ case '+':
3194
+ case '@':
3195
+ case '!':
3196
+ this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
3197
+
3198
+ // all of those are literals inside a class, except that
3199
+ // the glob [!a] means [^a] in regexp
3200
+ if (inClass) {
3201
+ this.debug(' in class')
3202
+ if (c === '!' && i === classStart + 1) c = '^'
3203
+ re += c
3204
+ continue
3205
+ }
3206
+
3207
+ // if we already have a stateChar, then it means
3208
+ // that there was something like ** or +? in there.
3209
+ // Handle the stateChar, then proceed with this one.
3210
+ self.debug('call clearStateChar %j', stateChar)
3211
+ clearStateChar()
3212
+ stateChar = c
3213
+ // if extglob is disabled, then +(asdf|foo) isn't a thing.
3214
+ // just clear the statechar *now*, rather than even diving into
3215
+ // the patternList stuff.
3216
+ if (options.noext) clearStateChar()
3217
+ continue
3218
+
3219
+ case '(':
3220
+ if (inClass) {
3221
+ re += '('
3222
+ continue
3223
+ }
3224
+
3225
+ if (!stateChar) {
3226
+ re += '\\('
3227
+ continue
3228
+ }
3229
+
3230
+ patternListStack.push({
3231
+ type: stateChar,
3232
+ start: i - 1,
3233
+ reStart: re.length,
3234
+ open: plTypes[stateChar].open,
3235
+ close: plTypes[stateChar].close
3236
+ })
3237
+ // negation is (?:(?!js)[^/]*)
3238
+ re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
3239
+ this.debug('plType %j %j', stateChar, re)
3240
+ stateChar = false
3241
+ continue
3242
+
3243
+ case ')':
3244
+ if (inClass || !patternListStack.length) {
3245
+ re += '\\)'
3246
+ continue
3247
+ }
3248
+
3249
+ clearStateChar()
3250
+ hasMagic = true
3251
+ var pl = patternListStack.pop()
3252
+ // negation is (?:(?!js)[^/]*)
3253
+ // The others are (?:<pattern>)<type>
3254
+ re += pl.close
3255
+ if (pl.type === '!') {
3256
+ negativeLists.push(pl)
3257
+ }
3258
+ pl.reEnd = re.length
3259
+ continue
3260
+
3261
+ case '|':
3262
+ if (inClass || !patternListStack.length || escaping) {
3263
+ re += '\\|'
3264
+ escaping = false
3265
+ continue
3266
+ }
3267
+
3268
+ clearStateChar()
3269
+ re += '|'
3270
+ continue
3271
+
3272
+ // these are mostly the same in regexp and glob
3273
+ case '[':
3274
+ // swallow any state-tracking char before the [
3275
+ clearStateChar()
3276
+
3277
+ if (inClass) {
3278
+ re += '\\' + c
3279
+ continue
3280
+ }
3281
+
3282
+ inClass = true
3283
+ classStart = i
3284
+ reClassStart = re.length
3285
+ re += c
3286
+ continue
3287
+
3288
+ case ']':
3289
+ // a right bracket shall lose its special
3290
+ // meaning and represent itself in
3291
+ // a bracket expression if it occurs
3292
+ // first in the list. -- POSIX.2 2.8.3.2
3293
+ if (i === classStart + 1 || !inClass) {
3294
+ re += '\\' + c
3295
+ escaping = false
3296
+ continue
3297
+ }
3298
+
3299
+ // handle the case where we left a class open.
3300
+ // "[z-a]" is valid, equivalent to "\[z-a\]"
3301
+ // split where the last [ was, make sure we don't have
3302
+ // an invalid re. if so, re-walk the contents of the
3303
+ // would-be class to re-translate any characters that
3304
+ // were passed through as-is
3305
+ // TODO: It would probably be faster to determine this
3306
+ // without a try/catch and a new RegExp, but it's tricky
3307
+ // to do safely. For now, this is safe and works.
3308
+ var cs = pattern.substring(classStart + 1, i)
3309
+ try {
3310
+ RegExp('[' + cs + ']')
3311
+ } catch (er) {
3312
+ // not a valid class!
3313
+ var sp = this.parse(cs, SUBPARSE)
3314
+ re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
3315
+ hasMagic = hasMagic || sp[1]
3316
+ inClass = false
3317
+ continue
3318
+ }
3319
+
3320
+ // finish up the class.
3321
+ hasMagic = true
3322
+ inClass = false
3323
+ re += c
3324
+ continue
3325
+
3326
+ default:
3327
+ // swallow any state char that wasn't consumed
3328
+ clearStateChar()
3329
+
3330
+ if (escaping) {
3331
+ // no need
3332
+ escaping = false
3333
+ } else if (reSpecials[c]
3334
+ && !(c === '^' && inClass)) {
3335
+ re += '\\'
3336
+ }
3337
+
3338
+ re += c
3339
+
3340
+ } // switch
3341
+ } // for
3342
+
3343
+ // handle the case where we left a class open.
3344
+ // "[abc" is valid, equivalent to "\[abc"
3345
+ if (inClass) {
3346
+ // split where the last [ was, and escape it
3347
+ // this is a huge pita. We now have to re-walk
3348
+ // the contents of the would-be class to re-translate
3349
+ // any characters that were passed through as-is
3350
+ cs = pattern.substr(classStart + 1)
3351
+ sp = this.parse(cs, SUBPARSE)
3352
+ re = re.substr(0, reClassStart) + '\\[' + sp[0]
3353
+ hasMagic = hasMagic || sp[1]
3354
+ }
3355
+
3356
+ // handle the case where we had a +( thing at the *end*
3357
+ // of the pattern.
3358
+ // each pattern list stack adds 3 chars, and we need to go through
3359
+ // and escape any | chars that were passed through as-is for the regexp.
3360
+ // Go through and escape them, taking care not to double-escape any
3361
+ // | chars that were already escaped.
3362
+ for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
3363
+ var tail = re.slice(pl.reStart + pl.open.length)
3364
+ this.debug('setting tail', re, pl)
3365
+ // maybe some even number of \, then maybe 1 \, followed by a |
3366
+ tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
3367
+ if (!$2) {
3368
+ // the | isn't already escaped, so escape it.
3369
+ $2 = '\\'
3370
+ }
3371
+
3372
+ // need to escape all those slashes *again*, without escaping the
3373
+ // one that we need for escaping the | character. As it works out,
3374
+ // escaping an even number of slashes can be done by simply repeating
3375
+ // it exactly after itself. That's why this trick works.
3376
+ //
3377
+ // I am sorry that you have to see this.
3378
+ return $1 + $1 + $2 + '|'
3379
+ })
3380
+
3381
+ this.debug('tail=%j\n %s', tail, tail, pl, re)
3382
+ var t = pl.type === '*' ? star
3383
+ : pl.type === '?' ? qmark
3384
+ : '\\' + pl.type
3385
+
3386
+ hasMagic = true
3387
+ re = re.slice(0, pl.reStart) + t + '\\(' + tail
3388
+ }
3389
+
3390
+ // handle trailing things that only matter at the very end.
3391
+ clearStateChar()
3392
+ if (escaping) {
3393
+ // trailing \\
3394
+ re += '\\\\'
3395
+ }
3396
+
3397
+ // only need to apply the nodot start if the re starts with
3398
+ // something that could conceivably capture a dot
3399
+ var addPatternStart = false
3400
+ switch (re.charAt(0)) {
3401
+ case '[': case '.': case '(': addPatternStart = true
3402
+ }
3403
+
3404
+ // Hack to work around lack of negative lookbehind in JS
3405
+ // A pattern like: *.!(x).!(y|z) needs to ensure that a name
3406
+ // like 'a.xyz.yz' doesn't match. So, the first negative
3407
+ // lookahead, has to look ALL the way ahead, to the end of
3408
+ // the pattern.
3409
+ for (var n = negativeLists.length - 1; n > -1; n--) {
3410
+ var nl = negativeLists[n]
3411
+
3412
+ var nlBefore = re.slice(0, nl.reStart)
3413
+ var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)
3414
+ var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)
3415
+ var nlAfter = re.slice(nl.reEnd)
3416
+
3417
+ nlLast += nlAfter
3418
+
3419
+ // Handle nested stuff like *(*.js|!(*.json)), where open parens
3420
+ // mean that we should *not* include the ) in the bit that is considered
3421
+ // "after" the negated section.
3422
+ var openParensBefore = nlBefore.split('(').length - 1
3423
+ var cleanAfter = nlAfter
3424
+ for (i = 0; i < openParensBefore; i++) {
3425
+ cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
3426
+ }
3427
+ nlAfter = cleanAfter
3428
+
3429
+ var dollar = ''
3430
+ if (nlAfter === '' && isSub !== SUBPARSE) {
3431
+ dollar = '$'
3432
+ }
3433
+ var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast
3434
+ re = newRe
3435
+ }
3436
+
3437
+ // if the re is not "" at this point, then we need to make sure
3438
+ // it doesn't match against an empty path part.
3439
+ // Otherwise a/* will match a/, which it should not.
3440
+ if (re !== '' && hasMagic) {
3441
+ re = '(?=.)' + re
3442
+ }
3443
+
3444
+ if (addPatternStart) {
3445
+ re = patternStart + re
3446
+ }
3447
+
3448
+ // parsing just a piece of a larger pattern.
3449
+ if (isSub === SUBPARSE) {
3450
+ return [re, hasMagic]
3451
+ }
3452
+
3453
+ // skip the regexp for non-magical patterns
3454
+ // unescape anything in it, though, so that it'll be
3455
+ // an exact match against a file etc.
3456
+ if (!hasMagic) {
3457
+ return globUnescape(pattern)
3458
+ }
3459
+
3460
+ var flags = options.nocase ? 'i' : ''
3461
+ try {
3462
+ var regExp = new RegExp('^' + re + '$', flags)
3463
+ } catch (er) /* istanbul ignore next - should be impossible */ {
3464
+ // If it was an invalid regular expression, then it can't match
3465
+ // anything. This trick looks for a character after the end of
3466
+ // the string, which is of course impossible, except in multi-line
3467
+ // mode, but it's not a /m regex.
3468
+ return new RegExp('$.')
3469
+ }
3470
+
3471
+ regExp._glob = pattern
3472
+ regExp._src = re
3473
+
3474
+ return regExp
3475
+ }
3476
+
3477
+ minimatch.makeRe = function (pattern, options) {
3478
+ return new Minimatch(pattern, options || {}).makeRe()
3479
+ }
3480
+
3481
+ Minimatch.prototype.makeRe = makeRe
3482
+ function makeRe () {
3483
+ if (this.regexp || this.regexp === false) return this.regexp
3484
+
3485
+ // at this point, this.set is a 2d array of partial
3486
+ // pattern strings, or "**".
3487
+ //
3488
+ // It's better to use .match(). This function shouldn't
3489
+ // be used, really, but it's pretty convenient sometimes,
3490
+ // when you just want to work with a regex.
3491
+ var set = this.set
3492
+
3493
+ if (!set.length) {
3494
+ this.regexp = false
3495
+ return this.regexp
3496
+ }
3497
+ var options = this.options
3498
+
3499
+ var twoStar = options.noglobstar ? star
3500
+ : options.dot ? twoStarDot
3501
+ : twoStarNoDot
3502
+ var flags = options.nocase ? 'i' : ''
3503
+
3504
+ var re = set.map(function (pattern) {
3505
+ return pattern.map(function (p) {
3506
+ return (p === GLOBSTAR) ? twoStar
3507
+ : (typeof p === 'string') ? regExpEscape(p)
3508
+ : p._src
3509
+ }).join('\\\/')
3510
+ }).join('|')
3511
+
3512
+ // must match entire pattern
3513
+ // ending in a * or ** will make it less strict.
3514
+ re = '^(?:' + re + ')$'
3515
+
3516
+ // can match anything, as long as it's not this.
3517
+ if (this.negate) re = '^(?!' + re + ').*$'
3518
+
3519
+ try {
3520
+ this.regexp = new RegExp(re, flags)
3521
+ } catch (ex) /* istanbul ignore next - should be impossible */ {
3522
+ this.regexp = false
3523
+ }
3524
+ return this.regexp
3525
+ }
3526
+
3527
+ minimatch.match = function (list, pattern, options) {
3528
+ options = options || {}
3529
+ var mm = new Minimatch(pattern, options)
3530
+ list = list.filter(function (f) {
3531
+ return mm.match(f)
3532
+ })
3533
+ if (mm.options.nonull && !list.length) {
3534
+ list.push(pattern)
3535
+ }
3536
+ return list
3537
+ }
3538
+
3539
+ Minimatch.prototype.match = function match (f, partial) {
3540
+ if (typeof partial === 'undefined') partial = this.partial
3541
+ this.debug('match', f, this.pattern)
3542
+ // short-circuit in the case of busted things.
3543
+ // comments, etc.
3544
+ if (this.comment) return false
3545
+ if (this.empty) return f === ''
3546
+
3547
+ if (f === '/' && partial) return true
3548
+
3549
+ var options = this.options
3550
+
3551
+ // windows: need to use /, not \
3552
+ if (path.sep !== '/') {
3553
+ f = f.split(path.sep).join('/')
3554
+ }
3555
+
3556
+ // treat the test path as a set of pathparts.
3557
+ f = f.split(slashSplit)
3558
+ this.debug(this.pattern, 'split', f)
3559
+
3560
+ // just ONE of the pattern sets in this.set needs to match
3561
+ // in order for it to be valid. If negating, then just one
3562
+ // match means that we have failed.
3563
+ // Either way, return on the first hit.
3564
+
3565
+ var set = this.set
3566
+ this.debug(this.pattern, 'set', set)
3567
+
3568
+ // Find the basename of the path by looking for the last non-empty segment
3569
+ var filename
3570
+ var i
3571
+ for (i = f.length - 1; i >= 0; i--) {
3572
+ filename = f[i]
3573
+ if (filename) break
3574
+ }
3575
+
3576
+ for (i = 0; i < set.length; i++) {
3577
+ var pattern = set[i]
3578
+ var file = f
3579
+ if (options.matchBase && pattern.length === 1) {
3580
+ file = [filename]
3581
+ }
3582
+ var hit = this.matchOne(file, pattern, partial)
3583
+ if (hit) {
3584
+ if (options.flipNegate) return true
3585
+ return !this.negate
3586
+ }
3587
+ }
3588
+
3589
+ // didn't get any hits. this is success if it's a negative
3590
+ // pattern, failure otherwise.
3591
+ if (options.flipNegate) return false
3592
+ return this.negate
3593
+ }
3594
+
3595
+ // set partial to true to test if, for example,
3596
+ // "/a/b" matches the start of "/*/b/*/d"
3597
+ // Partial means, if you run out of file before you run
3598
+ // out of pattern, then that's fine, as long as all
3599
+ // the parts match.
3600
+ Minimatch.prototype.matchOne = function (file, pattern, partial) {
3601
+ var options = this.options
3602
+
3603
+ this.debug('matchOne',
3604
+ { 'this': this, file: file, pattern: pattern })
3605
+
3606
+ this.debug('matchOne', file.length, pattern.length)
3607
+
3608
+ for (var fi = 0,
3609
+ pi = 0,
3610
+ fl = file.length,
3611
+ pl = pattern.length
3612
+ ; (fi < fl) && (pi < pl)
3613
+ ; fi++, pi++) {
3614
+ this.debug('matchOne loop')
3615
+ var p = pattern[pi]
3616
+ var f = file[fi]
3617
+
3618
+ this.debug(pattern, p, f)
3619
+
3620
+ // should be impossible.
3621
+ // some invalid regexp stuff in the set.
3622
+ /* istanbul ignore if */
3623
+ if (p === false) return false
3624
+
3625
+ if (p === GLOBSTAR) {
3626
+ this.debug('GLOBSTAR', [pattern, p, f])
3627
+
3628
+ // "**"
3629
+ // a/**/b/**/c would match the following:
3630
+ // a/b/x/y/z/c
3631
+ // a/x/y/z/b/c
3632
+ // a/b/x/b/x/c
3633
+ // a/b/c
3634
+ // To do this, take the rest of the pattern after
3635
+ // the **, and see if it would match the file remainder.
3636
+ // If so, return success.
3637
+ // If not, the ** "swallows" a segment, and try again.
3638
+ // This is recursively awful.
3639
+ //
3640
+ // a/**/b/**/c matching a/b/x/y/z/c
3641
+ // - a matches a
3642
+ // - doublestar
3643
+ // - matchOne(b/x/y/z/c, b/**/c)
3644
+ // - b matches b
3645
+ // - doublestar
3646
+ // - matchOne(x/y/z/c, c) -> no
3647
+ // - matchOne(y/z/c, c) -> no
3648
+ // - matchOne(z/c, c) -> no
3649
+ // - matchOne(c, c) yes, hit
3650
+ var fr = fi
3651
+ var pr = pi + 1
3652
+ if (pr === pl) {
3653
+ this.debug('** at the end')
3654
+ // a ** at the end will just swallow the rest.
3655
+ // We have found a match.
3656
+ // however, it will not swallow /.x, unless
3657
+ // options.dot is set.
3658
+ // . and .. are *never* matched by **, for explosively
3659
+ // exponential reasons.
3660
+ for (; fi < fl; fi++) {
3661
+ if (file[fi] === '.' || file[fi] === '..' ||
3662
+ (!options.dot && file[fi].charAt(0) === '.')) return false
3663
+ }
3664
+ return true
3665
+ }
3666
+
3667
+ // ok, let's see if we can swallow whatever we can.
3668
+ while (fr < fl) {
3669
+ var swallowee = file[fr]
3670
+
3671
+ this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
3672
+
3673
+ // XXX remove this slice. Just pass the start index.
3674
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
3675
+ this.debug('globstar found match!', fr, fl, swallowee)
3676
+ // found a match.
3677
+ return true
3678
+ } else {
3679
+ // can't swallow "." or ".." ever.
3680
+ // can only swallow ".foo" when explicitly asked.
3681
+ if (swallowee === '.' || swallowee === '..' ||
3682
+ (!options.dot && swallowee.charAt(0) === '.')) {
3683
+ this.debug('dot detected!', file, fr, pattern, pr)
3684
+ break
3685
+ }
3686
+
3687
+ // ** swallows a segment, and continue.
3688
+ this.debug('globstar swallow a segment, and continue')
3689
+ fr++
3690
+ }
3691
+ }
3692
+
3693
+ // no match was found.
3694
+ // However, in partial mode, we can't say this is necessarily over.
3695
+ // If there's more *pattern* left, then
3696
+ /* istanbul ignore if */
3697
+ if (partial) {
3698
+ // ran out of file
3699
+ this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
3700
+ if (fr === fl) return true
3701
+ }
3702
+ return false
3703
+ }
3704
+
3705
+ // something other than **
3706
+ // non-magic patterns just have to match exactly
3707
+ // patterns with magic have been turned into regexps.
3708
+ var hit
3709
+ if (typeof p === 'string') {
3710
+ hit = f === p
3711
+ this.debug('string match', p, f, hit)
3712
+ } else {
3713
+ hit = f.match(p)
3714
+ this.debug('pattern match', p, f, hit)
3715
+ }
3716
+
3717
+ if (!hit) return false
3718
+ }
3719
+
3720
+ // Note: ending in / means that we'll get a final ""
3721
+ // at the end of the pattern. This can only match a
3722
+ // corresponding "" at the end of the file.
3723
+ // If the file ends in /, then it can only match a
3724
+ // a pattern that ends in /, unless the pattern just
3725
+ // doesn't have any more for it. But, a/b/ should *not*
3726
+ // match "a/b/*", even though "" matches against the
3727
+ // [^/]*? pattern, except in partial mode, where it might
3728
+ // simply not be reached yet.
3729
+ // However, a/b/ should still satisfy a/*
3730
+
3731
+ // now either we fell off the end of the pattern, or we're done.
3732
+ if (fi === fl && pi === pl) {
3733
+ // ran out of pattern and filename at the same time.
3734
+ // an exact hit!
3735
+ return true
3736
+ } else if (fi === fl) {
3737
+ // ran out of file, but still had pattern left.
3738
+ // this is ok if we're doing the match as part of
3739
+ // a glob fs traversal.
3740
+ return partial
3741
+ } else /* istanbul ignore else */ if (pi === pl) {
3742
+ // ran out of pattern, still have file left.
3743
+ // this is only acceptable if we're on the very last
3744
+ // empty segment of a file with a trailing slash.
3745
+ // a/* should match a/b/
3746
+ return (fi === fl - 1) && (file[fi] === '')
3747
+ }
3748
+
3749
+ // should be unreachable.
3750
+ /* istanbul ignore next */
3751
+ throw new Error('wtf?')
3752
+ }
3753
+
3754
+ // replace stuff like \* with *
3755
+ function globUnescape (s) {
3756
+ return s.replace(/\\(.)/g, '$1')
3757
+ }
3758
+
3759
+ function regExpEscape (s) {
3760
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
3761
+ }
3762
+
3763
+
3764
+ /***/ }),
3765
+
3766
+ /***/ 778:
3767
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3768
+
3769
+ var wrappy = __webpack_require__(2479)
3770
+ module.exports = wrappy(once)
3771
+ module.exports.strict = wrappy(onceStrict)
3772
+
3773
+ once.proto = once(function () {
3774
+ Object.defineProperty(Function.prototype, 'once', {
3775
+ value: function () {
3776
+ return once(this)
3777
+ },
3778
+ configurable: true
3779
+ })
3780
+
3781
+ Object.defineProperty(Function.prototype, 'onceStrict', {
3782
+ value: function () {
3783
+ return onceStrict(this)
3784
+ },
3785
+ configurable: true
3786
+ })
3787
+ })
3788
+
3789
+ function once (fn) {
3790
+ var f = function () {
3791
+ if (f.called) return f.value
3792
+ f.called = true
3793
+ return f.value = fn.apply(this, arguments)
3794
+ }
3795
+ f.called = false
3796
+ return f
3797
+ }
3798
+
3799
+ function onceStrict (fn) {
3800
+ var f = function () {
3801
+ if (f.called)
3802
+ throw new Error(f.onceError)
3803
+ f.called = true
3804
+ return f.value = fn.apply(this, arguments)
3805
+ }
3806
+ var name = fn.name || 'Function wrapped with `once`'
3807
+ f.onceError = name + " shouldn't be called more than once"
3808
+ f.called = false
3809
+ return f
3810
+ }
3811
+
3812
+
3813
+ /***/ }),
3814
+
3815
+ /***/ 4095:
3816
+ /***/ ((module) => {
3817
+
3818
+ "use strict";
3819
+
3820
+
3821
+ function posix(path) {
3822
+ return path.charAt(0) === '/';
3823
+ }
3824
+
3825
+ function win32(path) {
3826
+ // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
3827
+ var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
3828
+ var result = splitDeviceRe.exec(path);
3829
+ var device = result[1] || '';
3830
+ var isUnc = Boolean(device && device.charAt(1) !== ':');
3831
+
3832
+ // UNC paths are always absolute
3833
+ return Boolean(result[2] || isUnc);
3834
+ }
3835
+
3836
+ module.exports = process.platform === 'win32' ? win32 : posix;
3837
+ module.exports.posix = posix;
3838
+ module.exports.win32 = win32;
3839
+
3840
+
3841
+ /***/ }),
3842
+
3843
+ /***/ 2479:
3844
+ /***/ ((module) => {
3845
+
3846
+ // Returns a wrapper function that returns a wrapped callback
3847
+ // The wrapper function should do some stuff, and return a
3848
+ // presumably different callback function.
3849
+ // This makes sure that own properties are retained, so that
3850
+ // decorations and such are not lost along the way.
3851
+ module.exports = wrappy
3852
+ function wrappy (fn, cb) {
3853
+ if (fn && cb) return wrappy(fn)(cb)
3854
+
3855
+ if (typeof fn !== 'function')
3856
+ throw new TypeError('need wrapper function')
3857
+
3858
+ Object.keys(fn).forEach(function (k) {
3859
+ wrapper[k] = fn[k]
3860
+ })
3861
+
3862
+ return wrapper
3863
+
3864
+ function wrapper() {
3865
+ var args = new Array(arguments.length)
3866
+ for (var i = 0; i < args.length; i++) {
3867
+ args[i] = arguments[i]
3868
+ }
3869
+ var ret = fn.apply(this, args)
3870
+ var cb = args[args.length-1]
3871
+ if (typeof ret === 'function' && ret !== cb) {
3872
+ Object.keys(cb).forEach(function (k) {
3873
+ ret[k] = cb[k]
3874
+ })
3875
+ }
3876
+ return ret
3877
+ }
3878
+ }
3879
+
3880
+
3881
+ /***/ }),
3882
+
3883
+ /***/ 9084:
3884
+ /***/ ((module) => {
3885
+
3886
+ "use strict";
3887
+ module.exports = require("assert");
3888
+
3889
+ /***/ }),
3890
+
3891
+ /***/ 6231:
3892
+ /***/ ((module) => {
3893
+
3894
+ "use strict";
3895
+ module.exports = require("fs");
3896
+
3897
+ /***/ }),
3898
+
3899
+ /***/ 1423:
3900
+ /***/ ((module) => {
3901
+
3902
+ "use strict";
3903
+ module.exports = require("path");
3904
+
3905
+ /***/ }),
3906
+
3907
+ /***/ 6464:
3908
+ /***/ ((module) => {
3909
+
3910
+ "use strict";
3911
+ module.exports = require("util");
3912
+
3913
+ /***/ })
3914
+
3915
+ /******/ });
3916
+ /************************************************************************/
3917
+ /******/ // The module cache
3918
+ /******/ var __webpack_module_cache__ = {};
3919
+ /******/
3920
+ /******/ // The require function
3921
+ /******/ function __webpack_require__(moduleId) {
3922
+ /******/ // Check if module is in cache
3923
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
3924
+ /******/ if (cachedModule !== undefined) {
3925
+ /******/ return cachedModule.exports;
3926
+ /******/ }
3927
+ /******/ // Create a new module (and put it into the cache)
3928
+ /******/ var module = __webpack_module_cache__[moduleId] = {
3929
+ /******/ // no module.id needed
3930
+ /******/ // no module.loaded needed
3931
+ /******/ exports: {}
3932
+ /******/ };
3933
+ /******/
3934
+ /******/ // Execute the module function
3935
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
3936
+ /******/
3937
+ /******/ // Return the exports of the module
3938
+ /******/ return module.exports;
3939
+ /******/ }
3940
+ /******/
3941
+ /************************************************************************/
3942
+ /******/ /* webpack/runtime/define property getters */
3943
+ /******/ (() => {
3944
+ /******/ // define getter functions for harmony exports
3945
+ /******/ __webpack_require__.d = (exports, definition) => {
3946
+ /******/ for(var key in definition) {
3947
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
3948
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
3949
+ /******/ }
3950
+ /******/ }
3951
+ /******/ };
3952
+ /******/ })();
3953
+ /******/
3954
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
3955
+ /******/ (() => {
3956
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
3957
+ /******/ })();
3958
+ /******/
3959
+ /******/ /* webpack/runtime/make namespace object */
3960
+ /******/ (() => {
3961
+ /******/ // define __esModule on exports
3962
+ /******/ __webpack_require__.r = (exports) => {
3963
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
3964
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3965
+ /******/ }
3966
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
3967
+ /******/ };
3968
+ /******/ })();
3969
+ /******/
3970
+ /************************************************************************/
3971
+ var __webpack_exports__ = {};
3972
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
3973
+ (() => {
3974
+ "use strict";
3975
+ // ESM COMPAT FLAG
3976
+ __webpack_require__.r(__webpack_exports__);
3977
+
3978
+ // EXPORTS
3979
+ __webpack_require__.d(__webpack_exports__, {
3980
+ "appSupport": () => (/* binding */ appSupport),
3981
+ "connectiq": () => (/* binding */ connectiq),
3982
+ "copyRecursiveAsNeeded": () => (/* binding */ copyRecursiveAsNeeded),
3983
+ "first_modified": () => (/* binding */ first_modified),
3984
+ "getSdkPath": () => (/* binding */ getSdkPath),
3985
+ "globa": () => (/* binding */ globa),
3986
+ "isWin": () => (/* binding */ isWin),
3987
+ "last_modified": () => (/* binding */ last_modified),
3988
+ "promiseAll": () => (/* binding */ promiseAll),
3989
+ "pushUnique": () => (/* binding */ pushUnique),
3990
+ "readByLine": () => (/* binding */ readByLine),
3991
+ "spawnByLine": () => (/* binding */ spawnByLine)
3992
+ });
3993
+
3994
+ ;// CONCATENATED MODULE: external "child_process"
3995
+ const external_child_process_namespaceObject = require("child_process");
3996
+ // EXTERNAL MODULE: external "fs"
3997
+ var external_fs_ = __webpack_require__(6231);
3998
+ ;// CONCATENATED MODULE: external "fs/promises"
3999
+ const promises_namespaceObject = require("fs/promises");
4000
+ // EXTERNAL MODULE: ./node_modules/glob/glob.js
4001
+ var glob = __webpack_require__(2884);
4002
+ // EXTERNAL MODULE: external "path"
4003
+ var external_path_ = __webpack_require__(1423);
4004
+ ;// CONCATENATED MODULE: external "readline"
4005
+ const external_readline_namespaceObject = require("readline");
4006
+ ;// CONCATENATED MODULE: ./src/util.js
4007
+
4008
+
4009
+
4010
+
4011
+
4012
+
4013
+
4014
+ const isWin = process.platform == "win32";
4015
+
4016
+ const appSupport = isWin
4017
+ ? `${process.env.APPDATA}`.replace(/\\/g, "/")
4018
+ : `${process.env.HOME}/Library/Application Support`;
4019
+
4020
+ const connectiq = `${appSupport}/Garmin/ConnectIQ`;
4021
+
4022
+ function getSdkPath() {
4023
+ return promises_namespaceObject.readFile(connectiq + "/current-sdk.cfg")
4024
+ .then((contents) => contents.toString().replace(/^\s*(.*?)\s*$/s, "$1"));
4025
+ }
4026
+
4027
+ function globa(pattern, options) {
4028
+ return new Promise((resolve, reject) => {
4029
+ glob.glob(pattern, options, (er, files) => {
4030
+ if (er) {
4031
+ reject(files);
4032
+ } else {
4033
+ resolve(files);
4034
+ }
4035
+ });
4036
+ });
4037
+ }
4038
+
4039
+ async function modified_times(inputs, missing) {
4040
+ return Promise.all(
4041
+ inputs.map(async (path) => {
4042
+ try {
4043
+ const stat = await promises_namespaceObject.stat(path);
4044
+ return stat.mtimeMs;
4045
+ } catch (e) {
4046
+ return missing;
4047
+ }
4048
+ })
4049
+ );
4050
+ }
4051
+
4052
+ async function last_modified(inputs) {
4053
+ return Math.max(...(await modified_times(inputs, Infinity)));
4054
+ }
4055
+
4056
+ async function first_modified(inputs) {
4057
+ return Math.min(...(await modified_times(inputs, 0)));
4058
+ }
4059
+
4060
+ function pushUnique(arr, value) {
4061
+ if (arr.find((v) => v === value) != null) return;
4062
+ arr.push(value);
4063
+ }
4064
+
4065
+ // return a promise that will process the output of command
4066
+ // line-by-line via lineHandlers.
4067
+ function spawnByLine(command, args, lineHandlers, options) {
4068
+ const [lineHandler, errHandler] = Array.isArray(lineHandlers)
4069
+ ? lineHandlers
4070
+ : [lineHandlers, (data) => console.error(data.toString())];
4071
+ return new Promise((resolve, reject) => {
4072
+ const proc = external_child_process_namespaceObject.spawn(command, args, {
4073
+ ...(options || {}),
4074
+ shell: false,
4075
+ });
4076
+ const rl = external_readline_namespaceObject.createInterface({
4077
+ input: proc.stdout,
4078
+ });
4079
+ const rle = external_readline_namespaceObject.createInterface({
4080
+ input: proc.stderr,
4081
+ });
4082
+ proc.on("error", reject);
4083
+ rle.on("line", errHandler);
4084
+ rl.on("line", lineHandler);
4085
+ proc.on("close", (code) => {
4086
+ if (code == 0) resolve();
4087
+ reject(code);
4088
+ });
4089
+ });
4090
+ }
4091
+
4092
+ // return a promise that will process file
4093
+ // line-by-line via lineHandler.
4094
+ function readByLine(file, lineHandler) {
4095
+ return promises_namespaceObject.open(file, "r").then(
4096
+ (fh) =>
4097
+ new Promise((resolve, _reject) => {
4098
+ const stream = fh.createReadStream();
4099
+ const rl = external_readline_namespaceObject.createInterface({
4100
+ input: stream,
4101
+ });
4102
+ rl.on("line", lineHandler);
4103
+ stream.on("close", resolve);
4104
+ })
4105
+ );
4106
+ }
4107
+
4108
+ async function promiseAll(promises, parallelism) {
4109
+ parallelism = parallelism || 4;
4110
+ const serializer = [];
4111
+ promises.forEach((p, i) => {
4112
+ if (serializer.length < parallelism) {
4113
+ serializer.push(p);
4114
+ } else {
4115
+ serializer[i % parallelism].then(() => p);
4116
+ }
4117
+ });
4118
+ return Promise.all(serializer);
4119
+ }
4120
+
4121
+ async function copyRecursiveAsNeeded(source, target, filter) {
4122
+ const fstat = promises_namespaceObject.stat;
4123
+ const sstat = await fstat(source);
4124
+ if (sstat.isDirectory()) {
4125
+ const stat = await fstat(target).catch(() => null);
4126
+
4127
+ if (!stat || !stat.isDirectory()) {
4128
+ stat && (await promises_namespaceObject.rm(target, { force: true }));
4129
+ await promises_namespaceObject.mkdir(target, { recursive: true });
4130
+ }
4131
+
4132
+ const files = await promises_namespaceObject.readdir(source);
4133
+ return Promise.all(
4134
+ files.map((file) => {
4135
+ var src = external_path_.join(source, file);
4136
+ var tgt = external_path_.join(target, file);
4137
+ return copyRecursiveAsNeeded(src, tgt, filter);
4138
+ })
4139
+ );
4140
+ } else {
4141
+ if (filter && !filter(source, target)) {
4142
+ return;
4143
+ }
4144
+ const tstat = await fstat(target).catch(() => null);
4145
+ if (!tstat || tstat.mtimeMs < sstat.mtimeMs) {
4146
+ console.log(`Copying ${source} to ${target}...`);
4147
+ return promises_namespaceObject.copyFile(source, target, external_fs_.constants.COPYFILE_FICLONE);
4148
+ }
4149
+ }
4150
+ }
4151
+
4152
+ })();
4153
+
4154
+ var __webpack_export_target__ = exports;
4155
+ for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i];
4156
+ if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
4157
+ /******/ })()
4158
+ ;