@dcf-micro/eslint-config 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/chunks/eslint-plugin-prettier.mjs +1716 -0
  2. package/dist/chunks/index.mjs +1341 -0
  3. package/dist/chunks/index10.mjs +39595 -0
  4. package/dist/chunks/index11.mjs +24 -0
  5. package/dist/chunks/index12.mjs +75273 -0
  6. package/dist/chunks/index13.mjs +55129 -0
  7. package/dist/chunks/index14.mjs +24 -0
  8. package/dist/chunks/index15.mjs +1441 -0
  9. package/dist/chunks/index2.mjs +31864 -0
  10. package/dist/chunks/index3.mjs +8154 -0
  11. package/dist/chunks/index4.mjs +24 -0
  12. package/dist/chunks/index5.mjs +44093 -0
  13. package/dist/chunks/index6.mjs +10371 -0
  14. package/dist/chunks/index7.mjs +21890 -0
  15. package/dist/chunks/index8.mjs +14424 -0
  16. package/dist/chunks/index9.mjs +194 -0
  17. package/dist/chunks/jiti.mjs +320 -0
  18. package/dist/index.d.mts +3897 -0
  19. package/dist/index.d.ts +3897 -0
  20. package/dist/index.mjs +4 -0
  21. package/dist/shared/eslint-config.BDBLGvXj.mjs +5282 -0
  22. package/dist/shared/eslint-config.BEdqg1el.mjs +12256 -0
  23. package/dist/shared/eslint-config.BKmXKm8B.mjs +5533 -0
  24. package/dist/shared/eslint-config.BjUMgISS.mjs +9012 -0
  25. package/dist/shared/eslint-config.Bk-3rH6Y.mjs +1355 -0
  26. package/dist/shared/eslint-config.BytuZ0Ec.mjs +20 -0
  27. package/dist/shared/eslint-config.C1V0I4Np.mjs +16900 -0
  28. package/dist/shared/eslint-config.CGxZQKHV.mjs +2091 -0
  29. package/dist/shared/eslint-config.COweQ1RR.mjs +5 -0
  30. package/dist/shared/eslint-config.CSnk9Q4w.mjs +9339 -0
  31. package/dist/shared/eslint-config.CWvTq0mr.mjs +2914 -0
  32. package/dist/shared/eslint-config.Ca4PTK8E.mjs +646 -0
  33. package/dist/shared/eslint-config.CmPTszkJ.mjs +3583 -0
  34. package/dist/shared/eslint-config.CqEANaNA.mjs +139622 -0
  35. package/dist/shared/eslint-config.CsePEcYJ.mjs +71 -0
  36. package/dist/shared/eslint-config.Cw6mETSZ.mjs +2580 -0
  37. package/dist/shared/eslint-config.DTVnsecK.mjs +1751 -0
  38. package/dist/shared/eslint-config.DWoU09EE.mjs +6958 -0
  39. package/dist/shared/eslint-config.DZvqTQUU.mjs +3818 -0
  40. package/dist/shared/eslint-config.Dhg7lT0g.mjs +1807 -0
  41. package/dist/shared/eslint-config.Du5y5qmf.mjs +200673 -0
  42. package/dist/shared/eslint-config.FKVuBSa4.mjs +394 -0
  43. package/dist/shared/eslint-config.I8d-HnmI.mjs +2654 -0
  44. package/dist/shared/eslint-config.YntqsQY1.mjs +40 -0
  45. package/dist/shared/eslint-config.uGTBNMD0.mjs +687 -0
  46. package/package.json +56 -0
@@ -0,0 +1,1807 @@
1
+ import require$$0 from 'tty';
2
+ import require$$0$2 from 'util';
3
+ import require$$0$1 from 'os';
4
+
5
+ var eslintVisitorKeys = {};
6
+
7
+ var hasRequiredEslintVisitorKeys;
8
+
9
+ function requireEslintVisitorKeys () {
10
+ if (hasRequiredEslintVisitorKeys) return eslintVisitorKeys;
11
+ hasRequiredEslintVisitorKeys = 1;
12
+
13
+ /* eslint-disable jsdoc/valid-types -- doesn't allow `readonly`.
14
+ TODO: remove eslint-disable when https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/164 is fixed
15
+ */
16
+ /**
17
+ * @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
18
+ */
19
+ /* eslint-enable jsdoc/valid-types -- doesn't allow `readonly string[]`. TODO: check why */
20
+
21
+ /**
22
+ * @type {VisitorKeys}
23
+ */
24
+ const KEYS = {
25
+ ArrayExpression: [
26
+ "elements"
27
+ ],
28
+ ArrayPattern: [
29
+ "elements"
30
+ ],
31
+ ArrowFunctionExpression: [
32
+ "params",
33
+ "body"
34
+ ],
35
+ AssignmentExpression: [
36
+ "left",
37
+ "right"
38
+ ],
39
+ AssignmentPattern: [
40
+ "left",
41
+ "right"
42
+ ],
43
+ AwaitExpression: [
44
+ "argument"
45
+ ],
46
+ BinaryExpression: [
47
+ "left",
48
+ "right"
49
+ ],
50
+ BlockStatement: [
51
+ "body"
52
+ ],
53
+ BreakStatement: [
54
+ "label"
55
+ ],
56
+ CallExpression: [
57
+ "callee",
58
+ "arguments"
59
+ ],
60
+ CatchClause: [
61
+ "param",
62
+ "body"
63
+ ],
64
+ ChainExpression: [
65
+ "expression"
66
+ ],
67
+ ClassBody: [
68
+ "body"
69
+ ],
70
+ ClassDeclaration: [
71
+ "id",
72
+ "superClass",
73
+ "body"
74
+ ],
75
+ ClassExpression: [
76
+ "id",
77
+ "superClass",
78
+ "body"
79
+ ],
80
+ ConditionalExpression: [
81
+ "test",
82
+ "consequent",
83
+ "alternate"
84
+ ],
85
+ ContinueStatement: [
86
+ "label"
87
+ ],
88
+ DebuggerStatement: [],
89
+ DoWhileStatement: [
90
+ "body",
91
+ "test"
92
+ ],
93
+ EmptyStatement: [],
94
+ ExperimentalRestProperty: [
95
+ "argument"
96
+ ],
97
+ ExperimentalSpreadProperty: [
98
+ "argument"
99
+ ],
100
+ ExportAllDeclaration: [
101
+ "exported",
102
+ "source",
103
+ "attributes"
104
+ ],
105
+ ExportDefaultDeclaration: [
106
+ "declaration"
107
+ ],
108
+ ExportNamedDeclaration: [
109
+ "declaration",
110
+ "specifiers",
111
+ "source",
112
+ "attributes"
113
+ ],
114
+ ExportSpecifier: [
115
+ "local",
116
+ "exported"
117
+ ],
118
+ ExpressionStatement: [
119
+ "expression"
120
+ ],
121
+ ForInStatement: [
122
+ "left",
123
+ "right",
124
+ "body"
125
+ ],
126
+ ForOfStatement: [
127
+ "left",
128
+ "right",
129
+ "body"
130
+ ],
131
+ ForStatement: [
132
+ "init",
133
+ "test",
134
+ "update",
135
+ "body"
136
+ ],
137
+ FunctionDeclaration: [
138
+ "id",
139
+ "params",
140
+ "body"
141
+ ],
142
+ FunctionExpression: [
143
+ "id",
144
+ "params",
145
+ "body"
146
+ ],
147
+ Identifier: [],
148
+ IfStatement: [
149
+ "test",
150
+ "consequent",
151
+ "alternate"
152
+ ],
153
+ ImportAttribute: [
154
+ "key",
155
+ "value"
156
+ ],
157
+ ImportDeclaration: [
158
+ "specifiers",
159
+ "source",
160
+ "attributes"
161
+ ],
162
+ ImportDefaultSpecifier: [
163
+ "local"
164
+ ],
165
+ ImportExpression: [
166
+ "source",
167
+ "options"
168
+ ],
169
+ ImportNamespaceSpecifier: [
170
+ "local"
171
+ ],
172
+ ImportSpecifier: [
173
+ "imported",
174
+ "local"
175
+ ],
176
+ JSXAttribute: [
177
+ "name",
178
+ "value"
179
+ ],
180
+ JSXClosingElement: [
181
+ "name"
182
+ ],
183
+ JSXClosingFragment: [],
184
+ JSXElement: [
185
+ "openingElement",
186
+ "children",
187
+ "closingElement"
188
+ ],
189
+ JSXEmptyExpression: [],
190
+ JSXExpressionContainer: [
191
+ "expression"
192
+ ],
193
+ JSXFragment: [
194
+ "openingFragment",
195
+ "children",
196
+ "closingFragment"
197
+ ],
198
+ JSXIdentifier: [],
199
+ JSXMemberExpression: [
200
+ "object",
201
+ "property"
202
+ ],
203
+ JSXNamespacedName: [
204
+ "namespace",
205
+ "name"
206
+ ],
207
+ JSXOpeningElement: [
208
+ "name",
209
+ "attributes"
210
+ ],
211
+ JSXOpeningFragment: [],
212
+ JSXSpreadAttribute: [
213
+ "argument"
214
+ ],
215
+ JSXSpreadChild: [
216
+ "expression"
217
+ ],
218
+ JSXText: [],
219
+ LabeledStatement: [
220
+ "label",
221
+ "body"
222
+ ],
223
+ Literal: [],
224
+ LogicalExpression: [
225
+ "left",
226
+ "right"
227
+ ],
228
+ MemberExpression: [
229
+ "object",
230
+ "property"
231
+ ],
232
+ MetaProperty: [
233
+ "meta",
234
+ "property"
235
+ ],
236
+ MethodDefinition: [
237
+ "key",
238
+ "value"
239
+ ],
240
+ NewExpression: [
241
+ "callee",
242
+ "arguments"
243
+ ],
244
+ ObjectExpression: [
245
+ "properties"
246
+ ],
247
+ ObjectPattern: [
248
+ "properties"
249
+ ],
250
+ PrivateIdentifier: [],
251
+ Program: [
252
+ "body"
253
+ ],
254
+ Property: [
255
+ "key",
256
+ "value"
257
+ ],
258
+ PropertyDefinition: [
259
+ "key",
260
+ "value"
261
+ ],
262
+ RestElement: [
263
+ "argument"
264
+ ],
265
+ ReturnStatement: [
266
+ "argument"
267
+ ],
268
+ SequenceExpression: [
269
+ "expressions"
270
+ ],
271
+ SpreadElement: [
272
+ "argument"
273
+ ],
274
+ StaticBlock: [
275
+ "body"
276
+ ],
277
+ Super: [],
278
+ SwitchCase: [
279
+ "test",
280
+ "consequent"
281
+ ],
282
+ SwitchStatement: [
283
+ "discriminant",
284
+ "cases"
285
+ ],
286
+ TaggedTemplateExpression: [
287
+ "tag",
288
+ "quasi"
289
+ ],
290
+ TemplateElement: [],
291
+ TemplateLiteral: [
292
+ "quasis",
293
+ "expressions"
294
+ ],
295
+ ThisExpression: [],
296
+ ThrowStatement: [
297
+ "argument"
298
+ ],
299
+ TryStatement: [
300
+ "block",
301
+ "handler",
302
+ "finalizer"
303
+ ],
304
+ UnaryExpression: [
305
+ "argument"
306
+ ],
307
+ UpdateExpression: [
308
+ "argument"
309
+ ],
310
+ VariableDeclaration: [
311
+ "declarations"
312
+ ],
313
+ VariableDeclarator: [
314
+ "id",
315
+ "init"
316
+ ],
317
+ WhileStatement: [
318
+ "test",
319
+ "body"
320
+ ],
321
+ WithStatement: [
322
+ "object",
323
+ "body"
324
+ ],
325
+ YieldExpression: [
326
+ "argument"
327
+ ]
328
+ };
329
+
330
+ // Types.
331
+ const NODE_TYPES = Object.keys(KEYS);
332
+
333
+ // Freeze the keys.
334
+ for (const type of NODE_TYPES) {
335
+ Object.freeze(KEYS[type]);
336
+ }
337
+ Object.freeze(KEYS);
338
+
339
+ /**
340
+ * @author Toru Nagashima <https://github.com/mysticatea>
341
+ * See LICENSE file in root directory for full license.
342
+ */
343
+
344
+ /**
345
+ * @typedef {import('./visitor-keys.js').VisitorKeys} VisitorKeys
346
+ */
347
+
348
+ // List to ignore keys.
349
+ const KEY_BLACKLIST = new Set([
350
+ "parent",
351
+ "leadingComments",
352
+ "trailingComments"
353
+ ]);
354
+
355
+ /**
356
+ * Check whether a given key should be used or not.
357
+ * @param {string} key The key to check.
358
+ * @returns {boolean} `true` if the key should be used.
359
+ */
360
+ function filterKey(key) {
361
+ return !KEY_BLACKLIST.has(key) && key[0] !== "_";
362
+ }
363
+
364
+
365
+ /* eslint-disable jsdoc/valid-types -- doesn't allow `readonly`.
366
+ TODO: remove eslint-disable when https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/164 is fixed
367
+ */
368
+ /**
369
+ * Get visitor keys of a given node.
370
+ * @param {Object} node The AST node to get keys.
371
+ * @returns {readonly string[]} Visitor keys of the node.
372
+ */
373
+ function getKeys(node) {
374
+ return Object.keys(node).filter(filterKey);
375
+ }
376
+ /* eslint-enable jsdoc/valid-types -- doesn't allow `readonly` */
377
+
378
+ /**
379
+ * Make the union set with `KEYS` and given keys.
380
+ * @param {VisitorKeys} additionalKeys The additional keys.
381
+ * @returns {VisitorKeys} The union set.
382
+ */
383
+ function unionWith(additionalKeys) {
384
+ const retv = /** @type {{ [type: string]: ReadonlyArray<string> }} */
385
+ (Object.assign({}, KEYS));
386
+
387
+ for (const type of Object.keys(additionalKeys)) {
388
+ if (Object.hasOwn(retv, type)) {
389
+ const keys = new Set(additionalKeys[type]);
390
+
391
+ for (const key of retv[type]) {
392
+ keys.add(key);
393
+ }
394
+
395
+ retv[type] = Object.freeze(Array.from(keys));
396
+ } else {
397
+ retv[type] = Object.freeze(Array.from(additionalKeys[type]));
398
+ }
399
+ }
400
+
401
+ return Object.freeze(retv);
402
+ }
403
+
404
+ eslintVisitorKeys.KEYS = KEYS;
405
+ eslintVisitorKeys.getKeys = getKeys;
406
+ eslintVisitorKeys.unionWith = unionWith;
407
+ return eslintVisitorKeys;
408
+ }
409
+
410
+ var src = {exports: {}};
411
+
412
+ var browser = {exports: {}};
413
+
414
+ /**
415
+ * Helpers.
416
+ */
417
+
418
+ var ms;
419
+ var hasRequiredMs;
420
+
421
+ function requireMs () {
422
+ if (hasRequiredMs) return ms;
423
+ hasRequiredMs = 1;
424
+ var s = 1000;
425
+ var m = s * 60;
426
+ var h = m * 60;
427
+ var d = h * 24;
428
+ var w = d * 7;
429
+ var y = d * 365.25;
430
+
431
+ /**
432
+ * Parse or format the given `val`.
433
+ *
434
+ * Options:
435
+ *
436
+ * - `long` verbose formatting [false]
437
+ *
438
+ * @param {String|Number} val
439
+ * @param {Object} [options]
440
+ * @throws {Error} throw an error if val is not a non-empty string or a number
441
+ * @return {String|Number}
442
+ * @api public
443
+ */
444
+
445
+ ms = function (val, options) {
446
+ options = options || {};
447
+ var type = typeof val;
448
+ if (type === 'string' && val.length > 0) {
449
+ return parse(val);
450
+ } else if (type === 'number' && isFinite(val)) {
451
+ return options.long ? fmtLong(val) : fmtShort(val);
452
+ }
453
+ throw new Error(
454
+ 'val is not a non-empty string or a valid number. val=' +
455
+ JSON.stringify(val)
456
+ );
457
+ };
458
+
459
+ /**
460
+ * Parse the given `str` and return milliseconds.
461
+ *
462
+ * @param {String} str
463
+ * @return {Number}
464
+ * @api private
465
+ */
466
+
467
+ function parse(str) {
468
+ str = String(str);
469
+ if (str.length > 100) {
470
+ return;
471
+ }
472
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
473
+ str
474
+ );
475
+ if (!match) {
476
+ return;
477
+ }
478
+ var n = parseFloat(match[1]);
479
+ var type = (match[2] || 'ms').toLowerCase();
480
+ switch (type) {
481
+ case 'years':
482
+ case 'year':
483
+ case 'yrs':
484
+ case 'yr':
485
+ case 'y':
486
+ return n * y;
487
+ case 'weeks':
488
+ case 'week':
489
+ case 'w':
490
+ return n * w;
491
+ case 'days':
492
+ case 'day':
493
+ case 'd':
494
+ return n * d;
495
+ case 'hours':
496
+ case 'hour':
497
+ case 'hrs':
498
+ case 'hr':
499
+ case 'h':
500
+ return n * h;
501
+ case 'minutes':
502
+ case 'minute':
503
+ case 'mins':
504
+ case 'min':
505
+ case 'm':
506
+ return n * m;
507
+ case 'seconds':
508
+ case 'second':
509
+ case 'secs':
510
+ case 'sec':
511
+ case 's':
512
+ return n * s;
513
+ case 'milliseconds':
514
+ case 'millisecond':
515
+ case 'msecs':
516
+ case 'msec':
517
+ case 'ms':
518
+ return n;
519
+ default:
520
+ return undefined;
521
+ }
522
+ }
523
+
524
+ /**
525
+ * Short format for `ms`.
526
+ *
527
+ * @param {Number} ms
528
+ * @return {String}
529
+ * @api private
530
+ */
531
+
532
+ function fmtShort(ms) {
533
+ var msAbs = Math.abs(ms);
534
+ if (msAbs >= d) {
535
+ return Math.round(ms / d) + 'd';
536
+ }
537
+ if (msAbs >= h) {
538
+ return Math.round(ms / h) + 'h';
539
+ }
540
+ if (msAbs >= m) {
541
+ return Math.round(ms / m) + 'm';
542
+ }
543
+ if (msAbs >= s) {
544
+ return Math.round(ms / s) + 's';
545
+ }
546
+ return ms + 'ms';
547
+ }
548
+
549
+ /**
550
+ * Long format for `ms`.
551
+ *
552
+ * @param {Number} ms
553
+ * @return {String}
554
+ * @api private
555
+ */
556
+
557
+ function fmtLong(ms) {
558
+ var msAbs = Math.abs(ms);
559
+ if (msAbs >= d) {
560
+ return plural(ms, msAbs, d, 'day');
561
+ }
562
+ if (msAbs >= h) {
563
+ return plural(ms, msAbs, h, 'hour');
564
+ }
565
+ if (msAbs >= m) {
566
+ return plural(ms, msAbs, m, 'minute');
567
+ }
568
+ if (msAbs >= s) {
569
+ return plural(ms, msAbs, s, 'second');
570
+ }
571
+ return ms + ' ms';
572
+ }
573
+
574
+ /**
575
+ * Pluralization helper.
576
+ */
577
+
578
+ function plural(ms, msAbs, n, name) {
579
+ var isPlural = msAbs >= n * 1.5;
580
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
581
+ }
582
+ return ms;
583
+ }
584
+
585
+ var common;
586
+ var hasRequiredCommon;
587
+
588
+ function requireCommon () {
589
+ if (hasRequiredCommon) return common;
590
+ hasRequiredCommon = 1;
591
+ /**
592
+ * This is the common logic for both the Node.js and web browser
593
+ * implementations of `debug()`.
594
+ */
595
+
596
+ function setup(env) {
597
+ createDebug.debug = createDebug;
598
+ createDebug.default = createDebug;
599
+ createDebug.coerce = coerce;
600
+ createDebug.disable = disable;
601
+ createDebug.enable = enable;
602
+ createDebug.enabled = enabled;
603
+ createDebug.humanize = requireMs();
604
+ createDebug.destroy = destroy;
605
+
606
+ Object.keys(env).forEach(key => {
607
+ createDebug[key] = env[key];
608
+ });
609
+
610
+ /**
611
+ * The currently active debug mode names, and names to skip.
612
+ */
613
+
614
+ createDebug.names = [];
615
+ createDebug.skips = [];
616
+
617
+ /**
618
+ * Map of special "%n" handling functions, for the debug "format" argument.
619
+ *
620
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
621
+ */
622
+ createDebug.formatters = {};
623
+
624
+ /**
625
+ * Selects a color for a debug namespace
626
+ * @param {String} namespace The namespace string for the debug instance to be colored
627
+ * @return {Number|String} An ANSI color code for the given namespace
628
+ * @api private
629
+ */
630
+ function selectColor(namespace) {
631
+ let hash = 0;
632
+
633
+ for (let i = 0; i < namespace.length; i++) {
634
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
635
+ hash |= 0; // Convert to 32bit integer
636
+ }
637
+
638
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
639
+ }
640
+ createDebug.selectColor = selectColor;
641
+
642
+ /**
643
+ * Create a debugger with the given `namespace`.
644
+ *
645
+ * @param {String} namespace
646
+ * @return {Function}
647
+ * @api public
648
+ */
649
+ function createDebug(namespace) {
650
+ let prevTime;
651
+ let enableOverride = null;
652
+ let namespacesCache;
653
+ let enabledCache;
654
+
655
+ function debug(...args) {
656
+ // Disabled?
657
+ if (!debug.enabled) {
658
+ return;
659
+ }
660
+
661
+ const self = debug;
662
+
663
+ // Set `diff` timestamp
664
+ const curr = Number(new Date());
665
+ const ms = curr - (prevTime || curr);
666
+ self.diff = ms;
667
+ self.prev = prevTime;
668
+ self.curr = curr;
669
+ prevTime = curr;
670
+
671
+ args[0] = createDebug.coerce(args[0]);
672
+
673
+ if (typeof args[0] !== 'string') {
674
+ // Anything else let's inspect with %O
675
+ args.unshift('%O');
676
+ }
677
+
678
+ // Apply any `formatters` transformations
679
+ let index = 0;
680
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
681
+ // If we encounter an escaped % then don't increase the array index
682
+ if (match === '%%') {
683
+ return '%';
684
+ }
685
+ index++;
686
+ const formatter = createDebug.formatters[format];
687
+ if (typeof formatter === 'function') {
688
+ const val = args[index];
689
+ match = formatter.call(self, val);
690
+
691
+ // Now we need to remove `args[index]` since it's inlined in the `format`
692
+ args.splice(index, 1);
693
+ index--;
694
+ }
695
+ return match;
696
+ });
697
+
698
+ // Apply env-specific formatting (colors, etc.)
699
+ createDebug.formatArgs.call(self, args);
700
+
701
+ const logFn = self.log || createDebug.log;
702
+ logFn.apply(self, args);
703
+ }
704
+
705
+ debug.namespace = namespace;
706
+ debug.useColors = createDebug.useColors();
707
+ debug.color = createDebug.selectColor(namespace);
708
+ debug.extend = extend;
709
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
710
+
711
+ Object.defineProperty(debug, 'enabled', {
712
+ enumerable: true,
713
+ configurable: false,
714
+ get: () => {
715
+ if (enableOverride !== null) {
716
+ return enableOverride;
717
+ }
718
+ if (namespacesCache !== createDebug.namespaces) {
719
+ namespacesCache = createDebug.namespaces;
720
+ enabledCache = createDebug.enabled(namespace);
721
+ }
722
+
723
+ return enabledCache;
724
+ },
725
+ set: v => {
726
+ enableOverride = v;
727
+ }
728
+ });
729
+
730
+ // Env-specific initialization logic for debug instances
731
+ if (typeof createDebug.init === 'function') {
732
+ createDebug.init(debug);
733
+ }
734
+
735
+ return debug;
736
+ }
737
+
738
+ function extend(namespace, delimiter) {
739
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
740
+ newDebug.log = this.log;
741
+ return newDebug;
742
+ }
743
+
744
+ /**
745
+ * Enables a debug mode by namespaces. This can include modes
746
+ * separated by a colon and wildcards.
747
+ *
748
+ * @param {String} namespaces
749
+ * @api public
750
+ */
751
+ function enable(namespaces) {
752
+ createDebug.save(namespaces);
753
+ createDebug.namespaces = namespaces;
754
+
755
+ createDebug.names = [];
756
+ createDebug.skips = [];
757
+
758
+ const split = (typeof namespaces === 'string' ? namespaces : '')
759
+ .trim()
760
+ .replace(' ', ',')
761
+ .split(',')
762
+ .filter(Boolean);
763
+
764
+ for (const ns of split) {
765
+ if (ns[0] === '-') {
766
+ createDebug.skips.push(ns.slice(1));
767
+ } else {
768
+ createDebug.names.push(ns);
769
+ }
770
+ }
771
+ }
772
+
773
+ /**
774
+ * Checks if the given string matches a namespace template, honoring
775
+ * asterisks as wildcards.
776
+ *
777
+ * @param {String} search
778
+ * @param {String} template
779
+ * @return {Boolean}
780
+ */
781
+ function matchesTemplate(search, template) {
782
+ let searchIndex = 0;
783
+ let templateIndex = 0;
784
+ let starIndex = -1;
785
+ let matchIndex = 0;
786
+
787
+ while (searchIndex < search.length) {
788
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
789
+ // Match character or proceed with wildcard
790
+ if (template[templateIndex] === '*') {
791
+ starIndex = templateIndex;
792
+ matchIndex = searchIndex;
793
+ templateIndex++; // Skip the '*'
794
+ } else {
795
+ searchIndex++;
796
+ templateIndex++;
797
+ }
798
+ } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
799
+ // Backtrack to the last '*' and try to match more characters
800
+ templateIndex = starIndex + 1;
801
+ matchIndex++;
802
+ searchIndex = matchIndex;
803
+ } else {
804
+ return false; // No match
805
+ }
806
+ }
807
+
808
+ // Handle trailing '*' in template
809
+ while (templateIndex < template.length && template[templateIndex] === '*') {
810
+ templateIndex++;
811
+ }
812
+
813
+ return templateIndex === template.length;
814
+ }
815
+
816
+ /**
817
+ * Disable debug output.
818
+ *
819
+ * @return {String} namespaces
820
+ * @api public
821
+ */
822
+ function disable() {
823
+ const namespaces = [
824
+ ...createDebug.names,
825
+ ...createDebug.skips.map(namespace => '-' + namespace)
826
+ ].join(',');
827
+ createDebug.enable('');
828
+ return namespaces;
829
+ }
830
+
831
+ /**
832
+ * Returns true if the given mode name is enabled, false otherwise.
833
+ *
834
+ * @param {String} name
835
+ * @return {Boolean}
836
+ * @api public
837
+ */
838
+ function enabled(name) {
839
+ for (const skip of createDebug.skips) {
840
+ if (matchesTemplate(name, skip)) {
841
+ return false;
842
+ }
843
+ }
844
+
845
+ for (const ns of createDebug.names) {
846
+ if (matchesTemplate(name, ns)) {
847
+ return true;
848
+ }
849
+ }
850
+
851
+ return false;
852
+ }
853
+
854
+ /**
855
+ * Coerce `val`.
856
+ *
857
+ * @param {Mixed} val
858
+ * @return {Mixed}
859
+ * @api private
860
+ */
861
+ function coerce(val) {
862
+ if (val instanceof Error) {
863
+ return val.stack || val.message;
864
+ }
865
+ return val;
866
+ }
867
+
868
+ /**
869
+ * XXX DO NOT USE. This is a temporary stub function.
870
+ * XXX It WILL be removed in the next major release.
871
+ */
872
+ function destroy() {
873
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
874
+ }
875
+
876
+ createDebug.enable(createDebug.load());
877
+
878
+ return createDebug;
879
+ }
880
+
881
+ common = setup;
882
+ return common;
883
+ }
884
+
885
+ /* eslint-env browser */
886
+
887
+ var hasRequiredBrowser;
888
+
889
+ function requireBrowser () {
890
+ if (hasRequiredBrowser) return browser.exports;
891
+ hasRequiredBrowser = 1;
892
+ (function (module, exports) {
893
+ /**
894
+ * This is the web browser implementation of `debug()`.
895
+ */
896
+
897
+ exports.formatArgs = formatArgs;
898
+ exports.save = save;
899
+ exports.load = load;
900
+ exports.useColors = useColors;
901
+ exports.storage = localstorage();
902
+ exports.destroy = (() => {
903
+ let warned = false;
904
+
905
+ return () => {
906
+ if (!warned) {
907
+ warned = true;
908
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
909
+ }
910
+ };
911
+ })();
912
+
913
+ /**
914
+ * Colors.
915
+ */
916
+
917
+ exports.colors = [
918
+ '#0000CC',
919
+ '#0000FF',
920
+ '#0033CC',
921
+ '#0033FF',
922
+ '#0066CC',
923
+ '#0066FF',
924
+ '#0099CC',
925
+ '#0099FF',
926
+ '#00CC00',
927
+ '#00CC33',
928
+ '#00CC66',
929
+ '#00CC99',
930
+ '#00CCCC',
931
+ '#00CCFF',
932
+ '#3300CC',
933
+ '#3300FF',
934
+ '#3333CC',
935
+ '#3333FF',
936
+ '#3366CC',
937
+ '#3366FF',
938
+ '#3399CC',
939
+ '#3399FF',
940
+ '#33CC00',
941
+ '#33CC33',
942
+ '#33CC66',
943
+ '#33CC99',
944
+ '#33CCCC',
945
+ '#33CCFF',
946
+ '#6600CC',
947
+ '#6600FF',
948
+ '#6633CC',
949
+ '#6633FF',
950
+ '#66CC00',
951
+ '#66CC33',
952
+ '#9900CC',
953
+ '#9900FF',
954
+ '#9933CC',
955
+ '#9933FF',
956
+ '#99CC00',
957
+ '#99CC33',
958
+ '#CC0000',
959
+ '#CC0033',
960
+ '#CC0066',
961
+ '#CC0099',
962
+ '#CC00CC',
963
+ '#CC00FF',
964
+ '#CC3300',
965
+ '#CC3333',
966
+ '#CC3366',
967
+ '#CC3399',
968
+ '#CC33CC',
969
+ '#CC33FF',
970
+ '#CC6600',
971
+ '#CC6633',
972
+ '#CC9900',
973
+ '#CC9933',
974
+ '#CCCC00',
975
+ '#CCCC33',
976
+ '#FF0000',
977
+ '#FF0033',
978
+ '#FF0066',
979
+ '#FF0099',
980
+ '#FF00CC',
981
+ '#FF00FF',
982
+ '#FF3300',
983
+ '#FF3333',
984
+ '#FF3366',
985
+ '#FF3399',
986
+ '#FF33CC',
987
+ '#FF33FF',
988
+ '#FF6600',
989
+ '#FF6633',
990
+ '#FF9900',
991
+ '#FF9933',
992
+ '#FFCC00',
993
+ '#FFCC33'
994
+ ];
995
+
996
+ /**
997
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
998
+ * and the Firebug extension (any Firefox version) are known
999
+ * to support "%c" CSS customizations.
1000
+ *
1001
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
1002
+ */
1003
+
1004
+ // eslint-disable-next-line complexity
1005
+ function useColors() {
1006
+ // NB: In an Electron preload script, document will be defined but not fully
1007
+ // initialized. Since we know we're in Chrome, we'll just detect this case
1008
+ // explicitly
1009
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
1010
+ return true;
1011
+ }
1012
+
1013
+ // Internet Explorer and Edge do not support colors.
1014
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
1015
+ return false;
1016
+ }
1017
+
1018
+ let m;
1019
+
1020
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
1021
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
1022
+ // eslint-disable-next-line no-return-assign
1023
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
1024
+ // Is firebug? http://stackoverflow.com/a/398120/376773
1025
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
1026
+ // Is firefox >= v31?
1027
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
1028
+ (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
1029
+ // Double check webkit in userAgent just in case we are in a worker
1030
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
1031
+ }
1032
+
1033
+ /**
1034
+ * Colorize log arguments if enabled.
1035
+ *
1036
+ * @api public
1037
+ */
1038
+
1039
+ function formatArgs(args) {
1040
+ args[0] = (this.useColors ? '%c' : '') +
1041
+ this.namespace +
1042
+ (this.useColors ? ' %c' : ' ') +
1043
+ args[0] +
1044
+ (this.useColors ? '%c ' : ' ') +
1045
+ '+' + module.exports.humanize(this.diff);
1046
+
1047
+ if (!this.useColors) {
1048
+ return;
1049
+ }
1050
+
1051
+ const c = 'color: ' + this.color;
1052
+ args.splice(1, 0, c, 'color: inherit');
1053
+
1054
+ // The final "%c" is somewhat tricky, because there could be other
1055
+ // arguments passed either before or after the %c, so we need to
1056
+ // figure out the correct index to insert the CSS into
1057
+ let index = 0;
1058
+ let lastC = 0;
1059
+ args[0].replace(/%[a-zA-Z%]/g, match => {
1060
+ if (match === '%%') {
1061
+ return;
1062
+ }
1063
+ index++;
1064
+ if (match === '%c') {
1065
+ // We only are interested in the *last* %c
1066
+ // (the user may have provided their own)
1067
+ lastC = index;
1068
+ }
1069
+ });
1070
+
1071
+ args.splice(lastC, 0, c);
1072
+ }
1073
+
1074
+ /**
1075
+ * Invokes `console.debug()` when available.
1076
+ * No-op when `console.debug` is not a "function".
1077
+ * If `console.debug` is not available, falls back
1078
+ * to `console.log`.
1079
+ *
1080
+ * @api public
1081
+ */
1082
+ exports.log = console.debug || console.log || (() => {});
1083
+
1084
+ /**
1085
+ * Save `namespaces`.
1086
+ *
1087
+ * @param {String} namespaces
1088
+ * @api private
1089
+ */
1090
+ function save(namespaces) {
1091
+ try {
1092
+ if (namespaces) {
1093
+ exports.storage.setItem('debug', namespaces);
1094
+ } else {
1095
+ exports.storage.removeItem('debug');
1096
+ }
1097
+ } catch (error) {
1098
+ // Swallow
1099
+ // XXX (@Qix-) should we be logging these?
1100
+ }
1101
+ }
1102
+
1103
+ /**
1104
+ * Load `namespaces`.
1105
+ *
1106
+ * @return {String} returns the previously persisted debug modes
1107
+ * @api private
1108
+ */
1109
+ function load() {
1110
+ let r;
1111
+ try {
1112
+ r = exports.storage.getItem('debug');
1113
+ } catch (error) {
1114
+ // Swallow
1115
+ // XXX (@Qix-) should we be logging these?
1116
+ }
1117
+
1118
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
1119
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
1120
+ r = process.env.DEBUG;
1121
+ }
1122
+
1123
+ return r;
1124
+ }
1125
+
1126
+ /**
1127
+ * Localstorage attempts to return the localstorage.
1128
+ *
1129
+ * This is necessary because safari throws
1130
+ * when a user disables cookies/localstorage
1131
+ * and you attempt to access it.
1132
+ *
1133
+ * @return {LocalStorage}
1134
+ * @api private
1135
+ */
1136
+
1137
+ function localstorage() {
1138
+ try {
1139
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
1140
+ // The Browser also has localStorage in the global context.
1141
+ return localStorage;
1142
+ } catch (error) {
1143
+ // Swallow
1144
+ // XXX (@Qix-) should we be logging these?
1145
+ }
1146
+ }
1147
+
1148
+ module.exports = requireCommon()(exports);
1149
+
1150
+ const {formatters} = module.exports;
1151
+
1152
+ /**
1153
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
1154
+ */
1155
+
1156
+ formatters.j = function (v) {
1157
+ try {
1158
+ return JSON.stringify(v);
1159
+ } catch (error) {
1160
+ return '[UnexpectedJSONParseError]: ' + error.message;
1161
+ }
1162
+ };
1163
+ } (browser, browser.exports));
1164
+ return browser.exports;
1165
+ }
1166
+
1167
+ var node = {exports: {}};
1168
+
1169
+ var hasFlag;
1170
+ var hasRequiredHasFlag;
1171
+
1172
+ function requireHasFlag () {
1173
+ if (hasRequiredHasFlag) return hasFlag;
1174
+ hasRequiredHasFlag = 1;
1175
+
1176
+ hasFlag = (flag, argv = process.argv) => {
1177
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
1178
+ const position = argv.indexOf(prefix + flag);
1179
+ const terminatorPosition = argv.indexOf('--');
1180
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
1181
+ };
1182
+ return hasFlag;
1183
+ }
1184
+
1185
+ var supportsColor_1;
1186
+ var hasRequiredSupportsColor;
1187
+
1188
+ function requireSupportsColor () {
1189
+ if (hasRequiredSupportsColor) return supportsColor_1;
1190
+ hasRequiredSupportsColor = 1;
1191
+ const os = require$$0$1;
1192
+ const tty = require$$0;
1193
+ const hasFlag = requireHasFlag();
1194
+
1195
+ const {env} = process;
1196
+
1197
+ let forceColor;
1198
+ if (hasFlag('no-color') ||
1199
+ hasFlag('no-colors') ||
1200
+ hasFlag('color=false') ||
1201
+ hasFlag('color=never')) {
1202
+ forceColor = 0;
1203
+ } else if (hasFlag('color') ||
1204
+ hasFlag('colors') ||
1205
+ hasFlag('color=true') ||
1206
+ hasFlag('color=always')) {
1207
+ forceColor = 1;
1208
+ }
1209
+
1210
+ if ('FORCE_COLOR' in env) {
1211
+ if (env.FORCE_COLOR === 'true') {
1212
+ forceColor = 1;
1213
+ } else if (env.FORCE_COLOR === 'false') {
1214
+ forceColor = 0;
1215
+ } else {
1216
+ forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
1217
+ }
1218
+ }
1219
+
1220
+ function translateLevel(level) {
1221
+ if (level === 0) {
1222
+ return false;
1223
+ }
1224
+
1225
+ return {
1226
+ level,
1227
+ hasBasic: true,
1228
+ has256: level >= 2,
1229
+ has16m: level >= 3
1230
+ };
1231
+ }
1232
+
1233
+ function supportsColor(haveStream, streamIsTTY) {
1234
+ if (forceColor === 0) {
1235
+ return 0;
1236
+ }
1237
+
1238
+ if (hasFlag('color=16m') ||
1239
+ hasFlag('color=full') ||
1240
+ hasFlag('color=truecolor')) {
1241
+ return 3;
1242
+ }
1243
+
1244
+ if (hasFlag('color=256')) {
1245
+ return 2;
1246
+ }
1247
+
1248
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
1249
+ return 0;
1250
+ }
1251
+
1252
+ const min = forceColor || 0;
1253
+
1254
+ if (env.TERM === 'dumb') {
1255
+ return min;
1256
+ }
1257
+
1258
+ if (process.platform === 'win32') {
1259
+ // Windows 10 build 10586 is the first Windows release that supports 256 colors.
1260
+ // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
1261
+ const osRelease = os.release().split('.');
1262
+ if (
1263
+ Number(osRelease[0]) >= 10 &&
1264
+ Number(osRelease[2]) >= 10586
1265
+ ) {
1266
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
1267
+ }
1268
+
1269
+ return 1;
1270
+ }
1271
+
1272
+ if ('CI' in env) {
1273
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
1274
+ return 1;
1275
+ }
1276
+
1277
+ return min;
1278
+ }
1279
+
1280
+ if ('TEAMCITY_VERSION' in env) {
1281
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
1282
+ }
1283
+
1284
+ if (env.COLORTERM === 'truecolor') {
1285
+ return 3;
1286
+ }
1287
+
1288
+ if ('TERM_PROGRAM' in env) {
1289
+ const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
1290
+
1291
+ switch (env.TERM_PROGRAM) {
1292
+ case 'iTerm.app':
1293
+ return version >= 3 ? 3 : 2;
1294
+ case 'Apple_Terminal':
1295
+ return 2;
1296
+ // No default
1297
+ }
1298
+ }
1299
+
1300
+ if (/-256(color)?$/i.test(env.TERM)) {
1301
+ return 2;
1302
+ }
1303
+
1304
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
1305
+ return 1;
1306
+ }
1307
+
1308
+ if ('COLORTERM' in env) {
1309
+ return 1;
1310
+ }
1311
+
1312
+ return min;
1313
+ }
1314
+
1315
+ function getSupportLevel(stream) {
1316
+ const level = supportsColor(stream, stream && stream.isTTY);
1317
+ return translateLevel(level);
1318
+ }
1319
+
1320
+ supportsColor_1 = {
1321
+ supportsColor: getSupportLevel,
1322
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
1323
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
1324
+ };
1325
+ return supportsColor_1;
1326
+ }
1327
+
1328
+ /**
1329
+ * Module dependencies.
1330
+ */
1331
+
1332
+ var hasRequiredNode;
1333
+
1334
+ function requireNode () {
1335
+ if (hasRequiredNode) return node.exports;
1336
+ hasRequiredNode = 1;
1337
+ (function (module, exports) {
1338
+ const tty = require$$0;
1339
+ const util = require$$0$2;
1340
+
1341
+ /**
1342
+ * This is the Node.js implementation of `debug()`.
1343
+ */
1344
+
1345
+ exports.init = init;
1346
+ exports.log = log;
1347
+ exports.formatArgs = formatArgs;
1348
+ exports.save = save;
1349
+ exports.load = load;
1350
+ exports.useColors = useColors;
1351
+ exports.destroy = util.deprecate(
1352
+ () => {},
1353
+ 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
1354
+ );
1355
+
1356
+ /**
1357
+ * Colors.
1358
+ */
1359
+
1360
+ exports.colors = [6, 2, 3, 4, 5, 1];
1361
+
1362
+ try {
1363
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
1364
+ // eslint-disable-next-line import/no-extraneous-dependencies
1365
+ const supportsColor = requireSupportsColor();
1366
+
1367
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
1368
+ exports.colors = [
1369
+ 20,
1370
+ 21,
1371
+ 26,
1372
+ 27,
1373
+ 32,
1374
+ 33,
1375
+ 38,
1376
+ 39,
1377
+ 40,
1378
+ 41,
1379
+ 42,
1380
+ 43,
1381
+ 44,
1382
+ 45,
1383
+ 56,
1384
+ 57,
1385
+ 62,
1386
+ 63,
1387
+ 68,
1388
+ 69,
1389
+ 74,
1390
+ 75,
1391
+ 76,
1392
+ 77,
1393
+ 78,
1394
+ 79,
1395
+ 80,
1396
+ 81,
1397
+ 92,
1398
+ 93,
1399
+ 98,
1400
+ 99,
1401
+ 112,
1402
+ 113,
1403
+ 128,
1404
+ 129,
1405
+ 134,
1406
+ 135,
1407
+ 148,
1408
+ 149,
1409
+ 160,
1410
+ 161,
1411
+ 162,
1412
+ 163,
1413
+ 164,
1414
+ 165,
1415
+ 166,
1416
+ 167,
1417
+ 168,
1418
+ 169,
1419
+ 170,
1420
+ 171,
1421
+ 172,
1422
+ 173,
1423
+ 178,
1424
+ 179,
1425
+ 184,
1426
+ 185,
1427
+ 196,
1428
+ 197,
1429
+ 198,
1430
+ 199,
1431
+ 200,
1432
+ 201,
1433
+ 202,
1434
+ 203,
1435
+ 204,
1436
+ 205,
1437
+ 206,
1438
+ 207,
1439
+ 208,
1440
+ 209,
1441
+ 214,
1442
+ 215,
1443
+ 220,
1444
+ 221
1445
+ ];
1446
+ }
1447
+ } catch (error) {
1448
+ // Swallow - we only care if `supports-color` is available; it doesn't have to be.
1449
+ }
1450
+
1451
+ /**
1452
+ * Build up the default `inspectOpts` object from the environment variables.
1453
+ *
1454
+ * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
1455
+ */
1456
+
1457
+ exports.inspectOpts = Object.keys(process.env).filter(key => {
1458
+ return /^debug_/i.test(key);
1459
+ }).reduce((obj, key) => {
1460
+ // Camel-case
1461
+ const prop = key
1462
+ .substring(6)
1463
+ .toLowerCase()
1464
+ .replace(/_([a-z])/g, (_, k) => {
1465
+ return k.toUpperCase();
1466
+ });
1467
+
1468
+ // Coerce string value into JS value
1469
+ let val = process.env[key];
1470
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
1471
+ val = true;
1472
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
1473
+ val = false;
1474
+ } else if (val === 'null') {
1475
+ val = null;
1476
+ } else {
1477
+ val = Number(val);
1478
+ }
1479
+
1480
+ obj[prop] = val;
1481
+ return obj;
1482
+ }, {});
1483
+
1484
+ /**
1485
+ * Is stdout a TTY? Colored output is enabled when `true`.
1486
+ */
1487
+
1488
+ function useColors() {
1489
+ return 'colors' in exports.inspectOpts ?
1490
+ Boolean(exports.inspectOpts.colors) :
1491
+ tty.isatty(process.stderr.fd);
1492
+ }
1493
+
1494
+ /**
1495
+ * Adds ANSI color escape codes if enabled.
1496
+ *
1497
+ * @api public
1498
+ */
1499
+
1500
+ function formatArgs(args) {
1501
+ const {namespace: name, useColors} = this;
1502
+
1503
+ if (useColors) {
1504
+ const c = this.color;
1505
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
1506
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
1507
+
1508
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
1509
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
1510
+ } else {
1511
+ args[0] = getDate() + name + ' ' + args[0];
1512
+ }
1513
+ }
1514
+
1515
+ function getDate() {
1516
+ if (exports.inspectOpts.hideDate) {
1517
+ return '';
1518
+ }
1519
+ return new Date().toISOString() + ' ';
1520
+ }
1521
+
1522
+ /**
1523
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
1524
+ */
1525
+
1526
+ function log(...args) {
1527
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
1528
+ }
1529
+
1530
+ /**
1531
+ * Save `namespaces`.
1532
+ *
1533
+ * @param {String} namespaces
1534
+ * @api private
1535
+ */
1536
+ function save(namespaces) {
1537
+ if (namespaces) {
1538
+ process.env.DEBUG = namespaces;
1539
+ } else {
1540
+ // If you set a process.env field to null or undefined, it gets cast to the
1541
+ // string 'null' or 'undefined'. Just delete instead.
1542
+ delete process.env.DEBUG;
1543
+ }
1544
+ }
1545
+
1546
+ /**
1547
+ * Load `namespaces`.
1548
+ *
1549
+ * @return {String} returns the previously persisted debug modes
1550
+ * @api private
1551
+ */
1552
+
1553
+ function load() {
1554
+ return process.env.DEBUG;
1555
+ }
1556
+
1557
+ /**
1558
+ * Init logic for `debug` instances.
1559
+ *
1560
+ * Create a new `inspectOpts` object in case `useColors` is set
1561
+ * differently for a particular `debug` instance.
1562
+ */
1563
+
1564
+ function init(debug) {
1565
+ debug.inspectOpts = {};
1566
+
1567
+ const keys = Object.keys(exports.inspectOpts);
1568
+ for (let i = 0; i < keys.length; i++) {
1569
+ debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
1570
+ }
1571
+ }
1572
+
1573
+ module.exports = requireCommon()(exports);
1574
+
1575
+ const {formatters} = module.exports;
1576
+
1577
+ /**
1578
+ * Map %o to `util.inspect()`, all on a single line.
1579
+ */
1580
+
1581
+ formatters.o = function (v) {
1582
+ this.inspectOpts.colors = this.useColors;
1583
+ return util.inspect(v, this.inspectOpts)
1584
+ .split('\n')
1585
+ .map(str => str.trim())
1586
+ .join(' ');
1587
+ };
1588
+
1589
+ /**
1590
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
1591
+ */
1592
+
1593
+ formatters.O = function (v) {
1594
+ this.inspectOpts.colors = this.useColors;
1595
+ return util.inspect(v, this.inspectOpts);
1596
+ };
1597
+ } (node, node.exports));
1598
+ return node.exports;
1599
+ }
1600
+
1601
+ /**
1602
+ * Detect Electron renderer / nwjs process, which is node, but we should
1603
+ * treat as a browser.
1604
+ */
1605
+
1606
+ var hasRequiredSrc;
1607
+
1608
+ function requireSrc () {
1609
+ if (hasRequiredSrc) return src.exports;
1610
+ hasRequiredSrc = 1;
1611
+ if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
1612
+ src.exports = requireBrowser();
1613
+ } else {
1614
+ src.exports = requireNode();
1615
+ }
1616
+ return src.exports;
1617
+ }
1618
+
1619
+ /*!
1620
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
1621
+ *
1622
+ * Copyright (c) 2014-2016, Jon Schlinkert.
1623
+ * Licensed under the MIT License.
1624
+ */
1625
+
1626
+ var isExtglob;
1627
+ var hasRequiredIsExtglob;
1628
+
1629
+ function requireIsExtglob () {
1630
+ if (hasRequiredIsExtglob) return isExtglob;
1631
+ hasRequiredIsExtglob = 1;
1632
+ isExtglob = function isExtglob(str) {
1633
+ if (typeof str !== 'string' || str === '') {
1634
+ return false;
1635
+ }
1636
+
1637
+ var match;
1638
+ while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
1639
+ if (match[2]) return true;
1640
+ str = str.slice(match.index + match[0].length);
1641
+ }
1642
+
1643
+ return false;
1644
+ };
1645
+ return isExtglob;
1646
+ }
1647
+
1648
+ /*!
1649
+ * is-glob <https://github.com/jonschlinkert/is-glob>
1650
+ *
1651
+ * Copyright (c) 2014-2017, Jon Schlinkert.
1652
+ * Released under the MIT License.
1653
+ */
1654
+
1655
+ var isGlob;
1656
+ var hasRequiredIsGlob;
1657
+
1658
+ function requireIsGlob () {
1659
+ if (hasRequiredIsGlob) return isGlob;
1660
+ hasRequiredIsGlob = 1;
1661
+ var isExtglob = requireIsExtglob();
1662
+ var chars = { '{': '}', '(': ')', '[': ']'};
1663
+ var strictCheck = function(str) {
1664
+ if (str[0] === '!') {
1665
+ return true;
1666
+ }
1667
+ var index = 0;
1668
+ var pipeIndex = -2;
1669
+ var closeSquareIndex = -2;
1670
+ var closeCurlyIndex = -2;
1671
+ var closeParenIndex = -2;
1672
+ var backSlashIndex = -2;
1673
+ while (index < str.length) {
1674
+ if (str[index] === '*') {
1675
+ return true;
1676
+ }
1677
+
1678
+ if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) {
1679
+ return true;
1680
+ }
1681
+
1682
+ if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') {
1683
+ if (closeSquareIndex < index) {
1684
+ closeSquareIndex = str.indexOf(']', index);
1685
+ }
1686
+ if (closeSquareIndex > index) {
1687
+ if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
1688
+ return true;
1689
+ }
1690
+ backSlashIndex = str.indexOf('\\', index);
1691
+ if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {
1692
+ return true;
1693
+ }
1694
+ }
1695
+ }
1696
+
1697
+ if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') {
1698
+ closeCurlyIndex = str.indexOf('}', index);
1699
+ if (closeCurlyIndex > index) {
1700
+ backSlashIndex = str.indexOf('\\', index);
1701
+ if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {
1702
+ return true;
1703
+ }
1704
+ }
1705
+ }
1706
+
1707
+ if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') {
1708
+ closeParenIndex = str.indexOf(')', index);
1709
+ if (closeParenIndex > index) {
1710
+ backSlashIndex = str.indexOf('\\', index);
1711
+ if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
1712
+ return true;
1713
+ }
1714
+ }
1715
+ }
1716
+
1717
+ if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') {
1718
+ if (pipeIndex < index) {
1719
+ pipeIndex = str.indexOf('|', index);
1720
+ }
1721
+ if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') {
1722
+ closeParenIndex = str.indexOf(')', pipeIndex);
1723
+ if (closeParenIndex > pipeIndex) {
1724
+ backSlashIndex = str.indexOf('\\', pipeIndex);
1725
+ if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {
1726
+ return true;
1727
+ }
1728
+ }
1729
+ }
1730
+ }
1731
+
1732
+ if (str[index] === '\\') {
1733
+ var open = str[index + 1];
1734
+ index += 2;
1735
+ var close = chars[open];
1736
+
1737
+ if (close) {
1738
+ var n = str.indexOf(close, index);
1739
+ if (n !== -1) {
1740
+ index = n + 1;
1741
+ }
1742
+ }
1743
+
1744
+ if (str[index] === '!') {
1745
+ return true;
1746
+ }
1747
+ } else {
1748
+ index++;
1749
+ }
1750
+ }
1751
+ return false;
1752
+ };
1753
+
1754
+ var relaxedCheck = function(str) {
1755
+ if (str[0] === '!') {
1756
+ return true;
1757
+ }
1758
+ var index = 0;
1759
+ while (index < str.length) {
1760
+ if (/[*?{}()[\]]/.test(str[index])) {
1761
+ return true;
1762
+ }
1763
+
1764
+ if (str[index] === '\\') {
1765
+ var open = str[index + 1];
1766
+ index += 2;
1767
+ var close = chars[open];
1768
+
1769
+ if (close) {
1770
+ var n = str.indexOf(close, index);
1771
+ if (n !== -1) {
1772
+ index = n + 1;
1773
+ }
1774
+ }
1775
+
1776
+ if (str[index] === '!') {
1777
+ return true;
1778
+ }
1779
+ } else {
1780
+ index++;
1781
+ }
1782
+ }
1783
+ return false;
1784
+ };
1785
+
1786
+ isGlob = function isGlob(str, options) {
1787
+ if (typeof str !== 'string' || str === '') {
1788
+ return false;
1789
+ }
1790
+
1791
+ if (isExtglob(str)) {
1792
+ return true;
1793
+ }
1794
+
1795
+ var check = strictCheck;
1796
+
1797
+ // optionally relax check
1798
+ if (options && options.strict === false) {
1799
+ check = relaxedCheck;
1800
+ }
1801
+
1802
+ return check(str);
1803
+ };
1804
+ return isGlob;
1805
+ }
1806
+
1807
+ export { requireSrc as a, requireMs as b, requireSupportsColor as c, requireEslintVisitorKeys as d, requireIsGlob as r };