@nsshunt/stsrest01client 1.0.43 → 1.0.44

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
@@ -2,24 +2,24 @@ import { accessSync, constants, readFileSync } from "node:fs";
2
2
  import axios from "axios";
3
3
  import { STSAxiosConfig, Sleep } from "@nsshunt/stsutils";
4
4
  //#region \0rolldown/runtime.js
5
- var __create$1 = Object.create;
6
- var __defProp$1 = Object.defineProperty;
7
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
8
- var __getOwnPropNames$1 = Object.getOwnPropertyNames;
9
- var __getProtoOf$1 = Object.getPrototypeOf;
10
- var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
11
- var __commonJSMin$1 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
12
- var __copyProps$1 = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames$1(from), i = 0, n = keys.length, key; i < n; i++) {
5
+ var __create = Object.create;
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __getOwnPropNames = Object.getOwnPropertyNames;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
14
14
  key = keys[i];
15
- if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$1(to, key, {
15
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
16
  get: ((k) => from[k]).bind(null, key),
17
- enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
18
  });
19
19
  }
20
20
  return to;
21
21
  };
22
- var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create$1(__getProtoOf$1(mod)) : {}, __copyProps$1(isNodeMode || !mod || !mod.__esModule ? __defProp$1(target, "default", {
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
23
  value: mod,
24
24
  enumerable: true
25
25
  }) : target, mod));
@@ -29,12 +29,12 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
29
29
  });
30
30
  //#endregion
31
31
  //#region __vite-browser-external
32
- var require___vite_browser_external = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
32
+ var require___vite_browser_external = /* @__PURE__ */ __commonJSMin(((exports, module) => {
33
33
  module.exports = {};
34
34
  }));
35
35
  //#endregion
36
36
  //#region node_modules/@nsshunt/stsconfig/dist/index.mjs
37
- var import_main = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin$1(((exports, module) => {
37
+ var import_main = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
38
38
  var fs = require___vite_browser_external();
39
39
  var path = __require("path");
40
40
  var os = __require("os");
@@ -301,2059 +301,333 @@ var import_main = /* @__PURE__ */ __toESM$1((/* @__PURE__ */ __commonJSMin$1(((e
301
301
  module.exports.populate = DotenvModule.populate;
302
302
  module.exports = DotenvModule;
303
303
  })))(), 1);
304
- var __create = Object.create;
305
- var __defProp = Object.defineProperty;
306
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
307
- var __getOwnPropNames = Object.getOwnPropertyNames;
308
- var __getProtoOf = Object.getPrototypeOf;
309
- var __hasOwnProp = Object.prototype.hasOwnProperty;
310
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
311
- var __copyProps = (to, from, except, desc) => {
312
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
313
- key = keys[i];
314
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
315
- get: ((k) => from[k]).bind(null, key),
316
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
317
- });
304
+ var ANSI_BACKGROUND_OFFSET$1 = 10;
305
+ var wrapAnsi16$1 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
306
+ var wrapAnsi256$1 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
307
+ var wrapAnsi16m$1 = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
308
+ var styles$1$1 = {
309
+ modifier: {
310
+ reset: [0, 0],
311
+ bold: [1, 22],
312
+ dim: [2, 22],
313
+ italic: [3, 23],
314
+ underline: [4, 24],
315
+ overline: [53, 55],
316
+ inverse: [7, 27],
317
+ hidden: [8, 28],
318
+ strikethrough: [9, 29]
319
+ },
320
+ color: {
321
+ black: [30, 39],
322
+ red: [31, 39],
323
+ green: [32, 39],
324
+ yellow: [33, 39],
325
+ blue: [34, 39],
326
+ magenta: [35, 39],
327
+ cyan: [36, 39],
328
+ white: [37, 39],
329
+ blackBright: [90, 39],
330
+ gray: [90, 39],
331
+ grey: [90, 39],
332
+ redBright: [91, 39],
333
+ greenBright: [92, 39],
334
+ yellowBright: [93, 39],
335
+ blueBright: [94, 39],
336
+ magentaBright: [95, 39],
337
+ cyanBright: [96, 39],
338
+ whiteBright: [97, 39]
339
+ },
340
+ bgColor: {
341
+ bgBlack: [40, 49],
342
+ bgRed: [41, 49],
343
+ bgGreen: [42, 49],
344
+ bgYellow: [43, 49],
345
+ bgBlue: [44, 49],
346
+ bgMagenta: [45, 49],
347
+ bgCyan: [46, 49],
348
+ bgWhite: [47, 49],
349
+ bgBlackBright: [100, 49],
350
+ bgGray: [100, 49],
351
+ bgGrey: [100, 49],
352
+ bgRedBright: [101, 49],
353
+ bgGreenBright: [102, 49],
354
+ bgYellowBright: [103, 49],
355
+ bgBlueBright: [104, 49],
356
+ bgMagentaBright: [105, 49],
357
+ bgCyanBright: [106, 49],
358
+ bgWhiteBright: [107, 49]
318
359
  }
319
- return to;
320
360
  };
321
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
322
- value: mod,
323
- enumerable: true
324
- }) : target, mod));
325
- var require_color_name$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
326
- module.exports = {
327
- "aliceblue": [
328
- 240,
329
- 248,
330
- 255
331
- ],
332
- "antiquewhite": [
333
- 250,
334
- 235,
335
- 215
336
- ],
337
- "aqua": [
338
- 0,
339
- 255,
340
- 255
341
- ],
342
- "aquamarine": [
343
- 127,
344
- 255,
345
- 212
346
- ],
347
- "azure": [
348
- 240,
349
- 255,
350
- 255
351
- ],
352
- "beige": [
353
- 245,
354
- 245,
355
- 220
356
- ],
357
- "bisque": [
358
- 255,
359
- 228,
360
- 196
361
- ],
362
- "black": [
363
- 0,
364
- 0,
365
- 0
366
- ],
367
- "blanchedalmond": [
368
- 255,
369
- 235,
370
- 205
371
- ],
372
- "blue": [
373
- 0,
374
- 0,
375
- 255
376
- ],
377
- "blueviolet": [
378
- 138,
379
- 43,
380
- 226
381
- ],
382
- "brown": [
383
- 165,
384
- 42,
385
- 42
386
- ],
387
- "burlywood": [
388
- 222,
389
- 184,
390
- 135
391
- ],
392
- "cadetblue": [
393
- 95,
394
- 158,
395
- 160
396
- ],
397
- "chartreuse": [
398
- 127,
399
- 255,
400
- 0
401
- ],
402
- "chocolate": [
403
- 210,
404
- 105,
405
- 30
406
- ],
407
- "coral": [
408
- 255,
409
- 127,
410
- 80
411
- ],
412
- "cornflowerblue": [
413
- 100,
414
- 149,
415
- 237
416
- ],
417
- "cornsilk": [
418
- 255,
419
- 248,
420
- 220
421
- ],
422
- "crimson": [
423
- 220,
424
- 20,
425
- 60
426
- ],
427
- "cyan": [
428
- 0,
429
- 255,
430
- 255
431
- ],
432
- "darkblue": [
433
- 0,
434
- 0,
435
- 139
436
- ],
437
- "darkcyan": [
438
- 0,
439
- 139,
440
- 139
441
- ],
442
- "darkgoldenrod": [
443
- 184,
444
- 134,
445
- 11
446
- ],
447
- "darkgray": [
448
- 169,
449
- 169,
450
- 169
451
- ],
452
- "darkgreen": [
453
- 0,
454
- 100,
455
- 0
456
- ],
457
- "darkgrey": [
458
- 169,
459
- 169,
460
- 169
461
- ],
462
- "darkkhaki": [
463
- 189,
464
- 183,
465
- 107
466
- ],
467
- "darkmagenta": [
468
- 139,
469
- 0,
470
- 139
471
- ],
472
- "darkolivegreen": [
473
- 85,
474
- 107,
475
- 47
476
- ],
477
- "darkorange": [
478
- 255,
479
- 140,
480
- 0
481
- ],
482
- "darkorchid": [
483
- 153,
484
- 50,
485
- 204
486
- ],
487
- "darkred": [
488
- 139,
489
- 0,
490
- 0
491
- ],
492
- "darksalmon": [
493
- 233,
494
- 150,
495
- 122
496
- ],
497
- "darkseagreen": [
498
- 143,
499
- 188,
500
- 143
501
- ],
502
- "darkslateblue": [
503
- 72,
504
- 61,
505
- 139
506
- ],
507
- "darkslategray": [
508
- 47,
509
- 79,
510
- 79
511
- ],
512
- "darkslategrey": [
513
- 47,
514
- 79,
515
- 79
516
- ],
517
- "darkturquoise": [
518
- 0,
519
- 206,
520
- 209
521
- ],
522
- "darkviolet": [
523
- 148,
524
- 0,
525
- 211
526
- ],
527
- "deeppink": [
528
- 255,
529
- 20,
530
- 147
531
- ],
532
- "deepskyblue": [
533
- 0,
534
- 191,
535
- 255
536
- ],
537
- "dimgray": [
538
- 105,
539
- 105,
540
- 105
541
- ],
542
- "dimgrey": [
543
- 105,
544
- 105,
545
- 105
546
- ],
547
- "dodgerblue": [
548
- 30,
549
- 144,
550
- 255
551
- ],
552
- "firebrick": [
553
- 178,
554
- 34,
555
- 34
556
- ],
557
- "floralwhite": [
558
- 255,
559
- 250,
560
- 240
561
- ],
562
- "forestgreen": [
563
- 34,
564
- 139,
565
- 34
566
- ],
567
- "fuchsia": [
568
- 255,
569
- 0,
570
- 255
571
- ],
572
- "gainsboro": [
573
- 220,
574
- 220,
575
- 220
576
- ],
577
- "ghostwhite": [
578
- 248,
579
- 248,
580
- 255
581
- ],
582
- "gold": [
583
- 255,
584
- 215,
585
- 0
586
- ],
587
- "goldenrod": [
588
- 218,
589
- 165,
590
- 32
591
- ],
592
- "gray": [
593
- 128,
594
- 128,
595
- 128
596
- ],
597
- "green": [
598
- 0,
599
- 128,
600
- 0
601
- ],
602
- "greenyellow": [
603
- 173,
604
- 255,
605
- 47
606
- ],
607
- "grey": [
608
- 128,
609
- 128,
610
- 128
611
- ],
612
- "honeydew": [
613
- 240,
614
- 255,
615
- 240
616
- ],
617
- "hotpink": [
618
- 255,
619
- 105,
620
- 180
621
- ],
622
- "indianred": [
623
- 205,
624
- 92,
625
- 92
626
- ],
627
- "indigo": [
628
- 75,
629
- 0,
630
- 130
631
- ],
632
- "ivory": [
633
- 255,
634
- 255,
635
- 240
636
- ],
637
- "khaki": [
638
- 240,
639
- 230,
640
- 140
641
- ],
642
- "lavender": [
643
- 230,
644
- 230,
645
- 250
646
- ],
647
- "lavenderblush": [
648
- 255,
649
- 240,
650
- 245
651
- ],
652
- "lawngreen": [
653
- 124,
654
- 252,
655
- 0
656
- ],
657
- "lemonchiffon": [
658
- 255,
659
- 250,
660
- 205
661
- ],
662
- "lightblue": [
663
- 173,
664
- 216,
665
- 230
666
- ],
667
- "lightcoral": [
668
- 240,
669
- 128,
670
- 128
671
- ],
672
- "lightcyan": [
673
- 224,
674
- 255,
675
- 255
676
- ],
677
- "lightgoldenrodyellow": [
678
- 250,
679
- 250,
680
- 210
681
- ],
682
- "lightgray": [
683
- 211,
684
- 211,
685
- 211
686
- ],
687
- "lightgreen": [
688
- 144,
689
- 238,
690
- 144
691
- ],
692
- "lightgrey": [
693
- 211,
694
- 211,
695
- 211
696
- ],
697
- "lightpink": [
698
- 255,
699
- 182,
700
- 193
701
- ],
702
- "lightsalmon": [
703
- 255,
704
- 160,
705
- 122
706
- ],
707
- "lightseagreen": [
708
- 32,
709
- 178,
710
- 170
711
- ],
712
- "lightskyblue": [
713
- 135,
714
- 206,
715
- 250
716
- ],
717
- "lightslategray": [
718
- 119,
719
- 136,
720
- 153
721
- ],
722
- "lightslategrey": [
723
- 119,
724
- 136,
725
- 153
726
- ],
727
- "lightsteelblue": [
728
- 176,
729
- 196,
730
- 222
731
- ],
732
- "lightyellow": [
733
- 255,
734
- 255,
735
- 224
736
- ],
737
- "lime": [
738
- 0,
739
- 255,
740
- 0
741
- ],
742
- "limegreen": [
743
- 50,
744
- 205,
745
- 50
746
- ],
747
- "linen": [
748
- 250,
749
- 240,
750
- 230
751
- ],
752
- "magenta": [
753
- 255,
754
- 0,
755
- 255
756
- ],
757
- "maroon": [
758
- 128,
759
- 0,
760
- 0
761
- ],
762
- "mediumaquamarine": [
763
- 102,
764
- 205,
765
- 170
766
- ],
767
- "mediumblue": [
768
- 0,
769
- 0,
770
- 205
771
- ],
772
- "mediumorchid": [
773
- 186,
774
- 85,
775
- 211
776
- ],
777
- "mediumpurple": [
778
- 147,
779
- 112,
780
- 219
781
- ],
782
- "mediumseagreen": [
783
- 60,
784
- 179,
785
- 113
786
- ],
787
- "mediumslateblue": [
788
- 123,
789
- 104,
790
- 238
791
- ],
792
- "mediumspringgreen": [
793
- 0,
794
- 250,
795
- 154
796
- ],
797
- "mediumturquoise": [
798
- 72,
799
- 209,
800
- 204
801
- ],
802
- "mediumvioletred": [
803
- 199,
804
- 21,
805
- 133
806
- ],
807
- "midnightblue": [
808
- 25,
809
- 25,
810
- 112
811
- ],
812
- "mintcream": [
813
- 245,
814
- 255,
815
- 250
816
- ],
817
- "mistyrose": [
818
- 255,
819
- 228,
820
- 225
821
- ],
822
- "moccasin": [
823
- 255,
824
- 228,
825
- 181
826
- ],
827
- "navajowhite": [
828
- 255,
829
- 222,
830
- 173
831
- ],
832
- "navy": [
833
- 0,
834
- 0,
835
- 128
836
- ],
837
- "oldlace": [
838
- 253,
839
- 245,
840
- 230
841
- ],
842
- "olive": [
843
- 128,
844
- 128,
845
- 0
846
- ],
847
- "olivedrab": [
848
- 107,
849
- 142,
850
- 35
851
- ],
852
- "orange": [
853
- 255,
854
- 165,
855
- 0
856
- ],
857
- "orangered": [
858
- 255,
859
- 69,
860
- 0
861
- ],
862
- "orchid": [
863
- 218,
864
- 112,
865
- 214
866
- ],
867
- "palegoldenrod": [
868
- 238,
869
- 232,
870
- 170
871
- ],
872
- "palegreen": [
873
- 152,
874
- 251,
875
- 152
876
- ],
877
- "paleturquoise": [
878
- 175,
879
- 238,
880
- 238
881
- ],
882
- "palevioletred": [
883
- 219,
884
- 112,
885
- 147
886
- ],
887
- "papayawhip": [
888
- 255,
889
- 239,
890
- 213
891
- ],
892
- "peachpuff": [
893
- 255,
894
- 218,
895
- 185
896
- ],
897
- "peru": [
898
- 205,
899
- 133,
900
- 63
901
- ],
902
- "pink": [
903
- 255,
904
- 192,
905
- 203
906
- ],
907
- "plum": [
908
- 221,
909
- 160,
910
- 221
911
- ],
912
- "powderblue": [
913
- 176,
914
- 224,
915
- 230
916
- ],
917
- "purple": [
918
- 128,
919
- 0,
920
- 128
921
- ],
922
- "rebeccapurple": [
923
- 102,
924
- 51,
925
- 153
926
- ],
927
- "red": [
928
- 255,
929
- 0,
930
- 0
931
- ],
932
- "rosybrown": [
933
- 188,
934
- 143,
935
- 143
936
- ],
937
- "royalblue": [
938
- 65,
939
- 105,
940
- 225
941
- ],
942
- "saddlebrown": [
943
- 139,
944
- 69,
945
- 19
946
- ],
947
- "salmon": [
948
- 250,
949
- 128,
950
- 114
951
- ],
952
- "sandybrown": [
953
- 244,
954
- 164,
955
- 96
956
- ],
957
- "seagreen": [
958
- 46,
959
- 139,
960
- 87
961
- ],
962
- "seashell": [
963
- 255,
964
- 245,
965
- 238
966
- ],
967
- "sienna": [
968
- 160,
969
- 82,
970
- 45
971
- ],
972
- "silver": [
973
- 192,
974
- 192,
975
- 192
976
- ],
977
- "skyblue": [
978
- 135,
979
- 206,
980
- 235
981
- ],
982
- "slateblue": [
983
- 106,
984
- 90,
985
- 205
986
- ],
987
- "slategray": [
988
- 112,
989
- 128,
990
- 144
991
- ],
992
- "slategrey": [
993
- 112,
994
- 128,
995
- 144
996
- ],
997
- "snow": [
998
- 255,
999
- 250,
1000
- 250
1001
- ],
1002
- "springgreen": [
1003
- 0,
1004
- 255,
1005
- 127
1006
- ],
1007
- "steelblue": [
1008
- 70,
1009
- 130,
1010
- 180
1011
- ],
1012
- "tan": [
1013
- 210,
1014
- 180,
1015
- 140
1016
- ],
1017
- "teal": [
1018
- 0,
1019
- 128,
1020
- 128
1021
- ],
1022
- "thistle": [
1023
- 216,
1024
- 191,
1025
- 216
1026
- ],
1027
- "tomato": [
1028
- 255,
1029
- 99,
1030
- 71
1031
- ],
1032
- "turquoise": [
1033
- 64,
1034
- 224,
1035
- 208
1036
- ],
1037
- "violet": [
1038
- 238,
1039
- 130,
1040
- 238
1041
- ],
1042
- "wheat": [
1043
- 245,
1044
- 222,
1045
- 179
1046
- ],
1047
- "white": [
1048
- 255,
1049
- 255,
1050
- 255
1051
- ],
1052
- "whitesmoke": [
1053
- 245,
1054
- 245,
1055
- 245
1056
- ],
1057
- "yellow": [
1058
- 255,
1059
- 255,
1060
- 0
1061
- ],
1062
- "yellowgreen": [
1063
- 154,
1064
- 205,
1065
- 50
1066
- ]
1067
- };
1068
- }));
1069
- var require_conversions$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1070
- var cssKeywords = require_color_name$1();
1071
- var reverseKeywords = {};
1072
- for (const key of Object.keys(cssKeywords)) reverseKeywords[cssKeywords[key]] = key;
1073
- var convert = {
1074
- rgb: {
1075
- channels: 3,
1076
- labels: "rgb"
1077
- },
1078
- hsl: {
1079
- channels: 3,
1080
- labels: "hsl"
1081
- },
1082
- hsv: {
1083
- channels: 3,
1084
- labels: "hsv"
1085
- },
1086
- hwb: {
1087
- channels: 3,
1088
- labels: "hwb"
1089
- },
1090
- cmyk: {
1091
- channels: 4,
1092
- labels: "cmyk"
1093
- },
1094
- xyz: {
1095
- channels: 3,
1096
- labels: "xyz"
1097
- },
1098
- lab: {
1099
- channels: 3,
1100
- labels: "lab"
1101
- },
1102
- lch: {
1103
- channels: 3,
1104
- labels: "lch"
1105
- },
1106
- hex: {
1107
- channels: 1,
1108
- labels: ["hex"]
1109
- },
1110
- keyword: {
1111
- channels: 1,
1112
- labels: ["keyword"]
1113
- },
1114
- ansi16: {
1115
- channels: 1,
1116
- labels: ["ansi16"]
1117
- },
1118
- ansi256: {
1119
- channels: 1,
1120
- labels: ["ansi256"]
1121
- },
1122
- hcg: {
1123
- channels: 3,
1124
- labels: [
1125
- "h",
1126
- "c",
1127
- "g"
1128
- ]
1129
- },
1130
- apple: {
1131
- channels: 3,
1132
- labels: [
1133
- "r16",
1134
- "g16",
1135
- "b16"
1136
- ]
1137
- },
1138
- gray: {
1139
- channels: 1,
1140
- labels: ["gray"]
1141
- }
1142
- };
1143
- module.exports = convert;
1144
- for (const model of Object.keys(convert)) {
1145
- if (!("channels" in convert[model])) throw new Error("missing channels property: " + model);
1146
- if (!("labels" in convert[model])) throw new Error("missing channel labels property: " + model);
1147
- if (convert[model].labels.length !== convert[model].channels) throw new Error("channel and label counts mismatch: " + model);
1148
- const { channels, labels } = convert[model];
1149
- delete convert[model].channels;
1150
- delete convert[model].labels;
1151
- Object.defineProperty(convert[model], "channels", { value: channels });
1152
- Object.defineProperty(convert[model], "labels", { value: labels });
1153
- }
1154
- convert.rgb.hsl = function(rgb) {
1155
- const r = rgb[0] / 255;
1156
- const g = rgb[1] / 255;
1157
- const b = rgb[2] / 255;
1158
- const min = Math.min(r, g, b);
1159
- const max = Math.max(r, g, b);
1160
- const delta = max - min;
1161
- let h;
1162
- let s;
1163
- if (max === min) h = 0;
1164
- else if (r === max) h = (g - b) / delta;
1165
- else if (g === max) h = 2 + (b - r) / delta;
1166
- else if (b === max) h = 4 + (r - g) / delta;
1167
- h = Math.min(h * 60, 360);
1168
- if (h < 0) h += 360;
1169
- const l = (min + max) / 2;
1170
- if (max === min) s = 0;
1171
- else if (l <= .5) s = delta / (max + min);
1172
- else s = delta / (2 - max - min);
1173
- return [
1174
- h,
1175
- s * 100,
1176
- l * 100
1177
- ];
1178
- };
1179
- convert.rgb.hsv = function(rgb) {
1180
- let rdif;
1181
- let gdif;
1182
- let bdif;
1183
- let h;
1184
- let s;
1185
- const r = rgb[0] / 255;
1186
- const g = rgb[1] / 255;
1187
- const b = rgb[2] / 255;
1188
- const v = Math.max(r, g, b);
1189
- const diff = v - Math.min(r, g, b);
1190
- const diffc = function(c) {
1191
- return (v - c) / 6 / diff + 1 / 2;
1192
- };
1193
- if (diff === 0) {
1194
- h = 0;
1195
- s = 0;
1196
- } else {
1197
- s = diff / v;
1198
- rdif = diffc(r);
1199
- gdif = diffc(g);
1200
- bdif = diffc(b);
1201
- if (r === v) h = bdif - gdif;
1202
- else if (g === v) h = 1 / 3 + rdif - bdif;
1203
- else if (b === v) h = 2 / 3 + gdif - rdif;
1204
- if (h < 0) h += 1;
1205
- else if (h > 1) h -= 1;
1206
- }
1207
- return [
1208
- h * 360,
1209
- s * 100,
1210
- v * 100
1211
- ];
1212
- };
1213
- convert.rgb.hwb = function(rgb) {
1214
- const r = rgb[0];
1215
- const g = rgb[1];
1216
- let b = rgb[2];
1217
- const h = convert.rgb.hsl(rgb)[0];
1218
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
1219
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
1220
- return [
1221
- h,
1222
- w * 100,
1223
- b * 100
1224
- ];
1225
- };
1226
- convert.rgb.cmyk = function(rgb) {
1227
- const r = rgb[0] / 255;
1228
- const g = rgb[1] / 255;
1229
- const b = rgb[2] / 255;
1230
- const k = Math.min(1 - r, 1 - g, 1 - b);
1231
- const c = (1 - r - k) / (1 - k) || 0;
1232
- const m = (1 - g - k) / (1 - k) || 0;
1233
- const y = (1 - b - k) / (1 - k) || 0;
1234
- return [
1235
- c * 100,
1236
- m * 100,
1237
- y * 100,
1238
- k * 100
1239
- ];
1240
- };
1241
- function comparativeDistance(x, y) {
1242
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
1243
- }
1244
- convert.rgb.keyword = function(rgb) {
1245
- const reversed = reverseKeywords[rgb];
1246
- if (reversed) return reversed;
1247
- let currentClosestDistance = Infinity;
1248
- let currentClosestKeyword;
1249
- for (const keyword of Object.keys(cssKeywords)) {
1250
- const value = cssKeywords[keyword];
1251
- const distance = comparativeDistance(rgb, value);
1252
- if (distance < currentClosestDistance) {
1253
- currentClosestDistance = distance;
1254
- currentClosestKeyword = keyword;
1255
- }
1256
- }
1257
- return currentClosestKeyword;
1258
- };
1259
- convert.keyword.rgb = function(keyword) {
1260
- return cssKeywords[keyword];
1261
- };
1262
- convert.rgb.xyz = function(rgb) {
1263
- let r = rgb[0] / 255;
1264
- let g = rgb[1] / 255;
1265
- let b = rgb[2] / 255;
1266
- r = r > .04045 ? ((r + .055) / 1.055) ** 2.4 : r / 12.92;
1267
- g = g > .04045 ? ((g + .055) / 1.055) ** 2.4 : g / 12.92;
1268
- b = b > .04045 ? ((b + .055) / 1.055) ** 2.4 : b / 12.92;
1269
- const x = r * .4124 + g * .3576 + b * .1805;
1270
- const y = r * .2126 + g * .7152 + b * .0722;
1271
- const z = r * .0193 + g * .1192 + b * .9505;
1272
- return [
1273
- x * 100,
1274
- y * 100,
1275
- z * 100
1276
- ];
1277
- };
1278
- convert.rgb.lab = function(rgb) {
1279
- const xyz = convert.rgb.xyz(rgb);
1280
- let x = xyz[0];
1281
- let y = xyz[1];
1282
- let z = xyz[2];
1283
- x /= 95.047;
1284
- y /= 100;
1285
- z /= 108.883;
1286
- x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1287
- y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1288
- z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1289
- return [
1290
- 116 * y - 16,
1291
- 500 * (x - y),
1292
- 200 * (y - z)
1293
- ];
1294
- };
1295
- convert.hsl.rgb = function(hsl) {
1296
- const h = hsl[0] / 360;
1297
- const s = hsl[1] / 100;
1298
- const l = hsl[2] / 100;
1299
- let t2;
1300
- let t3;
1301
- let val;
1302
- if (s === 0) {
1303
- val = l * 255;
1304
- return [
1305
- val,
1306
- val,
1307
- val
1308
- ];
1309
- }
1310
- if (l < .5) t2 = l * (1 + s);
1311
- else t2 = l + s - l * s;
1312
- const t1 = 2 * l - t2;
1313
- const rgb = [
1314
- 0,
1315
- 0,
1316
- 0
1317
- ];
1318
- for (let i = 0; i < 3; i++) {
1319
- t3 = h + 1 / 3 * -(i - 1);
1320
- if (t3 < 0) t3++;
1321
- if (t3 > 1) t3--;
1322
- if (6 * t3 < 1) val = t1 + (t2 - t1) * 6 * t3;
1323
- else if (2 * t3 < 1) val = t2;
1324
- else if (3 * t3 < 2) val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
1325
- else val = t1;
1326
- rgb[i] = val * 255;
1327
- }
1328
- return rgb;
1329
- };
1330
- convert.hsl.hsv = function(hsl) {
1331
- const h = hsl[0];
1332
- let s = hsl[1] / 100;
1333
- let l = hsl[2] / 100;
1334
- let smin = s;
1335
- const lmin = Math.max(l, .01);
1336
- l *= 2;
1337
- s *= l <= 1 ? l : 2 - l;
1338
- smin *= lmin <= 1 ? lmin : 2 - lmin;
1339
- const v = (l + s) / 2;
1340
- return [
1341
- h,
1342
- (l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s)) * 100,
1343
- v * 100
1344
- ];
1345
- };
1346
- convert.hsv.rgb = function(hsv) {
1347
- const h = hsv[0] / 60;
1348
- const s = hsv[1] / 100;
1349
- let v = hsv[2] / 100;
1350
- const hi = Math.floor(h) % 6;
1351
- const f = h - Math.floor(h);
1352
- const p = 255 * v * (1 - s);
1353
- const q = 255 * v * (1 - s * f);
1354
- const t = 255 * v * (1 - s * (1 - f));
1355
- v *= 255;
1356
- switch (hi) {
1357
- case 0: return [
1358
- v,
1359
- t,
1360
- p
1361
- ];
1362
- case 1: return [
1363
- q,
1364
- v,
1365
- p
1366
- ];
1367
- case 2: return [
1368
- p,
1369
- v,
1370
- t
1371
- ];
1372
- case 3: return [
1373
- p,
1374
- q,
1375
- v
1376
- ];
1377
- case 4: return [
1378
- t,
1379
- p,
1380
- v
1381
- ];
1382
- case 5: return [
1383
- v,
1384
- p,
1385
- q
1386
- ];
1387
- }
1388
- };
1389
- convert.hsv.hsl = function(hsv) {
1390
- const h = hsv[0];
1391
- const s = hsv[1] / 100;
1392
- const v = hsv[2] / 100;
1393
- const vmin = Math.max(v, .01);
1394
- let sl;
1395
- let l;
1396
- l = (2 - s) * v;
1397
- const lmin = (2 - s) * vmin;
1398
- sl = s * vmin;
1399
- sl /= lmin <= 1 ? lmin : 2 - lmin;
1400
- sl = sl || 0;
1401
- l /= 2;
1402
- return [
1403
- h,
1404
- sl * 100,
1405
- l * 100
1406
- ];
1407
- };
1408
- convert.hwb.rgb = function(hwb) {
1409
- const h = hwb[0] / 360;
1410
- let wh = hwb[1] / 100;
1411
- let bl = hwb[2] / 100;
1412
- const ratio = wh + bl;
1413
- let f;
1414
- if (ratio > 1) {
1415
- wh /= ratio;
1416
- bl /= ratio;
1417
- }
1418
- const i = Math.floor(6 * h);
1419
- const v = 1 - bl;
1420
- f = 6 * h - i;
1421
- if ((i & 1) !== 0) f = 1 - f;
1422
- const n = wh + f * (v - wh);
1423
- let r;
1424
- let g;
1425
- let b;
1426
- switch (i) {
1427
- default:
1428
- case 6:
1429
- case 0:
1430
- r = v;
1431
- g = n;
1432
- b = wh;
1433
- break;
1434
- case 1:
1435
- r = n;
1436
- g = v;
1437
- b = wh;
1438
- break;
1439
- case 2:
1440
- r = wh;
1441
- g = v;
1442
- b = n;
1443
- break;
1444
- case 3:
1445
- r = wh;
1446
- g = n;
1447
- b = v;
1448
- break;
1449
- case 4:
1450
- r = n;
1451
- g = wh;
1452
- b = v;
1453
- break;
1454
- case 5:
1455
- r = v;
1456
- g = wh;
1457
- b = n;
1458
- break;
1459
- }
1460
- return [
1461
- r * 255,
1462
- g * 255,
1463
- b * 255
1464
- ];
1465
- };
1466
- convert.cmyk.rgb = function(cmyk) {
1467
- const c = cmyk[0] / 100;
1468
- const m = cmyk[1] / 100;
1469
- const y = cmyk[2] / 100;
1470
- const k = cmyk[3] / 100;
1471
- const r = 1 - Math.min(1, c * (1 - k) + k);
1472
- const g = 1 - Math.min(1, m * (1 - k) + k);
1473
- const b = 1 - Math.min(1, y * (1 - k) + k);
1474
- return [
1475
- r * 255,
1476
- g * 255,
1477
- b * 255
1478
- ];
1479
- };
1480
- convert.xyz.rgb = function(xyz) {
1481
- const x = xyz[0] / 100;
1482
- const y = xyz[1] / 100;
1483
- const z = xyz[2] / 100;
1484
- let r;
1485
- let g;
1486
- let b;
1487
- r = x * 3.2406 + y * -1.5372 + z * -.4986;
1488
- g = x * -.9689 + y * 1.8758 + z * .0415;
1489
- b = x * .0557 + y * -.204 + z * 1.057;
1490
- r = r > .0031308 ? 1.055 * r ** (1 / 2.4) - .055 : r * 12.92;
1491
- g = g > .0031308 ? 1.055 * g ** (1 / 2.4) - .055 : g * 12.92;
1492
- b = b > .0031308 ? 1.055 * b ** (1 / 2.4) - .055 : b * 12.92;
1493
- r = Math.min(Math.max(0, r), 1);
1494
- g = Math.min(Math.max(0, g), 1);
1495
- b = Math.min(Math.max(0, b), 1);
1496
- return [
1497
- r * 255,
1498
- g * 255,
1499
- b * 255
1500
- ];
1501
- };
1502
- convert.xyz.lab = function(xyz) {
1503
- let x = xyz[0];
1504
- let y = xyz[1];
1505
- let z = xyz[2];
1506
- x /= 95.047;
1507
- y /= 100;
1508
- z /= 108.883;
1509
- x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1510
- y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1511
- z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1512
- return [
1513
- 116 * y - 16,
1514
- 500 * (x - y),
1515
- 200 * (y - z)
1516
- ];
1517
- };
1518
- convert.lab.xyz = function(lab) {
1519
- const l = lab[0];
1520
- const a = lab[1];
1521
- const b = lab[2];
1522
- let x;
1523
- let y;
1524
- let z;
1525
- y = (l + 16) / 116;
1526
- x = a / 500 + y;
1527
- z = y - b / 200;
1528
- const y2 = y ** 3;
1529
- const x2 = x ** 3;
1530
- const z2 = z ** 3;
1531
- y = y2 > .008856 ? y2 : (y - 16 / 116) / 7.787;
1532
- x = x2 > .008856 ? x2 : (x - 16 / 116) / 7.787;
1533
- z = z2 > .008856 ? z2 : (z - 16 / 116) / 7.787;
1534
- x *= 95.047;
1535
- y *= 100;
1536
- z *= 108.883;
1537
- return [
1538
- x,
1539
- y,
1540
- z
1541
- ];
1542
- };
1543
- convert.lab.lch = function(lab) {
1544
- const l = lab[0];
1545
- const a = lab[1];
1546
- const b = lab[2];
1547
- let h;
1548
- h = Math.atan2(b, a) * 360 / 2 / Math.PI;
1549
- if (h < 0) h += 360;
1550
- return [
1551
- l,
1552
- Math.sqrt(a * a + b * b),
1553
- h
1554
- ];
1555
- };
1556
- convert.lch.lab = function(lch) {
1557
- const l = lch[0];
1558
- const c = lch[1];
1559
- const hr = lch[2] / 360 * 2 * Math.PI;
1560
- return [
1561
- l,
1562
- c * Math.cos(hr),
1563
- c * Math.sin(hr)
1564
- ];
1565
- };
1566
- convert.rgb.ansi16 = function(args, saturation = null) {
1567
- const [r, g, b] = args;
1568
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
1569
- value = Math.round(value / 50);
1570
- if (value === 0) return 30;
1571
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
1572
- if (value === 2) ansi += 60;
1573
- return ansi;
1574
- };
1575
- convert.hsv.ansi16 = function(args) {
1576
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
1577
- };
1578
- convert.rgb.ansi256 = function(args) {
1579
- const r = args[0];
1580
- const g = args[1];
1581
- const b = args[2];
1582
- if (r === g && g === b) {
1583
- if (r < 8) return 16;
1584
- if (r > 248) return 231;
1585
- return Math.round((r - 8) / 247 * 24) + 232;
1586
- }
1587
- return 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
1588
- };
1589
- convert.ansi16.rgb = function(args) {
1590
- let color = args % 10;
1591
- if (color === 0 || color === 7) {
1592
- if (args > 50) color += 3.5;
1593
- color = color / 10.5 * 255;
1594
- return [
1595
- color,
1596
- color,
1597
- color
1598
- ];
1599
- }
1600
- const mult = (~~(args > 50) + 1) * .5;
1601
- return [
1602
- (color & 1) * mult * 255,
1603
- (color >> 1 & 1) * mult * 255,
1604
- (color >> 2 & 1) * mult * 255
1605
- ];
1606
- };
1607
- convert.ansi256.rgb = function(args) {
1608
- if (args >= 232) {
1609
- const c = (args - 232) * 10 + 8;
1610
- return [
1611
- c,
1612
- c,
1613
- c
1614
- ];
1615
- }
1616
- args -= 16;
1617
- let rem;
1618
- return [
1619
- Math.floor(args / 36) / 5 * 255,
1620
- Math.floor((rem = args % 36) / 6) / 5 * 255,
1621
- rem % 6 / 5 * 255
1622
- ];
1623
- };
1624
- convert.rgb.hex = function(args) {
1625
- const string = (((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255)).toString(16).toUpperCase();
1626
- return "000000".substring(string.length) + string;
1627
- };
1628
- convert.hex.rgb = function(args) {
1629
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
1630
- if (!match) return [
1631
- 0,
1632
- 0,
1633
- 0
1634
- ];
1635
- let colorString = match[0];
1636
- if (match[0].length === 3) colorString = colorString.split("").map((char) => {
1637
- return char + char;
1638
- }).join("");
1639
- const integer = parseInt(colorString, 16);
1640
- return [
1641
- integer >> 16 & 255,
1642
- integer >> 8 & 255,
1643
- integer & 255
1644
- ];
1645
- };
1646
- convert.rgb.hcg = function(rgb) {
1647
- const r = rgb[0] / 255;
1648
- const g = rgb[1] / 255;
1649
- const b = rgb[2] / 255;
1650
- const max = Math.max(Math.max(r, g), b);
1651
- const min = Math.min(Math.min(r, g), b);
1652
- const chroma = max - min;
1653
- let grayscale;
1654
- let hue;
1655
- if (chroma < 1) grayscale = min / (1 - chroma);
1656
- else grayscale = 0;
1657
- if (chroma <= 0) hue = 0;
1658
- else if (max === r) hue = (g - b) / chroma % 6;
1659
- else if (max === g) hue = 2 + (b - r) / chroma;
1660
- else hue = 4 + (r - g) / chroma;
1661
- hue /= 6;
1662
- hue %= 1;
1663
- return [
1664
- hue * 360,
1665
- chroma * 100,
1666
- grayscale * 100
1667
- ];
1668
- };
1669
- convert.hsl.hcg = function(hsl) {
1670
- const s = hsl[1] / 100;
1671
- const l = hsl[2] / 100;
1672
- const c = l < .5 ? 2 * s * l : 2 * s * (1 - l);
1673
- let f = 0;
1674
- if (c < 1) f = (l - .5 * c) / (1 - c);
1675
- return [
1676
- hsl[0],
1677
- c * 100,
1678
- f * 100
1679
- ];
1680
- };
1681
- convert.hsv.hcg = function(hsv) {
1682
- const s = hsv[1] / 100;
1683
- const v = hsv[2] / 100;
1684
- const c = s * v;
1685
- let f = 0;
1686
- if (c < 1) f = (v - c) / (1 - c);
1687
- return [
1688
- hsv[0],
1689
- c * 100,
1690
- f * 100
1691
- ];
1692
- };
1693
- convert.hcg.rgb = function(hcg) {
1694
- const h = hcg[0] / 360;
1695
- const c = hcg[1] / 100;
1696
- const g = hcg[2] / 100;
1697
- if (c === 0) return [
1698
- g * 255,
1699
- g * 255,
1700
- g * 255
1701
- ];
1702
- const pure = [
1703
- 0,
1704
- 0,
1705
- 0
1706
- ];
1707
- const hi = h % 1 * 6;
1708
- const v = hi % 1;
1709
- const w = 1 - v;
1710
- let mg = 0;
1711
- switch (Math.floor(hi)) {
1712
- case 0:
1713
- pure[0] = 1;
1714
- pure[1] = v;
1715
- pure[2] = 0;
1716
- break;
1717
- case 1:
1718
- pure[0] = w;
1719
- pure[1] = 1;
1720
- pure[2] = 0;
1721
- break;
1722
- case 2:
1723
- pure[0] = 0;
1724
- pure[1] = 1;
1725
- pure[2] = v;
1726
- break;
1727
- case 3:
1728
- pure[0] = 0;
1729
- pure[1] = w;
1730
- pure[2] = 1;
1731
- break;
1732
- case 4:
1733
- pure[0] = v;
1734
- pure[1] = 0;
1735
- pure[2] = 1;
1736
- break;
1737
- default:
1738
- pure[0] = 1;
1739
- pure[1] = 0;
1740
- pure[2] = w;
1741
- }
1742
- mg = (1 - c) * g;
1743
- return [
1744
- (c * pure[0] + mg) * 255,
1745
- (c * pure[1] + mg) * 255,
1746
- (c * pure[2] + mg) * 255
1747
- ];
1748
- };
1749
- convert.hcg.hsv = function(hcg) {
1750
- const c = hcg[1] / 100;
1751
- const v = c + hcg[2] / 100 * (1 - c);
1752
- let f = 0;
1753
- if (v > 0) f = c / v;
1754
- return [
1755
- hcg[0],
1756
- f * 100,
1757
- v * 100
1758
- ];
1759
- };
1760
- convert.hcg.hsl = function(hcg) {
1761
- const c = hcg[1] / 100;
1762
- const l = hcg[2] / 100 * (1 - c) + .5 * c;
1763
- let s = 0;
1764
- if (l > 0 && l < .5) s = c / (2 * l);
1765
- else if (l >= .5 && l < 1) s = c / (2 * (1 - l));
1766
- return [
1767
- hcg[0],
1768
- s * 100,
1769
- l * 100
1770
- ];
1771
- };
1772
- convert.hcg.hwb = function(hcg) {
1773
- const c = hcg[1] / 100;
1774
- const v = c + hcg[2] / 100 * (1 - c);
1775
- return [
1776
- hcg[0],
1777
- (v - c) * 100,
1778
- (1 - v) * 100
1779
- ];
1780
- };
1781
- convert.hwb.hcg = function(hwb) {
1782
- const w = hwb[1] / 100;
1783
- const v = 1 - hwb[2] / 100;
1784
- const c = v - w;
1785
- let g = 0;
1786
- if (c < 1) g = (v - c) / (1 - c);
1787
- return [
1788
- hwb[0],
1789
- c * 100,
1790
- g * 100
1791
- ];
1792
- };
1793
- convert.apple.rgb = function(apple) {
1794
- return [
1795
- apple[0] / 65535 * 255,
1796
- apple[1] / 65535 * 255,
1797
- apple[2] / 65535 * 255
1798
- ];
1799
- };
1800
- convert.rgb.apple = function(rgb) {
1801
- return [
1802
- rgb[0] / 255 * 65535,
1803
- rgb[1] / 255 * 65535,
1804
- rgb[2] / 255 * 65535
1805
- ];
1806
- };
1807
- convert.gray.rgb = function(args) {
1808
- return [
1809
- args[0] / 100 * 255,
1810
- args[0] / 100 * 255,
1811
- args[0] / 100 * 255
1812
- ];
1813
- };
1814
- convert.gray.hsl = function(args) {
1815
- return [
1816
- 0,
1817
- 0,
1818
- args[0]
1819
- ];
1820
- };
1821
- convert.gray.hsv = convert.gray.hsl;
1822
- convert.gray.hwb = function(gray) {
1823
- return [
1824
- 0,
1825
- 100,
1826
- gray[0]
1827
- ];
1828
- };
1829
- convert.gray.cmyk = function(gray) {
1830
- return [
1831
- 0,
1832
- 0,
1833
- 0,
1834
- gray[0]
1835
- ];
1836
- };
1837
- convert.gray.lab = function(gray) {
1838
- return [
1839
- gray[0],
1840
- 0,
1841
- 0
1842
- ];
1843
- };
1844
- convert.gray.hex = function(gray) {
1845
- const val = Math.round(gray[0] / 100 * 255) & 255;
1846
- const string = ((val << 16) + (val << 8) + val).toString(16).toUpperCase();
1847
- return "000000".substring(string.length) + string;
1848
- };
1849
- convert.rgb.gray = function(rgb) {
1850
- return [(rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100];
1851
- };
1852
- }));
1853
- var require_route$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1854
- var conversions = require_conversions$1();
1855
- function buildGraph() {
1856
- const graph = {};
1857
- const models = Object.keys(conversions);
1858
- for (let len = models.length, i = 0; i < len; i++) graph[models[i]] = {
1859
- distance: -1,
1860
- parent: null
1861
- };
1862
- return graph;
1863
- }
1864
- function deriveBFS(fromModel) {
1865
- const graph = buildGraph();
1866
- const queue = [fromModel];
1867
- graph[fromModel].distance = 0;
1868
- while (queue.length) {
1869
- const current = queue.pop();
1870
- const adjacents = Object.keys(conversions[current]);
1871
- for (let len = adjacents.length, i = 0; i < len; i++) {
1872
- const adjacent = adjacents[i];
1873
- const node = graph[adjacent];
1874
- if (node.distance === -1) {
1875
- node.distance = graph[current].distance + 1;
1876
- node.parent = current;
1877
- queue.unshift(adjacent);
1878
- }
1879
- }
1880
- }
1881
- return graph;
1882
- }
1883
- function link(from, to) {
1884
- return function(args) {
1885
- return to(from(args));
1886
- };
1887
- }
1888
- function wrapConversion(toModel, graph) {
1889
- const path = [graph[toModel].parent, toModel];
1890
- let fn = conversions[graph[toModel].parent][toModel];
1891
- let cur = graph[toModel].parent;
1892
- while (graph[cur].parent) {
1893
- path.unshift(graph[cur].parent);
1894
- fn = link(conversions[graph[cur].parent][cur], fn);
1895
- cur = graph[cur].parent;
1896
- }
1897
- fn.conversion = path;
1898
- return fn;
1899
- }
1900
- module.exports = function(fromModel) {
1901
- const graph = deriveBFS(fromModel);
1902
- const conversion = {};
1903
- const models = Object.keys(graph);
1904
- for (let len = models.length, i = 0; i < len; i++) {
1905
- const toModel = models[i];
1906
- if (graph[toModel].parent === null) continue;
1907
- conversion[toModel] = wrapConversion(toModel, graph);
361
+ Object.keys(styles$1$1.modifier);
362
+ var foregroundColorNames$1 = Object.keys(styles$1$1.color);
363
+ var backgroundColorNames$1 = Object.keys(styles$1$1.bgColor);
364
+ [...foregroundColorNames$1, ...backgroundColorNames$1];
365
+ function assembleStyles$1() {
366
+ const codes = /* @__PURE__ */ new Map();
367
+ for (const [groupName, group] of Object.entries(styles$1$1)) {
368
+ for (const [styleName, style] of Object.entries(group)) {
369
+ styles$1$1[styleName] = {
370
+ open: `\u001B[${style[0]}m`,
371
+ close: `\u001B[${style[1]}m`
372
+ };
373
+ group[styleName] = styles$1$1[styleName];
374
+ codes.set(style[0], style[1]);
1908
375
  }
1909
- return conversion;
1910
- };
1911
- }));
1912
- var require_color_convert$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1913
- var conversions = require_conversions$1();
1914
- var route = require_route$1();
1915
- var convert = {};
1916
- var models = Object.keys(conversions);
1917
- function wrapRaw(fn) {
1918
- const wrappedFn = function(...args) {
1919
- const arg0 = args[0];
1920
- if (arg0 === void 0 || arg0 === null) return arg0;
1921
- if (arg0.length > 1) args = arg0;
1922
- return fn(args);
1923
- };
1924
- if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
1925
- return wrappedFn;
1926
- }
1927
- function wrapRounded(fn) {
1928
- const wrappedFn = function(...args) {
1929
- const arg0 = args[0];
1930
- if (arg0 === void 0 || arg0 === null) return arg0;
1931
- if (arg0.length > 1) args = arg0;
1932
- const result = fn(args);
1933
- if (typeof result === "object") for (let len = result.length, i = 0; i < len; i++) result[i] = Math.round(result[i]);
1934
- return result;
1935
- };
1936
- if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
1937
- return wrappedFn;
1938
- }
1939
- models.forEach((fromModel) => {
1940
- convert[fromModel] = {};
1941
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
1942
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
1943
- const routes = route(fromModel);
1944
- Object.keys(routes).forEach((toModel) => {
1945
- const fn = routes[toModel];
1946
- convert[fromModel][toModel] = wrapRounded(fn);
1947
- convert[fromModel][toModel].raw = wrapRaw(fn);
376
+ Object.defineProperty(styles$1$1, groupName, {
377
+ value: group,
378
+ enumerable: false
1948
379
  });
380
+ }
381
+ Object.defineProperty(styles$1$1, "codes", {
382
+ value: codes,
383
+ enumerable: false
1949
384
  });
1950
- module.exports = convert;
1951
- }));
1952
- var require_ansi_styles$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1953
- var wrapAnsi16 = (fn, offset) => (...args) => {
1954
- return `\u001B[${fn(...args) + offset}m`;
1955
- };
1956
- var wrapAnsi256 = (fn, offset) => (...args) => {
1957
- const code = fn(...args);
1958
- return `\u001B[${38 + offset};5;${code}m`;
1959
- };
1960
- var wrapAnsi16m = (fn, offset) => (...args) => {
1961
- const rgb = fn(...args);
1962
- return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
1963
- };
1964
- var ansi2ansi = (n) => n;
1965
- var rgb2rgb = (r, g, b) => [
1966
- r,
1967
- g,
1968
- b
1969
- ];
1970
- var setLazyProperty = (object, property, get) => {
1971
- Object.defineProperty(object, property, {
1972
- get: () => {
1973
- const value = get();
1974
- Object.defineProperty(object, property, {
1975
- value,
1976
- enumerable: true,
1977
- configurable: true
1978
- });
1979
- return value;
385
+ styles$1$1.color.close = "\x1B[39m";
386
+ styles$1$1.bgColor.close = "\x1B[49m";
387
+ styles$1$1.color.ansi = wrapAnsi16$1();
388
+ styles$1$1.color.ansi256 = wrapAnsi256$1();
389
+ styles$1$1.color.ansi16m = wrapAnsi16m$1();
390
+ styles$1$1.bgColor.ansi = wrapAnsi16$1(ANSI_BACKGROUND_OFFSET$1);
391
+ styles$1$1.bgColor.ansi256 = wrapAnsi256$1(ANSI_BACKGROUND_OFFSET$1);
392
+ styles$1$1.bgColor.ansi16m = wrapAnsi16m$1(ANSI_BACKGROUND_OFFSET$1);
393
+ Object.defineProperties(styles$1$1, {
394
+ rgbToAnsi256: {
395
+ value(red, green, blue) {
396
+ if (red === green && green === blue) {
397
+ if (red < 8) return 16;
398
+ if (red > 248) return 231;
399
+ return Math.round((red - 8) / 247 * 24) + 232;
400
+ }
401
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
1980
402
  },
1981
- enumerable: true,
1982
- configurable: true
1983
- });
1984
- };
1985
- /** @type {typeof import('color-convert')} */
1986
- var colorConvert;
1987
- var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
1988
- if (colorConvert === void 0) colorConvert = require_color_convert$1();
1989
- const offset = isBackground ? 10 : 0;
1990
- const styles = {};
1991
- for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
1992
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
1993
- if (sourceSpace === targetSpace) styles[name] = wrap(identity, offset);
1994
- else if (typeof suite === "object") styles[name] = wrap(suite[targetSpace], offset);
1995
- }
1996
- return styles;
1997
- };
1998
- function assembleStyles() {
1999
- const codes = /* @__PURE__ */ new Map();
2000
- const styles = {
2001
- modifier: {
2002
- reset: [0, 0],
2003
- bold: [1, 22],
2004
- dim: [2, 22],
2005
- italic: [3, 23],
2006
- underline: [4, 24],
2007
- inverse: [7, 27],
2008
- hidden: [8, 28],
2009
- strikethrough: [9, 29]
403
+ enumerable: false
404
+ },
405
+ hexToRgb: {
406
+ value(hex) {
407
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
408
+ if (!matches) return [
409
+ 0,
410
+ 0,
411
+ 0
412
+ ];
413
+ let [colorString] = matches;
414
+ if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
415
+ const integer = Number.parseInt(colorString, 16);
416
+ return [
417
+ integer >> 16 & 255,
418
+ integer >> 8 & 255,
419
+ integer & 255
420
+ ];
2010
421
  },
2011
- color: {
2012
- black: [30, 39],
2013
- red: [31, 39],
2014
- green: [32, 39],
2015
- yellow: [33, 39],
2016
- blue: [34, 39],
2017
- magenta: [35, 39],
2018
- cyan: [36, 39],
2019
- white: [37, 39],
2020
- blackBright: [90, 39],
2021
- redBright: [91, 39],
2022
- greenBright: [92, 39],
2023
- yellowBright: [93, 39],
2024
- blueBright: [94, 39],
2025
- magentaBright: [95, 39],
2026
- cyanBright: [96, 39],
2027
- whiteBright: [97, 39]
422
+ enumerable: false
423
+ },
424
+ hexToAnsi256: {
425
+ value: (hex) => styles$1$1.rgbToAnsi256(...styles$1$1.hexToRgb(hex)),
426
+ enumerable: false
427
+ },
428
+ ansi256ToAnsi: {
429
+ value(code) {
430
+ if (code < 8) return 30 + code;
431
+ if (code < 16) return 90 + (code - 8);
432
+ let red;
433
+ let green;
434
+ let blue;
435
+ if (code >= 232) {
436
+ red = ((code - 232) * 10 + 8) / 255;
437
+ green = red;
438
+ blue = red;
439
+ } else {
440
+ code -= 16;
441
+ const remainder = code % 36;
442
+ red = Math.floor(code / 36) / 5;
443
+ green = Math.floor(remainder / 6) / 5;
444
+ blue = remainder % 6 / 5;
445
+ }
446
+ const value = Math.max(red, green, blue) * 2;
447
+ if (value === 0) return 30;
448
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
449
+ if (value === 2) result += 60;
450
+ return result;
2028
451
  },
2029
- bgColor: {
2030
- bgBlack: [40, 49],
2031
- bgRed: [41, 49],
2032
- bgGreen: [42, 49],
2033
- bgYellow: [43, 49],
2034
- bgBlue: [44, 49],
2035
- bgMagenta: [45, 49],
2036
- bgCyan: [46, 49],
2037
- bgWhite: [47, 49],
2038
- bgBlackBright: [100, 49],
2039
- bgRedBright: [101, 49],
2040
- bgGreenBright: [102, 49],
2041
- bgYellowBright: [103, 49],
2042
- bgBlueBright: [104, 49],
2043
- bgMagentaBright: [105, 49],
2044
- bgCyanBright: [106, 49],
2045
- bgWhiteBright: [107, 49]
2046
- }
2047
- };
2048
- styles.color.gray = styles.color.blackBright;
2049
- styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
2050
- styles.color.grey = styles.color.blackBright;
2051
- styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
2052
- for (const [groupName, group] of Object.entries(styles)) {
2053
- for (const [styleName, style] of Object.entries(group)) {
2054
- styles[styleName] = {
2055
- open: `\u001B[${style[0]}m`,
2056
- close: `\u001B[${style[1]}m`
2057
- };
2058
- group[styleName] = styles[styleName];
2059
- codes.set(style[0], style[1]);
2060
- }
2061
- Object.defineProperty(styles, groupName, {
2062
- value: group,
2063
- enumerable: false
2064
- });
2065
- }
2066
- Object.defineProperty(styles, "codes", {
2067
- value: codes,
2068
452
  enumerable: false
2069
- });
2070
- styles.color.close = "\x1B[39m";
2071
- styles.bgColor.close = "\x1B[49m";
2072
- setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
2073
- setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
2074
- setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
2075
- setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
2076
- setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
2077
- setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
2078
- return styles;
2079
- }
2080
- Object.defineProperty(module, "exports", {
2081
- enumerable: true,
2082
- get: assembleStyles
2083
- });
2084
- }));
2085
- var require_browser$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2086
- module.exports = {
2087
- stdout: false,
2088
- stderr: false
2089
- };
2090
- }));
2091
- var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2092
- var stringReplaceAll = (string, substring, replacer) => {
2093
- let index = string.indexOf(substring);
2094
- if (index === -1) return string;
2095
- const substringLength = substring.length;
2096
- let endIndex = 0;
2097
- let returnValue = "";
2098
- do {
2099
- returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
2100
- endIndex = index + substringLength;
2101
- index = string.indexOf(substring, endIndex);
2102
- } while (index !== -1);
2103
- returnValue += string.substr(endIndex);
2104
- return returnValue;
2105
- };
2106
- var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
2107
- let endIndex = 0;
2108
- let returnValue = "";
2109
- do {
2110
- const gotCR = string[index - 1] === "\r";
2111
- returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
2112
- endIndex = index + 1;
2113
- index = string.indexOf("\n", endIndex);
2114
- } while (index !== -1);
2115
- returnValue += string.substr(endIndex);
2116
- return returnValue;
2117
- };
2118
- module.exports = {
2119
- stringReplaceAll,
2120
- stringEncaseCRLFWithFirstIndex
2121
- };
2122
- }));
2123
- var require_templates$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2124
- 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;
2125
- var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
2126
- var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
2127
- var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
2128
- var ESCAPES = new Map([
2129
- ["n", "\n"],
2130
- ["r", "\r"],
2131
- ["t", " "],
2132
- ["b", "\b"],
2133
- ["f", "\f"],
2134
- ["v", "\v"],
2135
- ["0", "\0"],
2136
- ["\\", "\\"],
2137
- ["e", "\x1B"],
2138
- ["a", "\x07"]
2139
- ]);
2140
- function unescape(c) {
2141
- const u = c[0] === "u";
2142
- const bracket = c[1] === "{";
2143
- if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) return String.fromCharCode(parseInt(c.slice(1), 16));
2144
- if (u && bracket) return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
2145
- return ESCAPES.get(c) || c;
2146
- }
2147
- function parseArguments(name, arguments_) {
2148
- const results = [];
2149
- const chunks = arguments_.trim().split(/\s*,\s*/g);
2150
- let matches;
2151
- for (const chunk of chunks) {
2152
- const number = Number(chunk);
2153
- if (!Number.isNaN(number)) results.push(number);
2154
- else if (matches = chunk.match(STRING_REGEX)) results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
2155
- else throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
2156
- }
2157
- return results;
2158
- }
2159
- function parseStyle(style) {
2160
- STYLE_REGEX.lastIndex = 0;
2161
- const results = [];
2162
- let matches;
2163
- while ((matches = STYLE_REGEX.exec(style)) !== null) {
2164
- const name = matches[1];
2165
- if (matches[2]) {
2166
- const args = parseArguments(name, matches[2]);
2167
- results.push([name].concat(args));
2168
- } else results.push([name]);
453
+ },
454
+ rgbToAnsi: {
455
+ value: (red, green, blue) => styles$1$1.ansi256ToAnsi(styles$1$1.rgbToAnsi256(red, green, blue)),
456
+ enumerable: false
457
+ },
458
+ hexToAnsi: {
459
+ value: (hex) => styles$1$1.ansi256ToAnsi(styles$1$1.hexToAnsi256(hex)),
460
+ enumerable: false
2169
461
  }
2170
- return results;
462
+ });
463
+ return styles$1$1;
464
+ }
465
+ var ansiStyles$1 = assembleStyles$1();
466
+ var level$1 = (() => {
467
+ if (!("navigator" in globalThis)) return 0;
468
+ if (globalThis.navigator.userAgentData) {
469
+ const brand = navigator.userAgentData.brands.find(({ brand }) => brand === "Chromium");
470
+ if (brand && brand.version > 93) return 3;
2171
471
  }
2172
- function buildStyle(chalk, styles) {
2173
- const enabled = {};
2174
- for (const layer of styles) for (const style of layer.styles) enabled[style[0]] = layer.inverse ? null : style.slice(1);
2175
- let current = chalk;
2176
- for (const [styleName, styles] of Object.entries(enabled)) {
2177
- if (!Array.isArray(styles)) continue;
2178
- if (!(styleName in current)) throw new Error(`Unknown Chalk style: ${styleName}`);
2179
- current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
2180
- }
2181
- return current;
472
+ if (/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)) return 1;
473
+ return 0;
474
+ })();
475
+ var colorSupport$1 = level$1 !== 0 && {
476
+ level: level$1,
477
+ hasBasic: true,
478
+ has256: level$1 >= 2,
479
+ has16m: level$1 >= 3
480
+ };
481
+ var supportsColor$1 = {
482
+ stdout: colorSupport$1,
483
+ stderr: colorSupport$1
484
+ };
485
+ function stringReplaceAll$1(string, substring, replacer) {
486
+ let index = string.indexOf(substring);
487
+ if (index === -1) return string;
488
+ const substringLength = substring.length;
489
+ let endIndex = 0;
490
+ let returnValue = "";
491
+ do {
492
+ returnValue += string.slice(endIndex, index) + substring + replacer;
493
+ endIndex = index + substringLength;
494
+ index = string.indexOf(substring, endIndex);
495
+ } while (index !== -1);
496
+ returnValue += string.slice(endIndex);
497
+ return returnValue;
498
+ }
499
+ function stringEncaseCRLFWithFirstIndex$1(string, prefix, postfix, index) {
500
+ let endIndex = 0;
501
+ let returnValue = "";
502
+ do {
503
+ const gotCR = string[index - 1] === "\r";
504
+ returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
505
+ endIndex = index + 1;
506
+ index = string.indexOf("\n", endIndex);
507
+ } while (index !== -1);
508
+ returnValue += string.slice(endIndex);
509
+ return returnValue;
510
+ }
511
+ var { stdout: stdoutColor$1, stderr: stderrColor$1 } = supportsColor$1;
512
+ var GENERATOR$1 = Symbol("GENERATOR");
513
+ var STYLER$1 = Symbol("STYLER");
514
+ var IS_EMPTY$1 = Symbol("IS_EMPTY");
515
+ var levelMapping$1 = [
516
+ "ansi",
517
+ "ansi",
518
+ "ansi256",
519
+ "ansi16m"
520
+ ];
521
+ var styles$2 = Object.create(null);
522
+ var applyOptions$1 = (object, options = {}) => {
523
+ 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");
524
+ const colorLevel = stdoutColor$1 ? stdoutColor$1.level : 0;
525
+ object.level = options.level === void 0 ? colorLevel : options.level;
526
+ };
527
+ var chalkFactory$1 = (options) => {
528
+ const chalk = (...strings) => strings.join(" ");
529
+ applyOptions$1(chalk, options);
530
+ Object.setPrototypeOf(chalk, createChalk$1.prototype);
531
+ return chalk;
532
+ };
533
+ function createChalk$1(options) {
534
+ return chalkFactory$1(options);
535
+ }
536
+ Object.setPrototypeOf(createChalk$1.prototype, Function.prototype);
537
+ for (const [styleName, style] of Object.entries(ansiStyles$1)) styles$2[styleName] = { get() {
538
+ const builder = createBuilder$1(this, createStyler$1(style.open, style.close, this[STYLER$1]), this[IS_EMPTY$1]);
539
+ Object.defineProperty(this, styleName, { value: builder });
540
+ return builder;
541
+ } };
542
+ styles$2.visible = { get() {
543
+ const builder = createBuilder$1(this, this[STYLER$1], true);
544
+ Object.defineProperty(this, "visible", { value: builder });
545
+ return builder;
546
+ } };
547
+ var getModelAnsi$1 = (model, level, type, ...arguments_) => {
548
+ if (model === "rgb") {
549
+ if (level === "ansi16m") return ansiStyles$1[type].ansi16m(...arguments_);
550
+ if (level === "ansi256") return ansiStyles$1[type].ansi256(ansiStyles$1.rgbToAnsi256(...arguments_));
551
+ return ansiStyles$1[type].ansi(ansiStyles$1.rgbToAnsi(...arguments_));
2182
552
  }
2183
- module.exports = (chalk, temporary) => {
2184
- const styles = [];
2185
- const chunks = [];
2186
- let chunk = [];
2187
- temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
2188
- if (escapeCharacter) chunk.push(unescape(escapeCharacter));
2189
- else if (style) {
2190
- const string = chunk.join("");
2191
- chunk = [];
2192
- chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
2193
- styles.push({
2194
- inverse,
2195
- styles: parseStyle(style)
2196
- });
2197
- } else if (close) {
2198
- if (styles.length === 0) throw new Error("Found extraneous } in Chalk template literal");
2199
- chunks.push(buildStyle(chalk, styles)(chunk.join("")));
2200
- chunk = [];
2201
- styles.pop();
2202
- } else chunk.push(character);
2203
- });
2204
- chunks.push(chunk.join(""));
2205
- if (styles.length > 0) {
2206
- const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
2207
- throw new Error(errMessage);
2208
- }
2209
- return chunks.join("");
2210
- };
2211
- }));
2212
- var import_source$1 = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
2213
- var ansiStyles = require_ansi_styles$1();
2214
- var { stdout: stdoutColor, stderr: stderrColor } = require_browser$2();
2215
- var { stringReplaceAll, stringEncaseCRLFWithFirstIndex } = require_util$1();
2216
- var { isArray } = Array;
2217
- var levelMapping = [
2218
- "ansi",
2219
- "ansi",
2220
- "ansi256",
2221
- "ansi16m"
2222
- ];
2223
- var styles = Object.create(null);
2224
- var applyOptions = (object, options = {}) => {
2225
- 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");
2226
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
2227
- object.level = options.level === void 0 ? colorLevel : options.level;
2228
- };
2229
- var ChalkClass = class {
2230
- constructor(options) {
2231
- return chalkFactory(options);
2232
- }
2233
- };
2234
- var chalkFactory = (options) => {
2235
- const chalk = {};
2236
- applyOptions(chalk, options);
2237
- chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
2238
- Object.setPrototypeOf(chalk, Chalk.prototype);
2239
- Object.setPrototypeOf(chalk.template, chalk);
2240
- chalk.template.constructor = () => {
2241
- throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
553
+ if (model === "hex") return getModelAnsi$1("rgb", level, type, ...ansiStyles$1.hexToRgb(...arguments_));
554
+ return ansiStyles$1[type][model](...arguments_);
555
+ };
556
+ for (const model of [
557
+ "rgb",
558
+ "hex",
559
+ "ansi256"
560
+ ]) {
561
+ styles$2[model] = { get() {
562
+ const { level } = this;
563
+ return function(...arguments_) {
564
+ const styler = createStyler$1(getModelAnsi$1(model, levelMapping$1[level], "color", ...arguments_), ansiStyles$1.color.close, this[STYLER$1]);
565
+ return createBuilder$1(this, styler, this[IS_EMPTY$1]);
2242
566
  };
2243
- chalk.template.Instance = ChalkClass;
2244
- return chalk.template;
2245
- };
2246
- function Chalk(options) {
2247
- return chalkFactory(options);
2248
- }
2249
- for (const [styleName, style] of Object.entries(ansiStyles)) styles[styleName] = { get() {
2250
- const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
2251
- Object.defineProperty(this, styleName, { value: builder });
2252
- return builder;
2253
- } };
2254
- styles.visible = { get() {
2255
- const builder = createBuilder(this, this._styler, true);
2256
- Object.defineProperty(this, "visible", { value: builder });
2257
- return builder;
2258
567
  } };
2259
- var usedModels = [
2260
- "rgb",
2261
- "hex",
2262
- "keyword",
2263
- "hsl",
2264
- "hsv",
2265
- "hwb",
2266
- "ansi",
2267
- "ansi256"
2268
- ];
2269
- for (const model of usedModels) styles[model] = { get() {
568
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
569
+ styles$2[bgModel] = { get() {
2270
570
  const { level } = this;
2271
571
  return function(...arguments_) {
2272
- const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
2273
- return createBuilder(this, styler, this._isEmpty);
572
+ const styler = createStyler$1(getModelAnsi$1(model, levelMapping$1[level], "bgColor", ...arguments_), ansiStyles$1.bgColor.close, this[STYLER$1]);
573
+ return createBuilder$1(this, styler, this[IS_EMPTY$1]);
2274
574
  };
2275
575
  } };
2276
- for (const model of usedModels) {
2277
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
2278
- styles[bgModel] = { get() {
2279
- const { level } = this;
2280
- return function(...arguments_) {
2281
- const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
2282
- return createBuilder(this, styler, this._isEmpty);
2283
- };
2284
- } };
2285
- }
2286
- var proto = Object.defineProperties(() => {}, {
2287
- ...styles,
2288
- level: {
2289
- enumerable: true,
2290
- get() {
2291
- return this._generator.level;
2292
- },
2293
- set(level) {
2294
- this._generator.level = level;
2295
- }
2296
- }
2297
- });
2298
- var createStyler = (open, close, parent) => {
2299
- let openAll;
2300
- let closeAll;
2301
- if (parent === void 0) {
2302
- openAll = open;
2303
- closeAll = close;
2304
- } else {
2305
- openAll = parent.openAll + open;
2306
- closeAll = close + parent.closeAll;
2307
- }
2308
- return {
2309
- open,
2310
- close,
2311
- openAll,
2312
- closeAll,
2313
- parent
2314
- };
2315
- };
2316
- var createBuilder = (self, _styler, _isEmpty) => {
2317
- const builder = (...arguments_) => {
2318
- if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) return applyStyle(builder, chalkTag(builder, ...arguments_));
2319
- return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
2320
- };
2321
- Object.setPrototypeOf(builder, proto);
2322
- builder._generator = self;
2323
- builder._styler = _styler;
2324
- builder._isEmpty = _isEmpty;
2325
- return builder;
2326
- };
2327
- var applyStyle = (self, string) => {
2328
- if (self.level <= 0 || !string) return self._isEmpty ? "" : string;
2329
- let styler = self._styler;
2330
- if (styler === void 0) return string;
2331
- const { openAll, closeAll } = styler;
2332
- if (string.indexOf("\x1B") !== -1) while (styler !== void 0) {
2333
- string = stringReplaceAll(string, styler.close, styler.open);
2334
- styler = styler.parent;
576
+ }
577
+ var proto$1 = Object.defineProperties(() => {}, {
578
+ ...styles$2,
579
+ level: {
580
+ enumerable: true,
581
+ get() {
582
+ return this[GENERATOR$1].level;
583
+ },
584
+ set(level) {
585
+ this[GENERATOR$1].level = level;
2335
586
  }
2336
- const lfIndex = string.indexOf("\n");
2337
- if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
2338
- return openAll + string + closeAll;
2339
- };
2340
- var template;
2341
- var chalkTag = (chalk, ...strings) => {
2342
- const [firstString] = strings;
2343
- if (!isArray(firstString) || !isArray(firstString.raw)) return strings.join(" ");
2344
- const arguments_ = strings.slice(1);
2345
- const parts = [firstString.raw[0]];
2346
- for (let i = 1; i < firstString.length; i++) parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i]));
2347
- if (template === void 0) template = require_templates$1();
2348
- return template(chalk, parts.join(""));
587
+ }
588
+ });
589
+ var createStyler$1 = (open, close, parent) => {
590
+ let openAll;
591
+ let closeAll;
592
+ if (parent === void 0) {
593
+ openAll = open;
594
+ closeAll = close;
595
+ } else {
596
+ openAll = parent.openAll + open;
597
+ closeAll = close + parent.closeAll;
598
+ }
599
+ return {
600
+ open,
601
+ close,
602
+ openAll,
603
+ closeAll,
604
+ parent
2349
605
  };
2350
- Object.defineProperties(Chalk.prototype, styles);
2351
- var chalk = Chalk();
2352
- chalk.supportsColor = stdoutColor;
2353
- chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
2354
- chalk.stderr.supportsColor = stderrColor;
2355
- module.exports = chalk;
2356
- })))());
606
+ };
607
+ var createBuilder$1 = (self, _styler, _isEmpty) => {
608
+ const builder = (...arguments_) => applyStyle$1(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
609
+ Object.setPrototypeOf(builder, proto$1);
610
+ builder[GENERATOR$1] = self;
611
+ builder[STYLER$1] = _styler;
612
+ builder[IS_EMPTY$1] = _isEmpty;
613
+ return builder;
614
+ };
615
+ var applyStyle$1 = (self, string) => {
616
+ if (self.level <= 0 || !string) return self[IS_EMPTY$1] ? "" : string;
617
+ let styler = self[STYLER$1];
618
+ if (styler === void 0) return string;
619
+ const { openAll, closeAll } = styler;
620
+ if (string.includes("\x1B")) while (styler !== void 0) {
621
+ string = stringReplaceAll$1(string, styler.close, styler.open);
622
+ styler = styler.parent;
623
+ }
624
+ const lfIndex = string.indexOf("\n");
625
+ if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex$1(string, closeAll, openAll, lfIndex);
626
+ return openAll + string + closeAll;
627
+ };
628
+ Object.defineProperties(createChalk$1.prototype, styles$2);
629
+ var chalk$1 = createChalk$1();
630
+ createChalk$1({ level: stderrColor$1 ? stderrColor$1.level : 0 });
2357
631
  var envOptions = {};
2358
632
  function SetupConfig(envOptions, logger) {
2359
633
  const envfile = process.env.STSENVFILE === void 0 ? "/.env" : process.env.STSENVFILE;
@@ -2527,10 +801,10 @@ function SetupConfig(envOptions, logger) {
2527
801
  try {
2528
802
  accessSync(passwordFile, constants.R_OK);
2529
803
  const data = readFileSync(passwordFile, "utf8");
2530
- if (logger) logger.debug(import_source$1.default.green(`Successfully loaded password file: [${passwordFile}]`));
804
+ if (logger) logger.debug(chalk$1.green(`Successfully loaded password file: [${passwordFile}]`));
2531
805
  return data;
2532
806
  } catch (err) {
2533
- if (logger) logger.debug(import_source$1.default.red(`Problem loading password file: [${passwordFile}], Error: [${err}]`));
807
+ if (logger) logger.debug(chalk$1.red(`Problem loading password file: [${passwordFile}], Error: [${err}]`));
2534
808
  return "";
2535
809
  }
2536
810
  };
@@ -2570,2060 +844,343 @@ var goptions = new Proxy(envOptions, { get(target, prop, receiver) {
2570
844
  return Reflect.get(target, prop, receiver);
2571
845
  } });
2572
846
  //#endregion
2573
- //#region node_modules/detect-node/browser.js
2574
- var require_browser$1 = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
847
+ //#region node_modules/chalk/source/vendor/ansi-styles/index.js
848
+ var import_browser = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
2575
849
  module.exports = false;
2576
- }));
2577
- //#endregion
2578
- //#region node_modules/color-name/index.js
2579
- var require_color_name = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
2580
- module.exports = {
2581
- "aliceblue": [
2582
- 240,
2583
- 248,
2584
- 255
2585
- ],
2586
- "antiquewhite": [
2587
- 250,
2588
- 235,
2589
- 215
2590
- ],
2591
- "aqua": [
2592
- 0,
2593
- 255,
2594
- 255
2595
- ],
2596
- "aquamarine": [
2597
- 127,
2598
- 255,
2599
- 212
2600
- ],
2601
- "azure": [
2602
- 240,
2603
- 255,
2604
- 255
2605
- ],
2606
- "beige": [
2607
- 245,
2608
- 245,
2609
- 220
2610
- ],
2611
- "bisque": [
2612
- 255,
2613
- 228,
2614
- 196
2615
- ],
2616
- "black": [
2617
- 0,
2618
- 0,
2619
- 0
2620
- ],
2621
- "blanchedalmond": [
2622
- 255,
2623
- 235,
2624
- 205
2625
- ],
2626
- "blue": [
2627
- 0,
2628
- 0,
2629
- 255
2630
- ],
2631
- "blueviolet": [
2632
- 138,
2633
- 43,
2634
- 226
2635
- ],
2636
- "brown": [
2637
- 165,
2638
- 42,
2639
- 42
2640
- ],
2641
- "burlywood": [
2642
- 222,
2643
- 184,
2644
- 135
2645
- ],
2646
- "cadetblue": [
2647
- 95,
2648
- 158,
2649
- 160
2650
- ],
2651
- "chartreuse": [
2652
- 127,
2653
- 255,
2654
- 0
2655
- ],
2656
- "chocolate": [
2657
- 210,
2658
- 105,
2659
- 30
2660
- ],
2661
- "coral": [
2662
- 255,
2663
- 127,
2664
- 80
2665
- ],
2666
- "cornflowerblue": [
2667
- 100,
2668
- 149,
2669
- 237
2670
- ],
2671
- "cornsilk": [
2672
- 255,
2673
- 248,
2674
- 220
2675
- ],
2676
- "crimson": [
2677
- 220,
2678
- 20,
2679
- 60
2680
- ],
2681
- "cyan": [
2682
- 0,
2683
- 255,
2684
- 255
2685
- ],
2686
- "darkblue": [
2687
- 0,
2688
- 0,
2689
- 139
2690
- ],
2691
- "darkcyan": [
2692
- 0,
2693
- 139,
2694
- 139
2695
- ],
2696
- "darkgoldenrod": [
2697
- 184,
2698
- 134,
2699
- 11
2700
- ],
2701
- "darkgray": [
2702
- 169,
2703
- 169,
2704
- 169
2705
- ],
2706
- "darkgreen": [
2707
- 0,
2708
- 100,
2709
- 0
2710
- ],
2711
- "darkgrey": [
2712
- 169,
2713
- 169,
2714
- 169
2715
- ],
2716
- "darkkhaki": [
2717
- 189,
2718
- 183,
2719
- 107
2720
- ],
2721
- "darkmagenta": [
2722
- 139,
2723
- 0,
2724
- 139
2725
- ],
2726
- "darkolivegreen": [
2727
- 85,
2728
- 107,
2729
- 47
2730
- ],
2731
- "darkorange": [
2732
- 255,
2733
- 140,
2734
- 0
2735
- ],
2736
- "darkorchid": [
2737
- 153,
2738
- 50,
2739
- 204
2740
- ],
2741
- "darkred": [
2742
- 139,
2743
- 0,
2744
- 0
2745
- ],
2746
- "darksalmon": [
2747
- 233,
2748
- 150,
2749
- 122
2750
- ],
2751
- "darkseagreen": [
2752
- 143,
2753
- 188,
2754
- 143
2755
- ],
2756
- "darkslateblue": [
2757
- 72,
2758
- 61,
2759
- 139
2760
- ],
2761
- "darkslategray": [
2762
- 47,
2763
- 79,
2764
- 79
2765
- ],
2766
- "darkslategrey": [
2767
- 47,
2768
- 79,
2769
- 79
2770
- ],
2771
- "darkturquoise": [
2772
- 0,
2773
- 206,
2774
- 209
2775
- ],
2776
- "darkviolet": [
2777
- 148,
2778
- 0,
2779
- 211
2780
- ],
2781
- "deeppink": [
2782
- 255,
2783
- 20,
2784
- 147
2785
- ],
2786
- "deepskyblue": [
2787
- 0,
2788
- 191,
2789
- 255
2790
- ],
2791
- "dimgray": [
2792
- 105,
2793
- 105,
2794
- 105
2795
- ],
2796
- "dimgrey": [
2797
- 105,
2798
- 105,
2799
- 105
2800
- ],
2801
- "dodgerblue": [
2802
- 30,
2803
- 144,
2804
- 255
2805
- ],
2806
- "firebrick": [
2807
- 178,
2808
- 34,
2809
- 34
2810
- ],
2811
- "floralwhite": [
2812
- 255,
2813
- 250,
2814
- 240
2815
- ],
2816
- "forestgreen": [
2817
- 34,
2818
- 139,
2819
- 34
2820
- ],
2821
- "fuchsia": [
2822
- 255,
2823
- 0,
2824
- 255
2825
- ],
2826
- "gainsboro": [
2827
- 220,
2828
- 220,
2829
- 220
2830
- ],
2831
- "ghostwhite": [
2832
- 248,
2833
- 248,
2834
- 255
2835
- ],
2836
- "gold": [
2837
- 255,
2838
- 215,
2839
- 0
2840
- ],
2841
- "goldenrod": [
2842
- 218,
2843
- 165,
2844
- 32
2845
- ],
2846
- "gray": [
2847
- 128,
2848
- 128,
2849
- 128
2850
- ],
2851
- "green": [
2852
- 0,
2853
- 128,
2854
- 0
2855
- ],
2856
- "greenyellow": [
2857
- 173,
2858
- 255,
2859
- 47
2860
- ],
2861
- "grey": [
2862
- 128,
2863
- 128,
2864
- 128
2865
- ],
2866
- "honeydew": [
2867
- 240,
2868
- 255,
2869
- 240
2870
- ],
2871
- "hotpink": [
2872
- 255,
2873
- 105,
2874
- 180
2875
- ],
2876
- "indianred": [
2877
- 205,
2878
- 92,
2879
- 92
2880
- ],
2881
- "indigo": [
2882
- 75,
2883
- 0,
2884
- 130
2885
- ],
2886
- "ivory": [
2887
- 255,
2888
- 255,
2889
- 240
2890
- ],
2891
- "khaki": [
2892
- 240,
2893
- 230,
2894
- 140
2895
- ],
2896
- "lavender": [
2897
- 230,
2898
- 230,
2899
- 250
2900
- ],
2901
- "lavenderblush": [
2902
- 255,
2903
- 240,
2904
- 245
2905
- ],
2906
- "lawngreen": [
2907
- 124,
2908
- 252,
2909
- 0
2910
- ],
2911
- "lemonchiffon": [
2912
- 255,
2913
- 250,
2914
- 205
2915
- ],
2916
- "lightblue": [
2917
- 173,
2918
- 216,
2919
- 230
2920
- ],
2921
- "lightcoral": [
2922
- 240,
2923
- 128,
2924
- 128
2925
- ],
2926
- "lightcyan": [
2927
- 224,
2928
- 255,
2929
- 255
2930
- ],
2931
- "lightgoldenrodyellow": [
2932
- 250,
2933
- 250,
2934
- 210
2935
- ],
2936
- "lightgray": [
2937
- 211,
2938
- 211,
2939
- 211
2940
- ],
2941
- "lightgreen": [
2942
- 144,
2943
- 238,
2944
- 144
2945
- ],
2946
- "lightgrey": [
2947
- 211,
2948
- 211,
2949
- 211
2950
- ],
2951
- "lightpink": [
2952
- 255,
2953
- 182,
2954
- 193
2955
- ],
2956
- "lightsalmon": [
2957
- 255,
2958
- 160,
2959
- 122
2960
- ],
2961
- "lightseagreen": [
2962
- 32,
2963
- 178,
2964
- 170
2965
- ],
2966
- "lightskyblue": [
2967
- 135,
2968
- 206,
2969
- 250
2970
- ],
2971
- "lightslategray": [
2972
- 119,
2973
- 136,
2974
- 153
2975
- ],
2976
- "lightslategrey": [
2977
- 119,
2978
- 136,
2979
- 153
2980
- ],
2981
- "lightsteelblue": [
2982
- 176,
2983
- 196,
2984
- 222
2985
- ],
2986
- "lightyellow": [
2987
- 255,
2988
- 255,
2989
- 224
2990
- ],
2991
- "lime": [
2992
- 0,
2993
- 255,
2994
- 0
2995
- ],
2996
- "limegreen": [
2997
- 50,
2998
- 205,
2999
- 50
3000
- ],
3001
- "linen": [
3002
- 250,
3003
- 240,
3004
- 230
3005
- ],
3006
- "magenta": [
3007
- 255,
3008
- 0,
3009
- 255
3010
- ],
3011
- "maroon": [
3012
- 128,
3013
- 0,
3014
- 0
3015
- ],
3016
- "mediumaquamarine": [
3017
- 102,
3018
- 205,
3019
- 170
3020
- ],
3021
- "mediumblue": [
3022
- 0,
3023
- 0,
3024
- 205
3025
- ],
3026
- "mediumorchid": [
3027
- 186,
3028
- 85,
3029
- 211
3030
- ],
3031
- "mediumpurple": [
3032
- 147,
3033
- 112,
3034
- 219
3035
- ],
3036
- "mediumseagreen": [
3037
- 60,
3038
- 179,
3039
- 113
3040
- ],
3041
- "mediumslateblue": [
3042
- 123,
3043
- 104,
3044
- 238
3045
- ],
3046
- "mediumspringgreen": [
3047
- 0,
3048
- 250,
3049
- 154
3050
- ],
3051
- "mediumturquoise": [
3052
- 72,
3053
- 209,
3054
- 204
3055
- ],
3056
- "mediumvioletred": [
3057
- 199,
3058
- 21,
3059
- 133
3060
- ],
3061
- "midnightblue": [
3062
- 25,
3063
- 25,
3064
- 112
3065
- ],
3066
- "mintcream": [
3067
- 245,
3068
- 255,
3069
- 250
3070
- ],
3071
- "mistyrose": [
3072
- 255,
3073
- 228,
3074
- 225
3075
- ],
3076
- "moccasin": [
3077
- 255,
3078
- 228,
3079
- 181
3080
- ],
3081
- "navajowhite": [
3082
- 255,
3083
- 222,
3084
- 173
3085
- ],
3086
- "navy": [
3087
- 0,
3088
- 0,
3089
- 128
3090
- ],
3091
- "oldlace": [
3092
- 253,
3093
- 245,
3094
- 230
3095
- ],
3096
- "olive": [
3097
- 128,
3098
- 128,
3099
- 0
3100
- ],
3101
- "olivedrab": [
3102
- 107,
3103
- 142,
3104
- 35
3105
- ],
3106
- "orange": [
3107
- 255,
3108
- 165,
3109
- 0
3110
- ],
3111
- "orangered": [
3112
- 255,
3113
- 69,
3114
- 0
3115
- ],
3116
- "orchid": [
3117
- 218,
3118
- 112,
3119
- 214
3120
- ],
3121
- "palegoldenrod": [
3122
- 238,
3123
- 232,
3124
- 170
3125
- ],
3126
- "palegreen": [
3127
- 152,
3128
- 251,
3129
- 152
3130
- ],
3131
- "paleturquoise": [
3132
- 175,
3133
- 238,
3134
- 238
3135
- ],
3136
- "palevioletred": [
3137
- 219,
3138
- 112,
3139
- 147
3140
- ],
3141
- "papayawhip": [
3142
- 255,
3143
- 239,
3144
- 213
3145
- ],
3146
- "peachpuff": [
3147
- 255,
3148
- 218,
3149
- 185
3150
- ],
3151
- "peru": [
3152
- 205,
3153
- 133,
3154
- 63
3155
- ],
3156
- "pink": [
3157
- 255,
3158
- 192,
3159
- 203
3160
- ],
3161
- "plum": [
3162
- 221,
3163
- 160,
3164
- 221
3165
- ],
3166
- "powderblue": [
3167
- 176,
3168
- 224,
3169
- 230
3170
- ],
3171
- "purple": [
3172
- 128,
3173
- 0,
3174
- 128
3175
- ],
3176
- "rebeccapurple": [
3177
- 102,
3178
- 51,
3179
- 153
3180
- ],
3181
- "red": [
3182
- 255,
3183
- 0,
3184
- 0
3185
- ],
3186
- "rosybrown": [
3187
- 188,
3188
- 143,
3189
- 143
3190
- ],
3191
- "royalblue": [
3192
- 65,
3193
- 105,
3194
- 225
3195
- ],
3196
- "saddlebrown": [
3197
- 139,
3198
- 69,
3199
- 19
3200
- ],
3201
- "salmon": [
3202
- 250,
3203
- 128,
3204
- 114
3205
- ],
3206
- "sandybrown": [
3207
- 244,
3208
- 164,
3209
- 96
3210
- ],
3211
- "seagreen": [
3212
- 46,
3213
- 139,
3214
- 87
3215
- ],
3216
- "seashell": [
3217
- 255,
3218
- 245,
3219
- 238
3220
- ],
3221
- "sienna": [
3222
- 160,
3223
- 82,
3224
- 45
3225
- ],
3226
- "silver": [
3227
- 192,
3228
- 192,
3229
- 192
3230
- ],
3231
- "skyblue": [
3232
- 135,
3233
- 206,
3234
- 235
3235
- ],
3236
- "slateblue": [
3237
- 106,
3238
- 90,
3239
- 205
3240
- ],
3241
- "slategray": [
3242
- 112,
3243
- 128,
3244
- 144
3245
- ],
3246
- "slategrey": [
3247
- 112,
3248
- 128,
3249
- 144
3250
- ],
3251
- "snow": [
3252
- 255,
3253
- 250,
3254
- 250
3255
- ],
3256
- "springgreen": [
3257
- 0,
3258
- 255,
3259
- 127
3260
- ],
3261
- "steelblue": [
3262
- 70,
3263
- 130,
3264
- 180
3265
- ],
3266
- "tan": [
3267
- 210,
3268
- 180,
3269
- 140
3270
- ],
3271
- "teal": [
3272
- 0,
3273
- 128,
3274
- 128
3275
- ],
3276
- "thistle": [
3277
- 216,
3278
- 191,
3279
- 216
3280
- ],
3281
- "tomato": [
3282
- 255,
3283
- 99,
3284
- 71
3285
- ],
3286
- "turquoise": [
3287
- 64,
3288
- 224,
3289
- 208
3290
- ],
3291
- "violet": [
3292
- 238,
3293
- 130,
3294
- 238
3295
- ],
3296
- "wheat": [
3297
- 245,
3298
- 222,
3299
- 179
3300
- ],
3301
- "white": [
3302
- 255,
3303
- 255,
3304
- 255
3305
- ],
3306
- "whitesmoke": [
3307
- 245,
3308
- 245,
3309
- 245
3310
- ],
3311
- "yellow": [
3312
- 255,
3313
- 255,
3314
- 0
3315
- ],
3316
- "yellowgreen": [
3317
- 154,
3318
- 205,
3319
- 50
3320
- ]
3321
- };
3322
- }));
3323
- //#endregion
3324
- //#region node_modules/color-convert/conversions.js
3325
- var require_conversions = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
3326
- var cssKeywords = require_color_name();
3327
- var reverseKeywords = {};
3328
- for (const key of Object.keys(cssKeywords)) reverseKeywords[cssKeywords[key]] = key;
3329
- var convert = {
3330
- rgb: {
3331
- channels: 3,
3332
- labels: "rgb"
3333
- },
3334
- hsl: {
3335
- channels: 3,
3336
- labels: "hsl"
3337
- },
3338
- hsv: {
3339
- channels: 3,
3340
- labels: "hsv"
3341
- },
3342
- hwb: {
3343
- channels: 3,
3344
- labels: "hwb"
3345
- },
3346
- cmyk: {
3347
- channels: 4,
3348
- labels: "cmyk"
3349
- },
3350
- xyz: {
3351
- channels: 3,
3352
- labels: "xyz"
3353
- },
3354
- lab: {
3355
- channels: 3,
3356
- labels: "lab"
3357
- },
3358
- lch: {
3359
- channels: 3,
3360
- labels: "lch"
3361
- },
3362
- hex: {
3363
- channels: 1,
3364
- labels: ["hex"]
3365
- },
3366
- keyword: {
3367
- channels: 1,
3368
- labels: ["keyword"]
3369
- },
3370
- ansi16: {
3371
- channels: 1,
3372
- labels: ["ansi16"]
3373
- },
3374
- ansi256: {
3375
- channels: 1,
3376
- labels: ["ansi256"]
3377
- },
3378
- hcg: {
3379
- channels: 3,
3380
- labels: [
3381
- "h",
3382
- "c",
3383
- "g"
3384
- ]
3385
- },
3386
- apple: {
3387
- channels: 3,
3388
- labels: [
3389
- "r16",
3390
- "g16",
3391
- "b16"
3392
- ]
3393
- },
3394
- gray: {
3395
- channels: 1,
3396
- labels: ["gray"]
3397
- }
3398
- };
3399
- module.exports = convert;
3400
- for (const model of Object.keys(convert)) {
3401
- if (!("channels" in convert[model])) throw new Error("missing channels property: " + model);
3402
- if (!("labels" in convert[model])) throw new Error("missing channel labels property: " + model);
3403
- if (convert[model].labels.length !== convert[model].channels) throw new Error("channel and label counts mismatch: " + model);
3404
- const { channels, labels } = convert[model];
3405
- delete convert[model].channels;
3406
- delete convert[model].labels;
3407
- Object.defineProperty(convert[model], "channels", { value: channels });
3408
- Object.defineProperty(convert[model], "labels", { value: labels });
3409
- }
3410
- convert.rgb.hsl = function(rgb) {
3411
- const r = rgb[0] / 255;
3412
- const g = rgb[1] / 255;
3413
- const b = rgb[2] / 255;
3414
- const min = Math.min(r, g, b);
3415
- const max = Math.max(r, g, b);
3416
- const delta = max - min;
3417
- let h;
3418
- let s;
3419
- if (max === min) h = 0;
3420
- else if (r === max) h = (g - b) / delta;
3421
- else if (g === max) h = 2 + (b - r) / delta;
3422
- else if (b === max) h = 4 + (r - g) / delta;
3423
- h = Math.min(h * 60, 360);
3424
- if (h < 0) h += 360;
3425
- const l = (min + max) / 2;
3426
- if (max === min) s = 0;
3427
- else if (l <= .5) s = delta / (max + min);
3428
- else s = delta / (2 - max - min);
3429
- return [
3430
- h,
3431
- s * 100,
3432
- l * 100
3433
- ];
3434
- };
3435
- convert.rgb.hsv = function(rgb) {
3436
- let rdif;
3437
- let gdif;
3438
- let bdif;
3439
- let h;
3440
- let s;
3441
- const r = rgb[0] / 255;
3442
- const g = rgb[1] / 255;
3443
- const b = rgb[2] / 255;
3444
- const v = Math.max(r, g, b);
3445
- const diff = v - Math.min(r, g, b);
3446
- const diffc = function(c) {
3447
- return (v - c) / 6 / diff + 1 / 2;
3448
- };
3449
- if (diff === 0) {
3450
- h = 0;
3451
- s = 0;
3452
- } else {
3453
- s = diff / v;
3454
- rdif = diffc(r);
3455
- gdif = diffc(g);
3456
- bdif = diffc(b);
3457
- if (r === v) h = bdif - gdif;
3458
- else if (g === v) h = 1 / 3 + rdif - bdif;
3459
- else if (b === v) h = 2 / 3 + gdif - rdif;
3460
- if (h < 0) h += 1;
3461
- else if (h > 1) h -= 1;
3462
- }
3463
- return [
3464
- h * 360,
3465
- s * 100,
3466
- v * 100
3467
- ];
3468
- };
3469
- convert.rgb.hwb = function(rgb) {
3470
- const r = rgb[0];
3471
- const g = rgb[1];
3472
- let b = rgb[2];
3473
- const h = convert.rgb.hsl(rgb)[0];
3474
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
3475
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
3476
- return [
3477
- h,
3478
- w * 100,
3479
- b * 100
3480
- ];
3481
- };
3482
- convert.rgb.cmyk = function(rgb) {
3483
- const r = rgb[0] / 255;
3484
- const g = rgb[1] / 255;
3485
- const b = rgb[2] / 255;
3486
- const k = Math.min(1 - r, 1 - g, 1 - b);
3487
- const c = (1 - r - k) / (1 - k) || 0;
3488
- const m = (1 - g - k) / (1 - k) || 0;
3489
- const y = (1 - b - k) / (1 - k) || 0;
3490
- return [
3491
- c * 100,
3492
- m * 100,
3493
- y * 100,
3494
- k * 100
3495
- ];
3496
- };
3497
- function comparativeDistance(x, y) {
3498
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
3499
- }
3500
- convert.rgb.keyword = function(rgb) {
3501
- const reversed = reverseKeywords[rgb];
3502
- if (reversed) return reversed;
3503
- let currentClosestDistance = Infinity;
3504
- let currentClosestKeyword;
3505
- for (const keyword of Object.keys(cssKeywords)) {
3506
- const value = cssKeywords[keyword];
3507
- const distance = comparativeDistance(rgb, value);
3508
- if (distance < currentClosestDistance) {
3509
- currentClosestDistance = distance;
3510
- currentClosestKeyword = keyword;
3511
- }
3512
- }
3513
- return currentClosestKeyword;
3514
- };
3515
- convert.keyword.rgb = function(keyword) {
3516
- return cssKeywords[keyword];
3517
- };
3518
- convert.rgb.xyz = function(rgb) {
3519
- let r = rgb[0] / 255;
3520
- let g = rgb[1] / 255;
3521
- let b = rgb[2] / 255;
3522
- r = r > .04045 ? ((r + .055) / 1.055) ** 2.4 : r / 12.92;
3523
- g = g > .04045 ? ((g + .055) / 1.055) ** 2.4 : g / 12.92;
3524
- b = b > .04045 ? ((b + .055) / 1.055) ** 2.4 : b / 12.92;
3525
- const x = r * .4124 + g * .3576 + b * .1805;
3526
- const y = r * .2126 + g * .7152 + b * .0722;
3527
- const z = r * .0193 + g * .1192 + b * .9505;
3528
- return [
3529
- x * 100,
3530
- y * 100,
3531
- z * 100
3532
- ];
3533
- };
3534
- convert.rgb.lab = function(rgb) {
3535
- const xyz = convert.rgb.xyz(rgb);
3536
- let x = xyz[0];
3537
- let y = xyz[1];
3538
- let z = xyz[2];
3539
- x /= 95.047;
3540
- y /= 100;
3541
- z /= 108.883;
3542
- x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
3543
- y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
3544
- z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
3545
- return [
3546
- 116 * y - 16,
3547
- 500 * (x - y),
3548
- 200 * (y - z)
3549
- ];
3550
- };
3551
- convert.hsl.rgb = function(hsl) {
3552
- const h = hsl[0] / 360;
3553
- const s = hsl[1] / 100;
3554
- const l = hsl[2] / 100;
3555
- let t2;
3556
- let t3;
3557
- let val;
3558
- if (s === 0) {
3559
- val = l * 255;
3560
- return [
3561
- val,
3562
- val,
3563
- val
3564
- ];
3565
- }
3566
- if (l < .5) t2 = l * (1 + s);
3567
- else t2 = l + s - l * s;
3568
- const t1 = 2 * l - t2;
3569
- const rgb = [
3570
- 0,
3571
- 0,
3572
- 0
3573
- ];
3574
- for (let i = 0; i < 3; i++) {
3575
- t3 = h + 1 / 3 * -(i - 1);
3576
- if (t3 < 0) t3++;
3577
- if (t3 > 1) t3--;
3578
- if (6 * t3 < 1) val = t1 + (t2 - t1) * 6 * t3;
3579
- else if (2 * t3 < 1) val = t2;
3580
- else if (3 * t3 < 2) val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
3581
- else val = t1;
3582
- rgb[i] = val * 255;
3583
- }
3584
- return rgb;
3585
- };
3586
- convert.hsl.hsv = function(hsl) {
3587
- const h = hsl[0];
3588
- let s = hsl[1] / 100;
3589
- let l = hsl[2] / 100;
3590
- let smin = s;
3591
- const lmin = Math.max(l, .01);
3592
- l *= 2;
3593
- s *= l <= 1 ? l : 2 - l;
3594
- smin *= lmin <= 1 ? lmin : 2 - lmin;
3595
- const v = (l + s) / 2;
3596
- return [
3597
- h,
3598
- (l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s)) * 100,
3599
- v * 100
3600
- ];
3601
- };
3602
- convert.hsv.rgb = function(hsv) {
3603
- const h = hsv[0] / 60;
3604
- const s = hsv[1] / 100;
3605
- let v = hsv[2] / 100;
3606
- const hi = Math.floor(h) % 6;
3607
- const f = h - Math.floor(h);
3608
- const p = 255 * v * (1 - s);
3609
- const q = 255 * v * (1 - s * f);
3610
- const t = 255 * v * (1 - s * (1 - f));
3611
- v *= 255;
3612
- switch (hi) {
3613
- case 0: return [
3614
- v,
3615
- t,
3616
- p
3617
- ];
3618
- case 1: return [
3619
- q,
3620
- v,
3621
- p
3622
- ];
3623
- case 2: return [
3624
- p,
3625
- v,
3626
- t
3627
- ];
3628
- case 3: return [
3629
- p,
3630
- q,
3631
- v
3632
- ];
3633
- case 4: return [
3634
- t,
3635
- p,
3636
- v
3637
- ];
3638
- case 5: return [
3639
- v,
3640
- p,
3641
- q
3642
- ];
3643
- }
3644
- };
3645
- convert.hsv.hsl = function(hsv) {
3646
- const h = hsv[0];
3647
- const s = hsv[1] / 100;
3648
- const v = hsv[2] / 100;
3649
- const vmin = Math.max(v, .01);
3650
- let sl;
3651
- let l;
3652
- l = (2 - s) * v;
3653
- const lmin = (2 - s) * vmin;
3654
- sl = s * vmin;
3655
- sl /= lmin <= 1 ? lmin : 2 - lmin;
3656
- sl = sl || 0;
3657
- l /= 2;
3658
- return [
3659
- h,
3660
- sl * 100,
3661
- l * 100
3662
- ];
3663
- };
3664
- convert.hwb.rgb = function(hwb) {
3665
- const h = hwb[0] / 360;
3666
- let wh = hwb[1] / 100;
3667
- let bl = hwb[2] / 100;
3668
- const ratio = wh + bl;
3669
- let f;
3670
- if (ratio > 1) {
3671
- wh /= ratio;
3672
- bl /= ratio;
3673
- }
3674
- const i = Math.floor(6 * h);
3675
- const v = 1 - bl;
3676
- f = 6 * h - i;
3677
- if ((i & 1) !== 0) f = 1 - f;
3678
- const n = wh + f * (v - wh);
3679
- let r;
3680
- let g;
3681
- let b;
3682
- switch (i) {
3683
- default:
3684
- case 6:
3685
- case 0:
3686
- r = v;
3687
- g = n;
3688
- b = wh;
3689
- break;
3690
- case 1:
3691
- r = n;
3692
- g = v;
3693
- b = wh;
3694
- break;
3695
- case 2:
3696
- r = wh;
3697
- g = v;
3698
- b = n;
3699
- break;
3700
- case 3:
3701
- r = wh;
3702
- g = n;
3703
- b = v;
3704
- break;
3705
- case 4:
3706
- r = n;
3707
- g = wh;
3708
- b = v;
3709
- break;
3710
- case 5:
3711
- r = v;
3712
- g = wh;
3713
- b = n;
3714
- break;
3715
- }
3716
- return [
3717
- r * 255,
3718
- g * 255,
3719
- b * 255
3720
- ];
3721
- };
3722
- convert.cmyk.rgb = function(cmyk) {
3723
- const c = cmyk[0] / 100;
3724
- const m = cmyk[1] / 100;
3725
- const y = cmyk[2] / 100;
3726
- const k = cmyk[3] / 100;
3727
- const r = 1 - Math.min(1, c * (1 - k) + k);
3728
- const g = 1 - Math.min(1, m * (1 - k) + k);
3729
- const b = 1 - Math.min(1, y * (1 - k) + k);
3730
- return [
3731
- r * 255,
3732
- g * 255,
3733
- b * 255
3734
- ];
3735
- };
3736
- convert.xyz.rgb = function(xyz) {
3737
- const x = xyz[0] / 100;
3738
- const y = xyz[1] / 100;
3739
- const z = xyz[2] / 100;
3740
- let r;
3741
- let g;
3742
- let b;
3743
- r = x * 3.2406 + y * -1.5372 + z * -.4986;
3744
- g = x * -.9689 + y * 1.8758 + z * .0415;
3745
- b = x * .0557 + y * -.204 + z * 1.057;
3746
- r = r > .0031308 ? 1.055 * r ** (1 / 2.4) - .055 : r * 12.92;
3747
- g = g > .0031308 ? 1.055 * g ** (1 / 2.4) - .055 : g * 12.92;
3748
- b = b > .0031308 ? 1.055 * b ** (1 / 2.4) - .055 : b * 12.92;
3749
- r = Math.min(Math.max(0, r), 1);
3750
- g = Math.min(Math.max(0, g), 1);
3751
- b = Math.min(Math.max(0, b), 1);
3752
- return [
3753
- r * 255,
3754
- g * 255,
3755
- b * 255
3756
- ];
3757
- };
3758
- convert.xyz.lab = function(xyz) {
3759
- let x = xyz[0];
3760
- let y = xyz[1];
3761
- let z = xyz[2];
3762
- x /= 95.047;
3763
- y /= 100;
3764
- z /= 108.883;
3765
- x = x > .008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
3766
- y = y > .008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
3767
- z = z > .008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
3768
- return [
3769
- 116 * y - 16,
3770
- 500 * (x - y),
3771
- 200 * (y - z)
3772
- ];
3773
- };
3774
- convert.lab.xyz = function(lab) {
3775
- const l = lab[0];
3776
- const a = lab[1];
3777
- const b = lab[2];
3778
- let x;
3779
- let y;
3780
- let z;
3781
- y = (l + 16) / 116;
3782
- x = a / 500 + y;
3783
- z = y - b / 200;
3784
- const y2 = y ** 3;
3785
- const x2 = x ** 3;
3786
- const z2 = z ** 3;
3787
- y = y2 > .008856 ? y2 : (y - 16 / 116) / 7.787;
3788
- x = x2 > .008856 ? x2 : (x - 16 / 116) / 7.787;
3789
- z = z2 > .008856 ? z2 : (z - 16 / 116) / 7.787;
3790
- x *= 95.047;
3791
- y *= 100;
3792
- z *= 108.883;
3793
- return [
3794
- x,
3795
- y,
3796
- z
3797
- ];
3798
- };
3799
- convert.lab.lch = function(lab) {
3800
- const l = lab[0];
3801
- const a = lab[1];
3802
- const b = lab[2];
3803
- let h;
3804
- h = Math.atan2(b, a) * 360 / 2 / Math.PI;
3805
- if (h < 0) h += 360;
3806
- return [
3807
- l,
3808
- Math.sqrt(a * a + b * b),
3809
- h
3810
- ];
3811
- };
3812
- convert.lch.lab = function(lch) {
3813
- const l = lch[0];
3814
- const c = lch[1];
3815
- const hr = lch[2] / 360 * 2 * Math.PI;
3816
- return [
3817
- l,
3818
- c * Math.cos(hr),
3819
- c * Math.sin(hr)
3820
- ];
3821
- };
3822
- convert.rgb.ansi16 = function(args, saturation = null) {
3823
- const [r, g, b] = args;
3824
- let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
3825
- value = Math.round(value / 50);
3826
- if (value === 0) return 30;
3827
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
3828
- if (value === 2) ansi += 60;
3829
- return ansi;
3830
- };
3831
- convert.hsv.ansi16 = function(args) {
3832
- return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
3833
- };
3834
- convert.rgb.ansi256 = function(args) {
3835
- const r = args[0];
3836
- const g = args[1];
3837
- const b = args[2];
3838
- if (r === g && g === b) {
3839
- if (r < 8) return 16;
3840
- if (r > 248) return 231;
3841
- return Math.round((r - 8) / 247 * 24) + 232;
3842
- }
3843
- return 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
3844
- };
3845
- convert.ansi16.rgb = function(args) {
3846
- let color = args % 10;
3847
- if (color === 0 || color === 7) {
3848
- if (args > 50) color += 3.5;
3849
- color = color / 10.5 * 255;
3850
- return [
3851
- color,
3852
- color,
3853
- color
3854
- ];
3855
- }
3856
- const mult = (~~(args > 50) + 1) * .5;
3857
- return [
3858
- (color & 1) * mult * 255,
3859
- (color >> 1 & 1) * mult * 255,
3860
- (color >> 2 & 1) * mult * 255
3861
- ];
3862
- };
3863
- convert.ansi256.rgb = function(args) {
3864
- if (args >= 232) {
3865
- const c = (args - 232) * 10 + 8;
3866
- return [
3867
- c,
3868
- c,
3869
- c
3870
- ];
3871
- }
3872
- args -= 16;
3873
- let rem;
3874
- return [
3875
- Math.floor(args / 36) / 5 * 255,
3876
- Math.floor((rem = args % 36) / 6) / 5 * 255,
3877
- rem % 6 / 5 * 255
3878
- ];
3879
- };
3880
- convert.rgb.hex = function(args) {
3881
- const string = (((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255)).toString(16).toUpperCase();
3882
- return "000000".substring(string.length) + string;
3883
- };
3884
- convert.hex.rgb = function(args) {
3885
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
3886
- if (!match) return [
3887
- 0,
3888
- 0,
3889
- 0
3890
- ];
3891
- let colorString = match[0];
3892
- if (match[0].length === 3) colorString = colorString.split("").map((char) => {
3893
- return char + char;
3894
- }).join("");
3895
- const integer = parseInt(colorString, 16);
3896
- return [
3897
- integer >> 16 & 255,
3898
- integer >> 8 & 255,
3899
- integer & 255
3900
- ];
3901
- };
3902
- convert.rgb.hcg = function(rgb) {
3903
- const r = rgb[0] / 255;
3904
- const g = rgb[1] / 255;
3905
- const b = rgb[2] / 255;
3906
- const max = Math.max(Math.max(r, g), b);
3907
- const min = Math.min(Math.min(r, g), b);
3908
- const chroma = max - min;
3909
- let grayscale;
3910
- let hue;
3911
- if (chroma < 1) grayscale = min / (1 - chroma);
3912
- else grayscale = 0;
3913
- if (chroma <= 0) hue = 0;
3914
- else if (max === r) hue = (g - b) / chroma % 6;
3915
- else if (max === g) hue = 2 + (b - r) / chroma;
3916
- else hue = 4 + (r - g) / chroma;
3917
- hue /= 6;
3918
- hue %= 1;
3919
- return [
3920
- hue * 360,
3921
- chroma * 100,
3922
- grayscale * 100
3923
- ];
3924
- };
3925
- convert.hsl.hcg = function(hsl) {
3926
- const s = hsl[1] / 100;
3927
- const l = hsl[2] / 100;
3928
- const c = l < .5 ? 2 * s * l : 2 * s * (1 - l);
3929
- let f = 0;
3930
- if (c < 1) f = (l - .5 * c) / (1 - c);
3931
- return [
3932
- hsl[0],
3933
- c * 100,
3934
- f * 100
3935
- ];
3936
- };
3937
- convert.hsv.hcg = function(hsv) {
3938
- const s = hsv[1] / 100;
3939
- const v = hsv[2] / 100;
3940
- const c = s * v;
3941
- let f = 0;
3942
- if (c < 1) f = (v - c) / (1 - c);
3943
- return [
3944
- hsv[0],
3945
- c * 100,
3946
- f * 100
3947
- ];
3948
- };
3949
- convert.hcg.rgb = function(hcg) {
3950
- const h = hcg[0] / 360;
3951
- const c = hcg[1] / 100;
3952
- const g = hcg[2] / 100;
3953
- if (c === 0) return [
3954
- g * 255,
3955
- g * 255,
3956
- g * 255
3957
- ];
3958
- const pure = [
3959
- 0,
3960
- 0,
3961
- 0
3962
- ];
3963
- const hi = h % 1 * 6;
3964
- const v = hi % 1;
3965
- const w = 1 - v;
3966
- let mg = 0;
3967
- switch (Math.floor(hi)) {
3968
- case 0:
3969
- pure[0] = 1;
3970
- pure[1] = v;
3971
- pure[2] = 0;
3972
- break;
3973
- case 1:
3974
- pure[0] = w;
3975
- pure[1] = 1;
3976
- pure[2] = 0;
3977
- break;
3978
- case 2:
3979
- pure[0] = 0;
3980
- pure[1] = 1;
3981
- pure[2] = v;
3982
- break;
3983
- case 3:
3984
- pure[0] = 0;
3985
- pure[1] = w;
3986
- pure[2] = 1;
3987
- break;
3988
- case 4:
3989
- pure[0] = v;
3990
- pure[1] = 0;
3991
- pure[2] = 1;
3992
- break;
3993
- default:
3994
- pure[0] = 1;
3995
- pure[1] = 0;
3996
- pure[2] = w;
3997
- }
3998
- mg = (1 - c) * g;
3999
- return [
4000
- (c * pure[0] + mg) * 255,
4001
- (c * pure[1] + mg) * 255,
4002
- (c * pure[2] + mg) * 255
4003
- ];
4004
- };
4005
- convert.hcg.hsv = function(hcg) {
4006
- const c = hcg[1] / 100;
4007
- const v = c + hcg[2] / 100 * (1 - c);
4008
- let f = 0;
4009
- if (v > 0) f = c / v;
4010
- return [
4011
- hcg[0],
4012
- f * 100,
4013
- v * 100
4014
- ];
4015
- };
4016
- convert.hcg.hsl = function(hcg) {
4017
- const c = hcg[1] / 100;
4018
- const l = hcg[2] / 100 * (1 - c) + .5 * c;
4019
- let s = 0;
4020
- if (l > 0 && l < .5) s = c / (2 * l);
4021
- else if (l >= .5 && l < 1) s = c / (2 * (1 - l));
4022
- return [
4023
- hcg[0],
4024
- s * 100,
4025
- l * 100
4026
- ];
4027
- };
4028
- convert.hcg.hwb = function(hcg) {
4029
- const c = hcg[1] / 100;
4030
- const v = c + hcg[2] / 100 * (1 - c);
4031
- return [
4032
- hcg[0],
4033
- (v - c) * 100,
4034
- (1 - v) * 100
4035
- ];
4036
- };
4037
- convert.hwb.hcg = function(hwb) {
4038
- const w = hwb[1] / 100;
4039
- const v = 1 - hwb[2] / 100;
4040
- const c = v - w;
4041
- let g = 0;
4042
- if (c < 1) g = (v - c) / (1 - c);
4043
- return [
4044
- hwb[0],
4045
- c * 100,
4046
- g * 100
4047
- ];
4048
- };
4049
- convert.apple.rgb = function(apple) {
4050
- return [
4051
- apple[0] / 65535 * 255,
4052
- apple[1] / 65535 * 255,
4053
- apple[2] / 65535 * 255
4054
- ];
4055
- };
4056
- convert.rgb.apple = function(rgb) {
4057
- return [
4058
- rgb[0] / 255 * 65535,
4059
- rgb[1] / 255 * 65535,
4060
- rgb[2] / 255 * 65535
4061
- ];
4062
- };
4063
- convert.gray.rgb = function(args) {
4064
- return [
4065
- args[0] / 100 * 255,
4066
- args[0] / 100 * 255,
4067
- args[0] / 100 * 255
4068
- ];
4069
- };
4070
- convert.gray.hsl = function(args) {
4071
- return [
4072
- 0,
4073
- 0,
4074
- args[0]
4075
- ];
4076
- };
4077
- convert.gray.hsv = convert.gray.hsl;
4078
- convert.gray.hwb = function(gray) {
4079
- return [
4080
- 0,
4081
- 100,
4082
- gray[0]
4083
- ];
4084
- };
4085
- convert.gray.cmyk = function(gray) {
4086
- return [
4087
- 0,
4088
- 0,
4089
- 0,
4090
- gray[0]
4091
- ];
4092
- };
4093
- convert.gray.lab = function(gray) {
4094
- return [
4095
- gray[0],
4096
- 0,
4097
- 0
4098
- ];
4099
- };
4100
- convert.gray.hex = function(gray) {
4101
- const val = Math.round(gray[0] / 100 * 255) & 255;
4102
- const string = ((val << 16) + (val << 8) + val).toString(16).toUpperCase();
4103
- return "000000".substring(string.length) + string;
4104
- };
4105
- convert.rgb.gray = function(rgb) {
4106
- return [(rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100];
4107
- };
4108
- }));
4109
- //#endregion
4110
- //#region node_modules/color-convert/route.js
4111
- var require_route = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
4112
- var conversions = require_conversions();
4113
- function buildGraph() {
4114
- const graph = {};
4115
- const models = Object.keys(conversions);
4116
- for (let len = models.length, i = 0; i < len; i++) graph[models[i]] = {
4117
- distance: -1,
4118
- parent: null
4119
- };
4120
- return graph;
4121
- }
4122
- function deriveBFS(fromModel) {
4123
- const graph = buildGraph();
4124
- const queue = [fromModel];
4125
- graph[fromModel].distance = 0;
4126
- while (queue.length) {
4127
- const current = queue.pop();
4128
- const adjacents = Object.keys(conversions[current]);
4129
- for (let len = adjacents.length, i = 0; i < len; i++) {
4130
- const adjacent = adjacents[i];
4131
- const node = graph[adjacent];
4132
- if (node.distance === -1) {
4133
- node.distance = graph[current].distance + 1;
4134
- node.parent = current;
4135
- queue.unshift(adjacent);
4136
- }
4137
- }
4138
- }
4139
- return graph;
4140
- }
4141
- function link(from, to) {
4142
- return function(args) {
4143
- return to(from(args));
4144
- };
4145
- }
4146
- function wrapConversion(toModel, graph) {
4147
- const path = [graph[toModel].parent, toModel];
4148
- let fn = conversions[graph[toModel].parent][toModel];
4149
- let cur = graph[toModel].parent;
4150
- while (graph[cur].parent) {
4151
- path.unshift(graph[cur].parent);
4152
- fn = link(conversions[graph[cur].parent][cur], fn);
4153
- cur = graph[cur].parent;
4154
- }
4155
- fn.conversion = path;
4156
- return fn;
850
+ })))(), 1);
851
+ var ANSI_BACKGROUND_OFFSET = 10;
852
+ var wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
853
+ var wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
854
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
855
+ var styles$1 = {
856
+ modifier: {
857
+ reset: [0, 0],
858
+ bold: [1, 22],
859
+ dim: [2, 22],
860
+ italic: [3, 23],
861
+ underline: [4, 24],
862
+ overline: [53, 55],
863
+ inverse: [7, 27],
864
+ hidden: [8, 28],
865
+ strikethrough: [9, 29]
866
+ },
867
+ color: {
868
+ black: [30, 39],
869
+ red: [31, 39],
870
+ green: [32, 39],
871
+ yellow: [33, 39],
872
+ blue: [34, 39],
873
+ magenta: [35, 39],
874
+ cyan: [36, 39],
875
+ white: [37, 39],
876
+ blackBright: [90, 39],
877
+ gray: [90, 39],
878
+ grey: [90, 39],
879
+ redBright: [91, 39],
880
+ greenBright: [92, 39],
881
+ yellowBright: [93, 39],
882
+ blueBright: [94, 39],
883
+ magentaBright: [95, 39],
884
+ cyanBright: [96, 39],
885
+ whiteBright: [97, 39]
886
+ },
887
+ bgColor: {
888
+ bgBlack: [40, 49],
889
+ bgRed: [41, 49],
890
+ bgGreen: [42, 49],
891
+ bgYellow: [43, 49],
892
+ bgBlue: [44, 49],
893
+ bgMagenta: [45, 49],
894
+ bgCyan: [46, 49],
895
+ bgWhite: [47, 49],
896
+ bgBlackBright: [100, 49],
897
+ bgGray: [100, 49],
898
+ bgGrey: [100, 49],
899
+ bgRedBright: [101, 49],
900
+ bgGreenBright: [102, 49],
901
+ bgYellowBright: [103, 49],
902
+ bgBlueBright: [104, 49],
903
+ bgMagentaBright: [105, 49],
904
+ bgCyanBright: [106, 49],
905
+ bgWhiteBright: [107, 49]
4157
906
  }
4158
- module.exports = function(fromModel) {
4159
- const graph = deriveBFS(fromModel);
4160
- const conversion = {};
4161
- const models = Object.keys(graph);
4162
- for (let len = models.length, i = 0; i < len; i++) {
4163
- const toModel = models[i];
4164
- if (graph[toModel].parent === null) continue;
4165
- conversion[toModel] = wrapConversion(toModel, graph);
907
+ };
908
+ Object.keys(styles$1.modifier);
909
+ var foregroundColorNames = Object.keys(styles$1.color);
910
+ var backgroundColorNames = Object.keys(styles$1.bgColor);
911
+ [...foregroundColorNames, ...backgroundColorNames];
912
+ function assembleStyles() {
913
+ const codes = /* @__PURE__ */ new Map();
914
+ for (const [groupName, group] of Object.entries(styles$1)) {
915
+ for (const [styleName, style] of Object.entries(group)) {
916
+ styles$1[styleName] = {
917
+ open: `\u001B[${style[0]}m`,
918
+ close: `\u001B[${style[1]}m`
919
+ };
920
+ group[styleName] = styles$1[styleName];
921
+ codes.set(style[0], style[1]);
4166
922
  }
4167
- return conversion;
4168
- };
4169
- }));
4170
- //#endregion
4171
- //#region node_modules/color-convert/index.js
4172
- var require_color_convert = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
4173
- var conversions = require_conversions();
4174
- var route = require_route();
4175
- var convert = {};
4176
- var models = Object.keys(conversions);
4177
- function wrapRaw(fn) {
4178
- const wrappedFn = function(...args) {
4179
- const arg0 = args[0];
4180
- if (arg0 === void 0 || arg0 === null) return arg0;
4181
- if (arg0.length > 1) args = arg0;
4182
- return fn(args);
4183
- };
4184
- if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
4185
- return wrappedFn;
4186
- }
4187
- function wrapRounded(fn) {
4188
- const wrappedFn = function(...args) {
4189
- const arg0 = args[0];
4190
- if (arg0 === void 0 || arg0 === null) return arg0;
4191
- if (arg0.length > 1) args = arg0;
4192
- const result = fn(args);
4193
- if (typeof result === "object") for (let len = result.length, i = 0; i < len; i++) result[i] = Math.round(result[i]);
4194
- return result;
4195
- };
4196
- if ("conversion" in fn) wrappedFn.conversion = fn.conversion;
4197
- return wrappedFn;
4198
- }
4199
- models.forEach((fromModel) => {
4200
- convert[fromModel] = {};
4201
- Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
4202
- Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
4203
- const routes = route(fromModel);
4204
- Object.keys(routes).forEach((toModel) => {
4205
- const fn = routes[toModel];
4206
- convert[fromModel][toModel] = wrapRounded(fn);
4207
- convert[fromModel][toModel].raw = wrapRaw(fn);
923
+ Object.defineProperty(styles$1, groupName, {
924
+ value: group,
925
+ enumerable: false
4208
926
  });
927
+ }
928
+ Object.defineProperty(styles$1, "codes", {
929
+ value: codes,
930
+ enumerable: false
4209
931
  });
4210
- module.exports = convert;
4211
- }));
4212
- //#endregion
4213
- //#region node_modules/ansi-styles/index.js
4214
- var require_ansi_styles = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
4215
- var wrapAnsi16 = (fn, offset) => (...args) => {
4216
- return `\u001B[${fn(...args) + offset}m`;
4217
- };
4218
- var wrapAnsi256 = (fn, offset) => (...args) => {
4219
- const code = fn(...args);
4220
- return `\u001B[${38 + offset};5;${code}m`;
4221
- };
4222
- var wrapAnsi16m = (fn, offset) => (...args) => {
4223
- const rgb = fn(...args);
4224
- return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
4225
- };
4226
- var ansi2ansi = (n) => n;
4227
- var rgb2rgb = (r, g, b) => [
4228
- r,
4229
- g,
4230
- b
4231
- ];
4232
- var setLazyProperty = (object, property, get) => {
4233
- Object.defineProperty(object, property, {
4234
- get: () => {
4235
- const value = get();
4236
- Object.defineProperty(object, property, {
4237
- value,
4238
- enumerable: true,
4239
- configurable: true
4240
- });
4241
- return value;
932
+ styles$1.color.close = "\x1B[39m";
933
+ styles$1.bgColor.close = "\x1B[49m";
934
+ styles$1.color.ansi = wrapAnsi16();
935
+ styles$1.color.ansi256 = wrapAnsi256();
936
+ styles$1.color.ansi16m = wrapAnsi16m();
937
+ styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
938
+ styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
939
+ styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
940
+ Object.defineProperties(styles$1, {
941
+ rgbToAnsi256: {
942
+ value(red, green, blue) {
943
+ if (red === green && green === blue) {
944
+ if (red < 8) return 16;
945
+ if (red > 248) return 231;
946
+ return Math.round((red - 8) / 247 * 24) + 232;
947
+ }
948
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
4242
949
  },
4243
- enumerable: true,
4244
- configurable: true
4245
- });
4246
- };
4247
- /** @type {typeof import('color-convert')} */
4248
- var colorConvert;
4249
- var makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
4250
- if (colorConvert === void 0) colorConvert = require_color_convert();
4251
- const offset = isBackground ? 10 : 0;
4252
- const styles = {};
4253
- for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
4254
- const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
4255
- if (sourceSpace === targetSpace) styles[name] = wrap(identity, offset);
4256
- else if (typeof suite === "object") styles[name] = wrap(suite[targetSpace], offset);
4257
- }
4258
- return styles;
4259
- };
4260
- function assembleStyles() {
4261
- const codes = /* @__PURE__ */ new Map();
4262
- const styles = {
4263
- modifier: {
4264
- reset: [0, 0],
4265
- bold: [1, 22],
4266
- dim: [2, 22],
4267
- italic: [3, 23],
4268
- underline: [4, 24],
4269
- inverse: [7, 27],
4270
- hidden: [8, 28],
4271
- strikethrough: [9, 29]
950
+ enumerable: false
951
+ },
952
+ hexToRgb: {
953
+ value(hex) {
954
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
955
+ if (!matches) return [
956
+ 0,
957
+ 0,
958
+ 0
959
+ ];
960
+ let [colorString] = matches;
961
+ if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
962
+ const integer = Number.parseInt(colorString, 16);
963
+ return [
964
+ integer >> 16 & 255,
965
+ integer >> 8 & 255,
966
+ integer & 255
967
+ ];
4272
968
  },
4273
- color: {
4274
- black: [30, 39],
4275
- red: [31, 39],
4276
- green: [32, 39],
4277
- yellow: [33, 39],
4278
- blue: [34, 39],
4279
- magenta: [35, 39],
4280
- cyan: [36, 39],
4281
- white: [37, 39],
4282
- blackBright: [90, 39],
4283
- redBright: [91, 39],
4284
- greenBright: [92, 39],
4285
- yellowBright: [93, 39],
4286
- blueBright: [94, 39],
4287
- magentaBright: [95, 39],
4288
- cyanBright: [96, 39],
4289
- whiteBright: [97, 39]
969
+ enumerable: false
970
+ },
971
+ hexToAnsi256: {
972
+ value: (hex) => styles$1.rgbToAnsi256(...styles$1.hexToRgb(hex)),
973
+ enumerable: false
974
+ },
975
+ ansi256ToAnsi: {
976
+ value(code) {
977
+ if (code < 8) return 30 + code;
978
+ if (code < 16) return 90 + (code - 8);
979
+ let red;
980
+ let green;
981
+ let blue;
982
+ if (code >= 232) {
983
+ red = ((code - 232) * 10 + 8) / 255;
984
+ green = red;
985
+ blue = red;
986
+ } else {
987
+ code -= 16;
988
+ const remainder = code % 36;
989
+ red = Math.floor(code / 36) / 5;
990
+ green = Math.floor(remainder / 6) / 5;
991
+ blue = remainder % 6 / 5;
992
+ }
993
+ const value = Math.max(red, green, blue) * 2;
994
+ if (value === 0) return 30;
995
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
996
+ if (value === 2) result += 60;
997
+ return result;
4290
998
  },
4291
- bgColor: {
4292
- bgBlack: [40, 49],
4293
- bgRed: [41, 49],
4294
- bgGreen: [42, 49],
4295
- bgYellow: [43, 49],
4296
- bgBlue: [44, 49],
4297
- bgMagenta: [45, 49],
4298
- bgCyan: [46, 49],
4299
- bgWhite: [47, 49],
4300
- bgBlackBright: [100, 49],
4301
- bgRedBright: [101, 49],
4302
- bgGreenBright: [102, 49],
4303
- bgYellowBright: [103, 49],
4304
- bgBlueBright: [104, 49],
4305
- bgMagentaBright: [105, 49],
4306
- bgCyanBright: [106, 49],
4307
- bgWhiteBright: [107, 49]
4308
- }
4309
- };
4310
- styles.color.gray = styles.color.blackBright;
4311
- styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
4312
- styles.color.grey = styles.color.blackBright;
4313
- styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
4314
- for (const [groupName, group] of Object.entries(styles)) {
4315
- for (const [styleName, style] of Object.entries(group)) {
4316
- styles[styleName] = {
4317
- open: `\u001B[${style[0]}m`,
4318
- close: `\u001B[${style[1]}m`
4319
- };
4320
- group[styleName] = styles[styleName];
4321
- codes.set(style[0], style[1]);
4322
- }
4323
- Object.defineProperty(styles, groupName, {
4324
- value: group,
4325
- enumerable: false
4326
- });
4327
- }
4328
- Object.defineProperty(styles, "codes", {
4329
- value: codes,
4330
999
  enumerable: false
4331
- });
4332
- styles.color.close = "\x1B[39m";
4333
- styles.bgColor.close = "\x1B[49m";
4334
- setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
4335
- setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
4336
- setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
4337
- setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
4338
- setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
4339
- setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
4340
- return styles;
4341
- }
4342
- Object.defineProperty(module, "exports", {
4343
- enumerable: true,
4344
- get: assembleStyles
1000
+ },
1001
+ rgbToAnsi: {
1002
+ value: (red, green, blue) => styles$1.ansi256ToAnsi(styles$1.rgbToAnsi256(red, green, blue)),
1003
+ enumerable: false
1004
+ },
1005
+ hexToAnsi: {
1006
+ value: (hex) => styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex)),
1007
+ enumerable: false
1008
+ }
4345
1009
  });
4346
- }));
4347
- //#endregion
4348
- //#region node_modules/supports-color/browser.js
4349
- var require_browser = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
4350
- module.exports = {
4351
- stdout: false,
4352
- stderr: false
4353
- };
4354
- }));
4355
- //#endregion
4356
- //#region node_modules/chalk/source/util.js
4357
- var require_util = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
4358
- var stringReplaceAll = (string, substring, replacer) => {
4359
- let index = string.indexOf(substring);
4360
- if (index === -1) return string;
4361
- const substringLength = substring.length;
4362
- let endIndex = 0;
4363
- let returnValue = "";
4364
- do {
4365
- returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
4366
- endIndex = index + substringLength;
4367
- index = string.indexOf(substring, endIndex);
4368
- } while (index !== -1);
4369
- returnValue += string.substr(endIndex);
4370
- return returnValue;
4371
- };
4372
- var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
4373
- let endIndex = 0;
4374
- let returnValue = "";
4375
- do {
4376
- const gotCR = string[index - 1] === "\r";
4377
- returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
4378
- endIndex = index + 1;
4379
- index = string.indexOf("\n", endIndex);
4380
- } while (index !== -1);
4381
- returnValue += string.substr(endIndex);
4382
- return returnValue;
4383
- };
4384
- module.exports = {
4385
- stringReplaceAll,
4386
- stringEncaseCRLFWithFirstIndex
4387
- };
4388
- }));
1010
+ return styles$1;
1011
+ }
1012
+ var ansiStyles = assembleStyles();
4389
1013
  //#endregion
4390
- //#region node_modules/chalk/source/templates.js
4391
- var require_templates = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
4392
- 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;
4393
- var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
4394
- var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
4395
- var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
4396
- var ESCAPES = new Map([
4397
- ["n", "\n"],
4398
- ["r", "\r"],
4399
- ["t", " "],
4400
- ["b", "\b"],
4401
- ["f", "\f"],
4402
- ["v", "\v"],
4403
- ["0", "\0"],
4404
- ["\\", "\\"],
4405
- ["e", "\x1B"],
4406
- ["a", "\x07"]
4407
- ]);
4408
- function unescape(c) {
4409
- const u = c[0] === "u";
4410
- const bracket = c[1] === "{";
4411
- if (u && !bracket && c.length === 5 || c[0] === "x" && c.length === 3) return String.fromCharCode(parseInt(c.slice(1), 16));
4412
- if (u && bracket) return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
4413
- return ESCAPES.get(c) || c;
1014
+ //#region node_modules/chalk/source/vendor/supports-color/browser.js
1015
+ var level = (() => {
1016
+ if (!("navigator" in globalThis)) return 0;
1017
+ if (globalThis.navigator.userAgentData) {
1018
+ const brand = navigator.userAgentData.brands.find(({ brand }) => brand === "Chromium");
1019
+ if (brand && brand.version > 93) return 3;
4414
1020
  }
4415
- function parseArguments(name, arguments_) {
4416
- const results = [];
4417
- const chunks = arguments_.trim().split(/\s*,\s*/g);
4418
- let matches;
4419
- for (const chunk of chunks) {
4420
- const number = Number(chunk);
4421
- if (!Number.isNaN(number)) results.push(number);
4422
- else if (matches = chunk.match(STRING_REGEX)) results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
4423
- else throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
4424
- }
4425
- return results;
4426
- }
4427
- function parseStyle(style) {
4428
- STYLE_REGEX.lastIndex = 0;
4429
- const results = [];
4430
- let matches;
4431
- while ((matches = STYLE_REGEX.exec(style)) !== null) {
4432
- const name = matches[1];
4433
- if (matches[2]) {
4434
- const args = parseArguments(name, matches[2]);
4435
- results.push([name].concat(args));
4436
- } else results.push([name]);
4437
- }
4438
- return results;
4439
- }
4440
- function buildStyle(chalk, styles) {
4441
- const enabled = {};
4442
- for (const layer of styles) for (const style of layer.styles) enabled[style[0]] = layer.inverse ? null : style.slice(1);
4443
- let current = chalk;
4444
- for (const [styleName, styles] of Object.entries(enabled)) {
4445
- if (!Array.isArray(styles)) continue;
4446
- if (!(styleName in current)) throw new Error(`Unknown Chalk style: ${styleName}`);
4447
- current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
4448
- }
4449
- return current;
4450
- }
4451
- module.exports = (chalk, temporary) => {
4452
- const styles = [];
4453
- const chunks = [];
4454
- let chunk = [];
4455
- temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
4456
- if (escapeCharacter) chunk.push(unescape(escapeCharacter));
4457
- else if (style) {
4458
- const string = chunk.join("");
4459
- chunk = [];
4460
- chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
4461
- styles.push({
4462
- inverse,
4463
- styles: parseStyle(style)
4464
- });
4465
- } else if (close) {
4466
- if (styles.length === 0) throw new Error("Found extraneous } in Chalk template literal");
4467
- chunks.push(buildStyle(chalk, styles)(chunk.join("")));
4468
- chunk = [];
4469
- styles.pop();
4470
- } else chunk.push(character);
4471
- });
4472
- chunks.push(chunk.join(""));
4473
- if (styles.length > 0) {
4474
- const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
4475
- throw new Error(errMessage);
4476
- }
4477
- return chunks.join("");
4478
- };
4479
- }));
1021
+ if (/\b(Chrome|Chromium)\//.test(globalThis.navigator.userAgent)) return 1;
1022
+ return 0;
1023
+ })();
1024
+ var colorSupport = level !== 0 && {
1025
+ level,
1026
+ hasBasic: true,
1027
+ has256: level >= 2,
1028
+ has16m: level >= 3
1029
+ };
1030
+ var supportsColor = {
1031
+ stdout: colorSupport,
1032
+ stderr: colorSupport
1033
+ };
1034
+ //#endregion
1035
+ //#region node_modules/chalk/source/utilities.js
1036
+ function stringReplaceAll(string, substring, replacer) {
1037
+ let index = string.indexOf(substring);
1038
+ if (index === -1) return string;
1039
+ const substringLength = substring.length;
1040
+ let endIndex = 0;
1041
+ let returnValue = "";
1042
+ do {
1043
+ returnValue += string.slice(endIndex, index) + substring + replacer;
1044
+ endIndex = index + substringLength;
1045
+ index = string.indexOf(substring, endIndex);
1046
+ } while (index !== -1);
1047
+ returnValue += string.slice(endIndex);
1048
+ return returnValue;
1049
+ }
1050
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
1051
+ let endIndex = 0;
1052
+ let returnValue = "";
1053
+ do {
1054
+ const gotCR = string[index - 1] === "\r";
1055
+ returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
1056
+ endIndex = index + 1;
1057
+ index = string.indexOf("\n", endIndex);
1058
+ } while (index !== -1);
1059
+ returnValue += string.slice(endIndex);
1060
+ return returnValue;
1061
+ }
4480
1062
  //#endregion
4481
1063
  //#region node_modules/chalk/source/index.js
4482
- var require_source = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
4483
- var ansiStyles = require_ansi_styles();
4484
- var { stdout: stdoutColor, stderr: stderrColor } = require_browser();
4485
- var { stringReplaceAll, stringEncaseCRLFWithFirstIndex } = require_util();
4486
- var { isArray } = Array;
4487
- var levelMapping = [
4488
- "ansi",
4489
- "ansi",
4490
- "ansi256",
4491
- "ansi16m"
4492
- ];
4493
- var styles = Object.create(null);
4494
- var applyOptions = (object, options = {}) => {
4495
- 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");
4496
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
4497
- object.level = options.level === void 0 ? colorLevel : options.level;
4498
- };
4499
- var ChalkClass = class {
4500
- constructor(options) {
4501
- return chalkFactory(options);
4502
- }
4503
- };
4504
- var chalkFactory = (options) => {
4505
- const chalk = {};
4506
- applyOptions(chalk, options);
4507
- chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
4508
- Object.setPrototypeOf(chalk, Chalk.prototype);
4509
- Object.setPrototypeOf(chalk.template, chalk);
4510
- chalk.template.constructor = () => {
4511
- throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
4512
- };
4513
- chalk.template.Instance = ChalkClass;
4514
- return chalk.template;
4515
- };
4516
- function Chalk(options) {
4517
- return chalkFactory(options);
1064
+ var { stdout: stdoutColor, stderr: stderrColor } = supportsColor;
1065
+ var GENERATOR = Symbol("GENERATOR");
1066
+ var STYLER = Symbol("STYLER");
1067
+ var IS_EMPTY = Symbol("IS_EMPTY");
1068
+ var levelMapping = [
1069
+ "ansi",
1070
+ "ansi",
1071
+ "ansi256",
1072
+ "ansi16m"
1073
+ ];
1074
+ var styles = Object.create(null);
1075
+ var applyOptions = (object, options = {}) => {
1076
+ 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");
1077
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
1078
+ object.level = options.level === void 0 ? colorLevel : options.level;
1079
+ };
1080
+ var chalkFactory = (options) => {
1081
+ const chalk = (...strings) => strings.join(" ");
1082
+ applyOptions(chalk, options);
1083
+ Object.setPrototypeOf(chalk, createChalk.prototype);
1084
+ return chalk;
1085
+ };
1086
+ function createChalk(options) {
1087
+ return chalkFactory(options);
1088
+ }
1089
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
1090
+ for (const [styleName, style] of Object.entries(ansiStyles)) styles[styleName] = { get() {
1091
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
1092
+ Object.defineProperty(this, styleName, { value: builder });
1093
+ return builder;
1094
+ } };
1095
+ styles.visible = { get() {
1096
+ const builder = createBuilder(this, this[STYLER], true);
1097
+ Object.defineProperty(this, "visible", { value: builder });
1098
+ return builder;
1099
+ } };
1100
+ var getModelAnsi = (model, level, type, ...arguments_) => {
1101
+ if (model === "rgb") {
1102
+ if (level === "ansi16m") return ansiStyles[type].ansi16m(...arguments_);
1103
+ if (level === "ansi256") return ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));
1104
+ return ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));
4518
1105
  }
4519
- for (const [styleName, style] of Object.entries(ansiStyles)) styles[styleName] = { get() {
4520
- const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
4521
- Object.defineProperty(this, styleName, { value: builder });
4522
- return builder;
4523
- } };
4524
- styles.visible = { get() {
4525
- const builder = createBuilder(this, this._styler, true);
4526
- Object.defineProperty(this, "visible", { value: builder });
4527
- return builder;
4528
- } };
4529
- var usedModels = [
4530
- "rgb",
4531
- "hex",
4532
- "keyword",
4533
- "hsl",
4534
- "hsv",
4535
- "hwb",
4536
- "ansi",
4537
- "ansi256"
4538
- ];
4539
- for (const model of usedModels) styles[model] = { get() {
1106
+ if (model === "hex") return getModelAnsi("rgb", level, type, ...ansiStyles.hexToRgb(...arguments_));
1107
+ return ansiStyles[type][model](...arguments_);
1108
+ };
1109
+ for (const model of [
1110
+ "rgb",
1111
+ "hex",
1112
+ "ansi256"
1113
+ ]) {
1114
+ styles[model] = { get() {
4540
1115
  const { level } = this;
4541
1116
  return function(...arguments_) {
4542
- const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
4543
- return createBuilder(this, styler, this._isEmpty);
1117
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansiStyles.color.close, this[STYLER]);
1118
+ return createBuilder(this, styler, this[IS_EMPTY]);
4544
1119
  };
4545
1120
  } };
4546
- for (const model of usedModels) {
4547
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
4548
- styles[bgModel] = { get() {
4549
- const { level } = this;
4550
- return function(...arguments_) {
4551
- const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
4552
- return createBuilder(this, styler, this._isEmpty);
4553
- };
4554
- } };
4555
- }
4556
- var proto = Object.defineProperties(() => {}, {
4557
- ...styles,
4558
- level: {
4559
- enumerable: true,
4560
- get() {
4561
- return this._generator.level;
4562
- },
4563
- set(level) {
4564
- this._generator.level = level;
4565
- }
4566
- }
4567
- });
4568
- var createStyler = (open, close, parent) => {
4569
- let openAll;
4570
- let closeAll;
4571
- if (parent === void 0) {
4572
- openAll = open;
4573
- closeAll = close;
4574
- } else {
4575
- openAll = parent.openAll + open;
4576
- closeAll = close + parent.closeAll;
4577
- }
4578
- return {
4579
- open,
4580
- close,
4581
- openAll,
4582
- closeAll,
4583
- parent
4584
- };
4585
- };
4586
- var createBuilder = (self, _styler, _isEmpty) => {
4587
- const builder = (...arguments_) => {
4588
- if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) return applyStyle(builder, chalkTag(builder, ...arguments_));
4589
- return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
1121
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
1122
+ styles[bgModel] = { get() {
1123
+ const { level } = this;
1124
+ return function(...arguments_) {
1125
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansiStyles.bgColor.close, this[STYLER]);
1126
+ return createBuilder(this, styler, this[IS_EMPTY]);
4590
1127
  };
4591
- Object.setPrototypeOf(builder, proto);
4592
- builder._generator = self;
4593
- builder._styler = _styler;
4594
- builder._isEmpty = _isEmpty;
4595
- return builder;
4596
- };
4597
- var applyStyle = (self, string) => {
4598
- if (self.level <= 0 || !string) return self._isEmpty ? "" : string;
4599
- let styler = self._styler;
4600
- if (styler === void 0) return string;
4601
- const { openAll, closeAll } = styler;
4602
- if (string.indexOf("\x1B") !== -1) while (styler !== void 0) {
4603
- string = stringReplaceAll(string, styler.close, styler.open);
4604
- styler = styler.parent;
1128
+ } };
1129
+ }
1130
+ var proto = Object.defineProperties(() => {}, {
1131
+ ...styles,
1132
+ level: {
1133
+ enumerable: true,
1134
+ get() {
1135
+ return this[GENERATOR].level;
1136
+ },
1137
+ set(level) {
1138
+ this[GENERATOR].level = level;
4605
1139
  }
4606
- const lfIndex = string.indexOf("\n");
4607
- if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
4608
- return openAll + string + closeAll;
4609
- };
4610
- var template;
4611
- var chalkTag = (chalk, ...strings) => {
4612
- const [firstString] = strings;
4613
- if (!isArray(firstString) || !isArray(firstString.raw)) return strings.join(" ");
4614
- const arguments_ = strings.slice(1);
4615
- const parts = [firstString.raw[0]];
4616
- for (let i = 1; i < firstString.length; i++) parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i]));
4617
- if (template === void 0) template = require_templates();
4618
- return template(chalk, parts.join(""));
1140
+ }
1141
+ });
1142
+ var createStyler = (open, close, parent) => {
1143
+ let openAll;
1144
+ let closeAll;
1145
+ if (parent === void 0) {
1146
+ openAll = open;
1147
+ closeAll = close;
1148
+ } else {
1149
+ openAll = parent.openAll + open;
1150
+ closeAll = close + parent.closeAll;
1151
+ }
1152
+ return {
1153
+ open,
1154
+ close,
1155
+ openAll,
1156
+ closeAll,
1157
+ parent
4619
1158
  };
4620
- Object.defineProperties(Chalk.prototype, styles);
4621
- var chalk = Chalk();
4622
- chalk.supportsColor = stdoutColor;
4623
- chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
4624
- chalk.stderr.supportsColor = stderrColor;
4625
- module.exports = chalk;
4626
- }));
1159
+ };
1160
+ var createBuilder = (self, _styler, _isEmpty) => {
1161
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
1162
+ Object.setPrototypeOf(builder, proto);
1163
+ builder[GENERATOR] = self;
1164
+ builder[STYLER] = _styler;
1165
+ builder[IS_EMPTY] = _isEmpty;
1166
+ return builder;
1167
+ };
1168
+ var applyStyle = (self, string) => {
1169
+ if (self.level <= 0 || !string) return self[IS_EMPTY] ? "" : string;
1170
+ let styler = self[STYLER];
1171
+ if (styler === void 0) return string;
1172
+ const { openAll, closeAll } = styler;
1173
+ if (string.includes("\x1B")) while (styler !== void 0) {
1174
+ string = stringReplaceAll(string, styler.close, styler.open);
1175
+ styler = styler.parent;
1176
+ }
1177
+ const lfIndex = string.indexOf("\n");
1178
+ if (lfIndex !== -1) string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
1179
+ return openAll + string + closeAll;
1180
+ };
1181
+ Object.defineProperties(createChalk.prototype, styles);
1182
+ var chalk = createChalk();
1183
+ createChalk({ level: stderrColor ? stderrColor.level : 0 });
4627
1184
  //#endregion
4628
1185
  //#region node_modules/http-status-codes/build/es/status-codes.js
4629
1186
  var StatusCodes;
@@ -4985,8 +1542,6 @@ var StatusCodes;
4985
1542
  })(StatusCodes || (StatusCodes = {}));
4986
1543
  //#endregion
4987
1544
  //#region src/axiosClient.ts
4988
- var import_browser = /* @__PURE__ */ __toESM$1(require_browser$1());
4989
- var import_source = /* @__PURE__ */ __toESM$1(require_source());
4990
1545
  var AxiosClient = class {
4991
1546
  #options;
4992
1547
  #DUMMY_USER = "USR_user01@stsmda.com.au";
@@ -5017,21 +1572,21 @@ var AxiosClient = class {
5017
1572
  this.#options.logger.error(message);
5018
1573
  };
5019
1574
  HandleError = (error) => {
5020
- this.#LogDebugMessage(import_source.default.red(`HandleError(): Error: [${error}]`));
1575
+ this.#LogDebugMessage(chalk.red(`HandleError(): Error: [${error}]`));
5021
1576
  let responseCode = 500;
5022
1577
  if (axios.isAxiosError(error)) {
5023
1578
  const axiosError = error;
5024
1579
  if (axiosError.response) {
5025
1580
  responseCode = axiosError.response.status;
5026
- this.#LogDebugMessage(import_source.default.red(`AXIOS Error Response.Status = [${axiosError.response.status}]`));
5027
- if (axiosError.response.headers) this.#LogErrorMessage(import_source.default.red(` headers: [${JSON.stringify(axiosError.response.headers)}]`));
5028
- if (axiosError.response.data) this.#LogErrorMessage(import_source.default.red(` data: [${JSON.stringify(axiosError.response.data)}]`));
1581
+ this.#LogDebugMessage(chalk.red(`AXIOS Error Response.Status = [${axiosError.response.status}]`));
1582
+ if (axiosError.response.headers) this.#LogErrorMessage(chalk.red(` headers: [${JSON.stringify(axiosError.response.headers)}]`));
1583
+ if (axiosError.response.data) this.#LogErrorMessage(chalk.red(` data: [${JSON.stringify(axiosError.response.data)}]`));
5029
1584
  try {
5030
- if (axiosError.response.config) this.#LogErrorMessage(import_source.default.red(` config: [${JSON.stringify(axiosError.response.config)}]`));
1585
+ if (axiosError.response.config) this.#LogErrorMessage(chalk.red(` config: [${JSON.stringify(axiosError.response.config)}]`));
5031
1586
  } catch (innererror) {
5032
- this.#LogErrorMessage(import_source.default.red(` could not get response config, error: [${innererror}]`));
1587
+ this.#LogErrorMessage(chalk.red(` could not get response config, error: [${innererror}]`));
5033
1588
  }
5034
- } else this.#LogDebugMessage(import_source.default.red(`AXIOS Error = [${axiosError}]`));
1589
+ } else this.#LogDebugMessage(chalk.red(`AXIOS Error = [${axiosError}]`));
5035
1590
  }
5036
1591
  return responseCode;
5037
1592
  };