@abtnode/core 1.16.52-beta-20251005-235515-42ad5caf → 1.16.52-beta-20251008-091027-c46c73e3
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/lib/api/team.js +30 -16
- package/lib/blocklet/manager/disk.js +23 -9
- package/lib/blocklet/manager/helper/blue-green-start-blocklet.js +110 -101
- package/lib/blocklet/migration-dist/migration.cjs +457 -456
- package/lib/states/blocklet.js +7 -6
- package/lib/states/org.js +13 -11
- package/lib/util/blocklet.js +43 -38
- package/package.json +25 -24
|
@@ -862,6 +862,7 @@ module.exports = Object.freeze({
|
|
|
862
862
|
'https://*.didspaces.com',
|
|
863
863
|
'https://*.blocklet.dev',
|
|
864
864
|
'https://domain.didlabs.org',
|
|
865
|
+
'https://cdn.blocklet.io',
|
|
865
866
|
],
|
|
866
867
|
CSP_SYSTEM_SOURCES: [
|
|
867
868
|
'https://*.did.abtnet.io',
|
|
@@ -5431,457 +5432,11 @@ SafeBuffer.allocUnsafeSlow = function (size) {
|
|
|
5431
5432
|
|
|
5432
5433
|
/***/ }),
|
|
5433
5434
|
|
|
5434
|
-
/***/
|
|
5435
|
-
/***/ ((module) => {
|
|
5436
|
-
|
|
5437
|
-
"use strict";
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
module.exports = {
|
|
5441
|
-
"aliceblue": [240, 248, 255],
|
|
5442
|
-
"antiquewhite": [250, 235, 215],
|
|
5443
|
-
"aqua": [0, 255, 255],
|
|
5444
|
-
"aquamarine": [127, 255, 212],
|
|
5445
|
-
"azure": [240, 255, 255],
|
|
5446
|
-
"beige": [245, 245, 220],
|
|
5447
|
-
"bisque": [255, 228, 196],
|
|
5448
|
-
"black": [0, 0, 0],
|
|
5449
|
-
"blanchedalmond": [255, 235, 205],
|
|
5450
|
-
"blue": [0, 0, 255],
|
|
5451
|
-
"blueviolet": [138, 43, 226],
|
|
5452
|
-
"brown": [165, 42, 42],
|
|
5453
|
-
"burlywood": [222, 184, 135],
|
|
5454
|
-
"cadetblue": [95, 158, 160],
|
|
5455
|
-
"chartreuse": [127, 255, 0],
|
|
5456
|
-
"chocolate": [210, 105, 30],
|
|
5457
|
-
"coral": [255, 127, 80],
|
|
5458
|
-
"cornflowerblue": [100, 149, 237],
|
|
5459
|
-
"cornsilk": [255, 248, 220],
|
|
5460
|
-
"crimson": [220, 20, 60],
|
|
5461
|
-
"cyan": [0, 255, 255],
|
|
5462
|
-
"darkblue": [0, 0, 139],
|
|
5463
|
-
"darkcyan": [0, 139, 139],
|
|
5464
|
-
"darkgoldenrod": [184, 134, 11],
|
|
5465
|
-
"darkgray": [169, 169, 169],
|
|
5466
|
-
"darkgreen": [0, 100, 0],
|
|
5467
|
-
"darkgrey": [169, 169, 169],
|
|
5468
|
-
"darkkhaki": [189, 183, 107],
|
|
5469
|
-
"darkmagenta": [139, 0, 139],
|
|
5470
|
-
"darkolivegreen": [85, 107, 47],
|
|
5471
|
-
"darkorange": [255, 140, 0],
|
|
5472
|
-
"darkorchid": [153, 50, 204],
|
|
5473
|
-
"darkred": [139, 0, 0],
|
|
5474
|
-
"darksalmon": [233, 150, 122],
|
|
5475
|
-
"darkseagreen": [143, 188, 143],
|
|
5476
|
-
"darkslateblue": [72, 61, 139],
|
|
5477
|
-
"darkslategray": [47, 79, 79],
|
|
5478
|
-
"darkslategrey": [47, 79, 79],
|
|
5479
|
-
"darkturquoise": [0, 206, 209],
|
|
5480
|
-
"darkviolet": [148, 0, 211],
|
|
5481
|
-
"deeppink": [255, 20, 147],
|
|
5482
|
-
"deepskyblue": [0, 191, 255],
|
|
5483
|
-
"dimgray": [105, 105, 105],
|
|
5484
|
-
"dimgrey": [105, 105, 105],
|
|
5485
|
-
"dodgerblue": [30, 144, 255],
|
|
5486
|
-
"firebrick": [178, 34, 34],
|
|
5487
|
-
"floralwhite": [255, 250, 240],
|
|
5488
|
-
"forestgreen": [34, 139, 34],
|
|
5489
|
-
"fuchsia": [255, 0, 255],
|
|
5490
|
-
"gainsboro": [220, 220, 220],
|
|
5491
|
-
"ghostwhite": [248, 248, 255],
|
|
5492
|
-
"gold": [255, 215, 0],
|
|
5493
|
-
"goldenrod": [218, 165, 32],
|
|
5494
|
-
"gray": [128, 128, 128],
|
|
5495
|
-
"green": [0, 128, 0],
|
|
5496
|
-
"greenyellow": [173, 255, 47],
|
|
5497
|
-
"grey": [128, 128, 128],
|
|
5498
|
-
"honeydew": [240, 255, 240],
|
|
5499
|
-
"hotpink": [255, 105, 180],
|
|
5500
|
-
"indianred": [205, 92, 92],
|
|
5501
|
-
"indigo": [75, 0, 130],
|
|
5502
|
-
"ivory": [255, 255, 240],
|
|
5503
|
-
"khaki": [240, 230, 140],
|
|
5504
|
-
"lavender": [230, 230, 250],
|
|
5505
|
-
"lavenderblush": [255, 240, 245],
|
|
5506
|
-
"lawngreen": [124, 252, 0],
|
|
5507
|
-
"lemonchiffon": [255, 250, 205],
|
|
5508
|
-
"lightblue": [173, 216, 230],
|
|
5509
|
-
"lightcoral": [240, 128, 128],
|
|
5510
|
-
"lightcyan": [224, 255, 255],
|
|
5511
|
-
"lightgoldenrodyellow": [250, 250, 210],
|
|
5512
|
-
"lightgray": [211, 211, 211],
|
|
5513
|
-
"lightgreen": [144, 238, 144],
|
|
5514
|
-
"lightgrey": [211, 211, 211],
|
|
5515
|
-
"lightpink": [255, 182, 193],
|
|
5516
|
-
"lightsalmon": [255, 160, 122],
|
|
5517
|
-
"lightseagreen": [32, 178, 170],
|
|
5518
|
-
"lightskyblue": [135, 206, 250],
|
|
5519
|
-
"lightslategray": [119, 136, 153],
|
|
5520
|
-
"lightslategrey": [119, 136, 153],
|
|
5521
|
-
"lightsteelblue": [176, 196, 222],
|
|
5522
|
-
"lightyellow": [255, 255, 224],
|
|
5523
|
-
"lime": [0, 255, 0],
|
|
5524
|
-
"limegreen": [50, 205, 50],
|
|
5525
|
-
"linen": [250, 240, 230],
|
|
5526
|
-
"magenta": [255, 0, 255],
|
|
5527
|
-
"maroon": [128, 0, 0],
|
|
5528
|
-
"mediumaquamarine": [102, 205, 170],
|
|
5529
|
-
"mediumblue": [0, 0, 205],
|
|
5530
|
-
"mediumorchid": [186, 85, 211],
|
|
5531
|
-
"mediumpurple": [147, 112, 219],
|
|
5532
|
-
"mediumseagreen": [60, 179, 113],
|
|
5533
|
-
"mediumslateblue": [123, 104, 238],
|
|
5534
|
-
"mediumspringgreen": [0, 250, 154],
|
|
5535
|
-
"mediumturquoise": [72, 209, 204],
|
|
5536
|
-
"mediumvioletred": [199, 21, 133],
|
|
5537
|
-
"midnightblue": [25, 25, 112],
|
|
5538
|
-
"mintcream": [245, 255, 250],
|
|
5539
|
-
"mistyrose": [255, 228, 225],
|
|
5540
|
-
"moccasin": [255, 228, 181],
|
|
5541
|
-
"navajowhite": [255, 222, 173],
|
|
5542
|
-
"navy": [0, 0, 128],
|
|
5543
|
-
"oldlace": [253, 245, 230],
|
|
5544
|
-
"olive": [128, 128, 0],
|
|
5545
|
-
"olivedrab": [107, 142, 35],
|
|
5546
|
-
"orange": [255, 165, 0],
|
|
5547
|
-
"orangered": [255, 69, 0],
|
|
5548
|
-
"orchid": [218, 112, 214],
|
|
5549
|
-
"palegoldenrod": [238, 232, 170],
|
|
5550
|
-
"palegreen": [152, 251, 152],
|
|
5551
|
-
"paleturquoise": [175, 238, 238],
|
|
5552
|
-
"palevioletred": [219, 112, 147],
|
|
5553
|
-
"papayawhip": [255, 239, 213],
|
|
5554
|
-
"peachpuff": [255, 218, 185],
|
|
5555
|
-
"peru": [205, 133, 63],
|
|
5556
|
-
"pink": [255, 192, 203],
|
|
5557
|
-
"plum": [221, 160, 221],
|
|
5558
|
-
"powderblue": [176, 224, 230],
|
|
5559
|
-
"purple": [128, 0, 128],
|
|
5560
|
-
"rebeccapurple": [102, 51, 153],
|
|
5561
|
-
"red": [255, 0, 0],
|
|
5562
|
-
"rosybrown": [188, 143, 143],
|
|
5563
|
-
"royalblue": [65, 105, 225],
|
|
5564
|
-
"saddlebrown": [139, 69, 19],
|
|
5565
|
-
"salmon": [250, 128, 114],
|
|
5566
|
-
"sandybrown": [244, 164, 96],
|
|
5567
|
-
"seagreen": [46, 139, 87],
|
|
5568
|
-
"seashell": [255, 245, 238],
|
|
5569
|
-
"sienna": [160, 82, 45],
|
|
5570
|
-
"silver": [192, 192, 192],
|
|
5571
|
-
"skyblue": [135, 206, 235],
|
|
5572
|
-
"slateblue": [106, 90, 205],
|
|
5573
|
-
"slategray": [112, 128, 144],
|
|
5574
|
-
"slategrey": [112, 128, 144],
|
|
5575
|
-
"snow": [255, 250, 250],
|
|
5576
|
-
"springgreen": [0, 255, 127],
|
|
5577
|
-
"steelblue": [70, 130, 180],
|
|
5578
|
-
"tan": [210, 180, 140],
|
|
5579
|
-
"teal": [0, 128, 128],
|
|
5580
|
-
"thistle": [216, 191, 216],
|
|
5581
|
-
"tomato": [255, 99, 71],
|
|
5582
|
-
"turquoise": [64, 224, 208],
|
|
5583
|
-
"violet": [238, 130, 238],
|
|
5584
|
-
"wheat": [245, 222, 179],
|
|
5585
|
-
"white": [255, 255, 255],
|
|
5586
|
-
"whitesmoke": [245, 245, 245],
|
|
5587
|
-
"yellow": [255, 255, 0],
|
|
5588
|
-
"yellowgreen": [154, 205, 50]
|
|
5589
|
-
};
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
/***/ }),
|
|
5593
|
-
|
|
5594
|
-
/***/ 9407:
|
|
5595
|
-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5596
|
-
|
|
5597
|
-
/* MIT license */
|
|
5598
|
-
var colorNames = __nccwpck_require__(4953);
|
|
5599
|
-
var swizzle = __nccwpck_require__(4421);
|
|
5600
|
-
var hasOwnProperty = Object.hasOwnProperty;
|
|
5601
|
-
|
|
5602
|
-
var reverseNames = Object.create(null);
|
|
5603
|
-
|
|
5604
|
-
// create a list of reverse color names
|
|
5605
|
-
for (var name in colorNames) {
|
|
5606
|
-
if (hasOwnProperty.call(colorNames, name)) {
|
|
5607
|
-
reverseNames[colorNames[name]] = name;
|
|
5608
|
-
}
|
|
5609
|
-
}
|
|
5610
|
-
|
|
5611
|
-
var cs = module.exports = {
|
|
5612
|
-
to: {},
|
|
5613
|
-
get: {}
|
|
5614
|
-
};
|
|
5615
|
-
|
|
5616
|
-
cs.get = function (string) {
|
|
5617
|
-
var prefix = string.substring(0, 3).toLowerCase();
|
|
5618
|
-
var val;
|
|
5619
|
-
var model;
|
|
5620
|
-
switch (prefix) {
|
|
5621
|
-
case 'hsl':
|
|
5622
|
-
val = cs.get.hsl(string);
|
|
5623
|
-
model = 'hsl';
|
|
5624
|
-
break;
|
|
5625
|
-
case 'hwb':
|
|
5626
|
-
val = cs.get.hwb(string);
|
|
5627
|
-
model = 'hwb';
|
|
5628
|
-
break;
|
|
5629
|
-
default:
|
|
5630
|
-
val = cs.get.rgb(string);
|
|
5631
|
-
model = 'rgb';
|
|
5632
|
-
break;
|
|
5633
|
-
}
|
|
5634
|
-
|
|
5635
|
-
if (!val) {
|
|
5636
|
-
return null;
|
|
5637
|
-
}
|
|
5638
|
-
|
|
5639
|
-
return {model: model, value: val};
|
|
5640
|
-
};
|
|
5641
|
-
|
|
5642
|
-
cs.get.rgb = function (string) {
|
|
5643
|
-
if (!string) {
|
|
5644
|
-
return null;
|
|
5645
|
-
}
|
|
5646
|
-
|
|
5647
|
-
var abbr = /^#([a-f0-9]{3,4})$/i;
|
|
5648
|
-
var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;
|
|
5649
|
-
var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
|
|
5650
|
-
var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
|
|
5651
|
-
var keyword = /^(\w+)$/;
|
|
5652
|
-
|
|
5653
|
-
var rgb = [0, 0, 0, 1];
|
|
5654
|
-
var match;
|
|
5655
|
-
var i;
|
|
5656
|
-
var hexAlpha;
|
|
5657
|
-
|
|
5658
|
-
if (match = string.match(hex)) {
|
|
5659
|
-
hexAlpha = match[2];
|
|
5660
|
-
match = match[1];
|
|
5661
|
-
|
|
5662
|
-
for (i = 0; i < 3; i++) {
|
|
5663
|
-
// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19
|
|
5664
|
-
var i2 = i * 2;
|
|
5665
|
-
rgb[i] = parseInt(match.slice(i2, i2 + 2), 16);
|
|
5666
|
-
}
|
|
5667
|
-
|
|
5668
|
-
if (hexAlpha) {
|
|
5669
|
-
rgb[3] = parseInt(hexAlpha, 16) / 255;
|
|
5670
|
-
}
|
|
5671
|
-
} else if (match = string.match(abbr)) {
|
|
5672
|
-
match = match[1];
|
|
5673
|
-
hexAlpha = match[3];
|
|
5674
|
-
|
|
5675
|
-
for (i = 0; i < 3; i++) {
|
|
5676
|
-
rgb[i] = parseInt(match[i] + match[i], 16);
|
|
5677
|
-
}
|
|
5678
|
-
|
|
5679
|
-
if (hexAlpha) {
|
|
5680
|
-
rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;
|
|
5681
|
-
}
|
|
5682
|
-
} else if (match = string.match(rgba)) {
|
|
5683
|
-
for (i = 0; i < 3; i++) {
|
|
5684
|
-
rgb[i] = parseInt(match[i + 1], 0);
|
|
5685
|
-
}
|
|
5686
|
-
|
|
5687
|
-
if (match[4]) {
|
|
5688
|
-
if (match[5]) {
|
|
5689
|
-
rgb[3] = parseFloat(match[4]) * 0.01;
|
|
5690
|
-
} else {
|
|
5691
|
-
rgb[3] = parseFloat(match[4]);
|
|
5692
|
-
}
|
|
5693
|
-
}
|
|
5694
|
-
} else if (match = string.match(per)) {
|
|
5695
|
-
for (i = 0; i < 3; i++) {
|
|
5696
|
-
rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
|
|
5697
|
-
}
|
|
5698
|
-
|
|
5699
|
-
if (match[4]) {
|
|
5700
|
-
if (match[5]) {
|
|
5701
|
-
rgb[3] = parseFloat(match[4]) * 0.01;
|
|
5702
|
-
} else {
|
|
5703
|
-
rgb[3] = parseFloat(match[4]);
|
|
5704
|
-
}
|
|
5705
|
-
}
|
|
5706
|
-
} else if (match = string.match(keyword)) {
|
|
5707
|
-
if (match[1] === 'transparent') {
|
|
5708
|
-
return [0, 0, 0, 0];
|
|
5709
|
-
}
|
|
5710
|
-
|
|
5711
|
-
if (!hasOwnProperty.call(colorNames, match[1])) {
|
|
5712
|
-
return null;
|
|
5713
|
-
}
|
|
5714
|
-
|
|
5715
|
-
rgb = colorNames[match[1]];
|
|
5716
|
-
rgb[3] = 1;
|
|
5717
|
-
|
|
5718
|
-
return rgb;
|
|
5719
|
-
} else {
|
|
5720
|
-
return null;
|
|
5721
|
-
}
|
|
5722
|
-
|
|
5723
|
-
for (i = 0; i < 3; i++) {
|
|
5724
|
-
rgb[i] = clamp(rgb[i], 0, 255);
|
|
5725
|
-
}
|
|
5726
|
-
rgb[3] = clamp(rgb[3], 0, 1);
|
|
5727
|
-
|
|
5728
|
-
return rgb;
|
|
5729
|
-
};
|
|
5730
|
-
|
|
5731
|
-
cs.get.hsl = function (string) {
|
|
5732
|
-
if (!string) {
|
|
5733
|
-
return null;
|
|
5734
|
-
}
|
|
5735
|
-
|
|
5736
|
-
var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
|
|
5737
|
-
var match = string.match(hsl);
|
|
5738
|
-
|
|
5739
|
-
if (match) {
|
|
5740
|
-
var alpha = parseFloat(match[4]);
|
|
5741
|
-
var h = ((parseFloat(match[1]) % 360) + 360) % 360;
|
|
5742
|
-
var s = clamp(parseFloat(match[2]), 0, 100);
|
|
5743
|
-
var l = clamp(parseFloat(match[3]), 0, 100);
|
|
5744
|
-
var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
|
|
5745
|
-
|
|
5746
|
-
return [h, s, l, a];
|
|
5747
|
-
}
|
|
5748
|
-
|
|
5749
|
-
return null;
|
|
5750
|
-
};
|
|
5751
|
-
|
|
5752
|
-
cs.get.hwb = function (string) {
|
|
5753
|
-
if (!string) {
|
|
5754
|
-
return null;
|
|
5755
|
-
}
|
|
5756
|
-
|
|
5757
|
-
var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
|
|
5758
|
-
var match = string.match(hwb);
|
|
5759
|
-
|
|
5760
|
-
if (match) {
|
|
5761
|
-
var alpha = parseFloat(match[4]);
|
|
5762
|
-
var h = ((parseFloat(match[1]) % 360) + 360) % 360;
|
|
5763
|
-
var w = clamp(parseFloat(match[2]), 0, 100);
|
|
5764
|
-
var b = clamp(parseFloat(match[3]), 0, 100);
|
|
5765
|
-
var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
|
|
5766
|
-
return [h, w, b, a];
|
|
5767
|
-
}
|
|
5768
|
-
|
|
5769
|
-
return null;
|
|
5770
|
-
};
|
|
5771
|
-
|
|
5772
|
-
cs.to.hex = function () {
|
|
5773
|
-
var rgba = swizzle(arguments);
|
|
5774
|
-
|
|
5775
|
-
return (
|
|
5776
|
-
'#' +
|
|
5777
|
-
hexDouble(rgba[0]) +
|
|
5778
|
-
hexDouble(rgba[1]) +
|
|
5779
|
-
hexDouble(rgba[2]) +
|
|
5780
|
-
(rgba[3] < 1
|
|
5781
|
-
? (hexDouble(Math.round(rgba[3] * 255)))
|
|
5782
|
-
: '')
|
|
5783
|
-
);
|
|
5784
|
-
};
|
|
5785
|
-
|
|
5786
|
-
cs.to.rgb = function () {
|
|
5787
|
-
var rgba = swizzle(arguments);
|
|
5788
|
-
|
|
5789
|
-
return rgba.length < 4 || rgba[3] === 1
|
|
5790
|
-
? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'
|
|
5791
|
-
: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';
|
|
5792
|
-
};
|
|
5793
|
-
|
|
5794
|
-
cs.to.rgb.percent = function () {
|
|
5795
|
-
var rgba = swizzle(arguments);
|
|
5796
|
-
|
|
5797
|
-
var r = Math.round(rgba[0] / 255 * 100);
|
|
5798
|
-
var g = Math.round(rgba[1] / 255 * 100);
|
|
5799
|
-
var b = Math.round(rgba[2] / 255 * 100);
|
|
5800
|
-
|
|
5801
|
-
return rgba.length < 4 || rgba[3] === 1
|
|
5802
|
-
? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'
|
|
5803
|
-
: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';
|
|
5804
|
-
};
|
|
5805
|
-
|
|
5806
|
-
cs.to.hsl = function () {
|
|
5807
|
-
var hsla = swizzle(arguments);
|
|
5808
|
-
return hsla.length < 4 || hsla[3] === 1
|
|
5809
|
-
? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'
|
|
5810
|
-
: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';
|
|
5811
|
-
};
|
|
5812
|
-
|
|
5813
|
-
// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax
|
|
5814
|
-
// (hwb have alpha optional & 1 is default value)
|
|
5815
|
-
cs.to.hwb = function () {
|
|
5816
|
-
var hwba = swizzle(arguments);
|
|
5817
|
-
|
|
5818
|
-
var a = '';
|
|
5819
|
-
if (hwba.length >= 4 && hwba[3] !== 1) {
|
|
5820
|
-
a = ', ' + hwba[3];
|
|
5821
|
-
}
|
|
5822
|
-
|
|
5823
|
-
return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';
|
|
5824
|
-
};
|
|
5825
|
-
|
|
5826
|
-
cs.to.keyword = function (rgb) {
|
|
5827
|
-
return reverseNames[rgb.slice(0, 3)];
|
|
5828
|
-
};
|
|
5829
|
-
|
|
5830
|
-
// helpers
|
|
5831
|
-
function clamp(num, min, max) {
|
|
5832
|
-
return Math.min(Math.max(min, num), max);
|
|
5833
|
-
}
|
|
5834
|
-
|
|
5835
|
-
function hexDouble(num) {
|
|
5836
|
-
var str = Math.round(num).toString(16).toUpperCase();
|
|
5837
|
-
return (str.length < 2) ? '0' + str : str;
|
|
5838
|
-
}
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
/***/ }),
|
|
5842
|
-
|
|
5843
|
-
/***/ 8107:
|
|
5844
|
-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5845
|
-
|
|
5846
|
-
"use strict";
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
var color = __nccwpck_require__(1696)
|
|
5850
|
-
, hex = __nccwpck_require__(5143);
|
|
5851
|
-
|
|
5852
|
-
/**
|
|
5853
|
-
* Generate a color for a given name. But be reasonably smart about it by
|
|
5854
|
-
* understanding name spaces and coloring each namespace a bit lighter so they
|
|
5855
|
-
* still have the same base color as the root.
|
|
5856
|
-
*
|
|
5857
|
-
* @param {string} namespace The namespace
|
|
5858
|
-
* @param {string} [delimiter] The delimiter
|
|
5859
|
-
* @returns {string} color
|
|
5860
|
-
*/
|
|
5861
|
-
module.exports = function colorspace(namespace, delimiter) {
|
|
5862
|
-
var split = namespace.split(delimiter || ':');
|
|
5863
|
-
var base = hex(split[0]);
|
|
5864
|
-
|
|
5865
|
-
if (!split.length) return base;
|
|
5866
|
-
|
|
5867
|
-
for (var i = 0, l = split.length - 1; i < l; i++) {
|
|
5868
|
-
base = color(base)
|
|
5869
|
-
.mix(color(hex(split[i + 1])))
|
|
5870
|
-
.saturate(1)
|
|
5871
|
-
.hex();
|
|
5872
|
-
}
|
|
5873
|
-
|
|
5874
|
-
return base;
|
|
5875
|
-
};
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
/***/ }),
|
|
5879
|
-
|
|
5880
|
-
/***/ 4618:
|
|
5435
|
+
/***/ 6872:
|
|
5881
5436
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
5882
5437
|
|
|
5883
5438
|
/* MIT license */
|
|
5884
|
-
var cssKeywords = __nccwpck_require__(
|
|
5439
|
+
var cssKeywords = __nccwpck_require__(7888);
|
|
5885
5440
|
|
|
5886
5441
|
// NOTE: conversions should only return primitive values (i.e. arrays, or
|
|
5887
5442
|
// values that give correct `typeof` results).
|
|
@@ -6752,11 +6307,11 @@ convert.rgb.gray = function (rgb) {
|
|
|
6752
6307
|
|
|
6753
6308
|
/***/ }),
|
|
6754
6309
|
|
|
6755
|
-
/***/
|
|
6310
|
+
/***/ 4185:
|
|
6756
6311
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
6757
6312
|
|
|
6758
|
-
var conversions = __nccwpck_require__(
|
|
6759
|
-
var route = __nccwpck_require__(
|
|
6313
|
+
var conversions = __nccwpck_require__(6872);
|
|
6314
|
+
var route = __nccwpck_require__(4200);
|
|
6760
6315
|
|
|
6761
6316
|
var convert = {};
|
|
6762
6317
|
|
|
@@ -6837,10 +6392,170 @@ module.exports = convert;
|
|
|
6837
6392
|
|
|
6838
6393
|
/***/ }),
|
|
6839
6394
|
|
|
6840
|
-
/***/
|
|
6395
|
+
/***/ 7888:
|
|
6396
|
+
/***/ ((module) => {
|
|
6397
|
+
|
|
6398
|
+
"use strict";
|
|
6399
|
+
|
|
6400
|
+
|
|
6401
|
+
module.exports = {
|
|
6402
|
+
"aliceblue": [240, 248, 255],
|
|
6403
|
+
"antiquewhite": [250, 235, 215],
|
|
6404
|
+
"aqua": [0, 255, 255],
|
|
6405
|
+
"aquamarine": [127, 255, 212],
|
|
6406
|
+
"azure": [240, 255, 255],
|
|
6407
|
+
"beige": [245, 245, 220],
|
|
6408
|
+
"bisque": [255, 228, 196],
|
|
6409
|
+
"black": [0, 0, 0],
|
|
6410
|
+
"blanchedalmond": [255, 235, 205],
|
|
6411
|
+
"blue": [0, 0, 255],
|
|
6412
|
+
"blueviolet": [138, 43, 226],
|
|
6413
|
+
"brown": [165, 42, 42],
|
|
6414
|
+
"burlywood": [222, 184, 135],
|
|
6415
|
+
"cadetblue": [95, 158, 160],
|
|
6416
|
+
"chartreuse": [127, 255, 0],
|
|
6417
|
+
"chocolate": [210, 105, 30],
|
|
6418
|
+
"coral": [255, 127, 80],
|
|
6419
|
+
"cornflowerblue": [100, 149, 237],
|
|
6420
|
+
"cornsilk": [255, 248, 220],
|
|
6421
|
+
"crimson": [220, 20, 60],
|
|
6422
|
+
"cyan": [0, 255, 255],
|
|
6423
|
+
"darkblue": [0, 0, 139],
|
|
6424
|
+
"darkcyan": [0, 139, 139],
|
|
6425
|
+
"darkgoldenrod": [184, 134, 11],
|
|
6426
|
+
"darkgray": [169, 169, 169],
|
|
6427
|
+
"darkgreen": [0, 100, 0],
|
|
6428
|
+
"darkgrey": [169, 169, 169],
|
|
6429
|
+
"darkkhaki": [189, 183, 107],
|
|
6430
|
+
"darkmagenta": [139, 0, 139],
|
|
6431
|
+
"darkolivegreen": [85, 107, 47],
|
|
6432
|
+
"darkorange": [255, 140, 0],
|
|
6433
|
+
"darkorchid": [153, 50, 204],
|
|
6434
|
+
"darkred": [139, 0, 0],
|
|
6435
|
+
"darksalmon": [233, 150, 122],
|
|
6436
|
+
"darkseagreen": [143, 188, 143],
|
|
6437
|
+
"darkslateblue": [72, 61, 139],
|
|
6438
|
+
"darkslategray": [47, 79, 79],
|
|
6439
|
+
"darkslategrey": [47, 79, 79],
|
|
6440
|
+
"darkturquoise": [0, 206, 209],
|
|
6441
|
+
"darkviolet": [148, 0, 211],
|
|
6442
|
+
"deeppink": [255, 20, 147],
|
|
6443
|
+
"deepskyblue": [0, 191, 255],
|
|
6444
|
+
"dimgray": [105, 105, 105],
|
|
6445
|
+
"dimgrey": [105, 105, 105],
|
|
6446
|
+
"dodgerblue": [30, 144, 255],
|
|
6447
|
+
"firebrick": [178, 34, 34],
|
|
6448
|
+
"floralwhite": [255, 250, 240],
|
|
6449
|
+
"forestgreen": [34, 139, 34],
|
|
6450
|
+
"fuchsia": [255, 0, 255],
|
|
6451
|
+
"gainsboro": [220, 220, 220],
|
|
6452
|
+
"ghostwhite": [248, 248, 255],
|
|
6453
|
+
"gold": [255, 215, 0],
|
|
6454
|
+
"goldenrod": [218, 165, 32],
|
|
6455
|
+
"gray": [128, 128, 128],
|
|
6456
|
+
"green": [0, 128, 0],
|
|
6457
|
+
"greenyellow": [173, 255, 47],
|
|
6458
|
+
"grey": [128, 128, 128],
|
|
6459
|
+
"honeydew": [240, 255, 240],
|
|
6460
|
+
"hotpink": [255, 105, 180],
|
|
6461
|
+
"indianred": [205, 92, 92],
|
|
6462
|
+
"indigo": [75, 0, 130],
|
|
6463
|
+
"ivory": [255, 255, 240],
|
|
6464
|
+
"khaki": [240, 230, 140],
|
|
6465
|
+
"lavender": [230, 230, 250],
|
|
6466
|
+
"lavenderblush": [255, 240, 245],
|
|
6467
|
+
"lawngreen": [124, 252, 0],
|
|
6468
|
+
"lemonchiffon": [255, 250, 205],
|
|
6469
|
+
"lightblue": [173, 216, 230],
|
|
6470
|
+
"lightcoral": [240, 128, 128],
|
|
6471
|
+
"lightcyan": [224, 255, 255],
|
|
6472
|
+
"lightgoldenrodyellow": [250, 250, 210],
|
|
6473
|
+
"lightgray": [211, 211, 211],
|
|
6474
|
+
"lightgreen": [144, 238, 144],
|
|
6475
|
+
"lightgrey": [211, 211, 211],
|
|
6476
|
+
"lightpink": [255, 182, 193],
|
|
6477
|
+
"lightsalmon": [255, 160, 122],
|
|
6478
|
+
"lightseagreen": [32, 178, 170],
|
|
6479
|
+
"lightskyblue": [135, 206, 250],
|
|
6480
|
+
"lightslategray": [119, 136, 153],
|
|
6481
|
+
"lightslategrey": [119, 136, 153],
|
|
6482
|
+
"lightsteelblue": [176, 196, 222],
|
|
6483
|
+
"lightyellow": [255, 255, 224],
|
|
6484
|
+
"lime": [0, 255, 0],
|
|
6485
|
+
"limegreen": [50, 205, 50],
|
|
6486
|
+
"linen": [250, 240, 230],
|
|
6487
|
+
"magenta": [255, 0, 255],
|
|
6488
|
+
"maroon": [128, 0, 0],
|
|
6489
|
+
"mediumaquamarine": [102, 205, 170],
|
|
6490
|
+
"mediumblue": [0, 0, 205],
|
|
6491
|
+
"mediumorchid": [186, 85, 211],
|
|
6492
|
+
"mediumpurple": [147, 112, 219],
|
|
6493
|
+
"mediumseagreen": [60, 179, 113],
|
|
6494
|
+
"mediumslateblue": [123, 104, 238],
|
|
6495
|
+
"mediumspringgreen": [0, 250, 154],
|
|
6496
|
+
"mediumturquoise": [72, 209, 204],
|
|
6497
|
+
"mediumvioletred": [199, 21, 133],
|
|
6498
|
+
"midnightblue": [25, 25, 112],
|
|
6499
|
+
"mintcream": [245, 255, 250],
|
|
6500
|
+
"mistyrose": [255, 228, 225],
|
|
6501
|
+
"moccasin": [255, 228, 181],
|
|
6502
|
+
"navajowhite": [255, 222, 173],
|
|
6503
|
+
"navy": [0, 0, 128],
|
|
6504
|
+
"oldlace": [253, 245, 230],
|
|
6505
|
+
"olive": [128, 128, 0],
|
|
6506
|
+
"olivedrab": [107, 142, 35],
|
|
6507
|
+
"orange": [255, 165, 0],
|
|
6508
|
+
"orangered": [255, 69, 0],
|
|
6509
|
+
"orchid": [218, 112, 214],
|
|
6510
|
+
"palegoldenrod": [238, 232, 170],
|
|
6511
|
+
"palegreen": [152, 251, 152],
|
|
6512
|
+
"paleturquoise": [175, 238, 238],
|
|
6513
|
+
"palevioletred": [219, 112, 147],
|
|
6514
|
+
"papayawhip": [255, 239, 213],
|
|
6515
|
+
"peachpuff": [255, 218, 185],
|
|
6516
|
+
"peru": [205, 133, 63],
|
|
6517
|
+
"pink": [255, 192, 203],
|
|
6518
|
+
"plum": [221, 160, 221],
|
|
6519
|
+
"powderblue": [176, 224, 230],
|
|
6520
|
+
"purple": [128, 0, 128],
|
|
6521
|
+
"rebeccapurple": [102, 51, 153],
|
|
6522
|
+
"red": [255, 0, 0],
|
|
6523
|
+
"rosybrown": [188, 143, 143],
|
|
6524
|
+
"royalblue": [65, 105, 225],
|
|
6525
|
+
"saddlebrown": [139, 69, 19],
|
|
6526
|
+
"salmon": [250, 128, 114],
|
|
6527
|
+
"sandybrown": [244, 164, 96],
|
|
6528
|
+
"seagreen": [46, 139, 87],
|
|
6529
|
+
"seashell": [255, 245, 238],
|
|
6530
|
+
"sienna": [160, 82, 45],
|
|
6531
|
+
"silver": [192, 192, 192],
|
|
6532
|
+
"skyblue": [135, 206, 235],
|
|
6533
|
+
"slateblue": [106, 90, 205],
|
|
6534
|
+
"slategray": [112, 128, 144],
|
|
6535
|
+
"slategrey": [112, 128, 144],
|
|
6536
|
+
"snow": [255, 250, 250],
|
|
6537
|
+
"springgreen": [0, 255, 127],
|
|
6538
|
+
"steelblue": [70, 130, 180],
|
|
6539
|
+
"tan": [210, 180, 140],
|
|
6540
|
+
"teal": [0, 128, 128],
|
|
6541
|
+
"thistle": [216, 191, 216],
|
|
6542
|
+
"tomato": [255, 99, 71],
|
|
6543
|
+
"turquoise": [64, 224, 208],
|
|
6544
|
+
"violet": [238, 130, 238],
|
|
6545
|
+
"wheat": [245, 222, 179],
|
|
6546
|
+
"white": [255, 255, 255],
|
|
6547
|
+
"whitesmoke": [245, 245, 245],
|
|
6548
|
+
"yellow": [255, 255, 0],
|
|
6549
|
+
"yellowgreen": [154, 205, 50]
|
|
6550
|
+
};
|
|
6551
|
+
|
|
6552
|
+
|
|
6553
|
+
/***/ }),
|
|
6554
|
+
|
|
6555
|
+
/***/ 4200:
|
|
6841
6556
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
6842
6557
|
|
|
6843
|
-
var conversions = __nccwpck_require__(
|
|
6558
|
+
var conversions = __nccwpck_require__(6872);
|
|
6844
6559
|
|
|
6845
6560
|
/*
|
|
6846
6561
|
this function routes a model to all other models.
|
|
@@ -6941,7 +6656,7 @@ module.exports = function (fromModel) {
|
|
|
6941
6656
|
|
|
6942
6657
|
/***/ }),
|
|
6943
6658
|
|
|
6944
|
-
/***/
|
|
6659
|
+
/***/ 4953:
|
|
6945
6660
|
/***/ ((module) => {
|
|
6946
6661
|
|
|
6947
6662
|
"use strict";
|
|
@@ -7099,6 +6814,292 @@ module.exports = {
|
|
|
7099
6814
|
};
|
|
7100
6815
|
|
|
7101
6816
|
|
|
6817
|
+
/***/ }),
|
|
6818
|
+
|
|
6819
|
+
/***/ 9407:
|
|
6820
|
+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
6821
|
+
|
|
6822
|
+
/* MIT license */
|
|
6823
|
+
var colorNames = __nccwpck_require__(4953);
|
|
6824
|
+
var swizzle = __nccwpck_require__(4421);
|
|
6825
|
+
var hasOwnProperty = Object.hasOwnProperty;
|
|
6826
|
+
|
|
6827
|
+
var reverseNames = Object.create(null);
|
|
6828
|
+
|
|
6829
|
+
// create a list of reverse color names
|
|
6830
|
+
for (var name in colorNames) {
|
|
6831
|
+
if (hasOwnProperty.call(colorNames, name)) {
|
|
6832
|
+
reverseNames[colorNames[name]] = name;
|
|
6833
|
+
}
|
|
6834
|
+
}
|
|
6835
|
+
|
|
6836
|
+
var cs = module.exports = {
|
|
6837
|
+
to: {},
|
|
6838
|
+
get: {}
|
|
6839
|
+
};
|
|
6840
|
+
|
|
6841
|
+
cs.get = function (string) {
|
|
6842
|
+
var prefix = string.substring(0, 3).toLowerCase();
|
|
6843
|
+
var val;
|
|
6844
|
+
var model;
|
|
6845
|
+
switch (prefix) {
|
|
6846
|
+
case 'hsl':
|
|
6847
|
+
val = cs.get.hsl(string);
|
|
6848
|
+
model = 'hsl';
|
|
6849
|
+
break;
|
|
6850
|
+
case 'hwb':
|
|
6851
|
+
val = cs.get.hwb(string);
|
|
6852
|
+
model = 'hwb';
|
|
6853
|
+
break;
|
|
6854
|
+
default:
|
|
6855
|
+
val = cs.get.rgb(string);
|
|
6856
|
+
model = 'rgb';
|
|
6857
|
+
break;
|
|
6858
|
+
}
|
|
6859
|
+
|
|
6860
|
+
if (!val) {
|
|
6861
|
+
return null;
|
|
6862
|
+
}
|
|
6863
|
+
|
|
6864
|
+
return {model: model, value: val};
|
|
6865
|
+
};
|
|
6866
|
+
|
|
6867
|
+
cs.get.rgb = function (string) {
|
|
6868
|
+
if (!string) {
|
|
6869
|
+
return null;
|
|
6870
|
+
}
|
|
6871
|
+
|
|
6872
|
+
var abbr = /^#([a-f0-9]{3,4})$/i;
|
|
6873
|
+
var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;
|
|
6874
|
+
var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
|
|
6875
|
+
var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
|
|
6876
|
+
var keyword = /^(\w+)$/;
|
|
6877
|
+
|
|
6878
|
+
var rgb = [0, 0, 0, 1];
|
|
6879
|
+
var match;
|
|
6880
|
+
var i;
|
|
6881
|
+
var hexAlpha;
|
|
6882
|
+
|
|
6883
|
+
if (match = string.match(hex)) {
|
|
6884
|
+
hexAlpha = match[2];
|
|
6885
|
+
match = match[1];
|
|
6886
|
+
|
|
6887
|
+
for (i = 0; i < 3; i++) {
|
|
6888
|
+
// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19
|
|
6889
|
+
var i2 = i * 2;
|
|
6890
|
+
rgb[i] = parseInt(match.slice(i2, i2 + 2), 16);
|
|
6891
|
+
}
|
|
6892
|
+
|
|
6893
|
+
if (hexAlpha) {
|
|
6894
|
+
rgb[3] = parseInt(hexAlpha, 16) / 255;
|
|
6895
|
+
}
|
|
6896
|
+
} else if (match = string.match(abbr)) {
|
|
6897
|
+
match = match[1];
|
|
6898
|
+
hexAlpha = match[3];
|
|
6899
|
+
|
|
6900
|
+
for (i = 0; i < 3; i++) {
|
|
6901
|
+
rgb[i] = parseInt(match[i] + match[i], 16);
|
|
6902
|
+
}
|
|
6903
|
+
|
|
6904
|
+
if (hexAlpha) {
|
|
6905
|
+
rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;
|
|
6906
|
+
}
|
|
6907
|
+
} else if (match = string.match(rgba)) {
|
|
6908
|
+
for (i = 0; i < 3; i++) {
|
|
6909
|
+
rgb[i] = parseInt(match[i + 1], 0);
|
|
6910
|
+
}
|
|
6911
|
+
|
|
6912
|
+
if (match[4]) {
|
|
6913
|
+
if (match[5]) {
|
|
6914
|
+
rgb[3] = parseFloat(match[4]) * 0.01;
|
|
6915
|
+
} else {
|
|
6916
|
+
rgb[3] = parseFloat(match[4]);
|
|
6917
|
+
}
|
|
6918
|
+
}
|
|
6919
|
+
} else if (match = string.match(per)) {
|
|
6920
|
+
for (i = 0; i < 3; i++) {
|
|
6921
|
+
rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);
|
|
6922
|
+
}
|
|
6923
|
+
|
|
6924
|
+
if (match[4]) {
|
|
6925
|
+
if (match[5]) {
|
|
6926
|
+
rgb[3] = parseFloat(match[4]) * 0.01;
|
|
6927
|
+
} else {
|
|
6928
|
+
rgb[3] = parseFloat(match[4]);
|
|
6929
|
+
}
|
|
6930
|
+
}
|
|
6931
|
+
} else if (match = string.match(keyword)) {
|
|
6932
|
+
if (match[1] === 'transparent') {
|
|
6933
|
+
return [0, 0, 0, 0];
|
|
6934
|
+
}
|
|
6935
|
+
|
|
6936
|
+
if (!hasOwnProperty.call(colorNames, match[1])) {
|
|
6937
|
+
return null;
|
|
6938
|
+
}
|
|
6939
|
+
|
|
6940
|
+
rgb = colorNames[match[1]];
|
|
6941
|
+
rgb[3] = 1;
|
|
6942
|
+
|
|
6943
|
+
return rgb;
|
|
6944
|
+
} else {
|
|
6945
|
+
return null;
|
|
6946
|
+
}
|
|
6947
|
+
|
|
6948
|
+
for (i = 0; i < 3; i++) {
|
|
6949
|
+
rgb[i] = clamp(rgb[i], 0, 255);
|
|
6950
|
+
}
|
|
6951
|
+
rgb[3] = clamp(rgb[3], 0, 1);
|
|
6952
|
+
|
|
6953
|
+
return rgb;
|
|
6954
|
+
};
|
|
6955
|
+
|
|
6956
|
+
cs.get.hsl = function (string) {
|
|
6957
|
+
if (!string) {
|
|
6958
|
+
return null;
|
|
6959
|
+
}
|
|
6960
|
+
|
|
6961
|
+
var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
|
|
6962
|
+
var match = string.match(hsl);
|
|
6963
|
+
|
|
6964
|
+
if (match) {
|
|
6965
|
+
var alpha = parseFloat(match[4]);
|
|
6966
|
+
var h = ((parseFloat(match[1]) % 360) + 360) % 360;
|
|
6967
|
+
var s = clamp(parseFloat(match[2]), 0, 100);
|
|
6968
|
+
var l = clamp(parseFloat(match[3]), 0, 100);
|
|
6969
|
+
var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
|
|
6970
|
+
|
|
6971
|
+
return [h, s, l, a];
|
|
6972
|
+
}
|
|
6973
|
+
|
|
6974
|
+
return null;
|
|
6975
|
+
};
|
|
6976
|
+
|
|
6977
|
+
cs.get.hwb = function (string) {
|
|
6978
|
+
if (!string) {
|
|
6979
|
+
return null;
|
|
6980
|
+
}
|
|
6981
|
+
|
|
6982
|
+
var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
|
|
6983
|
+
var match = string.match(hwb);
|
|
6984
|
+
|
|
6985
|
+
if (match) {
|
|
6986
|
+
var alpha = parseFloat(match[4]);
|
|
6987
|
+
var h = ((parseFloat(match[1]) % 360) + 360) % 360;
|
|
6988
|
+
var w = clamp(parseFloat(match[2]), 0, 100);
|
|
6989
|
+
var b = clamp(parseFloat(match[3]), 0, 100);
|
|
6990
|
+
var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);
|
|
6991
|
+
return [h, w, b, a];
|
|
6992
|
+
}
|
|
6993
|
+
|
|
6994
|
+
return null;
|
|
6995
|
+
};
|
|
6996
|
+
|
|
6997
|
+
cs.to.hex = function () {
|
|
6998
|
+
var rgba = swizzle(arguments);
|
|
6999
|
+
|
|
7000
|
+
return (
|
|
7001
|
+
'#' +
|
|
7002
|
+
hexDouble(rgba[0]) +
|
|
7003
|
+
hexDouble(rgba[1]) +
|
|
7004
|
+
hexDouble(rgba[2]) +
|
|
7005
|
+
(rgba[3] < 1
|
|
7006
|
+
? (hexDouble(Math.round(rgba[3] * 255)))
|
|
7007
|
+
: '')
|
|
7008
|
+
);
|
|
7009
|
+
};
|
|
7010
|
+
|
|
7011
|
+
cs.to.rgb = function () {
|
|
7012
|
+
var rgba = swizzle(arguments);
|
|
7013
|
+
|
|
7014
|
+
return rgba.length < 4 || rgba[3] === 1
|
|
7015
|
+
? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'
|
|
7016
|
+
: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';
|
|
7017
|
+
};
|
|
7018
|
+
|
|
7019
|
+
cs.to.rgb.percent = function () {
|
|
7020
|
+
var rgba = swizzle(arguments);
|
|
7021
|
+
|
|
7022
|
+
var r = Math.round(rgba[0] / 255 * 100);
|
|
7023
|
+
var g = Math.round(rgba[1] / 255 * 100);
|
|
7024
|
+
var b = Math.round(rgba[2] / 255 * 100);
|
|
7025
|
+
|
|
7026
|
+
return rgba.length < 4 || rgba[3] === 1
|
|
7027
|
+
? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'
|
|
7028
|
+
: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';
|
|
7029
|
+
};
|
|
7030
|
+
|
|
7031
|
+
cs.to.hsl = function () {
|
|
7032
|
+
var hsla = swizzle(arguments);
|
|
7033
|
+
return hsla.length < 4 || hsla[3] === 1
|
|
7034
|
+
? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'
|
|
7035
|
+
: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';
|
|
7036
|
+
};
|
|
7037
|
+
|
|
7038
|
+
// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax
|
|
7039
|
+
// (hwb have alpha optional & 1 is default value)
|
|
7040
|
+
cs.to.hwb = function () {
|
|
7041
|
+
var hwba = swizzle(arguments);
|
|
7042
|
+
|
|
7043
|
+
var a = '';
|
|
7044
|
+
if (hwba.length >= 4 && hwba[3] !== 1) {
|
|
7045
|
+
a = ', ' + hwba[3];
|
|
7046
|
+
}
|
|
7047
|
+
|
|
7048
|
+
return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';
|
|
7049
|
+
};
|
|
7050
|
+
|
|
7051
|
+
cs.to.keyword = function (rgb) {
|
|
7052
|
+
return reverseNames[rgb.slice(0, 3)];
|
|
7053
|
+
};
|
|
7054
|
+
|
|
7055
|
+
// helpers
|
|
7056
|
+
function clamp(num, min, max) {
|
|
7057
|
+
return Math.min(Math.max(min, num), max);
|
|
7058
|
+
}
|
|
7059
|
+
|
|
7060
|
+
function hexDouble(num) {
|
|
7061
|
+
var str = Math.round(num).toString(16).toUpperCase();
|
|
7062
|
+
return (str.length < 2) ? '0' + str : str;
|
|
7063
|
+
}
|
|
7064
|
+
|
|
7065
|
+
|
|
7066
|
+
/***/ }),
|
|
7067
|
+
|
|
7068
|
+
/***/ 8107:
|
|
7069
|
+
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
7070
|
+
|
|
7071
|
+
"use strict";
|
|
7072
|
+
|
|
7073
|
+
|
|
7074
|
+
var color = __nccwpck_require__(1696)
|
|
7075
|
+
, hex = __nccwpck_require__(5143);
|
|
7076
|
+
|
|
7077
|
+
/**
|
|
7078
|
+
* Generate a color for a given name. But be reasonably smart about it by
|
|
7079
|
+
* understanding name spaces and coloring each namespace a bit lighter so they
|
|
7080
|
+
* still have the same base color as the root.
|
|
7081
|
+
*
|
|
7082
|
+
* @param {string} namespace The namespace
|
|
7083
|
+
* @param {string} [delimiter] The delimiter
|
|
7084
|
+
* @returns {string} color
|
|
7085
|
+
*/
|
|
7086
|
+
module.exports = function colorspace(namespace, delimiter) {
|
|
7087
|
+
var split = namespace.split(delimiter || ':');
|
|
7088
|
+
var base = hex(split[0]);
|
|
7089
|
+
|
|
7090
|
+
if (!split.length) return base;
|
|
7091
|
+
|
|
7092
|
+
for (var i = 0, l = split.length - 1; i < l; i++) {
|
|
7093
|
+
base = color(base)
|
|
7094
|
+
.mix(color(hex(split[i + 1])))
|
|
7095
|
+
.saturate(1)
|
|
7096
|
+
.hex();
|
|
7097
|
+
}
|
|
7098
|
+
|
|
7099
|
+
return base;
|
|
7100
|
+
};
|
|
7101
|
+
|
|
7102
|
+
|
|
7102
7103
|
/***/ }),
|
|
7103
7104
|
|
|
7104
7105
|
/***/ 1696:
|
|
@@ -7108,7 +7109,7 @@ module.exports = {
|
|
|
7108
7109
|
|
|
7109
7110
|
|
|
7110
7111
|
var colorString = __nccwpck_require__(9407);
|
|
7111
|
-
var convert = __nccwpck_require__(
|
|
7112
|
+
var convert = __nccwpck_require__(4185);
|
|
7112
7113
|
|
|
7113
7114
|
var _slice = [].slice;
|
|
7114
7115
|
|
|
@@ -38948,7 +38949,7 @@ module.exports = require("zlib");
|
|
|
38948
38949
|
/***/ ((module) => {
|
|
38949
38950
|
|
|
38950
38951
|
"use strict";
|
|
38951
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@abtnode/core","publishConfig":{"access":"public"},"version":"1.16.51","description":"","main":"lib/index.js","files":["lib"],"scripts":{"lint":"eslint tests lib --ignore-pattern \'tests/assets/*\'","lint:fix":"eslint --fix tests lib","test":"node tools/jest.js","test:disk":"CI=true npm run test tests/blocklet/manager/disk.spec.js","coverage":"npm run test -- --coverage"},"keywords":[],"author":"wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)","license":"Apache-2.0","dependencies":{"@abtnode/analytics":"1.16.51","@abtnode/auth":"1.16.51","@abtnode/certificate-manager":"1.16.51","@abtnode/constant":"1.16.51","@abtnode/cron":"1.16.51","@abtnode/db-cache":"1.16.51","@abtnode/docker-utils":"1.16.51","@abtnode/logger":"1.16.51","@abtnode/models":"1.16.51","@abtnode/queue":"1.16.51","@abtnode/rbac":"1.16.51","@abtnode/router-provider":"1.16.51","@abtnode/static-server":"1.16.51","@abtnode/timemachine":"1.16.51","@abtnode/util":"1.16.51","@aigne/aigne-hub":"^0.10.0","@arcblock/did":"1.25.6","@arcblock/did-connect-js":"1.25.6","@arcblock/did-ext":"1.25.6","@arcblock/did-motif":"^1.1.14","@arcblock/did-util":"1.25.6","@arcblock/event-hub":"1.25.6","@arcblock/jwt":"1.25.6","@arcblock/pm2-events":"^0.0.5","@arcblock/validator":"1.25.6","@arcblock/vc":"1.25.6","@blocklet/constant":"1.16.51","@blocklet/did-space-js":"^1.1.29","@blocklet/env":"1.16.51","@blocklet/error":"^0.2.5","@blocklet/meta":"1.16.51","@blocklet/resolver":"1.16.51","@blocklet/sdk":"1.16.51","@blocklet/server-js":"1.16.51","@blocklet/store":"1.16.51","@blocklet/theme":"^3.1.45","@fidm/x509":"^1.2.1","@ocap/mcrypto":"1.25.6","@ocap/util":"1.25.6","@ocap/wallet":"1.25.6","@slack/webhook":"^5.0.4","archiver":"^7.0.1","axios":"^1.7.9","axon":"^2.0.3","chalk":"^4.1.2","cross-spawn":"^7.0.3","dayjs":"^1.11.13","deep-diff":"^1.0.2","detect-port":"^1.5.1","envfile":"^7.1.0","escape-string-regexp":"^4.0.0","fast-glob":"^3.3.2","filesize":"^10.1.1","flat":"^5.0.2","fs-extra":"^11.2.0","get-port":"^5.1.1","hasha":"^5.2.2","is-base64":"^1.1.0","is-cidr":"4","is-ip":"3","is-url":"^1.2.4","joi":"17.12.2","joi-extension-semver":"^5.0.0","js-yaml":"^4.1.0","kill-port":"^2.0.1","lodash":"^4.17.21","node-stream-zip":"^1.15.0","p-all":"^3.0.0","p-limit":"^3.1.0","p-map":"^4.0.0","p-retry":"^4.6.2","p-wait-for":"^3.2.0","private-ip":"^2.3.4","rate-limiter-flexible":"^5.0.5","read-last-lines":"^1.8.0","semver":"^7.6.3","sequelize":"^6.35.0","shelljs":"^0.8.5","slugify":"^1.6.6","ssri":"^8.0.1","stream-throttle":"^0.1.3","stream-to-promise":"^3.0.0","systeminformation":"^5.23.3","tail":"^2.2.4","tar":"^6.1.11","transliteration":"^2.3.5","ua-parser-js":"^1.0.2","ufo":"^1.5.3","uuid":"^11.1.0","valid-url":"^1.0.9","which":"^2.0.2","xbytes":"^1.8.0"},"devDependencies":{"expand-tilde":"^2.0.2","express":"^4.18.2","jest":"^29.7.0","unzipper":"^0.10.11"},"gitHead":"e5764f753181ed6a7c615cd4fc6682aacf0cb7cd"}');
|
|
38952
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@abtnode/core","publishConfig":{"access":"public"},"version":"1.16.51","description":"","main":"lib/index.js","files":["lib"],"scripts":{"lint":"eslint tests lib --ignore-pattern \'tests/assets/*\'","lint:fix":"eslint --fix tests lib","test":"node tools/jest.js","test:disk":"CI=true npm run test tests/blocklet/manager/disk.spec.js","test:blue":"CI=true npm run test tests/blocklet/manager/disk-blue-green.spec.js","coverage":"npm run test -- --coverage"},"keywords":[],"author":"wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)","license":"Apache-2.0","dependencies":{"@abtnode/analytics":"1.16.51","@abtnode/auth":"1.16.51","@abtnode/certificate-manager":"1.16.51","@abtnode/constant":"1.16.51","@abtnode/cron":"1.16.51","@abtnode/db-cache":"1.16.51","@abtnode/docker-utils":"1.16.51","@abtnode/logger":"1.16.51","@abtnode/models":"1.16.51","@abtnode/queue":"1.16.51","@abtnode/rbac":"1.16.51","@abtnode/router-provider":"1.16.51","@abtnode/static-server":"1.16.51","@abtnode/timemachine":"1.16.51","@abtnode/util":"1.16.51","@aigne/aigne-hub":"^0.10.0","@arcblock/did":"1.25.6","@arcblock/did-connect-js":"1.25.6","@arcblock/did-ext":"1.25.6","@arcblock/did-motif":"^1.1.14","@arcblock/did-util":"1.25.6","@arcblock/event-hub":"1.25.6","@arcblock/jwt":"1.25.6","@arcblock/pm2-events":"^0.0.5","@arcblock/validator":"1.25.6","@arcblock/vc":"1.25.6","@blocklet/constant":"1.16.51","@blocklet/did-space-js":"^1.1.29","@blocklet/env":"1.16.51","@blocklet/error":"^0.2.5","@blocklet/meta":"1.16.51","@blocklet/resolver":"1.16.51","@blocklet/sdk":"1.16.51","@blocklet/server-js":"1.16.51","@blocklet/store":"1.16.51","@blocklet/theme":"^3.1.45","@fidm/x509":"^1.2.1","@ocap/mcrypto":"1.25.6","@ocap/util":"1.25.6","@ocap/wallet":"1.25.6","@slack/webhook":"^5.0.4","archiver":"^7.0.1","axios":"^1.7.9","axon":"^2.0.3","chalk":"^4.1.2","cross-spawn":"^7.0.3","dayjs":"^1.11.13","deep-diff":"^1.0.2","detect-port":"^1.5.1","envfile":"^7.1.0","escape-string-regexp":"^4.0.0","fast-glob":"^3.3.2","filesize":"^10.1.1","flat":"^5.0.2","fs-extra":"^11.2.0","get-port":"^5.1.1","hasha":"^5.2.2","is-base64":"^1.1.0","is-cidr":"4","is-ip":"3","is-url":"^1.2.4","joi":"17.12.2","joi-extension-semver":"^5.0.0","js-yaml":"^4.1.0","kill-port":"^2.0.1","lodash":"^4.17.21","node-stream-zip":"^1.15.0","p-all":"^3.0.0","p-limit":"^3.1.0","p-map":"^4.0.0","p-retry":"^4.6.2","p-wait-for":"^3.2.0","private-ip":"^2.3.4","rate-limiter-flexible":"^5.0.5","read-last-lines":"^1.8.0","semver":"^7.6.3","sequelize":"^6.35.0","shelljs":"^0.8.5","slugify":"^1.6.6","ssri":"^8.0.1","stream-throttle":"^0.1.3","stream-to-promise":"^3.0.0","systeminformation":"^5.23.3","tail":"^2.2.4","tar":"^6.1.11","transliteration":"^2.3.5","ua-parser-js":"^1.0.2","ufo":"^1.5.3","uuid":"^11.1.0","valid-url":"^1.0.9","which":"^2.0.2","xbytes":"^1.8.0"},"devDependencies":{"expand-tilde":"^2.0.2","express":"^4.18.2","jest":"^29.7.0","unzipper":"^0.10.11"},"gitHead":"e5764f753181ed6a7c615cd4fc6682aacf0cb7cd"}');
|
|
38952
38953
|
|
|
38953
38954
|
/***/ }),
|
|
38954
38955
|
|