@skuba-lib/api 0.0.0 → 0.1.0-skuba-lib-api-20250925042128

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