@darajs/components 1.7.1 → 1.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/dropzone/dropzone.d.ts +2 -0
- package/dist/common/dropzone/dropzone.d.ts.map +1 -1
- package/dist/common/dropzone/dropzone.js +1 -1
- package/dist/common/dropzone/dropzone.js.map +1 -1
- package/dist/dara_components-1.7.3-py3-none-any.whl +0 -0
- package/dist/umd/dara.components.umd.js +748 -178
- package/package.json +15 -15
- package/dist/dara_components-1.7.1-py3-none-any.whl +0 -0
|
@@ -5901,7 +5901,7 @@
|
|
|
5901
5901
|
};
|
|
5902
5902
|
return _wrapNativeSuper$1(Class);
|
|
5903
5903
|
}
|
|
5904
|
-
var PolishedError$
|
|
5904
|
+
var PolishedError$2 = /* @__PURE__ */ function(_Error) {
|
|
5905
5905
|
_inheritsLoose$2(PolishedError2, _Error);
|
|
5906
5906
|
function PolishedError2(code2) {
|
|
5907
5907
|
var _this;
|
|
@@ -5912,15 +5912,15 @@
|
|
|
5912
5912
|
}
|
|
5913
5913
|
return PolishedError2;
|
|
5914
5914
|
}(/* @__PURE__ */ _wrapNativeSuper$1(Error));
|
|
5915
|
-
function colorToInt$
|
|
5915
|
+
function colorToInt$2(color2) {
|
|
5916
5916
|
return Math.round(color2 * 255);
|
|
5917
5917
|
}
|
|
5918
|
-
function convertToInt$
|
|
5919
|
-
return colorToInt$
|
|
5918
|
+
function convertToInt$2(red, green, blue) {
|
|
5919
|
+
return colorToInt$2(red) + "," + colorToInt$2(green) + "," + colorToInt$2(blue);
|
|
5920
5920
|
}
|
|
5921
|
-
function hslToRgb$
|
|
5921
|
+
function hslToRgb$2(hue, saturation, lightness, convert2) {
|
|
5922
5922
|
if (convert2 === void 0) {
|
|
5923
|
-
convert2 = convertToInt$
|
|
5923
|
+
convert2 = convertToInt$2;
|
|
5924
5924
|
}
|
|
5925
5925
|
if (saturation === 0) {
|
|
5926
5926
|
return convert2(lightness, lightness, lightness);
|
|
@@ -5956,7 +5956,7 @@
|
|
|
5956
5956
|
var finalBlue = blue + lightnessModification;
|
|
5957
5957
|
return convert2(finalRed, finalGreen, finalBlue);
|
|
5958
5958
|
}
|
|
5959
|
-
var namedColorMap$
|
|
5959
|
+
var namedColorMap$2 = {
|
|
5960
5960
|
aliceblue: "f0f8ff",
|
|
5961
5961
|
antiquewhite: "faebd7",
|
|
5962
5962
|
aqua: "00ffff",
|
|
@@ -6106,33 +6106,33 @@
|
|
|
6106
6106
|
yellow: "ff0",
|
|
6107
6107
|
yellowgreen: "9acd32"
|
|
6108
6108
|
};
|
|
6109
|
-
function nameToHex$
|
|
6109
|
+
function nameToHex$2(color2) {
|
|
6110
6110
|
if (typeof color2 !== "string")
|
|
6111
6111
|
return color2;
|
|
6112
6112
|
var normalizedColorName = color2.toLowerCase();
|
|
6113
|
-
return namedColorMap$
|
|
6114
|
-
}
|
|
6115
|
-
var hexRegex$
|
|
6116
|
-
var hexRgbaRegex$
|
|
6117
|
-
var reducedHexRegex$
|
|
6118
|
-
var reducedRgbaHexRegex$
|
|
6119
|
-
var rgbRegex$
|
|
6120
|
-
var rgbaRegex$
|
|
6121
|
-
var hslRegex$
|
|
6122
|
-
var hslaRegex$
|
|
6123
|
-
function parseToRgb$
|
|
6113
|
+
return namedColorMap$2[normalizedColorName] ? "#" + namedColorMap$2[normalizedColorName] : color2;
|
|
6114
|
+
}
|
|
6115
|
+
var hexRegex$2 = /^#[a-fA-F0-9]{6}$/;
|
|
6116
|
+
var hexRgbaRegex$2 = /^#[a-fA-F0-9]{8}$/;
|
|
6117
|
+
var reducedHexRegex$2 = /^#[a-fA-F0-9]{3}$/;
|
|
6118
|
+
var reducedRgbaHexRegex$2 = /^#[a-fA-F0-9]{4}$/;
|
|
6119
|
+
var rgbRegex$2 = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i;
|
|
6120
|
+
var rgbaRegex$2 = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;
|
|
6121
|
+
var hslRegex$2 = /^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
|
|
6122
|
+
var hslaRegex$2 = /^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;
|
|
6123
|
+
function parseToRgb$2(color2) {
|
|
6124
6124
|
if (typeof color2 !== "string") {
|
|
6125
|
-
throw new PolishedError$
|
|
6125
|
+
throw new PolishedError$2(3);
|
|
6126
6126
|
}
|
|
6127
|
-
var normalizedColor = nameToHex$
|
|
6128
|
-
if (normalizedColor.match(hexRegex$
|
|
6127
|
+
var normalizedColor = nameToHex$2(color2);
|
|
6128
|
+
if (normalizedColor.match(hexRegex$2)) {
|
|
6129
6129
|
return {
|
|
6130
6130
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
6131
6131
|
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
|
|
6132
6132
|
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
6133
6133
|
};
|
|
6134
6134
|
}
|
|
6135
|
-
if (normalizedColor.match(hexRgbaRegex$
|
|
6135
|
+
if (normalizedColor.match(hexRgbaRegex$2)) {
|
|
6136
6136
|
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
6137
6137
|
return {
|
|
6138
6138
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
@@ -6141,14 +6141,14 @@
|
|
|
6141
6141
|
alpha
|
|
6142
6142
|
};
|
|
6143
6143
|
}
|
|
6144
|
-
if (normalizedColor.match(reducedHexRegex$
|
|
6144
|
+
if (normalizedColor.match(reducedHexRegex$2)) {
|
|
6145
6145
|
return {
|
|
6146
6146
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
6147
6147
|
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
6148
6148
|
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
6149
6149
|
};
|
|
6150
6150
|
}
|
|
6151
|
-
if (normalizedColor.match(reducedRgbaHexRegex$
|
|
6151
|
+
if (normalizedColor.match(reducedRgbaHexRegex$2)) {
|
|
6152
6152
|
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
6153
6153
|
return {
|
|
6154
6154
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
@@ -6157,7 +6157,7 @@
|
|
|
6157
6157
|
alpha: _alpha
|
|
6158
6158
|
};
|
|
6159
6159
|
}
|
|
6160
|
-
var rgbMatched = rgbRegex$
|
|
6160
|
+
var rgbMatched = rgbRegex$2.exec(normalizedColor);
|
|
6161
6161
|
if (rgbMatched) {
|
|
6162
6162
|
return {
|
|
6163
6163
|
red: parseInt("" + rgbMatched[1], 10),
|
|
@@ -6165,7 +6165,7 @@
|
|
|
6165
6165
|
blue: parseInt("" + rgbMatched[3], 10)
|
|
6166
6166
|
};
|
|
6167
6167
|
}
|
|
6168
|
-
var rgbaMatched = rgbaRegex$
|
|
6168
|
+
var rgbaMatched = rgbaRegex$2.exec(normalizedColor);
|
|
6169
6169
|
if (rgbaMatched) {
|
|
6170
6170
|
return {
|
|
6171
6171
|
red: parseInt("" + rgbaMatched[1], 10),
|
|
@@ -6174,15 +6174,15 @@
|
|
|
6174
6174
|
alpha: parseFloat("" + rgbaMatched[4])
|
|
6175
6175
|
};
|
|
6176
6176
|
}
|
|
6177
|
-
var hslMatched = hslRegex$
|
|
6177
|
+
var hslMatched = hslRegex$2.exec(normalizedColor);
|
|
6178
6178
|
if (hslMatched) {
|
|
6179
6179
|
var hue = parseInt("" + hslMatched[1], 10);
|
|
6180
6180
|
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
6181
6181
|
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
6182
|
-
var rgbColorString = "rgb(" + hslToRgb$
|
|
6183
|
-
var hslRgbMatched = rgbRegex$
|
|
6182
|
+
var rgbColorString = "rgb(" + hslToRgb$2(hue, saturation, lightness) + ")";
|
|
6183
|
+
var hslRgbMatched = rgbRegex$2.exec(rgbColorString);
|
|
6184
6184
|
if (!hslRgbMatched) {
|
|
6185
|
-
throw new PolishedError$
|
|
6185
|
+
throw new PolishedError$2(4, normalizedColor, rgbColorString);
|
|
6186
6186
|
}
|
|
6187
6187
|
return {
|
|
6188
6188
|
red: parseInt("" + hslRgbMatched[1], 10),
|
|
@@ -6190,15 +6190,15 @@
|
|
|
6190
6190
|
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
6191
6191
|
};
|
|
6192
6192
|
}
|
|
6193
|
-
var hslaMatched = hslaRegex$
|
|
6193
|
+
var hslaMatched = hslaRegex$2.exec(normalizedColor);
|
|
6194
6194
|
if (hslaMatched) {
|
|
6195
6195
|
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
6196
6196
|
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
6197
6197
|
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
6198
|
-
var _rgbColorString = "rgb(" + hslToRgb$
|
|
6199
|
-
var _hslRgbMatched = rgbRegex$
|
|
6198
|
+
var _rgbColorString = "rgb(" + hslToRgb$2(_hue, _saturation, _lightness) + ")";
|
|
6199
|
+
var _hslRgbMatched = rgbRegex$2.exec(_rgbColorString);
|
|
6200
6200
|
if (!_hslRgbMatched) {
|
|
6201
|
-
throw new PolishedError$
|
|
6201
|
+
throw new PolishedError$2(4, normalizedColor, _rgbColorString);
|
|
6202
6202
|
}
|
|
6203
6203
|
return {
|
|
6204
6204
|
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
@@ -6207,60 +6207,60 @@
|
|
|
6207
6207
|
alpha: parseFloat("" + hslaMatched[4])
|
|
6208
6208
|
};
|
|
6209
6209
|
}
|
|
6210
|
-
throw new PolishedError$
|
|
6210
|
+
throw new PolishedError$2(5);
|
|
6211
6211
|
}
|
|
6212
|
-
var reduceHexValue$
|
|
6212
|
+
var reduceHexValue$3 = function reduceHexValue2(value) {
|
|
6213
6213
|
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
6214
6214
|
return "#" + value[1] + value[3] + value[5];
|
|
6215
6215
|
}
|
|
6216
6216
|
return value;
|
|
6217
6217
|
};
|
|
6218
|
-
function numberToHex$
|
|
6218
|
+
function numberToHex$2(value) {
|
|
6219
6219
|
var hex2 = value.toString(16);
|
|
6220
6220
|
return hex2.length === 1 ? "0" + hex2 : hex2;
|
|
6221
6221
|
}
|
|
6222
|
-
function rgb$
|
|
6222
|
+
function rgb$3(value, green, blue) {
|
|
6223
6223
|
if (typeof value === "number" && typeof green === "number" && typeof blue === "number") {
|
|
6224
|
-
return reduceHexValue$
|
|
6224
|
+
return reduceHexValue$3("#" + numberToHex$2(value) + numberToHex$2(green) + numberToHex$2(blue));
|
|
6225
6225
|
} else if (typeof value === "object" && green === void 0 && blue === void 0) {
|
|
6226
|
-
return reduceHexValue$
|
|
6226
|
+
return reduceHexValue$3("#" + numberToHex$2(value.red) + numberToHex$2(value.green) + numberToHex$2(value.blue));
|
|
6227
6227
|
}
|
|
6228
|
-
throw new PolishedError$
|
|
6228
|
+
throw new PolishedError$2(6);
|
|
6229
6229
|
}
|
|
6230
|
-
function rgba$
|
|
6230
|
+
function rgba$4(firstValue, secondValue, thirdValue, fourthValue) {
|
|
6231
6231
|
if (typeof firstValue === "string" && typeof secondValue === "number") {
|
|
6232
|
-
var rgbValue = parseToRgb$
|
|
6232
|
+
var rgbValue = parseToRgb$2(firstValue);
|
|
6233
6233
|
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
|
|
6234
6234
|
} else if (typeof firstValue === "number" && typeof secondValue === "number" && typeof thirdValue === "number" && typeof fourthValue === "number") {
|
|
6235
|
-
return fourthValue >= 1 ? rgb$
|
|
6235
|
+
return fourthValue >= 1 ? rgb$3(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
|
|
6236
6236
|
} else if (typeof firstValue === "object" && secondValue === void 0 && thirdValue === void 0 && fourthValue === void 0) {
|
|
6237
|
-
return firstValue.alpha >= 1 ? rgb$
|
|
6237
|
+
return firstValue.alpha >= 1 ? rgb$3(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
6238
6238
|
}
|
|
6239
|
-
throw new PolishedError$
|
|
6239
|
+
throw new PolishedError$2(7);
|
|
6240
6240
|
}
|
|
6241
|
-
function curried$
|
|
6241
|
+
function curried$2(f2, length, acc) {
|
|
6242
6242
|
return function fn2() {
|
|
6243
6243
|
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
6244
|
-
return combined.length >= length ? f2.apply(this, combined) : curried$
|
|
6244
|
+
return combined.length >= length ? f2.apply(this, combined) : curried$2(f2, length, combined);
|
|
6245
6245
|
};
|
|
6246
6246
|
}
|
|
6247
|
-
function curry$
|
|
6248
|
-
return curried$
|
|
6247
|
+
function curry$2(f2) {
|
|
6248
|
+
return curried$2(f2, f2.length, []);
|
|
6249
6249
|
}
|
|
6250
|
-
function guard$
|
|
6250
|
+
function guard$2(lowerBoundary, upperBoundary, value) {
|
|
6251
6251
|
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
6252
6252
|
}
|
|
6253
|
-
function transparentize$
|
|
6253
|
+
function transparentize$2(amount, color2) {
|
|
6254
6254
|
if (color2 === "transparent")
|
|
6255
6255
|
return color2;
|
|
6256
|
-
var parsedColor = parseToRgb$
|
|
6256
|
+
var parsedColor = parseToRgb$2(color2);
|
|
6257
6257
|
var alpha = typeof parsedColor.alpha === "number" ? parsedColor.alpha : 1;
|
|
6258
6258
|
var colorWithAlpha = _extends$3({}, parsedColor, {
|
|
6259
|
-
alpha: guard$
|
|
6259
|
+
alpha: guard$2(0, 1, (alpha * 100 - parseFloat(amount) * 100) / 100)
|
|
6260
6260
|
});
|
|
6261
|
-
return rgba$
|
|
6261
|
+
return rgba$4(colorWithAlpha);
|
|
6262
6262
|
}
|
|
6263
|
-
var curriedTransparentize$2 = /* @__PURE__ */ curry$
|
|
6263
|
+
var curriedTransparentize$2 = /* @__PURE__ */ curry$2(transparentize$2);
|
|
6264
6264
|
const Wrapper$c = styled__default.default.div`
|
|
6265
6265
|
display: flex;
|
|
6266
6266
|
gap: 1rem;
|
|
@@ -31681,6 +31681,9 @@
|
|
|
31681
31681
|
function UploadDropzone$1(props) {
|
|
31682
31682
|
var _a3;
|
|
31683
31683
|
React.useEffect(() => {
|
|
31684
|
+
if (!props.enablePaste) {
|
|
31685
|
+
return;
|
|
31686
|
+
}
|
|
31684
31687
|
const handlePaste = (ev) => {
|
|
31685
31688
|
const blob = new Blob([ev.clipboardData.getData("Text")], { type: "text/plain" });
|
|
31686
31689
|
const file = new File([blob], "pasted_data", { type: "text/plain" });
|
|
@@ -38710,7 +38713,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
38710
38713
|
};
|
|
38711
38714
|
return _wrapNativeSuper(Class);
|
|
38712
38715
|
}
|
|
38713
|
-
var PolishedError = /* @__PURE__ */ function(_Error) {
|
|
38716
|
+
var PolishedError$1 = /* @__PURE__ */ function(_Error) {
|
|
38714
38717
|
_inheritsLoose(PolishedError2, _Error);
|
|
38715
38718
|
function PolishedError2(code2) {
|
|
38716
38719
|
var _this;
|
|
@@ -38721,15 +38724,15 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
38721
38724
|
}
|
|
38722
38725
|
return PolishedError2;
|
|
38723
38726
|
}(/* @__PURE__ */ _wrapNativeSuper(Error));
|
|
38724
|
-
function colorToInt(color2) {
|
|
38727
|
+
function colorToInt$1(color2) {
|
|
38725
38728
|
return Math.round(color2 * 255);
|
|
38726
38729
|
}
|
|
38727
|
-
function convertToInt(red, green, blue) {
|
|
38728
|
-
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
38730
|
+
function convertToInt$1(red, green, blue) {
|
|
38731
|
+
return colorToInt$1(red) + "," + colorToInt$1(green) + "," + colorToInt$1(blue);
|
|
38729
38732
|
}
|
|
38730
|
-
function hslToRgb(hue, saturation, lightness, convert2) {
|
|
38733
|
+
function hslToRgb$1(hue, saturation, lightness, convert2) {
|
|
38731
38734
|
if (convert2 === void 0) {
|
|
38732
|
-
convert2 = convertToInt;
|
|
38735
|
+
convert2 = convertToInt$1;
|
|
38733
38736
|
}
|
|
38734
38737
|
if (saturation === 0) {
|
|
38735
38738
|
return convert2(lightness, lightness, lightness);
|
|
@@ -38765,7 +38768,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
38765
38768
|
var finalBlue = blue + lightnessModification;
|
|
38766
38769
|
return convert2(finalRed, finalGreen, finalBlue);
|
|
38767
38770
|
}
|
|
38768
|
-
var namedColorMap = {
|
|
38771
|
+
var namedColorMap$1 = {
|
|
38769
38772
|
aliceblue: "f0f8ff",
|
|
38770
38773
|
antiquewhite: "faebd7",
|
|
38771
38774
|
aqua: "00ffff",
|
|
@@ -38915,33 +38918,33 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
38915
38918
|
yellow: "ff0",
|
|
38916
38919
|
yellowgreen: "9acd32"
|
|
38917
38920
|
};
|
|
38918
|
-
function nameToHex(color2) {
|
|
38921
|
+
function nameToHex$1(color2) {
|
|
38919
38922
|
if (typeof color2 !== "string")
|
|
38920
38923
|
return color2;
|
|
38921
38924
|
var normalizedColorName = color2.toLowerCase();
|
|
38922
|
-
return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color2;
|
|
38925
|
+
return namedColorMap$1[normalizedColorName] ? "#" + namedColorMap$1[normalizedColorName] : color2;
|
|
38923
38926
|
}
|
|
38924
|
-
var hexRegex = /^#[a-fA-F0-9]{6}$/;
|
|
38925
|
-
var hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;
|
|
38926
|
-
var reducedHexRegex = /^#[a-fA-F0-9]{3}$/;
|
|
38927
|
-
var reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;
|
|
38928
|
-
var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i;
|
|
38929
|
-
var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
38930
|
-
var hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
|
|
38931
|
-
var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
38932
|
-
function parseToRgb(color2) {
|
|
38927
|
+
var hexRegex$1 = /^#[a-fA-F0-9]{6}$/;
|
|
38928
|
+
var hexRgbaRegex$1 = /^#[a-fA-F0-9]{8}$/;
|
|
38929
|
+
var reducedHexRegex$1 = /^#[a-fA-F0-9]{3}$/;
|
|
38930
|
+
var reducedRgbaHexRegex$1 = /^#[a-fA-F0-9]{4}$/;
|
|
38931
|
+
var rgbRegex$1 = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i;
|
|
38932
|
+
var rgbaRegex$1 = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
38933
|
+
var hslRegex$1 = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
|
|
38934
|
+
var hslaRegex$1 = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
38935
|
+
function parseToRgb$1(color2) {
|
|
38933
38936
|
if (typeof color2 !== "string") {
|
|
38934
|
-
throw new PolishedError(3);
|
|
38937
|
+
throw new PolishedError$1(3);
|
|
38935
38938
|
}
|
|
38936
|
-
var normalizedColor = nameToHex(color2);
|
|
38937
|
-
if (normalizedColor.match(hexRegex)) {
|
|
38939
|
+
var normalizedColor = nameToHex$1(color2);
|
|
38940
|
+
if (normalizedColor.match(hexRegex$1)) {
|
|
38938
38941
|
return {
|
|
38939
38942
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
38940
38943
|
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
|
|
38941
38944
|
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
38942
38945
|
};
|
|
38943
38946
|
}
|
|
38944
|
-
if (normalizedColor.match(hexRgbaRegex)) {
|
|
38947
|
+
if (normalizedColor.match(hexRgbaRegex$1)) {
|
|
38945
38948
|
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
38946
38949
|
return {
|
|
38947
38950
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
@@ -38950,14 +38953,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
38950
38953
|
alpha
|
|
38951
38954
|
};
|
|
38952
38955
|
}
|
|
38953
|
-
if (normalizedColor.match(reducedHexRegex)) {
|
|
38956
|
+
if (normalizedColor.match(reducedHexRegex$1)) {
|
|
38954
38957
|
return {
|
|
38955
38958
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
38956
38959
|
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
38957
38960
|
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
38958
38961
|
};
|
|
38959
38962
|
}
|
|
38960
|
-
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
38963
|
+
if (normalizedColor.match(reducedRgbaHexRegex$1)) {
|
|
38961
38964
|
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
38962
38965
|
return {
|
|
38963
38966
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
@@ -38966,7 +38969,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
38966
38969
|
alpha: _alpha
|
|
38967
38970
|
};
|
|
38968
38971
|
}
|
|
38969
|
-
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
38972
|
+
var rgbMatched = rgbRegex$1.exec(normalizedColor);
|
|
38970
38973
|
if (rgbMatched) {
|
|
38971
38974
|
return {
|
|
38972
38975
|
red: parseInt("" + rgbMatched[1], 10),
|
|
@@ -38974,7 +38977,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
38974
38977
|
blue: parseInt("" + rgbMatched[3], 10)
|
|
38975
38978
|
};
|
|
38976
38979
|
}
|
|
38977
|
-
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
38980
|
+
var rgbaMatched = rgbaRegex$1.exec(normalizedColor.substring(0, 50));
|
|
38978
38981
|
if (rgbaMatched) {
|
|
38979
38982
|
return {
|
|
38980
38983
|
red: parseInt("" + rgbaMatched[1], 10),
|
|
@@ -38983,15 +38986,15 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
38983
38986
|
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
38984
38987
|
};
|
|
38985
38988
|
}
|
|
38986
|
-
var hslMatched = hslRegex.exec(normalizedColor);
|
|
38989
|
+
var hslMatched = hslRegex$1.exec(normalizedColor);
|
|
38987
38990
|
if (hslMatched) {
|
|
38988
38991
|
var hue = parseInt("" + hslMatched[1], 10);
|
|
38989
38992
|
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
38990
38993
|
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
38991
|
-
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
|
|
38992
|
-
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
38994
|
+
var rgbColorString = "rgb(" + hslToRgb$1(hue, saturation, lightness) + ")";
|
|
38995
|
+
var hslRgbMatched = rgbRegex$1.exec(rgbColorString);
|
|
38993
38996
|
if (!hslRgbMatched) {
|
|
38994
|
-
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
38997
|
+
throw new PolishedError$1(4, normalizedColor, rgbColorString);
|
|
38995
38998
|
}
|
|
38996
38999
|
return {
|
|
38997
39000
|
red: parseInt("" + hslRgbMatched[1], 10),
|
|
@@ -38999,15 +39002,15 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
38999
39002
|
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
39000
39003
|
};
|
|
39001
39004
|
}
|
|
39002
|
-
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
39005
|
+
var hslaMatched = hslaRegex$1.exec(normalizedColor.substring(0, 50));
|
|
39003
39006
|
if (hslaMatched) {
|
|
39004
39007
|
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
39005
39008
|
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
39006
39009
|
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
39007
|
-
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
|
|
39008
|
-
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
39010
|
+
var _rgbColorString = "rgb(" + hslToRgb$1(_hue, _saturation, _lightness) + ")";
|
|
39011
|
+
var _hslRgbMatched = rgbRegex$1.exec(_rgbColorString);
|
|
39009
39012
|
if (!_hslRgbMatched) {
|
|
39010
|
-
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
39013
|
+
throw new PolishedError$1(4, normalizedColor, _rgbColorString);
|
|
39011
39014
|
}
|
|
39012
39015
|
return {
|
|
39013
39016
|
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
@@ -39016,92 +39019,61 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
39016
39019
|
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
39017
39020
|
};
|
|
39018
39021
|
}
|
|
39019
|
-
throw new PolishedError(5);
|
|
39022
|
+
throw new PolishedError$1(5);
|
|
39020
39023
|
}
|
|
39021
|
-
var reduceHexValue = function reduceHexValue2(value) {
|
|
39024
|
+
var reduceHexValue$2 = function reduceHexValue2(value) {
|
|
39022
39025
|
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
39023
39026
|
return "#" + value[1] + value[3] + value[5];
|
|
39024
39027
|
}
|
|
39025
39028
|
return value;
|
|
39026
39029
|
};
|
|
39027
|
-
var reduceHexValue$1 = reduceHexValue;
|
|
39028
|
-
function numberToHex(value) {
|
|
39030
|
+
var reduceHexValue$1$1 = reduceHexValue$2;
|
|
39031
|
+
function numberToHex$1(value) {
|
|
39029
39032
|
var hex2 = value.toString(16);
|
|
39030
39033
|
return hex2.length === 1 ? "0" + hex2 : hex2;
|
|
39031
39034
|
}
|
|
39032
|
-
function rgb$
|
|
39035
|
+
function rgb$2(value, green, blue) {
|
|
39033
39036
|
if (typeof value === "number" && typeof green === "number" && typeof blue === "number") {
|
|
39034
|
-
return reduceHexValue$1("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue));
|
|
39037
|
+
return reduceHexValue$1$1("#" + numberToHex$1(value) + numberToHex$1(green) + numberToHex$1(blue));
|
|
39035
39038
|
} else if (typeof value === "object" && green === void 0 && blue === void 0) {
|
|
39036
|
-
return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
39039
|
+
return reduceHexValue$1$1("#" + numberToHex$1(value.red) + numberToHex$1(value.green) + numberToHex$1(value.blue));
|
|
39037
39040
|
}
|
|
39038
|
-
throw new PolishedError(6);
|
|
39041
|
+
throw new PolishedError$1(6);
|
|
39039
39042
|
}
|
|
39040
|
-
function rgba$
|
|
39043
|
+
function rgba$3(firstValue, secondValue, thirdValue, fourthValue) {
|
|
39041
39044
|
if (typeof firstValue === "string" && typeof secondValue === "number") {
|
|
39042
|
-
var rgbValue = parseToRgb(firstValue);
|
|
39045
|
+
var rgbValue = parseToRgb$1(firstValue);
|
|
39043
39046
|
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
|
|
39044
39047
|
} else if (typeof firstValue === "number" && typeof secondValue === "number" && typeof thirdValue === "number" && typeof fourthValue === "number") {
|
|
39045
|
-
return fourthValue >= 1 ? rgb$
|
|
39048
|
+
return fourthValue >= 1 ? rgb$2(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
|
|
39046
39049
|
} else if (typeof firstValue === "object" && secondValue === void 0 && thirdValue === void 0 && fourthValue === void 0) {
|
|
39047
|
-
return firstValue.alpha >= 1 ? rgb$
|
|
39050
|
+
return firstValue.alpha >= 1 ? rgb$2(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
39048
39051
|
}
|
|
39049
|
-
throw new PolishedError(7);
|
|
39052
|
+
throw new PolishedError$1(7);
|
|
39050
39053
|
}
|
|
39051
|
-
function curried(f2, length, acc) {
|
|
39054
|
+
function curried$1(f2, length, acc) {
|
|
39052
39055
|
return function fn2() {
|
|
39053
39056
|
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
39054
|
-
return combined.length >= length ? f2.apply(this, combined) : curried(f2, length, combined);
|
|
39057
|
+
return combined.length >= length ? f2.apply(this, combined) : curried$1(f2, length, combined);
|
|
39055
39058
|
};
|
|
39056
39059
|
}
|
|
39057
|
-
function curry(f2) {
|
|
39058
|
-
return curried(f2, f2.length, []);
|
|
39060
|
+
function curry$1(f2) {
|
|
39061
|
+
return curried$1(f2, f2.length, []);
|
|
39059
39062
|
}
|
|
39060
|
-
function guard(lowerBoundary, upperBoundary, value) {
|
|
39063
|
+
function guard$1(lowerBoundary, upperBoundary, value) {
|
|
39061
39064
|
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
39062
39065
|
}
|
|
39063
|
-
function
|
|
39064
|
-
if (color2 === "transparent")
|
|
39065
|
-
return otherColor;
|
|
39066
|
-
if (otherColor === "transparent")
|
|
39067
|
-
return color2;
|
|
39068
|
-
if (weight === 0)
|
|
39069
|
-
return otherColor;
|
|
39070
|
-
var parsedColor1 = parseToRgb(color2);
|
|
39071
|
-
var color1 = _extends$1({}, parsedColor1, {
|
|
39072
|
-
alpha: typeof parsedColor1.alpha === "number" ? parsedColor1.alpha : 1
|
|
39073
|
-
});
|
|
39074
|
-
var parsedColor2 = parseToRgb(otherColor);
|
|
39075
|
-
var color22 = _extends$1({}, parsedColor2, {
|
|
39076
|
-
alpha: typeof parsedColor2.alpha === "number" ? parsedColor2.alpha : 1
|
|
39077
|
-
});
|
|
39078
|
-
var alphaDelta = color1.alpha - color22.alpha;
|
|
39079
|
-
var x2 = parseFloat(weight) * 2 - 1;
|
|
39080
|
-
var y2 = x2 * alphaDelta === -1 ? x2 : x2 + alphaDelta;
|
|
39081
|
-
var z2 = 1 + x2 * alphaDelta;
|
|
39082
|
-
var weight1 = (y2 / z2 + 1) / 2;
|
|
39083
|
-
var weight2 = 1 - weight1;
|
|
39084
|
-
var mixedColor = {
|
|
39085
|
-
red: Math.floor(color1.red * weight1 + color22.red * weight2),
|
|
39086
|
-
green: Math.floor(color1.green * weight1 + color22.green * weight2),
|
|
39087
|
-
blue: Math.floor(color1.blue * weight1 + color22.blue * weight2),
|
|
39088
|
-
alpha: color1.alpha * parseFloat(weight) + color22.alpha * (1 - parseFloat(weight))
|
|
39089
|
-
};
|
|
39090
|
-
return rgba$2(mixedColor);
|
|
39091
|
-
}
|
|
39092
|
-
var curriedMix = /* @__PURE__ */ curry(mix);
|
|
39093
|
-
var mix$1 = curriedMix;
|
|
39094
|
-
function transparentize(amount, color2) {
|
|
39066
|
+
function transparentize$1(amount, color2) {
|
|
39095
39067
|
if (color2 === "transparent")
|
|
39096
39068
|
return color2;
|
|
39097
|
-
var parsedColor = parseToRgb(color2);
|
|
39069
|
+
var parsedColor = parseToRgb$1(color2);
|
|
39098
39070
|
var alpha = typeof parsedColor.alpha === "number" ? parsedColor.alpha : 1;
|
|
39099
39071
|
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
39100
|
-
alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
|
|
39072
|
+
alpha: guard$1(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
|
|
39101
39073
|
});
|
|
39102
|
-
return rgba$
|
|
39074
|
+
return rgba$3(colorWithAlpha);
|
|
39103
39075
|
}
|
|
39104
|
-
var curriedTransparentize = /* @__PURE__ */ curry(transparentize);
|
|
39076
|
+
var curriedTransparentize = /* @__PURE__ */ curry$1(transparentize$1);
|
|
39105
39077
|
var curriedTransparentize$1 = curriedTransparentize;
|
|
39106
39078
|
const CardDiv = core$2.injectCss(styled__default.default.div`
|
|
39107
39079
|
display: flex;
|
|
@@ -42746,7 +42718,16 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
42746
42718
|
if (currentStatus === status.LOADING) {
|
|
42747
42719
|
return /* @__PURE__ */ React__default.default.createElement(core$2.DefaultFallback, null);
|
|
42748
42720
|
}
|
|
42749
|
-
return /* @__PURE__ */ React__default.default.createElement(
|
|
42721
|
+
return /* @__PURE__ */ React__default.default.createElement(
|
|
42722
|
+
StyledDropzone,
|
|
42723
|
+
{
|
|
42724
|
+
$rawCss: css2,
|
|
42725
|
+
accept: props.accept,
|
|
42726
|
+
enablePaste: props.enable_paste,
|
|
42727
|
+
onDrop,
|
|
42728
|
+
style: style2
|
|
42729
|
+
}
|
|
42730
|
+
);
|
|
42750
42731
|
}
|
|
42751
42732
|
const GridComponent = styled__default.default.div`
|
|
42752
42733
|
display: flex;
|
|
@@ -274906,11 +274887,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
274906
274887
|
return this._a == 1 ? "hsv(" + h2 + ", " + s2 + "%, " + v2 + "%)" : "hsva(" + h2 + ", " + s2 + "%, " + v2 + "%, " + this._roundA + ")";
|
|
274907
274888
|
},
|
|
274908
274889
|
toHsl: function() {
|
|
274909
|
-
var hsl2 =
|
|
274890
|
+
var hsl2 = rgbToHsl2(this._r, this._g, this._b);
|
|
274910
274891
|
return { h: hsl2.h * 360, s: hsl2.s, l: hsl2.l, a: this._a };
|
|
274911
274892
|
},
|
|
274912
274893
|
toHslString: function() {
|
|
274913
|
-
var hsl2 =
|
|
274894
|
+
var hsl2 = rgbToHsl2(this._r, this._g, this._b);
|
|
274914
274895
|
var h2 = mathRound(hsl2.h * 360), s2 = mathRound(hsl2.s * 100), l2 = mathRound(hsl2.l * 100);
|
|
274915
274896
|
return this._a == 1 ? "hsl(" + h2 + ", " + s2 + "%, " + l2 + "%)" : "hsla(" + h2 + ", " + s2 + "%, " + l2 + "%, " + this._roundA + ")";
|
|
274916
274897
|
},
|
|
@@ -275010,19 +274991,19 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
275010
274991
|
return this;
|
|
275011
274992
|
},
|
|
275012
274993
|
lighten: function() {
|
|
275013
|
-
return this._applyModification(
|
|
274994
|
+
return this._applyModification(lighten2, arguments);
|
|
275014
274995
|
},
|
|
275015
274996
|
brighten: function() {
|
|
275016
274997
|
return this._applyModification(brighten, arguments);
|
|
275017
274998
|
},
|
|
275018
274999
|
darken: function() {
|
|
275019
|
-
return this._applyModification(
|
|
275000
|
+
return this._applyModification(darken2, arguments);
|
|
275020
275001
|
},
|
|
275021
275002
|
desaturate: function() {
|
|
275022
|
-
return this._applyModification(
|
|
275003
|
+
return this._applyModification(desaturate2, arguments);
|
|
275023
275004
|
},
|
|
275024
275005
|
saturate: function() {
|
|
275025
|
-
return this._applyModification(
|
|
275006
|
+
return this._applyModification(saturate2, arguments);
|
|
275026
275007
|
},
|
|
275027
275008
|
greyscale: function() {
|
|
275028
275009
|
return this._applyModification(greyscale, arguments);
|
|
@@ -275118,7 +275099,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
275118
275099
|
b: bound01(b2, 255) * 255
|
|
275119
275100
|
};
|
|
275120
275101
|
}
|
|
275121
|
-
function
|
|
275102
|
+
function rgbToHsl2(r2, g2, b2) {
|
|
275122
275103
|
r2 = bound01(r2, 255);
|
|
275123
275104
|
g2 = bound01(g2, 255);
|
|
275124
275105
|
b2 = bound01(b2, 255);
|
|
@@ -275251,14 +275232,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
275251
275232
|
b: mathRandom()
|
|
275252
275233
|
});
|
|
275253
275234
|
};
|
|
275254
|
-
function
|
|
275235
|
+
function desaturate2(color2, amount) {
|
|
275255
275236
|
amount = amount === 0 ? 0 : amount || 10;
|
|
275256
275237
|
var hsl2 = tinycolor(color2).toHsl();
|
|
275257
275238
|
hsl2.s -= amount / 100;
|
|
275258
275239
|
hsl2.s = clamp01(hsl2.s);
|
|
275259
275240
|
return tinycolor(hsl2);
|
|
275260
275241
|
}
|
|
275261
|
-
function
|
|
275242
|
+
function saturate2(color2, amount) {
|
|
275262
275243
|
amount = amount === 0 ? 0 : amount || 10;
|
|
275263
275244
|
var hsl2 = tinycolor(color2).toHsl();
|
|
275264
275245
|
hsl2.s += amount / 100;
|
|
@@ -275268,7 +275249,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
275268
275249
|
function greyscale(color2) {
|
|
275269
275250
|
return tinycolor(color2).desaturate(100);
|
|
275270
275251
|
}
|
|
275271
|
-
function
|
|
275252
|
+
function lighten2(color2, amount) {
|
|
275272
275253
|
amount = amount === 0 ? 0 : amount || 10;
|
|
275273
275254
|
var hsl2 = tinycolor(color2).toHsl();
|
|
275274
275255
|
hsl2.l += amount / 100;
|
|
@@ -275283,7 +275264,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
275283
275264
|
rgb2.b = mathMax(0, mathMin(255, rgb2.b - mathRound(255 * -(amount / 100))));
|
|
275284
275265
|
return tinycolor(rgb2);
|
|
275285
275266
|
}
|
|
275286
|
-
function
|
|
275267
|
+
function darken2(color2, amount) {
|
|
275287
275268
|
amount = amount === 0 ? 0 : amount || 10;
|
|
275288
275269
|
var hsl2 = tinycolor(color2).toHsl();
|
|
275289
275270
|
hsl2.l -= amount / 100;
|
|
@@ -285639,12 +285620,12 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
285639
285620
|
function color(format2) {
|
|
285640
285621
|
var m2, l2;
|
|
285641
285622
|
format2 = (format2 + "").trim().toLowerCase();
|
|
285642
|
-
return (m2 = reHex.exec(format2)) ? (l2 = m2[1].length, m2 = parseInt(m2[1], 16), l2 === 6 ? rgbn(m2) : l2 === 3 ? new Rgb(m2 >> 8 & 15 | m2 >> 4 & 240, m2 >> 4 & 15 | m2 & 240, (m2 & 15) << 4 | m2 & 15, 1) : l2 === 8 ? rgba$
|
|
285623
|
+
return (m2 = reHex.exec(format2)) ? (l2 = m2[1].length, m2 = parseInt(m2[1], 16), l2 === 6 ? rgbn(m2) : l2 === 3 ? new Rgb(m2 >> 8 & 15 | m2 >> 4 & 240, m2 >> 4 & 15 | m2 & 240, (m2 & 15) << 4 | m2 & 15, 1) : l2 === 8 ? rgba$2(m2 >> 24 & 255, m2 >> 16 & 255, m2 >> 8 & 255, (m2 & 255) / 255) : l2 === 4 ? rgba$2(m2 >> 12 & 15 | m2 >> 8 & 240, m2 >> 8 & 15 | m2 >> 4 & 240, m2 >> 4 & 15 | m2 & 240, ((m2 & 15) << 4 | m2 & 15) / 255) : null) : (m2 = reRgbInteger.exec(format2)) ? new Rgb(m2[1], m2[2], m2[3], 1) : (m2 = reRgbPercent.exec(format2)) ? new Rgb(m2[1] * 255 / 100, m2[2] * 255 / 100, m2[3] * 255 / 100, 1) : (m2 = reRgbaInteger.exec(format2)) ? rgba$2(m2[1], m2[2], m2[3], m2[4]) : (m2 = reRgbaPercent.exec(format2)) ? rgba$2(m2[1] * 255 / 100, m2[2] * 255 / 100, m2[3] * 255 / 100, m2[4]) : (m2 = reHslPercent.exec(format2)) ? hsla$2(m2[1], m2[2] / 100, m2[3] / 100, 1) : (m2 = reHslaPercent.exec(format2)) ? hsla$2(m2[1], m2[2] / 100, m2[3] / 100, m2[4]) : named.hasOwnProperty(format2) ? rgbn(named[format2]) : format2 === "transparent" ? new Rgb(NaN, NaN, NaN, 0) : null;
|
|
285643
285624
|
}
|
|
285644
285625
|
function rgbn(n2) {
|
|
285645
285626
|
return new Rgb(n2 >> 16 & 255, n2 >> 8 & 255, n2 & 255, 1);
|
|
285646
285627
|
}
|
|
285647
|
-
function rgba$
|
|
285628
|
+
function rgba$2(r2, g2, b2, a2) {
|
|
285648
285629
|
if (a2 <= 0)
|
|
285649
285630
|
r2 = g2 = b2 = NaN;
|
|
285650
285631
|
return new Rgb(r2, g2, b2, a2);
|
|
@@ -285657,7 +285638,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
285657
285638
|
o2 = o2.rgb();
|
|
285658
285639
|
return new Rgb(o2.r, o2.g, o2.b, o2.opacity);
|
|
285659
285640
|
}
|
|
285660
|
-
function rgb(r2, g2, b2, opacity) {
|
|
285641
|
+
function rgb$1(r2, g2, b2, opacity) {
|
|
285661
285642
|
return arguments.length === 1 ? rgbConvert(r2) : new Rgb(r2, g2, b2, opacity == null ? 1 : opacity);
|
|
285662
285643
|
}
|
|
285663
285644
|
function Rgb(r2, g2, b2, opacity) {
|
|
@@ -285666,7 +285647,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
285666
285647
|
this.b = +b2;
|
|
285667
285648
|
this.opacity = +opacity;
|
|
285668
285649
|
}
|
|
285669
|
-
define$6(Rgb, rgb, extend$2(Color$1, {
|
|
285650
|
+
define$6(Rgb, rgb$1, extend$2(Color$1, {
|
|
285670
285651
|
brighter: function(k2) {
|
|
285671
285652
|
k2 = k2 == null ? brighter : Math.pow(brighter, k2);
|
|
285672
285653
|
return new Rgb(this.r * k2, this.g * k2, this.b * k2, this.opacity);
|
|
@@ -285698,7 +285679,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
285698
285679
|
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
285699
285680
|
return (value < 16 ? "0" : "") + value.toString(16);
|
|
285700
285681
|
}
|
|
285701
|
-
function hsla$
|
|
285682
|
+
function hsla$2(h2, s2, l2, a2) {
|
|
285702
285683
|
if (a2 <= 0)
|
|
285703
285684
|
h2 = s2 = l2 = NaN;
|
|
285704
285685
|
else if (l2 <= 0 || l2 >= 1)
|
|
@@ -285732,7 +285713,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
285732
285713
|
}
|
|
285733
285714
|
return new Hsl(h2, s2, l2, o2.opacity);
|
|
285734
285715
|
}
|
|
285735
|
-
function hsl(h2, s2, l2, opacity) {
|
|
285716
|
+
function hsl$1(h2, s2, l2, opacity) {
|
|
285736
285717
|
return arguments.length === 1 ? hslConvert(h2) : new Hsl(h2, s2, l2, opacity == null ? 1 : opacity);
|
|
285737
285718
|
}
|
|
285738
285719
|
function Hsl(h2, s2, l2, opacity) {
|
|
@@ -285741,7 +285722,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
285741
285722
|
this.l = +l2;
|
|
285742
285723
|
this.opacity = +opacity;
|
|
285743
285724
|
}
|
|
285744
|
-
define$6(Hsl, hsl, extend$2(Color$1, {
|
|
285725
|
+
define$6(Hsl, hsl$1, extend$2(Color$1, {
|
|
285745
285726
|
brighter: function(k2) {
|
|
285746
285727
|
k2 = k2 == null ? brighter : Math.pow(brighter, k2);
|
|
285747
285728
|
return new Hsl(this.h, this.s, this.l * k2, this.opacity);
|
|
@@ -285793,8 +285774,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
285793
285774
|
}
|
|
285794
285775
|
const interpolateRgb = function rgbGamma(y2) {
|
|
285795
285776
|
var color2 = gamma(y2);
|
|
285796
|
-
function
|
|
285797
|
-
var r2 = color2((start2 = rgb(start2)).r, (end2 = rgb(end2)).r), g2 = color2(start2.g, end2.g), b2 = color2(start2.b, end2.b), opacity = nogamma(start2.opacity, end2.opacity);
|
|
285777
|
+
function rgb2(start2, end2) {
|
|
285778
|
+
var r2 = color2((start2 = rgb$1(start2)).r, (end2 = rgb$1(end2)).r), g2 = color2(start2.g, end2.g), b2 = color2(start2.b, end2.b), opacity = nogamma(start2.opacity, end2.opacity);
|
|
285798
285779
|
return function(t2) {
|
|
285799
285780
|
start2.r = r2(t2);
|
|
285800
285781
|
start2.g = g2(t2);
|
|
@@ -285803,8 +285784,8 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
285803
285784
|
return start2 + "";
|
|
285804
285785
|
};
|
|
285805
285786
|
}
|
|
285806
|
-
|
|
285807
|
-
return
|
|
285787
|
+
rgb2.gamma = rgbGamma;
|
|
285788
|
+
return rgb2;
|
|
285808
285789
|
}(1);
|
|
285809
285790
|
function interpolateNumber(a2, b2) {
|
|
285810
285791
|
return a2 = +a2, b2 = +b2, function(t2) {
|
|
@@ -306461,6 +306442,595 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
306461
306442
|
};
|
|
306462
306443
|
return AnonymousSubject2;
|
|
306463
306444
|
}(Subject);
|
|
306445
|
+
var PolishedError = /* @__PURE__ */ function(_Error) {
|
|
306446
|
+
_inheritsLoose$2(PolishedError2, _Error);
|
|
306447
|
+
function PolishedError2(code2) {
|
|
306448
|
+
var _this;
|
|
306449
|
+
{
|
|
306450
|
+
_this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code2 + " for more information.") || this;
|
|
306451
|
+
}
|
|
306452
|
+
return _assertThisInitialized$3(_this);
|
|
306453
|
+
}
|
|
306454
|
+
return PolishedError2;
|
|
306455
|
+
}(/* @__PURE__ */ _wrapNativeSuper$1(Error));
|
|
306456
|
+
function colorToInt(color2) {
|
|
306457
|
+
return Math.round(color2 * 255);
|
|
306458
|
+
}
|
|
306459
|
+
function convertToInt(red, green, blue) {
|
|
306460
|
+
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
306461
|
+
}
|
|
306462
|
+
function hslToRgb(hue, saturation, lightness, convert2) {
|
|
306463
|
+
if (convert2 === void 0) {
|
|
306464
|
+
convert2 = convertToInt;
|
|
306465
|
+
}
|
|
306466
|
+
if (saturation === 0) {
|
|
306467
|
+
return convert2(lightness, lightness, lightness);
|
|
306468
|
+
}
|
|
306469
|
+
var huePrime = (hue % 360 + 360) % 360 / 60;
|
|
306470
|
+
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
306471
|
+
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
306472
|
+
var red = 0;
|
|
306473
|
+
var green = 0;
|
|
306474
|
+
var blue = 0;
|
|
306475
|
+
if (huePrime >= 0 && huePrime < 1) {
|
|
306476
|
+
red = chroma;
|
|
306477
|
+
green = secondComponent;
|
|
306478
|
+
} else if (huePrime >= 1 && huePrime < 2) {
|
|
306479
|
+
red = secondComponent;
|
|
306480
|
+
green = chroma;
|
|
306481
|
+
} else if (huePrime >= 2 && huePrime < 3) {
|
|
306482
|
+
green = chroma;
|
|
306483
|
+
blue = secondComponent;
|
|
306484
|
+
} else if (huePrime >= 3 && huePrime < 4) {
|
|
306485
|
+
green = secondComponent;
|
|
306486
|
+
blue = chroma;
|
|
306487
|
+
} else if (huePrime >= 4 && huePrime < 5) {
|
|
306488
|
+
red = secondComponent;
|
|
306489
|
+
blue = chroma;
|
|
306490
|
+
} else if (huePrime >= 5 && huePrime < 6) {
|
|
306491
|
+
red = chroma;
|
|
306492
|
+
blue = secondComponent;
|
|
306493
|
+
}
|
|
306494
|
+
var lightnessModification = lightness - chroma / 2;
|
|
306495
|
+
var finalRed = red + lightnessModification;
|
|
306496
|
+
var finalGreen = green + lightnessModification;
|
|
306497
|
+
var finalBlue = blue + lightnessModification;
|
|
306498
|
+
return convert2(finalRed, finalGreen, finalBlue);
|
|
306499
|
+
}
|
|
306500
|
+
var namedColorMap = {
|
|
306501
|
+
aliceblue: "f0f8ff",
|
|
306502
|
+
antiquewhite: "faebd7",
|
|
306503
|
+
aqua: "00ffff",
|
|
306504
|
+
aquamarine: "7fffd4",
|
|
306505
|
+
azure: "f0ffff",
|
|
306506
|
+
beige: "f5f5dc",
|
|
306507
|
+
bisque: "ffe4c4",
|
|
306508
|
+
black: "000",
|
|
306509
|
+
blanchedalmond: "ffebcd",
|
|
306510
|
+
blue: "0000ff",
|
|
306511
|
+
blueviolet: "8a2be2",
|
|
306512
|
+
brown: "a52a2a",
|
|
306513
|
+
burlywood: "deb887",
|
|
306514
|
+
cadetblue: "5f9ea0",
|
|
306515
|
+
chartreuse: "7fff00",
|
|
306516
|
+
chocolate: "d2691e",
|
|
306517
|
+
coral: "ff7f50",
|
|
306518
|
+
cornflowerblue: "6495ed",
|
|
306519
|
+
cornsilk: "fff8dc",
|
|
306520
|
+
crimson: "dc143c",
|
|
306521
|
+
cyan: "00ffff",
|
|
306522
|
+
darkblue: "00008b",
|
|
306523
|
+
darkcyan: "008b8b",
|
|
306524
|
+
darkgoldenrod: "b8860b",
|
|
306525
|
+
darkgray: "a9a9a9",
|
|
306526
|
+
darkgreen: "006400",
|
|
306527
|
+
darkgrey: "a9a9a9",
|
|
306528
|
+
darkkhaki: "bdb76b",
|
|
306529
|
+
darkmagenta: "8b008b",
|
|
306530
|
+
darkolivegreen: "556b2f",
|
|
306531
|
+
darkorange: "ff8c00",
|
|
306532
|
+
darkorchid: "9932cc",
|
|
306533
|
+
darkred: "8b0000",
|
|
306534
|
+
darksalmon: "e9967a",
|
|
306535
|
+
darkseagreen: "8fbc8f",
|
|
306536
|
+
darkslateblue: "483d8b",
|
|
306537
|
+
darkslategray: "2f4f4f",
|
|
306538
|
+
darkslategrey: "2f4f4f",
|
|
306539
|
+
darkturquoise: "00ced1",
|
|
306540
|
+
darkviolet: "9400d3",
|
|
306541
|
+
deeppink: "ff1493",
|
|
306542
|
+
deepskyblue: "00bfff",
|
|
306543
|
+
dimgray: "696969",
|
|
306544
|
+
dimgrey: "696969",
|
|
306545
|
+
dodgerblue: "1e90ff",
|
|
306546
|
+
firebrick: "b22222",
|
|
306547
|
+
floralwhite: "fffaf0",
|
|
306548
|
+
forestgreen: "228b22",
|
|
306549
|
+
fuchsia: "ff00ff",
|
|
306550
|
+
gainsboro: "dcdcdc",
|
|
306551
|
+
ghostwhite: "f8f8ff",
|
|
306552
|
+
gold: "ffd700",
|
|
306553
|
+
goldenrod: "daa520",
|
|
306554
|
+
gray: "808080",
|
|
306555
|
+
green: "008000",
|
|
306556
|
+
greenyellow: "adff2f",
|
|
306557
|
+
grey: "808080",
|
|
306558
|
+
honeydew: "f0fff0",
|
|
306559
|
+
hotpink: "ff69b4",
|
|
306560
|
+
indianred: "cd5c5c",
|
|
306561
|
+
indigo: "4b0082",
|
|
306562
|
+
ivory: "fffff0",
|
|
306563
|
+
khaki: "f0e68c",
|
|
306564
|
+
lavender: "e6e6fa",
|
|
306565
|
+
lavenderblush: "fff0f5",
|
|
306566
|
+
lawngreen: "7cfc00",
|
|
306567
|
+
lemonchiffon: "fffacd",
|
|
306568
|
+
lightblue: "add8e6",
|
|
306569
|
+
lightcoral: "f08080",
|
|
306570
|
+
lightcyan: "e0ffff",
|
|
306571
|
+
lightgoldenrodyellow: "fafad2",
|
|
306572
|
+
lightgray: "d3d3d3",
|
|
306573
|
+
lightgreen: "90ee90",
|
|
306574
|
+
lightgrey: "d3d3d3",
|
|
306575
|
+
lightpink: "ffb6c1",
|
|
306576
|
+
lightsalmon: "ffa07a",
|
|
306577
|
+
lightseagreen: "20b2aa",
|
|
306578
|
+
lightskyblue: "87cefa",
|
|
306579
|
+
lightslategray: "789",
|
|
306580
|
+
lightslategrey: "789",
|
|
306581
|
+
lightsteelblue: "b0c4de",
|
|
306582
|
+
lightyellow: "ffffe0",
|
|
306583
|
+
lime: "0f0",
|
|
306584
|
+
limegreen: "32cd32",
|
|
306585
|
+
linen: "faf0e6",
|
|
306586
|
+
magenta: "f0f",
|
|
306587
|
+
maroon: "800000",
|
|
306588
|
+
mediumaquamarine: "66cdaa",
|
|
306589
|
+
mediumblue: "0000cd",
|
|
306590
|
+
mediumorchid: "ba55d3",
|
|
306591
|
+
mediumpurple: "9370db",
|
|
306592
|
+
mediumseagreen: "3cb371",
|
|
306593
|
+
mediumslateblue: "7b68ee",
|
|
306594
|
+
mediumspringgreen: "00fa9a",
|
|
306595
|
+
mediumturquoise: "48d1cc",
|
|
306596
|
+
mediumvioletred: "c71585",
|
|
306597
|
+
midnightblue: "191970",
|
|
306598
|
+
mintcream: "f5fffa",
|
|
306599
|
+
mistyrose: "ffe4e1",
|
|
306600
|
+
moccasin: "ffe4b5",
|
|
306601
|
+
navajowhite: "ffdead",
|
|
306602
|
+
navy: "000080",
|
|
306603
|
+
oldlace: "fdf5e6",
|
|
306604
|
+
olive: "808000",
|
|
306605
|
+
olivedrab: "6b8e23",
|
|
306606
|
+
orange: "ffa500",
|
|
306607
|
+
orangered: "ff4500",
|
|
306608
|
+
orchid: "da70d6",
|
|
306609
|
+
palegoldenrod: "eee8aa",
|
|
306610
|
+
palegreen: "98fb98",
|
|
306611
|
+
paleturquoise: "afeeee",
|
|
306612
|
+
palevioletred: "db7093",
|
|
306613
|
+
papayawhip: "ffefd5",
|
|
306614
|
+
peachpuff: "ffdab9",
|
|
306615
|
+
peru: "cd853f",
|
|
306616
|
+
pink: "ffc0cb",
|
|
306617
|
+
plum: "dda0dd",
|
|
306618
|
+
powderblue: "b0e0e6",
|
|
306619
|
+
purple: "800080",
|
|
306620
|
+
rebeccapurple: "639",
|
|
306621
|
+
red: "f00",
|
|
306622
|
+
rosybrown: "bc8f8f",
|
|
306623
|
+
royalblue: "4169e1",
|
|
306624
|
+
saddlebrown: "8b4513",
|
|
306625
|
+
salmon: "fa8072",
|
|
306626
|
+
sandybrown: "f4a460",
|
|
306627
|
+
seagreen: "2e8b57",
|
|
306628
|
+
seashell: "fff5ee",
|
|
306629
|
+
sienna: "a0522d",
|
|
306630
|
+
silver: "c0c0c0",
|
|
306631
|
+
skyblue: "87ceeb",
|
|
306632
|
+
slateblue: "6a5acd",
|
|
306633
|
+
slategray: "708090",
|
|
306634
|
+
slategrey: "708090",
|
|
306635
|
+
snow: "fffafa",
|
|
306636
|
+
springgreen: "00ff7f",
|
|
306637
|
+
steelblue: "4682b4",
|
|
306638
|
+
tan: "d2b48c",
|
|
306639
|
+
teal: "008080",
|
|
306640
|
+
thistle: "d8bfd8",
|
|
306641
|
+
tomato: "ff6347",
|
|
306642
|
+
turquoise: "40e0d0",
|
|
306643
|
+
violet: "ee82ee",
|
|
306644
|
+
wheat: "f5deb3",
|
|
306645
|
+
white: "fff",
|
|
306646
|
+
whitesmoke: "f5f5f5",
|
|
306647
|
+
yellow: "ff0",
|
|
306648
|
+
yellowgreen: "9acd32"
|
|
306649
|
+
};
|
|
306650
|
+
function nameToHex(color2) {
|
|
306651
|
+
if (typeof color2 !== "string")
|
|
306652
|
+
return color2;
|
|
306653
|
+
var normalizedColorName = color2.toLowerCase();
|
|
306654
|
+
return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color2;
|
|
306655
|
+
}
|
|
306656
|
+
var hexRegex = /^#[a-fA-F0-9]{6}$/;
|
|
306657
|
+
var hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;
|
|
306658
|
+
var reducedHexRegex = /^#[a-fA-F0-9]{3}$/;
|
|
306659
|
+
var reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;
|
|
306660
|
+
var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i;
|
|
306661
|
+
var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
306662
|
+
var hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
|
|
306663
|
+
var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
306664
|
+
function parseToRgb(color2) {
|
|
306665
|
+
if (typeof color2 !== "string") {
|
|
306666
|
+
throw new PolishedError(3);
|
|
306667
|
+
}
|
|
306668
|
+
var normalizedColor = nameToHex(color2);
|
|
306669
|
+
if (normalizedColor.match(hexRegex)) {
|
|
306670
|
+
return {
|
|
306671
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
306672
|
+
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
|
|
306673
|
+
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
306674
|
+
};
|
|
306675
|
+
}
|
|
306676
|
+
if (normalizedColor.match(hexRgbaRegex)) {
|
|
306677
|
+
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
306678
|
+
return {
|
|
306679
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
306680
|
+
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
|
|
306681
|
+
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16),
|
|
306682
|
+
alpha
|
|
306683
|
+
};
|
|
306684
|
+
}
|
|
306685
|
+
if (normalizedColor.match(reducedHexRegex)) {
|
|
306686
|
+
return {
|
|
306687
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
306688
|
+
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
306689
|
+
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
306690
|
+
};
|
|
306691
|
+
}
|
|
306692
|
+
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
306693
|
+
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
306694
|
+
return {
|
|
306695
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
306696
|
+
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
306697
|
+
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16),
|
|
306698
|
+
alpha: _alpha
|
|
306699
|
+
};
|
|
306700
|
+
}
|
|
306701
|
+
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
306702
|
+
if (rgbMatched) {
|
|
306703
|
+
return {
|
|
306704
|
+
red: parseInt("" + rgbMatched[1], 10),
|
|
306705
|
+
green: parseInt("" + rgbMatched[2], 10),
|
|
306706
|
+
blue: parseInt("" + rgbMatched[3], 10)
|
|
306707
|
+
};
|
|
306708
|
+
}
|
|
306709
|
+
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
306710
|
+
if (rgbaMatched) {
|
|
306711
|
+
return {
|
|
306712
|
+
red: parseInt("" + rgbaMatched[1], 10),
|
|
306713
|
+
green: parseInt("" + rgbaMatched[2], 10),
|
|
306714
|
+
blue: parseInt("" + rgbaMatched[3], 10),
|
|
306715
|
+
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
306716
|
+
};
|
|
306717
|
+
}
|
|
306718
|
+
var hslMatched = hslRegex.exec(normalizedColor);
|
|
306719
|
+
if (hslMatched) {
|
|
306720
|
+
var hue = parseInt("" + hslMatched[1], 10);
|
|
306721
|
+
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
306722
|
+
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
306723
|
+
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
|
|
306724
|
+
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
306725
|
+
if (!hslRgbMatched) {
|
|
306726
|
+
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
306727
|
+
}
|
|
306728
|
+
return {
|
|
306729
|
+
red: parseInt("" + hslRgbMatched[1], 10),
|
|
306730
|
+
green: parseInt("" + hslRgbMatched[2], 10),
|
|
306731
|
+
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
306732
|
+
};
|
|
306733
|
+
}
|
|
306734
|
+
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
306735
|
+
if (hslaMatched) {
|
|
306736
|
+
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
306737
|
+
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
306738
|
+
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
306739
|
+
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
|
|
306740
|
+
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
306741
|
+
if (!_hslRgbMatched) {
|
|
306742
|
+
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
306743
|
+
}
|
|
306744
|
+
return {
|
|
306745
|
+
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
306746
|
+
green: parseInt("" + _hslRgbMatched[2], 10),
|
|
306747
|
+
blue: parseInt("" + _hslRgbMatched[3], 10),
|
|
306748
|
+
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
306749
|
+
};
|
|
306750
|
+
}
|
|
306751
|
+
throw new PolishedError(5);
|
|
306752
|
+
}
|
|
306753
|
+
function rgbToHsl(color2) {
|
|
306754
|
+
var red = color2.red / 255;
|
|
306755
|
+
var green = color2.green / 255;
|
|
306756
|
+
var blue = color2.blue / 255;
|
|
306757
|
+
var max2 = Math.max(red, green, blue);
|
|
306758
|
+
var min2 = Math.min(red, green, blue);
|
|
306759
|
+
var lightness = (max2 + min2) / 2;
|
|
306760
|
+
if (max2 === min2) {
|
|
306761
|
+
if (color2.alpha !== void 0) {
|
|
306762
|
+
return {
|
|
306763
|
+
hue: 0,
|
|
306764
|
+
saturation: 0,
|
|
306765
|
+
lightness,
|
|
306766
|
+
alpha: color2.alpha
|
|
306767
|
+
};
|
|
306768
|
+
} else {
|
|
306769
|
+
return {
|
|
306770
|
+
hue: 0,
|
|
306771
|
+
saturation: 0,
|
|
306772
|
+
lightness
|
|
306773
|
+
};
|
|
306774
|
+
}
|
|
306775
|
+
}
|
|
306776
|
+
var hue;
|
|
306777
|
+
var delta = max2 - min2;
|
|
306778
|
+
var saturation = lightness > 0.5 ? delta / (2 - max2 - min2) : delta / (max2 + min2);
|
|
306779
|
+
switch (max2) {
|
|
306780
|
+
case red:
|
|
306781
|
+
hue = (green - blue) / delta + (green < blue ? 6 : 0);
|
|
306782
|
+
break;
|
|
306783
|
+
case green:
|
|
306784
|
+
hue = (blue - red) / delta + 2;
|
|
306785
|
+
break;
|
|
306786
|
+
default:
|
|
306787
|
+
hue = (red - green) / delta + 4;
|
|
306788
|
+
break;
|
|
306789
|
+
}
|
|
306790
|
+
hue *= 60;
|
|
306791
|
+
if (color2.alpha !== void 0) {
|
|
306792
|
+
return {
|
|
306793
|
+
hue,
|
|
306794
|
+
saturation,
|
|
306795
|
+
lightness,
|
|
306796
|
+
alpha: color2.alpha
|
|
306797
|
+
};
|
|
306798
|
+
}
|
|
306799
|
+
return {
|
|
306800
|
+
hue,
|
|
306801
|
+
saturation,
|
|
306802
|
+
lightness
|
|
306803
|
+
};
|
|
306804
|
+
}
|
|
306805
|
+
function parseToHsl(color2) {
|
|
306806
|
+
return rgbToHsl(parseToRgb(color2));
|
|
306807
|
+
}
|
|
306808
|
+
var reduceHexValue = function reduceHexValue2(value) {
|
|
306809
|
+
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
306810
|
+
return "#" + value[1] + value[3] + value[5];
|
|
306811
|
+
}
|
|
306812
|
+
return value;
|
|
306813
|
+
};
|
|
306814
|
+
var reduceHexValue$1 = reduceHexValue;
|
|
306815
|
+
function numberToHex(value) {
|
|
306816
|
+
var hex2 = value.toString(16);
|
|
306817
|
+
return hex2.length === 1 ? "0" + hex2 : hex2;
|
|
306818
|
+
}
|
|
306819
|
+
function colorToHex(color2) {
|
|
306820
|
+
return numberToHex(Math.round(color2 * 255));
|
|
306821
|
+
}
|
|
306822
|
+
function convertToHex(red, green, blue) {
|
|
306823
|
+
return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
|
|
306824
|
+
}
|
|
306825
|
+
function hslToHex(hue, saturation, lightness) {
|
|
306826
|
+
return hslToRgb(hue, saturation, lightness, convertToHex);
|
|
306827
|
+
}
|
|
306828
|
+
function hsl(value, saturation, lightness) {
|
|
306829
|
+
if (typeof value === "number" && typeof saturation === "number" && typeof lightness === "number") {
|
|
306830
|
+
return hslToHex(value, saturation, lightness);
|
|
306831
|
+
} else if (typeof value === "object" && saturation === void 0 && lightness === void 0) {
|
|
306832
|
+
return hslToHex(value.hue, value.saturation, value.lightness);
|
|
306833
|
+
}
|
|
306834
|
+
throw new PolishedError(1);
|
|
306835
|
+
}
|
|
306836
|
+
function hsla$1(value, saturation, lightness, alpha) {
|
|
306837
|
+
if (typeof value === "number" && typeof saturation === "number" && typeof lightness === "number" && typeof alpha === "number") {
|
|
306838
|
+
return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
|
|
306839
|
+
} else if (typeof value === "object" && saturation === void 0 && lightness === void 0 && alpha === void 0) {
|
|
306840
|
+
return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
|
|
306841
|
+
}
|
|
306842
|
+
throw new PolishedError(2);
|
|
306843
|
+
}
|
|
306844
|
+
function rgb(value, green, blue) {
|
|
306845
|
+
if (typeof value === "number" && typeof green === "number" && typeof blue === "number") {
|
|
306846
|
+
return reduceHexValue$1("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue));
|
|
306847
|
+
} else if (typeof value === "object" && green === void 0 && blue === void 0) {
|
|
306848
|
+
return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
306849
|
+
}
|
|
306850
|
+
throw new PolishedError(6);
|
|
306851
|
+
}
|
|
306852
|
+
function rgba$1(firstValue, secondValue, thirdValue, fourthValue) {
|
|
306853
|
+
if (typeof firstValue === "string" && typeof secondValue === "number") {
|
|
306854
|
+
var rgbValue = parseToRgb(firstValue);
|
|
306855
|
+
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
|
|
306856
|
+
} else if (typeof firstValue === "number" && typeof secondValue === "number" && typeof thirdValue === "number" && typeof fourthValue === "number") {
|
|
306857
|
+
return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
|
|
306858
|
+
} else if (typeof firstValue === "object" && secondValue === void 0 && thirdValue === void 0 && fourthValue === void 0) {
|
|
306859
|
+
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
306860
|
+
}
|
|
306861
|
+
throw new PolishedError(7);
|
|
306862
|
+
}
|
|
306863
|
+
var isRgb = function isRgb2(color2) {
|
|
306864
|
+
return typeof color2.red === "number" && typeof color2.green === "number" && typeof color2.blue === "number" && (typeof color2.alpha !== "number" || typeof color2.alpha === "undefined");
|
|
306865
|
+
};
|
|
306866
|
+
var isRgba = function isRgba2(color2) {
|
|
306867
|
+
return typeof color2.red === "number" && typeof color2.green === "number" && typeof color2.blue === "number" && typeof color2.alpha === "number";
|
|
306868
|
+
};
|
|
306869
|
+
var isHsl = function isHsl2(color2) {
|
|
306870
|
+
return typeof color2.hue === "number" && typeof color2.saturation === "number" && typeof color2.lightness === "number" && (typeof color2.alpha !== "number" || typeof color2.alpha === "undefined");
|
|
306871
|
+
};
|
|
306872
|
+
var isHsla = function isHsla2(color2) {
|
|
306873
|
+
return typeof color2.hue === "number" && typeof color2.saturation === "number" && typeof color2.lightness === "number" && typeof color2.alpha === "number";
|
|
306874
|
+
};
|
|
306875
|
+
function toColorString(color2) {
|
|
306876
|
+
if (typeof color2 !== "object")
|
|
306877
|
+
throw new PolishedError(8);
|
|
306878
|
+
if (isRgba(color2))
|
|
306879
|
+
return rgba$1(color2);
|
|
306880
|
+
if (isRgb(color2))
|
|
306881
|
+
return rgb(color2);
|
|
306882
|
+
if (isHsla(color2))
|
|
306883
|
+
return hsla$1(color2);
|
|
306884
|
+
if (isHsl(color2))
|
|
306885
|
+
return hsl(color2);
|
|
306886
|
+
throw new PolishedError(8);
|
|
306887
|
+
}
|
|
306888
|
+
function curried(f2, length, acc) {
|
|
306889
|
+
return function fn2() {
|
|
306890
|
+
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
306891
|
+
return combined.length >= length ? f2.apply(this, combined) : curried(f2, length, combined);
|
|
306892
|
+
};
|
|
306893
|
+
}
|
|
306894
|
+
function curry(f2) {
|
|
306895
|
+
return curried(f2, f2.length, []);
|
|
306896
|
+
}
|
|
306897
|
+
function adjustHue(degree, color2) {
|
|
306898
|
+
if (color2 === "transparent")
|
|
306899
|
+
return color2;
|
|
306900
|
+
var hslColor = parseToHsl(color2);
|
|
306901
|
+
return toColorString(_extends$3({}, hslColor, {
|
|
306902
|
+
hue: hslColor.hue + parseFloat(degree)
|
|
306903
|
+
}));
|
|
306904
|
+
}
|
|
306905
|
+
curry(adjustHue);
|
|
306906
|
+
function guard(lowerBoundary, upperBoundary, value) {
|
|
306907
|
+
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
306908
|
+
}
|
|
306909
|
+
function darken(amount, color2) {
|
|
306910
|
+
if (color2 === "transparent")
|
|
306911
|
+
return color2;
|
|
306912
|
+
var hslColor = parseToHsl(color2);
|
|
306913
|
+
return toColorString(_extends$3({}, hslColor, {
|
|
306914
|
+
lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))
|
|
306915
|
+
}));
|
|
306916
|
+
}
|
|
306917
|
+
curry(darken);
|
|
306918
|
+
function desaturate(amount, color2) {
|
|
306919
|
+
if (color2 === "transparent")
|
|
306920
|
+
return color2;
|
|
306921
|
+
var hslColor = parseToHsl(color2);
|
|
306922
|
+
return toColorString(_extends$3({}, hslColor, {
|
|
306923
|
+
saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))
|
|
306924
|
+
}));
|
|
306925
|
+
}
|
|
306926
|
+
curry(desaturate);
|
|
306927
|
+
function lighten(amount, color2) {
|
|
306928
|
+
if (color2 === "transparent")
|
|
306929
|
+
return color2;
|
|
306930
|
+
var hslColor = parseToHsl(color2);
|
|
306931
|
+
return toColorString(_extends$3({}, hslColor, {
|
|
306932
|
+
lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))
|
|
306933
|
+
}));
|
|
306934
|
+
}
|
|
306935
|
+
curry(lighten);
|
|
306936
|
+
function mix(weight, color2, otherColor) {
|
|
306937
|
+
if (color2 === "transparent")
|
|
306938
|
+
return otherColor;
|
|
306939
|
+
if (otherColor === "transparent")
|
|
306940
|
+
return color2;
|
|
306941
|
+
if (weight === 0)
|
|
306942
|
+
return otherColor;
|
|
306943
|
+
var parsedColor1 = parseToRgb(color2);
|
|
306944
|
+
var color1 = _extends$3({}, parsedColor1, {
|
|
306945
|
+
alpha: typeof parsedColor1.alpha === "number" ? parsedColor1.alpha : 1
|
|
306946
|
+
});
|
|
306947
|
+
var parsedColor2 = parseToRgb(otherColor);
|
|
306948
|
+
var color22 = _extends$3({}, parsedColor2, {
|
|
306949
|
+
alpha: typeof parsedColor2.alpha === "number" ? parsedColor2.alpha : 1
|
|
306950
|
+
});
|
|
306951
|
+
var alphaDelta = color1.alpha - color22.alpha;
|
|
306952
|
+
var x2 = parseFloat(weight) * 2 - 1;
|
|
306953
|
+
var y2 = x2 * alphaDelta === -1 ? x2 : x2 + alphaDelta;
|
|
306954
|
+
var z2 = 1 + x2 * alphaDelta;
|
|
306955
|
+
var weight1 = (y2 / z2 + 1) / 2;
|
|
306956
|
+
var weight2 = 1 - weight1;
|
|
306957
|
+
var mixedColor = {
|
|
306958
|
+
red: Math.floor(color1.red * weight1 + color22.red * weight2),
|
|
306959
|
+
green: Math.floor(color1.green * weight1 + color22.green * weight2),
|
|
306960
|
+
blue: Math.floor(color1.blue * weight1 + color22.blue * weight2),
|
|
306961
|
+
alpha: color1.alpha * parseFloat(weight) + color22.alpha * (1 - parseFloat(weight))
|
|
306962
|
+
};
|
|
306963
|
+
return rgba$1(mixedColor);
|
|
306964
|
+
}
|
|
306965
|
+
var curriedMix = curry(mix);
|
|
306966
|
+
var mix$1 = curriedMix;
|
|
306967
|
+
function opacify(amount, color2) {
|
|
306968
|
+
if (color2 === "transparent")
|
|
306969
|
+
return color2;
|
|
306970
|
+
var parsedColor = parseToRgb(color2);
|
|
306971
|
+
var alpha = typeof parsedColor.alpha === "number" ? parsedColor.alpha : 1;
|
|
306972
|
+
var colorWithAlpha = _extends$3({}, parsedColor, {
|
|
306973
|
+
alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
|
|
306974
|
+
});
|
|
306975
|
+
return rgba$1(colorWithAlpha);
|
|
306976
|
+
}
|
|
306977
|
+
curry(opacify);
|
|
306978
|
+
function saturate(amount, color2) {
|
|
306979
|
+
if (color2 === "transparent")
|
|
306980
|
+
return color2;
|
|
306981
|
+
var hslColor = parseToHsl(color2);
|
|
306982
|
+
return toColorString(_extends$3({}, hslColor, {
|
|
306983
|
+
saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))
|
|
306984
|
+
}));
|
|
306985
|
+
}
|
|
306986
|
+
curry(saturate);
|
|
306987
|
+
function setHue(hue, color2) {
|
|
306988
|
+
if (color2 === "transparent")
|
|
306989
|
+
return color2;
|
|
306990
|
+
return toColorString(_extends$3({}, parseToHsl(color2), {
|
|
306991
|
+
hue: parseFloat(hue)
|
|
306992
|
+
}));
|
|
306993
|
+
}
|
|
306994
|
+
curry(setHue);
|
|
306995
|
+
function setLightness(lightness, color2) {
|
|
306996
|
+
if (color2 === "transparent")
|
|
306997
|
+
return color2;
|
|
306998
|
+
return toColorString(_extends$3({}, parseToHsl(color2), {
|
|
306999
|
+
lightness: parseFloat(lightness)
|
|
307000
|
+
}));
|
|
307001
|
+
}
|
|
307002
|
+
curry(setLightness);
|
|
307003
|
+
function setSaturation(saturation, color2) {
|
|
307004
|
+
if (color2 === "transparent")
|
|
307005
|
+
return color2;
|
|
307006
|
+
return toColorString(_extends$3({}, parseToHsl(color2), {
|
|
307007
|
+
saturation: parseFloat(saturation)
|
|
307008
|
+
}));
|
|
307009
|
+
}
|
|
307010
|
+
curry(setSaturation);
|
|
307011
|
+
function shade(percentage, color2) {
|
|
307012
|
+
if (color2 === "transparent")
|
|
307013
|
+
return color2;
|
|
307014
|
+
return mix$1(parseFloat(percentage), "rgb(0, 0, 0)", color2);
|
|
307015
|
+
}
|
|
307016
|
+
curry(shade);
|
|
307017
|
+
function tint(percentage, color2) {
|
|
307018
|
+
if (color2 === "transparent")
|
|
307019
|
+
return color2;
|
|
307020
|
+
return mix$1(parseFloat(percentage), "rgb(255, 255, 255)", color2);
|
|
307021
|
+
}
|
|
307022
|
+
curry(tint);
|
|
307023
|
+
function transparentize(amount, color2) {
|
|
307024
|
+
if (color2 === "transparent")
|
|
307025
|
+
return color2;
|
|
307026
|
+
var parsedColor = parseToRgb(color2);
|
|
307027
|
+
var alpha = typeof parsedColor.alpha === "number" ? parsedColor.alpha : 1;
|
|
307028
|
+
var colorWithAlpha = _extends$3({}, parsedColor, {
|
|
307029
|
+
alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
|
|
307030
|
+
});
|
|
307031
|
+
return rgba$1(colorWithAlpha);
|
|
307032
|
+
}
|
|
307033
|
+
curry(transparentize);
|
|
306464
307034
|
const NotificationWrapper$1 = styled__default.default.div`
|
|
306465
307035
|
pointer-events: auto;
|
|
306466
307036
|
|
|
@@ -334126,7 +334696,7 @@ ${e3}`);
|
|
|
334126
334696
|
const _BitmapText = class extends Container {
|
|
334127
334697
|
constructor(text2, style2 = {}) {
|
|
334128
334698
|
super();
|
|
334129
|
-
const { align, tint, maxWidth, letterSpacing, fontName, fontSize: fontSize2 } = Object.assign({}, _BitmapText.styleDefaults, style2);
|
|
334699
|
+
const { align, tint: tint2, maxWidth, letterSpacing, fontName, fontSize: fontSize2 } = Object.assign({}, _BitmapText.styleDefaults, style2);
|
|
334130
334700
|
if (!BitmapFont.available[fontName]) {
|
|
334131
334701
|
throw new Error(`Missing BitmapFont "${fontName}"`);
|
|
334132
334702
|
}
|
|
@@ -334134,7 +334704,7 @@ ${e3}`);
|
|
|
334134
334704
|
this._textWidth = 0;
|
|
334135
334705
|
this._textHeight = 0;
|
|
334136
334706
|
this._align = align;
|
|
334137
|
-
this._tintColor = new Color(
|
|
334707
|
+
this._tintColor = new Color(tint2);
|
|
334138
334708
|
this._font = void 0;
|
|
334139
334709
|
this._fontName = fontName;
|
|
334140
334710
|
this._fontSize = fontSize2;
|
|
@@ -368349,7 +368919,7 @@ ${e3}`);
|
|
|
368349
368919
|
}
|
|
368350
368920
|
}
|
|
368351
368921
|
};
|
|
368352
|
-
var
|
|
368922
|
+
var darken2 = function darken3() {
|
|
368353
368923
|
var darkenOpacity = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : eleOpacity;
|
|
368354
368924
|
var opacity = (darkness > 0 ? darkness : -darkness) * darkenOpacity;
|
|
368355
368925
|
var c2 = darkness > 0 ? 0 : 255;
|
|
@@ -368532,7 +369102,7 @@ ${e3}`);
|
|
|
368532
369102
|
drawBorder();
|
|
368533
369103
|
drawPie(darkness !== 0 || borderWidth !== 0);
|
|
368534
369104
|
drawImages(effGhostOpacity, false);
|
|
368535
|
-
|
|
369105
|
+
darken2(effGhostOpacity);
|
|
368536
369106
|
context2.translate(-gx, -gy);
|
|
368537
369107
|
}
|
|
368538
369108
|
if (usePaths) {
|
|
@@ -368551,7 +369121,7 @@ ${e3}`);
|
|
|
368551
369121
|
drawBorder();
|
|
368552
369122
|
drawPie(darkness !== 0 || borderWidth !== 0);
|
|
368553
369123
|
drawImages(eleOpacity, false);
|
|
368554
|
-
|
|
369124
|
+
darken2();
|
|
368555
369125
|
if (usePaths) {
|
|
368556
369126
|
context2.translate(-pos.x, -pos.y);
|
|
368557
369127
|
}
|
|
@@ -382953,10 +383523,10 @@ void main(void){
|
|
|
382953
383523
|
}
|
|
382954
383524
|
}
|
|
382955
383525
|
}
|
|
382956
|
-
function createSideSymbol(style2, position2,
|
|
383526
|
+
function createSideSymbol(style2, position2, tint2, bgTint) {
|
|
382957
383527
|
var _a3, _b;
|
|
382958
383528
|
const gfx = new SmoothGraphics();
|
|
382959
|
-
const color2 =
|
|
383529
|
+
const color2 = tint2;
|
|
382960
383530
|
if ([EditorMode.RESOLVER, EditorMode.DEFAULT, EditorMode.EDGE_ENCODER].includes(style2.editorMode)) {
|
|
382961
383531
|
if (position2 === "bottom") {
|
|
382962
383532
|
return gfx;
|
|
@@ -383200,9 +383770,9 @@ void main(void){
|
|
|
383200
383770
|
static updateEdgeSymbolsStyle(edgeGfx, edgeSymbolsGfx, edgeStyle, textureCache) {
|
|
383201
383771
|
var _a3, _b, _c, _d;
|
|
383202
383772
|
const edgeTopSymbol = edgeSymbolsGfx.getChildByName(EDGE_TOP_SYMBOL);
|
|
383203
|
-
const [
|
|
383773
|
+
const [tint2] = colorToPixi(edgeStyle.color);
|
|
383204
383774
|
const [bgTint] = colorToPixi(edgeStyle.theme.colors.blue1);
|
|
383205
|
-
const topSymbolTexture = textureCache.get(createKey(EDGE_TOP_SYMBOL, edgeStyle.editorMode, edgeStyle.type,
|
|
383775
|
+
const topSymbolTexture = textureCache.get(createKey(EDGE_TOP_SYMBOL, edgeStyle.editorMode, edgeStyle.type, tint2, bgTint, (_a3 = edgeStyle.constraint) === null || _a3 === void 0 ? void 0 : _a3.type), () => createSideSymbol(edgeStyle, "top", tint2, bgTint), 1);
|
|
383206
383776
|
edgeTopSymbol.texture = topSymbolTexture;
|
|
383207
383777
|
edgeTopSymbol.position.y = edgeGfx.height / 2 - EDGE_OFFSET;
|
|
383208
383778
|
edgeTopSymbol.alpha = 1;
|
|
@@ -383215,7 +383785,7 @@ void main(void){
|
|
|
383215
383785
|
edgeCenterSymbol.rotation = -1 * edgeGfx.rotation;
|
|
383216
383786
|
}
|
|
383217
383787
|
const edgeBottomSymbol = edgeSymbolsGfx.getChildByName(EDGE_BOTTOM_SYMBOL);
|
|
383218
|
-
const bottomSymbolTexture = textureCache.get(createKey(EDGE_BOTTOM_SYMBOL, edgeStyle.editorMode, edgeStyle.type,
|
|
383788
|
+
const bottomSymbolTexture = textureCache.get(createKey(EDGE_BOTTOM_SYMBOL, edgeStyle.editorMode, edgeStyle.type, tint2, bgTint, (_c = edgeStyle.constraint) === null || _c === void 0 ? void 0 : _c.type), () => createSideSymbol(edgeStyle, "bottom", tint2, bgTint), 1);
|
|
383219
383789
|
edgeBottomSymbol.texture = bottomSymbolTexture;
|
|
383220
383790
|
edgeBottomSymbol.position.y = -1 * edgeTopSymbol.position.y;
|
|
383221
383791
|
edgeBottomSymbol.alpha = 1;
|