spawn-term 0.1.30 → 0.1.32
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/assets/ink.cjs +413 -1233
- package/dist/cjs/components/ChildProcess.cjs +5 -21
- package/dist/cjs/components/ChildProcess.cjs.map +1 -1
- package/dist/cjs/lib/{regexANSI.cjs.map → ansiRegex.cjs.map} +1 -1
- package/dist/esm/components/ChildProcess.mjs +5 -19
- package/dist/esm/components/ChildProcess.mjs.map +1 -1
- package/dist/esm/lib/{regexANSI.mjs.map → ansiRegex.mjs.map} +1 -1
- package/package.json +1 -1
- /package/dist/cjs/lib/{regexANSI.cjs → ansiRegex.cjs} +0 -0
- /package/dist/esm/lib/{regexANSI.mjs → ansiRegex.mjs} +0 -0
- /package/dist/types/lib/{regexANSI.d.ts → ansiRegex.d.ts} +0 -0
package/assets/ink.cjs
CHANGED
|
@@ -75,8 +75,6 @@ var _process = /*#__PURE__*/ _interop_require_wildcard(require("process"));
|
|
|
75
75
|
var _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
76
76
|
var _assert = /*#__PURE__*/ _interop_require_default(require("assert"));
|
|
77
77
|
var _events = /*#__PURE__*/ _interop_require_wildcard(require("events"));
|
|
78
|
-
var _util = /*#__PURE__*/ _interop_require_default(require("util"));
|
|
79
|
-
var _os = /*#__PURE__*/ _interop_require_default(require("os"));
|
|
80
78
|
var _fs = /*#__PURE__*/ _interop_require_wildcard(require("fs"));
|
|
81
79
|
var _module = /*#__PURE__*/ _interop_require_default(require("module"));
|
|
82
80
|
var _buffer = require("buffer");
|
|
@@ -25889,7 +25887,7 @@ var wrapAnsi16m = function() {
|
|
|
25889
25887
|
return "\x1b[".concat(38 + offset, ";2;").concat(red, ";").concat(green, ";").concat(blue, "m");
|
|
25890
25888
|
};
|
|
25891
25889
|
};
|
|
25892
|
-
var styles$
|
|
25890
|
+
var styles$1 = {
|
|
25893
25891
|
modifier: {
|
|
25894
25892
|
reset: [
|
|
25895
25893
|
0,
|
|
@@ -26080,26 +26078,26 @@ var styles$2 = {
|
|
|
26080
26078
|
]
|
|
26081
26079
|
}
|
|
26082
26080
|
};
|
|
26083
|
-
Object.keys(styles$
|
|
26084
|
-
var foregroundColorNames = Object.keys(styles$
|
|
26085
|
-
var backgroundColorNames = Object.keys(styles$
|
|
26081
|
+
Object.keys(styles$1.modifier);
|
|
26082
|
+
var foregroundColorNames = Object.keys(styles$1.color);
|
|
26083
|
+
var backgroundColorNames = Object.keys(styles$1.bgColor);
|
|
26086
26084
|
_to_consumable_array(foregroundColorNames).concat(_to_consumable_array(backgroundColorNames));
|
|
26087
26085
|
function assembleStyles() {
|
|
26088
|
-
var _styles$
|
|
26086
|
+
var _styles$1;
|
|
26089
26087
|
var codes = new Map();
|
|
26090
26088
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
26091
26089
|
try {
|
|
26092
|
-
for(var _iterator = Object.entries(styles$
|
|
26090
|
+
for(var _iterator = Object.entries(styles$1)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
26093
26091
|
var _step_value = _sliced_to_array(_step.value, 2), groupName = _step_value[0], group = _step_value[1];
|
|
26094
26092
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
26095
26093
|
try {
|
|
26096
26094
|
for(var _iterator1 = Object.entries(group)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
26097
26095
|
var _step_value1 = _sliced_to_array(_step1.value, 2), styleName = _step_value1[0], style = _step_value1[1];
|
|
26098
|
-
styles$
|
|
26096
|
+
styles$1[styleName] = {
|
|
26099
26097
|
open: "\x1b[".concat(style[0], "m"),
|
|
26100
26098
|
close: "\x1b[".concat(style[1], "m")
|
|
26101
26099
|
};
|
|
26102
|
-
group[styleName] = styles$
|
|
26100
|
+
group[styleName] = styles$1[styleName];
|
|
26103
26101
|
codes.set(style[0], style[1]);
|
|
26104
26102
|
}
|
|
26105
26103
|
} catch (err) {
|
|
@@ -26116,7 +26114,7 @@ function assembleStyles() {
|
|
|
26116
26114
|
}
|
|
26117
26115
|
}
|
|
26118
26116
|
}
|
|
26119
|
-
Object.defineProperty(styles$
|
|
26117
|
+
Object.defineProperty(styles$1, groupName, {
|
|
26120
26118
|
value: group,
|
|
26121
26119
|
enumerable: false
|
|
26122
26120
|
});
|
|
@@ -26135,20 +26133,20 @@ function assembleStyles() {
|
|
|
26135
26133
|
}
|
|
26136
26134
|
}
|
|
26137
26135
|
}
|
|
26138
|
-
Object.defineProperty(styles$
|
|
26136
|
+
Object.defineProperty(styles$1, 'codes', {
|
|
26139
26137
|
value: codes,
|
|
26140
26138
|
enumerable: false
|
|
26141
26139
|
});
|
|
26142
|
-
styles$
|
|
26143
|
-
styles$
|
|
26144
|
-
styles$
|
|
26145
|
-
styles$
|
|
26146
|
-
styles$
|
|
26147
|
-
styles$
|
|
26148
|
-
styles$
|
|
26149
|
-
styles$
|
|
26140
|
+
styles$1.color.close = '\u001B[39m';
|
|
26141
|
+
styles$1.bgColor.close = '\u001B[49m';
|
|
26142
|
+
styles$1.color.ansi = wrapAnsi16();
|
|
26143
|
+
styles$1.color.ansi256 = wrapAnsi256();
|
|
26144
|
+
styles$1.color.ansi16m = wrapAnsi16m();
|
|
26145
|
+
styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
26146
|
+
styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
26147
|
+
styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
26150
26148
|
// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
|
|
26151
|
-
Object.defineProperties(styles$
|
|
26149
|
+
Object.defineProperties(styles$1, {
|
|
26152
26150
|
rgbToAnsi256: {
|
|
26153
26151
|
value: function(red, green, blue) {
|
|
26154
26152
|
// We use the extended greyscale palette here, with the exception of
|
|
@@ -26193,7 +26191,7 @@ function assembleStyles() {
|
|
|
26193
26191
|
},
|
|
26194
26192
|
hexToAnsi256: {
|
|
26195
26193
|
value: function(hex) {
|
|
26196
|
-
return (_styles$
|
|
26194
|
+
return (_styles$1 = styles$1).rgbToAnsi256.apply(_styles$1, _to_consumable_array(styles$1.hexToRgb(hex)));
|
|
26197
26195
|
},
|
|
26198
26196
|
enumerable: false
|
|
26199
26197
|
},
|
|
@@ -26234,18 +26232,18 @@ function assembleStyles() {
|
|
|
26234
26232
|
},
|
|
26235
26233
|
rgbToAnsi: {
|
|
26236
26234
|
value: function(red, green, blue) {
|
|
26237
|
-
return styles$
|
|
26235
|
+
return styles$1.ansi256ToAnsi(styles$1.rgbToAnsi256(red, green, blue));
|
|
26238
26236
|
},
|
|
26239
26237
|
enumerable: false
|
|
26240
26238
|
},
|
|
26241
26239
|
hexToAnsi: {
|
|
26242
26240
|
value: function(hex) {
|
|
26243
|
-
return styles$
|
|
26241
|
+
return styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex));
|
|
26244
26242
|
},
|
|
26245
26243
|
enumerable: false
|
|
26246
26244
|
}
|
|
26247
26245
|
});
|
|
26248
|
-
return styles$
|
|
26246
|
+
return styles$1;
|
|
26249
26247
|
}
|
|
26250
26248
|
var ansiStyles = assembleStyles();
|
|
26251
26249
|
var ESCAPES$3 = new Set([
|
|
@@ -27102,7 +27100,7 @@ var applyGapStyles = function(node, style) {
|
|
|
27102
27100
|
node.setGap(Yoga.GUTTER_ROW, (_style_rowGap = style.rowGap) !== null && _style_rowGap !== void 0 ? _style_rowGap : 0);
|
|
27103
27101
|
}
|
|
27104
27102
|
};
|
|
27105
|
-
var styles
|
|
27103
|
+
var styles = function(node) {
|
|
27106
27104
|
var style = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
27107
27105
|
applyPositionStyles(node, style);
|
|
27108
27106
|
applyMarginStyles(node, style);
|
|
@@ -27243,7 +27241,7 @@ var reconciler = createReconciler({
|
|
|
27243
27241
|
if (key === 'style') {
|
|
27244
27242
|
setStyle(node, value);
|
|
27245
27243
|
if (node.yogaNode) {
|
|
27246
|
-
styles
|
|
27244
|
+
styles(node.yogaNode, value);
|
|
27247
27245
|
}
|
|
27248
27246
|
continue;
|
|
27249
27247
|
}
|
|
@@ -27386,7 +27384,7 @@ var reconciler = createReconciler({
|
|
|
27386
27384
|
}
|
|
27387
27385
|
}
|
|
27388
27386
|
if (style && node.yogaNode) {
|
|
27389
|
-
styles
|
|
27387
|
+
styles(node.yogaNode, style);
|
|
27390
27388
|
}
|
|
27391
27389
|
},
|
|
27392
27390
|
commitTextUpdate: function commitTextUpdate(node, _oldText, newText) {
|
|
@@ -27526,1238 +27524,420 @@ function requireCliBoxes() {
|
|
|
27526
27524
|
}
|
|
27527
27525
|
var cliBoxesExports = requireCliBoxes();
|
|
27528
27526
|
var cliBoxes = /*@__PURE__*/ getDefaultExportFromCjs(cliBoxesExports);
|
|
27529
|
-
var
|
|
27527
|
+
var ansiColors = {
|
|
27530
27528
|
exports: {}
|
|
27531
27529
|
};
|
|
27532
|
-
var
|
|
27530
|
+
var symbols = {
|
|
27533
27531
|
exports: {}
|
|
27534
27532
|
};
|
|
27535
|
-
var
|
|
27536
|
-
|
|
27537
|
-
|
|
27538
|
-
|
|
27539
|
-
The MIT License (MIT)
|
|
27540
|
-
|
|
27541
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
27542
|
-
|
|
27543
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
27544
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
27545
|
-
in the Software without restriction, including without limitation the rights
|
|
27546
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
27547
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
27548
|
-
furnished to do so, subject to the following conditions:
|
|
27549
|
-
|
|
27550
|
-
The above copyright notice and this permission notice shall be included in
|
|
27551
|
-
all copies or substantial portions of the Software.
|
|
27552
|
-
|
|
27553
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
27554
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27555
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27556
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27557
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27558
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
27559
|
-
THE SOFTWARE.
|
|
27560
|
-
|
|
27561
|
-
*/ var hasRequiredStyles;
|
|
27562
|
-
function requireStyles() {
|
|
27563
|
-
if (hasRequiredStyles) return styles.exports;
|
|
27564
|
-
hasRequiredStyles = 1;
|
|
27533
|
+
var hasRequiredSymbols;
|
|
27534
|
+
function requireSymbols() {
|
|
27535
|
+
if (hasRequiredSymbols) return symbols.exports;
|
|
27536
|
+
hasRequiredSymbols = 1;
|
|
27565
27537
|
(function(module) {
|
|
27566
|
-
var
|
|
27567
|
-
|
|
27568
|
-
var
|
|
27569
|
-
|
|
27570
|
-
|
|
27571
|
-
|
|
27572
|
-
|
|
27573
|
-
|
|
27574
|
-
|
|
27575
|
-
|
|
27576
|
-
|
|
27577
|
-
|
|
27578
|
-
|
|
27579
|
-
|
|
27580
|
-
|
|
27581
|
-
|
|
27582
|
-
|
|
27583
|
-
|
|
27584
|
-
|
|
27585
|
-
|
|
27586
|
-
|
|
27587
|
-
|
|
27588
|
-
|
|
27589
|
-
|
|
27590
|
-
|
|
27591
|
-
|
|
27592
|
-
|
|
27593
|
-
|
|
27594
|
-
|
|
27595
|
-
|
|
27596
|
-
],
|
|
27597
|
-
strikethrough: [
|
|
27598
|
-
9,
|
|
27599
|
-
29
|
|
27600
|
-
],
|
|
27601
|
-
black: [
|
|
27602
|
-
30,
|
|
27603
|
-
39
|
|
27604
|
-
],
|
|
27605
|
-
red: [
|
|
27606
|
-
31,
|
|
27607
|
-
39
|
|
27608
|
-
],
|
|
27609
|
-
green: [
|
|
27610
|
-
32,
|
|
27611
|
-
39
|
|
27612
|
-
],
|
|
27613
|
-
yellow: [
|
|
27614
|
-
33,
|
|
27615
|
-
39
|
|
27616
|
-
],
|
|
27617
|
-
blue: [
|
|
27618
|
-
34,
|
|
27619
|
-
39
|
|
27620
|
-
],
|
|
27621
|
-
magenta: [
|
|
27622
|
-
35,
|
|
27623
|
-
39
|
|
27624
|
-
],
|
|
27625
|
-
cyan: [
|
|
27626
|
-
36,
|
|
27627
|
-
39
|
|
27628
|
-
],
|
|
27629
|
-
white: [
|
|
27630
|
-
37,
|
|
27631
|
-
39
|
|
27632
|
-
],
|
|
27633
|
-
gray: [
|
|
27634
|
-
90,
|
|
27635
|
-
39
|
|
27636
|
-
],
|
|
27637
|
-
grey: [
|
|
27638
|
-
90,
|
|
27639
|
-
39
|
|
27640
|
-
],
|
|
27641
|
-
brightRed: [
|
|
27642
|
-
91,
|
|
27643
|
-
39
|
|
27644
|
-
],
|
|
27645
|
-
brightGreen: [
|
|
27646
|
-
92,
|
|
27647
|
-
39
|
|
27648
|
-
],
|
|
27649
|
-
brightYellow: [
|
|
27650
|
-
93,
|
|
27651
|
-
39
|
|
27652
|
-
],
|
|
27653
|
-
brightBlue: [
|
|
27654
|
-
94,
|
|
27655
|
-
39
|
|
27656
|
-
],
|
|
27657
|
-
brightMagenta: [
|
|
27658
|
-
95,
|
|
27659
|
-
39
|
|
27660
|
-
],
|
|
27661
|
-
brightCyan: [
|
|
27662
|
-
96,
|
|
27663
|
-
39
|
|
27664
|
-
],
|
|
27665
|
-
brightWhite: [
|
|
27666
|
-
97,
|
|
27667
|
-
39
|
|
27668
|
-
],
|
|
27669
|
-
bgBlack: [
|
|
27670
|
-
40,
|
|
27671
|
-
49
|
|
27672
|
-
],
|
|
27673
|
-
bgRed: [
|
|
27674
|
-
41,
|
|
27675
|
-
49
|
|
27676
|
-
],
|
|
27677
|
-
bgGreen: [
|
|
27678
|
-
42,
|
|
27679
|
-
49
|
|
27680
|
-
],
|
|
27681
|
-
bgYellow: [
|
|
27682
|
-
43,
|
|
27683
|
-
49
|
|
27684
|
-
],
|
|
27685
|
-
bgBlue: [
|
|
27686
|
-
44,
|
|
27687
|
-
49
|
|
27688
|
-
],
|
|
27689
|
-
bgMagenta: [
|
|
27690
|
-
45,
|
|
27691
|
-
49
|
|
27692
|
-
],
|
|
27693
|
-
bgCyan: [
|
|
27694
|
-
46,
|
|
27695
|
-
49
|
|
27696
|
-
],
|
|
27697
|
-
bgWhite: [
|
|
27698
|
-
47,
|
|
27699
|
-
49
|
|
27700
|
-
],
|
|
27701
|
-
bgGray: [
|
|
27702
|
-
100,
|
|
27703
|
-
49
|
|
27704
|
-
],
|
|
27705
|
-
bgGrey: [
|
|
27706
|
-
100,
|
|
27707
|
-
49
|
|
27708
|
-
],
|
|
27709
|
-
bgBrightRed: [
|
|
27710
|
-
101,
|
|
27711
|
-
49
|
|
27712
|
-
],
|
|
27713
|
-
bgBrightGreen: [
|
|
27714
|
-
102,
|
|
27715
|
-
49
|
|
27716
|
-
],
|
|
27717
|
-
bgBrightYellow: [
|
|
27718
|
-
103,
|
|
27719
|
-
49
|
|
27720
|
-
],
|
|
27721
|
-
bgBrightBlue: [
|
|
27722
|
-
104,
|
|
27723
|
-
49
|
|
27724
|
-
],
|
|
27725
|
-
bgBrightMagenta: [
|
|
27726
|
-
105,
|
|
27727
|
-
49
|
|
27728
|
-
],
|
|
27729
|
-
bgBrightCyan: [
|
|
27730
|
-
106,
|
|
27731
|
-
49
|
|
27732
|
-
],
|
|
27733
|
-
bgBrightWhite: [
|
|
27734
|
-
107,
|
|
27735
|
-
49
|
|
27736
|
-
],
|
|
27737
|
-
// legacy styles for colors pre v1.0.0
|
|
27738
|
-
blackBG: [
|
|
27739
|
-
40,
|
|
27740
|
-
49
|
|
27741
|
-
],
|
|
27742
|
-
redBG: [
|
|
27743
|
-
41,
|
|
27744
|
-
49
|
|
27745
|
-
],
|
|
27746
|
-
greenBG: [
|
|
27747
|
-
42,
|
|
27748
|
-
49
|
|
27749
|
-
],
|
|
27750
|
-
yellowBG: [
|
|
27751
|
-
43,
|
|
27752
|
-
49
|
|
27753
|
-
],
|
|
27754
|
-
blueBG: [
|
|
27755
|
-
44,
|
|
27756
|
-
49
|
|
27757
|
-
],
|
|
27758
|
-
magentaBG: [
|
|
27759
|
-
45,
|
|
27760
|
-
49
|
|
27761
|
-
],
|
|
27762
|
-
cyanBG: [
|
|
27763
|
-
46,
|
|
27764
|
-
49
|
|
27765
|
-
],
|
|
27766
|
-
whiteBG: [
|
|
27767
|
-
47,
|
|
27768
|
-
49
|
|
27769
|
-
]
|
|
27538
|
+
var isHyper = typeof process !== 'undefined' && process.env.TERM_PROGRAM === 'Hyper';
|
|
27539
|
+
var isWindows = typeof process !== 'undefined' && process.platform === 'win32';
|
|
27540
|
+
var isLinux = typeof process !== 'undefined' && process.platform === 'linux';
|
|
27541
|
+
var common = {
|
|
27542
|
+
ballotDisabled: '☒',
|
|
27543
|
+
ballotOff: '☐',
|
|
27544
|
+
ballotOn: '☑',
|
|
27545
|
+
bullet: '•',
|
|
27546
|
+
bulletWhite: '◦',
|
|
27547
|
+
fullBlock: '█',
|
|
27548
|
+
heart: '❤',
|
|
27549
|
+
identicalTo: '≡',
|
|
27550
|
+
line: '─',
|
|
27551
|
+
mark: '※',
|
|
27552
|
+
middot: '·',
|
|
27553
|
+
minus: '-',
|
|
27554
|
+
multiplication: '×',
|
|
27555
|
+
obelus: '÷',
|
|
27556
|
+
pencilDownRight: '✎',
|
|
27557
|
+
pencilRight: '✏',
|
|
27558
|
+
pencilUpRight: '✐',
|
|
27559
|
+
percent: '%',
|
|
27560
|
+
pilcrow2: '❡',
|
|
27561
|
+
pilcrow: '¶',
|
|
27562
|
+
plusMinus: '±',
|
|
27563
|
+
question: '?',
|
|
27564
|
+
section: '§',
|
|
27565
|
+
starsOff: '☆',
|
|
27566
|
+
starsOn: '★',
|
|
27567
|
+
upDownArrow: '↕'
|
|
27770
27568
|
};
|
|
27771
|
-
Object.
|
|
27772
|
-
|
|
27773
|
-
|
|
27774
|
-
|
|
27775
|
-
|
|
27569
|
+
var windows = Object.assign({}, common, {
|
|
27570
|
+
check: '√',
|
|
27571
|
+
cross: '×',
|
|
27572
|
+
ellipsisLarge: '...',
|
|
27573
|
+
ellipsis: '...',
|
|
27574
|
+
info: 'i',
|
|
27575
|
+
questionSmall: '?',
|
|
27576
|
+
pointer: '>',
|
|
27577
|
+
pointerSmall: '»',
|
|
27578
|
+
radioOff: '( )',
|
|
27579
|
+
radioOn: '(*)',
|
|
27580
|
+
warning: '‼'
|
|
27581
|
+
});
|
|
27582
|
+
var other = Object.assign({}, common, {
|
|
27583
|
+
ballotCross: '✘',
|
|
27584
|
+
check: '✔',
|
|
27585
|
+
cross: '✖',
|
|
27586
|
+
ellipsisLarge: '⋯',
|
|
27587
|
+
ellipsis: '…',
|
|
27588
|
+
info: 'ℹ',
|
|
27589
|
+
questionFull: '?',
|
|
27590
|
+
questionSmall: '﹖',
|
|
27591
|
+
pointer: isLinux ? '▸' : '❯',
|
|
27592
|
+
pointerSmall: isLinux ? '‣' : '›',
|
|
27593
|
+
radioOff: '◯',
|
|
27594
|
+
radioOn: '◉',
|
|
27595
|
+
warning: '⚠'
|
|
27596
|
+
});
|
|
27597
|
+
module.exports = isWindows && !isHyper ? windows : other;
|
|
27598
|
+
Reflect.defineProperty(module.exports, 'common', {
|
|
27599
|
+
enumerable: false,
|
|
27600
|
+
value: common
|
|
27776
27601
|
});
|
|
27777
|
-
|
|
27778
|
-
|
|
27602
|
+
Reflect.defineProperty(module.exports, 'windows', {
|
|
27603
|
+
enumerable: false,
|
|
27604
|
+
value: windows
|
|
27605
|
+
});
|
|
27606
|
+
Reflect.defineProperty(module.exports, 'other', {
|
|
27607
|
+
enumerable: false,
|
|
27608
|
+
value: other
|
|
27609
|
+
});
|
|
27610
|
+
})(symbols);
|
|
27611
|
+
return symbols.exports;
|
|
27779
27612
|
}
|
|
27780
|
-
|
|
27781
|
-
|
|
27782
|
-
|
|
27783
|
-
|
|
27784
|
-
|
|
27785
|
-
|
|
27786
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
27787
|
-
the Software without restriction, including without limitation the rights to
|
|
27788
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
27789
|
-
of the Software, and to permit persons to whom the Software is furnished to do
|
|
27790
|
-
so, subject to the following conditions:
|
|
27791
|
-
|
|
27792
|
-
The above copyright notice and this permission notice shall be included in all
|
|
27793
|
-
copies or substantial portions of the Software.
|
|
27794
|
-
|
|
27795
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
27796
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27797
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27798
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27799
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27800
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27801
|
-
SOFTWARE.
|
|
27802
|
-
*/ var hasFlag;
|
|
27803
|
-
var hasRequiredHasFlag;
|
|
27804
|
-
function requireHasFlag() {
|
|
27805
|
-
if (hasRequiredHasFlag) return hasFlag;
|
|
27806
|
-
hasRequiredHasFlag = 1;
|
|
27807
|
-
hasFlag = function hasFlag(flag, argv) {
|
|
27808
|
-
argv = argv || process.argv;
|
|
27809
|
-
var terminatorPos = argv.indexOf('--');
|
|
27810
|
-
var prefix = /^-{1,2}/.test(flag) ? '' : '--';
|
|
27811
|
-
var pos = argv.indexOf(prefix + flag);
|
|
27812
|
-
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
27613
|
+
var hasRequiredAnsiColors;
|
|
27614
|
+
function requireAnsiColors() {
|
|
27615
|
+
if (hasRequiredAnsiColors) return ansiColors.exports;
|
|
27616
|
+
hasRequiredAnsiColors = 1;
|
|
27617
|
+
var isObject = function(val) {
|
|
27618
|
+
return val !== null && (typeof val === "undefined" ? "undefined" : _type_of(val)) === 'object' && !Array.isArray(val);
|
|
27813
27619
|
};
|
|
27814
|
-
|
|
27815
|
-
}
|
|
27816
|
-
|
|
27817
|
-
|
|
27818
|
-
|
|
27819
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
27820
|
-
|
|
27821
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
27822
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
27823
|
-
in the Software without restriction, including without limitation the rights
|
|
27824
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
27825
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
27826
|
-
furnished to do so, subject to the following conditions:
|
|
27827
|
-
|
|
27828
|
-
The above copyright notice and this permission notice shall be included in
|
|
27829
|
-
all copies or substantial portions of the Software.
|
|
27830
|
-
|
|
27831
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
27832
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27833
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27834
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27835
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27836
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
27837
|
-
THE SOFTWARE.
|
|
27838
|
-
|
|
27839
|
-
*/ var supportsColors;
|
|
27840
|
-
var hasRequiredSupportsColors;
|
|
27841
|
-
function requireSupportsColors() {
|
|
27842
|
-
if (hasRequiredSupportsColors) return supportsColors;
|
|
27843
|
-
hasRequiredSupportsColors = 1;
|
|
27844
|
-
var os = _os.default;
|
|
27845
|
-
var hasFlag = requireHasFlag();
|
|
27846
|
-
var _$env = process.env;
|
|
27847
|
-
var forceColor = undefined;
|
|
27848
|
-
if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) {
|
|
27849
|
-
forceColor = false;
|
|
27850
|
-
} else if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) {
|
|
27851
|
-
forceColor = true;
|
|
27852
|
-
}
|
|
27853
|
-
if ('FORCE_COLOR' in _$env) {
|
|
27854
|
-
forceColor = _$env.FORCE_COLOR.length === 0 || parseInt(_$env.FORCE_COLOR, 10) !== 0;
|
|
27855
|
-
}
|
|
27856
|
-
function translateLevel(level) {
|
|
27857
|
-
if (level === 0) {
|
|
27858
|
-
return false;
|
|
27859
|
-
}
|
|
27860
|
-
return {
|
|
27861
|
-
level: level,
|
|
27862
|
-
hasBasic: true,
|
|
27863
|
-
has256: level >= 2,
|
|
27864
|
-
has16m: level >= 3
|
|
27865
|
-
};
|
|
27866
|
-
}
|
|
27867
|
-
function supportsColor(stream) {
|
|
27868
|
-
if (forceColor === false) {
|
|
27869
|
-
return 0;
|
|
27870
|
-
}
|
|
27871
|
-
if (hasFlag('color=16m') || hasFlag('color=full') || hasFlag('color=truecolor')) {
|
|
27872
|
-
return 3;
|
|
27620
|
+
/* eslint-disable no-control-regex */ // this is a modified version of https://github.com/chalk/ansi-regex (MIT License)
|
|
27621
|
+
var ANSI_REGEX = /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g;
|
|
27622
|
+
var hasColor = function() {
|
|
27623
|
+
if (typeof process !== 'undefined') {
|
|
27624
|
+
return process.env.FORCE_COLOR !== '0';
|
|
27873
27625
|
}
|
|
27874
|
-
|
|
27875
|
-
return 2;
|
|
27876
|
-
}
|
|
27877
|
-
if (stream && !stream.isTTY && forceColor !== true) {
|
|
27878
|
-
return 0;
|
|
27879
|
-
}
|
|
27880
|
-
var min = forceColor ? 1 : 0;
|
|
27881
|
-
if (process.platform === 'win32') {
|
|
27882
|
-
// Node.js 7.5.0 is the first version of Node.js to include a patch to
|
|
27883
|
-
// libuv that enables 256 color output on Windows. Anything earlier and it
|
|
27884
|
-
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
27885
|
-
// release, and Node.js 7 is not. Windows 10 build 10586 is the first
|
|
27886
|
-
// Windows release that supports 256 colors. Windows 10 build 14931 is the
|
|
27887
|
-
// first release that supports 16m/TrueColor.
|
|
27888
|
-
var osRelease = os.release().split('.');
|
|
27889
|
-
if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
27890
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
27891
|
-
}
|
|
27892
|
-
return 1;
|
|
27893
|
-
}
|
|
27894
|
-
if ('CI' in _$env) {
|
|
27895
|
-
if ([
|
|
27896
|
-
'TRAVIS',
|
|
27897
|
-
'CIRCLECI',
|
|
27898
|
-
'APPVEYOR',
|
|
27899
|
-
'GITLAB_CI'
|
|
27900
|
-
].some(function(sign) {
|
|
27901
|
-
return sign in _$env;
|
|
27902
|
-
}) || _$env.CI_NAME === 'codeship') {
|
|
27903
|
-
return 1;
|
|
27904
|
-
}
|
|
27905
|
-
return min;
|
|
27906
|
-
}
|
|
27907
|
-
if ('TEAMCITY_VERSION' in _$env) {
|
|
27908
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(_$env.TEAMCITY_VERSION) ? 1 : 0;
|
|
27909
|
-
}
|
|
27910
|
-
if ('TERM_PROGRAM' in _$env) {
|
|
27911
|
-
var version = parseInt((_$env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
|
27912
|
-
switch(_$env.TERM_PROGRAM){
|
|
27913
|
-
case 'iTerm.app':
|
|
27914
|
-
return version >= 3 ? 3 : 2;
|
|
27915
|
-
case 'Hyper':
|
|
27916
|
-
return 3;
|
|
27917
|
-
case 'Apple_Terminal':
|
|
27918
|
-
return 2;
|
|
27919
|
-
}
|
|
27920
|
-
}
|
|
27921
|
-
if (/-256(color)?$/i.test(_$env.TERM)) {
|
|
27922
|
-
return 2;
|
|
27923
|
-
}
|
|
27924
|
-
if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(_$env.TERM)) {
|
|
27925
|
-
return 1;
|
|
27926
|
-
}
|
|
27927
|
-
if ('COLORTERM' in _$env) {
|
|
27928
|
-
return 1;
|
|
27929
|
-
}
|
|
27930
|
-
if (_$env.TERM === 'dumb') {
|
|
27931
|
-
return min;
|
|
27932
|
-
}
|
|
27933
|
-
return min;
|
|
27934
|
-
}
|
|
27935
|
-
function getSupportLevel(stream) {
|
|
27936
|
-
var level = supportsColor(stream);
|
|
27937
|
-
return translateLevel(level);
|
|
27938
|
-
}
|
|
27939
|
-
supportsColors = {
|
|
27940
|
-
supportsColor: getSupportLevel,
|
|
27941
|
-
stdout: getSupportLevel(process.stdout),
|
|
27942
|
-
stderr: getSupportLevel(process.stderr)
|
|
27626
|
+
return false;
|
|
27943
27627
|
};
|
|
27944
|
-
|
|
27945
|
-
|
|
27946
|
-
|
|
27947
|
-
|
|
27948
|
-
}
|
|
27949
|
-
|
|
27950
|
-
function requireTrap() {
|
|
27951
|
-
if (hasRequiredTrap) return trap.exports;
|
|
27952
|
-
hasRequiredTrap = 1;
|
|
27953
|
-
(function(module) {
|
|
27954
|
-
module['exports'] = function runTheTrap(text, options) {
|
|
27955
|
-
var result = '';
|
|
27956
|
-
text = text || 'Run the trap, drop the bass';
|
|
27957
|
-
text = text.split('');
|
|
27958
|
-
var trap = {
|
|
27959
|
-
a: [
|
|
27960
|
-
'\u0040',
|
|
27961
|
-
'\u0104',
|
|
27962
|
-
'\u023a',
|
|
27963
|
-
'\u0245',
|
|
27964
|
-
'\u0394',
|
|
27965
|
-
'\u039b',
|
|
27966
|
-
'\u0414'
|
|
27967
|
-
],
|
|
27968
|
-
b: [
|
|
27969
|
-
'\u00df',
|
|
27970
|
-
'\u0181',
|
|
27971
|
-
'\u0243',
|
|
27972
|
-
'\u026e',
|
|
27973
|
-
'\u03b2',
|
|
27974
|
-
'\u0e3f'
|
|
27975
|
-
],
|
|
27976
|
-
c: [
|
|
27977
|
-
'\u00a9',
|
|
27978
|
-
'\u023b',
|
|
27979
|
-
'\u03fe'
|
|
27980
|
-
],
|
|
27981
|
-
d: [
|
|
27982
|
-
'\u00d0',
|
|
27983
|
-
'\u018a',
|
|
27984
|
-
'\u0500',
|
|
27985
|
-
'\u0501',
|
|
27986
|
-
'\u0502',
|
|
27987
|
-
'\u0503'
|
|
27988
|
-
],
|
|
27989
|
-
e: [
|
|
27990
|
-
'\u00cb',
|
|
27991
|
-
'\u0115',
|
|
27992
|
-
'\u018e',
|
|
27993
|
-
'\u0258',
|
|
27994
|
-
'\u03a3',
|
|
27995
|
-
'\u03be',
|
|
27996
|
-
'\u04bc',
|
|
27997
|
-
'\u0a6c'
|
|
27998
|
-
],
|
|
27999
|
-
f: [
|
|
28000
|
-
'\u04fa'
|
|
28001
|
-
],
|
|
28002
|
-
g: [
|
|
28003
|
-
'\u0262'
|
|
28004
|
-
],
|
|
28005
|
-
h: [
|
|
28006
|
-
'\u0126',
|
|
28007
|
-
'\u0195',
|
|
28008
|
-
'\u04a2',
|
|
28009
|
-
'\u04ba',
|
|
28010
|
-
'\u04c7',
|
|
28011
|
-
'\u050a'
|
|
28012
|
-
],
|
|
28013
|
-
i: [
|
|
28014
|
-
'\u0f0f'
|
|
28015
|
-
],
|
|
28016
|
-
j: [
|
|
28017
|
-
'\u0134'
|
|
28018
|
-
],
|
|
28019
|
-
k: [
|
|
28020
|
-
'\u0138',
|
|
28021
|
-
'\u04a0',
|
|
28022
|
-
'\u04c3',
|
|
28023
|
-
'\u051e'
|
|
28024
|
-
],
|
|
28025
|
-
l: [
|
|
28026
|
-
'\u0139'
|
|
28027
|
-
],
|
|
28028
|
-
m: [
|
|
28029
|
-
'\u028d',
|
|
28030
|
-
'\u04cd',
|
|
28031
|
-
'\u04ce',
|
|
28032
|
-
'\u0520',
|
|
28033
|
-
'\u0521',
|
|
28034
|
-
'\u0d69'
|
|
28035
|
-
],
|
|
28036
|
-
n: [
|
|
28037
|
-
'\u00d1',
|
|
28038
|
-
'\u014b',
|
|
28039
|
-
'\u019d',
|
|
28040
|
-
'\u0376',
|
|
28041
|
-
'\u03a0',
|
|
28042
|
-
'\u048a'
|
|
28043
|
-
],
|
|
28044
|
-
o: [
|
|
28045
|
-
'\u00d8',
|
|
28046
|
-
'\u00f5',
|
|
28047
|
-
'\u00f8',
|
|
28048
|
-
'\u01fe',
|
|
28049
|
-
'\u0298',
|
|
28050
|
-
'\u047a',
|
|
28051
|
-
'\u05dd',
|
|
28052
|
-
'\u06dd',
|
|
28053
|
-
'\u0e4f'
|
|
28054
|
-
],
|
|
28055
|
-
p: [
|
|
28056
|
-
'\u01f7',
|
|
28057
|
-
'\u048e'
|
|
28058
|
-
],
|
|
28059
|
-
q: [
|
|
28060
|
-
'\u09cd'
|
|
28061
|
-
],
|
|
28062
|
-
r: [
|
|
28063
|
-
'\u00ae',
|
|
28064
|
-
'\u01a6',
|
|
28065
|
-
'\u0210',
|
|
28066
|
-
'\u024c',
|
|
28067
|
-
'\u0280',
|
|
28068
|
-
'\u042f'
|
|
28069
|
-
],
|
|
28070
|
-
s: [
|
|
28071
|
-
'\u00a7',
|
|
28072
|
-
'\u03de',
|
|
28073
|
-
'\u03df',
|
|
28074
|
-
'\u03e8'
|
|
28075
|
-
],
|
|
28076
|
-
t: [
|
|
28077
|
-
'\u0141',
|
|
28078
|
-
'\u0166',
|
|
28079
|
-
'\u0373'
|
|
28080
|
-
],
|
|
28081
|
-
u: [
|
|
28082
|
-
'\u01b1',
|
|
28083
|
-
'\u054d'
|
|
28084
|
-
],
|
|
28085
|
-
v: [
|
|
28086
|
-
'\u05d8'
|
|
28087
|
-
],
|
|
28088
|
-
w: [
|
|
28089
|
-
'\u0428',
|
|
28090
|
-
'\u0460',
|
|
28091
|
-
'\u047c',
|
|
28092
|
-
'\u0d70'
|
|
28093
|
-
],
|
|
28094
|
-
x: [
|
|
28095
|
-
'\u04b2',
|
|
28096
|
-
'\u04fe',
|
|
28097
|
-
'\u04fc',
|
|
28098
|
-
'\u04fd'
|
|
28099
|
-
],
|
|
28100
|
-
y: [
|
|
28101
|
-
'\u00a5',
|
|
28102
|
-
'\u04b0',
|
|
28103
|
-
'\u04cb'
|
|
28104
|
-
],
|
|
28105
|
-
z: [
|
|
28106
|
-
'\u01b5',
|
|
28107
|
-
'\u0240'
|
|
28108
|
-
]
|
|
28109
|
-
};
|
|
28110
|
-
text.forEach(function(c) {
|
|
28111
|
-
c = c.toLowerCase();
|
|
28112
|
-
var chars = trap[c] || [
|
|
28113
|
-
' '
|
|
28114
|
-
];
|
|
28115
|
-
var rand = Math.floor(Math.random() * chars.length);
|
|
28116
|
-
if (typeof trap[c] !== 'undefined') {
|
|
28117
|
-
result += trap[c][rand];
|
|
28118
|
-
} else {
|
|
28119
|
-
result += c;
|
|
28120
|
-
}
|
|
28121
|
-
});
|
|
28122
|
-
return result;
|
|
27628
|
+
var create = function() {
|
|
27629
|
+
var colors = {
|
|
27630
|
+
enabled: hasColor(),
|
|
27631
|
+
visible: true,
|
|
27632
|
+
styles: {},
|
|
27633
|
+
keys: {}
|
|
28123
27634
|
};
|
|
28124
|
-
|
|
28125
|
-
|
|
28126
|
-
|
|
28127
|
-
var
|
|
28128
|
-
|
|
28129
|
-
|
|
28130
|
-
var
|
|
28131
|
-
|
|
28132
|
-
|
|
28133
|
-
|
|
28134
|
-
|
|
28135
|
-
// please no
|
|
28136
|
-
module['exports'] = function zalgo(text, options) {
|
|
28137
|
-
text = text || ' he is here ';
|
|
28138
|
-
var soul = {
|
|
28139
|
-
'up': [
|
|
28140
|
-
'̍',
|
|
28141
|
-
'̎',
|
|
28142
|
-
'̄',
|
|
28143
|
-
'̅',
|
|
28144
|
-
'̿',
|
|
28145
|
-
'̑',
|
|
28146
|
-
'̆',
|
|
28147
|
-
'̐',
|
|
28148
|
-
'͒',
|
|
28149
|
-
'͗',
|
|
28150
|
-
'͑',
|
|
28151
|
-
'̇',
|
|
28152
|
-
'̈',
|
|
28153
|
-
'̊',
|
|
28154
|
-
'͂',
|
|
28155
|
-
'̓',
|
|
28156
|
-
'̈',
|
|
28157
|
-
'͊',
|
|
28158
|
-
'͋',
|
|
28159
|
-
'͌',
|
|
28160
|
-
'̃',
|
|
28161
|
-
'̂',
|
|
28162
|
-
'̌',
|
|
28163
|
-
'͐',
|
|
28164
|
-
'̀',
|
|
28165
|
-
'́',
|
|
28166
|
-
'̋',
|
|
28167
|
-
'̏',
|
|
28168
|
-
'̒',
|
|
28169
|
-
'̓',
|
|
28170
|
-
'̔',
|
|
28171
|
-
'̽',
|
|
28172
|
-
'̉',
|
|
28173
|
-
'ͣ',
|
|
28174
|
-
'ͤ',
|
|
28175
|
-
'ͥ',
|
|
28176
|
-
'ͦ',
|
|
28177
|
-
'ͧ',
|
|
28178
|
-
'ͨ',
|
|
28179
|
-
'ͩ',
|
|
28180
|
-
'ͪ',
|
|
28181
|
-
'ͫ',
|
|
28182
|
-
'ͬ',
|
|
28183
|
-
'ͭ',
|
|
28184
|
-
'ͮ',
|
|
28185
|
-
'ͯ',
|
|
28186
|
-
'̾',
|
|
28187
|
-
'͛',
|
|
28188
|
-
'͆',
|
|
28189
|
-
'̚'
|
|
28190
|
-
],
|
|
28191
|
-
'down': [
|
|
28192
|
-
'̖',
|
|
28193
|
-
'̗',
|
|
28194
|
-
'̘',
|
|
28195
|
-
'̙',
|
|
28196
|
-
'̜',
|
|
28197
|
-
'̝',
|
|
28198
|
-
'̞',
|
|
28199
|
-
'̟',
|
|
28200
|
-
'̠',
|
|
28201
|
-
'̤',
|
|
28202
|
-
'̥',
|
|
28203
|
-
'̦',
|
|
28204
|
-
'̩',
|
|
28205
|
-
'̪',
|
|
28206
|
-
'̫',
|
|
28207
|
-
'̬',
|
|
28208
|
-
'̭',
|
|
28209
|
-
'̮',
|
|
28210
|
-
'̯',
|
|
28211
|
-
'̰',
|
|
28212
|
-
'̱',
|
|
28213
|
-
'̲',
|
|
28214
|
-
'̳',
|
|
28215
|
-
'̹',
|
|
28216
|
-
'̺',
|
|
28217
|
-
'̻',
|
|
28218
|
-
'̼',
|
|
28219
|
-
'ͅ',
|
|
28220
|
-
'͇',
|
|
28221
|
-
'͈',
|
|
28222
|
-
'͉',
|
|
28223
|
-
'͍',
|
|
28224
|
-
'͎',
|
|
28225
|
-
'͓',
|
|
28226
|
-
'͔',
|
|
28227
|
-
'͕',
|
|
28228
|
-
'͖',
|
|
28229
|
-
'͙',
|
|
28230
|
-
'͚',
|
|
28231
|
-
'̣'
|
|
28232
|
-
],
|
|
28233
|
-
'mid': [
|
|
28234
|
-
'̕',
|
|
28235
|
-
'̛',
|
|
28236
|
-
'̀',
|
|
28237
|
-
'́',
|
|
28238
|
-
'͘',
|
|
28239
|
-
'̡',
|
|
28240
|
-
'̢',
|
|
28241
|
-
'̧',
|
|
28242
|
-
'̨',
|
|
28243
|
-
'̴',
|
|
28244
|
-
'̵',
|
|
28245
|
-
'̶',
|
|
28246
|
-
'͜',
|
|
28247
|
-
'͝',
|
|
28248
|
-
'͞',
|
|
28249
|
-
'͟',
|
|
28250
|
-
'͠',
|
|
28251
|
-
'͢',
|
|
28252
|
-
'̸',
|
|
28253
|
-
'̷',
|
|
28254
|
-
'͡',
|
|
28255
|
-
' ҉'
|
|
28256
|
-
]
|
|
27635
|
+
var ansi = function(style) {
|
|
27636
|
+
var open = style.open = "\x1b[".concat(style.codes[0], "m");
|
|
27637
|
+
var close = style.close = "\x1b[".concat(style.codes[1], "m");
|
|
27638
|
+
var regex = style.regex = new RegExp("\\u001b\\[".concat(style.codes[1], "m"), 'g');
|
|
27639
|
+
style.wrap = function(input, newline) {
|
|
27640
|
+
if (input.includes(close)) input = input.replace(regex, close + open);
|
|
27641
|
+
var output = open + input + close;
|
|
27642
|
+
// see https://github.com/chalk/chalk/pull/92, thanks to the
|
|
27643
|
+
// chalk contributors for this fix. However, we've confirmed that
|
|
27644
|
+
// this issue is also present in Windows terminals
|
|
27645
|
+
return newline ? output.replace(/\r*\n/g, "".concat(close, "$&").concat(open)) : output;
|
|
28257
27646
|
};
|
|
28258
|
-
|
|
28259
|
-
function randomNumber(range) {
|
|
28260
|
-
var r = Math.floor(Math.random() * range);
|
|
28261
|
-
return r;
|
|
28262
|
-
}
|
|
28263
|
-
function isChar(character) {
|
|
28264
|
-
var bool = false;
|
|
28265
|
-
all.filter(function(i) {
|
|
28266
|
-
bool = i === character;
|
|
28267
|
-
});
|
|
28268
|
-
return bool;
|
|
28269
|
-
}
|
|
28270
|
-
function heComes(text, options) {
|
|
28271
|
-
var result = '';
|
|
28272
|
-
var counts;
|
|
28273
|
-
var l;
|
|
28274
|
-
options = options || {};
|
|
28275
|
-
options['up'] = typeof options['up'] !== 'undefined' ? options['up'] : true;
|
|
28276
|
-
options['mid'] = typeof options['mid'] !== 'undefined' ? options['mid'] : true;
|
|
28277
|
-
options['down'] = typeof options['down'] !== 'undefined' ? options['down'] : true;
|
|
28278
|
-
options['size'] = typeof options['size'] !== 'undefined' ? options['size'] : 'maxi';
|
|
28279
|
-
text = text.split('');
|
|
28280
|
-
for(l in text){
|
|
28281
|
-
if (isChar(l)) {
|
|
28282
|
-
continue;
|
|
28283
|
-
}
|
|
28284
|
-
result = result + text[l];
|
|
28285
|
-
counts = {
|
|
28286
|
-
'up': 0,
|
|
28287
|
-
'down': 0,
|
|
28288
|
-
'mid': 0
|
|
28289
|
-
};
|
|
28290
|
-
switch(options.size){
|
|
28291
|
-
case 'mini':
|
|
28292
|
-
counts.up = randomNumber(8);
|
|
28293
|
-
counts.mid = randomNumber(2);
|
|
28294
|
-
counts.down = randomNumber(8);
|
|
28295
|
-
break;
|
|
28296
|
-
case 'maxi':
|
|
28297
|
-
counts.up = randomNumber(16) + 3;
|
|
28298
|
-
counts.mid = randomNumber(4) + 1;
|
|
28299
|
-
counts.down = randomNumber(64) + 3;
|
|
28300
|
-
break;
|
|
28301
|
-
default:
|
|
28302
|
-
counts.up = randomNumber(8) + 1;
|
|
28303
|
-
counts.mid = randomNumber(6) / 2;
|
|
28304
|
-
counts.down = randomNumber(8) + 1;
|
|
28305
|
-
break;
|
|
28306
|
-
}
|
|
28307
|
-
var arr = [
|
|
28308
|
-
'up',
|
|
28309
|
-
'mid',
|
|
28310
|
-
'down'
|
|
28311
|
-
];
|
|
28312
|
-
for(var d in arr){
|
|
28313
|
-
var index = arr[d];
|
|
28314
|
-
for(var i = 0; i <= counts[index]; i++){
|
|
28315
|
-
if (options[index]) {
|
|
28316
|
-
result = result + soul[index][randomNumber(soul[index].length)];
|
|
28317
|
-
}
|
|
28318
|
-
}
|
|
28319
|
-
}
|
|
28320
|
-
}
|
|
28321
|
-
return result;
|
|
28322
|
-
}
|
|
28323
|
-
// don't summon him
|
|
28324
|
-
return heComes(text, options);
|
|
27647
|
+
return style;
|
|
28325
27648
|
};
|
|
28326
|
-
|
|
28327
|
-
|
|
28328
|
-
}
|
|
28329
|
-
var america = {
|
|
28330
|
-
exports: {}
|
|
28331
|
-
};
|
|
28332
|
-
var hasRequiredAmerica;
|
|
28333
|
-
function requireAmerica() {
|
|
28334
|
-
if (hasRequiredAmerica) return america.exports;
|
|
28335
|
-
hasRequiredAmerica = 1;
|
|
28336
|
-
(function(module) {
|
|
28337
|
-
module['exports'] = function(colors) {
|
|
28338
|
-
return function(letter, i, exploded) {
|
|
28339
|
-
if (letter === ' ') return letter;
|
|
28340
|
-
switch(i % 3){
|
|
28341
|
-
case 0:
|
|
28342
|
-
return colors.red(letter);
|
|
28343
|
-
case 1:
|
|
28344
|
-
return colors.white(letter);
|
|
28345
|
-
case 2:
|
|
28346
|
-
return colors.blue(letter);
|
|
28347
|
-
}
|
|
28348
|
-
};
|
|
27649
|
+
var wrap = function(style, input, newline) {
|
|
27650
|
+
return typeof style === 'function' ? style(input) : style.wrap(input, newline);
|
|
28349
27651
|
};
|
|
28350
|
-
|
|
28351
|
-
|
|
28352
|
-
|
|
28353
|
-
|
|
28354
|
-
|
|
28355
|
-
|
|
28356
|
-
var
|
|
28357
|
-
|
|
28358
|
-
|
|
28359
|
-
|
|
28360
|
-
|
|
28361
|
-
|
|
28362
|
-
|
|
28363
|
-
|
|
28364
|
-
};
|
|
27652
|
+
var style = function(input, stack) {
|
|
27653
|
+
if (input === '' || input == null) return '';
|
|
27654
|
+
if (colors.enabled === false) return input;
|
|
27655
|
+
if (colors.visible === false) return '';
|
|
27656
|
+
var str = '' + input;
|
|
27657
|
+
var nl = str.includes('\n');
|
|
27658
|
+
var n = stack.length;
|
|
27659
|
+
if (n > 0 && stack.includes('unstyle')) {
|
|
27660
|
+
stack = _to_consumable_array(new Set([
|
|
27661
|
+
'unstyle'
|
|
27662
|
+
].concat(_to_consumable_array(stack)))).reverse();
|
|
27663
|
+
}
|
|
27664
|
+
while(n-- > 0)str = wrap(colors.styles[stack[n]], str, nl);
|
|
27665
|
+
return str;
|
|
28365
27666
|
};
|
|
28366
|
-
|
|
28367
|
-
|
|
28368
|
-
|
|
28369
|
-
|
|
28370
|
-
|
|
28371
|
-
|
|
28372
|
-
|
|
28373
|
-
|
|
28374
|
-
|
|
28375
|
-
|
|
28376
|
-
|
|
28377
|
-
|
|
28378
|
-
|
|
28379
|
-
|
|
28380
|
-
|
|
28381
|
-
|
|
28382
|
-
|
|
28383
|
-
|
|
28384
|
-
|
|
28385
|
-
|
|
28386
|
-
|
|
28387
|
-
|
|
28388
|
-
return letter;
|
|
28389
|
-
} else {
|
|
28390
|
-
return colors[rainbowColors[i++ % rainbowColors.length]](letter);
|
|
27667
|
+
var define = function(name, codes, type) {
|
|
27668
|
+
colors.styles[name] = ansi({
|
|
27669
|
+
name: name,
|
|
27670
|
+
codes: codes
|
|
27671
|
+
});
|
|
27672
|
+
var keys = colors.keys[type] || (colors.keys[type] = []);
|
|
27673
|
+
keys.push(name);
|
|
27674
|
+
Reflect.defineProperty(colors, name, {
|
|
27675
|
+
configurable: true,
|
|
27676
|
+
enumerable: true,
|
|
27677
|
+
set: function set(value) {
|
|
27678
|
+
colors.alias(name, value);
|
|
27679
|
+
},
|
|
27680
|
+
get: function get() {
|
|
27681
|
+
var color = function(input) {
|
|
27682
|
+
return style(input, color.stack);
|
|
27683
|
+
};
|
|
27684
|
+
Reflect.setPrototypeOf(color, colors);
|
|
27685
|
+
color.stack = this.stack ? this.stack.concat(name) : [
|
|
27686
|
+
name
|
|
27687
|
+
];
|
|
27688
|
+
return color;
|
|
28391
27689
|
}
|
|
28392
|
-
};
|
|
28393
|
-
};
|
|
28394
|
-
})(rainbow);
|
|
28395
|
-
return rainbow.exports;
|
|
28396
|
-
}
|
|
28397
|
-
var random = {
|
|
28398
|
-
exports: {}
|
|
28399
|
-
};
|
|
28400
|
-
var hasRequiredRandom;
|
|
28401
|
-
function requireRandom() {
|
|
28402
|
-
if (hasRequiredRandom) return random.exports;
|
|
28403
|
-
hasRequiredRandom = 1;
|
|
28404
|
-
(function(module) {
|
|
28405
|
-
module['exports'] = function(colors) {
|
|
28406
|
-
var available = [
|
|
28407
|
-
'underline',
|
|
28408
|
-
'inverse',
|
|
28409
|
-
'grey',
|
|
28410
|
-
'yellow',
|
|
28411
|
-
'red',
|
|
28412
|
-
'green',
|
|
28413
|
-
'blue',
|
|
28414
|
-
'white',
|
|
28415
|
-
'cyan',
|
|
28416
|
-
'magenta',
|
|
28417
|
-
'brightYellow',
|
|
28418
|
-
'brightRed',
|
|
28419
|
-
'brightGreen',
|
|
28420
|
-
'brightBlue',
|
|
28421
|
-
'brightWhite',
|
|
28422
|
-
'brightCyan',
|
|
28423
|
-
'brightMagenta'
|
|
28424
|
-
];
|
|
28425
|
-
return function(letter, i, exploded) {
|
|
28426
|
-
return letter === ' ' ? letter : colors[available[Math.round(Math.random() * (available.length - 2))]](letter);
|
|
28427
|
-
};
|
|
28428
|
-
};
|
|
28429
|
-
})(random);
|
|
28430
|
-
return random.exports;
|
|
28431
|
-
}
|
|
28432
|
-
/*
|
|
28433
|
-
|
|
28434
|
-
The MIT License (MIT)
|
|
28435
|
-
|
|
28436
|
-
Original Library
|
|
28437
|
-
- Copyright (c) Marak Squires
|
|
28438
|
-
|
|
28439
|
-
Additional functionality
|
|
28440
|
-
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
28441
|
-
|
|
28442
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
28443
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
28444
|
-
in the Software without restriction, including without limitation the rights
|
|
28445
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
28446
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
28447
|
-
furnished to do so, subject to the following conditions:
|
|
28448
|
-
|
|
28449
|
-
The above copyright notice and this permission notice shall be included in
|
|
28450
|
-
all copies or substantial portions of the Software.
|
|
28451
|
-
|
|
28452
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
28453
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
28454
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
28455
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28456
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28457
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
28458
|
-
THE SOFTWARE.
|
|
28459
|
-
|
|
28460
|
-
*/ var hasRequiredColors;
|
|
28461
|
-
function requireColors() {
|
|
28462
|
-
if (hasRequiredColors) return colors.exports;
|
|
28463
|
-
hasRequiredColors = 1;
|
|
28464
|
-
(function(module) {
|
|
28465
|
-
var colors = {};
|
|
28466
|
-
module['exports'] = colors;
|
|
28467
|
-
colors.themes = {};
|
|
28468
|
-
var util = _util.default;
|
|
28469
|
-
var ansiStyles = colors.styles = requireStyles();
|
|
28470
|
-
var defineProps = Object.defineProperties;
|
|
28471
|
-
var newLineRegex = new RegExp(/[\r\n]+/g);
|
|
28472
|
-
colors.supportsColor = requireSupportsColors().supportsColor;
|
|
28473
|
-
if (typeof colors.enabled === 'undefined') {
|
|
28474
|
-
colors.enabled = colors.supportsColor() !== false;
|
|
28475
|
-
}
|
|
28476
|
-
colors.enable = function() {
|
|
28477
|
-
colors.enabled = true;
|
|
28478
|
-
};
|
|
28479
|
-
colors.disable = function() {
|
|
28480
|
-
colors.enabled = false;
|
|
28481
|
-
};
|
|
28482
|
-
colors.stripColors = colors.strip = function(str) {
|
|
28483
|
-
return ('' + str).replace(/\x1B\[\d+m/g, '');
|
|
28484
|
-
};
|
|
28485
|
-
// eslint-disable-next-line no-unused-vars
|
|
28486
|
-
colors.stylize = function stylize(str, style) {
|
|
28487
|
-
if (!colors.enabled) {
|
|
28488
|
-
return str + '';
|
|
28489
|
-
}
|
|
28490
|
-
var styleMap = ansiStyles[style];
|
|
28491
|
-
// Stylize should work for non-ANSI styles, too
|
|
28492
|
-
if (!styleMap && style in colors) {
|
|
28493
|
-
// Style maps like trap operate as functions on strings;
|
|
28494
|
-
// they don't have properties like open or close.
|
|
28495
|
-
return colors[style](str);
|
|
28496
|
-
}
|
|
28497
|
-
return styleMap.open + str + styleMap.close;
|
|
27690
|
+
});
|
|
28498
27691
|
};
|
|
28499
|
-
|
|
28500
|
-
|
|
28501
|
-
|
|
28502
|
-
|
|
28503
|
-
|
|
28504
|
-
|
|
27692
|
+
define('reset', [
|
|
27693
|
+
0,
|
|
27694
|
+
0
|
|
27695
|
+
], 'modifier');
|
|
27696
|
+
define('bold', [
|
|
27697
|
+
1,
|
|
27698
|
+
22
|
|
27699
|
+
], 'modifier');
|
|
27700
|
+
define('dim', [
|
|
27701
|
+
2,
|
|
27702
|
+
22
|
|
27703
|
+
], 'modifier');
|
|
27704
|
+
define('italic', [
|
|
27705
|
+
3,
|
|
27706
|
+
23
|
|
27707
|
+
], 'modifier');
|
|
27708
|
+
define('underline', [
|
|
27709
|
+
4,
|
|
27710
|
+
24
|
|
27711
|
+
], 'modifier');
|
|
27712
|
+
define('inverse', [
|
|
27713
|
+
7,
|
|
27714
|
+
27
|
|
27715
|
+
], 'modifier');
|
|
27716
|
+
define('hidden', [
|
|
27717
|
+
8,
|
|
27718
|
+
28
|
|
27719
|
+
], 'modifier');
|
|
27720
|
+
define('strikethrough', [
|
|
27721
|
+
9,
|
|
27722
|
+
29
|
|
27723
|
+
], 'modifier');
|
|
27724
|
+
define('black', [
|
|
27725
|
+
30,
|
|
27726
|
+
39
|
|
27727
|
+
], 'color');
|
|
27728
|
+
define('red', [
|
|
27729
|
+
31,
|
|
27730
|
+
39
|
|
27731
|
+
], 'color');
|
|
27732
|
+
define('green', [
|
|
27733
|
+
32,
|
|
27734
|
+
39
|
|
27735
|
+
], 'color');
|
|
27736
|
+
define('yellow', [
|
|
27737
|
+
33,
|
|
27738
|
+
39
|
|
27739
|
+
], 'color');
|
|
27740
|
+
define('blue', [
|
|
27741
|
+
34,
|
|
27742
|
+
39
|
|
27743
|
+
], 'color');
|
|
27744
|
+
define('magenta', [
|
|
27745
|
+
35,
|
|
27746
|
+
39
|
|
27747
|
+
], 'color');
|
|
27748
|
+
define('cyan', [
|
|
27749
|
+
36,
|
|
27750
|
+
39
|
|
27751
|
+
], 'color');
|
|
27752
|
+
define('white', [
|
|
27753
|
+
37,
|
|
27754
|
+
39
|
|
27755
|
+
], 'color');
|
|
27756
|
+
define('gray', [
|
|
27757
|
+
90,
|
|
27758
|
+
39
|
|
27759
|
+
], 'color');
|
|
27760
|
+
define('grey', [
|
|
27761
|
+
90,
|
|
27762
|
+
39
|
|
27763
|
+
], 'color');
|
|
27764
|
+
define('bgBlack', [
|
|
27765
|
+
40,
|
|
27766
|
+
49
|
|
27767
|
+
], 'bg');
|
|
27768
|
+
define('bgRed', [
|
|
27769
|
+
41,
|
|
27770
|
+
49
|
|
27771
|
+
], 'bg');
|
|
27772
|
+
define('bgGreen', [
|
|
27773
|
+
42,
|
|
27774
|
+
49
|
|
27775
|
+
], 'bg');
|
|
27776
|
+
define('bgYellow', [
|
|
27777
|
+
43,
|
|
27778
|
+
49
|
|
27779
|
+
], 'bg');
|
|
27780
|
+
define('bgBlue', [
|
|
27781
|
+
44,
|
|
27782
|
+
49
|
|
27783
|
+
], 'bg');
|
|
27784
|
+
define('bgMagenta', [
|
|
27785
|
+
45,
|
|
27786
|
+
49
|
|
27787
|
+
], 'bg');
|
|
27788
|
+
define('bgCyan', [
|
|
27789
|
+
46,
|
|
27790
|
+
49
|
|
27791
|
+
], 'bg');
|
|
27792
|
+
define('bgWhite', [
|
|
27793
|
+
47,
|
|
27794
|
+
49
|
|
27795
|
+
], 'bg');
|
|
27796
|
+
define('blackBright', [
|
|
27797
|
+
90,
|
|
27798
|
+
39
|
|
27799
|
+
], 'bright');
|
|
27800
|
+
define('redBright', [
|
|
27801
|
+
91,
|
|
27802
|
+
39
|
|
27803
|
+
], 'bright');
|
|
27804
|
+
define('greenBright', [
|
|
27805
|
+
92,
|
|
27806
|
+
39
|
|
27807
|
+
], 'bright');
|
|
27808
|
+
define('yellowBright', [
|
|
27809
|
+
93,
|
|
27810
|
+
39
|
|
27811
|
+
], 'bright');
|
|
27812
|
+
define('blueBright', [
|
|
27813
|
+
94,
|
|
27814
|
+
39
|
|
27815
|
+
], 'bright');
|
|
27816
|
+
define('magentaBright', [
|
|
27817
|
+
95,
|
|
27818
|
+
39
|
|
27819
|
+
], 'bright');
|
|
27820
|
+
define('cyanBright', [
|
|
27821
|
+
96,
|
|
27822
|
+
39
|
|
27823
|
+
], 'bright');
|
|
27824
|
+
define('whiteBright', [
|
|
27825
|
+
97,
|
|
27826
|
+
39
|
|
27827
|
+
], 'bright');
|
|
27828
|
+
define('bgBlackBright', [
|
|
27829
|
+
100,
|
|
27830
|
+
49
|
|
27831
|
+
], 'bgBright');
|
|
27832
|
+
define('bgRedBright', [
|
|
27833
|
+
101,
|
|
27834
|
+
49
|
|
27835
|
+
], 'bgBright');
|
|
27836
|
+
define('bgGreenBright', [
|
|
27837
|
+
102,
|
|
27838
|
+
49
|
|
27839
|
+
], 'bgBright');
|
|
27840
|
+
define('bgYellowBright', [
|
|
27841
|
+
103,
|
|
27842
|
+
49
|
|
27843
|
+
], 'bgBright');
|
|
27844
|
+
define('bgBlueBright', [
|
|
27845
|
+
104,
|
|
27846
|
+
49
|
|
27847
|
+
], 'bgBright');
|
|
27848
|
+
define('bgMagentaBright', [
|
|
27849
|
+
105,
|
|
27850
|
+
49
|
|
27851
|
+
], 'bgBright');
|
|
27852
|
+
define('bgCyanBright', [
|
|
27853
|
+
106,
|
|
27854
|
+
49
|
|
27855
|
+
], 'bgBright');
|
|
27856
|
+
define('bgWhiteBright', [
|
|
27857
|
+
107,
|
|
27858
|
+
49
|
|
27859
|
+
], 'bgBright');
|
|
27860
|
+
colors.ansiRegex = ANSI_REGEX;
|
|
27861
|
+
colors.hasColor = colors.hasAnsi = function(str) {
|
|
27862
|
+
colors.ansiRegex.lastIndex = 0;
|
|
27863
|
+
return typeof str === 'string' && str !== '' && colors.ansiRegex.test(str);
|
|
28505
27864
|
};
|
|
28506
|
-
function
|
|
28507
|
-
var
|
|
28508
|
-
|
|
28509
|
-
|
|
28510
|
-
|
|
28511
|
-
|
|
28512
|
-
|
|
28513
|
-
|
|
28514
|
-
|
|
28515
|
-
|
|
28516
|
-
|
|
28517
|
-
|
|
28518
|
-
|
|
28519
|
-
Object.keys(ansiStyles).forEach(function(key) {
|
|
28520
|
-
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
|
|
28521
|
-
ret[key] = {
|
|
28522
|
-
get: function get() {
|
|
28523
|
-
return build(this._styles.concat(key));
|
|
28524
|
-
}
|
|
28525
|
-
};
|
|
28526
|
-
});
|
|
28527
|
-
return ret;
|
|
28528
|
-
}();
|
|
28529
|
-
var proto = defineProps(function colors() {}, styles);
|
|
28530
|
-
function applyStyle() {
|
|
28531
|
-
var args = Array.prototype.slice.call(arguments);
|
|
28532
|
-
var str = args.map(function(arg) {
|
|
28533
|
-
// Use weak equality check so we can colorize null/undefined in safe mode
|
|
28534
|
-
if (arg != null && arg.constructor === String) {
|
|
28535
|
-
return arg;
|
|
28536
|
-
} else {
|
|
28537
|
-
return util.inspect(arg);
|
|
28538
|
-
}
|
|
28539
|
-
}).join(' ');
|
|
28540
|
-
if (!colors.enabled || !str) {
|
|
28541
|
-
return str;
|
|
28542
|
-
}
|
|
28543
|
-
var newLinesPresent = str.indexOf('\n') != -1;
|
|
28544
|
-
var nestedStyles = this._styles;
|
|
28545
|
-
var i = nestedStyles.length;
|
|
28546
|
-
while(i--){
|
|
28547
|
-
var code = ansiStyles[nestedStyles[i]];
|
|
28548
|
-
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
|
28549
|
-
if (newLinesPresent) {
|
|
28550
|
-
str = str.replace(newLineRegex, function(match) {
|
|
28551
|
-
return code.close + match + code.open;
|
|
28552
|
-
});
|
|
28553
|
-
}
|
|
28554
|
-
}
|
|
28555
|
-
return str;
|
|
28556
|
-
}
|
|
28557
|
-
colors.setTheme = function(theme) {
|
|
28558
|
-
if (typeof theme === 'string') {
|
|
28559
|
-
console.log('colors.setTheme now only accepts an object, not a string. ' + 'If you are trying to set a theme from a file, it is now your (the ' + 'caller\'s) responsibility to require the file. The old syntax ' + 'looked like colors.setTheme(__dirname + ' + '\'/../themes/generic-logging.js\'); The new syntax looks like ' + 'colors.setTheme(require(__dirname + ' + '\'/../themes/generic-logging.js\'));');
|
|
28560
|
-
return;
|
|
27865
|
+
colors.alias = function(name, color) {
|
|
27866
|
+
var fn = typeof color === 'string' ? colors[color] : color;
|
|
27867
|
+
if (typeof fn !== 'function') {
|
|
27868
|
+
throw new TypeError('Expected alias to be the name of an existing color (string) or a function');
|
|
27869
|
+
}
|
|
27870
|
+
if (!fn.stack) {
|
|
27871
|
+
Reflect.defineProperty(fn, 'name', {
|
|
27872
|
+
value: name
|
|
27873
|
+
});
|
|
27874
|
+
colors.styles[name] = fn;
|
|
27875
|
+
fn.stack = [
|
|
27876
|
+
name
|
|
27877
|
+
];
|
|
28561
27878
|
}
|
|
28562
|
-
|
|
28563
|
-
|
|
28564
|
-
|
|
28565
|
-
|
|
28566
|
-
|
|
28567
|
-
|
|
28568
|
-
|
|
28569
|
-
|
|
28570
|
-
|
|
28571
|
-
}
|
|
28572
|
-
return colors[theme[style]](str);
|
|
27879
|
+
Reflect.defineProperty(colors, name, {
|
|
27880
|
+
configurable: true,
|
|
27881
|
+
enumerable: true,
|
|
27882
|
+
set: function set(value) {
|
|
27883
|
+
colors.alias(name, value);
|
|
27884
|
+
},
|
|
27885
|
+
get: function get() {
|
|
27886
|
+
var _$color = function(input) {
|
|
27887
|
+
return style(input, _$color.stack);
|
|
28573
27888
|
};
|
|
28574
|
-
|
|
28575
|
-
|
|
28576
|
-
|
|
28577
|
-
|
|
28578
|
-
var ret = {};
|
|
28579
|
-
Object.keys(styles).forEach(function(name) {
|
|
28580
|
-
ret[name] = {
|
|
28581
|
-
get: function get() {
|
|
28582
|
-
return build([
|
|
28583
|
-
name
|
|
28584
|
-
]);
|
|
28585
|
-
}
|
|
28586
|
-
};
|
|
27889
|
+
Reflect.setPrototypeOf(_$color, colors);
|
|
27890
|
+
_$color.stack = this.stack ? this.stack.concat(fn.stack) : fn.stack;
|
|
27891
|
+
return _$color;
|
|
27892
|
+
}
|
|
28587
27893
|
});
|
|
28588
|
-
return ret;
|
|
28589
|
-
}
|
|
28590
|
-
var sequencer = function sequencer(map, str) {
|
|
28591
|
-
var exploded = str.split('');
|
|
28592
|
-
exploded = exploded.map(map);
|
|
28593
|
-
return exploded.join('');
|
|
28594
27894
|
};
|
|
28595
|
-
|
|
28596
|
-
|
|
28597
|
-
|
|
28598
|
-
|
|
28599
|
-
|
|
28600
|
-
|
|
28601
|
-
|
|
28602
|
-
|
|
28603
|
-
|
|
28604
|
-
|
|
28605
|
-
|
|
28606
|
-
|
|
28607
|
-
|
|
28608
|
-
|
|
28609
|
-
|
|
28610
|
-
|
|
28611
|
-
|
|
28612
|
-
|
|
28613
|
-
|
|
28614
|
-
}
|
|
28615
|
-
var extendStringPrototype = {
|
|
28616
|
-
exports: {}
|
|
28617
|
-
};
|
|
28618
|
-
var hasRequiredExtendStringPrototype;
|
|
28619
|
-
function requireExtendStringPrototype() {
|
|
28620
|
-
if (hasRequiredExtendStringPrototype) return extendStringPrototype.exports;
|
|
28621
|
-
hasRequiredExtendStringPrototype = 1;
|
|
28622
|
-
(function(module) {
|
|
28623
|
-
var colors = requireColors();
|
|
28624
|
-
module['exports'] = function() {
|
|
28625
|
-
//
|
|
28626
|
-
// Extends prototype of native string object to allow for "foo".red syntax
|
|
28627
|
-
//
|
|
28628
|
-
var addProperty = function addProperty(color, func) {
|
|
28629
|
-
String.prototype.__defineGetter__(color, func);
|
|
28630
|
-
};
|
|
28631
|
-
addProperty('strip', function() {
|
|
28632
|
-
return colors.strip(this);
|
|
28633
|
-
});
|
|
28634
|
-
addProperty('stripColors', function() {
|
|
28635
|
-
return colors.strip(this);
|
|
28636
|
-
});
|
|
28637
|
-
addProperty('trap', function() {
|
|
28638
|
-
return colors.trap(this);
|
|
28639
|
-
});
|
|
28640
|
-
addProperty('zalgo', function() {
|
|
28641
|
-
return colors.zalgo(this);
|
|
28642
|
-
});
|
|
28643
|
-
addProperty('zebra', function() {
|
|
28644
|
-
return colors.zebra(this);
|
|
28645
|
-
});
|
|
28646
|
-
addProperty('rainbow', function() {
|
|
28647
|
-
return colors.rainbow(this);
|
|
28648
|
-
});
|
|
28649
|
-
addProperty('random', function() {
|
|
28650
|
-
return colors.random(this);
|
|
28651
|
-
});
|
|
28652
|
-
addProperty('america', function() {
|
|
28653
|
-
return colors.america(this);
|
|
28654
|
-
});
|
|
28655
|
-
//
|
|
28656
|
-
// Iterate through all default styles and colors
|
|
28657
|
-
//
|
|
28658
|
-
var x = Object.keys(colors.styles);
|
|
28659
|
-
x.forEach(function(style) {
|
|
28660
|
-
addProperty(style, function() {
|
|
28661
|
-
return colors.stylize(this, style);
|
|
28662
|
-
});
|
|
28663
|
-
});
|
|
28664
|
-
function applyTheme(theme) {
|
|
28665
|
-
//
|
|
28666
|
-
// Remark: This is a list of methods that exist
|
|
28667
|
-
// on String that you should not overwrite.
|
|
28668
|
-
//
|
|
28669
|
-
var stringPrototypeBlacklist = [
|
|
28670
|
-
'__defineGetter__',
|
|
28671
|
-
'__defineSetter__',
|
|
28672
|
-
'__lookupGetter__',
|
|
28673
|
-
'__lookupSetter__',
|
|
28674
|
-
'charAt',
|
|
28675
|
-
'constructor',
|
|
28676
|
-
'hasOwnProperty',
|
|
28677
|
-
'isPrototypeOf',
|
|
28678
|
-
'propertyIsEnumerable',
|
|
28679
|
-
'toLocaleString',
|
|
28680
|
-
'toString',
|
|
28681
|
-
'valueOf',
|
|
28682
|
-
'charCodeAt',
|
|
28683
|
-
'indexOf',
|
|
28684
|
-
'lastIndexOf',
|
|
28685
|
-
'length',
|
|
28686
|
-
'localeCompare',
|
|
28687
|
-
'match',
|
|
28688
|
-
'repeat',
|
|
28689
|
-
'replace',
|
|
28690
|
-
'search',
|
|
28691
|
-
'slice',
|
|
28692
|
-
'split',
|
|
28693
|
-
'substring',
|
|
28694
|
-
'toLocaleLowerCase',
|
|
28695
|
-
'toLocaleUpperCase',
|
|
28696
|
-
'toLowerCase',
|
|
28697
|
-
'toUpperCase',
|
|
28698
|
-
'trim',
|
|
28699
|
-
'trimLeft',
|
|
28700
|
-
'trimRight'
|
|
28701
|
-
];
|
|
28702
|
-
Object.keys(theme).forEach(function(prop) {
|
|
28703
|
-
if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
|
|
28704
|
-
console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. ' + 'Ignoring style name');
|
|
28705
|
-
} else {
|
|
28706
|
-
if (typeof theme[prop] === 'string') {
|
|
28707
|
-
colors[prop] = colors[theme[prop]];
|
|
28708
|
-
addProperty(prop, function() {
|
|
28709
|
-
return colors[prop](this);
|
|
28710
|
-
});
|
|
28711
|
-
} else {
|
|
28712
|
-
var themePropApplicator = function themePropApplicator(str) {
|
|
28713
|
-
var ret = str || this;
|
|
28714
|
-
for(var t = 0; t < theme[prop].length; t++){
|
|
28715
|
-
ret = colors[theme[prop][t]](ret);
|
|
28716
|
-
}
|
|
28717
|
-
return ret;
|
|
28718
|
-
};
|
|
28719
|
-
addProperty(prop, themePropApplicator);
|
|
28720
|
-
colors[prop] = function(str) {
|
|
28721
|
-
return themePropApplicator(str);
|
|
28722
|
-
};
|
|
28723
|
-
}
|
|
27895
|
+
colors.theme = function(custom) {
|
|
27896
|
+
if (!isObject(custom)) throw new TypeError('Expected theme to be an object');
|
|
27897
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
27898
|
+
try {
|
|
27899
|
+
for(var _iterator = Object.keys(custom)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
27900
|
+
var name = _step.value;
|
|
27901
|
+
colors.alias(name, custom[name]);
|
|
27902
|
+
}
|
|
27903
|
+
} catch (err) {
|
|
27904
|
+
_didIteratorError = true;
|
|
27905
|
+
_iteratorError = err;
|
|
27906
|
+
} finally{
|
|
27907
|
+
try {
|
|
27908
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
27909
|
+
_iterator.return();
|
|
27910
|
+
}
|
|
27911
|
+
} finally{
|
|
27912
|
+
if (_didIteratorError) {
|
|
27913
|
+
throw _iteratorError;
|
|
28724
27914
|
}
|
|
28725
|
-
});
|
|
28726
|
-
}
|
|
28727
|
-
colors.setTheme = function(theme) {
|
|
28728
|
-
if (typeof theme === 'string') {
|
|
28729
|
-
console.log('colors.setTheme now only accepts an object, not a string. ' + 'If you are trying to set a theme from a file, it is now your (the ' + 'caller\'s) responsibility to require the file. The old syntax ' + 'looked like colors.setTheme(__dirname + ' + '\'/../themes/generic-logging.js\'); The new syntax looks like ' + 'colors.setTheme(require(__dirname + ' + '\'/../themes/generic-logging.js\'));');
|
|
28730
|
-
return;
|
|
28731
|
-
} else {
|
|
28732
|
-
applyTheme(theme);
|
|
28733
27915
|
}
|
|
28734
|
-
}
|
|
27916
|
+
}
|
|
27917
|
+
return colors;
|
|
28735
27918
|
};
|
|
28736
|
-
|
|
28737
|
-
|
|
28738
|
-
|
|
28739
|
-
|
|
28740
|
-
|
|
28741
|
-
|
|
28742
|
-
|
|
28743
|
-
|
|
28744
|
-
|
|
28745
|
-
|
|
28746
|
-
|
|
28747
|
-
|
|
28748
|
-
|
|
28749
|
-
|
|
28750
|
-
|
|
28751
|
-
|
|
28752
|
-
|
|
28753
|
-
|
|
28754
|
-
|
|
28755
|
-
requireExtendStringPrototype()();
|
|
28756
|
-
})(lib);
|
|
28757
|
-
return lib.exports;
|
|
27919
|
+
colors.alias('unstyle', function(str) {
|
|
27920
|
+
if (typeof str === 'string' && str !== '') {
|
|
27921
|
+
colors.ansiRegex.lastIndex = 0;
|
|
27922
|
+
return str.replace(colors.ansiRegex, '');
|
|
27923
|
+
}
|
|
27924
|
+
return '';
|
|
27925
|
+
});
|
|
27926
|
+
colors.alias('noop', function(str) {
|
|
27927
|
+
return str;
|
|
27928
|
+
});
|
|
27929
|
+
colors.none = colors.clear = colors.noop;
|
|
27930
|
+
colors.stripColor = colors.unstyle;
|
|
27931
|
+
colors.symbols = requireSymbols();
|
|
27932
|
+
colors.define = define;
|
|
27933
|
+
return colors;
|
|
27934
|
+
};
|
|
27935
|
+
ansiColors.exports = create();
|
|
27936
|
+
ansiColors.exports.create = create;
|
|
27937
|
+
return ansiColors.exports;
|
|
28758
27938
|
}
|
|
28759
|
-
var
|
|
28760
|
-
var chalk = /*@__PURE__*/ getDefaultExportFromCjs(
|
|
27939
|
+
var ansiColorsExports = requireAnsiColors();
|
|
27940
|
+
var chalk = /*@__PURE__*/ getDefaultExportFromCjs(ansiColorsExports);
|
|
28761
27941
|
var rgbRegex = /^rgb\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/;
|
|
28762
27942
|
var ansiRegex = /^ansi256\(\s?(\d+)\s?\)$/;
|
|
28763
27943
|
var isNamedColor = function(color) {
|