@ant-design/pro-components 2.3.48 → 2.3.50

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.
@@ -12113,1234 +12113,6 @@ module.exports = function shallowEqual(objA, objB, compare, compareContext) {
12113
12113
 
12114
12114
  /***/ }),
12115
12115
 
12116
- /***/ 1438:
12117
- /***/ (function(module, exports, __webpack_require__) {
12118
-
12119
- var __WEBPACK_AMD_DEFINE_RESULT__;// TinyColor v1.4.2
12120
- // https://github.com/bgrins/TinyColor
12121
- // Brian Grinstead, MIT License
12122
-
12123
- (function (Math) {
12124
- var trimLeft = /^\s+/,
12125
- trimRight = /\s+$/,
12126
- tinyCounter = 0,
12127
- mathRound = Math.round,
12128
- mathMin = Math.min,
12129
- mathMax = Math.max,
12130
- mathRandom = Math.random;
12131
- function tinycolor(color, opts) {
12132
- color = color ? color : '';
12133
- opts = opts || {};
12134
-
12135
- // If input is already a tinycolor, return itself
12136
- if (color instanceof tinycolor) {
12137
- return color;
12138
- }
12139
- // If we are called as a function, call using new instead
12140
- if (!(this instanceof tinycolor)) {
12141
- return new tinycolor(color, opts);
12142
- }
12143
- var rgb = inputToRGB(color);
12144
- this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = mathRound(100 * this._a) / 100, this._format = opts.format || rgb.format;
12145
- this._gradientType = opts.gradientType;
12146
-
12147
- // Don't let the range of [0,255] come back in [0,1].
12148
- // Potentially lose a little bit of precision here, but will fix issues where
12149
- // .5 gets interpreted as half of the total, instead of half of 1
12150
- // If it was supposed to be 128, this was already taken care of by `inputToRgb`
12151
- if (this._r < 1) {
12152
- this._r = mathRound(this._r);
12153
- }
12154
- if (this._g < 1) {
12155
- this._g = mathRound(this._g);
12156
- }
12157
- if (this._b < 1) {
12158
- this._b = mathRound(this._b);
12159
- }
12160
- this._ok = rgb.ok;
12161
- this._tc_id = tinyCounter++;
12162
- }
12163
- tinycolor.prototype = {
12164
- isDark: function isDark() {
12165
- return this.getBrightness() < 128;
12166
- },
12167
- isLight: function isLight() {
12168
- return !this.isDark();
12169
- },
12170
- isValid: function isValid() {
12171
- return this._ok;
12172
- },
12173
- getOriginalInput: function getOriginalInput() {
12174
- return this._originalInput;
12175
- },
12176
- getFormat: function getFormat() {
12177
- return this._format;
12178
- },
12179
- getAlpha: function getAlpha() {
12180
- return this._a;
12181
- },
12182
- getBrightness: function getBrightness() {
12183
- //http://www.w3.org/TR/AERT#color-contrast
12184
- var rgb = this.toRgb();
12185
- return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
12186
- },
12187
- getLuminance: function getLuminance() {
12188
- //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
12189
- var rgb = this.toRgb();
12190
- var RsRGB, GsRGB, BsRGB, R, G, B;
12191
- RsRGB = rgb.r / 255;
12192
- GsRGB = rgb.g / 255;
12193
- BsRGB = rgb.b / 255;
12194
- if (RsRGB <= 0.03928) {
12195
- R = RsRGB / 12.92;
12196
- } else {
12197
- R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
12198
- }
12199
- if (GsRGB <= 0.03928) {
12200
- G = GsRGB / 12.92;
12201
- } else {
12202
- G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
12203
- }
12204
- if (BsRGB <= 0.03928) {
12205
- B = BsRGB / 12.92;
12206
- } else {
12207
- B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
12208
- }
12209
- return 0.2126 * R + 0.7152 * G + 0.0722 * B;
12210
- },
12211
- setAlpha: function setAlpha(value) {
12212
- this._a = boundAlpha(value);
12213
- this._roundA = mathRound(100 * this._a) / 100;
12214
- return this;
12215
- },
12216
- toHsv: function toHsv() {
12217
- var hsv = rgbToHsv(this._r, this._g, this._b);
12218
- return {
12219
- h: hsv.h * 360,
12220
- s: hsv.s,
12221
- v: hsv.v,
12222
- a: this._a
12223
- };
12224
- },
12225
- toHsvString: function toHsvString() {
12226
- var hsv = rgbToHsv(this._r, this._g, this._b);
12227
- var h = mathRound(hsv.h * 360),
12228
- s = mathRound(hsv.s * 100),
12229
- v = mathRound(hsv.v * 100);
12230
- return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
12231
- },
12232
- toHsl: function toHsl() {
12233
- var hsl = rgbToHsl(this._r, this._g, this._b);
12234
- return {
12235
- h: hsl.h * 360,
12236
- s: hsl.s,
12237
- l: hsl.l,
12238
- a: this._a
12239
- };
12240
- },
12241
- toHslString: function toHslString() {
12242
- var hsl = rgbToHsl(this._r, this._g, this._b);
12243
- var h = mathRound(hsl.h * 360),
12244
- s = mathRound(hsl.s * 100),
12245
- l = mathRound(hsl.l * 100);
12246
- return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
12247
- },
12248
- toHex: function toHex(allow3Char) {
12249
- return rgbToHex(this._r, this._g, this._b, allow3Char);
12250
- },
12251
- toHexString: function toHexString(allow3Char) {
12252
- return '#' + this.toHex(allow3Char);
12253
- },
12254
- toHex8: function toHex8(allow4Char) {
12255
- return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
12256
- },
12257
- toHex8String: function toHex8String(allow4Char) {
12258
- return '#' + this.toHex8(allow4Char);
12259
- },
12260
- toRgb: function toRgb() {
12261
- return {
12262
- r: mathRound(this._r),
12263
- g: mathRound(this._g),
12264
- b: mathRound(this._b),
12265
- a: this._a
12266
- };
12267
- },
12268
- toRgbString: function toRgbString() {
12269
- return this._a == 1 ? "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" : "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
12270
- },
12271
- toPercentageRgb: function toPercentageRgb() {
12272
- return {
12273
- r: mathRound(bound01(this._r, 255) * 100) + "%",
12274
- g: mathRound(bound01(this._g, 255) * 100) + "%",
12275
- b: mathRound(bound01(this._b, 255) * 100) + "%",
12276
- a: this._a
12277
- };
12278
- },
12279
- toPercentageRgbString: function toPercentageRgbString() {
12280
- return this._a == 1 ? "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" : "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
12281
- },
12282
- toName: function toName() {
12283
- if (this._a === 0) {
12284
- return "transparent";
12285
- }
12286
- if (this._a < 1) {
12287
- return false;
12288
- }
12289
- return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
12290
- },
12291
- toFilter: function toFilter(secondColor) {
12292
- var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);
12293
- var secondHex8String = hex8String;
12294
- var gradientType = this._gradientType ? "GradientType = 1, " : "";
12295
- if (secondColor) {
12296
- var s = tinycolor(secondColor);
12297
- secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);
12298
- }
12299
- return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
12300
- },
12301
- toString: function toString(format) {
12302
- var formatSet = !!format;
12303
- format = format || this._format;
12304
- var formattedString = false;
12305
- var hasAlpha = this._a < 1 && this._a >= 0;
12306
- var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
12307
- if (needsAlphaFormat) {
12308
- // Special case for "transparent", all other non-alpha formats
12309
- // will return rgba when there is transparency.
12310
- if (format === "name" && this._a === 0) {
12311
- return this.toName();
12312
- }
12313
- return this.toRgbString();
12314
- }
12315
- if (format === "rgb") {
12316
- formattedString = this.toRgbString();
12317
- }
12318
- if (format === "prgb") {
12319
- formattedString = this.toPercentageRgbString();
12320
- }
12321
- if (format === "hex" || format === "hex6") {
12322
- formattedString = this.toHexString();
12323
- }
12324
- if (format === "hex3") {
12325
- formattedString = this.toHexString(true);
12326
- }
12327
- if (format === "hex4") {
12328
- formattedString = this.toHex8String(true);
12329
- }
12330
- if (format === "hex8") {
12331
- formattedString = this.toHex8String();
12332
- }
12333
- if (format === "name") {
12334
- formattedString = this.toName();
12335
- }
12336
- if (format === "hsl") {
12337
- formattedString = this.toHslString();
12338
- }
12339
- if (format === "hsv") {
12340
- formattedString = this.toHsvString();
12341
- }
12342
- return formattedString || this.toHexString();
12343
- },
12344
- clone: function clone() {
12345
- return tinycolor(this.toString());
12346
- },
12347
- _applyModification: function _applyModification(fn, args) {
12348
- var color = fn.apply(null, [this].concat([].slice.call(args)));
12349
- this._r = color._r;
12350
- this._g = color._g;
12351
- this._b = color._b;
12352
- this.setAlpha(color._a);
12353
- return this;
12354
- },
12355
- lighten: function lighten() {
12356
- return this._applyModification(_lighten, arguments);
12357
- },
12358
- brighten: function brighten() {
12359
- return this._applyModification(_brighten, arguments);
12360
- },
12361
- darken: function darken() {
12362
- return this._applyModification(_darken, arguments);
12363
- },
12364
- desaturate: function desaturate() {
12365
- return this._applyModification(_desaturate, arguments);
12366
- },
12367
- saturate: function saturate() {
12368
- return this._applyModification(_saturate, arguments);
12369
- },
12370
- greyscale: function greyscale() {
12371
- return this._applyModification(_greyscale, arguments);
12372
- },
12373
- spin: function spin() {
12374
- return this._applyModification(_spin, arguments);
12375
- },
12376
- _applyCombination: function _applyCombination(fn, args) {
12377
- return fn.apply(null, [this].concat([].slice.call(args)));
12378
- },
12379
- analogous: function analogous() {
12380
- return this._applyCombination(_analogous, arguments);
12381
- },
12382
- complement: function complement() {
12383
- return this._applyCombination(_complement, arguments);
12384
- },
12385
- monochromatic: function monochromatic() {
12386
- return this._applyCombination(_monochromatic, arguments);
12387
- },
12388
- splitcomplement: function splitcomplement() {
12389
- return this._applyCombination(_splitcomplement, arguments);
12390
- },
12391
- triad: function triad() {
12392
- return this._applyCombination(_triad, arguments);
12393
- },
12394
- tetrad: function tetrad() {
12395
- return this._applyCombination(_tetrad, arguments);
12396
- }
12397
- };
12398
-
12399
- // If input is an object, force 1 into "1.0" to handle ratios properly
12400
- // String input requires "1.0" as input, so 1 will be treated as 1
12401
- tinycolor.fromRatio = function (color, opts) {
12402
- if (typeof color == "object") {
12403
- var newColor = {};
12404
- for (var i in color) {
12405
- if (color.hasOwnProperty(i)) {
12406
- if (i === "a") {
12407
- newColor[i] = color[i];
12408
- } else {
12409
- newColor[i] = convertToPercentage(color[i]);
12410
- }
12411
- }
12412
- }
12413
- color = newColor;
12414
- }
12415
- return tinycolor(color, opts);
12416
- };
12417
-
12418
- // Given a string or object, convert that input to RGB
12419
- // Possible string inputs:
12420
- //
12421
- // "red"
12422
- // "#f00" or "f00"
12423
- // "#ff0000" or "ff0000"
12424
- // "#ff000000" or "ff000000"
12425
- // "rgb 255 0 0" or "rgb (255, 0, 0)"
12426
- // "rgb 1.0 0 0" or "rgb (1, 0, 0)"
12427
- // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
12428
- // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
12429
- // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
12430
- // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
12431
- // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
12432
- //
12433
- function inputToRGB(color) {
12434
- var rgb = {
12435
- r: 0,
12436
- g: 0,
12437
- b: 0
12438
- };
12439
- var a = 1;
12440
- var s = null;
12441
- var v = null;
12442
- var l = null;
12443
- var ok = false;
12444
- var format = false;
12445
- if (typeof color == "string") {
12446
- color = stringInputToObject(color);
12447
- }
12448
- if (typeof color == "object") {
12449
- if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
12450
- rgb = rgbToRgb(color.r, color.g, color.b);
12451
- ok = true;
12452
- format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
12453
- } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
12454
- s = convertToPercentage(color.s);
12455
- v = convertToPercentage(color.v);
12456
- rgb = hsvToRgb(color.h, s, v);
12457
- ok = true;
12458
- format = "hsv";
12459
- } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
12460
- s = convertToPercentage(color.s);
12461
- l = convertToPercentage(color.l);
12462
- rgb = hslToRgb(color.h, s, l);
12463
- ok = true;
12464
- format = "hsl";
12465
- }
12466
- if (color.hasOwnProperty("a")) {
12467
- a = color.a;
12468
- }
12469
- }
12470
- a = boundAlpha(a);
12471
- return {
12472
- ok: ok,
12473
- format: color.format || format,
12474
- r: mathMin(255, mathMax(rgb.r, 0)),
12475
- g: mathMin(255, mathMax(rgb.g, 0)),
12476
- b: mathMin(255, mathMax(rgb.b, 0)),
12477
- a: a
12478
- };
12479
- }
12480
-
12481
- // Conversion Functions
12482
- // --------------------
12483
-
12484
- // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
12485
- // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
12486
-
12487
- // `rgbToRgb`
12488
- // Handle bounds / percentage checking to conform to CSS color spec
12489
- // <http://www.w3.org/TR/css3-color/>
12490
- // *Assumes:* r, g, b in [0, 255] or [0, 1]
12491
- // *Returns:* { r, g, b } in [0, 255]
12492
- function rgbToRgb(r, g, b) {
12493
- return {
12494
- r: bound01(r, 255) * 255,
12495
- g: bound01(g, 255) * 255,
12496
- b: bound01(b, 255) * 255
12497
- };
12498
- }
12499
-
12500
- // `rgbToHsl`
12501
- // Converts an RGB color value to HSL.
12502
- // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
12503
- // *Returns:* { h, s, l } in [0,1]
12504
- function rgbToHsl(r, g, b) {
12505
- r = bound01(r, 255);
12506
- g = bound01(g, 255);
12507
- b = bound01(b, 255);
12508
- var max = mathMax(r, g, b),
12509
- min = mathMin(r, g, b);
12510
- var h,
12511
- s,
12512
- l = (max + min) / 2;
12513
- if (max == min) {
12514
- h = s = 0; // achromatic
12515
- } else {
12516
- var d = max - min;
12517
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
12518
- switch (max) {
12519
- case r:
12520
- h = (g - b) / d + (g < b ? 6 : 0);
12521
- break;
12522
- case g:
12523
- h = (b - r) / d + 2;
12524
- break;
12525
- case b:
12526
- h = (r - g) / d + 4;
12527
- break;
12528
- }
12529
- h /= 6;
12530
- }
12531
- return {
12532
- h: h,
12533
- s: s,
12534
- l: l
12535
- };
12536
- }
12537
-
12538
- // `hslToRgb`
12539
- // Converts an HSL color value to RGB.
12540
- // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
12541
- // *Returns:* { r, g, b } in the set [0, 255]
12542
- function hslToRgb(h, s, l) {
12543
- var r, g, b;
12544
- h = bound01(h, 360);
12545
- s = bound01(s, 100);
12546
- l = bound01(l, 100);
12547
- function hue2rgb(p, q, t) {
12548
- if (t < 0) t += 1;
12549
- if (t > 1) t -= 1;
12550
- if (t < 1 / 6) return p + (q - p) * 6 * t;
12551
- if (t < 1 / 2) return q;
12552
- if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
12553
- return p;
12554
- }
12555
- if (s === 0) {
12556
- r = g = b = l; // achromatic
12557
- } else {
12558
- var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
12559
- var p = 2 * l - q;
12560
- r = hue2rgb(p, q, h + 1 / 3);
12561
- g = hue2rgb(p, q, h);
12562
- b = hue2rgb(p, q, h - 1 / 3);
12563
- }
12564
- return {
12565
- r: r * 255,
12566
- g: g * 255,
12567
- b: b * 255
12568
- };
12569
- }
12570
-
12571
- // `rgbToHsv`
12572
- // Converts an RGB color value to HSV
12573
- // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
12574
- // *Returns:* { h, s, v } in [0,1]
12575
- function rgbToHsv(r, g, b) {
12576
- r = bound01(r, 255);
12577
- g = bound01(g, 255);
12578
- b = bound01(b, 255);
12579
- var max = mathMax(r, g, b),
12580
- min = mathMin(r, g, b);
12581
- var h,
12582
- s,
12583
- v = max;
12584
- var d = max - min;
12585
- s = max === 0 ? 0 : d / max;
12586
- if (max == min) {
12587
- h = 0; // achromatic
12588
- } else {
12589
- switch (max) {
12590
- case r:
12591
- h = (g - b) / d + (g < b ? 6 : 0);
12592
- break;
12593
- case g:
12594
- h = (b - r) / d + 2;
12595
- break;
12596
- case b:
12597
- h = (r - g) / d + 4;
12598
- break;
12599
- }
12600
- h /= 6;
12601
- }
12602
- return {
12603
- h: h,
12604
- s: s,
12605
- v: v
12606
- };
12607
- }
12608
-
12609
- // `hsvToRgb`
12610
- // Converts an HSV color value to RGB.
12611
- // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
12612
- // *Returns:* { r, g, b } in the set [0, 255]
12613
- function hsvToRgb(h, s, v) {
12614
- h = bound01(h, 360) * 6;
12615
- s = bound01(s, 100);
12616
- v = bound01(v, 100);
12617
- var i = Math.floor(h),
12618
- f = h - i,
12619
- p = v * (1 - s),
12620
- q = v * (1 - f * s),
12621
- t = v * (1 - (1 - f) * s),
12622
- mod = i % 6,
12623
- r = [v, q, p, p, t, v][mod],
12624
- g = [t, v, v, q, p, p][mod],
12625
- b = [p, p, t, v, v, q][mod];
12626
- return {
12627
- r: r * 255,
12628
- g: g * 255,
12629
- b: b * 255
12630
- };
12631
- }
12632
-
12633
- // `rgbToHex`
12634
- // Converts an RGB color to hex
12635
- // Assumes r, g, and b are contained in the set [0, 255]
12636
- // Returns a 3 or 6 character hex
12637
- function rgbToHex(r, g, b, allow3Char) {
12638
- var hex = [pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16))];
12639
-
12640
- // Return a 3 character hex if possible
12641
- if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
12642
- return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
12643
- }
12644
- return hex.join("");
12645
- }
12646
-
12647
- // `rgbaToHex`
12648
- // Converts an RGBA color plus alpha transparency to hex
12649
- // Assumes r, g, b are contained in the set [0, 255] and
12650
- // a in [0, 1]. Returns a 4 or 8 character rgba hex
12651
- function rgbaToHex(r, g, b, a, allow4Char) {
12652
- var hex = [pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16)), pad2(convertDecimalToHex(a))];
12653
-
12654
- // Return a 4 character hex if possible
12655
- if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
12656
- return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
12657
- }
12658
- return hex.join("");
12659
- }
12660
-
12661
- // `rgbaToArgbHex`
12662
- // Converts an RGBA color to an ARGB Hex8 string
12663
- // Rarely used, but required for "toFilter()"
12664
- function rgbaToArgbHex(r, g, b, a) {
12665
- var hex = [pad2(convertDecimalToHex(a)), pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16))];
12666
- return hex.join("");
12667
- }
12668
-
12669
- // `equals`
12670
- // Can be called with any tinycolor input
12671
- tinycolor.equals = function (color1, color2) {
12672
- if (!color1 || !color2) {
12673
- return false;
12674
- }
12675
- return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
12676
- };
12677
- tinycolor.random = function () {
12678
- return tinycolor.fromRatio({
12679
- r: mathRandom(),
12680
- g: mathRandom(),
12681
- b: mathRandom()
12682
- });
12683
- };
12684
-
12685
- // Modification Functions
12686
- // ----------------------
12687
- // Thanks to less.js for some of the basics here
12688
- // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
12689
-
12690
- function _desaturate(color, amount) {
12691
- amount = amount === 0 ? 0 : amount || 10;
12692
- var hsl = tinycolor(color).toHsl();
12693
- hsl.s -= amount / 100;
12694
- hsl.s = clamp01(hsl.s);
12695
- return tinycolor(hsl);
12696
- }
12697
- function _saturate(color, amount) {
12698
- amount = amount === 0 ? 0 : amount || 10;
12699
- var hsl = tinycolor(color).toHsl();
12700
- hsl.s += amount / 100;
12701
- hsl.s = clamp01(hsl.s);
12702
- return tinycolor(hsl);
12703
- }
12704
- function _greyscale(color) {
12705
- return tinycolor(color).desaturate(100);
12706
- }
12707
- function _lighten(color, amount) {
12708
- amount = amount === 0 ? 0 : amount || 10;
12709
- var hsl = tinycolor(color).toHsl();
12710
- hsl.l += amount / 100;
12711
- hsl.l = clamp01(hsl.l);
12712
- return tinycolor(hsl);
12713
- }
12714
- function _brighten(color, amount) {
12715
- amount = amount === 0 ? 0 : amount || 10;
12716
- var rgb = tinycolor(color).toRgb();
12717
- rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * -(amount / 100))));
12718
- rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * -(amount / 100))));
12719
- rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * -(amount / 100))));
12720
- return tinycolor(rgb);
12721
- }
12722
- function _darken(color, amount) {
12723
- amount = amount === 0 ? 0 : amount || 10;
12724
- var hsl = tinycolor(color).toHsl();
12725
- hsl.l -= amount / 100;
12726
- hsl.l = clamp01(hsl.l);
12727
- return tinycolor(hsl);
12728
- }
12729
-
12730
- // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
12731
- // Values outside of this range will be wrapped into this range.
12732
- function _spin(color, amount) {
12733
- var hsl = tinycolor(color).toHsl();
12734
- var hue = (hsl.h + amount) % 360;
12735
- hsl.h = hue < 0 ? 360 + hue : hue;
12736
- return tinycolor(hsl);
12737
- }
12738
-
12739
- // Combination Functions
12740
- // ---------------------
12741
- // Thanks to jQuery xColor for some of the ideas behind these
12742
- // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
12743
-
12744
- function _complement(color) {
12745
- var hsl = tinycolor(color).toHsl();
12746
- hsl.h = (hsl.h + 180) % 360;
12747
- return tinycolor(hsl);
12748
- }
12749
- function _triad(color) {
12750
- var hsl = tinycolor(color).toHsl();
12751
- var h = hsl.h;
12752
- return [tinycolor(color), tinycolor({
12753
- h: (h + 120) % 360,
12754
- s: hsl.s,
12755
- l: hsl.l
12756
- }), tinycolor({
12757
- h: (h + 240) % 360,
12758
- s: hsl.s,
12759
- l: hsl.l
12760
- })];
12761
- }
12762
- function _tetrad(color) {
12763
- var hsl = tinycolor(color).toHsl();
12764
- var h = hsl.h;
12765
- return [tinycolor(color), tinycolor({
12766
- h: (h + 90) % 360,
12767
- s: hsl.s,
12768
- l: hsl.l
12769
- }), tinycolor({
12770
- h: (h + 180) % 360,
12771
- s: hsl.s,
12772
- l: hsl.l
12773
- }), tinycolor({
12774
- h: (h + 270) % 360,
12775
- s: hsl.s,
12776
- l: hsl.l
12777
- })];
12778
- }
12779
- function _splitcomplement(color) {
12780
- var hsl = tinycolor(color).toHsl();
12781
- var h = hsl.h;
12782
- return [tinycolor(color), tinycolor({
12783
- h: (h + 72) % 360,
12784
- s: hsl.s,
12785
- l: hsl.l
12786
- }), tinycolor({
12787
- h: (h + 216) % 360,
12788
- s: hsl.s,
12789
- l: hsl.l
12790
- })];
12791
- }
12792
- function _analogous(color, results, slices) {
12793
- results = results || 6;
12794
- slices = slices || 30;
12795
- var hsl = tinycolor(color).toHsl();
12796
- var part = 360 / slices;
12797
- var ret = [tinycolor(color)];
12798
- for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
12799
- hsl.h = (hsl.h + part) % 360;
12800
- ret.push(tinycolor(hsl));
12801
- }
12802
- return ret;
12803
- }
12804
- function _monochromatic(color, results) {
12805
- results = results || 6;
12806
- var hsv = tinycolor(color).toHsv();
12807
- var h = hsv.h,
12808
- s = hsv.s,
12809
- v = hsv.v;
12810
- var ret = [];
12811
- var modification = 1 / results;
12812
- while (results--) {
12813
- ret.push(tinycolor({
12814
- h: h,
12815
- s: s,
12816
- v: v
12817
- }));
12818
- v = (v + modification) % 1;
12819
- }
12820
- return ret;
12821
- }
12822
-
12823
- // Utility Functions
12824
- // ---------------------
12825
-
12826
- tinycolor.mix = function (color1, color2, amount) {
12827
- amount = amount === 0 ? 0 : amount || 50;
12828
- var rgb1 = tinycolor(color1).toRgb();
12829
- var rgb2 = tinycolor(color2).toRgb();
12830
- var p = amount / 100;
12831
- var rgba = {
12832
- r: (rgb2.r - rgb1.r) * p + rgb1.r,
12833
- g: (rgb2.g - rgb1.g) * p + rgb1.g,
12834
- b: (rgb2.b - rgb1.b) * p + rgb1.b,
12835
- a: (rgb2.a - rgb1.a) * p + rgb1.a
12836
- };
12837
- return tinycolor(rgba);
12838
- };
12839
-
12840
- // Readability Functions
12841
- // ---------------------
12842
- // <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
12843
-
12844
- // `contrast`
12845
- // Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
12846
- tinycolor.readability = function (color1, color2) {
12847
- var c1 = tinycolor(color1);
12848
- var c2 = tinycolor(color2);
12849
- return (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05);
12850
- };
12851
-
12852
- // `isReadable`
12853
- // Ensure that foreground and background color combinations meet WCAG2 guidelines.
12854
- // The third argument is an optional Object.
12855
- // the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
12856
- // the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
12857
- // If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
12858
-
12859
- // *Example*
12860
- // tinycolor.isReadable("#000", "#111") => false
12861
- // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
12862
- tinycolor.isReadable = function (color1, color2, wcag2) {
12863
- var readability = tinycolor.readability(color1, color2);
12864
- var wcag2Parms, out;
12865
- out = false;
12866
- wcag2Parms = validateWCAG2Parms(wcag2);
12867
- switch (wcag2Parms.level + wcag2Parms.size) {
12868
- case "AAsmall":
12869
- case "AAAlarge":
12870
- out = readability >= 4.5;
12871
- break;
12872
- case "AAlarge":
12873
- out = readability >= 3;
12874
- break;
12875
- case "AAAsmall":
12876
- out = readability >= 7;
12877
- break;
12878
- }
12879
- return out;
12880
- };
12881
-
12882
- // `mostReadable`
12883
- // Given a base color and a list of possible foreground or background
12884
- // colors for that base, returns the most readable color.
12885
- // Optionally returns Black or White if the most readable color is unreadable.
12886
- // *Example*
12887
- // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
12888
- // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
12889
- // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
12890
- // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
12891
- tinycolor.mostReadable = function (baseColor, colorList, args) {
12892
- var bestColor = null;
12893
- var bestScore = 0;
12894
- var readability;
12895
- var includeFallbackColors, level, size;
12896
- args = args || {};
12897
- includeFallbackColors = args.includeFallbackColors;
12898
- level = args.level;
12899
- size = args.size;
12900
- for (var i = 0; i < colorList.length; i++) {
12901
- readability = tinycolor.readability(baseColor, colorList[i]);
12902
- if (readability > bestScore) {
12903
- bestScore = readability;
12904
- bestColor = tinycolor(colorList[i]);
12905
- }
12906
- }
12907
- if (tinycolor.isReadable(baseColor, bestColor, {
12908
- "level": level,
12909
- "size": size
12910
- }) || !includeFallbackColors) {
12911
- return bestColor;
12912
- } else {
12913
- args.includeFallbackColors = false;
12914
- return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
12915
- }
12916
- };
12917
-
12918
- // Big List of Colors
12919
- // ------------------
12920
- // <http://www.w3.org/TR/css3-color/#svg-color>
12921
- var names = tinycolor.names = {
12922
- aliceblue: "f0f8ff",
12923
- antiquewhite: "faebd7",
12924
- aqua: "0ff",
12925
- aquamarine: "7fffd4",
12926
- azure: "f0ffff",
12927
- beige: "f5f5dc",
12928
- bisque: "ffe4c4",
12929
- black: "000",
12930
- blanchedalmond: "ffebcd",
12931
- blue: "00f",
12932
- blueviolet: "8a2be2",
12933
- brown: "a52a2a",
12934
- burlywood: "deb887",
12935
- burntsienna: "ea7e5d",
12936
- cadetblue: "5f9ea0",
12937
- chartreuse: "7fff00",
12938
- chocolate: "d2691e",
12939
- coral: "ff7f50",
12940
- cornflowerblue: "6495ed",
12941
- cornsilk: "fff8dc",
12942
- crimson: "dc143c",
12943
- cyan: "0ff",
12944
- darkblue: "00008b",
12945
- darkcyan: "008b8b",
12946
- darkgoldenrod: "b8860b",
12947
- darkgray: "a9a9a9",
12948
- darkgreen: "006400",
12949
- darkgrey: "a9a9a9",
12950
- darkkhaki: "bdb76b",
12951
- darkmagenta: "8b008b",
12952
- darkolivegreen: "556b2f",
12953
- darkorange: "ff8c00",
12954
- darkorchid: "9932cc",
12955
- darkred: "8b0000",
12956
- darksalmon: "e9967a",
12957
- darkseagreen: "8fbc8f",
12958
- darkslateblue: "483d8b",
12959
- darkslategray: "2f4f4f",
12960
- darkslategrey: "2f4f4f",
12961
- darkturquoise: "00ced1",
12962
- darkviolet: "9400d3",
12963
- deeppink: "ff1493",
12964
- deepskyblue: "00bfff",
12965
- dimgray: "696969",
12966
- dimgrey: "696969",
12967
- dodgerblue: "1e90ff",
12968
- firebrick: "b22222",
12969
- floralwhite: "fffaf0",
12970
- forestgreen: "228b22",
12971
- fuchsia: "f0f",
12972
- gainsboro: "dcdcdc",
12973
- ghostwhite: "f8f8ff",
12974
- gold: "ffd700",
12975
- goldenrod: "daa520",
12976
- gray: "808080",
12977
- green: "008000",
12978
- greenyellow: "adff2f",
12979
- grey: "808080",
12980
- honeydew: "f0fff0",
12981
- hotpink: "ff69b4",
12982
- indianred: "cd5c5c",
12983
- indigo: "4b0082",
12984
- ivory: "fffff0",
12985
- khaki: "f0e68c",
12986
- lavender: "e6e6fa",
12987
- lavenderblush: "fff0f5",
12988
- lawngreen: "7cfc00",
12989
- lemonchiffon: "fffacd",
12990
- lightblue: "add8e6",
12991
- lightcoral: "f08080",
12992
- lightcyan: "e0ffff",
12993
- lightgoldenrodyellow: "fafad2",
12994
- lightgray: "d3d3d3",
12995
- lightgreen: "90ee90",
12996
- lightgrey: "d3d3d3",
12997
- lightpink: "ffb6c1",
12998
- lightsalmon: "ffa07a",
12999
- lightseagreen: "20b2aa",
13000
- lightskyblue: "87cefa",
13001
- lightslategray: "789",
13002
- lightslategrey: "789",
13003
- lightsteelblue: "b0c4de",
13004
- lightyellow: "ffffe0",
13005
- lime: "0f0",
13006
- limegreen: "32cd32",
13007
- linen: "faf0e6",
13008
- magenta: "f0f",
13009
- maroon: "800000",
13010
- mediumaquamarine: "66cdaa",
13011
- mediumblue: "0000cd",
13012
- mediumorchid: "ba55d3",
13013
- mediumpurple: "9370db",
13014
- mediumseagreen: "3cb371",
13015
- mediumslateblue: "7b68ee",
13016
- mediumspringgreen: "00fa9a",
13017
- mediumturquoise: "48d1cc",
13018
- mediumvioletred: "c71585",
13019
- midnightblue: "191970",
13020
- mintcream: "f5fffa",
13021
- mistyrose: "ffe4e1",
13022
- moccasin: "ffe4b5",
13023
- navajowhite: "ffdead",
13024
- navy: "000080",
13025
- oldlace: "fdf5e6",
13026
- olive: "808000",
13027
- olivedrab: "6b8e23",
13028
- orange: "ffa500",
13029
- orangered: "ff4500",
13030
- orchid: "da70d6",
13031
- palegoldenrod: "eee8aa",
13032
- palegreen: "98fb98",
13033
- paleturquoise: "afeeee",
13034
- palevioletred: "db7093",
13035
- papayawhip: "ffefd5",
13036
- peachpuff: "ffdab9",
13037
- peru: "cd853f",
13038
- pink: "ffc0cb",
13039
- plum: "dda0dd",
13040
- powderblue: "b0e0e6",
13041
- purple: "800080",
13042
- rebeccapurple: "663399",
13043
- red: "f00",
13044
- rosybrown: "bc8f8f",
13045
- royalblue: "4169e1",
13046
- saddlebrown: "8b4513",
13047
- salmon: "fa8072",
13048
- sandybrown: "f4a460",
13049
- seagreen: "2e8b57",
13050
- seashell: "fff5ee",
13051
- sienna: "a0522d",
13052
- silver: "c0c0c0",
13053
- skyblue: "87ceeb",
13054
- slateblue: "6a5acd",
13055
- slategray: "708090",
13056
- slategrey: "708090",
13057
- snow: "fffafa",
13058
- springgreen: "00ff7f",
13059
- steelblue: "4682b4",
13060
- tan: "d2b48c",
13061
- teal: "008080",
13062
- thistle: "d8bfd8",
13063
- tomato: "ff6347",
13064
- turquoise: "40e0d0",
13065
- violet: "ee82ee",
13066
- wheat: "f5deb3",
13067
- white: "fff",
13068
- whitesmoke: "f5f5f5",
13069
- yellow: "ff0",
13070
- yellowgreen: "9acd32"
13071
- };
13072
-
13073
- // Make it easy to access colors via `hexNames[hex]`
13074
- var hexNames = tinycolor.hexNames = flip(names);
13075
-
13076
- // Utilities
13077
- // ---------
13078
-
13079
- // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
13080
- function flip(o) {
13081
- var flipped = {};
13082
- for (var i in o) {
13083
- if (o.hasOwnProperty(i)) {
13084
- flipped[o[i]] = i;
13085
- }
13086
- }
13087
- return flipped;
13088
- }
13089
-
13090
- // Return a valid alpha value [0,1] with all invalid values being set to 1
13091
- function boundAlpha(a) {
13092
- a = parseFloat(a);
13093
- if (isNaN(a) || a < 0 || a > 1) {
13094
- a = 1;
13095
- }
13096
- return a;
13097
- }
13098
-
13099
- // Take input from [0, n] and return it as [0, 1]
13100
- function bound01(n, max) {
13101
- if (isOnePointZero(n)) {
13102
- n = "100%";
13103
- }
13104
- var processPercent = isPercentage(n);
13105
- n = mathMin(max, mathMax(0, parseFloat(n)));
13106
-
13107
- // Automatically convert percentage into number
13108
- if (processPercent) {
13109
- n = parseInt(n * max, 10) / 100;
13110
- }
13111
-
13112
- // Handle floating point rounding errors
13113
- if (Math.abs(n - max) < 0.000001) {
13114
- return 1;
13115
- }
13116
-
13117
- // Convert into [0, 1] range if it isn't already
13118
- return n % max / parseFloat(max);
13119
- }
13120
-
13121
- // Force a number between 0 and 1
13122
- function clamp01(val) {
13123
- return mathMin(1, mathMax(0, val));
13124
- }
13125
-
13126
- // Parse a base-16 hex value into a base-10 integer
13127
- function parseIntFromHex(val) {
13128
- return parseInt(val, 16);
13129
- }
13130
-
13131
- // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
13132
- // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
13133
- function isOnePointZero(n) {
13134
- return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
13135
- }
13136
-
13137
- // Check to see if string passed in is a percentage
13138
- function isPercentage(n) {
13139
- return typeof n === "string" && n.indexOf('%') != -1;
13140
- }
13141
-
13142
- // Force a hex value to have 2 characters
13143
- function pad2(c) {
13144
- return c.length == 1 ? '0' + c : '' + c;
13145
- }
13146
-
13147
- // Replace a decimal with it's percentage value
13148
- function convertToPercentage(n) {
13149
- if (n <= 1) {
13150
- n = n * 100 + "%";
13151
- }
13152
- return n;
13153
- }
13154
-
13155
- // Converts a decimal to a hex value
13156
- function convertDecimalToHex(d) {
13157
- return Math.round(parseFloat(d) * 255).toString(16);
13158
- }
13159
- // Converts a hex value to a decimal
13160
- function convertHexToDecimal(h) {
13161
- return parseIntFromHex(h) / 255;
13162
- }
13163
- var matchers = function () {
13164
- // <http://www.w3.org/TR/css3-values/#integers>
13165
- var CSS_INTEGER = "[-\\+]?\\d+%?";
13166
-
13167
- // <http://www.w3.org/TR/css3-values/#number-value>
13168
- var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
13169
-
13170
- // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
13171
- var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
13172
-
13173
- // Actual matching.
13174
- // Parentheses and commas are optional, but not required.
13175
- // Whitespace can take the place of commas or opening paren
13176
- var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
13177
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
13178
- return {
13179
- CSS_UNIT: new RegExp(CSS_UNIT),
13180
- rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
13181
- rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
13182
- hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
13183
- hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
13184
- hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
13185
- hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
13186
- hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
13187
- hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
13188
- hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
13189
- hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
13190
- };
13191
- }();
13192
-
13193
- // `isValidCSSUnit`
13194
- // Take in a single string / number and check to see if it looks like a CSS unit
13195
- // (see `matchers` above for definition).
13196
- function isValidCSSUnit(color) {
13197
- return !!matchers.CSS_UNIT.exec(color);
13198
- }
13199
-
13200
- // `stringInputToObject`
13201
- // Permissive string parsing. Take in a number of formats, and output an object
13202
- // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
13203
- function stringInputToObject(color) {
13204
- color = color.replace(trimLeft, '').replace(trimRight, '').toLowerCase();
13205
- var named = false;
13206
- if (names[color]) {
13207
- color = names[color];
13208
- named = true;
13209
- } else if (color == 'transparent') {
13210
- return {
13211
- r: 0,
13212
- g: 0,
13213
- b: 0,
13214
- a: 0,
13215
- format: "name"
13216
- };
13217
- }
13218
-
13219
- // Try to match string input using regular expressions.
13220
- // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
13221
- // Just return an object and let the conversion functions handle that.
13222
- // This way the result will be the same whether the tinycolor is initialized with string or object.
13223
- var match;
13224
- if (match = matchers.rgb.exec(color)) {
13225
- return {
13226
- r: match[1],
13227
- g: match[2],
13228
- b: match[3]
13229
- };
13230
- }
13231
- if (match = matchers.rgba.exec(color)) {
13232
- return {
13233
- r: match[1],
13234
- g: match[2],
13235
- b: match[3],
13236
- a: match[4]
13237
- };
13238
- }
13239
- if (match = matchers.hsl.exec(color)) {
13240
- return {
13241
- h: match[1],
13242
- s: match[2],
13243
- l: match[3]
13244
- };
13245
- }
13246
- if (match = matchers.hsla.exec(color)) {
13247
- return {
13248
- h: match[1],
13249
- s: match[2],
13250
- l: match[3],
13251
- a: match[4]
13252
- };
13253
- }
13254
- if (match = matchers.hsv.exec(color)) {
13255
- return {
13256
- h: match[1],
13257
- s: match[2],
13258
- v: match[3]
13259
- };
13260
- }
13261
- if (match = matchers.hsva.exec(color)) {
13262
- return {
13263
- h: match[1],
13264
- s: match[2],
13265
- v: match[3],
13266
- a: match[4]
13267
- };
13268
- }
13269
- if (match = matchers.hex8.exec(color)) {
13270
- return {
13271
- r: parseIntFromHex(match[1]),
13272
- g: parseIntFromHex(match[2]),
13273
- b: parseIntFromHex(match[3]),
13274
- a: convertHexToDecimal(match[4]),
13275
- format: named ? "name" : "hex8"
13276
- };
13277
- }
13278
- if (match = matchers.hex6.exec(color)) {
13279
- return {
13280
- r: parseIntFromHex(match[1]),
13281
- g: parseIntFromHex(match[2]),
13282
- b: parseIntFromHex(match[3]),
13283
- format: named ? "name" : "hex"
13284
- };
13285
- }
13286
- if (match = matchers.hex4.exec(color)) {
13287
- return {
13288
- r: parseIntFromHex(match[1] + '' + match[1]),
13289
- g: parseIntFromHex(match[2] + '' + match[2]),
13290
- b: parseIntFromHex(match[3] + '' + match[3]),
13291
- a: convertHexToDecimal(match[4] + '' + match[4]),
13292
- format: named ? "name" : "hex8"
13293
- };
13294
- }
13295
- if (match = matchers.hex3.exec(color)) {
13296
- return {
13297
- r: parseIntFromHex(match[1] + '' + match[1]),
13298
- g: parseIntFromHex(match[2] + '' + match[2]),
13299
- b: parseIntFromHex(match[3] + '' + match[3]),
13300
- format: named ? "name" : "hex"
13301
- };
13302
- }
13303
- return false;
13304
- }
13305
- function validateWCAG2Parms(parms) {
13306
- // return valid WCAG2 parms for isReadable.
13307
- // If input parms are invalid, return {"level":"AA", "size":"small"}
13308
- var level, size;
13309
- parms = parms || {
13310
- "level": "AA",
13311
- "size": "small"
13312
- };
13313
- level = (parms.level || "AA").toUpperCase();
13314
- size = (parms.size || "small").toLowerCase();
13315
- if (level !== "AA" && level !== "AAA") {
13316
- level = "AA";
13317
- }
13318
- if (size !== "small" && size !== "large") {
13319
- size = "small";
13320
- }
13321
- return {
13322
- "level": level,
13323
- "size": size
13324
- };
13325
- }
13326
-
13327
- // Node: Export function
13328
- if ( true && module.exports) {
13329
- module.exports = tinycolor;
13330
- }
13331
- // AMD/requirejs: Define the module
13332
- else if (true) {
13333
- !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
13334
- return tinycolor;
13335
- }).call(exports, __webpack_require__, exports, module),
13336
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
13337
- }
13338
- // Browser: Expose to window
13339
- else {}
13340
- })(Math);
13341
-
13342
- /***/ }),
13343
-
13344
12116
  /***/ 2618:
13345
12117
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
13346
12118
 
@@ -15657,9 +14429,89 @@ function useMemo_useMemo(getValue, condition, shouldUpdate) {
15657
14429
  }
15658
14430
  return cacheRef.current.value;
15659
14431
  }
15660
- // EXTERNAL MODULE: ./node_modules/shallowequal/index.js
15661
- var shallowequal = __webpack_require__(2460);
15662
- var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal);
14432
+ ;// CONCATENATED MODULE: ./node_modules/rc-util/es/warning.js
14433
+ /* eslint-disable no-console */
14434
+ var warned = {};
14435
+ function warning_warning(valid, message) {
14436
+ // Support uglify
14437
+ if (false) {}
14438
+ }
14439
+ function note(valid, message) {
14440
+ // Support uglify
14441
+ if (false) {}
14442
+ }
14443
+ function resetWarned() {
14444
+ warned = {};
14445
+ }
14446
+ function call(method, valid, message) {
14447
+ if (!valid && !warned[message]) {
14448
+ method(false, message);
14449
+ warned[message] = true;
14450
+ }
14451
+ }
14452
+ function warningOnce(valid, message) {
14453
+ call(warning_warning, valid, message);
14454
+ }
14455
+ function noteOnce(valid, message) {
14456
+ call(note, valid, message);
14457
+ }
14458
+ /* harmony default export */ var es_warning = (warningOnce);
14459
+ /* eslint-enable */
14460
+ ;// CONCATENATED MODULE: ./node_modules/rc-util/es/isEqual.js
14461
+
14462
+
14463
+ /**
14464
+ * Deeply compares two object literals.
14465
+ * @param obj1 object 1
14466
+ * @param obj2 object 2
14467
+ * @param shallow shallow compare
14468
+ * @returns
14469
+ */
14470
+ function isEqual_isEqual(obj1, obj2) {
14471
+ var shallow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
14472
+ // https://github.com/mapbox/mapbox-gl-js/pull/5979/files#diff-fde7145050c47cc3a306856efd5f9c3016e86e859de9afbd02c879be5067e58f
14473
+ var refSet = new Set();
14474
+ function deepEqual(a, b) {
14475
+ var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
14476
+ var circular = refSet.has(a);
14477
+ es_warning(!circular, 'Warning: There may be circular references');
14478
+ if (circular) {
14479
+ return false;
14480
+ }
14481
+ if (a === b) {
14482
+ return true;
14483
+ }
14484
+ if (shallow && level > 1) {
14485
+ return false;
14486
+ }
14487
+ refSet.add(a);
14488
+ var newLevel = level + 1;
14489
+ if (Array.isArray(a)) {
14490
+ if (!Array.isArray(b) || a.length !== b.length) {
14491
+ return false;
14492
+ }
14493
+ for (var i = 0; i < a.length; i++) {
14494
+ if (!deepEqual(a[i], b[i], newLevel)) {
14495
+ return false;
14496
+ }
14497
+ }
14498
+ return true;
14499
+ }
14500
+ if (a && b && typeof_typeof(a) === 'object' && typeof_typeof(b) === 'object') {
14501
+ var keys = Object.keys(a);
14502
+ if (keys.length !== Object.keys(b).length) {
14503
+ return false;
14504
+ }
14505
+ return keys.every(function (key) {
14506
+ return deepEqual(a[key], b[key], newLevel);
14507
+ });
14508
+ }
14509
+ // other
14510
+ return false;
14511
+ }
14512
+ return deepEqual(obj1, obj2);
14513
+ }
14514
+ /* harmony default export */ var es_isEqual = (isEqual_isEqual);
15663
14515
  ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
15664
14516
  function _classCallCheck(instance, Constructor) {
15665
14517
  if (!(instance instanceof Constructor)) {
@@ -15778,7 +14630,7 @@ var StyleProvider = function StyleProvider(props) {
15778
14630
  mergedContext.defaultCache = !cache && parentContext.defaultCache;
15779
14631
  return mergedContext;
15780
14632
  }, [parentContext, restProps], function (prev, next) {
15781
- return !shallowEqual(prev[0], next[0]) || !shallowEqual(prev[1], next[1]);
14633
+ return !isEqual(prev[0], next[0], true) || !isEqual(prev[1], next[1], true);
15782
14634
  });
15783
14635
  return /*#__PURE__*/React.createElement(StyleContext.Provider, {
15784
14636
  value: context
@@ -15845,34 +14697,6 @@ function useClientCache(prefix, keyPath, cacheFn, onCacheRemove) {
15845
14697
  }, fullPath);
15846
14698
  return globalCache.get(fullPath)[1];
15847
14699
  }
15848
- ;// CONCATENATED MODULE: ./node_modules/rc-util/es/warning.js
15849
- /* eslint-disable no-console */
15850
- var warned = {};
15851
- function warning_warning(valid, message) {
15852
- // Support uglify
15853
- if (false) {}
15854
- }
15855
- function note(valid, message) {
15856
- // Support uglify
15857
- if (false) {}
15858
- }
15859
- function resetWarned() {
15860
- warned = {};
15861
- }
15862
- function call(method, valid, message) {
15863
- if (!valid && !warned[message]) {
15864
- method(false, message);
15865
- warned[message] = true;
15866
- }
15867
- }
15868
- function warningOnce(valid, message) {
15869
- call(warning_warning, valid, message);
15870
- }
15871
- function noteOnce(valid, message) {
15872
- call(note, valid, message);
15873
- }
15874
- /* harmony default export */ var es_warning = (warningOnce);
15875
- /* eslint-enable */
15876
14700
  ;// CONCATENATED MODULE: ./node_modules/@ant-design/cssinjs/es/util.js
15877
14701
 
15878
14702
 
@@ -16648,7 +15472,28 @@ function splitValues(value) {
16648
15472
  if (typeof value === 'number') {
16649
15473
  return [value];
16650
15474
  }
16651
- return String(value).split(/\s+/);
15475
+ var splitStyle = String(value).split(/\s+/); // Combine styles split in brackets, like `calc(1px + 2px)`
15476
+
15477
+ var temp = '';
15478
+ var brackets = 0;
15479
+ return splitStyle.reduce(function (list, item) {
15480
+ if (item.includes('(')) {
15481
+ temp += item;
15482
+ brackets += item.split('(').length - 1;
15483
+ } else if (item.includes(')')) {
15484
+ temp += item;
15485
+ brackets -= item.split(')').length - 1;
15486
+ if (brackets === 0) {
15487
+ list.push(temp);
15488
+ temp = '';
15489
+ }
15490
+ } else if (brackets > 0) {
15491
+ temp += item;
15492
+ } else {
15493
+ list.push(item);
15494
+ }
15495
+ return list;
15496
+ }, []);
16652
15497
  }
16653
15498
  function noSplit(list) {
16654
15499
  list.notSplit = true;
@@ -21196,7 +20041,7 @@ var ConfigProVidContainer = function ConfigProVidContainer(props) {
21196
20041
  var _process$env$NODE_ENV2;
21197
20042
  var themeConfig = objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, restConfig.theme), {}, {
21198
20043
  hashId: hashId,
21199
- hashed: ((_process$env$NODE_ENV2 = "production") === null || _process$env$NODE_ENV2 === void 0 ? void 0 : _process$env$NODE_ENV2.toLowerCase()) !== 'test' && proProvide.hashed
20044
+ hashed: ((_process$env$NODE_ENV2 = "production") === null || _process$env$NODE_ENV2 === void 0 ? void 0 : _process$env$NODE_ENV2.toLowerCase()) !== 'test' && props.hashed !== false && proProvide.hashed !== false
21200
20045
  });
21201
20046
  var provide = (0,jsx_runtime.jsx)(external_antd_.ConfigProvider, objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, restConfig), {}, {
21202
20047
  theme: objectSpread2_objectSpread2({}, themeConfig),
@@ -26905,7 +25750,7 @@ var LightWrapper = function LightWrapper(props) {
26905
25750
  size: size,
26906
25751
  onClear: function onClear() {
26907
25752
  onChange === null || onChange === void 0 ? void 0 : onChange();
26908
- setTempValue(undefined);
25753
+ setTempValue('');
26909
25754
  },
26910
25755
  bordered: bordered,
26911
25756
  style: style,
@@ -26920,7 +25765,7 @@ var LightWrapper = function LightWrapper(props) {
26920
25765
  }),
26921
25766
  footer: {
26922
25767
  onClear: function onClear() {
26923
- return setTempValue(undefined);
25768
+ return setTempValue('');
26924
25769
  },
26925
25770
  onConfirm: function onConfirm() {
26926
25771
  onChange === null || onChange === void 0 ? void 0 : onChange(tempValue);
@@ -32087,7 +30932,7 @@ var SearchSelect = function SearchSelect(props, ref) {
32087
30932
  onChange: function onChange(value, optionList) {
32088
30933
  // 将搜索框置空 和 antd 行为保持一致
32089
30934
  if (showSearch && autoClearSearchValue) {
32090
- if (!searchValue) fetchData('');
30935
+ fetchData('');
32091
30936
  onSearch === null || onSearch === void 0 ? void 0 : onSearch('');
32092
30937
  setSearchValue(undefined);
32093
30938
  }
@@ -33831,9 +32676,1176 @@ var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce);
33831
32676
  // EXTERNAL MODULE: ./node_modules/lodash/each.js
33832
32677
  var each = __webpack_require__(6350);
33833
32678
  var each_default = /*#__PURE__*/__webpack_require__.n(each);
33834
- // EXTERNAL MODULE: ./node_modules/tinycolor2/tinycolor.js
33835
- var tinycolor2_tinycolor = __webpack_require__(1438);
33836
- var tinycolor_default = /*#__PURE__*/__webpack_require__.n(tinycolor2_tinycolor);
32679
+ ;// CONCATENATED MODULE: ./node_modules/tinycolor2/esm/tinycolor.js
32680
+ // This file is autogenerated. It's used to publish ESM to npm.
32681
+ // https://github.com/bgrins/TinyColor
32682
+ // Brian Grinstead, MIT License
32683
+
32684
+ var trimLeft = /^\s+/;
32685
+ var trimRight = /\s+$/;
32686
+ function tinycolor_tinycolor(color, opts) {
32687
+ color = color ? color : "";
32688
+ opts = opts || {};
32689
+
32690
+ // If input is already a tinycolor, return itself
32691
+ if (color instanceof tinycolor_tinycolor) {
32692
+ return color;
32693
+ }
32694
+ // If we are called as a function, call using new instead
32695
+ if (!(this instanceof tinycolor_tinycolor)) {
32696
+ return new tinycolor_tinycolor(color, opts);
32697
+ }
32698
+ var rgb = inputToRGB(color);
32699
+ this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format;
32700
+ this._gradientType = opts.gradientType;
32701
+
32702
+ // Don't let the range of [0,255] come back in [0,1].
32703
+ // Potentially lose a little bit of precision here, but will fix issues where
32704
+ // .5 gets interpreted as half of the total, instead of half of 1
32705
+ // If it was supposed to be 128, this was already taken care of by `inputToRgb`
32706
+ if (this._r < 1) this._r = Math.round(this._r);
32707
+ if (this._g < 1) this._g = Math.round(this._g);
32708
+ if (this._b < 1) this._b = Math.round(this._b);
32709
+ this._ok = rgb.ok;
32710
+ }
32711
+ tinycolor_tinycolor.prototype = {
32712
+ isDark: function isDark() {
32713
+ return this.getBrightness() < 128;
32714
+ },
32715
+ isLight: function isLight() {
32716
+ return !this.isDark();
32717
+ },
32718
+ isValid: function isValid() {
32719
+ return this._ok;
32720
+ },
32721
+ getOriginalInput: function getOriginalInput() {
32722
+ return this._originalInput;
32723
+ },
32724
+ getFormat: function getFormat() {
32725
+ return this._format;
32726
+ },
32727
+ getAlpha: function getAlpha() {
32728
+ return this._a;
32729
+ },
32730
+ getBrightness: function getBrightness() {
32731
+ //http://www.w3.org/TR/AERT#color-contrast
32732
+ var rgb = this.toRgb();
32733
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
32734
+ },
32735
+ getLuminance: function getLuminance() {
32736
+ //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
32737
+ var rgb = this.toRgb();
32738
+ var RsRGB, GsRGB, BsRGB, R, G, B;
32739
+ RsRGB = rgb.r / 255;
32740
+ GsRGB = rgb.g / 255;
32741
+ BsRGB = rgb.b / 255;
32742
+ if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
32743
+ if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
32744
+ if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
32745
+ return 0.2126 * R + 0.7152 * G + 0.0722 * B;
32746
+ },
32747
+ setAlpha: function setAlpha(value) {
32748
+ this._a = boundAlpha(value);
32749
+ this._roundA = Math.round(100 * this._a) / 100;
32750
+ return this;
32751
+ },
32752
+ toHsv: function toHsv() {
32753
+ var hsv = rgbToHsv(this._r, this._g, this._b);
32754
+ return {
32755
+ h: hsv.h * 360,
32756
+ s: hsv.s,
32757
+ v: hsv.v,
32758
+ a: this._a
32759
+ };
32760
+ },
32761
+ toHsvString: function toHsvString() {
32762
+ var hsv = rgbToHsv(this._r, this._g, this._b);
32763
+ var h = Math.round(hsv.h * 360),
32764
+ s = Math.round(hsv.s * 100),
32765
+ v = Math.round(hsv.v * 100);
32766
+ return this._a == 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
32767
+ },
32768
+ toHsl: function toHsl() {
32769
+ var hsl = rgbToHsl(this._r, this._g, this._b);
32770
+ return {
32771
+ h: hsl.h * 360,
32772
+ s: hsl.s,
32773
+ l: hsl.l,
32774
+ a: this._a
32775
+ };
32776
+ },
32777
+ toHslString: function toHslString() {
32778
+ var hsl = rgbToHsl(this._r, this._g, this._b);
32779
+ var h = Math.round(hsl.h * 360),
32780
+ s = Math.round(hsl.s * 100),
32781
+ l = Math.round(hsl.l * 100);
32782
+ return this._a == 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
32783
+ },
32784
+ toHex: function toHex(allow3Char) {
32785
+ return rgbToHex(this._r, this._g, this._b, allow3Char);
32786
+ },
32787
+ toHexString: function toHexString(allow3Char) {
32788
+ return "#" + this.toHex(allow3Char);
32789
+ },
32790
+ toHex8: function toHex8(allow4Char) {
32791
+ return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
32792
+ },
32793
+ toHex8String: function toHex8String(allow4Char) {
32794
+ return "#" + this.toHex8(allow4Char);
32795
+ },
32796
+ toRgb: function toRgb() {
32797
+ return {
32798
+ r: Math.round(this._r),
32799
+ g: Math.round(this._g),
32800
+ b: Math.round(this._b),
32801
+ a: this._a
32802
+ };
32803
+ },
32804
+ toRgbString: function toRgbString() {
32805
+ return this._a == 1 ? "rgb(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ")" : "rgba(" + Math.round(this._r) + ", " + Math.round(this._g) + ", " + Math.round(this._b) + ", " + this._roundA + ")";
32806
+ },
32807
+ toPercentageRgb: function toPercentageRgb() {
32808
+ return {
32809
+ r: Math.round(bound01(this._r, 255) * 100) + "%",
32810
+ g: Math.round(bound01(this._g, 255) * 100) + "%",
32811
+ b: Math.round(bound01(this._b, 255) * 100) + "%",
32812
+ a: this._a
32813
+ };
32814
+ },
32815
+ toPercentageRgbString: function toPercentageRgbString() {
32816
+ return this._a == 1 ? "rgb(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(bound01(this._r, 255) * 100) + "%, " + Math.round(bound01(this._g, 255) * 100) + "%, " + Math.round(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
32817
+ },
32818
+ toName: function toName() {
32819
+ if (this._a === 0) {
32820
+ return "transparent";
32821
+ }
32822
+ if (this._a < 1) {
32823
+ return false;
32824
+ }
32825
+ return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
32826
+ },
32827
+ toFilter: function toFilter(secondColor) {
32828
+ var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
32829
+ var secondHex8String = hex8String;
32830
+ var gradientType = this._gradientType ? "GradientType = 1, " : "";
32831
+ if (secondColor) {
32832
+ var s = tinycolor_tinycolor(secondColor);
32833
+ secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
32834
+ }
32835
+ return "progid:DXImageTransform.Microsoft.gradient(" + gradientType + "startColorstr=" + hex8String + ",endColorstr=" + secondHex8String + ")";
32836
+ },
32837
+ toString: function toString(format) {
32838
+ var formatSet = !!format;
32839
+ format = format || this._format;
32840
+ var formattedString = false;
32841
+ var hasAlpha = this._a < 1 && this._a >= 0;
32842
+ var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "hex4" || format === "hex8" || format === "name");
32843
+ if (needsAlphaFormat) {
32844
+ // Special case for "transparent", all other non-alpha formats
32845
+ // will return rgba when there is transparency.
32846
+ if (format === "name" && this._a === 0) {
32847
+ return this.toName();
32848
+ }
32849
+ return this.toRgbString();
32850
+ }
32851
+ if (format === "rgb") {
32852
+ formattedString = this.toRgbString();
32853
+ }
32854
+ if (format === "prgb") {
32855
+ formattedString = this.toPercentageRgbString();
32856
+ }
32857
+ if (format === "hex" || format === "hex6") {
32858
+ formattedString = this.toHexString();
32859
+ }
32860
+ if (format === "hex3") {
32861
+ formattedString = this.toHexString(true);
32862
+ }
32863
+ if (format === "hex4") {
32864
+ formattedString = this.toHex8String(true);
32865
+ }
32866
+ if (format === "hex8") {
32867
+ formattedString = this.toHex8String();
32868
+ }
32869
+ if (format === "name") {
32870
+ formattedString = this.toName();
32871
+ }
32872
+ if (format === "hsl") {
32873
+ formattedString = this.toHslString();
32874
+ }
32875
+ if (format === "hsv") {
32876
+ formattedString = this.toHsvString();
32877
+ }
32878
+ return formattedString || this.toHexString();
32879
+ },
32880
+ clone: function clone() {
32881
+ return tinycolor_tinycolor(this.toString());
32882
+ },
32883
+ _applyModification: function _applyModification(fn, args) {
32884
+ var color = fn.apply(null, [this].concat([].slice.call(args)));
32885
+ this._r = color._r;
32886
+ this._g = color._g;
32887
+ this._b = color._b;
32888
+ this.setAlpha(color._a);
32889
+ return this;
32890
+ },
32891
+ lighten: function lighten() {
32892
+ return this._applyModification(_lighten, arguments);
32893
+ },
32894
+ brighten: function brighten() {
32895
+ return this._applyModification(_brighten, arguments);
32896
+ },
32897
+ darken: function darken() {
32898
+ return this._applyModification(_darken, arguments);
32899
+ },
32900
+ desaturate: function desaturate() {
32901
+ return this._applyModification(_desaturate, arguments);
32902
+ },
32903
+ saturate: function saturate() {
32904
+ return this._applyModification(_saturate, arguments);
32905
+ },
32906
+ greyscale: function greyscale() {
32907
+ return this._applyModification(_greyscale, arguments);
32908
+ },
32909
+ spin: function spin() {
32910
+ return this._applyModification(_spin, arguments);
32911
+ },
32912
+ _applyCombination: function _applyCombination(fn, args) {
32913
+ return fn.apply(null, [this].concat([].slice.call(args)));
32914
+ },
32915
+ analogous: function analogous() {
32916
+ return this._applyCombination(_analogous, arguments);
32917
+ },
32918
+ complement: function complement() {
32919
+ return this._applyCombination(_complement, arguments);
32920
+ },
32921
+ monochromatic: function monochromatic() {
32922
+ return this._applyCombination(_monochromatic, arguments);
32923
+ },
32924
+ splitcomplement: function splitcomplement() {
32925
+ return this._applyCombination(_splitcomplement, arguments);
32926
+ },
32927
+ // Disabled until https://github.com/bgrins/TinyColor/issues/254
32928
+ // polyad: function (number) {
32929
+ // return this._applyCombination(polyad, [number]);
32930
+ // },
32931
+ triad: function triad() {
32932
+ return this._applyCombination(polyad, [3]);
32933
+ },
32934
+ tetrad: function tetrad() {
32935
+ return this._applyCombination(polyad, [4]);
32936
+ }
32937
+ };
32938
+
32939
+ // If input is an object, force 1 into "1.0" to handle ratios properly
32940
+ // String input requires "1.0" as input, so 1 will be treated as 1
32941
+ tinycolor_tinycolor.fromRatio = function (color, opts) {
32942
+ if (typeof color == "object") {
32943
+ var newColor = {};
32944
+ for (var i in color) {
32945
+ if (color.hasOwnProperty(i)) {
32946
+ if (i === "a") {
32947
+ newColor[i] = color[i];
32948
+ } else {
32949
+ newColor[i] = convertToPercentage(color[i]);
32950
+ }
32951
+ }
32952
+ }
32953
+ color = newColor;
32954
+ }
32955
+ return tinycolor_tinycolor(color, opts);
32956
+ };
32957
+
32958
+ // Given a string or object, convert that input to RGB
32959
+ // Possible string inputs:
32960
+ //
32961
+ // "red"
32962
+ // "#f00" or "f00"
32963
+ // "#ff0000" or "ff0000"
32964
+ // "#ff000000" or "ff000000"
32965
+ // "rgb 255 0 0" or "rgb (255, 0, 0)"
32966
+ // "rgb 1.0 0 0" or "rgb (1, 0, 0)"
32967
+ // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
32968
+ // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
32969
+ // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
32970
+ // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
32971
+ // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
32972
+ //
32973
+ function inputToRGB(color) {
32974
+ var rgb = {
32975
+ r: 0,
32976
+ g: 0,
32977
+ b: 0
32978
+ };
32979
+ var a = 1;
32980
+ var s = null;
32981
+ var v = null;
32982
+ var l = null;
32983
+ var ok = false;
32984
+ var format = false;
32985
+ if (typeof color == "string") {
32986
+ color = stringInputToObject(color);
32987
+ }
32988
+ if (typeof color == "object") {
32989
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
32990
+ rgb = rgbToRgb(color.r, color.g, color.b);
32991
+ ok = true;
32992
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
32993
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
32994
+ s = convertToPercentage(color.s);
32995
+ v = convertToPercentage(color.v);
32996
+ rgb = hsvToRgb(color.h, s, v);
32997
+ ok = true;
32998
+ format = "hsv";
32999
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
33000
+ s = convertToPercentage(color.s);
33001
+ l = convertToPercentage(color.l);
33002
+ rgb = hslToRgb(color.h, s, l);
33003
+ ok = true;
33004
+ format = "hsl";
33005
+ }
33006
+ if (color.hasOwnProperty("a")) {
33007
+ a = color.a;
33008
+ }
33009
+ }
33010
+ a = boundAlpha(a);
33011
+ return {
33012
+ ok: ok,
33013
+ format: color.format || format,
33014
+ r: Math.min(255, Math.max(rgb.r, 0)),
33015
+ g: Math.min(255, Math.max(rgb.g, 0)),
33016
+ b: Math.min(255, Math.max(rgb.b, 0)),
33017
+ a: a
33018
+ };
33019
+ }
33020
+
33021
+ // Conversion Functions
33022
+ // --------------------
33023
+
33024
+ // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
33025
+ // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
33026
+
33027
+ // `rgbToRgb`
33028
+ // Handle bounds / percentage checking to conform to CSS color spec
33029
+ // <http://www.w3.org/TR/css3-color/>
33030
+ // *Assumes:* r, g, b in [0, 255] or [0, 1]
33031
+ // *Returns:* { r, g, b } in [0, 255]
33032
+ function rgbToRgb(r, g, b) {
33033
+ return {
33034
+ r: bound01(r, 255) * 255,
33035
+ g: bound01(g, 255) * 255,
33036
+ b: bound01(b, 255) * 255
33037
+ };
33038
+ }
33039
+
33040
+ // `rgbToHsl`
33041
+ // Converts an RGB color value to HSL.
33042
+ // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
33043
+ // *Returns:* { h, s, l } in [0,1]
33044
+ function rgbToHsl(r, g, b) {
33045
+ r = bound01(r, 255);
33046
+ g = bound01(g, 255);
33047
+ b = bound01(b, 255);
33048
+ var max = Math.max(r, g, b),
33049
+ min = Math.min(r, g, b);
33050
+ var h,
33051
+ s,
33052
+ l = (max + min) / 2;
33053
+ if (max == min) {
33054
+ h = s = 0; // achromatic
33055
+ } else {
33056
+ var d = max - min;
33057
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
33058
+ switch (max) {
33059
+ case r:
33060
+ h = (g - b) / d + (g < b ? 6 : 0);
33061
+ break;
33062
+ case g:
33063
+ h = (b - r) / d + 2;
33064
+ break;
33065
+ case b:
33066
+ h = (r - g) / d + 4;
33067
+ break;
33068
+ }
33069
+ h /= 6;
33070
+ }
33071
+ return {
33072
+ h: h,
33073
+ s: s,
33074
+ l: l
33075
+ };
33076
+ }
33077
+
33078
+ // `hslToRgb`
33079
+ // Converts an HSL color value to RGB.
33080
+ // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
33081
+ // *Returns:* { r, g, b } in the set [0, 255]
33082
+ function hslToRgb(h, s, l) {
33083
+ var r, g, b;
33084
+ h = bound01(h, 360);
33085
+ s = bound01(s, 100);
33086
+ l = bound01(l, 100);
33087
+ function hue2rgb(p, q, t) {
33088
+ if (t < 0) t += 1;
33089
+ if (t > 1) t -= 1;
33090
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
33091
+ if (t < 1 / 2) return q;
33092
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
33093
+ return p;
33094
+ }
33095
+ if (s === 0) {
33096
+ r = g = b = l; // achromatic
33097
+ } else {
33098
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
33099
+ var p = 2 * l - q;
33100
+ r = hue2rgb(p, q, h + 1 / 3);
33101
+ g = hue2rgb(p, q, h);
33102
+ b = hue2rgb(p, q, h - 1 / 3);
33103
+ }
33104
+ return {
33105
+ r: r * 255,
33106
+ g: g * 255,
33107
+ b: b * 255
33108
+ };
33109
+ }
33110
+
33111
+ // `rgbToHsv`
33112
+ // Converts an RGB color value to HSV
33113
+ // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
33114
+ // *Returns:* { h, s, v } in [0,1]
33115
+ function rgbToHsv(r, g, b) {
33116
+ r = bound01(r, 255);
33117
+ g = bound01(g, 255);
33118
+ b = bound01(b, 255);
33119
+ var max = Math.max(r, g, b),
33120
+ min = Math.min(r, g, b);
33121
+ var h,
33122
+ s,
33123
+ v = max;
33124
+ var d = max - min;
33125
+ s = max === 0 ? 0 : d / max;
33126
+ if (max == min) {
33127
+ h = 0; // achromatic
33128
+ } else {
33129
+ switch (max) {
33130
+ case r:
33131
+ h = (g - b) / d + (g < b ? 6 : 0);
33132
+ break;
33133
+ case g:
33134
+ h = (b - r) / d + 2;
33135
+ break;
33136
+ case b:
33137
+ h = (r - g) / d + 4;
33138
+ break;
33139
+ }
33140
+ h /= 6;
33141
+ }
33142
+ return {
33143
+ h: h,
33144
+ s: s,
33145
+ v: v
33146
+ };
33147
+ }
33148
+
33149
+ // `hsvToRgb`
33150
+ // Converts an HSV color value to RGB.
33151
+ // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
33152
+ // *Returns:* { r, g, b } in the set [0, 255]
33153
+ function hsvToRgb(h, s, v) {
33154
+ h = bound01(h, 360) * 6;
33155
+ s = bound01(s, 100);
33156
+ v = bound01(v, 100);
33157
+ var i = Math.floor(h),
33158
+ f = h - i,
33159
+ p = v * (1 - s),
33160
+ q = v * (1 - f * s),
33161
+ t = v * (1 - (1 - f) * s),
33162
+ mod = i % 6,
33163
+ r = [v, q, p, p, t, v][mod],
33164
+ g = [t, v, v, q, p, p][mod],
33165
+ b = [p, p, t, v, v, q][mod];
33166
+ return {
33167
+ r: r * 255,
33168
+ g: g * 255,
33169
+ b: b * 255
33170
+ };
33171
+ }
33172
+
33173
+ // `rgbToHex`
33174
+ // Converts an RGB color to hex
33175
+ // Assumes r, g, and b are contained in the set [0, 255]
33176
+ // Returns a 3 or 6 character hex
33177
+ function rgbToHex(r, g, b, allow3Char) {
33178
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
33179
+
33180
+ // Return a 3 character hex if possible
33181
+ if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
33182
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
33183
+ }
33184
+ return hex.join("");
33185
+ }
33186
+
33187
+ // `rgbaToHex`
33188
+ // Converts an RGBA color plus alpha transparency to hex
33189
+ // Assumes r, g, b are contained in the set [0, 255] and
33190
+ // a in [0, 1]. Returns a 4 or 8 character rgba hex
33191
+ function rgbaToHex(r, g, b, a, allow4Char) {
33192
+ var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];
33193
+
33194
+ // Return a 4 character hex if possible
33195
+ if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {
33196
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
33197
+ }
33198
+ return hex.join("");
33199
+ }
33200
+
33201
+ // `rgbaToArgbHex`
33202
+ // Converts an RGBA color to an ARGB Hex8 string
33203
+ // Rarely used, but required for "toFilter()"
33204
+ function rgbaToArgbHex(r, g, b, a) {
33205
+ var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];
33206
+ return hex.join("");
33207
+ }
33208
+
33209
+ // `equals`
33210
+ // Can be called with any tinycolor input
33211
+ tinycolor_tinycolor.equals = function (color1, color2) {
33212
+ if (!color1 || !color2) return false;
33213
+ return tinycolor_tinycolor(color1).toRgbString() == tinycolor_tinycolor(color2).toRgbString();
33214
+ };
33215
+ tinycolor_tinycolor.random = function () {
33216
+ return tinycolor_tinycolor.fromRatio({
33217
+ r: Math.random(),
33218
+ g: Math.random(),
33219
+ b: Math.random()
33220
+ });
33221
+ };
33222
+
33223
+ // Modification Functions
33224
+ // ----------------------
33225
+ // Thanks to less.js for some of the basics here
33226
+ // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
33227
+
33228
+ function _desaturate(color, amount) {
33229
+ amount = amount === 0 ? 0 : amount || 10;
33230
+ var hsl = tinycolor_tinycolor(color).toHsl();
33231
+ hsl.s -= amount / 100;
33232
+ hsl.s = clamp01(hsl.s);
33233
+ return tinycolor_tinycolor(hsl);
33234
+ }
33235
+ function _saturate(color, amount) {
33236
+ amount = amount === 0 ? 0 : amount || 10;
33237
+ var hsl = tinycolor_tinycolor(color).toHsl();
33238
+ hsl.s += amount / 100;
33239
+ hsl.s = clamp01(hsl.s);
33240
+ return tinycolor_tinycolor(hsl);
33241
+ }
33242
+ function _greyscale(color) {
33243
+ return tinycolor_tinycolor(color).desaturate(100);
33244
+ }
33245
+ function _lighten(color, amount) {
33246
+ amount = amount === 0 ? 0 : amount || 10;
33247
+ var hsl = tinycolor_tinycolor(color).toHsl();
33248
+ hsl.l += amount / 100;
33249
+ hsl.l = clamp01(hsl.l);
33250
+ return tinycolor_tinycolor(hsl);
33251
+ }
33252
+ function _brighten(color, amount) {
33253
+ amount = amount === 0 ? 0 : amount || 10;
33254
+ var rgb = tinycolor_tinycolor(color).toRgb();
33255
+ rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
33256
+ rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
33257
+ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
33258
+ return tinycolor_tinycolor(rgb);
33259
+ }
33260
+ function _darken(color, amount) {
33261
+ amount = amount === 0 ? 0 : amount || 10;
33262
+ var hsl = tinycolor_tinycolor(color).toHsl();
33263
+ hsl.l -= amount / 100;
33264
+ hsl.l = clamp01(hsl.l);
33265
+ return tinycolor_tinycolor(hsl);
33266
+ }
33267
+
33268
+ // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
33269
+ // Values outside of this range will be wrapped into this range.
33270
+ function _spin(color, amount) {
33271
+ var hsl = tinycolor_tinycolor(color).toHsl();
33272
+ var hue = (hsl.h + amount) % 360;
33273
+ hsl.h = hue < 0 ? 360 + hue : hue;
33274
+ return tinycolor_tinycolor(hsl);
33275
+ }
33276
+
33277
+ // Combination Functions
33278
+ // ---------------------
33279
+ // Thanks to jQuery xColor for some of the ideas behind these
33280
+ // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
33281
+
33282
+ function _complement(color) {
33283
+ var hsl = tinycolor_tinycolor(color).toHsl();
33284
+ hsl.h = (hsl.h + 180) % 360;
33285
+ return tinycolor_tinycolor(hsl);
33286
+ }
33287
+ function polyad(color, number) {
33288
+ if (isNaN(number) || number <= 0) {
33289
+ throw new Error("Argument to polyad must be a positive number");
33290
+ }
33291
+ var hsl = tinycolor_tinycolor(color).toHsl();
33292
+ var result = [tinycolor_tinycolor(color)];
33293
+ var step = 360 / number;
33294
+ for (var i = 1; i < number; i++) {
33295
+ result.push(tinycolor_tinycolor({
33296
+ h: (hsl.h + i * step) % 360,
33297
+ s: hsl.s,
33298
+ l: hsl.l
33299
+ }));
33300
+ }
33301
+ return result;
33302
+ }
33303
+ function _splitcomplement(color) {
33304
+ var hsl = tinycolor_tinycolor(color).toHsl();
33305
+ var h = hsl.h;
33306
+ return [tinycolor_tinycolor(color), tinycolor_tinycolor({
33307
+ h: (h + 72) % 360,
33308
+ s: hsl.s,
33309
+ l: hsl.l
33310
+ }), tinycolor_tinycolor({
33311
+ h: (h + 216) % 360,
33312
+ s: hsl.s,
33313
+ l: hsl.l
33314
+ })];
33315
+ }
33316
+ function _analogous(color, results, slices) {
33317
+ results = results || 6;
33318
+ slices = slices || 30;
33319
+ var hsl = tinycolor_tinycolor(color).toHsl();
33320
+ var part = 360 / slices;
33321
+ var ret = [tinycolor_tinycolor(color)];
33322
+ for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {
33323
+ hsl.h = (hsl.h + part) % 360;
33324
+ ret.push(tinycolor_tinycolor(hsl));
33325
+ }
33326
+ return ret;
33327
+ }
33328
+ function _monochromatic(color, results) {
33329
+ results = results || 6;
33330
+ var hsv = tinycolor_tinycolor(color).toHsv();
33331
+ var h = hsv.h,
33332
+ s = hsv.s,
33333
+ v = hsv.v;
33334
+ var ret = [];
33335
+ var modification = 1 / results;
33336
+ while (results--) {
33337
+ ret.push(tinycolor_tinycolor({
33338
+ h: h,
33339
+ s: s,
33340
+ v: v
33341
+ }));
33342
+ v = (v + modification) % 1;
33343
+ }
33344
+ return ret;
33345
+ }
33346
+
33347
+ // Utility Functions
33348
+ // ---------------------
33349
+
33350
+ tinycolor_tinycolor.mix = function (color1, color2, amount) {
33351
+ amount = amount === 0 ? 0 : amount || 50;
33352
+ var rgb1 = tinycolor_tinycolor(color1).toRgb();
33353
+ var rgb2 = tinycolor_tinycolor(color2).toRgb();
33354
+ var p = amount / 100;
33355
+ var rgba = {
33356
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
33357
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
33358
+ b: (rgb2.b - rgb1.b) * p + rgb1.b,
33359
+ a: (rgb2.a - rgb1.a) * p + rgb1.a
33360
+ };
33361
+ return tinycolor_tinycolor(rgba);
33362
+ };
33363
+
33364
+ // Readability Functions
33365
+ // ---------------------
33366
+ // <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
33367
+
33368
+ // `contrast`
33369
+ // Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
33370
+ tinycolor_tinycolor.readability = function (color1, color2) {
33371
+ var c1 = tinycolor_tinycolor(color1);
33372
+ var c2 = tinycolor_tinycolor(color2);
33373
+ return (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05);
33374
+ };
33375
+
33376
+ // `isReadable`
33377
+ // Ensure that foreground and background color combinations meet WCAG2 guidelines.
33378
+ // The third argument is an optional Object.
33379
+ // the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
33380
+ // the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
33381
+ // If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
33382
+
33383
+ // *Example*
33384
+ // tinycolor.isReadable("#000", "#111") => false
33385
+ // tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
33386
+ tinycolor_tinycolor.isReadable = function (color1, color2, wcag2) {
33387
+ var readability = tinycolor_tinycolor.readability(color1, color2);
33388
+ var wcag2Parms, out;
33389
+ out = false;
33390
+ wcag2Parms = validateWCAG2Parms(wcag2);
33391
+ switch (wcag2Parms.level + wcag2Parms.size) {
33392
+ case "AAsmall":
33393
+ case "AAAlarge":
33394
+ out = readability >= 4.5;
33395
+ break;
33396
+ case "AAlarge":
33397
+ out = readability >= 3;
33398
+ break;
33399
+ case "AAAsmall":
33400
+ out = readability >= 7;
33401
+ break;
33402
+ }
33403
+ return out;
33404
+ };
33405
+
33406
+ // `mostReadable`
33407
+ // Given a base color and a list of possible foreground or background
33408
+ // colors for that base, returns the most readable color.
33409
+ // Optionally returns Black or White if the most readable color is unreadable.
33410
+ // *Example*
33411
+ // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
33412
+ // tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
33413
+ // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
33414
+ // tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
33415
+ tinycolor_tinycolor.mostReadable = function (baseColor, colorList, args) {
33416
+ var bestColor = null;
33417
+ var bestScore = 0;
33418
+ var readability;
33419
+ var includeFallbackColors, level, size;
33420
+ args = args || {};
33421
+ includeFallbackColors = args.includeFallbackColors;
33422
+ level = args.level;
33423
+ size = args.size;
33424
+ for (var i = 0; i < colorList.length; i++) {
33425
+ readability = tinycolor_tinycolor.readability(baseColor, colorList[i]);
33426
+ if (readability > bestScore) {
33427
+ bestScore = readability;
33428
+ bestColor = tinycolor_tinycolor(colorList[i]);
33429
+ }
33430
+ }
33431
+ if (tinycolor_tinycolor.isReadable(baseColor, bestColor, {
33432
+ level: level,
33433
+ size: size
33434
+ }) || !includeFallbackColors) {
33435
+ return bestColor;
33436
+ } else {
33437
+ args.includeFallbackColors = false;
33438
+ return tinycolor_tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
33439
+ }
33440
+ };
33441
+
33442
+ // Big List of Colors
33443
+ // ------------------
33444
+ // <https://www.w3.org/TR/css-color-4/#named-colors>
33445
+ var names = tinycolor_tinycolor.names = {
33446
+ aliceblue: "f0f8ff",
33447
+ antiquewhite: "faebd7",
33448
+ aqua: "0ff",
33449
+ aquamarine: "7fffd4",
33450
+ azure: "f0ffff",
33451
+ beige: "f5f5dc",
33452
+ bisque: "ffe4c4",
33453
+ black: "000",
33454
+ blanchedalmond: "ffebcd",
33455
+ blue: "00f",
33456
+ blueviolet: "8a2be2",
33457
+ brown: "a52a2a",
33458
+ burlywood: "deb887",
33459
+ burntsienna: "ea7e5d",
33460
+ cadetblue: "5f9ea0",
33461
+ chartreuse: "7fff00",
33462
+ chocolate: "d2691e",
33463
+ coral: "ff7f50",
33464
+ cornflowerblue: "6495ed",
33465
+ cornsilk: "fff8dc",
33466
+ crimson: "dc143c",
33467
+ cyan: "0ff",
33468
+ darkblue: "00008b",
33469
+ darkcyan: "008b8b",
33470
+ darkgoldenrod: "b8860b",
33471
+ darkgray: "a9a9a9",
33472
+ darkgreen: "006400",
33473
+ darkgrey: "a9a9a9",
33474
+ darkkhaki: "bdb76b",
33475
+ darkmagenta: "8b008b",
33476
+ darkolivegreen: "556b2f",
33477
+ darkorange: "ff8c00",
33478
+ darkorchid: "9932cc",
33479
+ darkred: "8b0000",
33480
+ darksalmon: "e9967a",
33481
+ darkseagreen: "8fbc8f",
33482
+ darkslateblue: "483d8b",
33483
+ darkslategray: "2f4f4f",
33484
+ darkslategrey: "2f4f4f",
33485
+ darkturquoise: "00ced1",
33486
+ darkviolet: "9400d3",
33487
+ deeppink: "ff1493",
33488
+ deepskyblue: "00bfff",
33489
+ dimgray: "696969",
33490
+ dimgrey: "696969",
33491
+ dodgerblue: "1e90ff",
33492
+ firebrick: "b22222",
33493
+ floralwhite: "fffaf0",
33494
+ forestgreen: "228b22",
33495
+ fuchsia: "f0f",
33496
+ gainsboro: "dcdcdc",
33497
+ ghostwhite: "f8f8ff",
33498
+ gold: "ffd700",
33499
+ goldenrod: "daa520",
33500
+ gray: "808080",
33501
+ green: "008000",
33502
+ greenyellow: "adff2f",
33503
+ grey: "808080",
33504
+ honeydew: "f0fff0",
33505
+ hotpink: "ff69b4",
33506
+ indianred: "cd5c5c",
33507
+ indigo: "4b0082",
33508
+ ivory: "fffff0",
33509
+ khaki: "f0e68c",
33510
+ lavender: "e6e6fa",
33511
+ lavenderblush: "fff0f5",
33512
+ lawngreen: "7cfc00",
33513
+ lemonchiffon: "fffacd",
33514
+ lightblue: "add8e6",
33515
+ lightcoral: "f08080",
33516
+ lightcyan: "e0ffff",
33517
+ lightgoldenrodyellow: "fafad2",
33518
+ lightgray: "d3d3d3",
33519
+ lightgreen: "90ee90",
33520
+ lightgrey: "d3d3d3",
33521
+ lightpink: "ffb6c1",
33522
+ lightsalmon: "ffa07a",
33523
+ lightseagreen: "20b2aa",
33524
+ lightskyblue: "87cefa",
33525
+ lightslategray: "789",
33526
+ lightslategrey: "789",
33527
+ lightsteelblue: "b0c4de",
33528
+ lightyellow: "ffffe0",
33529
+ lime: "0f0",
33530
+ limegreen: "32cd32",
33531
+ linen: "faf0e6",
33532
+ magenta: "f0f",
33533
+ maroon: "800000",
33534
+ mediumaquamarine: "66cdaa",
33535
+ mediumblue: "0000cd",
33536
+ mediumorchid: "ba55d3",
33537
+ mediumpurple: "9370db",
33538
+ mediumseagreen: "3cb371",
33539
+ mediumslateblue: "7b68ee",
33540
+ mediumspringgreen: "00fa9a",
33541
+ mediumturquoise: "48d1cc",
33542
+ mediumvioletred: "c71585",
33543
+ midnightblue: "191970",
33544
+ mintcream: "f5fffa",
33545
+ mistyrose: "ffe4e1",
33546
+ moccasin: "ffe4b5",
33547
+ navajowhite: "ffdead",
33548
+ navy: "000080",
33549
+ oldlace: "fdf5e6",
33550
+ olive: "808000",
33551
+ olivedrab: "6b8e23",
33552
+ orange: "ffa500",
33553
+ orangered: "ff4500",
33554
+ orchid: "da70d6",
33555
+ palegoldenrod: "eee8aa",
33556
+ palegreen: "98fb98",
33557
+ paleturquoise: "afeeee",
33558
+ palevioletred: "db7093",
33559
+ papayawhip: "ffefd5",
33560
+ peachpuff: "ffdab9",
33561
+ peru: "cd853f",
33562
+ pink: "ffc0cb",
33563
+ plum: "dda0dd",
33564
+ powderblue: "b0e0e6",
33565
+ purple: "800080",
33566
+ rebeccapurple: "663399",
33567
+ red: "f00",
33568
+ rosybrown: "bc8f8f",
33569
+ royalblue: "4169e1",
33570
+ saddlebrown: "8b4513",
33571
+ salmon: "fa8072",
33572
+ sandybrown: "f4a460",
33573
+ seagreen: "2e8b57",
33574
+ seashell: "fff5ee",
33575
+ sienna: "a0522d",
33576
+ silver: "c0c0c0",
33577
+ skyblue: "87ceeb",
33578
+ slateblue: "6a5acd",
33579
+ slategray: "708090",
33580
+ slategrey: "708090",
33581
+ snow: "fffafa",
33582
+ springgreen: "00ff7f",
33583
+ steelblue: "4682b4",
33584
+ tan: "d2b48c",
33585
+ teal: "008080",
33586
+ thistle: "d8bfd8",
33587
+ tomato: "ff6347",
33588
+ turquoise: "40e0d0",
33589
+ violet: "ee82ee",
33590
+ wheat: "f5deb3",
33591
+ white: "fff",
33592
+ whitesmoke: "f5f5f5",
33593
+ yellow: "ff0",
33594
+ yellowgreen: "9acd32"
33595
+ };
33596
+
33597
+ // Make it easy to access colors via `hexNames[hex]`
33598
+ var hexNames = tinycolor_tinycolor.hexNames = flip(names);
33599
+
33600
+ // Utilities
33601
+ // ---------
33602
+
33603
+ // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
33604
+ function flip(o) {
33605
+ var flipped = {};
33606
+ for (var i in o) {
33607
+ if (o.hasOwnProperty(i)) {
33608
+ flipped[o[i]] = i;
33609
+ }
33610
+ }
33611
+ return flipped;
33612
+ }
33613
+
33614
+ // Return a valid alpha value [0,1] with all invalid values being set to 1
33615
+ function boundAlpha(a) {
33616
+ a = parseFloat(a);
33617
+ if (isNaN(a) || a < 0 || a > 1) {
33618
+ a = 1;
33619
+ }
33620
+ return a;
33621
+ }
33622
+
33623
+ // Take input from [0, n] and return it as [0, 1]
33624
+ function bound01(n, max) {
33625
+ if (isOnePointZero(n)) n = "100%";
33626
+ var processPercent = isPercentage(n);
33627
+ n = Math.min(max, Math.max(0, parseFloat(n)));
33628
+
33629
+ // Automatically convert percentage into number
33630
+ if (processPercent) {
33631
+ n = parseInt(n * max, 10) / 100;
33632
+ }
33633
+
33634
+ // Handle floating point rounding errors
33635
+ if (Math.abs(n - max) < 0.000001) {
33636
+ return 1;
33637
+ }
33638
+
33639
+ // Convert into [0, 1] range if it isn't already
33640
+ return n % max / parseFloat(max);
33641
+ }
33642
+
33643
+ // Force a number between 0 and 1
33644
+ function clamp01(val) {
33645
+ return Math.min(1, Math.max(0, val));
33646
+ }
33647
+
33648
+ // Parse a base-16 hex value into a base-10 integer
33649
+ function parseIntFromHex(val) {
33650
+ return parseInt(val, 16);
33651
+ }
33652
+
33653
+ // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
33654
+ // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
33655
+ function isOnePointZero(n) {
33656
+ return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
33657
+ }
33658
+
33659
+ // Check to see if string passed in is a percentage
33660
+ function isPercentage(n) {
33661
+ return typeof n === "string" && n.indexOf("%") != -1;
33662
+ }
33663
+
33664
+ // Force a hex value to have 2 characters
33665
+ function pad2(c) {
33666
+ return c.length == 1 ? "0" + c : "" + c;
33667
+ }
33668
+
33669
+ // Replace a decimal with it's percentage value
33670
+ function convertToPercentage(n) {
33671
+ if (n <= 1) {
33672
+ n = n * 100 + "%";
33673
+ }
33674
+ return n;
33675
+ }
33676
+
33677
+ // Converts a decimal to a hex value
33678
+ function convertDecimalToHex(d) {
33679
+ return Math.round(parseFloat(d) * 255).toString(16);
33680
+ }
33681
+ // Converts a hex value to a decimal
33682
+ function convertHexToDecimal(h) {
33683
+ return parseIntFromHex(h) / 255;
33684
+ }
33685
+ var matchers = function () {
33686
+ // <http://www.w3.org/TR/css3-values/#integers>
33687
+ var CSS_INTEGER = "[-\\+]?\\d+%?";
33688
+
33689
+ // <http://www.w3.org/TR/css3-values/#number-value>
33690
+ var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
33691
+
33692
+ // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
33693
+ var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
33694
+
33695
+ // Actual matching.
33696
+ // Parentheses and commas are optional, but not required.
33697
+ // Whitespace can take the place of commas or opening paren
33698
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
33699
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
33700
+ return {
33701
+ CSS_UNIT: new RegExp(CSS_UNIT),
33702
+ rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
33703
+ rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
33704
+ hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
33705
+ hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
33706
+ hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
33707
+ hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
33708
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
33709
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
33710
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
33711
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
33712
+ };
33713
+ }();
33714
+
33715
+ // `isValidCSSUnit`
33716
+ // Take in a single string / number and check to see if it looks like a CSS unit
33717
+ // (see `matchers` above for definition).
33718
+ function isValidCSSUnit(color) {
33719
+ return !!matchers.CSS_UNIT.exec(color);
33720
+ }
33721
+
33722
+ // `stringInputToObject`
33723
+ // Permissive string parsing. Take in a number of formats, and output an object
33724
+ // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
33725
+ function stringInputToObject(color) {
33726
+ color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
33727
+ var named = false;
33728
+ if (names[color]) {
33729
+ color = names[color];
33730
+ named = true;
33731
+ } else if (color == "transparent") {
33732
+ return {
33733
+ r: 0,
33734
+ g: 0,
33735
+ b: 0,
33736
+ a: 0,
33737
+ format: "name"
33738
+ };
33739
+ }
33740
+
33741
+ // Try to match string input using regular expressions.
33742
+ // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
33743
+ // Just return an object and let the conversion functions handle that.
33744
+ // This way the result will be the same whether the tinycolor is initialized with string or object.
33745
+ var match;
33746
+ if (match = matchers.rgb.exec(color)) {
33747
+ return {
33748
+ r: match[1],
33749
+ g: match[2],
33750
+ b: match[3]
33751
+ };
33752
+ }
33753
+ if (match = matchers.rgba.exec(color)) {
33754
+ return {
33755
+ r: match[1],
33756
+ g: match[2],
33757
+ b: match[3],
33758
+ a: match[4]
33759
+ };
33760
+ }
33761
+ if (match = matchers.hsl.exec(color)) {
33762
+ return {
33763
+ h: match[1],
33764
+ s: match[2],
33765
+ l: match[3]
33766
+ };
33767
+ }
33768
+ if (match = matchers.hsla.exec(color)) {
33769
+ return {
33770
+ h: match[1],
33771
+ s: match[2],
33772
+ l: match[3],
33773
+ a: match[4]
33774
+ };
33775
+ }
33776
+ if (match = matchers.hsv.exec(color)) {
33777
+ return {
33778
+ h: match[1],
33779
+ s: match[2],
33780
+ v: match[3]
33781
+ };
33782
+ }
33783
+ if (match = matchers.hsva.exec(color)) {
33784
+ return {
33785
+ h: match[1],
33786
+ s: match[2],
33787
+ v: match[3],
33788
+ a: match[4]
33789
+ };
33790
+ }
33791
+ if (match = matchers.hex8.exec(color)) {
33792
+ return {
33793
+ r: parseIntFromHex(match[1]),
33794
+ g: parseIntFromHex(match[2]),
33795
+ b: parseIntFromHex(match[3]),
33796
+ a: convertHexToDecimal(match[4]),
33797
+ format: named ? "name" : "hex8"
33798
+ };
33799
+ }
33800
+ if (match = matchers.hex6.exec(color)) {
33801
+ return {
33802
+ r: parseIntFromHex(match[1]),
33803
+ g: parseIntFromHex(match[2]),
33804
+ b: parseIntFromHex(match[3]),
33805
+ format: named ? "name" : "hex"
33806
+ };
33807
+ }
33808
+ if (match = matchers.hex4.exec(color)) {
33809
+ return {
33810
+ r: parseIntFromHex(match[1] + "" + match[1]),
33811
+ g: parseIntFromHex(match[2] + "" + match[2]),
33812
+ b: parseIntFromHex(match[3] + "" + match[3]),
33813
+ a: convertHexToDecimal(match[4] + "" + match[4]),
33814
+ format: named ? "name" : "hex8"
33815
+ };
33816
+ }
33817
+ if (match = matchers.hex3.exec(color)) {
33818
+ return {
33819
+ r: parseIntFromHex(match[1] + "" + match[1]),
33820
+ g: parseIntFromHex(match[2] + "" + match[2]),
33821
+ b: parseIntFromHex(match[3] + "" + match[3]),
33822
+ format: named ? "name" : "hex"
33823
+ };
33824
+ }
33825
+ return false;
33826
+ }
33827
+ function validateWCAG2Parms(parms) {
33828
+ // return valid WCAG2 parms for isReadable.
33829
+ // If input parms are invalid, return {"level":"AA", "size":"small"}
33830
+ var level, size;
33831
+ parms = parms || {
33832
+ level: "AA",
33833
+ size: "small"
33834
+ };
33835
+ level = (parms.level || "AA").toUpperCase();
33836
+ size = (parms.size || "small").toLowerCase();
33837
+ if (level !== "AA" && level !== "AAA") {
33838
+ level = "AA";
33839
+ }
33840
+ if (size !== "small" && size !== "large") {
33841
+ size = "small";
33842
+ }
33843
+ return {
33844
+ level: level,
33845
+ size: size
33846
+ };
33847
+ }
33848
+
33837
33849
  ;// CONCATENATED MODULE: ./node_modules/@chenshuai2144/sketch-color/es/helpers/color.js
33838
33850
 
33839
33851
 
@@ -33860,7 +33872,7 @@ var simpleCheckForValidColor = function simpleCheckForValidColor(data) {
33860
33872
  };
33861
33873
  var toState = function toState(data, oldHue) {
33862
33874
  // @ts-ignore
33863
- var color = data.hex ? tinycolor_default()(data.hex) : tinycolor_default()(data);
33875
+ var color = data.hex ? tinycolor_tinycolor(data.hex) : tinycolor_tinycolor(data);
33864
33876
  var hsl = color.toHsl();
33865
33877
  var hsv = color.toHsv();
33866
33878
  var rgb = color.toRgb();
@@ -33886,7 +33898,7 @@ var isValidHex = function isValidHex(hex) {
33886
33898
 
33887
33899
  var lh = String(hex).charAt(0) === '#' ? 1 : 0; // @ts-ignore
33888
33900
 
33889
- return hex.length !== 4 + lh && hex.length < 7 + lh && tinycolor_default()(hex).isValid();
33901
+ return hex.length !== 4 + lh && hex.length < 7 + lh && tinycolor_tinycolor(hex).isValid();
33890
33902
  };
33891
33903
  var getContrastingColor = function getContrastingColor(data) {
33892
33904
  if (!data) {
@@ -47382,6 +47394,20 @@ var DefaultContent = function DefaultContent(props) {
47382
47394
  children: (0,jsx_runtime.jsx)("ul", {
47383
47395
  className: "".concat(baseClassName, "-content-list ").concat(hashId),
47384
47396
  children: appList === null || appList === void 0 ? void 0 : appList.map(function (app, index) {
47397
+ var _app$children;
47398
+ if (app === null || app === void 0 ? void 0 : (_app$children = app.children) === null || _app$children === void 0 ? void 0 : _app$children.length) {
47399
+ return (0,jsx_runtime.jsxs)("div", {
47400
+ className: "".concat(baseClassName, "-content-list-item-group ").concat(hashId),
47401
+ children: [(0,jsx_runtime.jsx)("div", {
47402
+ className: "".concat(baseClassName, "-content-list-item-group-title ").concat(hashId),
47403
+ children: app.title
47404
+ }), (0,jsx_runtime.jsx)(DefaultContent, {
47405
+ hashId: hashId,
47406
+ appList: app === null || app === void 0 ? void 0 : app.children,
47407
+ baseClassName: baseClassName
47408
+ })]
47409
+ });
47410
+ }
47385
47411
  return (0,jsx_runtime.jsx)("li", {
47386
47412
  className: "".concat(baseClassName, "-content-list-item ").concat(hashId),
47387
47413
  children: (0,jsx_runtime.jsxs)("a", {
@@ -47463,6 +47489,20 @@ var SimpleContent = function SimpleContent(props) {
47463
47489
  children: (0,jsx_runtime.jsx)("ul", {
47464
47490
  className: "".concat(baseClassName, "-content-list ").concat(hashId),
47465
47491
  children: appList === null || appList === void 0 ? void 0 : appList.map(function (app, index) {
47492
+ var _app$children;
47493
+ if (app === null || app === void 0 ? void 0 : (_app$children = app.children) === null || _app$children === void 0 ? void 0 : _app$children.length) {
47494
+ return (0,jsx_runtime.jsxs)("div", {
47495
+ className: "".concat(baseClassName, "-content-list-item-group ").concat(hashId),
47496
+ children: [(0,jsx_runtime.jsx)("div", {
47497
+ className: "".concat(baseClassName, "-content-list-item-group-title ").concat(hashId),
47498
+ children: app.title
47499
+ }), (0,jsx_runtime.jsx)(SimpleContent, {
47500
+ hashId: hashId,
47501
+ appList: app === null || app === void 0 ? void 0 : app.children,
47502
+ baseClassName: baseClassName
47503
+ })]
47504
+ });
47505
+ }
47466
47506
  return (0,jsx_runtime.jsx)("li", {
47467
47507
  className: "".concat(baseClassName, "-content-list-item ").concat(hashId),
47468
47508
  children: (0,jsx_runtime.jsxs)("a", {
@@ -47485,6 +47525,8 @@ var SimpleContent = function SimpleContent(props) {
47485
47525
  var genAppsLogoComponentsDefaultListStyle = function genAppsLogoComponentsDefaultListStyle(token) {
47486
47526
  return {
47487
47527
  '&-content': {
47528
+ maxHeight: 'calc(100vh - 48px)',
47529
+ overflow: 'auto',
47488
47530
  '&-list': {
47489
47531
  boxSizing: 'content-box',
47490
47532
  maxWidth: 656,
@@ -47508,6 +47550,20 @@ var genAppsLogoComponentsDefaultListStyle = function genAppsLogoComponentsDefaul
47508
47550
  listStyleType: 'none',
47509
47551
  transition: 'transform 0.2s cubic-bezier(0.333, 0, 0, 1)',
47510
47552
  borderRadius: token.borderRadius,
47553
+ '&-group': {
47554
+ marginBottom: 16,
47555
+ '&-title': {
47556
+ margin: '16px 0 8px 12px',
47557
+ fontWeight: 600,
47558
+ color: 'rgba(0, 0, 0, 0.88)',
47559
+ fontSize: 16,
47560
+ opacity: 0.85,
47561
+ lineHeight: 1.5,
47562
+ '&:first-child': {
47563
+ marginTop: 12
47564
+ }
47565
+ }
47566
+ },
47511
47567
  '&:hover': {
47512
47568
  backgroundColor: token.colorBgTextHover
47513
47569
  },
@@ -47549,6 +47605,8 @@ var genAppsLogoComponentsDefaultListStyle = function genAppsLogoComponentsDefaul
47549
47605
  var genAppsLogoComponentsSimpleListStyle = function genAppsLogoComponentsSimpleListStyle(token) {
47550
47606
  return {
47551
47607
  '&-content': {
47608
+ maxHeight: 'calc(100vh - 48px)',
47609
+ overflow: 'auto',
47552
47610
  '&-list': {
47553
47611
  boxSizing: 'border-box',
47554
47612
  maxWidth: 376,
@@ -47574,6 +47632,20 @@ var genAppsLogoComponentsSimpleListStyle = function genAppsLogoComponentsSimpleL
47574
47632
  listStyleType: 'none',
47575
47633
  transition: 'transform 0.2s cubic-bezier(0.333, 0, 0, 1)',
47576
47634
  borderRadius: token.borderRadius,
47635
+ '&-group': {
47636
+ marginBottom: 16,
47637
+ '&-title': {
47638
+ margin: '16px 0 8px 12px',
47639
+ fontWeight: 600,
47640
+ color: 'rgba(0, 0, 0, 0.88)',
47641
+ fontSize: 16,
47642
+ opacity: 0.85,
47643
+ lineHeight: 1.5,
47644
+ '&:first-child': {
47645
+ marginTop: 12
47646
+ }
47647
+ }
47648
+ },
47577
47649
  '&:hover': {
47578
47650
  backgroundColor: token.colorBgTextHover
47579
47651
  },
@@ -47651,7 +47723,7 @@ var genAppsLogoComponentsStyle = function genAppsLogoComponentsStyle(token) {
47651
47723
  }
47652
47724
  },
47653
47725
  '&-item-title': {
47654
- margin: '16px 0 8px 12px',
47726
+ marginInline: '16px 0 8px 12px',
47655
47727
  fontWeight: 600,
47656
47728
  color: 'rgba(0, 0, 0, 0.88)',
47657
47729
  fontSize: 16,
@@ -48800,7 +48872,7 @@ var SiderMenu = function SiderMenu(props) {
48800
48872
  colorItemTextSelected: (token === null || token === void 0 ? void 0 : (_token$layout5 = token.layout) === null || _token$layout5 === void 0 ? void 0 : (_token$layout5$sider = _token$layout5.sider) === null || _token$layout5$sider === void 0 ? void 0 : _token$layout5$sider.colorTextMenuSelected) || 'rgba(0, 0, 0, 1)',
48801
48873
  colorItemBg: 'transparent',
48802
48874
  colorSubItemBg: 'transparent',
48803
- colorBgElevated: (token === null || token === void 0 ? void 0 : (_token$layout6 = token.layout) === null || _token$layout6 === void 0 ? void 0 : (_token$layout6$sider = _token$layout6.sider) === null || _token$layout6$sider === void 0 ? void 0 : _token$layout6$sider.colorBgMenuItemCollapsedElevated) || 'transparent'
48875
+ colorBgElevated: (token === null || token === void 0 ? void 0 : (_token$layout6 = token.layout) === null || _token$layout6 === void 0 ? void 0 : (_token$layout6$sider = _token$layout6.sider) === null || _token$layout6$sider === void 0 ? void 0 : _token$layout6$sider.colorBgMenuItemCollapsedElevated) || '#fff'
48804
48876
  }
48805
48877
  }
48806
48878
  },
@@ -51116,7 +51188,7 @@ var react = __webpack_require__(3948);
51116
51188
  var safeIsNaN = Number.isNaN || function ponyfill(value) {
51117
51189
  return typeof value === 'number' && value !== value;
51118
51190
  };
51119
- function isEqual(first, second) {
51191
+ function memoize_one_esm_isEqual(first, second) {
51120
51192
  if (first === second) {
51121
51193
  return true;
51122
51194
  }
@@ -51130,7 +51202,7 @@ function areInputsEqual(newInputs, lastInputs) {
51130
51202
  return false;
51131
51203
  }
51132
51204
  for (var i = 0; i < newInputs.length; i++) {
51133
- if (!isEqual(newInputs[i], lastInputs[i])) {
51205
+ if (!memoize_one_esm_isEqual(newInputs[i], lastInputs[i])) {
51134
51206
  return false;
51135
51207
  }
51136
51208
  }
@@ -56235,7 +56307,7 @@ function useContainer(container) {
56235
56307
 
56236
56308
 
56237
56309
  function container_useContainer() {
56238
- var _props$columnsState3, _props$columnsState4, _props$columnsState8, _props$columnsState9;
56310
+ var _props$columnsState4, _props$columnsState5, _props$columnsState9, _props$columnsState10;
56239
56311
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
56240
56312
  var actionRef = (0,external_React_.useRef)();
56241
56313
  var rootDomRef = (0,external_React_.useRef)(null);
@@ -56261,7 +56333,8 @@ function container_useContainer() {
56261
56333
  setTableSize = _useMergedState2[1];
56262
56334
  /** 默认全选中 */
56263
56335
  var defaultColumnKeyMap = (0,external_React_.useMemo)(function () {
56264
- var _props$columns;
56336
+ var _props$columnsState, _props$columns;
56337
+ if (props === null || props === void 0 ? void 0 : (_props$columnsState = props.columnsState) === null || _props$columnsState === void 0 ? void 0 : _props$columnsState.defaultValue) return props.columnsState.defaultValue;
56265
56338
  var columnKeyMap = {};
56266
56339
  (_props$columns = props.columns) === null || _props$columns === void 0 ? void 0 : _props$columns.forEach(function (_ref, index) {
56267
56340
  var key = _ref.key,
@@ -56280,7 +56353,7 @@ function container_useContainer() {
56280
56353
  return columnKeyMap;
56281
56354
  }, [props.columns]);
56282
56355
  var _useMergedState3 = (0,useMergedState/* default */.Z)(function () {
56283
- var _props$columnsState, _props$columnsState2;
56356
+ var _props$columnsState2, _props$columnsState3;
56284
56357
  var _ref2 = props.columnsState || {},
56285
56358
  persistenceType = _ref2.persistenceType,
56286
56359
  persistenceKey = _ref2.persistenceKey;
@@ -56296,10 +56369,10 @@ function container_useContainer() {
56296
56369
  console.warn(error);
56297
56370
  }
56298
56371
  }
56299
- return props.columnsStateMap || ((_props$columnsState = props.columnsState) === null || _props$columnsState === void 0 ? void 0 : _props$columnsState.value) || ((_props$columnsState2 = props.columnsState) === null || _props$columnsState2 === void 0 ? void 0 : _props$columnsState2.defaultValue) || defaultColumnKeyMap;
56372
+ return props.columnsStateMap || ((_props$columnsState2 = props.columnsState) === null || _props$columnsState2 === void 0 ? void 0 : _props$columnsState2.value) || ((_props$columnsState3 = props.columnsState) === null || _props$columnsState3 === void 0 ? void 0 : _props$columnsState3.defaultValue) || defaultColumnKeyMap;
56300
56373
  }, {
56301
- value: ((_props$columnsState3 = props.columnsState) === null || _props$columnsState3 === void 0 ? void 0 : _props$columnsState3.value) || props.columnsStateMap,
56302
- onChange: ((_props$columnsState4 = props.columnsState) === null || _props$columnsState4 === void 0 ? void 0 : _props$columnsState4.onChange) || props.onColumnsStateChange
56374
+ value: ((_props$columnsState4 = props.columnsState) === null || _props$columnsState4 === void 0 ? void 0 : _props$columnsState4.value) || props.columnsStateMap,
56375
+ onChange: ((_props$columnsState5 = props.columnsState) === null || _props$columnsState5 === void 0 ? void 0 : _props$columnsState5.onChange) || props.onColumnsStateChange
56303
56376
  }),
56304
56377
  _useMergedState4 = slicedToArray_slicedToArray(_useMergedState3, 2),
56305
56378
  columnsMap = _useMergedState4[0],
@@ -56341,15 +56414,15 @@ function container_useContainer() {
56341
56414
  }
56342
56415
  }, [props.columnsState]);
56343
56416
  (0,external_React_.useEffect)(function () {
56344
- var _props$columnsState5, _props$columnsState6;
56345
- if (!((_props$columnsState5 = props.columnsState) === null || _props$columnsState5 === void 0 ? void 0 : _props$columnsState5.persistenceKey) || !((_props$columnsState6 = props.columnsState) === null || _props$columnsState6 === void 0 ? void 0 : _props$columnsState6.persistenceType)) {
56417
+ var _props$columnsState6, _props$columnsState7;
56418
+ if (!((_props$columnsState6 = props.columnsState) === null || _props$columnsState6 === void 0 ? void 0 : _props$columnsState6.persistenceKey) || !((_props$columnsState7 = props.columnsState) === null || _props$columnsState7 === void 0 ? void 0 : _props$columnsState7.persistenceType)) {
56346
56419
  return;
56347
56420
  }
56348
56421
  if (typeof window === 'undefined') return;
56349
56422
  /** 给持久化中设置数据 */
56350
- var _props$columnsState7 = props.columnsState,
56351
- persistenceType = _props$columnsState7.persistenceType,
56352
- persistenceKey = _props$columnsState7.persistenceKey;
56423
+ var _props$columnsState8 = props.columnsState,
56424
+ persistenceType = _props$columnsState8.persistenceType,
56425
+ persistenceKey = _props$columnsState8.persistenceKey;
56353
56426
  var storage = window[persistenceType];
56354
56427
  try {
56355
56428
  storage === null || storage === void 0 ? void 0 : storage.setItem(persistenceKey, JSON.stringify(columnsMap));
@@ -56358,7 +56431,7 @@ function container_useContainer() {
56358
56431
  clearPersistenceStorage();
56359
56432
  }
56360
56433
  // eslint-disable-next-line react-hooks/exhaustive-deps
56361
- }, [(_props$columnsState8 = props.columnsState) === null || _props$columnsState8 === void 0 ? void 0 : _props$columnsState8.persistenceKey, columnsMap, (_props$columnsState9 = props.columnsState) === null || _props$columnsState9 === void 0 ? void 0 : _props$columnsState9.persistenceType]);
56434
+ }, [(_props$columnsState9 = props.columnsState) === null || _props$columnsState9 === void 0 ? void 0 : _props$columnsState9.persistenceKey, columnsMap, (_props$columnsState10 = props.columnsState) === null || _props$columnsState10 === void 0 ? void 0 : _props$columnsState10.persistenceType]);
56362
56435
  var renderValue = {
56363
56436
  action: actionRef.current,
56364
56437
  setAction: function setAction(newAction) {
@@ -60792,6 +60865,9 @@ function pickAttrs(props) {
60792
60865
  });
60793
60866
  return attrs;
60794
60867
  }
60868
+ // EXTERNAL MODULE: ./node_modules/shallowequal/index.js
60869
+ var shallowequal = __webpack_require__(2460);
60870
+ var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal);
60795
60871
  ;// CONCATENATED MODULE: ./node_modules/rc-util/es/hooks/useEvent.js
60796
60872
 
60797
60873
  function useEvent(callback) {
@@ -65242,7 +65318,7 @@ var genFocusStyle = function genFocusStyle(token) {
65242
65318
  };
65243
65319
  };
65244
65320
  ;// CONCATENATED MODULE: ./node_modules/antd/es/version/version.js
65245
- /* harmony default export */ var version = ('5.1.1');
65321
+ /* harmony default export */ var version = ('5.1.2');
65246
65322
  ;// CONCATENATED MODULE: ./node_modules/antd/es/version/index.js
65247
65323
  /* eslint import/no-unresolved: 0 */
65248
65324
  // @ts-ignore
@@ -66025,7 +66101,10 @@ var genCheckboxStyle = function genCheckboxStyle(token) {
66025
66101
  }), _$concat$con2)), _ref5), (_ref6 = {}, esm_defineProperty_defineProperty(_ref6, "".concat(wrapperCls, "-disabled"), {
66026
66102
  cursor: 'not-allowed'
66027
66103
  }), esm_defineProperty_defineProperty(_ref6, "".concat(checkboxCls, "-disabled"), (_$concat3 = {}, esm_defineProperty_defineProperty(_$concat3, "&, ".concat(checkboxCls, "-input"), {
66028
- cursor: 'not-allowed'
66104
+ cursor: 'not-allowed',
66105
+ // Disabled for native input to enable Tooltip event handler
66106
+ // ref: https://github.com/ant-design/ant-design/issues/39822#issuecomment-1365075901
66107
+ pointerEvents: 'none'
66029
66108
  }), esm_defineProperty_defineProperty(_$concat3, "".concat(checkboxCls, "-inner"), {
66030
66109
  background: token.colorBgContainerDisabled,
66031
66110
  borderColor: token.colorBorder,
@@ -68242,7 +68321,7 @@ function isCompleteFailX(elFuturePos, elRegion, visibleRect) {
68242
68321
  function isCompleteFailY(elFuturePos, elRegion, visibleRect) {
68243
68322
  return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top;
68244
68323
  }
68245
- function flip(points, reg, map) {
68324
+ function dist_web_flip(points, reg, map) {
68246
68325
  var ret = [];
68247
68326
  utils.each(points, function (p) {
68248
68327
  ret.push(p.replace(reg, function (m) {
@@ -68304,7 +68383,7 @@ function doAlign(el, tgtRegion, align, isTgtRegionVisible) {
68304
68383
  // 如果横向不能放下
68305
68384
  if (isFailX(elFuturePos, elRegion, visibleRect)) {
68306
68385
  // 对齐位置反下
68307
- var newPoints = flip(points, /[lr]/gi, {
68386
+ var newPoints = dist_web_flip(points, /[lr]/gi, {
68308
68387
  l: 'r',
68309
68388
  r: 'l'
68310
68389
  });
@@ -68324,7 +68403,7 @@ function doAlign(el, tgtRegion, align, isTgtRegionVisible) {
68324
68403
  // 如果纵向不能放下
68325
68404
  if (isFailY(elFuturePos, elRegion, visibleRect)) {
68326
68405
  // 对齐位置反下
68327
- var _newPoints = flip(points, /[tb]/gi, {
68406
+ var _newPoints = dist_web_flip(points, /[tb]/gi, {
68328
68407
  t: 'b',
68329
68408
  b: 't'
68330
68409
  });
@@ -68355,13 +68434,13 @@ function doAlign(el, tgtRegion, align, isTgtRegionVisible) {
68355
68434
 
68356
68435
  // 重置对应部分的翻转逻辑
68357
68436
  if (isStillFailX) {
68358
- _newPoints2 = flip(points, /[lr]/gi, {
68437
+ _newPoints2 = dist_web_flip(points, /[lr]/gi, {
68359
68438
  l: 'r',
68360
68439
  r: 'l'
68361
68440
  });
68362
68441
  }
68363
68442
  if (isStillFailY) {
68364
- _newPoints2 = flip(points, /[tb]/gi, {
68443
+ _newPoints2 = dist_web_flip(points, /[tb]/gi, {
68365
68444
  t: 'b',
68366
68445
  b: 't'
68367
68446
  });
@@ -68470,61 +68549,6 @@ function alignPoint(el, tgtPoint, align) {
68470
68549
  }
68471
68550
  /* harmony default export */ var dist_web = ((/* unused pure expression or super */ null && (alignElement)));
68472
68551
 
68473
- ;// CONCATENATED MODULE: ./node_modules/rc-util/es/isEqual.js
68474
-
68475
-
68476
- /**
68477
- * Deeply compares two object literals.
68478
- * @param obj1 object 1
68479
- * @param obj2 object 2
68480
- * @param shallow shallow compare
68481
- * @returns
68482
- */
68483
- function isEqual_isEqual(obj1, obj2) {
68484
- var shallow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
68485
- // https://github.com/mapbox/mapbox-gl-js/pull/5979/files#diff-fde7145050c47cc3a306856efd5f9c3016e86e859de9afbd02c879be5067e58f
68486
- var refSet = new Set();
68487
- function deepEqual(a, b) {
68488
- var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
68489
- var circular = refSet.has(a);
68490
- es_warning(!circular, 'Warning: There may be circular references');
68491
- if (circular) {
68492
- return false;
68493
- }
68494
- if (a === b) {
68495
- return true;
68496
- }
68497
- if (shallow && level > 1) {
68498
- return false;
68499
- }
68500
- refSet.add(a);
68501
- var newLevel = level + 1;
68502
- if (Array.isArray(a)) {
68503
- if (!Array.isArray(b) || a.length !== b.length) {
68504
- return false;
68505
- }
68506
- for (var i = 0; i < a.length; i++) {
68507
- if (!deepEqual(a[i], b[i], newLevel)) {
68508
- return false;
68509
- }
68510
- }
68511
- return true;
68512
- }
68513
- if (a && b && typeof_typeof(a) === 'object' && typeof_typeof(b) === 'object') {
68514
- var keys = Object.keys(a);
68515
- if (keys.length !== Object.keys(b).length) {
68516
- return false;
68517
- }
68518
- return keys.every(function (key) {
68519
- return deepEqual(a[key], b[key], newLevel);
68520
- });
68521
- }
68522
- // other
68523
- return false;
68524
- }
68525
- return deepEqual(obj1, obj2);
68526
- }
68527
- /* harmony default export */ var es_isEqual = (isEqual_isEqual);
68528
68552
  ;// CONCATENATED MODULE: ./node_modules/rc-align/es/hooks/useBuffer.js
68529
68553
 
68530
68554
  /* harmony default export */ var useBuffer = (function (callback, buffer) {
@@ -73651,14 +73675,14 @@ var getThemeStyle = function getThemeStyle(token, themeSuffix) {
73651
73675
  }
73652
73676
  }, esm_defineProperty_defineProperty(_$concat$concat3, "&:hover, &-active, &-open", {
73653
73677
  '&::after': {
73654
- borderWidth: "".concat(colorActiveBarHeight, "px"),
73678
+ borderBottomWidth: colorActiveBarHeight,
73655
73679
  borderBottomColor: colorItemTextSelectedHorizontal
73656
73680
  }
73657
73681
  }), esm_defineProperty_defineProperty(_$concat$concat3, "&-selected", {
73658
73682
  color: colorItemTextSelectedHorizontal,
73659
73683
  backgroundColor: colorItemBgSelectedHorizontal,
73660
73684
  '&::after': {
73661
- borderWidth: "".concat(colorActiveBarHeight, "px"),
73685
+ borderBottomWidth: colorActiveBarHeight,
73662
73686
  borderBottomColor: colorItemTextSelectedHorizontal
73663
73687
  }
73664
73688
  }), _$concat$concat3)))), esm_defineProperty_defineProperty(_$concat$concat4, "&".concat(componentCls, "-root"), esm_defineProperty_defineProperty({}, "&".concat(componentCls, "-inline, &").concat(componentCls, "-vertical"), {
@@ -74984,7 +75008,7 @@ var genTooltipStyle = function genTooltipStyle(token) {
74984
75008
  tooltipBg: colorBgDefault,
74985
75009
  tooltipRadiusOuter: borderRadiusOuter > 4 ? 4 : borderRadiusOuter
74986
75010
  });
74987
- return [genTooltipStyle(TooltipToken), initZoomMotion(token, 'zoom-big-fast'), initZoomMotion(token, 'zoom-down')];
75011
+ return [genTooltipStyle(TooltipToken), initZoomMotion(token, 'zoom-big-fast')];
74988
75012
  }, function (_ref) {
74989
75013
  var zIndexPopupBase = _ref.zIndexPopupBase,
74990
75014
  colorBgSpotlight = _ref.colorBgSpotlight;
@@ -76062,7 +76086,7 @@ function useTheme(theme, parentTheme) {
76062
76086
  }, [themeConfig, parentThemeConfig], function (prev, next) {
76063
76087
  return prev.some(function (prevTheme, index) {
76064
76088
  var nextTheme = next[index];
76065
- return !shallowequal_default()(prevTheme, nextTheme);
76089
+ return !es_isEqual(prevTheme, nextTheme, true);
76066
76090
  });
76067
76091
  });
76068
76092
  return mergedTheme;
@@ -76542,123 +76566,138 @@ var Compact = function Compact(props) {
76542
76566
  }, restProps), nodes));
76543
76567
  };
76544
76568
  /* harmony default export */ var space_Compact = (Compact);
76545
- ;// CONCATENATED MODULE: ./node_modules/antd/es/_util/raf.js
76546
-
76547
- var id = 0;
76548
- var ids = {};
76549
- // Support call raf with delay specified frame
76550
- function raf_wrapperRaf(callback) {
76551
- var delayFrames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
76552
- var myId = id++;
76553
- var restFrames = delayFrames;
76554
- function internalCallback() {
76555
- restFrames -= 1;
76556
- if (restFrames <= 0) {
76557
- callback();
76558
- delete ids[myId];
76559
- } else {
76560
- ids[myId] = es_raf(internalCallback);
76561
- }
76562
- }
76563
- ids[myId] = es_raf(internalCallback);
76564
- return myId;
76565
- }
76566
- raf_wrapperRaf.cancel = function cancel(pid) {
76567
- if (pid === undefined) return;
76568
- es_raf.cancel(ids[pid]);
76569
- delete ids[pid];
76570
- };
76571
- raf_wrapperRaf.ids = ids; // export this for test usage
76572
76569
  ;// CONCATENATED MODULE: ./node_modules/antd/es/_util/wave/style.js
76573
76570
 
76574
76571
 
76575
-
76576
-
76577
-
76578
-
76579
76572
  var genWaveStyle = function genWaveStyle(token) {
76580
- var _ref;
76581
- var waveEffect = new Keyframes('waveEffect', {
76582
- '100%': {
76583
- boxShadow: "0 0 0 6px var(--antd-wave-shadow-color)"
76584
- }
76585
- });
76586
- var fadeEffect = new Keyframes('fadeEffect', {
76587
- '100%': {
76588
- opacity: 0
76573
+ var componentCls = token.componentCls,
76574
+ colorPrimary = token.colorPrimary;
76575
+ return esm_defineProperty_defineProperty({}, componentCls, {
76576
+ position: 'fixed',
76577
+ background: 'transparent',
76578
+ pointerEvents: 'none',
76579
+ boxSizing: 'border-box',
76580
+ color: "var(--wave-color, ".concat(colorPrimary, ")"),
76581
+ boxShadow: "0 0 0 0 currentcolor",
76582
+ opacity: 0.2,
76583
+ // =================== Motion ===================
76584
+ '&.wave-motion-appear': {
76585
+ transition: ["box-shadow 0.4s ".concat(token.motionEaseOutCirc), "opacity 2s ".concat(token.motionEaseOutCirc)].join(','),
76586
+ '&-active': {
76587
+ boxShadow: "0 0 0 calc(6px * var(--wave-scale)) currentcolor",
76588
+ opacity: 0
76589
+ }
76589
76590
  }
76590
76591
  });
76591
- return [(_ref = {}, esm_defineProperty_defineProperty(_ref, "".concat(token.clickAnimatingWithoutExtraNodeTrue, ",\n ").concat(token.clickAnimatingTrue), {
76592
- '--antd-wave-shadow-color': token.colorPrimary,
76593
- '--scroll-bar': 0,
76594
- position: 'relative'
76595
- }), esm_defineProperty_defineProperty(_ref, "".concat(token.clickAnimatingWithoutExtraNodeTrueAfter, ",\n & ").concat(token.clickAnimatingNode), {
76596
- position: 'absolute',
76597
- top: 0,
76598
- insetInlineStart: 0,
76599
- insetInlineEnd: 0,
76600
- bottom: 0,
76601
- display: 'block',
76602
- borderRadius: 'inherit',
76603
- boxShadow: "0 0 0 0 var(--antd-wave-shadow-color)",
76604
- opacity: 0.2,
76605
- animation: {
76606
- _skip_check_: true,
76607
- value: "".concat(fadeEffect.getName(token.hashId), " 2s ").concat(token.motionEaseOutCirc, ", ").concat(waveEffect.getName(token.hashId), " 0.4s ").concat(token.motionEaseOutCirc)
76608
- },
76609
- animationFillMode: 'forwards',
76610
- content: '""',
76611
- pointerEvents: 'none'
76612
- }), _ref), {}, waveEffect, fadeEffect];
76613
76592
  };
76614
- /* harmony default export */ var wave_style = (function () {
76615
- var _useToken = internal_useToken(),
76616
- _useToken2 = esm_slicedToArray_slicedToArray(_useToken, 3),
76617
- theme = _useToken2[0],
76618
- token = _useToken2[1],
76619
- hashId = _useToken2[2];
76620
- var _useContext = (0,external_React_.useContext)(context_ConfigContext),
76621
- getPrefixCls = _useContext.getPrefixCls;
76622
- var rootPrefixCls = getPrefixCls();
76623
- var clickAnimatingTrue = "[".concat(rootPrefixCls, "-click-animating='true']");
76624
- var clickAnimatingWithoutExtraNodeTrue = "[".concat(rootPrefixCls, "-click-animating-without-extra-node='true']");
76625
- var clickAnimatingNode = ".".concat(rootPrefixCls, "-click-animating-node");
76626
- var waveToken = Object.assign(Object.assign({}, token), {
76627
- hashId: hashId,
76628
- clickAnimatingNode: clickAnimatingNode,
76629
- clickAnimatingTrue: clickAnimatingTrue,
76630
- clickAnimatingWithoutExtraNodeTrue: clickAnimatingWithoutExtraNodeTrue,
76631
- clickAnimatingWithoutExtraNodeTrueAfter: "".concat(clickAnimatingWithoutExtraNodeTrue, "::after")
76632
- });
76633
- return [useStyleRegister({
76634
- theme: theme,
76635
- token: token,
76636
- hashId: hashId,
76637
- path: ['wave']
76638
- }, function () {
76639
- return [genWaveStyle(waveToken)];
76640
- }), hashId];
76641
- });
76642
- ;// CONCATENATED MODULE: ./node_modules/antd/es/_util/wave/index.js
76643
-
76644
-
76645
-
76646
-
76647
-
76648
-
76649
-
76650
-
76593
+ /* harmony default export */ var wave_style = (genComponentStyleHook('Wave', function (token) {
76594
+ return [genWaveStyle(token)];
76595
+ }));
76596
+ ;// CONCATENATED MODULE: ./node_modules/rc-util/es/React/render.js
76651
76597
 
76652
76598
 
76653
76599
 
76654
76600
 
76655
76601
 
76656
- var styleForPseudo;
76657
- // Where el is the DOM element you'd like to test for visibility
76658
- function isHidden(element) {
76602
+ // Let compiler not to search module usage
76603
+ var fullClone = objectSpread2_objectSpread2({}, external_ReactDOM_);
76604
+ var render_version = fullClone.version,
76605
+ reactRender = fullClone.render,
76606
+ unmountComponentAtNode = fullClone.unmountComponentAtNode;
76607
+ var createRoot;
76608
+ try {
76609
+ var mainVersion = Number((render_version || '').split('.')[0]);
76610
+ if (mainVersion >= 18) {
76611
+ createRoot = fullClone.createRoot;
76612
+ }
76613
+ } catch (e) {
76614
+ // Do nothing;
76615
+ }
76616
+ function toggleWarning(skip) {
76617
+ var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = fullClone.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
76618
+ if (__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && typeof_typeof(__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === 'object') {
76619
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.usingClientEntryPoint = skip;
76620
+ }
76621
+ }
76622
+ var MARK = '__rc_react_root__';
76623
+ function modernRender(node, container) {
76624
+ toggleWarning(true);
76625
+ var root = container[MARK] || createRoot(container);
76626
+ toggleWarning(false);
76627
+ root.render(node);
76628
+ container[MARK] = root;
76629
+ }
76630
+ function legacyRender(node, container) {
76631
+ reactRender(node, container);
76632
+ }
76633
+ /** @private Test usage. Not work in prod */
76634
+ function _r(node, container) {
76635
+ if (false) {}
76636
+ }
76637
+ function render_render(node, container) {
76638
+ if (createRoot) {
76639
+ modernRender(node, container);
76640
+ return;
76641
+ }
76642
+ legacyRender(node, container);
76643
+ }
76644
+ // ========================= Unmount ==========================
76645
+ function modernUnmount(_x) {
76646
+ return _modernUnmount.apply(this, arguments);
76647
+ }
76648
+ function _modernUnmount() {
76649
+ _modernUnmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(container) {
76650
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
76651
+ while (1) {
76652
+ switch (_context.prev = _context.next) {
76653
+ case 0:
76654
+ return _context.abrupt("return", Promise.resolve().then(function () {
76655
+ var _container$MARK;
76656
+ (_container$MARK = container[MARK]) === null || _container$MARK === void 0 ? void 0 : _container$MARK.unmount();
76657
+ delete container[MARK];
76658
+ }));
76659
+ case 1:
76660
+ case "end":
76661
+ return _context.stop();
76662
+ }
76663
+ }
76664
+ }, _callee);
76665
+ }));
76666
+ return _modernUnmount.apply(this, arguments);
76667
+ }
76668
+ function legacyUnmount(container) {
76669
+ unmountComponentAtNode(container);
76670
+ }
76671
+ /** @private Test usage. Not work in prod */
76672
+ function _u(container) {
76659
76673
  if (false) {}
76660
- return !element || element.offsetParent === null || element.hidden;
76661
76674
  }
76675
+ function unmount(_x2) {
76676
+ return _unmount.apply(this, arguments);
76677
+ }
76678
+ function _unmount() {
76679
+ _unmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(container) {
76680
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
76681
+ while (1) {
76682
+ switch (_context2.prev = _context2.next) {
76683
+ case 0:
76684
+ if (!(createRoot !== undefined)) {
76685
+ _context2.next = 2;
76686
+ break;
76687
+ }
76688
+ return _context2.abrupt("return", modernUnmount(container));
76689
+ case 2:
76690
+ legacyUnmount(container);
76691
+ case 3:
76692
+ case "end":
76693
+ return _context2.stop();
76694
+ }
76695
+ }
76696
+ }, _callee2);
76697
+ }));
76698
+ return _unmount.apply(this, arguments);
76699
+ }
76700
+ ;// CONCATENATED MODULE: ./node_modules/antd/es/_util/wave/util.js
76662
76701
  function getValidateContainer(nodeRoot) {
76663
76702
  if (nodeRoot instanceof Document) {
76664
76703
  return nodeRoot.body;
@@ -76681,185 +76720,175 @@ function isValidWaveColor(color) {
76681
76720
  color !== 'transparent';
76682
76721
  }
76683
76722
  function getTargetWaveColor(node) {
76684
- var computedStyle = getComputedStyle(node);
76685
- var borderTopColor = computedStyle.getPropertyValue('border-top-color');
76686
- var borderColor = computedStyle.getPropertyValue('border-color');
76687
- var backgroundColor = computedStyle.getPropertyValue('background-color');
76723
+ var _getComputedStyle = getComputedStyle(node),
76724
+ borderTopColor = _getComputedStyle.borderTopColor,
76725
+ borderColor = _getComputedStyle.borderColor,
76726
+ backgroundColor = _getComputedStyle.backgroundColor;
76688
76727
  if (isValidWaveColor(borderTopColor)) {
76689
76728
  return borderTopColor;
76690
76729
  }
76691
76730
  if (isValidWaveColor(borderColor)) {
76692
76731
  return borderColor;
76693
76732
  }
76694
- return backgroundColor;
76733
+ if (isValidWaveColor(backgroundColor)) {
76734
+ return backgroundColor;
76735
+ }
76736
+ return null;
76695
76737
  }
76696
- var InternalWave = /*#__PURE__*/function (_React$Component) {
76697
- _inherits(InternalWave, _React$Component);
76698
- var _super = _createSuper(InternalWave);
76699
- function InternalWave() {
76700
- var _this;
76701
- _classCallCheck(this, InternalWave);
76702
- _this = _super.apply(this, arguments);
76703
- _this.containerRef = /*#__PURE__*/external_React_.createRef();
76704
- _this.animationStart = false;
76705
- _this.destroyed = false;
76706
- _this.onClick = function (node, waveColor) {
76707
- var _a, _b;
76708
- var _this$props = _this.props,
76709
- insertExtraNode = _this$props.insertExtraNode,
76710
- disabled = _this$props.disabled;
76711
- if (disabled || !node || isHidden(node) || node.className.includes('-leave')) {
76712
- return;
76713
- }
76714
- _this.extraNode = document.createElement('div');
76715
- var _assertThisInitialize = _assertThisInitialized(_this),
76716
- extraNode = _assertThisInitialize.extraNode;
76717
- var getPrefixCls = _this.context.getPrefixCls;
76718
- extraNode.className = "".concat(getPrefixCls(''), "-click-animating-node");
76719
- var attributeName = _this.getAttributeName();
76720
- node.setAttribute(attributeName, 'true');
76721
- // Not white or transparent or grey
76722
- if (isValidWaveColor(waveColor)) {
76723
- extraNode.style.borderColor = waveColor;
76724
- var nodeRoot = ((_a = node.getRootNode) === null || _a === void 0 ? void 0 : _a.call(node)) || node.ownerDocument;
76725
- var nodeBody = (_b = getValidateContainer(nodeRoot)) !== null && _b !== void 0 ? _b : nodeRoot;
76726
- styleForPseudo = updateCSS("\n [".concat(getPrefixCls(''), "-click-animating-without-extra-node='true']::after, .").concat(getPrefixCls(''), "-click-animating-node {\n --antd-wave-shadow-color: ").concat(waveColor, ";\n }"), 'antd-wave', {
76727
- csp: _this.csp,
76728
- attachTo: nodeBody
76738
+ ;// CONCATENATED MODULE: ./node_modules/antd/es/_util/wave/WaveEffect.js
76739
+
76740
+
76741
+
76742
+
76743
+
76744
+ var WaveEffect = function WaveEffect(props) {
76745
+ var className = props.className,
76746
+ left = props.left,
76747
+ top = props.top,
76748
+ width = props.width,
76749
+ height = props.height,
76750
+ color = props.color,
76751
+ borderRadius = props.borderRadius,
76752
+ scale = props.scale;
76753
+ var divRef = external_React_.useRef(null);
76754
+ var waveStyle = {
76755
+ left: left,
76756
+ top: top,
76757
+ width: width,
76758
+ height: height,
76759
+ borderRadius: borderRadius.map(function (radius) {
76760
+ return "".concat(radius, "px");
76761
+ }).join(' '),
76762
+ '--wave-scale': scale
76763
+ };
76764
+ if (color) {
76765
+ waveStyle['--wave-color'] = color;
76766
+ }
76767
+ return /*#__PURE__*/external_React_.createElement(rc_motion_es, {
76768
+ visible: true,
76769
+ motionAppear: true,
76770
+ motionName: "wave-motion",
76771
+ motionDeadline: 5000,
76772
+ onAppearEnd: function onAppearEnd(_, event) {
76773
+ var _a;
76774
+ if (event.deadline || event.propertyName === 'opacity') {
76775
+ var holder = (_a = divRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
76776
+ unmount(holder).then(function () {
76777
+ var _a;
76778
+ (_a = holder.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(holder);
76729
76779
  });
76730
76780
  }
76731
- if (insertExtraNode) {
76732
- node.appendChild(extraNode);
76733
- }
76734
- ['transition', 'animation'].forEach(function (name) {
76735
- node.addEventListener("".concat(name, "start"), _this.onTransitionStart);
76736
- node.addEventListener("".concat(name, "end"), _this.onTransitionEnd);
76737
- });
76738
- };
76739
- _this.onTransitionStart = function (e) {
76740
- if (_this.destroyed) {
76741
- return;
76742
- }
76743
- var node = _this.containerRef.current;
76744
- if (!e || e.target !== node || _this.animationStart) {
76745
- return;
76746
- }
76747
- _this.resetEffect(node);
76748
- };
76749
- _this.onTransitionEnd = function (e) {
76750
- if (!e || e.animationName !== 'fadeEffect') {
76751
- return;
76752
- }
76753
- _this.resetEffect(e.target);
76754
- };
76755
- _this.bindAnimationEvent = function (node) {
76756
- if (!node || !node.getAttribute || node.getAttribute('disabled') || node.className.includes('disabled')) {
76757
- return;
76758
- }
76759
- var onClick = function onClick(e) {
76760
- // Fix radio button click twice
76761
- if (e.target.tagName === 'INPUT' || isHidden(e.target)) {
76762
- return;
76763
- }
76764
- _this.resetEffect(node);
76765
- // Get wave color from target
76766
- var waveColor = getTargetWaveColor(node);
76767
- _this.clickWaveTimeoutId = window.setTimeout(function () {
76768
- return _this.onClick(node, waveColor);
76769
- }, 0);
76770
- raf_wrapperRaf.cancel(_this.animationStartId);
76771
- _this.animationStart = true;
76772
- // Render to trigger transition event cost 3 frames. Let's delay 10 frames to reset this.
76773
- _this.animationStartId = raf_wrapperRaf(function () {
76774
- _this.animationStart = false;
76775
- }, 10);
76776
- };
76777
- node.addEventListener('click', onClick, true);
76778
- return {
76779
- cancel: function cancel() {
76780
- node.removeEventListener('click', onClick, true);
76781
- }
76782
- };
76783
- };
76784
- _this.renderWave = function (_ref) {
76785
- var csp = _ref.csp;
76786
- var children = _this.props.children;
76787
- _this.csp = csp;
76788
- if (! /*#__PURE__*/external_React_.isValidElement(children)) return children;
76789
- var ref = _this.containerRef;
76790
- if (supportRef(children)) {
76791
- ref = composeRef(children.ref, _this.containerRef);
76792
- }
76793
- return cloneElement(children, {
76794
- ref: ref
76795
- });
76796
- };
76797
- return _this;
76798
- }
76799
- _createClass(InternalWave, [{
76800
- key: "componentDidMount",
76801
- value: function componentDidMount() {
76802
- this.destroyed = false;
76803
- var node = this.containerRef.current;
76804
- if (!node || node.nodeType !== 1) {
76805
- return;
76806
- }
76807
- this.instance = this.bindAnimationEvent(node);
76781
+ return false;
76808
76782
  }
76809
- }, {
76810
- key: "componentWillUnmount",
76811
- value: function componentWillUnmount() {
76812
- if (this.instance) {
76813
- this.instance.cancel();
76814
- }
76815
- if (this.clickWaveTimeoutId) {
76816
- clearTimeout(this.clickWaveTimeoutId);
76817
- }
76818
- this.destroyed = true;
76783
+ }, function (_ref) {
76784
+ var motionClassName = _ref.className;
76785
+ return /*#__PURE__*/external_React_.createElement("div", {
76786
+ ref: divRef,
76787
+ className: classnames_default()(className, motionClassName),
76788
+ style: waveStyle
76789
+ });
76790
+ });
76791
+ };
76792
+ function validateNum(value) {
76793
+ return Number.isNaN(value) ? 0 : value;
76794
+ }
76795
+ function showWaveEffect(container, node, className) {
76796
+ var nodeStyle = getComputedStyle(node);
76797
+ var nodeRect = node.getBoundingClientRect();
76798
+ // Get wave color from target
76799
+ var waveColor = getTargetWaveColor(node);
76800
+ // Get border radius
76801
+ var borderTopLeftRadius = nodeStyle.borderTopLeftRadius,
76802
+ borderTopRightRadius = nodeStyle.borderTopRightRadius,
76803
+ borderBottomLeftRadius = nodeStyle.borderBottomLeftRadius,
76804
+ borderBottomRightRadius = nodeStyle.borderBottomRightRadius;
76805
+ // Do scale calc
76806
+ var offsetWidth = node.offsetWidth;
76807
+ var scale = validateNum(nodeRect.width / offsetWidth);
76808
+ // Create holder
76809
+ var holder = document.createElement('div');
76810
+ getValidateContainer(container).appendChild(holder);
76811
+ render_render( /*#__PURE__*/external_React_.createElement(WaveEffect, {
76812
+ left: nodeRect.left,
76813
+ top: nodeRect.top,
76814
+ width: nodeRect.width,
76815
+ height: nodeRect.height,
76816
+ color: waveColor,
76817
+ className: className,
76818
+ scale: scale,
76819
+ borderRadius: [borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius].map(function (radius) {
76820
+ return validateNum(parseFloat(radius) * scale);
76821
+ })
76822
+ }), holder);
76823
+ }
76824
+ ;// CONCATENATED MODULE: ./node_modules/antd/es/_util/wave/useWave.js
76825
+
76826
+ function useWave(nodeRef, className) {
76827
+ function showWave() {
76828
+ var _a;
76829
+ var node = nodeRef.current;
76830
+ // Skip if not exist doc
76831
+ var container = ((_a = node.getRootNode) === null || _a === void 0 ? void 0 : _a.call(node)) || (node === null || node === void 0 ? void 0 : node.ownerDocument);
76832
+ if (container) {
76833
+ showWaveEffect(container, node, className);
76819
76834
  }
76820
- }, {
76821
- key: "getAttributeName",
76822
- value: function getAttributeName() {
76823
- var getPrefixCls = this.context.getPrefixCls;
76824
- var insertExtraNode = this.props.insertExtraNode;
76825
- return insertExtraNode ? "".concat(getPrefixCls(''), "-click-animating") : "".concat(getPrefixCls(''), "-click-animating-without-extra-node");
76835
+ }
76836
+ return showWave;
76837
+ }
76838
+ ;// CONCATENATED MODULE: ./node_modules/antd/es/_util/wave/index.js
76839
+
76840
+
76841
+
76842
+
76843
+
76844
+
76845
+
76846
+
76847
+
76848
+ var Wave = function Wave(props) {
76849
+ var children = props.children,
76850
+ disabled = props.disabled;
76851
+ var _useContext = (0,external_React_.useContext)(context_ConfigContext),
76852
+ getPrefixCls = _useContext.getPrefixCls;
76853
+ var containerRef = (0,external_React_.useRef)(null);
76854
+ // ============================== Style ===============================
76855
+ var prefixCls = getPrefixCls('wave');
76856
+ var _useStyle = wave_style(prefixCls),
76857
+ _useStyle2 = esm_slicedToArray_slicedToArray(_useStyle, 2),
76858
+ hashId = _useStyle2[1];
76859
+ // =============================== Wave ===============================
76860
+ var showWave = useWave(containerRef, classnames_default()(prefixCls, hashId));
76861
+ // ============================== Effect ==============================
76862
+ external_React_default().useEffect(function () {
76863
+ var node = containerRef.current;
76864
+ if (!node || node.nodeType !== 1 || disabled) {
76865
+ return;
76826
76866
  }
76827
- }, {
76828
- key: "resetEffect",
76829
- value: function resetEffect(node) {
76830
- var _this2 = this;
76831
- if (!node || node === this.extraNode || !(node instanceof Element)) {
76867
+ // Click handler
76868
+ var onClick = function onClick(e) {
76869
+ // Fix radio button click twice
76870
+ if (e.target.tagName === 'INPUT' || !Dom_isVisible(e.target) ||
76871
+ // No need wave
76872
+ !node.getAttribute || node.getAttribute('disabled') || node.disabled || node.className.includes('disabled') || node.className.includes('-leave')) {
76832
76873
  return;
76833
76874
  }
76834
- var insertExtraNode = this.props.insertExtraNode;
76835
- var attributeName = this.getAttributeName();
76836
- node.setAttribute(attributeName, 'false'); // edge has bug on `removeAttribute` #14466
76837
- if (styleForPseudo) {
76838
- styleForPseudo.innerHTML = '';
76839
- }
76840
- if (insertExtraNode && this.extraNode && node.contains(this.extraNode)) {
76841
- node.removeChild(this.extraNode);
76842
- }
76843
- ['transition', 'animation'].forEach(function (name) {
76844
- node.removeEventListener("".concat(name, "start"), _this2.onTransitionStart);
76845
- node.removeEventListener("".concat(name, "end"), _this2.onTransitionEnd);
76846
- });
76847
- }
76848
- }, {
76849
- key: "render",
76850
- value: function render() {
76851
- return /*#__PURE__*/external_React_.createElement(context_ConfigConsumer, null, this.renderWave);
76852
- }
76853
- }]);
76854
- return InternalWave;
76855
- }(external_React_.Component);
76856
- InternalWave.contextType = context_ConfigContext;
76857
- var Wave = /*#__PURE__*/(0,external_React_.forwardRef)(function (props, ref) {
76858
- wave_style();
76859
- return /*#__PURE__*/external_React_.createElement(InternalWave, Object.assign({
76875
+ showWave();
76876
+ };
76877
+ // Bind events
76878
+ node.addEventListener('click', onClick, true);
76879
+ return function () {
76880
+ node.removeEventListener('click', onClick, true);
76881
+ };
76882
+ }, [disabled]);
76883
+ // ============================== Render ==============================
76884
+ if (! /*#__PURE__*/external_React_default().isValidElement(children)) {
76885
+ return children !== null && children !== void 0 ? children : null;
76886
+ }
76887
+ var ref = supportRef(children) ? composeRef(children.ref, containerRef) : containerRef;
76888
+ return cloneElement(children, {
76860
76889
  ref: ref
76861
- }, props));
76862
- });
76890
+ });
76891
+ };
76863
76892
  /* harmony default export */ var wave = (Wave);
76864
76893
  ;// CONCATENATED MODULE: ./node_modules/antd/es/button/button-group.js
76865
76894
 
@@ -78025,7 +78054,7 @@ var genStatusStyle = function genStatusStyle(token) {
78025
78054
  colorError = token.colorError,
78026
78055
  colorTextLightSolid = token.colorTextLightSolid;
78027
78056
  var itemCls = "".concat(menuCls, "-item");
78028
- return esm_defineProperty_defineProperty({}, "".concat(componentCls, ", ").concat(componentCls, "-menu-submenu"), esm_defineProperty_defineProperty({}, "".concat(menuCls, " ").concat(itemCls), esm_defineProperty_defineProperty({}, "&".concat(itemCls, "-danger"), {
78057
+ return esm_defineProperty_defineProperty({}, "".concat(componentCls, ", ").concat(componentCls, "-menu-submenu"), esm_defineProperty_defineProperty({}, "".concat(menuCls, " ").concat(itemCls), esm_defineProperty_defineProperty({}, "&".concat(itemCls, "-danger:not(").concat(itemCls, "-disabled)"), {
78029
78058
  color: colorError,
78030
78059
  '&:hover': {
78031
78060
  color: colorTextLightSolid,
@@ -78057,7 +78086,6 @@ var genBaseStyle = function genBaseStyle(token) {
78057
78086
  dropdownPaddingVertical = token.dropdownPaddingVertical,
78058
78087
  fontSize = token.fontSize,
78059
78088
  dropdownEdgeChildPadding = token.dropdownEdgeChildPadding,
78060
- borderRadius = token.borderRadius,
78061
78089
  colorTextDisabled = token.colorTextDisabled,
78062
78090
  fontSizeIcon = token.fontSizeIcon,
78063
78091
  controlPaddingHorizontal = token.controlPaddingHorizontal,
@@ -78204,13 +78232,7 @@ var genBaseStyle = function genBaseStyle(token) {
78204
78232
  fontSize: fontSize,
78205
78233
  lineHeight: token.lineHeight,
78206
78234
  cursor: 'pointer',
78207
- transition: "all ".concat(motionDurationMid),
78208
- '&:first-child': !dropdownEdgeChildPadding ? {
78209
- borderRadius: "".concat(borderRadius, "px ").concat(borderRadius, "px 0 0")
78210
- } : [],
78211
- '&:last-child': !dropdownEdgeChildPadding ? {
78212
- borderRadius: "0 0 ".concat(borderRadius, "px ").concat(borderRadius, "px")
78213
- } : []
78235
+ transition: "all ".concat(motionDurationMid)
78214
78236
  }, "&:hover, &-active", {
78215
78237
  backgroundColor: token.controlItemBgHover
78216
78238
  }), genFocusStyle(token)), esm_defineProperty_defineProperty({
@@ -80410,7 +80432,8 @@ var es_style_genProListStyle = function genProListStyle(token) {
80410
80432
  }), defineProperty_defineProperty(_$concat5, "".concat(token.componentCls, "-row-show-extra-hover"), defineProperty_defineProperty({}, "".concat(token.antCls, "-list-item-extra "), {
80411
80433
  display: 'none'
80412
80434
  })), _$concat5)), defineProperty_defineProperty(_row, "".concat(token.antCls, "-list-pagination"), {
80413
- marginBlockEnd: token.marginLG
80435
+ marginBlockStart: token.margin,
80436
+ marginBlockEnd: token.margin
80414
80437
  }), defineProperty_defineProperty(_row, "".concat(token.antCls, "-list-list"), {
80415
80438
  '&-item': {
80416
80439
  cursor: 'pointer',
@@ -80651,17 +80674,17 @@ function ProList(props) {
80651
80674
 
80652
80675
  ;// CONCATENATED MODULE: ./packages/components/src/version.ts
80653
80676
  var version_version = {
80654
- "@ant-design/pro-card": "2.1.6",
80655
- "@ant-design/pro-components": "2.3.47",
80656
- "@ant-design/pro-descriptions": "2.0.39",
80657
- "@ant-design/pro-field": "2.2.0",
80658
- "@ant-design/pro-form": "2.4.7",
80659
- "@ant-design/pro-layout": "7.4.0",
80660
- "@ant-design/pro-list": "2.0.40",
80661
- "@ant-design/pro-provider": "2.2.0",
80677
+ "@ant-design/pro-card": "2.1.8",
80678
+ "@ant-design/pro-components": "2.3.49",
80679
+ "@ant-design/pro-descriptions": "2.0.41",
80680
+ "@ant-design/pro-field": "2.2.2",
80681
+ "@ant-design/pro-form": "2.5.1",
80682
+ "@ant-design/pro-layout": "7.5.1",
80683
+ "@ant-design/pro-list": "2.0.42",
80684
+ "@ant-design/pro-provider": "2.3.1",
80662
80685
  "@ant-design/pro-skeleton": "2.0.7",
80663
- "@ant-design/pro-table": "3.2.7",
80664
- "@ant-design/pro-utils": "2.5.0"
80686
+ "@ant-design/pro-table": "3.2.9",
80687
+ "@ant-design/pro-utils": "2.5.2"
80665
80688
  };
80666
80689
  ;// CONCATENATED MODULE: ./packages/components/src/index.tsx
80667
80690