@nsshunt/stsconfig 1.27.55 → 1.27.57

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/dist/index.mjs CHANGED
@@ -1,2077 +1,341 @@
1
1
  import { accessSync, constants, readFileSync } from "node:fs";
2
2
  import dotenv from "dotenv";
3
- //#region \0rolldown/runtime.js
4
- var __create = Object.create;
5
- var __defProp = Object.defineProperty;
6
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getProtoOf = Object.getPrototypeOf;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
13
- key = keys[i];
14
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
- get: ((k) => from[k]).bind(null, key),
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
3
+ //#region node_modules/chalk/source/vendor/ansi-styles/index.js
4
+ var ANSI_BACKGROUND_OFFSET = 10;
5
+ var wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
6
+ var wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
7
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
8
+ var styles$1 = {
9
+ modifier: {
10
+ reset: [0, 0],
11
+ bold: [1, 22],
12
+ dim: [2, 22],
13
+ italic: [3, 23],
14
+ underline: [4, 24],
15
+ overline: [53, 55],
16
+ inverse: [7, 27],
17
+ hidden: [8, 28],
18
+ strikethrough: [9, 29]
19
+ },
20
+ color: {
21
+ black: [30, 39],
22
+ red: [31, 39],
23
+ green: [32, 39],
24
+ yellow: [33, 39],
25
+ blue: [34, 39],
26
+ magenta: [35, 39],
27
+ cyan: [36, 39],
28
+ white: [37, 39],
29
+ blackBright: [90, 39],
30
+ gray: [90, 39],
31
+ grey: [90, 39],
32
+ redBright: [91, 39],
33
+ greenBright: [92, 39],
34
+ yellowBright: [93, 39],
35
+ blueBright: [94, 39],
36
+ magentaBright: [95, 39],
37
+ cyanBright: [96, 39],
38
+ whiteBright: [97, 39]
39
+ },
40
+ bgColor: {
41
+ bgBlack: [40, 49],
42
+ bgRed: [41, 49],
43
+ bgGreen: [42, 49],
44
+ bgYellow: [43, 49],
45
+ bgBlue: [44, 49],
46
+ bgMagenta: [45, 49],
47
+ bgCyan: [46, 49],
48
+ bgWhite: [47, 49],
49
+ bgBlackBright: [100, 49],
50
+ bgGray: [100, 49],
51
+ bgGrey: [100, 49],
52
+ bgRedBright: [101, 49],
53
+ bgGreenBright: [102, 49],
54
+ bgYellowBright: [103, 49],
55
+ bgBlueBright: [104, 49],
56
+ bgMagentaBright: [105, 49],
57
+ bgCyanBright: [106, 49],
58
+ bgWhiteBright: [107, 49]
18
59
  }
19
- return to;
20
60
  };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
22
- value: mod,
23
- enumerable: true
24
- }) : target, mod));
25
- //#endregion
26
- //#region node_modules/color-name/index.js
27
- var require_color_name = /* @__PURE__ */ __commonJSMin(((exports, module) => {
28
- module.exports = {
29
- "aliceblue": [
30
- 240,
31
- 248,
32
- 255
33
- ],
34
- "antiquewhite": [
35
- 250,
36
- 235,
37
- 215
38
- ],
39
- "aqua": [
40
- 0,
41
- 255,
42
- 255
43
- ],
44
- "aquamarine": [
45
- 127,
46
- 255,
47
- 212
48
- ],
49
- "azure": [
50
- 240,
51
- 255,
52
- 255
53
- ],
54
- "beige": [
55
- 245,
56
- 245,
57
- 220
58
- ],
59
- "bisque": [
60
- 255,
61
- 228,
62
- 196
63
- ],
64
- "black": [
65
- 0,
66
- 0,
67
- 0
68
- ],
69
- "blanchedalmond": [
70
- 255,
71
- 235,
72
- 205
73
- ],
74
- "blue": [
75
- 0,
76
- 0,
77
- 255
78
- ],
79
- "blueviolet": [
80
- 138,
81
- 43,
82
- 226
83
- ],
84
- "brown": [
85
- 165,
86
- 42,
87
- 42
88
- ],
89
- "burlywood": [
90
- 222,
91
- 184,
92
- 135
93
- ],
94
- "cadetblue": [
95
- 95,
96
- 158,
97
- 160
98
- ],
99
- "chartreuse": [
100
- 127,
101
- 255,
102
- 0
103
- ],
104
- "chocolate": [
105
- 210,
106
- 105,
107
- 30
108
- ],
109
- "coral": [
110
- 255,
111
- 127,
112
- 80
113
- ],
114
- "cornflowerblue": [
115
- 100,
116
- 149,
117
- 237
118
- ],
119
- "cornsilk": [
120
- 255,
121
- 248,
122
- 220
123
- ],
124
- "crimson": [
125
- 220,
126
- 20,
127
- 60
128
- ],
129
- "cyan": [
130
- 0,
131
- 255,
132
- 255
133
- ],
134
- "darkblue": [
135
- 0,
136
- 0,
137
- 139
138
- ],
139
- "darkcyan": [
140
- 0,
141
- 139,
142
- 139
143
- ],
144
- "darkgoldenrod": [
145
- 184,
146
- 134,
147
- 11
148
- ],
149
- "darkgray": [
150
- 169,
151
- 169,
152
- 169
153
- ],
154
- "darkgreen": [
155
- 0,
156
- 100,
157
- 0
158
- ],
159
- "darkgrey": [
160
- 169,
161
- 169,
162
- 169
163
- ],
164
- "darkkhaki": [
165
- 189,
166
- 183,
167
- 107
168
- ],
169
- "darkmagenta": [
170
- 139,
171
- 0,
172
- 139
173
- ],
174
- "darkolivegreen": [
175
- 85,
176
- 107,
177
- 47
178
- ],
179
- "darkorange": [
180
- 255,
181
- 140,
182
- 0
183
- ],
184
- "darkorchid": [
185
- 153,
186
- 50,
187
- 204
188
- ],
189
- "darkred": [
190
- 139,
191
- 0,
192
- 0
193
- ],
194
- "darksalmon": [
195
- 233,
196
- 150,
197
- 122
198
- ],
199
- "darkseagreen": [
200
- 143,
201
- 188,
202
- 143
203
- ],
204
- "darkslateblue": [
205
- 72,
206
- 61,
207
- 139
208
- ],
209
- "darkslategray": [
210
- 47,
211
- 79,
212
- 79
213
- ],
214
- "darkslategrey": [
215
- 47,
216
- 79,
217
- 79
218
- ],
219
- "darkturquoise": [
220
- 0,
221
- 206,
222
- 209
223
- ],
224
- "darkviolet": [
225
- 148,
226
- 0,
227
- 211
228
- ],
229
- "deeppink": [
230
- 255,
231
- 20,
232
- 147
233
- ],
234
- "deepskyblue": [
235
- 0,
236
- 191,
237
- 255
238
- ],
239
- "dimgray": [
240
- 105,
241
- 105,
242
- 105
243
- ],
244
- "dimgrey": [
245
- 105,
246
- 105,
247
- 105
248
- ],
249
- "dodgerblue": [
250
- 30,
251
- 144,
252
- 255
253
- ],
254
- "firebrick": [
255
- 178,
256
- 34,
257
- 34
258
- ],
259
- "floralwhite": [
260
- 255,
261
- 250,
262
- 240
263
- ],
264
- "forestgreen": [
265
- 34,
266
- 139,
267
- 34
268
- ],
269
- "fuchsia": [
270
- 255,
271
- 0,
272
- 255
273
- ],
274
- "gainsboro": [
275
- 220,
276
- 220,
277
- 220
278
- ],
279
- "ghostwhite": [
280
- 248,
281
- 248,
282
- 255
283
- ],
284
- "gold": [
285
- 255,
286
- 215,
287
- 0
288
- ],
289
- "goldenrod": [
290
- 218,
291
- 165,
292
- 32
293
- ],
294
- "gray": [
295
- 128,
296
- 128,
297
- 128
298
- ],
299
- "green": [
300
- 0,
301
- 128,
302
- 0
303
- ],
304
- "greenyellow": [
305
- 173,
306
- 255,
307
- 47
308
- ],
309
- "grey": [
310
- 128,
311
- 128,
312
- 128
313
- ],
314
- "honeydew": [
315
- 240,
316
- 255,
317
- 240
318
- ],
319
- "hotpink": [
320
- 255,
321
- 105,
322
- 180
323
- ],
324
- "indianred": [
325
- 205,
326
- 92,
327
- 92
328
- ],
329
- "indigo": [
330
- 75,
331
- 0,
332
- 130
333
- ],
334
- "ivory": [
335
- 255,
336
- 255,
337
- 240
338
- ],
339
- "khaki": [
340
- 240,
341
- 230,
342
- 140
343
- ],
344
- "lavender": [
345
- 230,
346
- 230,
347
- 250
348
- ],
349
- "lavenderblush": [
350
- 255,
351
- 240,
352
- 245
353
- ],
354
- "lawngreen": [
355
- 124,
356
- 252,
357
- 0
358
- ],
359
- "lemonchiffon": [
360
- 255,
361
- 250,
362
- 205
363
- ],
364
- "lightblue": [
365
- 173,
366
- 216,
367
- 230
368
- ],
369
- "lightcoral": [
370
- 240,
371
- 128,
372
- 128
373
- ],
374
- "lightcyan": [
375
- 224,
376
- 255,
377
- 255
378
- ],
379
- "lightgoldenrodyellow": [
380
- 250,
381
- 250,
382
- 210
383
- ],
384
- "lightgray": [
385
- 211,
386
- 211,
387
- 211
388
- ],
389
- "lightgreen": [
390
- 144,
391
- 238,
392
- 144
393
- ],
394
- "lightgrey": [
395
- 211,
396
- 211,
397
- 211
398
- ],
399
- "lightpink": [
400
- 255,
401
- 182,
402
- 193
403
- ],
404
- "lightsalmon": [
405
- 255,
406
- 160,
407
- 122
408
- ],
409
- "lightseagreen": [
410
- 32,
411
- 178,
412
- 170
413
- ],
414
- "lightskyblue": [
415
- 135,
416
- 206,
417
- 250
418
- ],
419
- "lightslategray": [
420
- 119,
421
- 136,
422
- 153
423
- ],
424
- "lightslategrey": [
425
- 119,
426
- 136,
427
- 153
428
- ],
429
- "lightsteelblue": [
430
- 176,
431
- 196,
432
- 222
433
- ],
434
- "lightyellow": [
435
- 255,
436
- 255,
437
- 224
438
- ],
439
- "lime": [
440
- 0,
441
- 255,
442
- 0
443
- ],
444
- "limegreen": [
445
- 50,
446
- 205,
447
- 50
448
- ],
449
- "linen": [
450
- 250,
451
- 240,
452
- 230
453
- ],
454
- "magenta": [
455
- 255,
456
- 0,
457
- 255
458
- ],
459
- "maroon": [
460
- 128,
461
- 0,
462
- 0
463
- ],
464
- "mediumaquamarine": [
465
- 102,
466
- 205,
467
- 170
468
- ],
469
- "mediumblue": [
470
- 0,
471
- 0,
472
- 205
473
- ],
474
- "mediumorchid": [
475
- 186,
476
- 85,
477
- 211
478
- ],
479
- "mediumpurple": [
480
- 147,
481
- 112,
482
- 219
483
- ],
484
- "mediumseagreen": [
485
- 60,
486
- 179,
487
- 113
488
- ],
489
- "mediumslateblue": [
490
- 123,
491
- 104,
492
- 238
493
- ],
494
- "mediumspringgreen": [
495
- 0,
496
- 250,
497
- 154
498
- ],
499
- "mediumturquoise": [
500
- 72,
501
- 209,
502
- 204
503
- ],
504
- "mediumvioletred": [
505
- 199,
506
- 21,
507
- 133
508
- ],
509
- "midnightblue": [
510
- 25,
511
- 25,
512
- 112
513
- ],
514
- "mintcream": [
515
- 245,
516
- 255,
517
- 250
518
- ],
519
- "mistyrose": [
520
- 255,
521
- 228,
522
- 225
523
- ],
524
- "moccasin": [
525
- 255,
526
- 228,
527
- 181
528
- ],
529
- "navajowhite": [
530
- 255,
531
- 222,
532
- 173
533
- ],
534
- "navy": [
535
- 0,
536
- 0,
537
- 128
538
- ],
539
- "oldlace": [
540
- 253,
541
- 245,
542
- 230
543
- ],
544
- "olive": [
545
- 128,
546
- 128,
547
- 0
548
- ],
549
- "olivedrab": [
550
- 107,
551
- 142,
552
- 35
553
- ],
554
- "orange": [
555
- 255,
556
- 165,
557
- 0
558
- ],
559
- "orangered": [
560
- 255,
561
- 69,
562
- 0
563
- ],
564
- "orchid": [
565
- 218,
566
- 112,
567
- 214
568
- ],
569
- "palegoldenrod": [
570
- 238,
571
- 232,
572
- 170
573
- ],
574
- "palegreen": [
575
- 152,
576
- 251,
577
- 152
578
- ],
579
- "paleturquoise": [
580
- 175,
581
- 238,
582
- 238
583
- ],
584
- "palevioletred": [
585
- 219,
586
- 112,
587
- 147
588
- ],
589
- "papayawhip": [
590
- 255,
591
- 239,
592
- 213
593
- ],
594
- "peachpuff": [
595
- 255,
596
- 218,
597
- 185
598
- ],
599
- "peru": [
600
- 205,
601
- 133,
602
- 63
603
- ],
604
- "pink": [
605
- 255,
606
- 192,
607
- 203
608
- ],
609
- "plum": [
610
- 221,
611
- 160,
612
- 221
613
- ],
614
- "powderblue": [
615
- 176,
616
- 224,
617
- 230
618
- ],
619
- "purple": [
620
- 128,
621
- 0,
622
- 128
623
- ],
624
- "rebeccapurple": [
625
- 102,
626
- 51,
627
- 153
628
- ],
629
- "red": [
630
- 255,
631
- 0,
632
- 0
633
- ],
634
- "rosybrown": [
635
- 188,
636
- 143,
637
- 143
638
- ],
639
- "royalblue": [
640
- 65,
641
- 105,
642
- 225
643
- ],
644
- "saddlebrown": [
645
- 139,
646
- 69,
647
- 19
648
- ],
649
- "salmon": [
650
- 250,
651
- 128,
652
- 114
653
- ],
654
- "sandybrown": [
655
- 244,
656
- 164,
657
- 96
658
- ],
659
- "seagreen": [
660
- 46,
661
- 139,
662
- 87
663
- ],
664
- "seashell": [
665
- 255,
666
- 245,
667
- 238
668
- ],
669
- "sienna": [
670
- 160,
671
- 82,
672
- 45
673
- ],
674
- "silver": [
675
- 192,
676
- 192,
677
- 192
678
- ],
679
- "skyblue": [
680
- 135,
681
- 206,
682
- 235
683
- ],
684
- "slateblue": [
685
- 106,
686
- 90,
687
- 205
688
- ],
689
- "slategray": [
690
- 112,
691
- 128,
692
- 144
693
- ],
694
- "slategrey": [
695
- 112,
696
- 128,
697
- 144
698
- ],
699
- "snow": [
700
- 255,
701
- 250,
702
- 250
703
- ],
704
- "springgreen": [
705
- 0,
706
- 255,
707
- 127
708
- ],
709
- "steelblue": [
710
- 70,
711
- 130,
712
- 180
713
- ],
714
- "tan": [
715
- 210,
716
- 180,
717
- 140
718
- ],
719
- "teal": [
720
- 0,
721
- 128,
722
- 128
723
- ],
724
- "thistle": [
725
- 216,
726
- 191,
727
- 216
728
- ],
729
- "tomato": [
730
- 255,
731
- 99,
732
- 71
733
- ],
734
- "turquoise": [
735
- 64,
736
- 224,
737
- 208
738
- ],
739
- "violet": [
740
- 238,
741
- 130,
742
- 238
743
- ],
744
- "wheat": [
745
- 245,
746
- 222,
747
- 179
748
- ],
749
- "white": [
750
- 255,
751
- 255,
752
- 255
753
- ],
754
- "whitesmoke": [
755
- 245,
756
- 245,
757
- 245
758
- ],
759
- "yellow": [
760
- 255,
761
- 255,
762
- 0
763
- ],
764
- "yellowgreen": [
765
- 154,
766
- 205,
767
- 50
768
- ]
769
- };
770
- }));
771
- //#endregion
772
- //#region node_modules/color-convert/conversions.js
773
- var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
774
- var cssKeywords = require_color_name();
775
- var reverseKeywords = {};
776
- for (const key of Object.keys(cssKeywords)) reverseKeywords[cssKeywords[key]] = key;
777
- var convert = {
778
- rgb: {
779
- channels: 3,
780
- labels: "rgb"
781
- },
782
- hsl: {
783
- channels: 3,
784
- labels: "hsl"
785
- },
786
- hsv: {
787
- channels: 3,
788
- labels: "hsv"
789
- },
790
- hwb: {
791
- channels: 3,
792
- labels: "hwb"
793
- },
794
- cmyk: {
795
- channels: 4,
796
- labels: "cmyk"
797
- },
798
- xyz: {
799
- channels: 3,
800
- labels: "xyz"
801
- },
802
- lab: {
803
- channels: 3,
804
- labels: "lab"
805
- },
806
- lch: {
807
- channels: 3,
808
- labels: "lch"
809
- },
810
- hex: {
811
- channels: 1,
812
- labels: ["hex"]
813
- },
814
- keyword: {
815
- channels: 1,
816
- labels: ["keyword"]
817
- },
818
- ansi16: {
819
- channels: 1,
820
- labels: ["ansi16"]
821
- },
822
- ansi256: {
823
- channels: 1,
824
- labels: ["ansi256"]
825
- },
826
- hcg: {
827
- channels: 3,
828
- labels: [
829
- "h",
830
- "c",
831
- "g"
832
- ]
833
- },
834
- apple: {
835
- channels: 3,
836
- labels: [
837
- "r16",
838
- "g16",
839
- "b16"
840
- ]
841
- },
842
- gray: {
843
- channels: 1,
844
- labels: ["gray"]
845
- }
846
- };
847
- module.exports = convert;
848
- for (const model of Object.keys(convert)) {
849
- if (!("channels" in convert[model])) throw new Error("missing channels property: " + model);
850
- if (!("labels" in convert[model])) throw new Error("missing channel labels property: " + model);
851
- if (convert[model].labels.length !== convert[model].channels) throw new Error("channel and label counts mismatch: " + model);
852
- const { channels, labels } = convert[model];
853
- delete convert[model].channels;
854
- delete convert[model].labels;
855
- Object.defineProperty(convert[model], "channels", { value: channels });
856
- Object.defineProperty(convert[model], "labels", { value: labels });
857
- }
858
- convert.rgb.hsl = function(rgb) {
859
- const r = rgb[0] / 255;
860
- const g = rgb[1] / 255;
861
- const b = rgb[2] / 255;
862
- const min = Math.min(r, g, b);
863
- const max = Math.max(r, g, b);
864
- const delta = max - min;
865
- let h;
866
- let s;
867
- if (max === min) h = 0;
868
- else if (r === max) h = (g - b) / delta;
869
- else if (g === max) h = 2 + (b - r) / delta;
870
- else if (b === max) h = 4 + (r - g) / delta;
871
- h = Math.min(h * 60, 360);
872
- if (h < 0) h += 360;
873
- const l = (min + max) / 2;
874
- if (max === min) s = 0;
875
- else if (l <= .5) s = delta / (max + min);
876
- else s = delta / (2 - max - min);
877
- return [
878
- h,
879
- s * 100,
880
- l * 100
881
- ];
882
- };
883
- convert.rgb.hsv = function(rgb) {
884
- let rdif;
885
- let gdif;
886
- let bdif;
887
- let h;
888
- let s;
889
- const r = rgb[0] / 255;
890
- const g = rgb[1] / 255;
891
- const b = rgb[2] / 255;
892
- const v = Math.max(r, g, b);
893
- const diff = v - Math.min(r, g, b);
894
- const diffc = function(c) {
895
- return (v - c) / 6 / diff + 1 / 2;
896
- };
897
- if (diff === 0) {
898
- h = 0;
899
- s = 0;
900
- } else {
901
- s = diff / v;
902
- rdif = diffc(r);
903
- gdif = diffc(g);
904
- bdif = diffc(b);
905
- if (r === v) h = bdif - gdif;
906
- else if (g === v) h = 1 / 3 + rdif - bdif;
907
- else if (b === v) h = 2 / 3 + gdif - rdif;
908
- if (h < 0) h += 1;
909
- else if (h > 1) h -= 1;
910
- }
911
- return [
912
- h * 360,
913
- s * 100,
914
- v * 100
915
- ];
916
- };
917
- convert.rgb.hwb = function(rgb) {
918
- const r = rgb[0];
919
- const g = rgb[1];
920
- let b = rgb[2];
921
- const h = convert.rgb.hsl(rgb)[0];
922
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
923
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
924
- return [
925
- h,
926
- w * 100,
927
- b * 100
928
- ];
929
- };
930
- convert.rgb.cmyk = function(rgb) {
931
- const r = rgb[0] / 255;
932
- const g = rgb[1] / 255;
933
- const b = rgb[2] / 255;
934
- const k = Math.min(1 - r, 1 - g, 1 - b);
935
- const c = (1 - r - k) / (1 - k) || 0;
936
- const m = (1 - g - k) / (1 - k) || 0;
937
- const y = (1 - b - k) / (1 - k) || 0;
938
- return [
939
- c * 100,
940
- m * 100,
941
- y * 100,
942
- k * 100
943
- ];
944
- };
945
- function comparativeDistance(x, y) {
946
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
947
- }
948
- convert.rgb.keyword = function(rgb) {
949
- const reversed = reverseKeywords[rgb];
950
- if (reversed) return reversed;
951
- let currentClosestDistance = Infinity;
952
- let currentClosestKeyword;
953
- for (const keyword of Object.keys(cssKeywords)) {
954
- const value = cssKeywords[keyword];
955
- const distance = comparativeDistance(rgb, value);
956
- if (distance < currentClosestDistance) {
957
- currentClosestDistance = distance;
958
- currentClosestKeyword = keyword;
959
- }
960
- }
961
- return currentClosestKeyword;
962
- };
963
- convert.keyword.rgb = function(keyword) {
964
- return cssKeywords[keyword];
965
- };
966
- convert.rgb.xyz = function(rgb) {
967
- let r = rgb[0] / 255;
968
- let g = rgb[1] / 255;
969
- let b = rgb[2] / 255;
970
- r = r > .04045 ? ((r + .055) / 1.055) ** 2.4 : r / 12.92;
971
- g = g > .04045 ? ((g + .055) / 1.055) ** 2.4 : g / 12.92;
972
- b = b > .04045 ? ((b + .055) / 1.055) ** 2.4 : b / 12.92;
973
- const x = r * .4124 + g * .3576 + b * .1805;
974
- const y = r * .2126 + g * .7152 + b * .0722;
975
- const z = r * .0193 + g * .1192 + b * .9505;
976
- return [
977
- x * 100,
978
- y * 100,
979
- z * 100
980
- ];
981
- };
982
- convert.rgb.lab = function(rgb) {
983
- const xyz = convert.rgb.xyz(rgb);
984
- let x = xyz[0];
985
- let y = xyz[1];
986
- let z = xyz[2];
987
- x /= 95.047;
988
- y /= 100;
989
- z /= 108.883;
990
- x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
991
- y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
992
- z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
993
- return [
994
- 116 * y - 16,
995
- 500 * (x - y),
996
- 200 * (y - z)
997
- ];
998
- };
999
- convert.hsl.rgb = function(hsl) {
1000
- const h = hsl[0] / 360;
1001
- const s = hsl[1] / 100;
1002
- const l = hsl[2] / 100;
1003
- let t2;
1004
- let t3;
1005
- let val;
1006
- if (s === 0) {
1007
- val = l * 255;
1008
- return [
1009
- val,
1010
- val,
1011
- val
1012
- ];
1013
- }
1014
- if (l < .5) t2 = l * (1 + s);
1015
- else t2 = l + s - l * s;
1016
- const t1 = 2 * l - t2;
1017
- const rgb = [
1018
- 0,
1019
- 0,
1020
- 0
1021
- ];
1022
- for (let i = 0; i < 3; i++) {
1023
- t3 = h + 1 / 3 * -(i - 1);
1024
- if (t3 < 0) t3++;
1025
- if (t3 > 1) t3--;
1026
- if (6 * t3 < 1) val = t1 + (t2 - t1) * 6 * t3;
1027
- else if (2 * t3 < 1) val = t2;
1028
- else if (3 * t3 < 2) val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
1029
- else val = t1;
1030
- rgb[i] = val * 255;
1031
- }
1032
- return rgb;
1033
- };
1034
- convert.hsl.hsv = function(hsl) {
1035
- const h = hsl[0];
1036
- let s = hsl[1] / 100;
1037
- let l = hsl[2] / 100;
1038
- let smin = s;
1039
- const lmin = Math.max(l, .01);
1040
- l *= 2;
1041
- s *= l <= 1 ? l : 2 - l;
1042
- smin *= lmin <= 1 ? lmin : 2 - lmin;
1043
- const v = (l + s) / 2;
1044
- return [
1045
- h,
1046
- (l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s)) * 100,
1047
- v * 100
1048
- ];
1049
- };
1050
- convert.hsv.rgb = function(hsv) {
1051
- const h = hsv[0] / 60;
1052
- const s = hsv[1] / 100;
1053
- let v = hsv[2] / 100;
1054
- const hi = Math.floor(h) % 6;
1055
- const f = h - Math.floor(h);
1056
- const p = 255 * v * (1 - s);
1057
- const q = 255 * v * (1 - s * f);
1058
- const t = 255 * v * (1 - s * (1 - f));
1059
- v *= 255;
1060
- switch (hi) {
1061
- case 0: return [
1062
- v,
1063
- t,
1064
- p
1065
- ];
1066
- case 1: return [
1067
- q,
1068
- v,
1069
- p
1070
- ];
1071
- case 2: return [
1072
- p,
1073
- v,
1074
- t
1075
- ];
1076
- case 3: return [
1077
- p,
1078
- q,
1079
- v
1080
- ];
1081
- case 4: return [
1082
- t,
1083
- p,
1084
- v
1085
- ];
1086
- case 5: return [
1087
- v,
1088
- p,
1089
- q
1090
- ];
1091
- }
1092
- };
1093
- convert.hsv.hsl = function(hsv) {
1094
- const h = hsv[0];
1095
- const s = hsv[1] / 100;
1096
- const v = hsv[2] / 100;
1097
- const vmin = Math.max(v, .01);
1098
- let sl;
1099
- let l;
1100
- l = (2 - s) * v;
1101
- const lmin = (2 - s) * vmin;
1102
- sl = s * vmin;
1103
- sl /= lmin <= 1 ? lmin : 2 - lmin;
1104
- sl = sl || 0;
1105
- l /= 2;
1106
- return [
1107
- h,
1108
- sl * 100,
1109
- l * 100
1110
- ];
1111
- };
1112
- convert.hwb.rgb = function(hwb) {
1113
- const h = hwb[0] / 360;
1114
- let wh = hwb[1] / 100;
1115
- let bl = hwb[2] / 100;
1116
- const ratio = wh + bl;
1117
- let f;
1118
- if (ratio > 1) {
1119
- wh /= ratio;
1120
- bl /= ratio;
1121
- }
1122
- const i = Math.floor(6 * h);
1123
- const v = 1 - bl;
1124
- f = 6 * h - i;
1125
- if ((i & 1) !== 0) f = 1 - f;
1126
- const n = wh + f * (v - wh);
1127
- let r;
1128
- let g;
1129
- let b;
1130
- switch (i) {
1131
- default:
1132
- case 6:
1133
- case 0:
1134
- r = v;
1135
- g = n;
1136
- b = wh;
1137
- break;
1138
- case 1:
1139
- r = n;
1140
- g = v;
1141
- b = wh;
1142
- break;
1143
- case 2:
1144
- r = wh;
1145
- g = v;
1146
- b = n;
1147
- break;
1148
- case 3:
1149
- r = wh;
1150
- g = n;
1151
- b = v;
1152
- break;
1153
- case 4:
1154
- r = n;
1155
- g = wh;
1156
- b = v;
1157
- break;
1158
- case 5:
1159
- r = v;
1160
- g = wh;
1161
- b = n;
1162
- break;
1163
- }
1164
- return [
1165
- r * 255,
1166
- g * 255,
1167
- b * 255
1168
- ];
1169
- };
1170
- convert.cmyk.rgb = function(cmyk) {
1171
- const c = cmyk[0] / 100;
1172
- const m = cmyk[1] / 100;
1173
- const y = cmyk[2] / 100;
1174
- const k = cmyk[3] / 100;
1175
- const r = 1 - Math.min(1, c * (1 - k) + k);
1176
- const g = 1 - Math.min(1, m * (1 - k) + k);
1177
- const b = 1 - Math.min(1, y * (1 - k) + k);
1178
- return [
1179
- r * 255,
1180
- g * 255,
1181
- b * 255
1182
- ];
1183
- };
1184
- convert.xyz.rgb = function(xyz) {
1185
- const x = xyz[0] / 100;
1186
- const y = xyz[1] / 100;
1187
- const z = xyz[2] / 100;
1188
- let r;
1189
- let g;
1190
- let b;
1191
- r = x * 3.2406 + y * -1.5372 + z * -.4986;
1192
- g = x * -.9689 + y * 1.8758 + z * .0415;
1193
- b = x * .0557 + y * -.204 + z * 1.057;
1194
- r = r > .0031308 ? 1.055 * r ** (1 / 2.4) - .055 : r * 12.92;
1195
- g = g > .0031308 ? 1.055 * g ** (1 / 2.4) - .055 : g * 12.92;
1196
- b = b > .0031308 ? 1.055 * b ** (1 / 2.4) - .055 : b * 12.92;
1197
- r = Math.min(Math.max(0, r), 1);
1198
- g = Math.min(Math.max(0, g), 1);
1199
- b = Math.min(Math.max(0, b), 1);
1200
- return [
1201
- r * 255,
1202
- g * 255,
1203
- b * 255
1204
- ];
1205
- };
1206
- convert.xyz.lab = function(xyz) {
1207
- let x = xyz[0];
1208
- let y = xyz[1];
1209
- let z = xyz[2];
1210
- x /= 95.047;
1211
- y /= 100;
1212
- z /= 108.883;
1213
- x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1214
- y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1215
- z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1216
- return [
1217
- 116 * y - 16,
1218
- 500 * (x - y),
1219
- 200 * (y - z)
1220
- ];
1221
- };
1222
- convert.lab.xyz = function(lab) {
1223
- const l = lab[0];
1224
- const a = lab[1];
1225
- const b = lab[2];
1226
- let x;
1227
- let y;
1228
- let z;
1229
- y = (l + 16) / 116;
1230
- x = a / 500 + y;
1231
- z = y - b / 200;
1232
- const y2 = y ** 3;
1233
- const x2 = x ** 3;
1234
- const z2 = z ** 3;
1235
- y = y2 > .008856 ? y2 : (y - 16 / 116) / 7.787;
1236
- x = x2 > .008856 ? x2 : (x - 16 / 116) / 7.787;
1237
- z = z2 > .008856 ? z2 : (z - 16 / 116) / 7.787;
1238
- x *= 95.047;
1239
- y *= 100;
1240
- z *= 108.883;
1241
- return [
1242
- x,
1243
- y,
1244
- z
1245
- ];
1246
- };
1247
- convert.lab.lch = function(lab) {
1248
- const l = lab[0];
1249
- const a = lab[1];
1250
- const b = lab[2];
1251
- let h;
1252
- h = Math.atan2(b, a) * 360 / 2 / Math.PI;
1253
- if (h < 0) h += 360;
1254
- return [
1255
- l,
1256
- Math.sqrt(a * a + b * b),
1257
- h
1258
- ];
1259
- };
1260
- convert.lch.lab = function(lch) {
1261
- const l = lch[0];
1262
- const c = lch[1];
1263
- const hr = lch[2] / 360 * 2 * Math.PI;
1264
- return [
1265
- l,
1266
- c * Math.cos(hr),
1267
- c * Math.sin(hr)
1268
- ];
1269
- };
1270
- convert.rgb.ansi16 = function(args, saturation = null) {
1271
- const [r, g, b] = args;
1272
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
1273
- value = Math.round(value / 50);
1274
- if (value === 0) return 30;
1275
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
1276
- if (value === 2) ansi += 60;
1277
- return ansi;
1278
- };
1279
- convert.hsv.ansi16 = function(args) {
1280
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
1281
- };
1282
- convert.rgb.ansi256 = function(args) {
1283
- const r = args[0];
1284
- const g = args[1];
1285
- const b = args[2];
1286
- if (r === g && g === b) {
1287
- if (r < 8) return 16;
1288
- if (r > 248) return 231;
1289
- return Math.round((r - 8) / 247 * 24) + 232;
1290
- }
1291
- return 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
1292
- };
1293
- convert.ansi16.rgb = function(args) {
1294
- let color = args % 10;
1295
- if (color === 0 || color === 7) {
1296
- if (args > 50) color += 3.5;
1297
- color = color / 10.5 * 255;
1298
- return [
1299
- color,
1300
- color,
1301
- color
1302
- ];
1303
- }
1304
- const mult = (~~(args > 50) + 1) * .5;
1305
- return [
1306
- (color & 1) * mult * 255,
1307
- (color >> 1 & 1) * mult * 255,
1308
- (color >> 2 & 1) * mult * 255
1309
- ];
1310
- };
1311
- convert.ansi256.rgb = function(args) {
1312
- if (args >= 232) {
1313
- const c = (args - 232) * 10 + 8;
1314
- return [
1315
- c,
1316
- c,
1317
- c
1318
- ];
1319
- }
1320
- args -= 16;
1321
- let rem;
1322
- return [
1323
- Math.floor(args / 36) / 5 * 255,
1324
- Math.floor((rem = args % 36) / 6) / 5 * 255,
1325
- rem % 6 / 5 * 255
1326
- ];
1327
- };
1328
- convert.rgb.hex = function(args) {
1329
- const string = (((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255)).toString(16).toUpperCase();
1330
- return "000000".substring(string.length) + string;
1331
- };
1332
- convert.hex.rgb = function(args) {
1333
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
1334
- if (!match) return [
1335
- 0,
1336
- 0,
1337
- 0
1338
- ];
1339
- let colorString = match[0];
1340
- if (match[0].length === 3) colorString = colorString.split("").map((char) => {
1341
- return char + char;
1342
- }).join("");
1343
- const integer = parseInt(colorString, 16);
1344
- return [
1345
- integer >> 16 & 255,
1346
- integer >> 8 & 255,
1347
- integer & 255
1348
- ];
1349
- };
1350
- convert.rgb.hcg = function(rgb) {
1351
- const r = rgb[0] / 255;
1352
- const g = rgb[1] / 255;
1353
- const b = rgb[2] / 255;
1354
- const max = Math.max(Math.max(r, g), b);
1355
- const min = Math.min(Math.min(r, g), b);
1356
- const chroma = max - min;
1357
- let grayscale;
1358
- let hue;
1359
- if (chroma < 1) grayscale = min / (1 - chroma);
1360
- else grayscale = 0;
1361
- if (chroma <= 0) hue = 0;
1362
- else if (max === r) hue = (g - b) / chroma % 6;
1363
- else if (max === g) hue = 2 + (b - r) / chroma;
1364
- else hue = 4 + (r - g) / chroma;
1365
- hue /= 6;
1366
- hue %= 1;
1367
- return [
1368
- hue * 360,
1369
- chroma * 100,
1370
- grayscale * 100
1371
- ];
1372
- };
1373
- convert.hsl.hcg = function(hsl) {
1374
- const s = hsl[1] / 100;
1375
- const l = hsl[2] / 100;
1376
- const c = l < .5 ? 2 * s * l : 2 * s * (1 - l);
1377
- let f = 0;
1378
- if (c < 1) f = (l - .5 * c) / (1 - c);
1379
- return [
1380
- hsl[0],
1381
- c * 100,
1382
- f * 100
1383
- ];
1384
- };
1385
- convert.hsv.hcg = function(hsv) {
1386
- const s = hsv[1] / 100;
1387
- const v = hsv[2] / 100;
1388
- const c = s * v;
1389
- let f = 0;
1390
- if (c < 1) f = (v - c) / (1 - c);
1391
- return [
1392
- hsv[0],
1393
- c * 100,
1394
- f * 100
1395
- ];
1396
- };
1397
- convert.hcg.rgb = function(hcg) {
1398
- const h = hcg[0] / 360;
1399
- const c = hcg[1] / 100;
1400
- const g = hcg[2] / 100;
1401
- if (c === 0) return [
1402
- g * 255,
1403
- g * 255,
1404
- g * 255
1405
- ];
1406
- const pure = [
1407
- 0,
1408
- 0,
1409
- 0
1410
- ];
1411
- const hi = h % 1 * 6;
1412
- const v = hi % 1;
1413
- const w = 1 - v;
1414
- let mg = 0;
1415
- switch (Math.floor(hi)) {
1416
- case 0:
1417
- pure[0] = 1;
1418
- pure[1] = v;
1419
- pure[2] = 0;
1420
- break;
1421
- case 1:
1422
- pure[0] = w;
1423
- pure[1] = 1;
1424
- pure[2] = 0;
1425
- break;
1426
- case 2:
1427
- pure[0] = 0;
1428
- pure[1] = 1;
1429
- pure[2] = v;
1430
- break;
1431
- case 3:
1432
- pure[0] = 0;
1433
- pure[1] = w;
1434
- pure[2] = 1;
1435
- break;
1436
- case 4:
1437
- pure[0] = v;
1438
- pure[1] = 0;
1439
- pure[2] = 1;
1440
- break;
1441
- default:
1442
- pure[0] = 1;
1443
- pure[1] = 0;
1444
- pure[2] = w;
1445
- }
1446
- mg = (1 - c) * g;
1447
- return [
1448
- (c * pure[0] + mg) * 255,
1449
- (c * pure[1] + mg) * 255,
1450
- (c * pure[2] + mg) * 255
1451
- ];
1452
- };
1453
- convert.hcg.hsv = function(hcg) {
1454
- const c = hcg[1] / 100;
1455
- const v = c + hcg[2] / 100 * (1 - c);
1456
- let f = 0;
1457
- if (v > 0) f = c / v;
1458
- return [
1459
- hcg[0],
1460
- f * 100,
1461
- v * 100
1462
- ];
1463
- };
1464
- convert.hcg.hsl = function(hcg) {
1465
- const c = hcg[1] / 100;
1466
- const l = hcg[2] / 100 * (1 - c) + .5 * c;
1467
- let s = 0;
1468
- if (l > 0 && l < .5) s = c / (2 * l);
1469
- else if (l >= .5 && l < 1) s = c / (2 * (1 - l));
1470
- return [
1471
- hcg[0],
1472
- s * 100,
1473
- l * 100
1474
- ];
1475
- };
1476
- convert.hcg.hwb = function(hcg) {
1477
- const c = hcg[1] / 100;
1478
- const v = c + hcg[2] / 100 * (1 - c);
1479
- return [
1480
- hcg[0],
1481
- (v - c) * 100,
1482
- (1 - v) * 100
1483
- ];
1484
- };
1485
- convert.hwb.hcg = function(hwb) {
1486
- const w = hwb[1] / 100;
1487
- const v = 1 - hwb[2] / 100;
1488
- const c = v - w;
1489
- let g = 0;
1490
- if (c < 1) g = (v - c) / (1 - c);
1491
- return [
1492
- hwb[0],
1493
- c * 100,
1494
- g * 100
1495
- ];
1496
- };
1497
- convert.apple.rgb = function(apple) {
1498
- return [
1499
- apple[0] / 65535 * 255,
1500
- apple[1] / 65535 * 255,
1501
- apple[2] / 65535 * 255
1502
- ];
1503
- };
1504
- convert.rgb.apple = function(rgb) {
1505
- return [
1506
- rgb[0] / 255 * 65535,
1507
- rgb[1] / 255 * 65535,
1508
- rgb[2] / 255 * 65535
1509
- ];
1510
- };
1511
- convert.gray.rgb = function(args) {
1512
- return [
1513
- args[0] / 100 * 255,
1514
- args[0] / 100 * 255,
1515
- args[0] / 100 * 255
1516
- ];
1517
- };
1518
- convert.gray.hsl = function(args) {
1519
- return [
1520
- 0,
1521
- 0,
1522
- args[0]
1523
- ];
1524
- };
1525
- convert.gray.hsv = convert.gray.hsl;
1526
- convert.gray.hwb = function(gray) {
1527
- return [
1528
- 0,
1529
- 100,
1530
- gray[0]
1531
- ];
1532
- };
1533
- convert.gray.cmyk = function(gray) {
1534
- return [
1535
- 0,
1536
- 0,
1537
- 0,
1538
- gray[0]
1539
- ];
1540
- };
1541
- convert.gray.lab = function(gray) {
1542
- return [
1543
- gray[0],
1544
- 0,
1545
- 0
1546
- ];
1547
- };
1548
- convert.gray.hex = function(gray) {
1549
- const val = Math.round(gray[0] / 100 * 255) & 255;
1550
- const string = ((val << 16) + (val << 8) + val).toString(16).toUpperCase();
1551
- return "000000".substring(string.length) + string;
1552
- };
1553
- convert.rgb.gray = function(rgb) {
1554
- return [(rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100];
1555
- };
1556
- }));
1557
- //#endregion
1558
- //#region node_modules/color-convert/route.js
1559
- var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1560
- var conversions = require_conversions();
1561
- function buildGraph() {
1562
- const graph = {};
1563
- const models = Object.keys(conversions);
1564
- for (let len = models.length, i = 0; i < len; i++) graph[models[i]] = {
1565
- distance: -1,
1566
- parent: null
1567
- };
1568
- return graph;
1569
- }
1570
- function deriveBFS(fromModel) {
1571
- const graph = buildGraph();
1572
- const queue = [fromModel];
1573
- graph[fromModel].distance = 0;
1574
- while (queue.length) {
1575
- const current = queue.pop();
1576
- const adjacents = Object.keys(conversions[current]);
1577
- for (let len = adjacents.length, i = 0; i < len; i++) {
1578
- const adjacent = adjacents[i];
1579
- const node = graph[adjacent];
1580
- if (node.distance === -1) {
1581
- node.distance = graph[current].distance + 1;
1582
- node.parent = current;
1583
- queue.unshift(adjacent);
1584
- }
1585
- }
1586
- }
1587
- return graph;
1588
- }
1589
- function link(from, to) {
1590
- return function(args) {
1591
- return to(from(args));
1592
- };
1593
- }
1594
- function wrapConversion(toModel, graph) {
1595
- const path = [graph[toModel].parent, toModel];
1596
- let fn = conversions[graph[toModel].parent][toModel];
1597
- let cur = graph[toModel].parent;
1598
- while (graph[cur].parent) {
1599
- path.unshift(graph[cur].parent);
1600
- fn = link(conversions[graph[cur].parent][cur], fn);
1601
- cur = graph[cur].parent;
1602
- }
1603
- fn.conversion = path;
1604
- return fn;
1605
- }
1606
- module.exports = function(fromModel) {
1607
- const graph = deriveBFS(fromModel);
1608
- const conversion = {};
1609
- const models = Object.keys(graph);
1610
- for (let len = models.length, i = 0; i < len; i++) {
1611
- const toModel = models[i];
1612
- if (graph[toModel].parent === null) continue;
1613
- conversion[toModel] = wrapConversion(toModel, graph);
61
+ Object.keys(styles$1.modifier);
62
+ var foregroundColorNames = Object.keys(styles$1.color);
63
+ var backgroundColorNames = Object.keys(styles$1.bgColor);
64
+ [...foregroundColorNames, ...backgroundColorNames];
65
+ function assembleStyles() {
66
+ const codes = /* @__PURE__ */ new Map();
67
+ for (const [groupName, group] of Object.entries(styles$1)) {
68
+ for (const [styleName, style] of Object.entries(group)) {
69
+ styles$1[styleName] = {
70
+ open: `\u001B[${style[0]}m`,
71
+ close: `\u001B[${style[1]}m`
72
+ };
73
+ group[styleName] = styles$1[styleName];
74
+ codes.set(style[0], style[1]);
1614
75
  }
1615
- return conversion;
1616
- };
1617
- }));
1618
- //#endregion
1619
- //#region node_modules/color-convert/index.js
1620
- var require_color_convert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1621
- var conversions = require_conversions();
1622
- var route = require_route();
1623
- var convert = {};
1624
- var models = Object.keys(conversions);
1625
- function wrapRaw(fn) {
1626
- const wrappedFn = function(...args) {
1627
- const arg0 = args[0];
1628
- if (arg0 === void 0 || arg0 === null) return arg0;
1629
- if (arg0.length > 1) args = arg0;
1630
- return fn(args);
1631
- };
1632
- if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
1633
- return wrappedFn;
1634
- }
1635
- function wrapRounded(fn) {
1636
- const wrappedFn = function(...args) {
1637
- const arg0 = args[0];
1638
- if (arg0 === void 0 || arg0 === null) return arg0;
1639
- if (arg0.length > 1) args = arg0;
1640
- const result = fn(args);
1641
- if (typeof result === "object") for (let len = result.length, i = 0; i < len; i++) result[i] = Math.round(result[i]);
1642
- return result;
1643
- };
1644
- if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
1645
- return wrappedFn;
1646
- }
1647
- models.forEach((fromModel) => {
1648
- convert[fromModel] = {};
1649
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
1650
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
1651
- const routes = route(fromModel);
1652
- Object.keys(routes).forEach((toModel) => {
1653
- const fn = routes[toModel];
1654
- convert[fromModel][toModel] = wrapRounded(fn);
1655
- convert[fromModel][toModel].raw = wrapRaw(fn);
76
+ Object.defineProperty(styles$1, groupName, {
77
+ value: group,
78
+ enumerable: false
1656
79
  });
80
+ }
81
+ Object.defineProperty(styles$1, "codes", {
82
+ value: codes,
83
+ enumerable: false
1657
84
  });
1658
- module.exports = convert;
1659
- }));
1660
- //#endregion
1661
- //#region node_modules/ansi-styles/index.js
1662
- var require_ansi_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1663
- var wrapAnsi16 = (fn, offset) => (...args) => {
1664
- return `\u001B[${fn(...args) + offset}m`;
1665
- };
1666
- var wrapAnsi256 = (fn, offset) => (...args) => {
1667
- const code = fn(...args);
1668
- return `\u001B[${38 + offset};5;${code}m`;
1669
- };
1670
- var wrapAnsi16m = (fn, offset) => (...args) => {
1671
- const rgb = fn(...args);
1672
- return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1673
- };
1674
- var ansi2ansi = (n) => n;
1675
- var rgb2rgb = (r, g, b) => [
1676
- r,
1677
- g,
1678
- b
1679
- ];
1680
- var setLazyProperty = (object, property, get) => {
1681
- Object.defineProperty(object, property, {
1682
- get: () => {
1683
- const value = get();
1684
- Object.defineProperty(object, property, {
1685
- value,
1686
- enumerable: true,
1687
- configurable: true
1688
- });
1689
- return value;
85
+ styles$1.color.close = "\x1B[39m";
86
+ styles$1.bgColor.close = "\x1B[49m";
87
+ styles$1.color.ansi = wrapAnsi16();
88
+ styles$1.color.ansi256 = wrapAnsi256();
89
+ styles$1.color.ansi16m = wrapAnsi16m();
90
+ styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
91
+ styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
92
+ styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
93
+ Object.defineProperties(styles$1, {
94
+ rgbToAnsi256: {
95
+ value(red, green, blue) {
96
+ if (red === green && green === blue) {
97
+ if (red < 8) return 16;
98
+ if (red > 248) return 231;
99
+ return Math.round((red - 8) / 247 * 24) + 232;
100
+ }
101
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
1690
102
  },
1691
- enumerable: true,
1692
- configurable: true
1693
- });
1694
- };
1695
- /** @type {typeof import('color-convert')} */
1696
- var colorConvert;
1697
- var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
1698
- if (colorConvert === void 0) colorConvert = require_color_convert();
1699
- const offset = isBackground ? 10 : 0;
1700
- const styles = {};
1701
- for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
1702
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
1703
- if (sourceSpace === targetSpace) styles[name] = wrap(identity, offset);
1704
- else if (typeof suite === "object") styles[name] = wrap(suite[targetSpace], offset);
1705
- }
1706
- return styles;
1707
- };
1708
- function assembleStyles() {
1709
- const codes = /* @__PURE__ */ new Map();
1710
- const styles = {
1711
- modifier: {
1712
- reset: [0, 0],
1713
- bold: [1, 22],
1714
- dim: [2, 22],
1715
- italic: [3, 23],
1716
- underline: [4, 24],
1717
- inverse: [7, 27],
1718
- hidden: [8, 28],
1719
- strikethrough: [9, 29]
103
+ enumerable: false
104
+ },
105
+ hexToRgb: {
106
+ value(hex) {
107
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
108
+ if (!matches) return [
109
+ 0,
110
+ 0,
111
+ 0
112
+ ];
113
+ let [colorString] = matches;
114
+ if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
115
+ const integer = Number.parseInt(colorString, 16);
116
+ return [
117
+ integer >> 16 & 255,
118
+ integer >> 8 & 255,
119
+ integer & 255
120
+ ];
1720
121
  },
1721
- color: {
1722
- black: [30, 39],
1723
- red: [31, 39],
1724
- green: [32, 39],
1725
- yellow: [33, 39],
1726
- blue: [34, 39],
1727
- magenta: [35, 39],
1728
- cyan: [36, 39],
1729
- white: [37, 39],
1730
- blackBright: [90, 39],
1731
- redBright: [91, 39],
1732
- greenBright: [92, 39],
1733
- yellowBright: [93, 39],
1734
- blueBright: [94, 39],
1735
- magentaBright: [95, 39],
1736
- cyanBright: [96, 39],
1737
- whiteBright: [97, 39]
122
+ enumerable: false
123
+ },
124
+ hexToAnsi256: {
125
+ value: (hex) => styles$1.rgbToAnsi256(...styles$1.hexToRgb(hex)),
126
+ enumerable: false
127
+ },
128
+ ansi256ToAnsi: {
129
+ value(code) {
130
+ if (code < 8) return 30 + code;
131
+ if (code < 16) return 90 + (code - 8);
132
+ let red;
133
+ let green;
134
+ let blue;
135
+ if (code >= 232) {
136
+ red = ((code - 232) * 10 + 8) / 255;
137
+ green = red;
138
+ blue = red;
139
+ } else {
140
+ code -= 16;
141
+ const remainder = code % 36;
142
+ red = Math.floor(code / 36) / 5;
143
+ green = Math.floor(remainder / 6) / 5;
144
+ blue = remainder % 6 / 5;
145
+ }
146
+ const value = Math.max(red, green, blue) * 2;
147
+ if (value === 0) return 30;
148
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
149
+ if (value === 2) result += 60;
150
+ return result;
1738
151
  },
1739
- bgColor: {
1740
- bgBlack: [40, 49],
1741
- bgRed: [41, 49],
1742
- bgGreen: [42, 49],
1743
- bgYellow: [43, 49],
1744
- bgBlue: [44, 49],
1745
- bgMagenta: [45, 49],
1746
- bgCyan: [46, 49],
1747
- bgWhite: [47, 49],
1748
- bgBlackBright: [100, 49],
1749
- bgRedBright: [101, 49],
1750
- bgGreenBright: [102, 49],
1751
- bgYellowBright: [103, 49],
1752
- bgBlueBright: [104, 49],
1753
- bgMagentaBright: [105, 49],
1754
- bgCyanBright: [106, 49],
1755
- bgWhiteBright: [107, 49]
1756
- }
1757
- };
1758
- styles.color.gray = styles.color.blackBright;
1759
- styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
1760
- styles.color.grey = styles.color.blackBright;
1761
- styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
1762
- for (const [groupName, group] of Object.entries(styles)) {
1763
- for (const [styleName, style] of Object.entries(group)) {
1764
- styles[styleName] = {
1765
- open: `\u001B[${style[0]}m`,
1766
- close: `\u001B[${style[1]}m`
1767
- };
1768
- group[styleName] = styles[styleName];
1769
- codes.set(style[0], style[1]);
1770
- }
1771
- Object.defineProperty(styles, groupName, {
1772
- value: group,
1773
- enumerable: false
1774
- });
1775
- }
1776
- Object.defineProperty(styles, "codes", {
1777
- value: codes,
1778
152
  enumerable: false
1779
- });
1780
- styles.color.close = "\x1B[39m";
1781
- styles.bgColor.close = "\x1B[49m";
1782
- setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
1783
- setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
1784
- setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
1785
- setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
1786
- setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
1787
- setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
1788
- return styles;
1789
- }
1790
- Object.defineProperty(module, "exports", {
1791
- enumerable: true,
1792
- get: assembleStyles
153
+ },
154
+ rgbToAnsi: {
155
+ value: (red, green, blue) => styles$1.ansi256ToAnsi(styles$1.rgbToAnsi256(red, green, blue)),
156
+ enumerable: false
157
+ },
158
+ hexToAnsi: {
159
+ value: (hex) => styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex)),
160
+ enumerable: false
161
+ }
1793
162
  });
1794
- }));
163
+ return styles$1;
164
+ }
165
+ var ansiStyles = assembleStyles();
1795
166
  //#endregion
1796
- //#region node_modules/supports-color/browser.js
1797
- var require_browser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1798
- module.exports = {
1799
- stdout: false,
1800
- stderr: false
1801
- };
1802
- }));
167
+ //#region node_modules/chalk/source/vendor/supports-color/browser.js
168
+ var level = (() => {
169
+ if (!("navigator" in globalThis)) return 0;
170
+ if (globalThis.navigator.userAgentData) {
171
+ const brand = navigator.userAgentData.brands.find(({ brand }) => brand === "Chromium");
172
+ if (brand && brand.version > 93) return 3;
173
+ }
174
+ if (/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)) return 1;
175
+ return 0;
176
+ })();
177
+ var colorSupport = level !== 0 && {
178
+ level,
179
+ hasBasic: true,
180
+ has256: level >= 2,
181
+ has16m: level >= 3
182
+ };
183
+ var supportsColor = {
184
+ stdout: colorSupport,
185
+ stderr: colorSupport
186
+ };
1803
187
  //#endregion
1804
- //#region node_modules/chalk/source/util.js
1805
- var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1806
- var stringReplaceAll = (string, substring, replacer) => {
1807
- let index = string.indexOf(substring);
1808
- if (index === -1) return string;
1809
- const substringLength = substring.length;
1810
- let endIndex = 0;
1811
- let returnValue = "";
1812
- do {
1813
- returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
1814
- endIndex = index + substringLength;
1815
- index = string.indexOf(substring, endIndex);
1816
- } while (index !== -1);
1817
- returnValue += string.substr(endIndex);
1818
- return returnValue;
1819
- };
1820
- var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
1821
- let endIndex = 0;
1822
- let returnValue = "";
1823
- do {
1824
- const gotCR = string[index - 1] === "\r";
1825
- returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
1826
- endIndex = index + 1;
1827
- index = string.indexOf("\n", endIndex);
1828
- } while (index !== -1);
1829
- returnValue += string.substr(endIndex);
1830
- return returnValue;
1831
- };
1832
- module.exports = {
1833
- stringReplaceAll,
1834
- stringEncaseCRLFWithFirstIndex
1835
- };
1836
- }));
188
+ //#region node_modules/chalk/source/utilities.js
189
+ function stringReplaceAll(string, substring, replacer) {
190
+ let index = string.indexOf(substring);
191
+ if (index === -1) return string;
192
+ const substringLength = substring.length;
193
+ let endIndex = 0;
194
+ let returnValue = "";
195
+ do {
196
+ returnValue += string.slice(endIndex, index) + substring + replacer;
197
+ endIndex = index + substringLength;
198
+ index = string.indexOf(substring, endIndex);
199
+ } while (index !== -1);
200
+ returnValue += string.slice(endIndex);
201
+ return returnValue;
202
+ }
203
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
204
+ let endIndex = 0;
205
+ let returnValue = "";
206
+ do {
207
+ const gotCR = string[index - 1] === "\r";
208
+ returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
209
+ endIndex = index + 1;
210
+ index = string.indexOf("\n", endIndex);
211
+ } while (index !== -1);
212
+ returnValue += string.slice(endIndex);
213
+ return returnValue;
214
+ }
1837
215
  //#endregion
1838
- //#region node_modules/chalk/source/templates.js
1839
- var require_templates = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1840
- var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
1841
- var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
1842
- var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
1843
- var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
1844
- var ESCAPES = new Map([
1845
- ["n", "\n"],
1846
- ["r", "\r"],
1847
- ["t", " "],
1848
- ["b", "\b"],
1849
- ["f", "\f"],
1850
- ["v", "\v"],
1851
- ["0", "\0"],
1852
- ["\\", "\\"],
1853
- ["e", "\x1B"],
1854
- ["a", "\x07"]
1855
- ]);
1856
- function unescape(c) {
1857
- const u = c[0] === "u";
1858
- const bracket = c[1] === "{";
1859
- if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) return String.fromCharCode(parseInt(c.slice(1), 16));
1860
- if (u && bracket) return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
1861
- return ESCAPES.get(c) || c;
1862
- }
1863
- function parseArguments(name, arguments_) {
1864
- const results = [];
1865
- const chunks = arguments_.trim().split(/\s*,\s*/g);
1866
- let matches;
1867
- for (const chunk of chunks) {
1868
- const number = Number(chunk);
1869
- if (!Number.isNaN(number)) results.push(number);
1870
- else if (matches = chunk.match(STRING_REGEX)) results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
1871
- else throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
1872
- }
1873
- return results;
1874
- }
1875
- function parseStyle(style) {
1876
- STYLE_REGEX.lastIndex = 0;
1877
- const results = [];
1878
- let matches;
1879
- while ((matches = STYLE_REGEX.exec(style)) !== null) {
1880
- const name = matches[1];
1881
- if (matches[2]) {
1882
- const args = parseArguments(name, matches[2]);
1883
- results.push([name].concat(args));
1884
- } else results.push([name]);
1885
- }
1886
- return results;
1887
- }
1888
- function buildStyle(chalk, styles) {
1889
- const enabled = {};
1890
- for (const layer of styles) for (const style of layer.styles) enabled[style[0]] = layer.inverse ? null : style.slice(1);
1891
- let current = chalk;
1892
- for (const [styleName, styles] of Object.entries(enabled)) {
1893
- if (!Array.isArray(styles)) continue;
1894
- if (!(styleName in current)) throw new Error(`Unknown Chalk style: ${styleName}`);
1895
- current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
1896
- }
1897
- return current;
216
+ //#region node_modules/chalk/source/index.js
217
+ var { stdout: stdoutColor, stderr: stderrColor } = supportsColor;
218
+ var GENERATOR = Symbol("GENERATOR");
219
+ var STYLER = Symbol("STYLER");
220
+ var IS_EMPTY = Symbol("IS_EMPTY");
221
+ var levelMapping = [
222
+ "ansi",
223
+ "ansi",
224
+ "ansi256",
225
+ "ansi16m"
226
+ ];
227
+ var styles = Object.create(null);
228
+ var applyOptions = (object, options = {}) => {
229
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
230
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
231
+ object.level = options.level === void 0 ? colorLevel : options.level;
232
+ };
233
+ var chalkFactory = (options) => {
234
+ const chalk = (...strings) => strings.join(" ");
235
+ applyOptions(chalk, options);
236
+ Object.setPrototypeOf(chalk, createChalk.prototype);
237
+ return chalk;
238
+ };
239
+ function createChalk(options) {
240
+ return chalkFactory(options);
241
+ }
242
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
243
+ for (const [styleName, style] of Object.entries(ansiStyles)) styles[styleName] = { get() {
244
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
245
+ Object.defineProperty(this, styleName, { value: builder });
246
+ return builder;
247
+ } };
248
+ styles.visible = { get() {
249
+ const builder = createBuilder(this, this[STYLER], true);
250
+ Object.defineProperty(this, "visible", { value: builder });
251
+ return builder;
252
+ } };
253
+ var getModelAnsi = (model, level, type, ...arguments_) => {
254
+ if (model === "rgb") {
255
+ if (level === "ansi16m") return ansiStyles[type].ansi16m(...arguments_);
256
+ if (level === "ansi256") return ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));
257
+ return ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));
1898
258
  }
1899
- module.exports = (chalk, temporary) => {
1900
- const styles = [];
1901
- const chunks = [];
1902
- let chunk = [];
1903
- temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
1904
- if (escapeCharacter) chunk.push(unescape(escapeCharacter));
1905
- else if (style) {
1906
- const string = chunk.join("");
1907
- chunk = [];
1908
- chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
1909
- styles.push({
1910
- inverse,
1911
- styles: parseStyle(style)
1912
- });
1913
- } else if (close) {
1914
- if (styles.length === 0) throw new Error("Found extraneous } in Chalk template literal");
1915
- chunks.push(buildStyle(chalk, styles)(chunk.join("")));
1916
- chunk = [];
1917
- styles.pop();
1918
- } else chunk.push(character);
1919
- });
1920
- chunks.push(chunk.join(""));
1921
- if (styles.length > 0) {
1922
- const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
1923
- throw new Error(errMessage);
1924
- }
1925
- return chunks.join("");
1926
- };
1927
- }));
1928
- //#endregion
1929
- //#region src/stsconfig.ts
1930
- var import_source = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
1931
- var ansiStyles = require_ansi_styles();
1932
- var { stdout: stdoutColor, stderr: stderrColor } = require_browser();
1933
- var { stringReplaceAll, stringEncaseCRLFWithFirstIndex } = require_util();
1934
- var { isArray } = Array;
1935
- var levelMapping = [
1936
- "ansi",
1937
- "ansi",
1938
- "ansi256",
1939
- "ansi16m"
1940
- ];
1941
- var styles = Object.create(null);
1942
- var applyOptions = (object, options = {}) => {
1943
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
1944
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
1945
- object.level = options.level === void 0 ? colorLevel : options.level;
1946
- };
1947
- var ChalkClass = class {
1948
- constructor(options) {
1949
- return chalkFactory(options);
1950
- }
1951
- };
1952
- var chalkFactory = (options) => {
1953
- const chalk = {};
1954
- applyOptions(chalk, options);
1955
- chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
1956
- Object.setPrototypeOf(chalk, Chalk.prototype);
1957
- Object.setPrototypeOf(chalk.template, chalk);
1958
- chalk.template.constructor = () => {
1959
- throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
259
+ if (model === "hex") return getModelAnsi("rgb", level, type, ...ansiStyles.hexToRgb(...arguments_));
260
+ return ansiStyles[type][model](...arguments_);
261
+ };
262
+ for (const model of [
263
+ "rgb",
264
+ "hex",
265
+ "ansi256"
266
+ ]) {
267
+ styles[model] = { get() {
268
+ const { level } = this;
269
+ return function(...arguments_) {
270
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansiStyles.color.close, this[STYLER]);
271
+ return createBuilder(this, styler, this[IS_EMPTY]);
1960
272
  };
1961
- chalk.template.Instance = ChalkClass;
1962
- return chalk.template;
1963
- };
1964
- function Chalk(options) {
1965
- return chalkFactory(options);
1966
- }
1967
- for (const [styleName, style] of Object.entries(ansiStyles)) styles[styleName] = { get() {
1968
- const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
1969
- Object.defineProperty(this, styleName, { value: builder });
1970
- return builder;
1971
- } };
1972
- styles.visible = { get() {
1973
- const builder = createBuilder(this, this._styler, true);
1974
- Object.defineProperty(this, "visible", { value: builder });
1975
- return builder;
1976
273
  } };
1977
- var usedModels = [
1978
- "rgb",
1979
- "hex",
1980
- "keyword",
1981
- "hsl",
1982
- "hsv",
1983
- "hwb",
1984
- "ansi",
1985
- "ansi256"
1986
- ];
1987
- for (const model of usedModels) styles[model] = { get() {
274
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
275
+ styles[bgModel] = { get() {
1988
276
  const { level } = this;
1989
277
  return function(...arguments_) {
1990
- const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
1991
- return createBuilder(this, styler, this._isEmpty);
278
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansiStyles.bgColor.close, this[STYLER]);
279
+ return createBuilder(this, styler, this[IS_EMPTY]);
1992
280
  };
1993
281
  } };
1994
- for (const model of usedModels) {
1995
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
1996
- styles[bgModel] = { get() {
1997
- const { level } = this;
1998
- return function(...arguments_) {
1999
- const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
2000
- return createBuilder(this, styler, this._isEmpty);
2001
- };
2002
- } };
2003
- }
2004
- var proto = Object.defineProperties(() => {}, {
2005
- ...styles,
2006
- level: {
2007
- enumerable: true,
2008
- get() {
2009
- return this._generator.level;
2010
- },
2011
- set(level) {
2012
- this._generator.level = level;
2013
- }
2014
- }
2015
- });
2016
- var createStyler = (open, close, parent) => {
2017
- let openAll;
2018
- let closeAll;
2019
- if (parent === void 0) {
2020
- openAll = open;
2021
- closeAll = close;
2022
- } else {
2023
- openAll = parent.openAll + open;
2024
- closeAll = close + parent.closeAll;
2025
- }
2026
- return {
2027
- open,
2028
- close,
2029
- openAll,
2030
- closeAll,
2031
- parent
2032
- };
2033
- };
2034
- var createBuilder = (self, _styler, _isEmpty) => {
2035
- const builder = (...arguments_) => {
2036
- if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) return applyStyle(builder, chalkTag(builder, ...arguments_));
2037
- return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
2038
- };
2039
- Object.setPrototypeOf(builder, proto);
2040
- builder._generator = self;
2041
- builder._styler = _styler;
2042
- builder._isEmpty = _isEmpty;
2043
- return builder;
2044
- };
2045
- var applyStyle = (self, string) => {
2046
- if (self.level <= 0 || !string) return self._isEmpty ? "" : string;
2047
- let styler = self._styler;
2048
- if (styler === void 0) return string;
2049
- const { openAll, closeAll } = styler;
2050
- if (string.indexOf("\x1B") !== -1) while (styler !== void 0) {
2051
- string = stringReplaceAll(string, styler.close, styler.open);
2052
- styler = styler.parent;
282
+ }
283
+ var proto = Object.defineProperties(() => {}, {
284
+ ...styles,
285
+ level: {
286
+ enumerable: true,
287
+ get() {
288
+ return this[GENERATOR].level;
289
+ },
290
+ set(level) {
291
+ this[GENERATOR].level = level;
2053
292
  }
2054
- const lfIndex = string.indexOf("\n");
2055
- if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
2056
- return openAll + string + closeAll;
2057
- };
2058
- var template;
2059
- var chalkTag = (chalk, ...strings) => {
2060
- const [firstString] = strings;
2061
- if (!isArray(firstString) || !isArray(firstString.raw)) return strings.join(" ");
2062
- const arguments_ = strings.slice(1);
2063
- const parts = [firstString.raw[0]];
2064
- for (let i = 1; i < firstString.length; i++) parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i]));
2065
- if (template === void 0) template = require_templates();
2066
- return template(chalk, parts.join(""));
293
+ }
294
+ });
295
+ var createStyler = (open, close, parent) => {
296
+ let openAll;
297
+ let closeAll;
298
+ if (parent === void 0) {
299
+ openAll = open;
300
+ closeAll = close;
301
+ } else {
302
+ openAll = parent.openAll + open;
303
+ closeAll = close + parent.closeAll;
304
+ }
305
+ return {
306
+ open,
307
+ close,
308
+ openAll,
309
+ closeAll,
310
+ parent
2067
311
  };
2068
- Object.defineProperties(Chalk.prototype, styles);
2069
- var chalk = Chalk();
2070
- chalk.supportsColor = stdoutColor;
2071
- chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
2072
- chalk.stderr.supportsColor = stderrColor;
2073
- module.exports = chalk;
2074
- })))());
312
+ };
313
+ var createBuilder = (self, _styler, _isEmpty) => {
314
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
315
+ Object.setPrototypeOf(builder, proto);
316
+ builder[GENERATOR] = self;
317
+ builder[STYLER] = _styler;
318
+ builder[IS_EMPTY] = _isEmpty;
319
+ return builder;
320
+ };
321
+ var applyStyle = (self, string) => {
322
+ if (self.level <= 0 || !string) return self[IS_EMPTY] ? "" : string;
323
+ let styler = self[STYLER];
324
+ if (styler === void 0) return string;
325
+ const { openAll, closeAll } = styler;
326
+ if (string.includes("\x1B")) while (styler !== void 0) {
327
+ string = stringReplaceAll(string, styler.close, styler.open);
328
+ styler = styler.parent;
329
+ }
330
+ const lfIndex = string.indexOf("\n");
331
+ if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
332
+ return openAll + string + closeAll;
333
+ };
334
+ Object.defineProperties(createChalk.prototype, styles);
335
+ var chalk = createChalk();
336
+ createChalk({ level: stderrColor ? stderrColor.level : 0 });
337
+ //#endregion
338
+ //#region src/stsconfig.ts
2075
339
  var envOptions = {};
2076
340
  function SetupConfig(envOptions, logger) {
2077
341
  const envfile = process.env.STSENVFILE === void 0 ? "/.env" : process.env.STSENVFILE;
@@ -2245,10 +509,10 @@ function SetupConfig(envOptions, logger) {
2245
509
  try {
2246
510
  accessSync(passwordFile, constants.R_OK);
2247
511
  const data = readFileSync(passwordFile, "utf8");
2248
- if (logger) logger.debug(import_source.default.green(`Successfully loaded password file: [${passwordFile}]`));
512
+ if (logger) logger.debug(chalk.green(`Successfully loaded password file: [${passwordFile}]`));
2249
513
  return data;
2250
514
  } catch (err) {
2251
- if (logger) logger.debug(import_source.default.red(`Problem loading password file: [${passwordFile}], Error: [${err}]`));
515
+ if (logger) logger.debug(chalk.red(`Problem loading password file: [${passwordFile}], Error: [${err}]`));
2252
516
  return "";
2253
517
  }
2254
518
  };