@teselagen/ove 0.7.30-beta.1 → 0.7.30-beta.2

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/index.umd.js CHANGED
@@ -857,7 +857,7 @@ var __async = (__this, __arguments, generator) => {
857
857
  return Math.abs(a2 - b3) <= tolerance;
858
858
  }
859
859
  __name(approxEqual, "approxEqual");
860
- function clamp$4(val2, min2, max2) {
860
+ function clamp$5(val2, min2, max2) {
861
861
  if (val2 == null) {
862
862
  return val2;
863
863
  }
@@ -866,7 +866,7 @@ var __async = (__this, __arguments, generator) => {
866
866
  }
867
867
  return Math.min(Math.max(val2, min2), max2);
868
868
  }
869
- __name(clamp$4, "clamp$4");
869
+ __name(clamp$5, "clamp$5");
870
870
  function countDecimalPlaces(num) {
871
871
  if (!isFinite(num)) {
872
872
  return 0;
@@ -908,17 +908,17 @@ var __async = (__this, __arguments, generator) => {
908
908
  return child.trim().length > 0 ? reactExports.createElement(tagName, {}, child) : void 0;
909
909
  } else if (typeof child === "number" || typeof child.type === "symbol" || Array.isArray(child)) {
910
910
  return reactExports.createElement(tagName, {}, child);
911
- } else if (isReactElement(child)) {
911
+ } else if (isReactElement$1(child)) {
912
912
  return child;
913
913
  } else {
914
914
  return void 0;
915
915
  }
916
916
  }
917
917
  __name(ensureElement, "ensureElement");
918
- function isReactElement(child) {
918
+ function isReactElement$1(child) {
919
919
  return typeof child === "object" && typeof child.type !== "undefined" && typeof child.props !== "undefined";
920
920
  }
921
- __name(isReactElement, "isReactElement");
921
+ __name(isReactElement$1, "isReactElement$1");
922
922
  function isElementOfType(element2, ComponentType) {
923
923
  return element2 != null && element2.type != null && element2.type.displayName != null && element2.type.displayName === ComponentType.displayName;
924
924
  }
@@ -1001,8 +1001,8 @@ var __async = (__this, __arguments, generator) => {
1001
1001
  return window.cancelAnimationFrame(handle2);
1002
1002
  };
1003
1003
  };
1004
- AbstractComponent22.prototype.setTimeout = function(callback2, timeout) {
1005
- var handle2 = window.setTimeout(callback2, timeout);
1004
+ AbstractComponent22.prototype.setTimeout = function(callback2, timeout2) {
1005
+ var handle2 = window.setTimeout(callback2, timeout2);
1006
1006
  this.timeoutIds.push(handle2);
1007
1007
  return function() {
1008
1008
  return window.clearTimeout(handle2);
@@ -1061,8 +1061,8 @@ var __async = (__this, __arguments, generator) => {
1061
1061
  return window.cancelAnimationFrame(handle2);
1062
1062
  };
1063
1063
  };
1064
- AbstractPureComponent22.prototype.setTimeout = function(callback2, timeout) {
1065
- var handle2 = window.setTimeout(callback2, timeout);
1064
+ AbstractPureComponent22.prototype.setTimeout = function(callback2, timeout2) {
1065
+ var handle2 = window.setTimeout(callback2, timeout2);
1066
1066
  this.timeoutIds.push(handle2);
1067
1067
  return function() {
1068
1068
  return window.clearTimeout(handle2);
@@ -11800,7 +11800,7 @@ var __async = (__this, __arguments, generator) => {
11800
11800
  Popper$1.Utils = (typeof window !== "undefined" ? window : global).PopperUtils;
11801
11801
  Popper$1.placements = placements$1;
11802
11802
  Popper$1.Defaults = Defaults;
11803
- var lib$a = { exports: {} };
11803
+ var lib$9 = { exports: {} };
11804
11804
  var implementation = { exports: {} };
11805
11805
  var propTypes$1 = { exports: {} };
11806
11806
  var ReactPropTypesSecret_1;
@@ -12079,10 +12079,10 @@ var __async = (__this, __arguments, generator) => {
12079
12079
  return implementation.exports;
12080
12080
  }
12081
12081
  __name(requireImplementation, "requireImplementation");
12082
- var hasRequiredLib$a;
12083
- function requireLib$a() {
12084
- if (hasRequiredLib$a) return lib$a.exports;
12085
- hasRequiredLib$a = 1;
12082
+ var hasRequiredLib$9;
12083
+ function requireLib$9() {
12084
+ if (hasRequiredLib$9) return lib$9.exports;
12085
+ hasRequiredLib$9 = 1;
12086
12086
  (function(module2, exports3) {
12087
12087
  exports3.__esModule = true;
12088
12088
  var _react = requireReact();
@@ -12095,11 +12095,11 @@ var __async = (__this, __arguments, generator) => {
12095
12095
  __name(_interopRequireDefault, "_interopRequireDefault");
12096
12096
  exports3.default = _react2.default.createContext || _implementation2.default;
12097
12097
  module2.exports = exports3["default"];
12098
- })(lib$a, lib$a.exports);
12099
- return lib$a.exports;
12098
+ })(lib$9, lib$9.exports);
12099
+ return lib$9.exports;
12100
12100
  }
12101
- __name(requireLib$a, "requireLib$a");
12102
- var libExports$4 = requireLib$a();
12101
+ __name(requireLib$9, "requireLib$9");
12102
+ var libExports$4 = requireLib$9();
12103
12103
  const createContext$1 = /* @__PURE__ */ getDefaultExportFromCjs(libExports$4);
12104
12104
  var ManagerReferenceNodeContext = createContext$1();
12105
12105
  var ManagerReferenceNodeSetterContext = createContext$1();
@@ -13888,20 +13888,20 @@ var __async = (__this, __arguments, generator) => {
13888
13888
  cache$2.set(target, zeroBoxes);
13889
13889
  return zeroBoxes;
13890
13890
  }
13891
- var cs = getComputedStyle(target);
13891
+ var cs2 = getComputedStyle(target);
13892
13892
  var svg2 = isSVG$1(target) && target.ownerSVGElement && target.getBBox();
13893
- var removePadding = !IE && cs.boxSizing === "border-box";
13894
- var switchSizes = verticalRegexp.test(cs.writingMode || "");
13895
- var canScrollVertically = !svg2 && scrollRegexp.test(cs.overflowY || "");
13896
- var canScrollHorizontally = !svg2 && scrollRegexp.test(cs.overflowX || "");
13897
- var paddingTop2 = svg2 ? 0 : parseDimension(cs.paddingTop);
13898
- var paddingRight2 = svg2 ? 0 : parseDimension(cs.paddingRight);
13899
- var paddingBottom2 = svg2 ? 0 : parseDimension(cs.paddingBottom);
13900
- var paddingLeft2 = svg2 ? 0 : parseDimension(cs.paddingLeft);
13901
- var borderTop = svg2 ? 0 : parseDimension(cs.borderTopWidth);
13902
- var borderRight = svg2 ? 0 : parseDimension(cs.borderRightWidth);
13903
- var borderBottom = svg2 ? 0 : parseDimension(cs.borderBottomWidth);
13904
- var borderLeft = svg2 ? 0 : parseDimension(cs.borderLeftWidth);
13893
+ var removePadding = !IE && cs2.boxSizing === "border-box";
13894
+ var switchSizes = verticalRegexp.test(cs2.writingMode || "");
13895
+ var canScrollVertically = !svg2 && scrollRegexp.test(cs2.overflowY || "");
13896
+ var canScrollHorizontally = !svg2 && scrollRegexp.test(cs2.overflowX || "");
13897
+ var paddingTop2 = svg2 ? 0 : parseDimension(cs2.paddingTop);
13898
+ var paddingRight2 = svg2 ? 0 : parseDimension(cs2.paddingRight);
13899
+ var paddingBottom2 = svg2 ? 0 : parseDimension(cs2.paddingBottom);
13900
+ var paddingLeft2 = svg2 ? 0 : parseDimension(cs2.paddingLeft);
13901
+ var borderTop = svg2 ? 0 : parseDimension(cs2.borderTopWidth);
13902
+ var borderRight = svg2 ? 0 : parseDimension(cs2.borderRightWidth);
13903
+ var borderBottom = svg2 ? 0 : parseDimension(cs2.borderBottomWidth);
13904
+ var borderLeft = svg2 ? 0 : parseDimension(cs2.borderLeftWidth);
13905
13905
  var horizontalPadding = paddingLeft2 + paddingRight2;
13906
13906
  var verticalPadding = paddingTop2 + paddingBottom2;
13907
13907
  var horizontalBorderArea = borderLeft + borderRight;
@@ -13910,8 +13910,8 @@ var __async = (__this, __arguments, generator) => {
13910
13910
  var verticalScrollbarThickness = !canScrollVertically ? 0 : target.offsetWidth - horizontalBorderArea - target.clientWidth;
13911
13911
  var widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0;
13912
13912
  var heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0;
13913
- var contentWidth = svg2 ? svg2.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness;
13914
- var contentHeight = svg2 ? svg2.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness;
13913
+ var contentWidth = svg2 ? svg2.width : parseDimension(cs2.width) - widthReduction - verticalScrollbarThickness;
13914
+ var contentHeight = svg2 ? svg2.height : parseDimension(cs2.height) - heightReduction - horizontalScrollbarThickness;
13915
13915
  var borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea;
13916
13916
  var borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea;
13917
13917
  var boxes = freeze({
@@ -14062,11 +14062,11 @@ var __async = (__this, __arguments, generator) => {
14062
14062
  "blur",
14063
14063
  "focus"
14064
14064
  ];
14065
- var time$1 = /* @__PURE__ */ __name(function(timeout) {
14066
- if (timeout === void 0) {
14067
- timeout = 0;
14065
+ var time$1 = /* @__PURE__ */ __name(function(timeout2) {
14066
+ if (timeout2 === void 0) {
14067
+ timeout2 = 0;
14068
14068
  }
14069
- return Date.now() + timeout;
14069
+ return Date.now() + timeout2;
14070
14070
  }, "time$1");
14071
14071
  var scheduled = false;
14072
14072
  var Scheduler = function() {
@@ -14078,30 +14078,30 @@ var __async = (__this, __arguments, generator) => {
14078
14078
  };
14079
14079
  }
14080
14080
  __name(Scheduler2, "Scheduler");
14081
- Scheduler2.prototype.run = function(timeout) {
14081
+ Scheduler2.prototype.run = function(timeout2) {
14082
14082
  var _this = this;
14083
- if (timeout === void 0) {
14084
- timeout = CATCH_PERIOD;
14083
+ if (timeout2 === void 0) {
14084
+ timeout2 = CATCH_PERIOD;
14085
14085
  }
14086
14086
  if (scheduled) {
14087
14087
  return;
14088
14088
  }
14089
14089
  scheduled = true;
14090
- var until = time$1(timeout);
14090
+ var until = time$1(timeout2);
14091
14091
  queueResizeObserver(function() {
14092
14092
  var elementsHaveResized = false;
14093
14093
  try {
14094
14094
  elementsHaveResized = process$1();
14095
14095
  } finally {
14096
14096
  scheduled = false;
14097
- timeout = until - time$1();
14097
+ timeout2 = until - time$1();
14098
14098
  if (!isWatching()) {
14099
14099
  return;
14100
14100
  }
14101
14101
  if (elementsHaveResized) {
14102
14102
  _this.run(1e3);
14103
- } else if (timeout > 0) {
14104
- _this.run(timeout);
14103
+ } else if (timeout2 > 0) {
14104
+ _this.run(timeout2);
14105
14105
  } else {
14106
14106
  _this.start();
14107
14107
  }
@@ -14818,14 +14818,14 @@ var __async = (__this, __arguments, generator) => {
14818
14818
  order: 900
14819
14819
  } });
14820
14820
  };
14821
- Popover2.prototype.setOpenState = function(isOpen2, e2, timeout) {
14821
+ Popover2.prototype.setOpenState = function(isOpen2, e2, timeout2) {
14822
14822
  var _this = this;
14823
14823
  var _a2, _b2, _c2, _d2, _e;
14824
14824
  (_a2 = this.cancelOpenTimeout) === null || _a2 === void 0 ? void 0 : _a2.call(this);
14825
- if (timeout !== void 0 && timeout > 0) {
14825
+ if (timeout2 !== void 0 && timeout2 > 0) {
14826
14826
  this.cancelOpenTimeout = this.setTimeout(function() {
14827
14827
  return _this.setOpenState(isOpen2, e2);
14828
- }, timeout);
14828
+ }, timeout2);
14829
14829
  } else {
14830
14830
  if (this.props.isOpen == null) {
14831
14831
  this.setState({ isOpen: isOpen2 });
@@ -16242,7 +16242,7 @@ var __async = (__this, __arguments, generator) => {
16242
16242
  var size2 = this.getSize();
16243
16243
  var classes = classNames$1(SPINNER, intentClass(intent), (_a2 = {}, _a2[SPINNER_NO_SPIN] = value != null, _a2), className);
16244
16244
  var strokeWidth = Math.min(MIN_STROKE_WIDTH, STROKE_WIDTH * SpinnerSize.LARGE / size2);
16245
- var strokeOffset = PATH_LENGTH - PATH_LENGTH * (value == null ? 0.25 : clamp$4(value, 0, 1));
16245
+ var strokeOffset = PATH_LENGTH - PATH_LENGTH * (value == null ? 0.25 : clamp$5(value, 0, 1));
16246
16246
  return reactExports.createElement(tagName, {
16247
16247
  className: classes,
16248
16248
  role: "progressbar"
@@ -16978,7 +16978,7 @@ var __async = (__this, __arguments, generator) => {
16978
16978
  scrollHeight_1 += lineHeight2;
16979
16979
  }
16980
16980
  if (lineHeight2 > 0) {
16981
- scrollHeight_1 = clamp$4(scrollHeight_1, minLines * lineHeight2, maxLines * lineHeight2);
16981
+ scrollHeight_1 = clamp$5(scrollHeight_1, minLines * lineHeight2, maxLines * lineHeight2);
16982
16982
  }
16983
16983
  scrollHeight_1 = Math.max(scrollHeight_1, getFontSize(this.valueElement) + 1, getLineHeight(parentElement_1));
16984
16984
  scrollWidth += Browser$1.isInternetExplorer() ? BUFFER_WIDTH_IE : BUFFER_WIDTH_DEFAULT;
@@ -17429,7 +17429,7 @@ var __async = (__this, __arguments, generator) => {
17429
17429
  function clampValue(value, min2, max2) {
17430
17430
  var adjustedMin = min2 != null ? min2 : -Infinity;
17431
17431
  var adjustedMax = max2 != null ? max2 : Infinity;
17432
- return clamp$4(value, adjustedMin, adjustedMax);
17432
+ return clamp$5(value, adjustedMin, adjustedMax);
17433
17433
  }
17434
17434
  __name(clampValue, "clampValue");
17435
17435
  function getValueOrEmptyValue(value) {
@@ -18556,7 +18556,7 @@ var __async = (__this, __arguments, generator) => {
18556
18556
  return newValue;
18557
18557
  };
18558
18558
  Handle2.prototype.clamp = function(value) {
18559
- return clamp$4(value, this.props.min, this.props.max);
18559
+ return clamp$5(value, this.props.min, this.props.max);
18560
18560
  };
18561
18561
  Handle2.prototype.getHandleElementCenterPixel = function(handleElement) {
18562
18562
  var _a2 = this.getHandleMidpointAndOffset(handleElement), handleMidpoint = _a2.handleMidpoint, handleOffset = _a2.handleOffset;
@@ -18840,7 +18840,7 @@ var __async = (__this, __arguments, generator) => {
18840
18840
  return values2;
18841
18841
  };
18842
18842
  MultiSlider2.prototype.getOffsetRatio = function(value) {
18843
- return clamp$4((value - this.props.min) * this.state.tickSizeRatio, 0, 1);
18843
+ return clamp$5((value - this.props.min) * this.state.tickSizeRatio, 0, 1);
18844
18844
  };
18845
18845
  MultiSlider2.prototype.getTrackIntent = function(start2, end2) {
18846
18846
  if (!this.props.showTrackFill) {
@@ -19399,7 +19399,7 @@ var __async = (__this, __arguments, generator) => {
19399
19399
  while (index2 > 0 && index2 < values2.length && !values2[index2]) {
19400
19400
  index2 += direction2;
19401
19401
  }
19402
- return clamp$4(index2, 0, values2.length);
19402
+ return clamp$5(index2, 0, values2.length);
19403
19403
  };
19404
19404
  TagInput2.prototype.getValues = function(inputValue) {
19405
19405
  var separator = this.props.separator;
@@ -21147,10 +21147,10 @@ var __async = (__this, __arguments, generator) => {
21147
21147
  if (ms === 0) {
21148
21148
  return fn5;
21149
21149
  }
21150
- var timeout;
21150
+ var timeout2;
21151
21151
  return function(arg) {
21152
- clearTimeout(timeout);
21153
- timeout = setTimeout(function() {
21152
+ clearTimeout(timeout2);
21153
+ timeout2 = setTimeout(function() {
21154
21154
  fn5(arg);
21155
21155
  }, ms);
21156
21156
  };
@@ -24089,19 +24089,15 @@ var __async = (__this, __arguments, generator) => {
24089
24089
  function noop$9() {
24090
24090
  }
24091
24091
  __name(noop$9, "noop$9");
24092
- let nanoid = /* @__PURE__ */ __name((size2 = 21) => crypto.getRandomValues(new Uint8Array(size2)).reduce((id2, byte) => {
24093
- byte &= 63;
24094
- if (byte < 36) {
24095
- id2 += byte.toString(36);
24096
- } else if (byte < 62) {
24097
- id2 += (byte - 26).toString(36).toUpperCase();
24098
- } else if (byte > 62) {
24099
- id2 += "-";
24100
- } else {
24101
- id2 += "_";
24092
+ const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
24093
+ let nanoid = /* @__PURE__ */ __name((size2 = 21) => {
24094
+ let id2 = "";
24095
+ let bytes = crypto.getRandomValues(new Uint8Array(size2 |= 0));
24096
+ while (size2--) {
24097
+ id2 += urlAlphabet[bytes[size2] & 63];
24102
24098
  }
24103
24099
  return id2;
24104
- }, ""), "nanoid");
24100
+ }, "nanoid");
24105
24101
  var papaparse_min$1 = { exports: {} };
24106
24102
  /* @license
24107
24103
  Papa Parse
@@ -31135,7 +31131,7 @@ ${latestSubscriptionCallbackError.current.stack}
31135
31131
  }, "checkSubmit");
31136
31132
  function createReduxForm(structure$1) {
31137
31133
  var deepEqual2 = structure$1.deepEqual, empty2 = structure$1.empty, getIn2 = structure$1.getIn, setIn2 = structure$1.setIn, keys2 = structure$1.keys, fromJS = structure$1.fromJS, toJS2 = structure$1.toJS;
31138
- var isValid2 = createIsValid(structure$1);
31134
+ var isValid = createIsValid(structure$1);
31139
31135
  return function(initialConfig) {
31140
31136
  var config = _extends$j({
31141
31137
  touchOnBlur: true,
@@ -31661,8 +31657,8 @@ ${latestSubscriptionCallbackError.current.stack}
31661
31657
  var syncErrors = getIn2(formState, "syncErrors") || structure.empty;
31662
31658
  var syncWarnings = getIn2(formState, "syncWarnings") || structure.empty;
31663
31659
  var registeredFields = getIn2(formState, "registeredFields");
31664
- var valid2 = isValid2(form2, getFormState, false)(state2);
31665
- var validExceptSubmit = isValid2(form2, getFormState, true)(state2);
31660
+ var valid2 = isValid(form2, getFormState, false)(state2);
31661
+ var validExceptSubmit = isValid(form2, getFormState, true)(state2);
31666
31662
  var anyTouched = !!getIn2(formState, "anyTouched");
31667
31663
  var submitting = !!getIn2(formState, "submitting");
31668
31664
  var submitFailed = !!getIn2(formState, "submitFailed");
@@ -34152,7 +34148,7 @@ ${latestSubscriptionCallbackError.current.stack}
34152
34148
  return number2;
34153
34149
  }
34154
34150
  __name(baseClamp, "baseClamp");
34155
- function clamp$3(number2, lower, upper) {
34151
+ function clamp$4(number2, lower, upper) {
34156
34152
  if (upper === void 0) {
34157
34153
  upper = lower;
34158
34154
  lower = void 0;
@@ -34167,7 +34163,7 @@ ${latestSubscriptionCallbackError.current.stack}
34167
34163
  }
34168
34164
  return baseClamp(toNumber(number2), lower, upper);
34169
34165
  }
34170
- __name(clamp$3, "clamp$3");
34166
+ __name(clamp$4, "clamp$4");
34171
34167
  function stackClear() {
34172
34168
  this.__data__ = new ListCache();
34173
34169
  this.size = 0;
@@ -35942,15 +35938,15 @@ ${latestSubscriptionCallbackError.current.stack}
35942
35938
  return object2 == null ? true : baseUnset(object2, path2);
35943
35939
  }
35944
35940
  __name(unset, "unset");
35945
- var lib$9 = {};
35946
- var hasRequiredLib$9;
35947
- function requireLib$9() {
35948
- if (hasRequiredLib$9) return lib$9;
35949
- hasRequiredLib$9 = 1;
35950
- Object.defineProperty(lib$9, "__esModule", {
35941
+ var lib$8 = {};
35942
+ var hasRequiredLib$8;
35943
+ function requireLib$8() {
35944
+ if (hasRequiredLib$8) return lib$8;
35945
+ hasRequiredLib$8 = 1;
35946
+ Object.defineProperty(lib$8, "__esModule", {
35951
35947
  value: true
35952
35948
  });
35953
- lib$9.createChangeEmitter = /* @__PURE__ */ __name(function createChangeEmitter() {
35949
+ lib$8.createChangeEmitter = /* @__PURE__ */ __name(function createChangeEmitter() {
35954
35950
  var currentListeners = [];
35955
35951
  var nextListeners = currentListeners;
35956
35952
  function ensureCanMutateNextListeners() {
@@ -35990,10 +35986,10 @@ ${latestSubscriptionCallbackError.current.stack}
35990
35986
  emit
35991
35987
  };
35992
35988
  }, "createChangeEmitter");
35993
- return lib$9;
35989
+ return lib$8;
35994
35990
  }
35995
- __name(requireLib$9, "requireLib$9");
35996
- requireLib$9();
35991
+ __name(requireLib$8, "requireLib$8");
35992
+ requireLib$8();
35997
35993
  function symbolObservablePonyfill(root2) {
35998
35994
  var result;
35999
35995
  var Symbol2 = root2.Symbol;
@@ -43730,11 +43726,14 @@ ${latestSubscriptionCallbackError.current.stack}
43730
43726
  }
43731
43727
  __name(isEntityClean, "isEntityClean");
43732
43728
  const getIdOrCodeOrIndex = /* @__PURE__ */ __name((record, rowIndex) => {
43733
- if (record.id || record.id === 0) {
43729
+ if ("id" in record && (record.id || record.id === 0)) {
43734
43730
  return record.id;
43735
- } else if (record.code) {
43731
+ } else if ("code" in record && record.code) {
43736
43732
  return record.code;
43737
43733
  } else {
43734
+ if (rowIndex === void 0 || rowIndex === null) {
43735
+ throw new Error("id, code, or rowIndex must be provided");
43736
+ }
43738
43737
  return rowIndex;
43739
43738
  }
43740
43739
  }, "getIdOrCodeOrIndex");
@@ -43816,17 +43815,22 @@ ${latestSubscriptionCallbackError.current.stack}
43816
43815
  });
43817
43816
  return fieldPathToField;
43818
43817
  }, "getFieldPathToField");
43819
- const formatPasteData = /* @__PURE__ */ __name(({ schema: schema2, newVal: newVal2, path: path2 }) => {
43818
+ const formatPasteData = /* @__PURE__ */ __name(({
43819
+ schema: schema2,
43820
+ newVal: newVal2,
43821
+ path: path2
43822
+ }) => {
43820
43823
  const pathToField = getFieldPathToField(schema2);
43821
43824
  const column = pathToField[path2];
43822
43825
  if (column.type === "genericSelect") {
43823
- if ((newVal2 == null ? void 0 : newVal2.__genSelCol) === path2) {
43824
- newVal2 = newVal2.__strVal;
43826
+ const value = newVal2;
43827
+ if (value.__genSelCol === path2) {
43828
+ newVal2 = value.__strVal;
43825
43829
  } else {
43826
43830
  newVal2 = void 0;
43827
43831
  }
43828
43832
  } else {
43829
- newVal2 = Object.hasOwn(newVal2, "__strVal") ? newVal2.__strVal : newVal2;
43833
+ newVal2 = typeof newVal2 === "object" && newVal2 !== null && "__strVal" in newVal2 ? newVal2.__strVal : newVal2;
43830
43834
  }
43831
43835
  return newVal2;
43832
43836
  }, "formatPasteData");
@@ -43851,14 +43855,15 @@ ${latestSubscriptionCallbackError.current.stack}
43851
43855
  return /[0-9]+$/.test(str);
43852
43856
  }, "endsWithNumber");
43853
43857
  const getNumberStrAtEnd = /* @__PURE__ */ __name((str) => {
43858
+ var _a2;
43854
43859
  if (endsWithNumber(str)) {
43855
- return str.match(/[0-9]+$/)[0];
43860
+ return (_a2 = str.match(/[0-9]+$/)) == null ? void 0 : _a2[0];
43856
43861
  }
43857
43862
  return null;
43858
43863
  }, "getNumberStrAtEnd");
43859
43864
  const stripNumberAtEnd = /* @__PURE__ */ __name((str) => {
43860
43865
  var _a2;
43861
- return (_a2 = str == null ? void 0 : str.replace) == null ? void 0 : _a2.call(str, getNumberStrAtEnd(str), "");
43866
+ return (_a2 = str == null ? void 0 : str.replace) == null ? void 0 : _a2.call(str, getNumberStrAtEnd(str) || "", "");
43862
43867
  }, "stripNumberAtEnd");
43863
43868
  const getAllRows = /* @__PURE__ */ __name((tableRef) => {
43864
43869
  var _a2, _b2;
@@ -43895,7 +43900,7 @@ ${latestSubscriptionCallbackError.current.stack}
43895
43900
  }, "getNewEntToSelect");
43896
43901
  const getLastSelectedEntity = /* @__PURE__ */ __name((idMap) => {
43897
43902
  let lastSelectedEnt;
43898
- let latestTime;
43903
+ let latestTime = null;
43899
43904
  Object.values(idMap).forEach(({ time: time2, entity }) => {
43900
43905
  if (!latestTime || time2 > latestTime) {
43901
43906
  lastSelectedEnt = entity;
@@ -43935,9 +43940,9 @@ ${latestSubscriptionCallbackError.current.stack}
43935
43940
  };
43936
43941
  }, "getCellInfo");
43937
43942
  const getCellCopyText = /* @__PURE__ */ __name((cellWrapper) => {
43938
- const text2 = cellWrapper && cellWrapper.getAttribute("data-copy-text");
43939
- const jsonText = cellWrapper && cellWrapper.getAttribute("data-copy-json");
43940
- const textContent = text2 || cellWrapper.textContent || "";
43943
+ const text2 = cellWrapper == null ? void 0 : cellWrapper.getAttribute("data-copy-text");
43944
+ const jsonText = cellWrapper == null ? void 0 : cellWrapper.getAttribute("data-copy-json");
43945
+ const textContent = text2 || (cellWrapper == null ? void 0 : cellWrapper.textContent) || "";
43941
43946
  return [textContent, jsonText];
43942
43947
  }, "getCellCopyText");
43943
43948
  const getRowCopyText = /* @__PURE__ */ __name((rowEl, { specificColumn } = {}) => {
@@ -44245,7 +44250,7 @@ ${latestSubscriptionCallbackError.current.stack}
44245
44250
  if (noSelect || isEntityDisabled(entity)) return;
44246
44251
  const rowId = getIdOrCodeOrIndex(entity, rowInfo.index);
44247
44252
  if (rowId === void 0) return;
44248
- const ctrl = e2.metaKey || e2.ctrlKey || withCheckboxes && !e2.shiftKey;
44253
+ const ctrl2 = e2.metaKey || e2.ctrlKey || withCheckboxes && !e2.shiftKey;
44249
44254
  const oldIdMap = reduxFormSelectedEntityIdMap || {};
44250
44255
  const rowSelected = oldIdMap[rowId];
44251
44256
  let newIdMap = {
@@ -44257,12 +44262,12 @@ ${latestSubscriptionCallbackError.current.stack}
44257
44262
  if (isSingleSelect) {
44258
44263
  if (rowSelected) newIdMap = {};
44259
44264
  } else if (rowSelected && e2.shiftKey) return;
44260
- else if (rowSelected && ctrl) {
44265
+ else if (rowSelected && ctrl2) {
44261
44266
  newIdMap = __spreadValues({}, oldIdMap);
44262
44267
  delete newIdMap[rowId];
44263
44268
  } else if (rowSelected) {
44264
44269
  newIdMap = {};
44265
- } else if (ctrl) {
44270
+ } else if (ctrl2) {
44266
44271
  newIdMap = __spreadValues(__spreadValues({}, oldIdMap), newIdMap);
44267
44272
  } else if (e2.shiftKey && !isEmpty$1(oldIdMap)) {
44268
44273
  newIdMap = {
@@ -45784,23 +45789,23 @@ ${latestSubscriptionCallbackError.current.stack}
45784
45789
  return parse$5;
45785
45790
  }
45786
45791
  __name(requireParse, "requireParse");
45787
- var lib$8;
45788
- var hasRequiredLib$8;
45789
- function requireLib$8() {
45790
- if (hasRequiredLib$8) return lib$8;
45791
- hasRequiredLib$8 = 1;
45792
+ var lib$7;
45793
+ var hasRequiredLib$7;
45794
+ function requireLib$7() {
45795
+ if (hasRequiredLib$7) return lib$7;
45796
+ hasRequiredLib$7 = 1;
45792
45797
  var stringify2 = /* @__PURE__ */ requireStringify();
45793
45798
  var parse2 = /* @__PURE__ */ requireParse();
45794
45799
  var formats2 = /* @__PURE__ */ requireFormats();
45795
- lib$8 = {
45800
+ lib$7 = {
45796
45801
  formats: formats2,
45797
45802
  parse: parse2,
45798
45803
  stringify: stringify2
45799
45804
  };
45800
- return lib$8;
45805
+ return lib$7;
45801
45806
  }
45802
- __name(requireLib$8, "requireLib$8");
45803
- var libExports$3 = /* @__PURE__ */ requireLib$8();
45807
+ __name(requireLib$7, "requireLib$7");
45808
+ var libExports$3 = /* @__PURE__ */ requireLib$7();
45804
45809
  const queryString = /* @__PURE__ */ getDefaultExportFromCjs(libExports$3);
45805
45810
  function tableQueryParamsToHasuraClauses({
45806
45811
  page,
@@ -46293,8 +46298,9 @@ ${latestSubscriptionCallbackError.current.stack}
46293
46298
  if (newWhere) {
46294
46299
  Object.assign(where, newWhere);
46295
46300
  }
46296
- } else if (typeof additionalFilter === "object")
46301
+ } else if (typeof additionalFilter === "object" && additionalFilter !== null) {
46297
46302
  where._and.push(additionalFilter);
46303
+ }
46298
46304
  }
46299
46305
  __name(initializeHasuraWhereAndFilter, "initializeHasuraWhereAndFilter");
46300
46306
  const defaultPageSizes = [5, 10, 15, 25, 50, 100, 200, 400];
@@ -46802,7 +46808,7 @@ ${latestSubscriptionCallbackError.current.stack}
46802
46808
  }
46803
46809
  ));
46804
46810
  }, "PagingTool");
46805
- var lib$7 = {};
46811
+ var lib$6 = {};
46806
46812
  var flattenNames = {};
46807
46813
  var isString_1;
46808
46814
  var hasRequiredIsString;
@@ -47692,14 +47698,14 @@ ${latestSubscriptionCallbackError.current.stack}
47692
47698
  return loop;
47693
47699
  }
47694
47700
  __name(requireLoop, "requireLoop");
47695
- var hasRequiredLib$7;
47696
- function requireLib$7() {
47697
- if (hasRequiredLib$7) return lib$7;
47698
- hasRequiredLib$7 = 1;
47699
- Object.defineProperty(lib$7, "__esModule", {
47701
+ var hasRequiredLib$6;
47702
+ function requireLib$6() {
47703
+ if (hasRequiredLib$6) return lib$6;
47704
+ hasRequiredLib$6 = 1;
47705
+ Object.defineProperty(lib$6, "__esModule", {
47700
47706
  value: true
47701
47707
  });
47702
- lib$7.ReactCSS = lib$7.loop = lib$7.handleActive = lib$7.handleHover = lib$7.hover = void 0;
47708
+ lib$6.ReactCSS = lib$6.loop = lib$6.handleActive = lib$6.handleHover = lib$6.hover = void 0;
47703
47709
  var _flattenNames = requireFlattenNames();
47704
47710
  var _flattenNames2 = _interopRequireDefault(_flattenNames);
47705
47711
  var _mergeClasses = requireMergeClasses();
@@ -47716,11 +47722,11 @@ ${latestSubscriptionCallbackError.current.stack}
47716
47722
  return obj && obj.__esModule ? obj : { default: obj };
47717
47723
  }
47718
47724
  __name(_interopRequireDefault, "_interopRequireDefault");
47719
- lib$7.hover = _hover3.default;
47720
- lib$7.handleHover = _hover3.default;
47721
- lib$7.handleActive = _active2.default;
47722
- lib$7.loop = _loop3.default;
47723
- var ReactCSS = lib$7.ReactCSS = /* @__PURE__ */ __name(function ReactCSS2(classes) {
47725
+ lib$6.hover = _hover3.default;
47726
+ lib$6.handleHover = _hover3.default;
47727
+ lib$6.handleActive = _active2.default;
47728
+ lib$6.loop = _loop3.default;
47729
+ var ReactCSS = lib$6.ReactCSS = /* @__PURE__ */ __name(function ReactCSS2(classes) {
47724
47730
  for (var _len = arguments.length, activations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
47725
47731
  activations[_key - 1] = arguments[_key];
47726
47732
  }
@@ -47728,11 +47734,11 @@ ${latestSubscriptionCallbackError.current.stack}
47728
47734
  var merged = (0, _mergeClasses2.default)(classes, activeNames);
47729
47735
  return (0, _autoprefix2.default)(merged);
47730
47736
  }, "ReactCSS");
47731
- lib$7.default = ReactCSS;
47732
- return lib$7;
47737
+ lib$6.default = ReactCSS;
47738
+ return lib$6;
47733
47739
  }
47734
- __name(requireLib$7, "requireLib$7");
47735
- var libExports$2 = requireLib$7();
47740
+ __name(requireLib$6, "requireLib$6");
47741
+ var libExports$2 = requireLib$6();
47736
47742
  const reactCSS = /* @__PURE__ */ getDefaultExportFromCjs(libExports$2);
47737
47743
  var calculateChange$2 = /* @__PURE__ */ __name(function calculateChange2(e2, hsl2, direction2, initialA, container) {
47738
47744
  var containerWidth = container.clientWidth;
@@ -48691,7 +48697,7 @@ ${latestSubscriptionCallbackError.current.stack}
48691
48697
  isLight: /* @__PURE__ */ __name(function isLight() {
48692
48698
  return !this.isDark();
48693
48699
  }, "isLight"),
48694
- isValid: /* @__PURE__ */ __name(function isValid2() {
48700
+ isValid: /* @__PURE__ */ __name(function isValid() {
48695
48701
  return this._ok;
48696
48702
  }, "isValid"),
48697
48703
  getOriginalInput: /* @__PURE__ */ __name(function getOriginalInput() {
@@ -56311,10 +56317,10 @@ ${latestSubscriptionCallbackError.current.stack}
56311
56317
  return DayPicker$1;
56312
56318
  }
56313
56319
  __name(requireDayPicker, "requireDayPicker");
56314
- var hasRequiredBuild$1;
56315
- function requireBuild$1() {
56316
- if (hasRequiredBuild$1) return build;
56317
- hasRequiredBuild$1 = 1;
56320
+ var hasRequiredBuild;
56321
+ function requireBuild() {
56322
+ if (hasRequiredBuild) return build;
56323
+ hasRequiredBuild = 1;
56318
56324
  (function(exports3) {
56319
56325
  Object.defineProperty(exports3, "__esModule", {
56320
56326
  value: true
@@ -56354,8 +56360,8 @@ ${latestSubscriptionCallbackError.current.stack}
56354
56360
  })(build);
56355
56361
  return build;
56356
56362
  }
56357
- __name(requireBuild$1, "requireBuild$1");
56358
- var buildExports = requireBuild$1();
56363
+ __name(requireBuild, "requireBuild");
56364
+ var buildExports = requireBuild();
56359
56365
  const DayPicker = /* @__PURE__ */ getDefaultExportFromCjs(buildExports);
56360
56366
  var ns = "[Blueprint]";
56361
56367
  var DATEPICKER_DEFAULT_VALUE_INVALID = ns + " <DatePicker> defaultValue must be within minDate and maxDate bounds.";
@@ -56803,9 +56809,9 @@ ${latestSubscriptionCallbackError.current.stack}
56803
56809
  };
56804
56810
  TimePicker2.prototype.renderInput = function(className, unit, value) {
56805
56811
  var _a2;
56806
- var isValid2 = isTimeUnitValid(unit, parseInt(value, 10));
56812
+ var isValid = isTimeUnitValid(unit, parseInt(value, 10));
56807
56813
  var isHour = unit === TimeUnit.HOUR_12 || unit === TimeUnit.HOUR_24;
56808
- return reactExports.createElement("input", { className: classNames$1(TIMEPICKER_INPUT, (_a2 = {}, _a2[intentClass(Intent.DANGER)] = !isValid2, _a2), className), onBlur: this.getInputBlurHandler(unit), onChange: this.getInputChangeHandler(unit), onFocus: this.getInputFocusHandler(unit), onKeyDown: this.getInputKeyDownHandler(unit), onKeyUp: this.getInputKeyUpHandler(unit), value, disabled: this.props.disabled, autoFocus: isHour && this.props.autoFocus });
56814
+ return reactExports.createElement("input", { className: classNames$1(TIMEPICKER_INPUT, (_a2 = {}, _a2[intentClass(Intent.DANGER)] = !isValid, _a2), className), onBlur: this.getInputBlurHandler(unit), onChange: this.getInputChangeHandler(unit), onFocus: this.getInputFocusHandler(unit), onKeyDown: this.getInputKeyDownHandler(unit), onKeyUp: this.getInputKeyUpHandler(unit), value, disabled: this.props.disabled, autoFocus: isHour && this.props.autoFocus });
56809
56815
  };
56810
56816
  TimePicker2.prototype.maybeRenderAmPm = function() {
56811
56817
  if (!this.props.useAmPm) {
@@ -59502,10 +59508,10 @@ ${latestSubscriptionCallbackError.current.stack}
59502
59508
  this.setState({ selectedItem: this.props.selectedItem });
59503
59509
  }
59504
59510
  if (this.state.isOpen === false && prevState.isOpen === true) {
59505
- var timeout = (_g = (_f = this.props.popoverProps) === null || _f === void 0 ? void 0 : _f.transitionDuration) !== null && _g !== void 0 ? _g : Popover.defaultProps.transitionDuration;
59511
+ var timeout2 = (_g = (_f = this.props.popoverProps) === null || _f === void 0 ? void 0 : _f.transitionDuration) !== null && _g !== void 0 ? _g : Popover.defaultProps.transitionDuration;
59506
59512
  setTimeout(function() {
59507
59513
  return _this.maybeResetActiveItemToSelectedItem();
59508
- }, timeout);
59514
+ }, timeout2);
59509
59515
  }
59510
59516
  if (this.state.isOpen && !prevState.isOpen && this.queryList != null) {
59511
59517
  this.queryList.scrollActiveItemIntoView();
@@ -59569,11 +59575,20 @@ ${latestSubscriptionCallbackError.current.stack}
59569
59575
  __name(requireFuzzysearch, "requireFuzzysearch");
59570
59576
  var fuzzysearchExports = requireFuzzysearch();
59571
59577
  const fuzzysearch = /* @__PURE__ */ getDefaultExportFromCjs(fuzzysearchExports);
59578
+ const isReactElement = /* @__PURE__ */ __name((el) => {
59579
+ if (el) {
59580
+ const newEl = el;
59581
+ if (newEl.props && newEl.props.children) {
59582
+ return true;
59583
+ }
59584
+ }
59585
+ return false;
59586
+ }, "isReactElement");
59572
59587
  function getTextFromEl(el, options = {}) {
59573
59588
  const { lowerCase: lowerCase2 } = options;
59574
59589
  if (React.isValidElement(el)) {
59575
- return el && el.props && el.props.children ? (el.props.children.reduce ? el.props.children : [el.props.children]).reduce((acc, child) => {
59576
- if (child && child.props && child.props.children) {
59590
+ return el && el.props && el.props.children ? (Array.isArray(el.props.children) ? el.props.children : [el.props.children]).reduce((acc, child) => {
59591
+ if (isReactElement(child)) {
59577
59592
  acc += getTextFromEl(child);
59578
59593
  } else if (typeof child === "string") {
59579
59594
  if (lowerCase2) {
@@ -59591,1795 +59606,1578 @@ ${latestSubscriptionCallbackError.current.stack}
59591
59606
  }
59592
59607
  }
59593
59608
  __name(getTextFromEl, "getTextFromEl");
59594
- var colorString = { exports: {} };
59595
- var colorName$1;
59596
- var hasRequiredColorName$1;
59597
- function requireColorName$1() {
59598
- if (hasRequiredColorName$1) return colorName$1;
59599
- hasRequiredColorName$1 = 1;
59600
- colorName$1 = {
59601
- "aliceblue": [240, 248, 255],
59602
- "antiquewhite": [250, 235, 215],
59603
- "aqua": [0, 255, 255],
59604
- "aquamarine": [127, 255, 212],
59605
- "azure": [240, 255, 255],
59606
- "beige": [245, 245, 220],
59607
- "bisque": [255, 228, 196],
59608
- "black": [0, 0, 0],
59609
- "blanchedalmond": [255, 235, 205],
59610
- "blue": [0, 0, 255],
59611
- "blueviolet": [138, 43, 226],
59612
- "brown": [165, 42, 42],
59613
- "burlywood": [222, 184, 135],
59614
- "cadetblue": [95, 158, 160],
59615
- "chartreuse": [127, 255, 0],
59616
- "chocolate": [210, 105, 30],
59617
- "coral": [255, 127, 80],
59618
- "cornflowerblue": [100, 149, 237],
59619
- "cornsilk": [255, 248, 220],
59620
- "crimson": [220, 20, 60],
59621
- "cyan": [0, 255, 255],
59622
- "darkblue": [0, 0, 139],
59623
- "darkcyan": [0, 139, 139],
59624
- "darkgoldenrod": [184, 134, 11],
59625
- "darkgray": [169, 169, 169],
59626
- "darkgreen": [0, 100, 0],
59627
- "darkgrey": [169, 169, 169],
59628
- "darkkhaki": [189, 183, 107],
59629
- "darkmagenta": [139, 0, 139],
59630
- "darkolivegreen": [85, 107, 47],
59631
- "darkorange": [255, 140, 0],
59632
- "darkorchid": [153, 50, 204],
59633
- "darkred": [139, 0, 0],
59634
- "darksalmon": [233, 150, 122],
59635
- "darkseagreen": [143, 188, 143],
59636
- "darkslateblue": [72, 61, 139],
59637
- "darkslategray": [47, 79, 79],
59638
- "darkslategrey": [47, 79, 79],
59639
- "darkturquoise": [0, 206, 209],
59640
- "darkviolet": [148, 0, 211],
59641
- "deeppink": [255, 20, 147],
59642
- "deepskyblue": [0, 191, 255],
59643
- "dimgray": [105, 105, 105],
59644
- "dimgrey": [105, 105, 105],
59645
- "dodgerblue": [30, 144, 255],
59646
- "firebrick": [178, 34, 34],
59647
- "floralwhite": [255, 250, 240],
59648
- "forestgreen": [34, 139, 34],
59649
- "fuchsia": [255, 0, 255],
59650
- "gainsboro": [220, 220, 220],
59651
- "ghostwhite": [248, 248, 255],
59652
- "gold": [255, 215, 0],
59653
- "goldenrod": [218, 165, 32],
59654
- "gray": [128, 128, 128],
59655
- "green": [0, 128, 0],
59656
- "greenyellow": [173, 255, 47],
59657
- "grey": [128, 128, 128],
59658
- "honeydew": [240, 255, 240],
59659
- "hotpink": [255, 105, 180],
59660
- "indianred": [205, 92, 92],
59661
- "indigo": [75, 0, 130],
59662
- "ivory": [255, 255, 240],
59663
- "khaki": [240, 230, 140],
59664
- "lavender": [230, 230, 250],
59665
- "lavenderblush": [255, 240, 245],
59666
- "lawngreen": [124, 252, 0],
59667
- "lemonchiffon": [255, 250, 205],
59668
- "lightblue": [173, 216, 230],
59669
- "lightcoral": [240, 128, 128],
59670
- "lightcyan": [224, 255, 255],
59671
- "lightgoldenrodyellow": [250, 250, 210],
59672
- "lightgray": [211, 211, 211],
59673
- "lightgreen": [144, 238, 144],
59674
- "lightgrey": [211, 211, 211],
59675
- "lightpink": [255, 182, 193],
59676
- "lightsalmon": [255, 160, 122],
59677
- "lightseagreen": [32, 178, 170],
59678
- "lightskyblue": [135, 206, 250],
59679
- "lightslategray": [119, 136, 153],
59680
- "lightslategrey": [119, 136, 153],
59681
- "lightsteelblue": [176, 196, 222],
59682
- "lightyellow": [255, 255, 224],
59683
- "lime": [0, 255, 0],
59684
- "limegreen": [50, 205, 50],
59685
- "linen": [250, 240, 230],
59686
- "magenta": [255, 0, 255],
59687
- "maroon": [128, 0, 0],
59688
- "mediumaquamarine": [102, 205, 170],
59689
- "mediumblue": [0, 0, 205],
59690
- "mediumorchid": [186, 85, 211],
59691
- "mediumpurple": [147, 112, 219],
59692
- "mediumseagreen": [60, 179, 113],
59693
- "mediumslateblue": [123, 104, 238],
59694
- "mediumspringgreen": [0, 250, 154],
59695
- "mediumturquoise": [72, 209, 204],
59696
- "mediumvioletred": [199, 21, 133],
59697
- "midnightblue": [25, 25, 112],
59698
- "mintcream": [245, 255, 250],
59699
- "mistyrose": [255, 228, 225],
59700
- "moccasin": [255, 228, 181],
59701
- "navajowhite": [255, 222, 173],
59702
- "navy": [0, 0, 128],
59703
- "oldlace": [253, 245, 230],
59704
- "olive": [128, 128, 0],
59705
- "olivedrab": [107, 142, 35],
59706
- "orange": [255, 165, 0],
59707
- "orangered": [255, 69, 0],
59708
- "orchid": [218, 112, 214],
59709
- "palegoldenrod": [238, 232, 170],
59710
- "palegreen": [152, 251, 152],
59711
- "paleturquoise": [175, 238, 238],
59712
- "palevioletred": [219, 112, 147],
59713
- "papayawhip": [255, 239, 213],
59714
- "peachpuff": [255, 218, 185],
59715
- "peru": [205, 133, 63],
59716
- "pink": [255, 192, 203],
59717
- "plum": [221, 160, 221],
59718
- "powderblue": [176, 224, 230],
59719
- "purple": [128, 0, 128],
59720
- "rebeccapurple": [102, 51, 153],
59721
- "red": [255, 0, 0],
59722
- "rosybrown": [188, 143, 143],
59723
- "royalblue": [65, 105, 225],
59724
- "saddlebrown": [139, 69, 19],
59725
- "salmon": [250, 128, 114],
59726
- "sandybrown": [244, 164, 96],
59727
- "seagreen": [46, 139, 87],
59728
- "seashell": [255, 245, 238],
59729
- "sienna": [160, 82, 45],
59730
- "silver": [192, 192, 192],
59731
- "skyblue": [135, 206, 235],
59732
- "slateblue": [106, 90, 205],
59733
- "slategray": [112, 128, 144],
59734
- "slategrey": [112, 128, 144],
59735
- "snow": [255, 250, 250],
59736
- "springgreen": [0, 255, 127],
59737
- "steelblue": [70, 130, 180],
59738
- "tan": [210, 180, 140],
59739
- "teal": [0, 128, 128],
59740
- "thistle": [216, 191, 216],
59741
- "tomato": [255, 99, 71],
59742
- "turquoise": [64, 224, 208],
59743
- "violet": [238, 130, 238],
59744
- "wheat": [245, 222, 179],
59745
- "white": [255, 255, 255],
59746
- "whitesmoke": [245, 245, 245],
59747
- "yellow": [255, 255, 0],
59748
- "yellowgreen": [154, 205, 50]
59749
- };
59750
- return colorName$1;
59751
- }
59752
- __name(requireColorName$1, "requireColorName$1");
59753
- var simpleSwizzle = { exports: {} };
59754
- var isArrayish;
59755
- var hasRequiredIsArrayish;
59756
- function requireIsArrayish() {
59757
- if (hasRequiredIsArrayish) return isArrayish;
59758
- hasRequiredIsArrayish = 1;
59759
- isArrayish = /* @__PURE__ */ __name(function isArrayish2(obj) {
59760
- if (!obj || typeof obj === "string") {
59761
- return false;
59609
+ const cssKeywords = {
59610
+ aliceblue: [240, 248, 255],
59611
+ antiquewhite: [250, 235, 215],
59612
+ aqua: [0, 255, 255],
59613
+ aquamarine: [127, 255, 212],
59614
+ azure: [240, 255, 255],
59615
+ beige: [245, 245, 220],
59616
+ bisque: [255, 228, 196],
59617
+ black: [0, 0, 0],
59618
+ blanchedalmond: [255, 235, 205],
59619
+ blue: [0, 0, 255],
59620
+ blueviolet: [138, 43, 226],
59621
+ brown: [165, 42, 42],
59622
+ burlywood: [222, 184, 135],
59623
+ cadetblue: [95, 158, 160],
59624
+ chartreuse: [127, 255, 0],
59625
+ chocolate: [210, 105, 30],
59626
+ coral: [255, 127, 80],
59627
+ cornflowerblue: [100, 149, 237],
59628
+ cornsilk: [255, 248, 220],
59629
+ crimson: [220, 20, 60],
59630
+ cyan: [0, 255, 255],
59631
+ darkblue: [0, 0, 139],
59632
+ darkcyan: [0, 139, 139],
59633
+ darkgoldenrod: [184, 134, 11],
59634
+ darkgray: [169, 169, 169],
59635
+ darkgreen: [0, 100, 0],
59636
+ darkgrey: [169, 169, 169],
59637
+ darkkhaki: [189, 183, 107],
59638
+ darkmagenta: [139, 0, 139],
59639
+ darkolivegreen: [85, 107, 47],
59640
+ darkorange: [255, 140, 0],
59641
+ darkorchid: [153, 50, 204],
59642
+ darkred: [139, 0, 0],
59643
+ darksalmon: [233, 150, 122],
59644
+ darkseagreen: [143, 188, 143],
59645
+ darkslateblue: [72, 61, 139],
59646
+ darkslategray: [47, 79, 79],
59647
+ darkslategrey: [47, 79, 79],
59648
+ darkturquoise: [0, 206, 209],
59649
+ darkviolet: [148, 0, 211],
59650
+ deeppink: [255, 20, 147],
59651
+ deepskyblue: [0, 191, 255],
59652
+ dimgray: [105, 105, 105],
59653
+ dimgrey: [105, 105, 105],
59654
+ dodgerblue: [30, 144, 255],
59655
+ firebrick: [178, 34, 34],
59656
+ floralwhite: [255, 250, 240],
59657
+ forestgreen: [34, 139, 34],
59658
+ fuchsia: [255, 0, 255],
59659
+ gainsboro: [220, 220, 220],
59660
+ ghostwhite: [248, 248, 255],
59661
+ gold: [255, 215, 0],
59662
+ goldenrod: [218, 165, 32],
59663
+ gray: [128, 128, 128],
59664
+ green: [0, 128, 0],
59665
+ greenyellow: [173, 255, 47],
59666
+ grey: [128, 128, 128],
59667
+ honeydew: [240, 255, 240],
59668
+ hotpink: [255, 105, 180],
59669
+ indianred: [205, 92, 92],
59670
+ indigo: [75, 0, 130],
59671
+ ivory: [255, 255, 240],
59672
+ khaki: [240, 230, 140],
59673
+ lavender: [230, 230, 250],
59674
+ lavenderblush: [255, 240, 245],
59675
+ lawngreen: [124, 252, 0],
59676
+ lemonchiffon: [255, 250, 205],
59677
+ lightblue: [173, 216, 230],
59678
+ lightcoral: [240, 128, 128],
59679
+ lightcyan: [224, 255, 255],
59680
+ lightgoldenrodyellow: [250, 250, 210],
59681
+ lightgray: [211, 211, 211],
59682
+ lightgreen: [144, 238, 144],
59683
+ lightgrey: [211, 211, 211],
59684
+ lightpink: [255, 182, 193],
59685
+ lightsalmon: [255, 160, 122],
59686
+ lightseagreen: [32, 178, 170],
59687
+ lightskyblue: [135, 206, 250],
59688
+ lightslategray: [119, 136, 153],
59689
+ lightslategrey: [119, 136, 153],
59690
+ lightsteelblue: [176, 196, 222],
59691
+ lightyellow: [255, 255, 224],
59692
+ lime: [0, 255, 0],
59693
+ limegreen: [50, 205, 50],
59694
+ linen: [250, 240, 230],
59695
+ magenta: [255, 0, 255],
59696
+ maroon: [128, 0, 0],
59697
+ mediumaquamarine: [102, 205, 170],
59698
+ mediumblue: [0, 0, 205],
59699
+ mediumorchid: [186, 85, 211],
59700
+ mediumpurple: [147, 112, 219],
59701
+ mediumseagreen: [60, 179, 113],
59702
+ mediumslateblue: [123, 104, 238],
59703
+ mediumspringgreen: [0, 250, 154],
59704
+ mediumturquoise: [72, 209, 204],
59705
+ mediumvioletred: [199, 21, 133],
59706
+ midnightblue: [25, 25, 112],
59707
+ mintcream: [245, 255, 250],
59708
+ mistyrose: [255, 228, 225],
59709
+ moccasin: [255, 228, 181],
59710
+ navajowhite: [255, 222, 173],
59711
+ navy: [0, 0, 128],
59712
+ oldlace: [253, 245, 230],
59713
+ olive: [128, 128, 0],
59714
+ olivedrab: [107, 142, 35],
59715
+ orange: [255, 165, 0],
59716
+ orangered: [255, 69, 0],
59717
+ orchid: [218, 112, 214],
59718
+ palegoldenrod: [238, 232, 170],
59719
+ palegreen: [152, 251, 152],
59720
+ paleturquoise: [175, 238, 238],
59721
+ palevioletred: [219, 112, 147],
59722
+ papayawhip: [255, 239, 213],
59723
+ peachpuff: [255, 218, 185],
59724
+ peru: [205, 133, 63],
59725
+ pink: [255, 192, 203],
59726
+ plum: [221, 160, 221],
59727
+ powderblue: [176, 224, 230],
59728
+ purple: [128, 0, 128],
59729
+ rebeccapurple: [102, 51, 153],
59730
+ red: [255, 0, 0],
59731
+ rosybrown: [188, 143, 143],
59732
+ royalblue: [65, 105, 225],
59733
+ saddlebrown: [139, 69, 19],
59734
+ salmon: [250, 128, 114],
59735
+ sandybrown: [244, 164, 96],
59736
+ seagreen: [46, 139, 87],
59737
+ seashell: [255, 245, 238],
59738
+ sienna: [160, 82, 45],
59739
+ silver: [192, 192, 192],
59740
+ skyblue: [135, 206, 235],
59741
+ slateblue: [106, 90, 205],
59742
+ slategray: [112, 128, 144],
59743
+ slategrey: [112, 128, 144],
59744
+ snow: [255, 250, 250],
59745
+ springgreen: [0, 255, 127],
59746
+ steelblue: [70, 130, 180],
59747
+ tan: [210, 180, 140],
59748
+ teal: [0, 128, 128],
59749
+ thistle: [216, 191, 216],
59750
+ tomato: [255, 99, 71],
59751
+ turquoise: [64, 224, 208],
59752
+ violet: [238, 130, 238],
59753
+ wheat: [245, 222, 179],
59754
+ white: [255, 255, 255],
59755
+ whitesmoke: [245, 245, 245],
59756
+ yellow: [255, 255, 0],
59757
+ yellowgreen: [154, 205, 50]
59758
+ };
59759
+ const reverseNames = /* @__PURE__ */ Object.create(null);
59760
+ for (const name2 in cssKeywords) {
59761
+ if (Object.hasOwn(cssKeywords, name2)) {
59762
+ reverseNames[cssKeywords[name2]] = name2;
59763
+ }
59764
+ }
59765
+ const cs = {
59766
+ to: {},
59767
+ get: {}
59768
+ };
59769
+ cs.get = function(string2) {
59770
+ const prefix2 = string2.slice(0, 3).toLowerCase();
59771
+ let value;
59772
+ let model;
59773
+ switch (prefix2) {
59774
+ case "hsl": {
59775
+ value = cs.get.hsl(string2);
59776
+ model = "hsl";
59777
+ break;
59762
59778
  }
59763
- return obj instanceof Array || Array.isArray(obj) || obj.length >= 0 && (obj.splice instanceof Function || Object.getOwnPropertyDescriptor(obj, obj.length - 1) && obj.constructor.name !== "String");
59764
- }, "isArrayish");
59765
- return isArrayish;
59766
- }
59767
- __name(requireIsArrayish, "requireIsArrayish");
59768
- var hasRequiredSimpleSwizzle;
59769
- function requireSimpleSwizzle() {
59770
- if (hasRequiredSimpleSwizzle) return simpleSwizzle.exports;
59771
- hasRequiredSimpleSwizzle = 1;
59772
- var isArrayish2 = requireIsArrayish();
59773
- var concat = Array.prototype.concat;
59774
- var slice = Array.prototype.slice;
59775
- var swizzle = simpleSwizzle.exports = /* @__PURE__ */ __name(function swizzle2(args) {
59776
- var results = [];
59777
- for (var i2 = 0, len = args.length; i2 < len; i2++) {
59778
- var arg = args[i2];
59779
- if (isArrayish2(arg)) {
59780
- results = concat.call(results, slice.call(arg));
59781
- } else {
59782
- results.push(arg);
59783
- }
59779
+ case "hwb": {
59780
+ value = cs.get.hwb(string2);
59781
+ model = "hwb";
59782
+ break;
59784
59783
  }
59785
- return results;
59786
- }, "swizzle");
59787
- swizzle.wrap = function(fn2) {
59788
- return function() {
59789
- return fn2(swizzle(arguments));
59790
- };
59791
- };
59792
- return simpleSwizzle.exports;
59793
- }
59794
- __name(requireSimpleSwizzle, "requireSimpleSwizzle");
59795
- var hasRequiredColorString;
59796
- function requireColorString() {
59797
- if (hasRequiredColorString) return colorString.exports;
59798
- hasRequiredColorString = 1;
59799
- var colorNames = requireColorName$1();
59800
- var swizzle = requireSimpleSwizzle();
59801
- var hasOwnProperty2 = Object.hasOwnProperty;
59802
- var reverseNames = /* @__PURE__ */ Object.create(null);
59803
- for (var name2 in colorNames) {
59804
- if (hasOwnProperty2.call(colorNames, name2)) {
59805
- reverseNames[colorNames[name2]] = name2;
59806
- }
59807
- }
59808
- var cs = colorString.exports = {
59809
- to: {},
59810
- get: {}
59811
- };
59812
- cs.get = function(string2) {
59813
- var prefix2 = string2.substring(0, 3).toLowerCase();
59814
- var val2;
59815
- var model;
59816
- switch (prefix2) {
59817
- case "hsl":
59818
- val2 = cs.get.hsl(string2);
59819
- model = "hsl";
59820
- break;
59821
- case "hwb":
59822
- val2 = cs.get.hwb(string2);
59823
- model = "hwb";
59824
- break;
59825
- default:
59826
- val2 = cs.get.rgb(string2);
59827
- model = "rgb";
59828
- break;
59784
+ default: {
59785
+ value = cs.get.rgb(string2);
59786
+ model = "rgb";
59787
+ break;
59829
59788
  }
59830
- if (!val2) {
59831
- return null;
59789
+ }
59790
+ if (!value) {
59791
+ return null;
59792
+ }
59793
+ return { model, value };
59794
+ };
59795
+ cs.get.rgb = function(string2) {
59796
+ if (!string2) {
59797
+ return null;
59798
+ }
59799
+ const abbr = /^#([a-f\d]{3,4})$/i;
59800
+ const hex = /^#([a-f\d]{6})([a-f\d]{2})?$/i;
59801
+ const rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/;
59802
+ const per = /^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/;
59803
+ const keyword = /^(\w+)$/;
59804
+ let rgb2 = [0, 0, 0, 1];
59805
+ let match;
59806
+ let i2;
59807
+ let hexAlpha;
59808
+ if (match = string2.match(hex)) {
59809
+ hexAlpha = match[2];
59810
+ match = match[1];
59811
+ for (i2 = 0; i2 < 3; i2++) {
59812
+ const i22 = i2 * 2;
59813
+ rgb2[i2] = Number.parseInt(match.slice(i22, i22 + 2), 16);
59832
59814
  }
59833
- return { model, value: val2 };
59834
- };
59835
- cs.get.rgb = function(string2) {
59836
- if (!string2) {
59837
- return null;
59815
+ if (hexAlpha) {
59816
+ rgb2[3] = Number.parseInt(hexAlpha, 16) / 255;
59838
59817
  }
59839
- var abbr = /^#([a-f0-9]{3,4})$/i;
59840
- var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;
59841
- var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
59842
- var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
59843
- var keyword = /^(\w+)$/;
59844
- var rgb2 = [0, 0, 0, 1];
59845
- var match;
59846
- var i2;
59847
- var hexAlpha;
59848
- if (match = string2.match(hex)) {
59849
- hexAlpha = match[2];
59850
- match = match[1];
59851
- for (i2 = 0; i2 < 3; i2++) {
59852
- var i22 = i2 * 2;
59853
- rgb2[i2] = parseInt(match.slice(i22, i22 + 2), 16);
59854
- }
59855
- if (hexAlpha) {
59856
- rgb2[3] = parseInt(hexAlpha, 16) / 255;
59857
- }
59858
- } else if (match = string2.match(abbr)) {
59859
- match = match[1];
59860
- hexAlpha = match[3];
59861
- for (i2 = 0; i2 < 3; i2++) {
59862
- rgb2[i2] = parseInt(match[i2] + match[i2], 16);
59863
- }
59864
- if (hexAlpha) {
59865
- rgb2[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;
59866
- }
59867
- } else if (match = string2.match(rgba)) {
59868
- for (i2 = 0; i2 < 3; i2++) {
59869
- rgb2[i2] = parseInt(match[i2 + 1], 0);
59870
- }
59871
- if (match[4]) {
59872
- if (match[5]) {
59873
- rgb2[3] = parseFloat(match[4]) * 0.01;
59874
- } else {
59875
- rgb2[3] = parseFloat(match[4]);
59876
- }
59877
- }
59878
- } else if (match = string2.match(per)) {
59879
- for (i2 = 0; i2 < 3; i2++) {
59880
- rgb2[i2] = Math.round(parseFloat(match[i2 + 1]) * 2.55);
59881
- }
59882
- if (match[4]) {
59883
- if (match[5]) {
59884
- rgb2[3] = parseFloat(match[4]) * 0.01;
59885
- } else {
59886
- rgb2[3] = parseFloat(match[4]);
59887
- }
59888
- }
59889
- } else if (match = string2.match(keyword)) {
59890
- if (match[1] === "transparent") {
59891
- return [0, 0, 0, 0];
59892
- }
59893
- if (!hasOwnProperty2.call(colorNames, match[1])) {
59894
- return null;
59895
- }
59896
- rgb2 = colorNames[match[1]];
59897
- rgb2[3] = 1;
59898
- return rgb2;
59899
- } else {
59900
- return null;
59818
+ } else if (match = string2.match(abbr)) {
59819
+ match = match[1];
59820
+ hexAlpha = match[3];
59821
+ for (i2 = 0; i2 < 3; i2++) {
59822
+ rgb2[i2] = Number.parseInt(match[i2] + match[i2], 16);
59901
59823
  }
59824
+ if (hexAlpha) {
59825
+ rgb2[3] = Number.parseInt(hexAlpha + hexAlpha, 16) / 255;
59826
+ }
59827
+ } else if (match = string2.match(rgba)) {
59902
59828
  for (i2 = 0; i2 < 3; i2++) {
59903
- rgb2[i2] = clamp2(rgb2[i2], 0, 255);
59829
+ rgb2[i2] = Number.parseInt(match[i2 + 1], 10);
59904
59830
  }
59905
- rgb2[3] = clamp2(rgb2[3], 0, 1);
59906
- return rgb2;
59907
- };
59908
- cs.get.hsl = function(string2) {
59909
- if (!string2) {
59910
- return null;
59831
+ if (match[4]) {
59832
+ rgb2[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
59911
59833
  }
59912
- var hsl2 = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
59913
- var match = string2.match(hsl2);
59914
- if (match) {
59915
- var alpha = parseFloat(match[4]);
59916
- var h2 = (parseFloat(match[1]) % 360 + 360) % 360;
59917
- var s2 = clamp2(parseFloat(match[2]), 0, 100);
59918
- var l2 = clamp2(parseFloat(match[3]), 0, 100);
59919
- var a2 = clamp2(isNaN(alpha) ? 1 : alpha, 0, 1);
59920
- return [h2, s2, l2, a2];
59834
+ } else if (match = string2.match(per)) {
59835
+ for (i2 = 0; i2 < 3; i2++) {
59836
+ rgb2[i2] = Math.round(Number.parseFloat(match[i2 + 1]) * 2.55);
59921
59837
  }
59922
- return null;
59923
- };
59924
- cs.get.hwb = function(string2) {
59925
- if (!string2) {
59926
- return null;
59838
+ if (match[4]) {
59839
+ rgb2[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
59927
59840
  }
59928
- var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
59929
- var match = string2.match(hwb);
59930
- if (match) {
59931
- var alpha = parseFloat(match[4]);
59932
- var h2 = (parseFloat(match[1]) % 360 + 360) % 360;
59933
- var w2 = clamp2(parseFloat(match[2]), 0, 100);
59934
- var b3 = clamp2(parseFloat(match[3]), 0, 100);
59935
- var a2 = clamp2(isNaN(alpha) ? 1 : alpha, 0, 1);
59936
- return [h2, w2, b3, a2];
59841
+ } else if (match = string2.match(keyword)) {
59842
+ if (match[1] === "transparent") {
59843
+ return [0, 0, 0, 0];
59937
59844
  }
59845
+ if (!Object.hasOwn(cssKeywords, match[1])) {
59846
+ return null;
59847
+ }
59848
+ rgb2 = cssKeywords[match[1]];
59849
+ rgb2[3] = 1;
59850
+ return rgb2;
59851
+ } else {
59938
59852
  return null;
59939
- };
59940
- cs.to.hex = function() {
59941
- var rgba = swizzle(arguments);
59942
- return "#" + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? hexDouble(Math.round(rgba[3] * 255)) : "");
59943
- };
59944
- cs.to.rgb = function() {
59945
- var rgba = swizzle(arguments);
59946
- return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ")" : "rgba(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ", " + rgba[3] + ")";
59947
- };
59948
- cs.to.rgb.percent = function() {
59949
- var rgba = swizzle(arguments);
59950
- var r2 = Math.round(rgba[0] / 255 * 100);
59951
- var g2 = Math.round(rgba[1] / 255 * 100);
59952
- var b3 = Math.round(rgba[2] / 255 * 100);
59953
- return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r2 + "%, " + g2 + "%, " + b3 + "%)" : "rgba(" + r2 + "%, " + g2 + "%, " + b3 + "%, " + rgba[3] + ")";
59954
- };
59955
- cs.to.hsl = function() {
59956
- var hsla = swizzle(arguments);
59957
- return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")";
59958
- };
59959
- cs.to.hwb = function() {
59960
- var hwba = swizzle(arguments);
59961
- var a2 = "";
59962
- if (hwba.length >= 4 && hwba[3] !== 1) {
59963
- a2 = ", " + hwba[3];
59964
- }
59965
- return "hwb(" + hwba[0] + ", " + hwba[1] + "%, " + hwba[2] + "%" + a2 + ")";
59966
- };
59967
- cs.to.keyword = function(rgb2) {
59968
- return reverseNames[rgb2.slice(0, 3)];
59969
- };
59970
- function clamp2(num, min2, max2) {
59971
- return Math.min(Math.max(min2, num), max2);
59972
- }
59973
- __name(clamp2, "clamp");
59974
- function hexDouble(num) {
59975
- var str = Math.round(num).toString(16).toUpperCase();
59976
- return str.length < 2 ? "0" + str : str;
59977
- }
59978
- __name(hexDouble, "hexDouble");
59979
- return colorString.exports;
59980
- }
59981
- __name(requireColorString, "requireColorString");
59982
- var conversions = { exports: {} };
59983
- var colorName;
59984
- var hasRequiredColorName;
59985
- function requireColorName() {
59986
- if (hasRequiredColorName) return colorName;
59987
- hasRequiredColorName = 1;
59988
- colorName = {
59989
- "aliceblue": [240, 248, 255],
59990
- "antiquewhite": [250, 235, 215],
59991
- "aqua": [0, 255, 255],
59992
- "aquamarine": [127, 255, 212],
59993
- "azure": [240, 255, 255],
59994
- "beige": [245, 245, 220],
59995
- "bisque": [255, 228, 196],
59996
- "black": [0, 0, 0],
59997
- "blanchedalmond": [255, 235, 205],
59998
- "blue": [0, 0, 255],
59999
- "blueviolet": [138, 43, 226],
60000
- "brown": [165, 42, 42],
60001
- "burlywood": [222, 184, 135],
60002
- "cadetblue": [95, 158, 160],
60003
- "chartreuse": [127, 255, 0],
60004
- "chocolate": [210, 105, 30],
60005
- "coral": [255, 127, 80],
60006
- "cornflowerblue": [100, 149, 237],
60007
- "cornsilk": [255, 248, 220],
60008
- "crimson": [220, 20, 60],
60009
- "cyan": [0, 255, 255],
60010
- "darkblue": [0, 0, 139],
60011
- "darkcyan": [0, 139, 139],
60012
- "darkgoldenrod": [184, 134, 11],
60013
- "darkgray": [169, 169, 169],
60014
- "darkgreen": [0, 100, 0],
60015
- "darkgrey": [169, 169, 169],
60016
- "darkkhaki": [189, 183, 107],
60017
- "darkmagenta": [139, 0, 139],
60018
- "darkolivegreen": [85, 107, 47],
60019
- "darkorange": [255, 140, 0],
60020
- "darkorchid": [153, 50, 204],
60021
- "darkred": [139, 0, 0],
60022
- "darksalmon": [233, 150, 122],
60023
- "darkseagreen": [143, 188, 143],
60024
- "darkslateblue": [72, 61, 139],
60025
- "darkslategray": [47, 79, 79],
60026
- "darkslategrey": [47, 79, 79],
60027
- "darkturquoise": [0, 206, 209],
60028
- "darkviolet": [148, 0, 211],
60029
- "deeppink": [255, 20, 147],
60030
- "deepskyblue": [0, 191, 255],
60031
- "dimgray": [105, 105, 105],
60032
- "dimgrey": [105, 105, 105],
60033
- "dodgerblue": [30, 144, 255],
60034
- "firebrick": [178, 34, 34],
60035
- "floralwhite": [255, 250, 240],
60036
- "forestgreen": [34, 139, 34],
60037
- "fuchsia": [255, 0, 255],
60038
- "gainsboro": [220, 220, 220],
60039
- "ghostwhite": [248, 248, 255],
60040
- "gold": [255, 215, 0],
60041
- "goldenrod": [218, 165, 32],
60042
- "gray": [128, 128, 128],
60043
- "green": [0, 128, 0],
60044
- "greenyellow": [173, 255, 47],
60045
- "grey": [128, 128, 128],
60046
- "honeydew": [240, 255, 240],
60047
- "hotpink": [255, 105, 180],
60048
- "indianred": [205, 92, 92],
60049
- "indigo": [75, 0, 130],
60050
- "ivory": [255, 255, 240],
60051
- "khaki": [240, 230, 140],
60052
- "lavender": [230, 230, 250],
60053
- "lavenderblush": [255, 240, 245],
60054
- "lawngreen": [124, 252, 0],
60055
- "lemonchiffon": [255, 250, 205],
60056
- "lightblue": [173, 216, 230],
60057
- "lightcoral": [240, 128, 128],
60058
- "lightcyan": [224, 255, 255],
60059
- "lightgoldenrodyellow": [250, 250, 210],
60060
- "lightgray": [211, 211, 211],
60061
- "lightgreen": [144, 238, 144],
60062
- "lightgrey": [211, 211, 211],
60063
- "lightpink": [255, 182, 193],
60064
- "lightsalmon": [255, 160, 122],
60065
- "lightseagreen": [32, 178, 170],
60066
- "lightskyblue": [135, 206, 250],
60067
- "lightslategray": [119, 136, 153],
60068
- "lightslategrey": [119, 136, 153],
60069
- "lightsteelblue": [176, 196, 222],
60070
- "lightyellow": [255, 255, 224],
60071
- "lime": [0, 255, 0],
60072
- "limegreen": [50, 205, 50],
60073
- "linen": [250, 240, 230],
60074
- "magenta": [255, 0, 255],
60075
- "maroon": [128, 0, 0],
60076
- "mediumaquamarine": [102, 205, 170],
60077
- "mediumblue": [0, 0, 205],
60078
- "mediumorchid": [186, 85, 211],
60079
- "mediumpurple": [147, 112, 219],
60080
- "mediumseagreen": [60, 179, 113],
60081
- "mediumslateblue": [123, 104, 238],
60082
- "mediumspringgreen": [0, 250, 154],
60083
- "mediumturquoise": [72, 209, 204],
60084
- "mediumvioletred": [199, 21, 133],
60085
- "midnightblue": [25, 25, 112],
60086
- "mintcream": [245, 255, 250],
60087
- "mistyrose": [255, 228, 225],
60088
- "moccasin": [255, 228, 181],
60089
- "navajowhite": [255, 222, 173],
60090
- "navy": [0, 0, 128],
60091
- "oldlace": [253, 245, 230],
60092
- "olive": [128, 128, 0],
60093
- "olivedrab": [107, 142, 35],
60094
- "orange": [255, 165, 0],
60095
- "orangered": [255, 69, 0],
60096
- "orchid": [218, 112, 214],
60097
- "palegoldenrod": [238, 232, 170],
60098
- "palegreen": [152, 251, 152],
60099
- "paleturquoise": [175, 238, 238],
60100
- "palevioletred": [219, 112, 147],
60101
- "papayawhip": [255, 239, 213],
60102
- "peachpuff": [255, 218, 185],
60103
- "peru": [205, 133, 63],
60104
- "pink": [255, 192, 203],
60105
- "plum": [221, 160, 221],
60106
- "powderblue": [176, 224, 230],
60107
- "purple": [128, 0, 128],
60108
- "rebeccapurple": [102, 51, 153],
60109
- "red": [255, 0, 0],
60110
- "rosybrown": [188, 143, 143],
60111
- "royalblue": [65, 105, 225],
60112
- "saddlebrown": [139, 69, 19],
60113
- "salmon": [250, 128, 114],
60114
- "sandybrown": [244, 164, 96],
60115
- "seagreen": [46, 139, 87],
60116
- "seashell": [255, 245, 238],
60117
- "sienna": [160, 82, 45],
60118
- "silver": [192, 192, 192],
60119
- "skyblue": [135, 206, 235],
60120
- "slateblue": [106, 90, 205],
60121
- "slategray": [112, 128, 144],
60122
- "slategrey": [112, 128, 144],
60123
- "snow": [255, 250, 250],
60124
- "springgreen": [0, 255, 127],
60125
- "steelblue": [70, 130, 180],
60126
- "tan": [210, 180, 140],
60127
- "teal": [0, 128, 128],
60128
- "thistle": [216, 191, 216],
60129
- "tomato": [255, 99, 71],
60130
- "turquoise": [64, 224, 208],
60131
- "violet": [238, 130, 238],
60132
- "wheat": [245, 222, 179],
60133
- "white": [255, 255, 255],
60134
- "whitesmoke": [245, 245, 245],
60135
- "yellow": [255, 255, 0],
60136
- "yellowgreen": [154, 205, 50]
60137
- };
60138
- return colorName;
60139
- }
60140
- __name(requireColorName, "requireColorName");
60141
- var hasRequiredConversions;
60142
- function requireConversions() {
60143
- if (hasRequiredConversions) return conversions.exports;
60144
- hasRequiredConversions = 1;
60145
- var cssKeywords = requireColorName();
60146
- var reverseKeywords = {};
60147
- for (var key in cssKeywords) {
60148
- if (cssKeywords.hasOwnProperty(key)) {
60149
- reverseKeywords[cssKeywords[key]] = key;
60150
- }
60151
- }
60152
- var convert2 = conversions.exports = {
60153
- rgb: { channels: 3, labels: "rgb" },
60154
- hsl: { channels: 3, labels: "hsl" },
60155
- hsv: { channels: 3, labels: "hsv" },
60156
- hwb: { channels: 3, labels: "hwb" },
60157
- cmyk: { channels: 4, labels: "cmyk" },
60158
- xyz: { channels: 3, labels: "xyz" },
60159
- lab: { channels: 3, labels: "lab" },
60160
- lch: { channels: 3, labels: "lch" },
60161
- hex: { channels: 1, labels: ["hex"] },
60162
- keyword: { channels: 1, labels: ["keyword"] },
60163
- ansi16: { channels: 1, labels: ["ansi16"] },
60164
- ansi256: { channels: 1, labels: ["ansi256"] },
60165
- hcg: { channels: 3, labels: ["h", "c", "g"] },
60166
- apple: { channels: 3, labels: ["r16", "g16", "b16"] },
60167
- gray: { channels: 1, labels: ["gray"] }
60168
- };
60169
- for (var model in convert2) {
60170
- if (convert2.hasOwnProperty(model)) {
60171
- if (!("channels" in convert2[model])) {
60172
- throw new Error("missing channels property: " + model);
60173
- }
60174
- if (!("labels" in convert2[model])) {
60175
- throw new Error("missing channel labels property: " + model);
60176
- }
60177
- if (convert2[model].labels.length !== convert2[model].channels) {
60178
- throw new Error("channel and label counts mismatch: " + model);
60179
- }
60180
- var channels = convert2[model].channels;
60181
- var labels = convert2[model].labels;
60182
- delete convert2[model].channels;
60183
- delete convert2[model].labels;
60184
- Object.defineProperty(convert2[model], "channels", { value: channels });
60185
- Object.defineProperty(convert2[model], "labels", { value: labels });
60186
- }
60187
- }
60188
- convert2.rgb.hsl = function(rgb2) {
60189
- var r2 = rgb2[0] / 255;
60190
- var g2 = rgb2[1] / 255;
60191
- var b3 = rgb2[2] / 255;
60192
- var min2 = Math.min(r2, g2, b3);
60193
- var max2 = Math.max(r2, g2, b3);
60194
- var delta = max2 - min2;
60195
- var h2;
60196
- var s2;
60197
- var l2;
60198
- if (max2 === min2) {
59853
+ }
59854
+ for (i2 = 0; i2 < 3; i2++) {
59855
+ rgb2[i2] = clamp$3(rgb2[i2], 0, 255);
59856
+ }
59857
+ rgb2[3] = clamp$3(rgb2[3], 0, 1);
59858
+ return rgb2;
59859
+ };
59860
+ cs.get.hsl = function(string2) {
59861
+ if (!string2) {
59862
+ return null;
59863
+ }
59864
+ const hsl2 = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
59865
+ const match = string2.match(hsl2);
59866
+ if (match) {
59867
+ const alpha = Number.parseFloat(match[4]);
59868
+ const h2 = (Number.parseFloat(match[1]) % 360 + 360) % 360;
59869
+ const s2 = clamp$3(Number.parseFloat(match[2]), 0, 100);
59870
+ const l2 = clamp$3(Number.parseFloat(match[3]), 0, 100);
59871
+ const a2 = clamp$3(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
59872
+ return [h2, s2, l2, a2];
59873
+ }
59874
+ return null;
59875
+ };
59876
+ cs.get.hwb = function(string2) {
59877
+ if (!string2) {
59878
+ return null;
59879
+ }
59880
+ const hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d.]+)%\s*,\s*([+-]?[\d.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
59881
+ const match = string2.match(hwb);
59882
+ if (match) {
59883
+ const alpha = Number.parseFloat(match[4]);
59884
+ const h2 = (Number.parseFloat(match[1]) % 360 + 360) % 360;
59885
+ const w2 = clamp$3(Number.parseFloat(match[2]), 0, 100);
59886
+ const b3 = clamp$3(Number.parseFloat(match[3]), 0, 100);
59887
+ const a2 = clamp$3(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
59888
+ return [h2, w2, b3, a2];
59889
+ }
59890
+ return null;
59891
+ };
59892
+ cs.to.hex = function(...rgba) {
59893
+ return "#" + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? hexDouble(Math.round(rgba[3] * 255)) : "");
59894
+ };
59895
+ cs.to.rgb = function(...rgba) {
59896
+ return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ")" : "rgba(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ", " + rgba[3] + ")";
59897
+ };
59898
+ cs.to.rgb.percent = function(...rgba) {
59899
+ const r2 = Math.round(rgba[0] / 255 * 100);
59900
+ const g2 = Math.round(rgba[1] / 255 * 100);
59901
+ const b3 = Math.round(rgba[2] / 255 * 100);
59902
+ return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r2 + "%, " + g2 + "%, " + b3 + "%)" : "rgba(" + r2 + "%, " + g2 + "%, " + b3 + "%, " + rgba[3] + ")";
59903
+ };
59904
+ cs.to.hsl = function(...hsla) {
59905
+ return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")";
59906
+ };
59907
+ cs.to.hwb = function(...hwba) {
59908
+ let a2 = "";
59909
+ if (hwba.length >= 4 && hwba[3] !== 1) {
59910
+ a2 = ", " + hwba[3];
59911
+ }
59912
+ return "hwb(" + hwba[0] + ", " + hwba[1] + "%, " + hwba[2] + "%" + a2 + ")";
59913
+ };
59914
+ cs.to.keyword = function(...rgb2) {
59915
+ return reverseNames[rgb2.slice(0, 3)];
59916
+ };
59917
+ function clamp$3(number_, min2, max2) {
59918
+ return Math.min(Math.max(min2, number_), max2);
59919
+ }
59920
+ __name(clamp$3, "clamp$3");
59921
+ function hexDouble(number_) {
59922
+ const string_ = Math.round(number_).toString(16).toUpperCase();
59923
+ return string_.length < 2 ? "0" + string_ : string_;
59924
+ }
59925
+ __name(hexDouble, "hexDouble");
59926
+ const reverseKeywords = {};
59927
+ for (const key of Object.keys(cssKeywords)) {
59928
+ reverseKeywords[cssKeywords[key]] = key;
59929
+ }
59930
+ const convert$2 = {
59931
+ rgb: { channels: 3, labels: "rgb" },
59932
+ hsl: { channels: 3, labels: "hsl" },
59933
+ hsv: { channels: 3, labels: "hsv" },
59934
+ hwb: { channels: 3, labels: "hwb" },
59935
+ cmyk: { channels: 4, labels: "cmyk" },
59936
+ xyz: { channels: 3, labels: "xyz" },
59937
+ lab: { channels: 3, labels: "lab" },
59938
+ oklab: { channels: 3, labels: ["okl", "oka", "okb"] },
59939
+ lch: { channels: 3, labels: "lch" },
59940
+ oklch: { channels: 3, labels: ["okl", "okc", "okh"] },
59941
+ hex: { channels: 1, labels: ["hex"] },
59942
+ keyword: { channels: 1, labels: ["keyword"] },
59943
+ ansi16: { channels: 1, labels: ["ansi16"] },
59944
+ ansi256: { channels: 1, labels: ["ansi256"] },
59945
+ hcg: { channels: 3, labels: ["h", "c", "g"] },
59946
+ apple: { channels: 3, labels: ["r16", "g16", "b16"] },
59947
+ gray: { channels: 1, labels: ["gray"] }
59948
+ };
59949
+ const LAB_FT = __pow(6 / 29, 3);
59950
+ function srgbNonlinearTransform(c2) {
59951
+ const cc = c2 > 31308e-7 ? 1.055 * __pow(c2, 1 / 2.4) - 0.055 : c2 * 12.92;
59952
+ return Math.min(Math.max(0, cc), 1);
59953
+ }
59954
+ __name(srgbNonlinearTransform, "srgbNonlinearTransform");
59955
+ function srgbNonlinearTransformInv(c2) {
59956
+ return c2 > 0.04045 ? __pow((c2 + 0.055) / 1.055, 2.4) : c2 / 12.92;
59957
+ }
59958
+ __name(srgbNonlinearTransformInv, "srgbNonlinearTransformInv");
59959
+ for (const model of Object.keys(convert$2)) {
59960
+ if (!("channels" in convert$2[model])) {
59961
+ throw new Error("missing channels property: " + model);
59962
+ }
59963
+ if (!("labels" in convert$2[model])) {
59964
+ throw new Error("missing channel labels property: " + model);
59965
+ }
59966
+ if (convert$2[model].labels.length !== convert$2[model].channels) {
59967
+ throw new Error("channel and label counts mismatch: " + model);
59968
+ }
59969
+ const { channels, labels } = convert$2[model];
59970
+ delete convert$2[model].channels;
59971
+ delete convert$2[model].labels;
59972
+ Object.defineProperty(convert$2[model], "channels", { value: channels });
59973
+ Object.defineProperty(convert$2[model], "labels", { value: labels });
59974
+ }
59975
+ convert$2.rgb.hsl = function(rgb2) {
59976
+ const r2 = rgb2[0] / 255;
59977
+ const g2 = rgb2[1] / 255;
59978
+ const b3 = rgb2[2] / 255;
59979
+ const min2 = Math.min(r2, g2, b3);
59980
+ const max2 = Math.max(r2, g2, b3);
59981
+ const delta = max2 - min2;
59982
+ let h2;
59983
+ let s2;
59984
+ switch (max2) {
59985
+ case min2: {
60199
59986
  h2 = 0;
60200
- } else if (r2 === max2) {
59987
+ break;
59988
+ }
59989
+ case r2: {
60201
59990
  h2 = (g2 - b3) / delta;
60202
- } else if (g2 === max2) {
59991
+ break;
59992
+ }
59993
+ case g2: {
60203
59994
  h2 = 2 + (b3 - r2) / delta;
60204
- } else if (b3 === max2) {
60205
- h2 = 4 + (r2 - g2) / delta;
59995
+ break;
60206
59996
  }
60207
- h2 = Math.min(h2 * 60, 360);
60208
- if (h2 < 0) {
60209
- h2 += 360;
59997
+ case b3: {
59998
+ h2 = 4 + (r2 - g2) / delta;
59999
+ break;
60210
60000
  }
60211
- l2 = (min2 + max2) / 2;
60212
- if (max2 === min2) {
60213
- s2 = 0;
60214
- } else if (l2 <= 0.5) {
60215
- s2 = delta / (max2 + min2);
60216
- } else {
60217
- s2 = delta / (2 - max2 - min2);
60218
- }
60219
- return [h2, s2 * 100, l2 * 100];
60220
- };
60221
- convert2.rgb.hsv = function(rgb2) {
60222
- var rdif;
60223
- var gdif;
60224
- var bdif;
60225
- var h2;
60226
- var s2;
60227
- var r2 = rgb2[0] / 255;
60228
- var g2 = rgb2[1] / 255;
60229
- var b3 = rgb2[2] / 255;
60230
- var v2 = Math.max(r2, g2, b3);
60231
- var diff = v2 - Math.min(r2, g2, b3);
60232
- var diffc = /* @__PURE__ */ __name(function(c2) {
60233
- return (v2 - c2) / 6 / diff + 1 / 2;
60234
- }, "diffc");
60235
- if (diff === 0) {
60236
- h2 = s2 = 0;
60237
- } else {
60238
- s2 = diff / v2;
60239
- rdif = diffc(r2);
60240
- gdif = diffc(g2);
60241
- bdif = diffc(b3);
60242
- if (r2 === v2) {
60001
+ }
60002
+ h2 = Math.min(h2 * 60, 360);
60003
+ if (h2 < 0) {
60004
+ h2 += 360;
60005
+ }
60006
+ const l2 = (min2 + max2) / 2;
60007
+ if (max2 === min2) {
60008
+ s2 = 0;
60009
+ } else if (l2 <= 0.5) {
60010
+ s2 = delta / (max2 + min2);
60011
+ } else {
60012
+ s2 = delta / (2 - max2 - min2);
60013
+ }
60014
+ return [h2, s2 * 100, l2 * 100];
60015
+ };
60016
+ convert$2.rgb.hsv = function(rgb2) {
60017
+ let rdif;
60018
+ let gdif;
60019
+ let bdif;
60020
+ let h2;
60021
+ let s2;
60022
+ const r2 = rgb2[0] / 255;
60023
+ const g2 = rgb2[1] / 255;
60024
+ const b3 = rgb2[2] / 255;
60025
+ const v2 = Math.max(r2, g2, b3);
60026
+ const diff = v2 - Math.min(r2, g2, b3);
60027
+ const diffc = /* @__PURE__ */ __name(function(c2) {
60028
+ return (v2 - c2) / 6 / diff + 1 / 2;
60029
+ }, "diffc");
60030
+ if (diff === 0) {
60031
+ h2 = 0;
60032
+ s2 = 0;
60033
+ } else {
60034
+ s2 = diff / v2;
60035
+ rdif = diffc(r2);
60036
+ gdif = diffc(g2);
60037
+ bdif = diffc(b3);
60038
+ switch (v2) {
60039
+ case r2: {
60243
60040
  h2 = bdif - gdif;
60244
- } else if (g2 === v2) {
60041
+ break;
60042
+ }
60043
+ case g2: {
60245
60044
  h2 = 1 / 3 + rdif - bdif;
60246
- } else if (b3 === v2) {
60247
- h2 = 2 / 3 + gdif - rdif;
60045
+ break;
60248
60046
  }
60249
- if (h2 < 0) {
60250
- h2 += 1;
60251
- } else if (h2 > 1) {
60252
- h2 -= 1;
60047
+ case b3: {
60048
+ h2 = 2 / 3 + gdif - rdif;
60049
+ break;
60253
60050
  }
60254
60051
  }
60255
- return [
60256
- h2 * 360,
60257
- s2 * 100,
60258
- v2 * 100
60259
- ];
60260
- };
60261
- convert2.rgb.hwb = function(rgb2) {
60262
- var r2 = rgb2[0];
60263
- var g2 = rgb2[1];
60264
- var b3 = rgb2[2];
60265
- var h2 = convert2.rgb.hsl(rgb2)[0];
60266
- var w2 = 1 / 255 * Math.min(r2, Math.min(g2, b3));
60267
- b3 = 1 - 1 / 255 * Math.max(r2, Math.max(g2, b3));
60268
- return [h2, w2 * 100, b3 * 100];
60269
- };
60270
- convert2.rgb.cmyk = function(rgb2) {
60271
- var r2 = rgb2[0] / 255;
60272
- var g2 = rgb2[1] / 255;
60273
- var b3 = rgb2[2] / 255;
60274
- var c2;
60275
- var m2;
60276
- var y2;
60277
- var k2;
60278
- k2 = Math.min(1 - r2, 1 - g2, 1 - b3);
60279
- c2 = (1 - r2 - k2) / (1 - k2) || 0;
60280
- m2 = (1 - g2 - k2) / (1 - k2) || 0;
60281
- y2 = (1 - b3 - k2) / (1 - k2) || 0;
60282
- return [c2 * 100, m2 * 100, y2 * 100, k2 * 100];
60283
- };
60284
- function comparativeDistance(x2, y2) {
60285
- return Math.pow(x2[0] - y2[0], 2) + Math.pow(x2[1] - y2[1], 2) + Math.pow(x2[2] - y2[2], 2);
60286
- }
60287
- __name(comparativeDistance, "comparativeDistance");
60288
- convert2.rgb.keyword = function(rgb2) {
60289
- var reversed = reverseKeywords[rgb2];
60290
- if (reversed) {
60291
- return reversed;
60292
- }
60293
- var currentClosestDistance = Infinity;
60294
- var currentClosestKeyword;
60295
- for (var keyword in cssKeywords) {
60296
- if (cssKeywords.hasOwnProperty(keyword)) {
60297
- var value = cssKeywords[keyword];
60298
- var distance2 = comparativeDistance(rgb2, value);
60299
- if (distance2 < currentClosestDistance) {
60300
- currentClosestDistance = distance2;
60301
- currentClosestKeyword = keyword;
60302
- }
60303
- }
60304
- }
60305
- return currentClosestKeyword;
60306
- };
60307
- convert2.keyword.rgb = function(keyword) {
60308
- return cssKeywords[keyword];
60309
- };
60310
- convert2.rgb.xyz = function(rgb2) {
60311
- var r2 = rgb2[0] / 255;
60312
- var g2 = rgb2[1] / 255;
60313
- var b3 = rgb2[2] / 255;
60314
- r2 = r2 > 0.04045 ? Math.pow((r2 + 0.055) / 1.055, 2.4) : r2 / 12.92;
60315
- g2 = g2 > 0.04045 ? Math.pow((g2 + 0.055) / 1.055, 2.4) : g2 / 12.92;
60316
- b3 = b3 > 0.04045 ? Math.pow((b3 + 0.055) / 1.055, 2.4) : b3 / 12.92;
60317
- var x2 = r2 * 0.4124 + g2 * 0.3576 + b3 * 0.1805;
60318
- var y2 = r2 * 0.2126 + g2 * 0.7152 + b3 * 0.0722;
60319
- var z2 = r2 * 0.0193 + g2 * 0.1192 + b3 * 0.9505;
60320
- return [x2 * 100, y2 * 100, z2 * 100];
60321
- };
60322
- convert2.rgb.lab = function(rgb2) {
60323
- var xyz = convert2.rgb.xyz(rgb2);
60324
- var x2 = xyz[0];
60325
- var y2 = xyz[1];
60326
- var z2 = xyz[2];
60327
- var l2;
60328
- var a2;
60329
- var b3;
60330
- x2 /= 95.047;
60331
- y2 /= 100;
60332
- z2 /= 108.883;
60333
- x2 = x2 > 8856e-6 ? Math.pow(x2, 1 / 3) : 7.787 * x2 + 16 / 116;
60334
- y2 = y2 > 8856e-6 ? Math.pow(y2, 1 / 3) : 7.787 * y2 + 16 / 116;
60335
- z2 = z2 > 8856e-6 ? Math.pow(z2, 1 / 3) : 7.787 * z2 + 16 / 116;
60336
- l2 = 116 * y2 - 16;
60337
- a2 = 500 * (x2 - y2);
60338
- b3 = 200 * (y2 - z2);
60339
- return [l2, a2, b3];
60340
- };
60341
- convert2.hsl.rgb = function(hsl2) {
60342
- var h2 = hsl2[0] / 360;
60343
- var s2 = hsl2[1] / 100;
60344
- var l2 = hsl2[2] / 100;
60345
- var t1;
60346
- var t2;
60347
- var t3;
60348
- var rgb2;
60349
- var val2;
60350
- if (s2 === 0) {
60351
- val2 = l2 * 255;
60352
- return [val2, val2, val2];
60353
- }
60354
- if (l2 < 0.5) {
60355
- t2 = l2 * (1 + s2);
60052
+ if (h2 < 0) {
60053
+ h2 += 1;
60054
+ } else if (h2 > 1) {
60055
+ h2 -= 1;
60056
+ }
60057
+ }
60058
+ return [
60059
+ h2 * 360,
60060
+ s2 * 100,
60061
+ v2 * 100
60062
+ ];
60063
+ };
60064
+ convert$2.rgb.hwb = function(rgb2) {
60065
+ const r2 = rgb2[0];
60066
+ const g2 = rgb2[1];
60067
+ let b3 = rgb2[2];
60068
+ const h2 = convert$2.rgb.hsl(rgb2)[0];
60069
+ const w2 = 1 / 255 * Math.min(r2, Math.min(g2, b3));
60070
+ b3 = 1 - 1 / 255 * Math.max(r2, Math.max(g2, b3));
60071
+ return [h2, w2 * 100, b3 * 100];
60072
+ };
60073
+ convert$2.rgb.oklab = function(rgb2) {
60074
+ const r2 = srgbNonlinearTransformInv(rgb2[0] / 255);
60075
+ const g2 = srgbNonlinearTransformInv(rgb2[1] / 255);
60076
+ const b3 = srgbNonlinearTransformInv(rgb2[2] / 255);
60077
+ const lp = Math.cbrt(0.4122214708 * r2 + 0.5363325363 * g2 + 0.0514459929 * b3);
60078
+ const mp = Math.cbrt(0.2119034982 * r2 + 0.6806995451 * g2 + 0.1073969566 * b3);
60079
+ const sp = Math.cbrt(0.0883024619 * r2 + 0.2817188376 * g2 + 0.6299787005 * b3);
60080
+ const l2 = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
60081
+ const aa = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
60082
+ const bb = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
60083
+ return [l2 * 100, aa * 100, bb * 100];
60084
+ };
60085
+ convert$2.rgb.cmyk = function(rgb2) {
60086
+ const r2 = rgb2[0] / 255;
60087
+ const g2 = rgb2[1] / 255;
60088
+ const b3 = rgb2[2] / 255;
60089
+ const k2 = Math.min(1 - r2, 1 - g2, 1 - b3);
60090
+ const c2 = (1 - r2 - k2) / (1 - k2) || 0;
60091
+ const m2 = (1 - g2 - k2) / (1 - k2) || 0;
60092
+ const y2 = (1 - b3 - k2) / (1 - k2) || 0;
60093
+ return [c2 * 100, m2 * 100, y2 * 100, k2 * 100];
60094
+ };
60095
+ function comparativeDistance(x2, y2) {
60096
+ return __pow(x2[0] - y2[0], 2) + __pow(x2[1] - y2[1], 2) + __pow(x2[2] - y2[2], 2);
60097
+ }
60098
+ __name(comparativeDistance, "comparativeDistance");
60099
+ convert$2.rgb.keyword = function(rgb2) {
60100
+ const reversed = reverseKeywords[rgb2];
60101
+ if (reversed) {
60102
+ return reversed;
60103
+ }
60104
+ let currentClosestDistance = Number.POSITIVE_INFINITY;
60105
+ let currentClosestKeyword;
60106
+ for (const keyword of Object.keys(cssKeywords)) {
60107
+ const value = cssKeywords[keyword];
60108
+ const distance2 = comparativeDistance(rgb2, value);
60109
+ if (distance2 < currentClosestDistance) {
60110
+ currentClosestDistance = distance2;
60111
+ currentClosestKeyword = keyword;
60112
+ }
60113
+ }
60114
+ return currentClosestKeyword;
60115
+ };
60116
+ convert$2.keyword.rgb = function(keyword) {
60117
+ return cssKeywords[keyword];
60118
+ };
60119
+ convert$2.rgb.xyz = function(rgb2) {
60120
+ const r2 = srgbNonlinearTransformInv(rgb2[0] / 255);
60121
+ const g2 = srgbNonlinearTransformInv(rgb2[1] / 255);
60122
+ const b3 = srgbNonlinearTransformInv(rgb2[2] / 255);
60123
+ const x2 = r2 * 0.4124564 + g2 * 0.3575761 + b3 * 0.1804375;
60124
+ const y2 = r2 * 0.2126729 + g2 * 0.7151522 + b3 * 0.072175;
60125
+ const z2 = r2 * 0.0193339 + g2 * 0.119192 + b3 * 0.9503041;
60126
+ return [x2 * 100, y2 * 100, z2 * 100];
60127
+ };
60128
+ convert$2.rgb.lab = function(rgb2) {
60129
+ const xyz = convert$2.rgb.xyz(rgb2);
60130
+ let x2 = xyz[0];
60131
+ let y2 = xyz[1];
60132
+ let z2 = xyz[2];
60133
+ x2 /= 95.047;
60134
+ y2 /= 100;
60135
+ z2 /= 108.883;
60136
+ x2 = x2 > LAB_FT ? __pow(x2, 1 / 3) : 7.787 * x2 + 16 / 116;
60137
+ y2 = y2 > LAB_FT ? __pow(y2, 1 / 3) : 7.787 * y2 + 16 / 116;
60138
+ z2 = z2 > LAB_FT ? __pow(z2, 1 / 3) : 7.787 * z2 + 16 / 116;
60139
+ const l2 = 116 * y2 - 16;
60140
+ const a2 = 500 * (x2 - y2);
60141
+ const b3 = 200 * (y2 - z2);
60142
+ return [l2, a2, b3];
60143
+ };
60144
+ convert$2.hsl.rgb = function(hsl2) {
60145
+ const h2 = hsl2[0] / 360;
60146
+ const s2 = hsl2[1] / 100;
60147
+ const l2 = hsl2[2] / 100;
60148
+ let t3;
60149
+ let value;
60150
+ if (s2 === 0) {
60151
+ value = l2 * 255;
60152
+ return [value, value, value];
60153
+ }
60154
+ const t2 = l2 < 0.5 ? l2 * (1 + s2) : l2 + s2 - l2 * s2;
60155
+ const t1 = 2 * l2 - t2;
60156
+ const rgb2 = [0, 0, 0];
60157
+ for (let i2 = 0; i2 < 3; i2++) {
60158
+ t3 = h2 + 1 / 3 * -(i2 - 1);
60159
+ if (t3 < 0) {
60160
+ t3++;
60161
+ }
60162
+ if (t3 > 1) {
60163
+ t3--;
60164
+ }
60165
+ if (6 * t3 < 1) {
60166
+ value = t1 + (t2 - t1) * 6 * t3;
60167
+ } else if (2 * t3 < 1) {
60168
+ value = t2;
60169
+ } else if (3 * t3 < 2) {
60170
+ value = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
60356
60171
  } else {
60357
- t2 = l2 + s2 - l2 * s2;
60358
- }
60359
- t1 = 2 * l2 - t2;
60360
- rgb2 = [0, 0, 0];
60361
- for (var i2 = 0; i2 < 3; i2++) {
60362
- t3 = h2 + 1 / 3 * -(i2 - 1);
60363
- if (t3 < 0) {
60364
- t3++;
60365
- }
60366
- if (t3 > 1) {
60367
- t3--;
60368
- }
60369
- if (6 * t3 < 1) {
60370
- val2 = t1 + (t2 - t1) * 6 * t3;
60371
- } else if (2 * t3 < 1) {
60372
- val2 = t2;
60373
- } else if (3 * t3 < 2) {
60374
- val2 = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
60375
- } else {
60376
- val2 = t1;
60377
- }
60378
- rgb2[i2] = val2 * 255;
60172
+ value = t1;
60173
+ }
60174
+ rgb2[i2] = value * 255;
60175
+ }
60176
+ return rgb2;
60177
+ };
60178
+ convert$2.hsl.hsv = function(hsl2) {
60179
+ const h2 = hsl2[0];
60180
+ let s2 = hsl2[1] / 100;
60181
+ let l2 = hsl2[2] / 100;
60182
+ let smin = s2;
60183
+ const lmin = Math.max(l2, 0.01);
60184
+ l2 *= 2;
60185
+ s2 *= l2 <= 1 ? l2 : 2 - l2;
60186
+ smin *= lmin <= 1 ? lmin : 2 - lmin;
60187
+ const v2 = (l2 + s2) / 2;
60188
+ const sv = l2 === 0 ? 2 * smin / (lmin + smin) : 2 * s2 / (l2 + s2);
60189
+ return [h2, sv * 100, v2 * 100];
60190
+ };
60191
+ convert$2.hsv.rgb = function(hsv) {
60192
+ const h2 = hsv[0] / 60;
60193
+ const s2 = hsv[1] / 100;
60194
+ let v2 = hsv[2] / 100;
60195
+ const hi = Math.floor(h2) % 6;
60196
+ const f2 = h2 - Math.floor(h2);
60197
+ const p2 = 255 * v2 * (1 - s2);
60198
+ const q2 = 255 * v2 * (1 - s2 * f2);
60199
+ const t2 = 255 * v2 * (1 - s2 * (1 - f2));
60200
+ v2 *= 255;
60201
+ switch (hi) {
60202
+ case 0: {
60203
+ return [v2, t2, p2];
60204
+ }
60205
+ case 1: {
60206
+ return [q2, v2, p2];
60207
+ }
60208
+ case 2: {
60209
+ return [p2, v2, t2];
60210
+ }
60211
+ case 3: {
60212
+ return [p2, q2, v2];
60213
+ }
60214
+ case 4: {
60215
+ return [t2, p2, v2];
60216
+ }
60217
+ case 5: {
60218
+ return [v2, p2, q2];
60219
+ }
60220
+ }
60221
+ };
60222
+ convert$2.hsv.hsl = function(hsv) {
60223
+ const h2 = hsv[0];
60224
+ const s2 = hsv[1] / 100;
60225
+ const v2 = hsv[2] / 100;
60226
+ const vmin = Math.max(v2, 0.01);
60227
+ let sl;
60228
+ let l2;
60229
+ l2 = (2 - s2) * v2;
60230
+ const lmin = (2 - s2) * vmin;
60231
+ sl = s2 * vmin;
60232
+ sl /= lmin <= 1 ? lmin : 2 - lmin;
60233
+ sl = sl || 0;
60234
+ l2 /= 2;
60235
+ return [h2, sl * 100, l2 * 100];
60236
+ };
60237
+ convert$2.hwb.rgb = function(hwb) {
60238
+ const h2 = hwb[0] / 360;
60239
+ let wh = hwb[1] / 100;
60240
+ let bl = hwb[2] / 100;
60241
+ const ratio = wh + bl;
60242
+ let f2;
60243
+ if (ratio > 1) {
60244
+ wh /= ratio;
60245
+ bl /= ratio;
60246
+ }
60247
+ const i2 = Math.floor(6 * h2);
60248
+ const v2 = 1 - bl;
60249
+ f2 = 6 * h2 - i2;
60250
+ if ((i2 & 1) !== 0) {
60251
+ f2 = 1 - f2;
60252
+ }
60253
+ const n2 = wh + f2 * (v2 - wh);
60254
+ let r2;
60255
+ let g2;
60256
+ let b3;
60257
+ switch (i2) {
60258
+ default:
60259
+ case 6:
60260
+ case 0: {
60261
+ r2 = v2;
60262
+ g2 = n2;
60263
+ b3 = wh;
60264
+ break;
60379
60265
  }
60380
- return rgb2;
60381
- };
60382
- convert2.hsl.hsv = function(hsl2) {
60383
- var h2 = hsl2[0];
60384
- var s2 = hsl2[1] / 100;
60385
- var l2 = hsl2[2] / 100;
60386
- var smin = s2;
60387
- var lmin = Math.max(l2, 0.01);
60388
- var sv;
60389
- var v2;
60390
- l2 *= 2;
60391
- s2 *= l2 <= 1 ? l2 : 2 - l2;
60392
- smin *= lmin <= 1 ? lmin : 2 - lmin;
60393
- v2 = (l2 + s2) / 2;
60394
- sv = l2 === 0 ? 2 * smin / (lmin + smin) : 2 * s2 / (l2 + s2);
60395
- return [h2, sv * 100, v2 * 100];
60396
- };
60397
- convert2.hsv.rgb = function(hsv) {
60398
- var h2 = hsv[0] / 60;
60399
- var s2 = hsv[1] / 100;
60400
- var v2 = hsv[2] / 100;
60401
- var hi = Math.floor(h2) % 6;
60402
- var f2 = h2 - Math.floor(h2);
60403
- var p2 = 255 * v2 * (1 - s2);
60404
- var q2 = 255 * v2 * (1 - s2 * f2);
60405
- var t2 = 255 * v2 * (1 - s2 * (1 - f2));
60406
- v2 *= 255;
60407
- switch (hi) {
60408
- case 0:
60409
- return [v2, t2, p2];
60410
- case 1:
60411
- return [q2, v2, p2];
60412
- case 2:
60413
- return [p2, v2, t2];
60414
- case 3:
60415
- return [p2, q2, v2];
60416
- case 4:
60417
- return [t2, p2, v2];
60418
- case 5:
60419
- return [v2, p2, q2];
60420
- }
60421
- };
60422
- convert2.hsv.hsl = function(hsv) {
60423
- var h2 = hsv[0];
60424
- var s2 = hsv[1] / 100;
60425
- var v2 = hsv[2] / 100;
60426
- var vmin = Math.max(v2, 0.01);
60427
- var lmin;
60428
- var sl;
60429
- var l2;
60430
- l2 = (2 - s2) * v2;
60431
- lmin = (2 - s2) * vmin;
60432
- sl = s2 * vmin;
60433
- sl /= lmin <= 1 ? lmin : 2 - lmin;
60434
- sl = sl || 0;
60435
- l2 /= 2;
60436
- return [h2, sl * 100, l2 * 100];
60437
- };
60438
- convert2.hwb.rgb = function(hwb) {
60439
- var h2 = hwb[0] / 360;
60440
- var wh = hwb[1] / 100;
60441
- var bl = hwb[2] / 100;
60442
- var ratio = wh + bl;
60443
- var i2;
60444
- var v2;
60445
- var f2;
60446
- var n2;
60447
- if (ratio > 1) {
60448
- wh /= ratio;
60449
- bl /= ratio;
60450
- }
60451
- i2 = Math.floor(6 * h2);
60452
- v2 = 1 - bl;
60453
- f2 = 6 * h2 - i2;
60454
- if ((i2 & 1) !== 0) {
60455
- f2 = 1 - f2;
60456
- }
60457
- n2 = wh + f2 * (v2 - wh);
60458
- var r2;
60459
- var g2;
60460
- var b3;
60461
- switch (i2) {
60462
- default:
60463
- case 6:
60464
- case 0:
60465
- r2 = v2;
60466
- g2 = n2;
60467
- b3 = wh;
60468
- break;
60469
- case 1:
60470
- r2 = n2;
60471
- g2 = v2;
60472
- b3 = wh;
60473
- break;
60474
- case 2:
60475
- r2 = wh;
60476
- g2 = v2;
60477
- b3 = n2;
60478
- break;
60479
- case 3:
60480
- r2 = wh;
60481
- g2 = n2;
60482
- b3 = v2;
60483
- break;
60484
- case 4:
60485
- r2 = n2;
60486
- g2 = wh;
60487
- b3 = v2;
60488
- break;
60489
- case 5:
60490
- r2 = v2;
60491
- g2 = wh;
60492
- b3 = n2;
60493
- break;
60266
+ case 1: {
60267
+ r2 = n2;
60268
+ g2 = v2;
60269
+ b3 = wh;
60270
+ break;
60494
60271
  }
60495
- return [r2 * 255, g2 * 255, b3 * 255];
60496
- };
60497
- convert2.cmyk.rgb = function(cmyk) {
60498
- var c2 = cmyk[0] / 100;
60499
- var m2 = cmyk[1] / 100;
60500
- var y2 = cmyk[2] / 100;
60501
- var k2 = cmyk[3] / 100;
60502
- var r2;
60503
- var g2;
60504
- var b3;
60505
- r2 = 1 - Math.min(1, c2 * (1 - k2) + k2);
60506
- g2 = 1 - Math.min(1, m2 * (1 - k2) + k2);
60507
- b3 = 1 - Math.min(1, y2 * (1 - k2) + k2);
60508
- return [r2 * 255, g2 * 255, b3 * 255];
60509
- };
60510
- convert2.xyz.rgb = function(xyz) {
60511
- var x2 = xyz[0] / 100;
60512
- var y2 = xyz[1] / 100;
60513
- var z2 = xyz[2] / 100;
60514
- var r2;
60515
- var g2;
60516
- var b3;
60517
- r2 = x2 * 3.2406 + y2 * -1.5372 + z2 * -0.4986;
60518
- g2 = x2 * -0.9689 + y2 * 1.8758 + z2 * 0.0415;
60519
- b3 = x2 * 0.0557 + y2 * -0.204 + z2 * 1.057;
60520
- r2 = r2 > 31308e-7 ? 1.055 * Math.pow(r2, 1 / 2.4) - 0.055 : r2 * 12.92;
60521
- g2 = g2 > 31308e-7 ? 1.055 * Math.pow(g2, 1 / 2.4) - 0.055 : g2 * 12.92;
60522
- b3 = b3 > 31308e-7 ? 1.055 * Math.pow(b3, 1 / 2.4) - 0.055 : b3 * 12.92;
60523
- r2 = Math.min(Math.max(0, r2), 1);
60524
- g2 = Math.min(Math.max(0, g2), 1);
60525
- b3 = Math.min(Math.max(0, b3), 1);
60526
- return [r2 * 255, g2 * 255, b3 * 255];
60527
- };
60528
- convert2.xyz.lab = function(xyz) {
60529
- var x2 = xyz[0];
60530
- var y2 = xyz[1];
60531
- var z2 = xyz[2];
60532
- var l2;
60533
- var a2;
60534
- var b3;
60535
- x2 /= 95.047;
60536
- y2 /= 100;
60537
- z2 /= 108.883;
60538
- x2 = x2 > 8856e-6 ? Math.pow(x2, 1 / 3) : 7.787 * x2 + 16 / 116;
60539
- y2 = y2 > 8856e-6 ? Math.pow(y2, 1 / 3) : 7.787 * y2 + 16 / 116;
60540
- z2 = z2 > 8856e-6 ? Math.pow(z2, 1 / 3) : 7.787 * z2 + 16 / 116;
60541
- l2 = 116 * y2 - 16;
60542
- a2 = 500 * (x2 - y2);
60543
- b3 = 200 * (y2 - z2);
60544
- return [l2, a2, b3];
60545
- };
60546
- convert2.lab.xyz = function(lab) {
60547
- var l2 = lab[0];
60548
- var a2 = lab[1];
60549
- var b3 = lab[2];
60550
- var x2;
60551
- var y2;
60552
- var z2;
60553
- y2 = (l2 + 16) / 116;
60554
- x2 = a2 / 500 + y2;
60555
- z2 = y2 - b3 / 200;
60556
- var y22 = Math.pow(y2, 3);
60557
- var x22 = Math.pow(x2, 3);
60558
- var z22 = Math.pow(z2, 3);
60559
- y2 = y22 > 8856e-6 ? y22 : (y2 - 16 / 116) / 7.787;
60560
- x2 = x22 > 8856e-6 ? x22 : (x2 - 16 / 116) / 7.787;
60561
- z2 = z22 > 8856e-6 ? z22 : (z2 - 16 / 116) / 7.787;
60562
- x2 *= 95.047;
60563
- y2 *= 100;
60564
- z2 *= 108.883;
60565
- return [x2, y2, z2];
60566
- };
60567
- convert2.lab.lch = function(lab) {
60568
- var l2 = lab[0];
60569
- var a2 = lab[1];
60570
- var b3 = lab[2];
60571
- var hr;
60572
- var h2;
60573
- var c2;
60574
- hr = Math.atan2(b3, a2);
60575
- h2 = hr * 360 / 2 / Math.PI;
60576
- if (h2 < 0) {
60577
- h2 += 360;
60272
+ case 2: {
60273
+ r2 = wh;
60274
+ g2 = v2;
60275
+ b3 = n2;
60276
+ break;
60578
60277
  }
60579
- c2 = Math.sqrt(a2 * a2 + b3 * b3);
60580
- return [l2, c2, h2];
60581
- };
60582
- convert2.lch.lab = function(lch) {
60583
- var l2 = lch[0];
60584
- var c2 = lch[1];
60585
- var h2 = lch[2];
60586
- var a2;
60587
- var b3;
60588
- var hr;
60589
- hr = h2 / 360 * 2 * Math.PI;
60590
- a2 = c2 * Math.cos(hr);
60591
- b3 = c2 * Math.sin(hr);
60592
- return [l2, a2, b3];
60593
- };
60594
- convert2.rgb.ansi16 = function(args) {
60595
- var r2 = args[0];
60596
- var g2 = args[1];
60597
- var b3 = args[2];
60598
- var value = 1 in arguments ? arguments[1] : convert2.rgb.hsv(args)[2];
60599
- value = Math.round(value / 50);
60600
- if (value === 0) {
60601
- return 30;
60602
- }
60603
- var ansi = 30 + (Math.round(b3 / 255) << 2 | Math.round(g2 / 255) << 1 | Math.round(r2 / 255));
60604
- if (value === 2) {
60605
- ansi += 60;
60606
- }
60607
- return ansi;
60608
- };
60609
- convert2.hsv.ansi16 = function(args) {
60610
- return convert2.rgb.ansi16(convert2.hsv.rgb(args), args[2]);
60611
- };
60612
- convert2.rgb.ansi256 = function(args) {
60613
- var r2 = args[0];
60614
- var g2 = args[1];
60615
- var b3 = args[2];
60616
- if (r2 === g2 && g2 === b3) {
60617
- if (r2 < 8) {
60618
- return 16;
60619
- }
60620
- if (r2 > 248) {
60621
- return 231;
60622
- }
60623
- return Math.round((r2 - 8) / 247 * 24) + 232;
60624
- }
60625
- var ansi = 16 + 36 * Math.round(r2 / 255 * 5) + 6 * Math.round(g2 / 255 * 5) + Math.round(b3 / 255 * 5);
60626
- return ansi;
60627
- };
60628
- convert2.ansi16.rgb = function(args) {
60629
- var color2 = args % 10;
60630
- if (color2 === 0 || color2 === 7) {
60631
- if (args > 50) {
60632
- color2 += 3.5;
60633
- }
60634
- color2 = color2 / 10.5 * 255;
60635
- return [color2, color2, color2];
60636
- }
60637
- var mult = (~~(args > 50) + 1) * 0.5;
60638
- var r2 = (color2 & 1) * mult * 255;
60639
- var g2 = (color2 >> 1 & 1) * mult * 255;
60640
- var b3 = (color2 >> 2 & 1) * mult * 255;
60641
- return [r2, g2, b3];
60642
- };
60643
- convert2.ansi256.rgb = function(args) {
60644
- if (args >= 232) {
60645
- var c2 = (args - 232) * 10 + 8;
60646
- return [c2, c2, c2];
60647
- }
60648
- args -= 16;
60649
- var rem;
60650
- var r2 = Math.floor(args / 36) / 5 * 255;
60651
- var g2 = Math.floor((rem = args % 36) / 6) / 5 * 255;
60652
- var b3 = rem % 6 / 5 * 255;
60653
- return [r2, g2, b3];
60654
- };
60655
- convert2.rgb.hex = function(args) {
60656
- var integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
60657
- var string2 = integer.toString(16).toUpperCase();
60658
- return "000000".substring(string2.length) + string2;
60659
- };
60660
- convert2.hex.rgb = function(args) {
60661
- var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
60662
- if (!match) {
60663
- return [0, 0, 0];
60664
- }
60665
- var colorString2 = match[0];
60666
- if (match[0].length === 3) {
60667
- colorString2 = colorString2.split("").map(function(char) {
60668
- return char + char;
60669
- }).join("");
60278
+ case 3: {
60279
+ r2 = wh;
60280
+ g2 = n2;
60281
+ b3 = v2;
60282
+ break;
60670
60283
  }
60671
- var integer = parseInt(colorString2, 16);
60672
- var r2 = integer >> 16 & 255;
60673
- var g2 = integer >> 8 & 255;
60674
- var b3 = integer & 255;
60675
- return [r2, g2, b3];
60676
- };
60677
- convert2.rgb.hcg = function(rgb2) {
60678
- var r2 = rgb2[0] / 255;
60679
- var g2 = rgb2[1] / 255;
60680
- var b3 = rgb2[2] / 255;
60681
- var max2 = Math.max(Math.max(r2, g2), b3);
60682
- var min2 = Math.min(Math.min(r2, g2), b3);
60683
- var chroma = max2 - min2;
60684
- var grayscale;
60685
- var hue;
60686
- if (chroma < 1) {
60687
- grayscale = min2 / (1 - chroma);
60688
- } else {
60689
- grayscale = 0;
60690
- }
60691
- if (chroma <= 0) {
60692
- hue = 0;
60693
- } else if (max2 === r2) {
60694
- hue = (g2 - b3) / chroma % 6;
60695
- } else if (max2 === g2) {
60696
- hue = 2 + (b3 - r2) / chroma;
60697
- } else {
60698
- hue = 4 + (r2 - g2) / chroma + 4;
60699
- }
60700
- hue /= 6;
60701
- hue %= 1;
60702
- return [hue * 360, chroma * 100, grayscale * 100];
60703
- };
60704
- convert2.hsl.hcg = function(hsl2) {
60705
- var s2 = hsl2[1] / 100;
60706
- var l2 = hsl2[2] / 100;
60707
- var c2 = 1;
60708
- var f2 = 0;
60709
- if (l2 < 0.5) {
60710
- c2 = 2 * s2 * l2;
60711
- } else {
60712
- c2 = 2 * s2 * (1 - l2);
60713
- }
60714
- if (c2 < 1) {
60715
- f2 = (l2 - 0.5 * c2) / (1 - c2);
60716
- }
60717
- return [hsl2[0], c2 * 100, f2 * 100];
60718
- };
60719
- convert2.hsv.hcg = function(hsv) {
60720
- var s2 = hsv[1] / 100;
60721
- var v2 = hsv[2] / 100;
60722
- var c2 = s2 * v2;
60723
- var f2 = 0;
60724
- if (c2 < 1) {
60725
- f2 = (v2 - c2) / (1 - c2);
60726
- }
60727
- return [hsv[0], c2 * 100, f2 * 100];
60728
- };
60729
- convert2.hcg.rgb = function(hcg) {
60730
- var h2 = hcg[0] / 360;
60731
- var c2 = hcg[1] / 100;
60732
- var g2 = hcg[2] / 100;
60733
- if (c2 === 0) {
60734
- return [g2 * 255, g2 * 255, g2 * 255];
60735
- }
60736
- var pure2 = [0, 0, 0];
60737
- var hi = h2 % 1 * 6;
60738
- var v2 = hi % 1;
60739
- var w2 = 1 - v2;
60740
- var mg = 0;
60741
- switch (Math.floor(hi)) {
60742
- case 0:
60743
- pure2[0] = 1;
60744
- pure2[1] = v2;
60745
- pure2[2] = 0;
60746
- break;
60747
- case 1:
60748
- pure2[0] = w2;
60749
- pure2[1] = 1;
60750
- pure2[2] = 0;
60751
- break;
60752
- case 2:
60753
- pure2[0] = 0;
60754
- pure2[1] = 1;
60755
- pure2[2] = v2;
60756
- break;
60757
- case 3:
60758
- pure2[0] = 0;
60759
- pure2[1] = w2;
60760
- pure2[2] = 1;
60761
- break;
60762
- case 4:
60763
- pure2[0] = v2;
60764
- pure2[1] = 0;
60765
- pure2[2] = 1;
60766
- break;
60767
- default:
60768
- pure2[0] = 1;
60769
- pure2[1] = 0;
60770
- pure2[2] = w2;
60284
+ case 4: {
60285
+ r2 = n2;
60286
+ g2 = wh;
60287
+ b3 = v2;
60288
+ break;
60289
+ }
60290
+ case 5: {
60291
+ r2 = v2;
60292
+ g2 = wh;
60293
+ b3 = n2;
60294
+ break;
60771
60295
  }
60772
- mg = (1 - c2) * g2;
60773
- return [
60774
- (c2 * pure2[0] + mg) * 255,
60775
- (c2 * pure2[1] + mg) * 255,
60776
- (c2 * pure2[2] + mg) * 255
60777
- ];
60778
- };
60779
- convert2.hcg.hsv = function(hcg) {
60780
- var c2 = hcg[1] / 100;
60781
- var g2 = hcg[2] / 100;
60782
- var v2 = c2 + g2 * (1 - c2);
60783
- var f2 = 0;
60784
- if (v2 > 0) {
60785
- f2 = c2 / v2;
60786
- }
60787
- return [hcg[0], f2 * 100, v2 * 100];
60788
- };
60789
- convert2.hcg.hsl = function(hcg) {
60790
- var c2 = hcg[1] / 100;
60791
- var g2 = hcg[2] / 100;
60792
- var l2 = g2 * (1 - c2) + 0.5 * c2;
60793
- var s2 = 0;
60794
- if (l2 > 0 && l2 < 0.5) {
60795
- s2 = c2 / (2 * l2);
60796
- } else if (l2 >= 0.5 && l2 < 1) {
60797
- s2 = c2 / (2 * (1 - l2));
60798
- }
60799
- return [hcg[0], s2 * 100, l2 * 100];
60800
- };
60801
- convert2.hcg.hwb = function(hcg) {
60802
- var c2 = hcg[1] / 100;
60803
- var g2 = hcg[2] / 100;
60804
- var v2 = c2 + g2 * (1 - c2);
60805
- return [hcg[0], (v2 - c2) * 100, (1 - v2) * 100];
60806
- };
60807
- convert2.hwb.hcg = function(hwb) {
60808
- var w2 = hwb[1] / 100;
60809
- var b3 = hwb[2] / 100;
60810
- var v2 = 1 - b3;
60811
- var c2 = v2 - w2;
60812
- var g2 = 0;
60813
- if (c2 < 1) {
60814
- g2 = (v2 - c2) / (1 - c2);
60815
- }
60816
- return [hwb[0], c2 * 100, g2 * 100];
60817
- };
60818
- convert2.apple.rgb = function(apple) {
60819
- return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
60820
- };
60821
- convert2.rgb.apple = function(rgb2) {
60822
- return [rgb2[0] / 255 * 65535, rgb2[1] / 255 * 65535, rgb2[2] / 255 * 65535];
60823
- };
60824
- convert2.gray.rgb = function(args) {
60825
- return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
60826
- };
60827
- convert2.gray.hsl = convert2.gray.hsv = function(args) {
60828
- return [0, 0, args[0]];
60829
- };
60830
- convert2.gray.hwb = function(gray) {
60831
- return [0, 100, gray[0]];
60832
- };
60833
- convert2.gray.cmyk = function(gray) {
60834
- return [0, 0, 0, gray[0]];
60835
- };
60836
- convert2.gray.lab = function(gray) {
60837
- return [gray[0], 0, 0];
60838
- };
60839
- convert2.gray.hex = function(gray) {
60840
- var val2 = Math.round(gray[0] / 100 * 255) & 255;
60841
- var integer = (val2 << 16) + (val2 << 8) + val2;
60842
- var string2 = integer.toString(16).toUpperCase();
60843
- return "000000".substring(string2.length) + string2;
60844
- };
60845
- convert2.rgb.gray = function(rgb2) {
60846
- var val2 = (rgb2[0] + rgb2[1] + rgb2[2]) / 3;
60847
- return [val2 / 255 * 100];
60848
- };
60849
- return conversions.exports;
60850
- }
60851
- __name(requireConversions, "requireConversions");
60852
- var route;
60853
- var hasRequiredRoute;
60854
- function requireRoute() {
60855
- if (hasRequiredRoute) return route;
60856
- hasRequiredRoute = 1;
60857
- var conversions2 = requireConversions();
60858
- function buildGraph() {
60859
- var graph = {};
60860
- var models = Object.keys(conversions2);
60861
- for (var len = models.length, i2 = 0; i2 < len; i2++) {
60862
- graph[models[i2]] = {
60863
- // http://jsperf.com/1-vs-infinity
60864
- // micro-opt, but this is simple.
60865
- distance: -1,
60866
- parent: null
60867
- };
60868
- }
60869
- return graph;
60870
- }
60871
- __name(buildGraph, "buildGraph");
60872
- function deriveBFS(fromModel) {
60873
- var graph = buildGraph();
60874
- var queue = [fromModel];
60875
- graph[fromModel].distance = 0;
60876
- while (queue.length) {
60877
- var current = queue.pop();
60878
- var adjacents = Object.keys(conversions2[current]);
60879
- for (var len = adjacents.length, i2 = 0; i2 < len; i2++) {
60880
- var adjacent = adjacents[i2];
60881
- var node2 = graph[adjacent];
60882
- if (node2.distance === -1) {
60883
- node2.distance = graph[current].distance + 1;
60884
- node2.parent = current;
60885
- queue.unshift(adjacent);
60886
- }
60887
- }
60888
- }
60889
- return graph;
60890
- }
60891
- __name(deriveBFS, "deriveBFS");
60892
- function link2(from, to) {
60893
- return function(args) {
60894
- return to(from(args));
60895
- };
60896
60296
  }
60897
- __name(link2, "link");
60898
- function wrapConversion(toModel, graph) {
60899
- var path2 = [graph[toModel].parent, toModel];
60900
- var fn2 = conversions2[graph[toModel].parent][toModel];
60901
- var cur = graph[toModel].parent;
60902
- while (graph[cur].parent) {
60903
- path2.unshift(graph[cur].parent);
60904
- fn2 = link2(conversions2[graph[cur].parent][cur], fn2);
60905
- cur = graph[cur].parent;
60906
- }
60907
- fn2.conversion = path2;
60908
- return fn2;
60297
+ return [r2 * 255, g2 * 255, b3 * 255];
60298
+ };
60299
+ convert$2.cmyk.rgb = function(cmyk) {
60300
+ const c2 = cmyk[0] / 100;
60301
+ const m2 = cmyk[1] / 100;
60302
+ const y2 = cmyk[2] / 100;
60303
+ const k2 = cmyk[3] / 100;
60304
+ const r2 = 1 - Math.min(1, c2 * (1 - k2) + k2);
60305
+ const g2 = 1 - Math.min(1, m2 * (1 - k2) + k2);
60306
+ const b3 = 1 - Math.min(1, y2 * (1 - k2) + k2);
60307
+ return [r2 * 255, g2 * 255, b3 * 255];
60308
+ };
60309
+ convert$2.xyz.rgb = function(xyz) {
60310
+ const x2 = xyz[0] / 100;
60311
+ const y2 = xyz[1] / 100;
60312
+ const z2 = xyz[2] / 100;
60313
+ let r2;
60314
+ let g2;
60315
+ let b3;
60316
+ r2 = x2 * 3.2404542 + y2 * -1.5371385 + z2 * -0.4985314;
60317
+ g2 = x2 * -0.969266 + y2 * 1.8760108 + z2 * 0.041556;
60318
+ b3 = x2 * 0.0556434 + y2 * -0.2040259 + z2 * 1.0572252;
60319
+ r2 = srgbNonlinearTransform(r2);
60320
+ g2 = srgbNonlinearTransform(g2);
60321
+ b3 = srgbNonlinearTransform(b3);
60322
+ return [r2 * 255, g2 * 255, b3 * 255];
60323
+ };
60324
+ convert$2.xyz.lab = function(xyz) {
60325
+ let x2 = xyz[0];
60326
+ let y2 = xyz[1];
60327
+ let z2 = xyz[2];
60328
+ x2 /= 95.047;
60329
+ y2 /= 100;
60330
+ z2 /= 108.883;
60331
+ x2 = x2 > LAB_FT ? __pow(x2, 1 / 3) : 7.787 * x2 + 16 / 116;
60332
+ y2 = y2 > LAB_FT ? __pow(y2, 1 / 3) : 7.787 * y2 + 16 / 116;
60333
+ z2 = z2 > LAB_FT ? __pow(z2, 1 / 3) : 7.787 * z2 + 16 / 116;
60334
+ const l2 = 116 * y2 - 16;
60335
+ const a2 = 500 * (x2 - y2);
60336
+ const b3 = 200 * (y2 - z2);
60337
+ return [l2, a2, b3];
60338
+ };
60339
+ convert$2.xyz.oklab = function(xyz) {
60340
+ const x2 = xyz[0] / 100;
60341
+ const y2 = xyz[1] / 100;
60342
+ const z2 = xyz[2] / 100;
60343
+ const lp = Math.cbrt(0.8189330101 * x2 + 0.3618667424 * y2 - 0.1288597137 * z2);
60344
+ const mp = Math.cbrt(0.0329845436 * x2 + 0.9293118715 * y2 + 0.0361456387 * z2);
60345
+ const sp = Math.cbrt(0.0482003018 * x2 + 0.2643662691 * y2 + 0.633851707 * z2);
60346
+ const l2 = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
60347
+ const a2 = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
60348
+ const b3 = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
60349
+ return [l2 * 100, a2 * 100, b3 * 100];
60350
+ };
60351
+ convert$2.oklab.oklch = function(oklab) {
60352
+ return convert$2.lab.lch(oklab);
60353
+ };
60354
+ convert$2.oklab.xyz = function(oklab) {
60355
+ const ll = oklab[0] / 100;
60356
+ const a2 = oklab[1] / 100;
60357
+ const b3 = oklab[2] / 100;
60358
+ const l2 = __pow(0.999999998 * ll + 0.396337792 * a2 + 0.215803758 * b3, 3);
60359
+ const m2 = __pow(1.000000008 * ll - 0.105561342 * a2 - 0.063854175 * b3, 3);
60360
+ const s2 = __pow(1.000000055 * ll - 0.089484182 * a2 - 1.291485538 * b3, 3);
60361
+ const x2 = 1.227013851 * l2 - 0.55779998 * m2 + 0.281256149 * s2;
60362
+ const y2 = -0.040580178 * l2 + 1.11225687 * m2 - 0.071676679 * s2;
60363
+ const z2 = -0.076381285 * l2 - 0.421481978 * m2 + 1.58616322 * s2;
60364
+ return [x2 * 100, y2 * 100, z2 * 100];
60365
+ };
60366
+ convert$2.oklab.rgb = function(oklab) {
60367
+ const ll = oklab[0] / 100;
60368
+ const aa = oklab[1] / 100;
60369
+ const bb = oklab[2] / 100;
60370
+ const l2 = __pow(ll + 0.3963377774 * aa + 0.2158037573 * bb, 3);
60371
+ const m2 = __pow(ll - 0.1055613458 * aa - 0.0638541728 * bb, 3);
60372
+ const s2 = __pow(ll - 0.0894841775 * aa - 1.291485548 * bb, 3);
60373
+ const r2 = srgbNonlinearTransform(4.0767416621 * l2 - 3.3077115913 * m2 + 0.2309699292 * s2);
60374
+ const g2 = srgbNonlinearTransform(-1.2684380046 * l2 + 2.6097574011 * m2 - 0.3413193965 * s2);
60375
+ const b3 = srgbNonlinearTransform(-0.0041960863 * l2 - 0.7034186147 * m2 + 1.707614701 * s2);
60376
+ return [r2 * 255, g2 * 255, b3 * 255];
60377
+ };
60378
+ convert$2.oklch.oklab = function(oklch) {
60379
+ return convert$2.lch.lab(oklch);
60380
+ };
60381
+ convert$2.lab.xyz = function(lab) {
60382
+ const l2 = lab[0];
60383
+ const a2 = lab[1];
60384
+ const b3 = lab[2];
60385
+ let x2;
60386
+ let y2;
60387
+ let z2;
60388
+ y2 = (l2 + 16) / 116;
60389
+ x2 = a2 / 500 + y2;
60390
+ z2 = y2 - b3 / 200;
60391
+ const y22 = __pow(y2, 3);
60392
+ const x22 = __pow(x2, 3);
60393
+ const z22 = __pow(z2, 3);
60394
+ y2 = y22 > LAB_FT ? y22 : (y2 - 16 / 116) / 7.787;
60395
+ x2 = x22 > LAB_FT ? x22 : (x2 - 16 / 116) / 7.787;
60396
+ z2 = z22 > LAB_FT ? z22 : (z2 - 16 / 116) / 7.787;
60397
+ x2 *= 95.047;
60398
+ y2 *= 100;
60399
+ z2 *= 108.883;
60400
+ return [x2, y2, z2];
60401
+ };
60402
+ convert$2.lab.lch = function(lab) {
60403
+ const l2 = lab[0];
60404
+ const a2 = lab[1];
60405
+ const b3 = lab[2];
60406
+ let h2;
60407
+ const hr = Math.atan2(b3, a2);
60408
+ h2 = hr * 360 / 2 / Math.PI;
60409
+ if (h2 < 0) {
60410
+ h2 += 360;
60411
+ }
60412
+ const c2 = Math.sqrt(a2 * a2 + b3 * b3);
60413
+ return [l2, c2, h2];
60414
+ };
60415
+ convert$2.lch.lab = function(lch) {
60416
+ const l2 = lch[0];
60417
+ const c2 = lch[1];
60418
+ const h2 = lch[2];
60419
+ const hr = h2 / 360 * 2 * Math.PI;
60420
+ const a2 = c2 * Math.cos(hr);
60421
+ const b3 = c2 * Math.sin(hr);
60422
+ return [l2, a2, b3];
60423
+ };
60424
+ convert$2.rgb.ansi16 = function(args, saturation = null) {
60425
+ const [r2, g2, b3] = args;
60426
+ let value = saturation === null ? convert$2.rgb.hsv(args)[2] : saturation;
60427
+ value = Math.round(value / 50);
60428
+ if (value === 0) {
60429
+ return 30;
60909
60430
  }
60910
- __name(wrapConversion, "wrapConversion");
60911
- route = /* @__PURE__ */ __name(function(fromModel) {
60912
- var graph = deriveBFS(fromModel);
60913
- var conversion = {};
60914
- var models = Object.keys(graph);
60915
- for (var len = models.length, i2 = 0; i2 < len; i2++) {
60916
- var toModel = models[i2];
60917
- var node2 = graph[toModel];
60918
- if (node2.parent === null) {
60919
- continue;
60920
- }
60921
- conversion[toModel] = wrapConversion(toModel, graph);
60431
+ let ansi = 30 + (Math.round(b3 / 255) << 2 | Math.round(g2 / 255) << 1 | Math.round(r2 / 255));
60432
+ if (value === 2) {
60433
+ ansi += 60;
60434
+ }
60435
+ return ansi;
60436
+ };
60437
+ convert$2.hsv.ansi16 = function(args) {
60438
+ return convert$2.rgb.ansi16(convert$2.hsv.rgb(args), args[2]);
60439
+ };
60440
+ convert$2.rgb.ansi256 = function(args) {
60441
+ const r2 = args[0];
60442
+ const g2 = args[1];
60443
+ const b3 = args[2];
60444
+ if (r2 >> 4 === g2 >> 4 && g2 >> 4 === b3 >> 4) {
60445
+ if (r2 < 8) {
60446
+ return 16;
60922
60447
  }
60923
- return conversion;
60924
- }, "route");
60925
- return route;
60926
- }
60927
- __name(requireRoute, "requireRoute");
60928
- var colorConvert;
60929
- var hasRequiredColorConvert;
60930
- function requireColorConvert() {
60931
- if (hasRequiredColorConvert) return colorConvert;
60932
- hasRequiredColorConvert = 1;
60933
- var conversions2 = requireConversions();
60934
- var route2 = requireRoute();
60935
- var convert2 = {};
60936
- var models = Object.keys(conversions2);
60937
- function wrapRaw(fn2) {
60938
- var wrappedFn = /* @__PURE__ */ __name(function(args) {
60939
- if (args === void 0 || args === null) {
60940
- return args;
60941
- }
60942
- if (arguments.length > 1) {
60943
- args = Array.prototype.slice.call(arguments);
60944
- }
60945
- return fn2(args);
60946
- }, "wrappedFn");
60947
- if ("conversion" in fn2) {
60948
- wrappedFn.conversion = fn2.conversion;
60448
+ if (r2 > 248) {
60449
+ return 231;
60450
+ }
60451
+ return Math.round((r2 - 8) / 247 * 24) + 232;
60452
+ }
60453
+ const ansi = 16 + 36 * Math.round(r2 / 255 * 5) + 6 * Math.round(g2 / 255 * 5) + Math.round(b3 / 255 * 5);
60454
+ return ansi;
60455
+ };
60456
+ convert$2.ansi16.rgb = function(args) {
60457
+ args = args[0];
60458
+ let color2 = args % 10;
60459
+ if (color2 === 0 || color2 === 7) {
60460
+ if (args > 50) {
60461
+ color2 += 3.5;
60462
+ }
60463
+ color2 = color2 / 10.5 * 255;
60464
+ return [color2, color2, color2];
60465
+ }
60466
+ const mult = (Math.trunc(args > 50) + 1) * 0.5;
60467
+ const r2 = (color2 & 1) * mult * 255;
60468
+ const g2 = (color2 >> 1 & 1) * mult * 255;
60469
+ const b3 = (color2 >> 2 & 1) * mult * 255;
60470
+ return [r2, g2, b3];
60471
+ };
60472
+ convert$2.ansi256.rgb = function(args) {
60473
+ args = args[0];
60474
+ if (args >= 232) {
60475
+ const c2 = (args - 232) * 10 + 8;
60476
+ return [c2, c2, c2];
60477
+ }
60478
+ args -= 16;
60479
+ let rem;
60480
+ const r2 = Math.floor(args / 36) / 5 * 255;
60481
+ const g2 = Math.floor((rem = args % 36) / 6) / 5 * 255;
60482
+ const b3 = rem % 6 / 5 * 255;
60483
+ return [r2, g2, b3];
60484
+ };
60485
+ convert$2.rgb.hex = function(args) {
60486
+ const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
60487
+ const string2 = integer.toString(16).toUpperCase();
60488
+ return "000000".slice(string2.length) + string2;
60489
+ };
60490
+ convert$2.hex.rgb = function(args) {
60491
+ const match = args.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);
60492
+ if (!match) {
60493
+ return [0, 0, 0];
60494
+ }
60495
+ let colorString = match[0];
60496
+ if (match[0].length === 3) {
60497
+ colorString = [...colorString].map((char) => char + char).join("");
60498
+ }
60499
+ const integer = Number.parseInt(colorString, 16);
60500
+ const r2 = integer >> 16 & 255;
60501
+ const g2 = integer >> 8 & 255;
60502
+ const b3 = integer & 255;
60503
+ return [r2, g2, b3];
60504
+ };
60505
+ convert$2.rgb.hcg = function(rgb2) {
60506
+ const r2 = rgb2[0] / 255;
60507
+ const g2 = rgb2[1] / 255;
60508
+ const b3 = rgb2[2] / 255;
60509
+ const max2 = Math.max(Math.max(r2, g2), b3);
60510
+ const min2 = Math.min(Math.min(r2, g2), b3);
60511
+ const chroma = max2 - min2;
60512
+ let hue;
60513
+ const grayscale = chroma < 1 ? min2 / (1 - chroma) : 0;
60514
+ if (chroma <= 0) {
60515
+ hue = 0;
60516
+ } else if (max2 === r2) {
60517
+ hue = (g2 - b3) / chroma % 6;
60518
+ } else if (max2 === g2) {
60519
+ hue = 2 + (b3 - r2) / chroma;
60520
+ } else {
60521
+ hue = 4 + (r2 - g2) / chroma;
60522
+ }
60523
+ hue /= 6;
60524
+ hue %= 1;
60525
+ return [hue * 360, chroma * 100, grayscale * 100];
60526
+ };
60527
+ convert$2.hsl.hcg = function(hsl2) {
60528
+ const s2 = hsl2[1] / 100;
60529
+ const l2 = hsl2[2] / 100;
60530
+ const c2 = l2 < 0.5 ? 2 * s2 * l2 : 2 * s2 * (1 - l2);
60531
+ let f2 = 0;
60532
+ if (c2 < 1) {
60533
+ f2 = (l2 - 0.5 * c2) / (1 - c2);
60534
+ }
60535
+ return [hsl2[0], c2 * 100, f2 * 100];
60536
+ };
60537
+ convert$2.hsv.hcg = function(hsv) {
60538
+ const s2 = hsv[1] / 100;
60539
+ const v2 = hsv[2] / 100;
60540
+ const c2 = s2 * v2;
60541
+ let f2 = 0;
60542
+ if (c2 < 1) {
60543
+ f2 = (v2 - c2) / (1 - c2);
60544
+ }
60545
+ return [hsv[0], c2 * 100, f2 * 100];
60546
+ };
60547
+ convert$2.hcg.rgb = function(hcg) {
60548
+ const h2 = hcg[0] / 360;
60549
+ const c2 = hcg[1] / 100;
60550
+ const g2 = hcg[2] / 100;
60551
+ if (c2 === 0) {
60552
+ return [g2 * 255, g2 * 255, g2 * 255];
60553
+ }
60554
+ const pure2 = [0, 0, 0];
60555
+ const hi = h2 % 1 * 6;
60556
+ const v2 = hi % 1;
60557
+ const w2 = 1 - v2;
60558
+ let mg = 0;
60559
+ switch (Math.floor(hi)) {
60560
+ case 0: {
60561
+ pure2[0] = 1;
60562
+ pure2[1] = v2;
60563
+ pure2[2] = 0;
60564
+ break;
60565
+ }
60566
+ case 1: {
60567
+ pure2[0] = w2;
60568
+ pure2[1] = 1;
60569
+ pure2[2] = 0;
60570
+ break;
60571
+ }
60572
+ case 2: {
60573
+ pure2[0] = 0;
60574
+ pure2[1] = 1;
60575
+ pure2[2] = v2;
60576
+ break;
60577
+ }
60578
+ case 3: {
60579
+ pure2[0] = 0;
60580
+ pure2[1] = w2;
60581
+ pure2[2] = 1;
60582
+ break;
60583
+ }
60584
+ case 4: {
60585
+ pure2[0] = v2;
60586
+ pure2[1] = 0;
60587
+ pure2[2] = 1;
60588
+ break;
60589
+ }
60590
+ default: {
60591
+ pure2[0] = 1;
60592
+ pure2[1] = 0;
60593
+ pure2[2] = w2;
60949
60594
  }
60950
- return wrappedFn;
60951
60595
  }
60952
- __name(wrapRaw, "wrapRaw");
60953
- function wrapRounded(fn2) {
60954
- var wrappedFn = /* @__PURE__ */ __name(function(args) {
60955
- if (args === void 0 || args === null) {
60956
- return args;
60957
- }
60958
- if (arguments.length > 1) {
60959
- args = Array.prototype.slice.call(arguments);
60960
- }
60961
- var result = fn2(args);
60962
- if (typeof result === "object") {
60963
- for (var len = result.length, i2 = 0; i2 < len; i2++) {
60964
- result[i2] = Math.round(result[i2]);
60965
- }
60966
- }
60967
- return result;
60968
- }, "wrappedFn");
60969
- if ("conversion" in fn2) {
60970
- wrappedFn.conversion = fn2.conversion;
60971
- }
60972
- return wrappedFn;
60973
- }
60974
- __name(wrapRounded, "wrapRounded");
60975
- models.forEach(function(fromModel) {
60976
- convert2[fromModel] = {};
60977
- Object.defineProperty(convert2[fromModel], "channels", { value: conversions2[fromModel].channels });
60978
- Object.defineProperty(convert2[fromModel], "labels", { value: conversions2[fromModel].labels });
60979
- var routes = route2(fromModel);
60980
- var routeModels = Object.keys(routes);
60981
- routeModels.forEach(function(toModel) {
60982
- var fn2 = routes[toModel];
60983
- convert2[fromModel][toModel] = wrapRounded(fn2);
60984
- convert2[fromModel][toModel].raw = wrapRaw(fn2);
60985
- });
60986
- });
60987
- colorConvert = convert2;
60988
- return colorConvert;
60989
- }
60990
- __name(requireColorConvert, "requireColorConvert");
60991
- var color$3;
60992
- var hasRequiredColor;
60993
- function requireColor() {
60994
- if (hasRequiredColor) return color$3;
60995
- hasRequiredColor = 1;
60996
- var colorString2 = requireColorString();
60997
- var convert2 = requireColorConvert();
60998
- var _slice = [].slice;
60999
- var skippedModels = [
61000
- // to be honest, I don't really feel like keyword belongs in color convert, but eh.
61001
- "keyword",
61002
- // gray conflicts with some method names, and has its own method defined.
61003
- "gray",
61004
- // shouldn't really be in color-convert either...
61005
- "hex"
60596
+ mg = (1 - c2) * g2;
60597
+ return [
60598
+ (c2 * pure2[0] + mg) * 255,
60599
+ (c2 * pure2[1] + mg) * 255,
60600
+ (c2 * pure2[2] + mg) * 255
61006
60601
  ];
61007
- var hashedModelKeys = {};
61008
- Object.keys(convert2).forEach(function(model) {
61009
- hashedModelKeys[_slice.call(convert2[model].labels).sort().join("")] = model;
61010
- });
61011
- var limiters = {};
61012
- function Color2(obj, model) {
61013
- if (!(this instanceof Color2)) {
61014
- return new Color2(obj, model);
60602
+ };
60603
+ convert$2.hcg.hsv = function(hcg) {
60604
+ const c2 = hcg[1] / 100;
60605
+ const g2 = hcg[2] / 100;
60606
+ const v2 = c2 + g2 * (1 - c2);
60607
+ let f2 = 0;
60608
+ if (v2 > 0) {
60609
+ f2 = c2 / v2;
60610
+ }
60611
+ return [hcg[0], f2 * 100, v2 * 100];
60612
+ };
60613
+ convert$2.hcg.hsl = function(hcg) {
60614
+ const c2 = hcg[1] / 100;
60615
+ const g2 = hcg[2] / 100;
60616
+ const l2 = g2 * (1 - c2) + 0.5 * c2;
60617
+ let s2 = 0;
60618
+ if (l2 > 0 && l2 < 0.5) {
60619
+ s2 = c2 / (2 * l2);
60620
+ } else if (l2 >= 0.5 && l2 < 1) {
60621
+ s2 = c2 / (2 * (1 - l2));
60622
+ }
60623
+ return [hcg[0], s2 * 100, l2 * 100];
60624
+ };
60625
+ convert$2.hcg.hwb = function(hcg) {
60626
+ const c2 = hcg[1] / 100;
60627
+ const g2 = hcg[2] / 100;
60628
+ const v2 = c2 + g2 * (1 - c2);
60629
+ return [hcg[0], (v2 - c2) * 100, (1 - v2) * 100];
60630
+ };
60631
+ convert$2.hwb.hcg = function(hwb) {
60632
+ const w2 = hwb[1] / 100;
60633
+ const b3 = hwb[2] / 100;
60634
+ const v2 = 1 - b3;
60635
+ const c2 = v2 - w2;
60636
+ let g2 = 0;
60637
+ if (c2 < 1) {
60638
+ g2 = (v2 - c2) / (1 - c2);
60639
+ }
60640
+ return [hwb[0], c2 * 100, g2 * 100];
60641
+ };
60642
+ convert$2.apple.rgb = function(apple) {
60643
+ return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
60644
+ };
60645
+ convert$2.rgb.apple = function(rgb2) {
60646
+ return [rgb2[0] / 255 * 65535, rgb2[1] / 255 * 65535, rgb2[2] / 255 * 65535];
60647
+ };
60648
+ convert$2.gray.rgb = function(args) {
60649
+ return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
60650
+ };
60651
+ convert$2.gray.hsl = function(args) {
60652
+ return [0, 0, args[0]];
60653
+ };
60654
+ convert$2.gray.hsv = convert$2.gray.hsl;
60655
+ convert$2.gray.hwb = function(gray) {
60656
+ return [0, 100, gray[0]];
60657
+ };
60658
+ convert$2.gray.cmyk = function(gray) {
60659
+ return [0, 0, 0, gray[0]];
60660
+ };
60661
+ convert$2.gray.lab = function(gray) {
60662
+ return [gray[0], 0, 0];
60663
+ };
60664
+ convert$2.gray.hex = function(gray) {
60665
+ const value = Math.round(gray[0] / 100 * 255) & 255;
60666
+ const integer = (value << 16) + (value << 8) + value;
60667
+ const string2 = integer.toString(16).toUpperCase();
60668
+ return "000000".slice(string2.length) + string2;
60669
+ };
60670
+ convert$2.rgb.gray = function(rgb2) {
60671
+ const value = (rgb2[0] + rgb2[1] + rgb2[2]) / 3;
60672
+ return [value / 255 * 100];
60673
+ };
60674
+ function buildGraph() {
60675
+ const graph = {};
60676
+ const models2 = Object.keys(convert$2);
60677
+ for (let { length } = models2, i2 = 0; i2 < length; i2++) {
60678
+ graph[models2[i2]] = {
60679
+ // http://jsperf.com/1-vs-infinity
60680
+ // micro-opt, but this is simple.
60681
+ distance: -1,
60682
+ parent: null
60683
+ };
60684
+ }
60685
+ return graph;
60686
+ }
60687
+ __name(buildGraph, "buildGraph");
60688
+ function deriveBFS(fromModel) {
60689
+ const graph = buildGraph();
60690
+ const queue = [fromModel];
60691
+ graph[fromModel].distance = 0;
60692
+ while (queue.length > 0) {
60693
+ const current = queue.pop();
60694
+ const adjacents = Object.keys(convert$2[current]);
60695
+ for (let { length } = adjacents, i2 = 0; i2 < length; i2++) {
60696
+ const adjacent = adjacents[i2];
60697
+ const node2 = graph[adjacent];
60698
+ if (node2.distance === -1) {
60699
+ node2.distance = graph[current].distance + 1;
60700
+ node2.parent = current;
60701
+ queue.unshift(adjacent);
60702
+ }
60703
+ }
60704
+ }
60705
+ return graph;
60706
+ }
60707
+ __name(deriveBFS, "deriveBFS");
60708
+ function link$2(from, to) {
60709
+ return function(args) {
60710
+ return to(from(args));
60711
+ };
60712
+ }
60713
+ __name(link$2, "link$2");
60714
+ function wrapConversion(toModel, graph) {
60715
+ const path2 = [graph[toModel].parent, toModel];
60716
+ let fn2 = convert$2[graph[toModel].parent][toModel];
60717
+ let cur = graph[toModel].parent;
60718
+ while (graph[cur].parent) {
60719
+ path2.unshift(graph[cur].parent);
60720
+ fn2 = link$2(convert$2[graph[cur].parent][cur], fn2);
60721
+ cur = graph[cur].parent;
60722
+ }
60723
+ fn2.conversion = path2;
60724
+ return fn2;
60725
+ }
60726
+ __name(wrapConversion, "wrapConversion");
60727
+ function route(fromModel) {
60728
+ const graph = deriveBFS(fromModel);
60729
+ const conversion = {};
60730
+ const models2 = Object.keys(graph);
60731
+ for (let { length } = models2, i2 = 0; i2 < length; i2++) {
60732
+ const toModel = models2[i2];
60733
+ const node2 = graph[toModel];
60734
+ if (node2.parent === null) {
60735
+ continue;
60736
+ }
60737
+ conversion[toModel] = wrapConversion(toModel, graph);
60738
+ }
60739
+ return conversion;
60740
+ }
60741
+ __name(route, "route");
60742
+ const convert$1 = {};
60743
+ const models = Object.keys(convert$2);
60744
+ function wrapRaw(fn2) {
60745
+ const wrappedFn = /* @__PURE__ */ __name(function(...args) {
60746
+ const arg0 = args[0];
60747
+ if (arg0 === void 0 || arg0 === null) {
60748
+ return arg0;
61015
60749
  }
61016
- if (model && model in skippedModels) {
61017
- model = null;
60750
+ if (arg0.length > 1) {
60751
+ args = arg0;
61018
60752
  }
61019
- if (model && !(model in convert2)) {
61020
- throw new Error("Unknown model: " + model);
60753
+ return fn2(args);
60754
+ }, "wrappedFn");
60755
+ if ("conversion" in fn2) {
60756
+ wrappedFn.conversion = fn2.conversion;
60757
+ }
60758
+ return wrappedFn;
60759
+ }
60760
+ __name(wrapRaw, "wrapRaw");
60761
+ function wrapRounded(fn2) {
60762
+ const wrappedFn = /* @__PURE__ */ __name(function(...args) {
60763
+ const arg0 = args[0];
60764
+ if (arg0 === void 0 || arg0 === null) {
60765
+ return arg0;
61021
60766
  }
61022
- var i2;
61023
- var channels;
61024
- if (obj == null) {
61025
- this.model = "rgb";
61026
- this.color = [0, 0, 0];
61027
- this.valpha = 1;
61028
- } else if (obj instanceof Color2) {
61029
- this.model = obj.model;
61030
- this.color = obj.color.slice();
61031
- this.valpha = obj.valpha;
61032
- } else if (typeof obj === "string") {
61033
- var result = colorString2.get(obj);
61034
- if (result === null) {
61035
- throw new Error("Unable to parse color from string: " + obj);
61036
- }
61037
- this.model = result.model;
61038
- channels = convert2[this.model].channels;
61039
- this.color = result.value.slice(0, channels);
61040
- this.valpha = typeof result.value[channels] === "number" ? result.value[channels] : 1;
61041
- } else if (obj.length) {
61042
- this.model = model || "rgb";
61043
- channels = convert2[this.model].channels;
61044
- var newArr = _slice.call(obj, 0, channels);
61045
- this.color = zeroArray(newArr, channels);
61046
- this.valpha = typeof obj[channels] === "number" ? obj[channels] : 1;
61047
- } else if (typeof obj === "number") {
61048
- obj &= 16777215;
61049
- this.model = "rgb";
61050
- this.color = [
61051
- obj >> 16 & 255,
61052
- obj >> 8 & 255,
61053
- obj & 255
61054
- ];
61055
- this.valpha = 1;
61056
- } else {
61057
- this.valpha = 1;
61058
- var keys2 = Object.keys(obj);
61059
- if ("alpha" in obj) {
61060
- keys2.splice(keys2.indexOf("alpha"), 1);
61061
- this.valpha = typeof obj.alpha === "number" ? obj.alpha : 0;
61062
- }
61063
- var hashedKeys = keys2.sort().join("");
61064
- if (!(hashedKeys in hashedModelKeys)) {
61065
- throw new Error("Unable to parse color from object: " + JSON.stringify(obj));
61066
- }
61067
- this.model = hashedModelKeys[hashedKeys];
61068
- var labels = convert2[this.model].labels;
61069
- var color2 = [];
61070
- for (i2 = 0; i2 < labels.length; i2++) {
61071
- color2.push(obj[labels[i2]]);
61072
- }
61073
- this.color = zeroArray(color2);
61074
- }
61075
- if (limiters[this.model]) {
61076
- channels = convert2[this.model].channels;
61077
- for (i2 = 0; i2 < channels; i2++) {
61078
- var limit = limiters[this.model][i2];
61079
- if (limit) {
61080
- this.color[i2] = limit(this.color[i2]);
61081
- }
61082
- }
61083
- }
61084
- this.valpha = Math.max(0, Math.min(1, this.valpha));
61085
- if (Object.freeze) {
61086
- Object.freeze(this);
61087
- }
61088
- }
61089
- __name(Color2, "Color");
61090
- Color2.prototype = {
61091
- toString: /* @__PURE__ */ __name(function() {
61092
- return this.string();
61093
- }, "toString"),
61094
- toJSON: /* @__PURE__ */ __name(function() {
61095
- return this[this.model]();
61096
- }, "toJSON"),
61097
- string: /* @__PURE__ */ __name(function(places) {
61098
- var self2 = this.model in colorString2.to ? this : this.rgb();
61099
- self2 = self2.round(typeof places === "number" ? places : 1);
61100
- var args = self2.valpha === 1 ? self2.color : self2.color.concat(this.valpha);
61101
- return colorString2.to[self2.model](args);
61102
- }, "string"),
61103
- percentString: /* @__PURE__ */ __name(function(places) {
61104
- var self2 = this.rgb().round(typeof places === "number" ? places : 1);
61105
- var args = self2.valpha === 1 ? self2.color : self2.color.concat(this.valpha);
61106
- return colorString2.to.rgb.percent(args);
61107
- }, "percentString"),
61108
- array: /* @__PURE__ */ __name(function() {
61109
- return this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha);
61110
- }, "array"),
61111
- object: /* @__PURE__ */ __name(function() {
61112
- var result = {};
61113
- var channels = convert2[this.model].channels;
61114
- var labels = convert2[this.model].labels;
61115
- for (var i2 = 0; i2 < channels; i2++) {
61116
- result[labels[i2]] = this.color[i2];
61117
- }
61118
- if (this.valpha !== 1) {
61119
- result.alpha = this.valpha;
61120
- }
61121
- return result;
61122
- }, "object"),
61123
- unitArray: /* @__PURE__ */ __name(function() {
61124
- var rgb2 = this.rgb().color;
61125
- rgb2[0] /= 255;
61126
- rgb2[1] /= 255;
61127
- rgb2[2] /= 255;
61128
- if (this.valpha !== 1) {
61129
- rgb2.push(this.valpha);
61130
- }
61131
- return rgb2;
61132
- }, "unitArray"),
61133
- unitObject: /* @__PURE__ */ __name(function() {
61134
- var rgb2 = this.rgb().object();
61135
- rgb2.r /= 255;
61136
- rgb2.g /= 255;
61137
- rgb2.b /= 255;
61138
- if (this.valpha !== 1) {
61139
- rgb2.alpha = this.valpha;
61140
- }
61141
- return rgb2;
61142
- }, "unitObject"),
61143
- round: /* @__PURE__ */ __name(function(places) {
61144
- places = Math.max(places || 0, 0);
61145
- return new Color2(this.color.map(roundToPlace(places)).concat(this.valpha), this.model);
61146
- }, "round"),
61147
- alpha: /* @__PURE__ */ __name(function(val2) {
61148
- if (arguments.length) {
61149
- return new Color2(this.color.concat(Math.max(0, Math.min(1, val2))), this.model);
61150
- }
61151
- return this.valpha;
61152
- }, "alpha"),
61153
- // rgb
61154
- red: getset("rgb", 0, maxfn(255)),
61155
- green: getset("rgb", 1, maxfn(255)),
61156
- blue: getset("rgb", 2, maxfn(255)),
61157
- hue: getset(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, function(val2) {
61158
- return (val2 % 360 + 360) % 360;
61159
- }),
61160
- // eslint-disable-line brace-style
61161
- saturationl: getset("hsl", 1, maxfn(100)),
61162
- lightness: getset("hsl", 2, maxfn(100)),
61163
- saturationv: getset("hsv", 1, maxfn(100)),
61164
- value: getset("hsv", 2, maxfn(100)),
61165
- chroma: getset("hcg", 1, maxfn(100)),
61166
- gray: getset("hcg", 2, maxfn(100)),
61167
- white: getset("hwb", 1, maxfn(100)),
61168
- wblack: getset("hwb", 2, maxfn(100)),
61169
- cyan: getset("cmyk", 0, maxfn(100)),
61170
- magenta: getset("cmyk", 1, maxfn(100)),
61171
- yellow: getset("cmyk", 2, maxfn(100)),
61172
- black: getset("cmyk", 3, maxfn(100)),
61173
- x: getset("xyz", 0, maxfn(100)),
61174
- y: getset("xyz", 1, maxfn(100)),
61175
- z: getset("xyz", 2, maxfn(100)),
61176
- l: getset("lab", 0, maxfn(100)),
61177
- a: getset("lab", 1),
61178
- b: getset("lab", 2),
61179
- keyword: /* @__PURE__ */ __name(function(val2) {
61180
- if (arguments.length) {
61181
- return new Color2(val2);
61182
- }
61183
- return convert2[this.model].keyword(this.color);
61184
- }, "keyword"),
61185
- hex: /* @__PURE__ */ __name(function(val2) {
61186
- if (arguments.length) {
61187
- return new Color2(val2);
61188
- }
61189
- return colorString2.to.hex(this.rgb().round().color);
61190
- }, "hex"),
61191
- rgbNumber: /* @__PURE__ */ __name(function() {
61192
- var rgb2 = this.rgb().color;
61193
- return (rgb2[0] & 255) << 16 | (rgb2[1] & 255) << 8 | rgb2[2] & 255;
61194
- }, "rgbNumber"),
61195
- luminosity: /* @__PURE__ */ __name(function() {
61196
- var rgb2 = this.rgb().color;
61197
- var lum = [];
61198
- for (var i2 = 0; i2 < rgb2.length; i2++) {
61199
- var chan = rgb2[i2] / 255;
61200
- lum[i2] = chan <= 0.03928 ? chan / 12.92 : Math.pow((chan + 0.055) / 1.055, 2.4);
61201
- }
61202
- return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
61203
- }, "luminosity"),
61204
- contrast: /* @__PURE__ */ __name(function(color2) {
61205
- var lum1 = this.luminosity();
61206
- var lum2 = color2.luminosity();
61207
- if (lum1 > lum2) {
61208
- return (lum1 + 0.05) / (lum2 + 0.05);
61209
- }
61210
- return (lum2 + 0.05) / (lum1 + 0.05);
61211
- }, "contrast"),
61212
- level: /* @__PURE__ */ __name(function(color2) {
61213
- var contrastRatio = this.contrast(color2);
61214
- if (contrastRatio >= 7.1) {
61215
- return "AAA";
61216
- }
61217
- return contrastRatio >= 4.5 ? "AA" : "";
61218
- }, "level"),
61219
- isDark: /* @__PURE__ */ __name(function() {
61220
- var rgb2 = this.rgb().color;
61221
- var yiq = (rgb2[0] * 299 + rgb2[1] * 587 + rgb2[2] * 114) / 1e3;
61222
- return yiq < 128;
61223
- }, "isDark"),
61224
- isLight: /* @__PURE__ */ __name(function() {
61225
- return !this.isDark();
61226
- }, "isLight"),
61227
- negate: /* @__PURE__ */ __name(function() {
61228
- var rgb2 = this.rgb();
61229
- for (var i2 = 0; i2 < 3; i2++) {
61230
- rgb2.color[i2] = 255 - rgb2.color[i2];
61231
- }
61232
- return rgb2;
61233
- }, "negate"),
61234
- lighten: /* @__PURE__ */ __name(function(ratio) {
61235
- var hsl2 = this.hsl();
61236
- hsl2.color[2] += hsl2.color[2] * ratio;
61237
- return hsl2;
61238
- }, "lighten"),
61239
- darken: /* @__PURE__ */ __name(function(ratio) {
61240
- var hsl2 = this.hsl();
61241
- hsl2.color[2] -= hsl2.color[2] * ratio;
61242
- return hsl2;
61243
- }, "darken"),
61244
- saturate: /* @__PURE__ */ __name(function(ratio) {
61245
- var hsl2 = this.hsl();
61246
- hsl2.color[1] += hsl2.color[1] * ratio;
61247
- return hsl2;
61248
- }, "saturate"),
61249
- desaturate: /* @__PURE__ */ __name(function(ratio) {
61250
- var hsl2 = this.hsl();
61251
- hsl2.color[1] -= hsl2.color[1] * ratio;
61252
- return hsl2;
61253
- }, "desaturate"),
61254
- whiten: /* @__PURE__ */ __name(function(ratio) {
61255
- var hwb = this.hwb();
61256
- hwb.color[1] += hwb.color[1] * ratio;
61257
- return hwb;
61258
- }, "whiten"),
61259
- blacken: /* @__PURE__ */ __name(function(ratio) {
61260
- var hwb = this.hwb();
61261
- hwb.color[2] += hwb.color[2] * ratio;
61262
- return hwb;
61263
- }, "blacken"),
61264
- grayscale: /* @__PURE__ */ __name(function() {
61265
- var rgb2 = this.rgb().color;
61266
- var val2 = rgb2[0] * 0.3 + rgb2[1] * 0.59 + rgb2[2] * 0.11;
61267
- return Color2.rgb(val2, val2, val2);
61268
- }, "grayscale"),
61269
- fade: /* @__PURE__ */ __name(function(ratio) {
61270
- return this.alpha(this.valpha - this.valpha * ratio);
61271
- }, "fade"),
61272
- opaquer: /* @__PURE__ */ __name(function(ratio) {
61273
- return this.alpha(this.valpha + this.valpha * ratio);
61274
- }, "opaquer"),
61275
- rotate: /* @__PURE__ */ __name(function(degrees) {
61276
- var hsl2 = this.hsl();
61277
- var hue = hsl2.color[0];
61278
- hue = (hue + degrees) % 360;
61279
- hue = hue < 0 ? 360 + hue : hue;
61280
- hsl2.color[0] = hue;
61281
- return hsl2;
61282
- }, "rotate"),
61283
- mix: /* @__PURE__ */ __name(function(mixinColor, weight) {
61284
- if (!mixinColor || !mixinColor.rgb) {
61285
- throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor);
61286
- }
61287
- var color1 = mixinColor.rgb();
61288
- var color2 = this.rgb();
61289
- var p2 = weight === void 0 ? 0.5 : weight;
61290
- var w2 = 2 * p2 - 1;
61291
- var a2 = color1.alpha() - color2.alpha();
61292
- var w1 = ((w2 * a2 === -1 ? w2 : (w2 + a2) / (1 + w2 * a2)) + 1) / 2;
61293
- var w22 = 1 - w1;
61294
- return Color2.rgb(
61295
- w1 * color1.red() + w22 * color2.red(),
61296
- w1 * color1.green() + w22 * color2.green(),
61297
- w1 * color1.blue() + w22 * color2.blue(),
61298
- color1.alpha() * p2 + color2.alpha() * (1 - p2)
61299
- );
61300
- }, "mix")
61301
- };
61302
- Object.keys(convert2).forEach(function(model) {
61303
- if (skippedModels.indexOf(model) !== -1) {
61304
- return;
60767
+ if (arg0.length > 1) {
60768
+ args = arg0;
61305
60769
  }
61306
- var channels = convert2[model].channels;
61307
- Color2.prototype[model] = function() {
61308
- if (this.model === model) {
61309
- return new Color2(this);
61310
- }
61311
- if (arguments.length) {
61312
- return new Color2(arguments, model);
61313
- }
61314
- var newAlpha = typeof arguments[channels] === "number" ? channels : this.valpha;
61315
- return new Color2(assertArray(convert2[this.model][model].raw(this.color)).concat(newAlpha), model);
61316
- };
61317
- Color2[model] = function(color2) {
61318
- if (typeof color2 === "number") {
61319
- color2 = zeroArray(_slice.call(arguments), channels);
60770
+ const result = fn2(args);
60771
+ if (typeof result === "object") {
60772
+ for (let { length } = result, i2 = 0; i2 < length; i2++) {
60773
+ result[i2] = Math.round(result[i2]);
61320
60774
  }
61321
- return new Color2(color2, model);
61322
- };
61323
- });
61324
- function roundTo(num, places) {
61325
- return Number(num.toFixed(places));
60775
+ }
60776
+ return result;
60777
+ }, "wrappedFn");
60778
+ if ("conversion" in fn2) {
60779
+ wrappedFn.conversion = fn2.conversion;
60780
+ }
60781
+ return wrappedFn;
60782
+ }
60783
+ __name(wrapRounded, "wrapRounded");
60784
+ for (const fromModel of models) {
60785
+ convert$1[fromModel] = {};
60786
+ Object.defineProperty(convert$1[fromModel], "channels", { value: convert$2[fromModel].channels });
60787
+ Object.defineProperty(convert$1[fromModel], "labels", { value: convert$2[fromModel].labels });
60788
+ const routes = route(fromModel);
60789
+ const routeModels = Object.keys(routes);
60790
+ for (const toModel of routeModels) {
60791
+ const fn2 = routes[toModel];
60792
+ convert$1[fromModel][toModel] = wrapRounded(fn2);
60793
+ convert$1[fromModel][toModel].raw = wrapRaw(fn2);
60794
+ }
60795
+ }
60796
+ const skippedModels = [
60797
+ // To be honest, I don't really feel like keyword belongs in color convert, but eh.
60798
+ "keyword",
60799
+ // Gray conflicts with some method names, and has its own method defined.
60800
+ "gray",
60801
+ // Shouldn't really be in color-convert either...
60802
+ "hex"
60803
+ ];
60804
+ const hashedModelKeys = {};
60805
+ for (const model of Object.keys(convert$1)) {
60806
+ hashedModelKeys[[...convert$1[model].labels].sort().join("")] = model;
60807
+ }
60808
+ const limiters = {};
60809
+ function Color(object2, model) {
60810
+ if (!(this instanceof Color)) {
60811
+ return new Color(object2, model);
61326
60812
  }
61327
- __name(roundTo, "roundTo");
61328
- function roundToPlace(places) {
61329
- return function(num) {
61330
- return roundTo(num, places);
61331
- };
60813
+ if (model && model in skippedModels) {
60814
+ model = null;
61332
60815
  }
61333
- __name(roundToPlace, "roundToPlace");
61334
- function getset(model, channel, modifier) {
61335
- model = Array.isArray(model) ? model : [model];
61336
- model.forEach(function(m2) {
61337
- (limiters[m2] || (limiters[m2] = []))[channel] = modifier;
61338
- });
61339
- model = model[0];
61340
- return function(val2) {
61341
- var result;
61342
- if (arguments.length) {
61343
- if (modifier) {
61344
- val2 = modifier(val2);
61345
- }
61346
- result = this[model]();
61347
- result.color[channel] = val2;
61348
- return result;
61349
- }
61350
- result = this[model]().color[channel];
61351
- if (modifier) {
61352
- result = modifier(result);
60816
+ if (model && !(model in convert$1)) {
60817
+ throw new Error("Unknown model: " + model);
60818
+ }
60819
+ let i2;
60820
+ let channels;
60821
+ if (object2 == null) {
60822
+ this.model = "rgb";
60823
+ this.color = [0, 0, 0];
60824
+ this.valpha = 1;
60825
+ } else if (object2 instanceof Color) {
60826
+ this.model = object2.model;
60827
+ this.color = [...object2.color];
60828
+ this.valpha = object2.valpha;
60829
+ } else if (typeof object2 === "string") {
60830
+ const result = cs.get(object2);
60831
+ if (result === null) {
60832
+ throw new Error("Unable to parse color from string: " + object2);
60833
+ }
60834
+ this.model = result.model;
60835
+ channels = convert$1[this.model].channels;
60836
+ this.color = result.value.slice(0, channels);
60837
+ this.valpha = typeof result.value[channels] === "number" ? result.value[channels] : 1;
60838
+ } else if (object2.length > 0) {
60839
+ this.model = model || "rgb";
60840
+ channels = convert$1[this.model].channels;
60841
+ const newArray = Array.prototype.slice.call(object2, 0, channels);
60842
+ this.color = zeroArray(newArray, channels);
60843
+ this.valpha = typeof object2[channels] === "number" ? object2[channels] : 1;
60844
+ } else if (typeof object2 === "number") {
60845
+ this.model = "rgb";
60846
+ this.color = [
60847
+ object2 >> 16 & 255,
60848
+ object2 >> 8 & 255,
60849
+ object2 & 255
60850
+ ];
60851
+ this.valpha = 1;
60852
+ } else {
60853
+ this.valpha = 1;
60854
+ const keys2 = Object.keys(object2);
60855
+ if ("alpha" in object2) {
60856
+ keys2.splice(keys2.indexOf("alpha"), 1);
60857
+ this.valpha = typeof object2.alpha === "number" ? object2.alpha : 0;
60858
+ }
60859
+ const hashedKeys = keys2.sort().join("");
60860
+ if (!(hashedKeys in hashedModelKeys)) {
60861
+ throw new Error("Unable to parse color from object: " + JSON.stringify(object2));
60862
+ }
60863
+ this.model = hashedModelKeys[hashedKeys];
60864
+ const { labels } = convert$1[this.model];
60865
+ const color2 = [];
60866
+ for (i2 = 0; i2 < labels.length; i2++) {
60867
+ color2.push(object2[labels[i2]]);
60868
+ }
60869
+ this.color = zeroArray(color2);
60870
+ }
60871
+ if (limiters[this.model]) {
60872
+ channels = convert$1[this.model].channels;
60873
+ for (i2 = 0; i2 < channels; i2++) {
60874
+ const limit = limiters[this.model][i2];
60875
+ if (limit) {
60876
+ this.color[i2] = limit(this.color[i2]);
61353
60877
  }
61354
- return result;
61355
- };
60878
+ }
61356
60879
  }
61357
- __name(getset, "getset");
61358
- function maxfn(max2) {
61359
- return function(v2) {
61360
- return Math.max(0, Math.min(max2, v2));
61361
- };
60880
+ this.valpha = Math.max(0, Math.min(1, this.valpha));
60881
+ if (Object.freeze) {
60882
+ Object.freeze(this);
61362
60883
  }
61363
- __name(maxfn, "maxfn");
61364
- function assertArray(val2) {
61365
- return Array.isArray(val2) ? val2 : [val2];
60884
+ }
60885
+ __name(Color, "Color");
60886
+ Color.prototype = {
60887
+ toString() {
60888
+ return this.string();
60889
+ },
60890
+ toJSON() {
60891
+ return this[this.model]();
60892
+ },
60893
+ string(places) {
60894
+ let self2 = this.model in cs.to ? this : this.rgb();
60895
+ self2 = self2.round(typeof places === "number" ? places : 1);
60896
+ const arguments_ = self2.valpha === 1 ? self2.color : [...self2.color, this.valpha];
60897
+ return cs.to[self2.model](...arguments_);
60898
+ },
60899
+ percentString(places) {
60900
+ const self2 = this.rgb().round(typeof places === "number" ? places : 1);
60901
+ const arguments_ = self2.valpha === 1 ? self2.color : [...self2.color, this.valpha];
60902
+ return cs.to.rgb.percent(...arguments_);
60903
+ },
60904
+ array() {
60905
+ return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
60906
+ },
60907
+ object() {
60908
+ const result = {};
60909
+ const { channels } = convert$1[this.model];
60910
+ const { labels } = convert$1[this.model];
60911
+ for (let i2 = 0; i2 < channels; i2++) {
60912
+ result[labels[i2]] = this.color[i2];
60913
+ }
60914
+ if (this.valpha !== 1) {
60915
+ result.alpha = this.valpha;
60916
+ }
60917
+ return result;
60918
+ },
60919
+ unitArray() {
60920
+ const rgb2 = this.rgb().color;
60921
+ rgb2[0] /= 255;
60922
+ rgb2[1] /= 255;
60923
+ rgb2[2] /= 255;
60924
+ if (this.valpha !== 1) {
60925
+ rgb2.push(this.valpha);
60926
+ }
60927
+ return rgb2;
60928
+ },
60929
+ unitObject() {
60930
+ const rgb2 = this.rgb().object();
60931
+ rgb2.r /= 255;
60932
+ rgb2.g /= 255;
60933
+ rgb2.b /= 255;
60934
+ if (this.valpha !== 1) {
60935
+ rgb2.alpha = this.valpha;
60936
+ }
60937
+ return rgb2;
60938
+ },
60939
+ round(places) {
60940
+ places = Math.max(places || 0, 0);
60941
+ return new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);
60942
+ },
60943
+ alpha(value) {
60944
+ if (value !== void 0) {
60945
+ return new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);
60946
+ }
60947
+ return this.valpha;
60948
+ },
60949
+ // Rgb
60950
+ red: getset("rgb", 0, maxfn(255)),
60951
+ green: getset("rgb", 1, maxfn(255)),
60952
+ blue: getset("rgb", 2, maxfn(255)),
60953
+ hue: getset(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, (value) => (value % 360 + 360) % 360),
60954
+ saturationl: getset("hsl", 1, maxfn(100)),
60955
+ lightness: getset("hsl", 2, maxfn(100)),
60956
+ saturationv: getset("hsv", 1, maxfn(100)),
60957
+ value: getset("hsv", 2, maxfn(100)),
60958
+ chroma: getset("hcg", 1, maxfn(100)),
60959
+ gray: getset("hcg", 2, maxfn(100)),
60960
+ white: getset("hwb", 1, maxfn(100)),
60961
+ wblack: getset("hwb", 2, maxfn(100)),
60962
+ cyan: getset("cmyk", 0, maxfn(100)),
60963
+ magenta: getset("cmyk", 1, maxfn(100)),
60964
+ yellow: getset("cmyk", 2, maxfn(100)),
60965
+ black: getset("cmyk", 3, maxfn(100)),
60966
+ x: getset("xyz", 0, maxfn(95.047)),
60967
+ y: getset("xyz", 1, maxfn(100)),
60968
+ z: getset("xyz", 2, maxfn(108.833)),
60969
+ l: getset("lab", 0, maxfn(100)),
60970
+ a: getset("lab", 1),
60971
+ b: getset("lab", 2),
60972
+ keyword(value) {
60973
+ if (value !== void 0) {
60974
+ return new Color(value);
60975
+ }
60976
+ return convert$1[this.model].keyword(this.color);
60977
+ },
60978
+ hex(value) {
60979
+ if (value !== void 0) {
60980
+ return new Color(value);
60981
+ }
60982
+ return cs.to.hex(...this.rgb().round().color);
60983
+ },
60984
+ hexa(value) {
60985
+ if (value !== void 0) {
60986
+ return new Color(value);
60987
+ }
60988
+ const rgbArray = this.rgb().round().color;
60989
+ let alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();
60990
+ if (alphaHex.length === 1) {
60991
+ alphaHex = "0" + alphaHex;
60992
+ }
60993
+ return cs.to.hex(...rgbArray) + alphaHex;
60994
+ },
60995
+ rgbNumber() {
60996
+ const rgb2 = this.rgb().color;
60997
+ return (rgb2[0] & 255) << 16 | (rgb2[1] & 255) << 8 | rgb2[2] & 255;
60998
+ },
60999
+ luminosity() {
61000
+ const rgb2 = this.rgb().color;
61001
+ const lum = [];
61002
+ for (const [i2, element2] of rgb2.entries()) {
61003
+ const chan = element2 / 255;
61004
+ lum[i2] = chan <= 0.04045 ? chan / 12.92 : __pow((chan + 0.055) / 1.055, 2.4);
61005
+ }
61006
+ return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
61007
+ },
61008
+ contrast(color2) {
61009
+ const lum1 = this.luminosity();
61010
+ const lum2 = color2.luminosity();
61011
+ if (lum1 > lum2) {
61012
+ return (lum1 + 0.05) / (lum2 + 0.05);
61013
+ }
61014
+ return (lum2 + 0.05) / (lum1 + 0.05);
61015
+ },
61016
+ level(color2) {
61017
+ const contrastRatio = this.contrast(color2);
61018
+ if (contrastRatio >= 7) {
61019
+ return "AAA";
61020
+ }
61021
+ return contrastRatio >= 4.5 ? "AA" : "";
61022
+ },
61023
+ isDark() {
61024
+ const rgb2 = this.rgb().color;
61025
+ const yiq = (rgb2[0] * 2126 + rgb2[1] * 7152 + rgb2[2] * 722) / 1e4;
61026
+ return yiq < 128;
61027
+ },
61028
+ isLight() {
61029
+ return !this.isDark();
61030
+ },
61031
+ negate() {
61032
+ const rgb2 = this.rgb();
61033
+ for (let i2 = 0; i2 < 3; i2++) {
61034
+ rgb2.color[i2] = 255 - rgb2.color[i2];
61035
+ }
61036
+ return rgb2;
61037
+ },
61038
+ lighten(ratio) {
61039
+ const hsl2 = this.hsl();
61040
+ hsl2.color[2] += hsl2.color[2] * ratio;
61041
+ return hsl2;
61042
+ },
61043
+ darken(ratio) {
61044
+ const hsl2 = this.hsl();
61045
+ hsl2.color[2] -= hsl2.color[2] * ratio;
61046
+ return hsl2;
61047
+ },
61048
+ saturate(ratio) {
61049
+ const hsl2 = this.hsl();
61050
+ hsl2.color[1] += hsl2.color[1] * ratio;
61051
+ return hsl2;
61052
+ },
61053
+ desaturate(ratio) {
61054
+ const hsl2 = this.hsl();
61055
+ hsl2.color[1] -= hsl2.color[1] * ratio;
61056
+ return hsl2;
61057
+ },
61058
+ whiten(ratio) {
61059
+ const hwb = this.hwb();
61060
+ hwb.color[1] += hwb.color[1] * ratio;
61061
+ return hwb;
61062
+ },
61063
+ blacken(ratio) {
61064
+ const hwb = this.hwb();
61065
+ hwb.color[2] += hwb.color[2] * ratio;
61066
+ return hwb;
61067
+ },
61068
+ grayscale() {
61069
+ const rgb2 = this.rgb().color;
61070
+ const value = rgb2[0] * 0.3 + rgb2[1] * 0.59 + rgb2[2] * 0.11;
61071
+ return Color.rgb(value, value, value);
61072
+ },
61073
+ fade(ratio) {
61074
+ return this.alpha(this.valpha - this.valpha * ratio);
61075
+ },
61076
+ opaquer(ratio) {
61077
+ return this.alpha(this.valpha + this.valpha * ratio);
61078
+ },
61079
+ rotate(degrees) {
61080
+ const hsl2 = this.hsl();
61081
+ let hue = hsl2.color[0];
61082
+ hue = (hue + degrees) % 360;
61083
+ hue = hue < 0 ? 360 + hue : hue;
61084
+ hsl2.color[0] = hue;
61085
+ return hsl2;
61086
+ },
61087
+ mix(mixinColor, weight) {
61088
+ if (!mixinColor || !mixinColor.rgb) {
61089
+ throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor);
61090
+ }
61091
+ const color1 = mixinColor.rgb();
61092
+ const color2 = this.rgb();
61093
+ const p2 = weight === void 0 ? 0.5 : weight;
61094
+ const w2 = 2 * p2 - 1;
61095
+ const a2 = color1.alpha() - color2.alpha();
61096
+ const w1 = ((w2 * a2 === -1 ? w2 : (w2 + a2) / (1 + w2 * a2)) + 1) / 2;
61097
+ const w22 = 1 - w1;
61098
+ return Color.rgb(
61099
+ w1 * color1.red() + w22 * color2.red(),
61100
+ w1 * color1.green() + w22 * color2.green(),
61101
+ w1 * color1.blue() + w22 * color2.blue(),
61102
+ color1.alpha() * p2 + color2.alpha() * (1 - p2)
61103
+ );
61366
61104
  }
61367
- __name(assertArray, "assertArray");
61368
- function zeroArray(arr, length) {
61369
- for (var i2 = 0; i2 < length; i2++) {
61370
- if (typeof arr[i2] !== "number") {
61371
- arr[i2] = 0;
61105
+ };
61106
+ for (const model of Object.keys(convert$1)) {
61107
+ if (skippedModels.includes(model)) {
61108
+ continue;
61109
+ }
61110
+ const { channels } = convert$1[model];
61111
+ Color.prototype[model] = function(...arguments_) {
61112
+ if (this.model === model) {
61113
+ return new Color(this);
61114
+ }
61115
+ if (arguments_.length > 0) {
61116
+ return new Color(arguments_, model);
61117
+ }
61118
+ return new Color([...assertArray(convert$1[this.model][model].raw(this.color)), this.valpha], model);
61119
+ };
61120
+ Color[model] = function(...arguments_) {
61121
+ let color2 = arguments_[0];
61122
+ if (typeof color2 === "number") {
61123
+ color2 = zeroArray(arguments_, channels);
61124
+ }
61125
+ return new Color(color2, model);
61126
+ };
61127
+ }
61128
+ function roundTo(number2, places) {
61129
+ return Number(number2.toFixed(places));
61130
+ }
61131
+ __name(roundTo, "roundTo");
61132
+ function roundToPlace(places) {
61133
+ return function(number2) {
61134
+ return roundTo(number2, places);
61135
+ };
61136
+ }
61137
+ __name(roundToPlace, "roundToPlace");
61138
+ function getset(model, channel, modifier) {
61139
+ model = Array.isArray(model) ? model : [model];
61140
+ for (const m2 of model) {
61141
+ (limiters[m2] || (limiters[m2] = []))[channel] = modifier;
61142
+ }
61143
+ model = model[0];
61144
+ return function(value) {
61145
+ let result;
61146
+ if (value !== void 0) {
61147
+ if (modifier) {
61148
+ value = modifier(value);
61372
61149
  }
61150
+ result = this[model]();
61151
+ result.color[channel] = value;
61152
+ return result;
61153
+ }
61154
+ result = this[model]().color[channel];
61155
+ if (modifier) {
61156
+ result = modifier(result);
61157
+ }
61158
+ return result;
61159
+ };
61160
+ }
61161
+ __name(getset, "getset");
61162
+ function maxfn(max2) {
61163
+ return function(v2) {
61164
+ return Math.max(0, Math.min(max2, v2));
61165
+ };
61166
+ }
61167
+ __name(maxfn, "maxfn");
61168
+ function assertArray(value) {
61169
+ return Array.isArray(value) ? value : [value];
61170
+ }
61171
+ __name(assertArray, "assertArray");
61172
+ function zeroArray(array, length) {
61173
+ for (let i2 = 0; i2 < length; i2++) {
61174
+ if (typeof array[i2] !== "number") {
61175
+ array[i2] = 0;
61373
61176
  }
61374
- return arr;
61375
61177
  }
61376
- __name(zeroArray, "zeroArray");
61377
- color$3 = Color2;
61378
- return color$3;
61178
+ return array;
61379
61179
  }
61380
- __name(requireColor, "requireColor");
61381
- var colorExports = requireColor();
61382
- const Color = /* @__PURE__ */ getDefaultExportFromCjs(colorExports);
61180
+ __name(zeroArray, "zeroArray");
61383
61181
  function determineBlackOrWhiteTextColor(c2) {
61384
61182
  try {
61385
61183
  return Color(c2).isLight() ? "#000000" : "#FFFFFF";
@@ -69072,10 +68870,10 @@ ${latestSubscriptionCallbackError.current.stack}
69072
68870
  effects.enter("chunkString", {
69073
68871
  contentType: "string"
69074
68872
  });
69075
- return meta(code2);
68873
+ return meta2(code2);
69076
68874
  }
69077
68875
  __name(metaBefore, "metaBefore");
69078
- function meta(code2) {
68876
+ function meta2(code2) {
69079
68877
  if (code2 === null || markdownLineEnding(code2)) {
69080
68878
  effects.exit("chunkString");
69081
68879
  effects.exit("codeFencedFenceMeta");
@@ -69085,9 +68883,9 @@ ${latestSubscriptionCallbackError.current.stack}
69085
68883
  return nok(code2);
69086
68884
  }
69087
68885
  effects.consume(code2);
69088
- return meta;
68886
+ return meta2;
69089
68887
  }
69090
- __name(meta, "meta");
68888
+ __name(meta2, "meta");
69091
68889
  function atNonLazyBreak(code2) {
69092
68890
  return effects.attempt(closeStart, after, contentBefore)(code2);
69093
68891
  }
@@ -85004,6 +84802,34 @@ ${latestSubscriptionCallbackError.current.stack}
85004
84802
  $mobx
85005
84803
  });
85006
84804
  }
84805
+ const keyCount = {};
84806
+ const timeout = {};
84807
+ const isBeingCalledExcessively = /* @__PURE__ */ __name(({
84808
+ uniqName
84809
+ }) => {
84810
+ if (process.env["NODE_ENV"] !== "development") {
84811
+ return;
84812
+ }
84813
+ if (!uniqName) {
84814
+ throw new Error("uniqName is required");
84815
+ }
84816
+ keyCount[uniqName] = keyCount[uniqName] || 0;
84817
+ keyCount[uniqName]++;
84818
+ if (!timeout[uniqName]) {
84819
+ timeout[uniqName] = setTimeout(() => {
84820
+ keyCount[uniqName] = 0;
84821
+ timeout[uniqName] = null;
84822
+ }, 2e3);
84823
+ }
84824
+ if (keyCount[uniqName] > 20) {
84825
+ keyCount[uniqName] = 0;
84826
+ if (timeout[uniqName]) {
84827
+ clearTimeout(timeout[uniqName]);
84828
+ timeout[uniqName] = null;
84829
+ }
84830
+ throw new Error(`isBeingCalledExcessively: ${uniqName}`);
84831
+ }
84832
+ }, "isBeingCalledExcessively");
85007
84833
  T$1();
85008
84834
  const IS_LINUX = window.navigator.platform.toLowerCase().search("linux") > -1;
85009
84835
  const itemSizeEstimators = {
@@ -85352,6 +85178,7 @@ ${latestSubscriptionCallbackError.current.stack}
85352
85178
  const entities = useDeepEqualMemo(_entities);
85353
85179
  const entitiesAcrossPages = useDeepEqualMemo(_entitiesAcrossPages);
85354
85180
  reactExports.useEffect(() => {
85181
+ !noExcessiveCheck && isBeingCalledExcessively({ uniqName: `dt_entities_${formName}` });
85355
85182
  change$12("allOrderedEntities", entitiesAcrossPages);
85356
85183
  if (entities.length === 0 || isEmpty$1(reduxFormSelectedEntityIdMap)) return;
85357
85184
  changeSelectedEntities({
@@ -85374,6 +85201,7 @@ ${latestSubscriptionCallbackError.current.stack}
85374
85201
  } else {
85375
85202
  newTableConfig = getTableConfigFromStorage(formName);
85376
85203
  }
85204
+ !noExcessiveCheck && isBeingCalledExcessively({ uniqName: `dt_setTableConfig_${formName}` });
85377
85205
  setTableConfig((prev) => {
85378
85206
  if (!newTableConfig) {
85379
85207
  newTableConfig = {
@@ -104053,7 +103881,9 @@ ${latestSubscriptionCallbackError.current.stack}
104053
103881
  const combo = typeof def === "string" ? def : def.combo;
104054
103882
  if (useSymbols) {
104055
103883
  let parts2 = combo.replace("++", "+plus").split("+");
104056
- parts2 = parts2.map((p2) => symbols[p2] || startCase(p2) || p2);
103884
+ parts2 = parts2.map(
103885
+ (p2) => p2 in symbols ? symbols[p2] : startCase(p2) || p2
103886
+ );
104057
103887
  return parts2.join("");
104058
103888
  } else {
104059
103889
  return combo.split("+").map((p2) => startCase(p2) || p2).join(" + ").replace("Meta", isMac ? "Cmd" : "Ctrl").replace("Mod", isMac ? "Cmd" : "Ctrl").replace("Alt", isMac ? "Option" : "Alt");
@@ -104063,7 +103893,7 @@ ${latestSubscriptionCallbackError.current.stack}
104063
103893
  const getHotkeyProps = /* @__PURE__ */ __name((def, id2) => {
104064
103894
  let out;
104065
103895
  if (typeof def === "string") {
104066
- out = { combo: def };
103896
+ out = { combo: def, label: def };
104067
103897
  } else if (def instanceof Array) {
104068
103898
  out = __spreadValues({ combo: def[0], label: def[1] }, def[2] || {});
104069
103899
  } else {
@@ -104098,15 +103928,18 @@ ${latestSubscriptionCallbackError.current.stack}
104098
103928
  React.cloneElement(children, newProps)
104099
103929
  ) : (
104100
103930
  //if not, then we'll return a div that can be used
104101
- /* @__PURE__ */ React.createElement("div", __spreadValues({ className: "hotkeyHandler" }, newProps))
103931
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", __spreadValues({ className: "hotkeyHandler" }, newProps))
104102
103932
  );
104103
103933
  };
104104
103934
  }, "withHotkeys");
104105
103935
  const isMac = navigator.userAgent.includes("Mac OS X");
103936
+ const cmd = "⌘";
103937
+ const meta = "⌘";
103938
+ const ctrl = "⌃";
104106
103939
  const symbols = {
104107
- cmd: "⌘",
104108
- meta: "⌘",
104109
- ctrl: "⌃",
103940
+ cmd,
103941
+ meta,
103942
+ ctrl,
104110
103943
  alt: "⌥",
104111
103944
  shift: "⇧",
104112
103945
  esc: "␛",
@@ -104124,9 +103957,9 @@ ${latestSubscriptionCallbackError.current.stack}
104124
103957
  left: "←",
104125
103958
  right: "→",
104126
103959
  up: "↑",
104127
- down: "↓"
103960
+ down: "↓",
103961
+ mod: isMac ? cmd : ctrl
104128
103962
  };
104129
- symbols.mod = symbols[isMac ? "meta" : "ctrl"];
104130
103963
  let MenuBar$1 = (_C = class extends React.Component {
104131
103964
  constructor(props) {
104132
103965
  super(props);
@@ -105014,21 +104847,21 @@ ${latestSubscriptionCallbackError.current.stack}
105014
104847
  }
105015
104848
  __name(getCommandHotkeyHandlers, "getCommandHotkeyHandlers");
105016
104849
  const withCommand = /* @__PURE__ */ __name((mappings) => (WrappedComponent) => (_a2) => {
105017
- var _b2 = _a2, { cmd, cmdOptions = {} } = _b2, props = __objRest(_b2, ["cmd", "cmdOptions"]);
104850
+ var _b2 = _a2, { cmd: cmd2, cmdOptions = {} } = _b2, props = __objRest(_b2, ["cmd", "cmdOptions"]);
105018
104851
  const mappedProps = {};
105019
104852
  Object.keys(mappings).forEach((k2) => {
105020
- mappedProps[k2] = mappings[k2] === "execute" ? (event) => cmd.execute({ event }) : typeof mappings[k2] === "function" ? mappings[k2](cmd, props) : cmd[mappings[k2]];
104853
+ mappedProps[k2] = mappings[k2] === "execute" ? (event) => cmd2.execute({ event }) : typeof mappings[k2] === "function" ? mappings[k2](cmd2, props) : cmd2[mappings[k2]];
105021
104854
  });
105022
104855
  let out = /* @__PURE__ */ React.createElement(WrappedComponent, __spreadValues(__spreadValues({}, mappedProps), props));
105023
- const tooltip = cmd.tooltip || typeof cmd.isDisabled === "string" && cmd.isDisabled;
104856
+ const tooltip = cmd2.tooltip || typeof cmd2.isDisabled === "string" && cmd2.isDisabled;
105024
104857
  if (tooltip && !cmdOptions.ignoreTooltip) {
105025
104858
  out = /* @__PURE__ */ React.createElement(Tooltip, { content: tooltip }, out);
105026
104859
  }
105027
- return cmd.isHidden && !cmdOptions.ignoreHidden ? null : out;
104860
+ return cmd2.isHidden && !cmdOptions.ignoreHidden ? null : out;
105028
104861
  }, "withCommand");
105029
104862
  const CmdCheckbox = withCommand({
105030
104863
  onChange: "execute",
105031
- label: /* @__PURE__ */ __name((cmd, props) => props.name || props.prefix && /* @__PURE__ */ React.createElement(React.Fragment, null, props.prefix, cmd.name) || cmd.name, "label"),
104864
+ label: /* @__PURE__ */ __name((cmd2, props) => props.name || props.prefix && /* @__PURE__ */ React.createElement(React.Fragment, null, props.prefix, cmd2.name) || cmd2.name, "label"),
105032
104865
  disabled: "isDisabled",
105033
104866
  checked: "isActive"
105034
104867
  })(Checkbox);
@@ -105037,13 +104870,13 @@ ${latestSubscriptionCallbackError.current.stack}
105037
104870
  }, "Div");
105038
104871
  const CmdDiv = withCommand({
105039
104872
  onChange: "execute",
105040
- children: /* @__PURE__ */ __name((cmd, props) => props.name || props.prefix && /* @__PURE__ */ React.createElement(React.Fragment, null, props.prefix, cmd.name) || cmd.name, "children"),
104873
+ children: /* @__PURE__ */ __name((cmd2, props) => props.name || props.prefix && /* @__PURE__ */ React.createElement(React.Fragment, null, props.prefix, cmd2.name) || cmd2.name, "children"),
105041
104874
  disabled: "isDisabled",
105042
104875
  checked: "isActive"
105043
104876
  })(Div);
105044
104877
  const CmdButton = withCommand({
105045
104878
  onClick: "execute",
105046
- text: /* @__PURE__ */ __name((cmd) => cmd.isActive === false && cmd.inactiveName || cmd.name, "text"),
104879
+ text: /* @__PURE__ */ __name((cmd2) => cmd2.isActive === false && cmd2.inactiveName || cmd2.name, "text"),
105047
104880
  icon: "icon",
105048
104881
  disabled: "isDisabled"
105049
104882
  })(Button);
@@ -105336,9 +105169,9 @@ ${latestSubscriptionCallbackError.current.stack}
105336
105169
  default: createYourOwnEnzyme
105337
105170
  }, Symbol.toStringTag, { value: "Module" }));
105338
105171
  function createMetaAction(actionName, payloadHelper) {
105339
- return createAction(actionName, payloadHelper, function(unused, meta) {
105340
- return __spreadProps(__spreadValues({}, meta), {
105341
- editorName: meta.editorName
105172
+ return createAction(actionName, payloadHelper, function(unused, meta2) {
105173
+ return __spreadProps(__spreadValues({}, meta2), {
105174
+ editorName: meta2.editorName
105342
105175
  });
105343
105176
  });
105344
105177
  }
@@ -107291,303 +107124,6 @@ ${latestSubscriptionCallbackError.current.stack}
107291
107124
  const getFeatureTypes = /* @__PURE__ */ __name(({ includeHidden } = {}) => filter(getMergedFeatureMap(), (f2) => includeHidden ? true : !f2.isHidden).map(
107292
107125
  (f2) => f2.name
107293
107126
  ), "getFeatureTypes");
107294
- var lib$6 = { exports: {} };
107295
- var randomFromSeed;
107296
- var hasRequiredRandomFromSeed;
107297
- function requireRandomFromSeed() {
107298
- if (hasRequiredRandomFromSeed) return randomFromSeed;
107299
- hasRequiredRandomFromSeed = 1;
107300
- var seed = 1;
107301
- function getNextValue() {
107302
- seed = (seed * 9301 + 49297) % 233280;
107303
- return seed / 233280;
107304
- }
107305
- __name(getNextValue, "getNextValue");
107306
- function setSeed(_seed_) {
107307
- seed = _seed_;
107308
- }
107309
- __name(setSeed, "setSeed");
107310
- randomFromSeed = {
107311
- nextValue: getNextValue,
107312
- seed: setSeed
107313
- };
107314
- return randomFromSeed;
107315
- }
107316
- __name(requireRandomFromSeed, "requireRandomFromSeed");
107317
- var alphabet_1;
107318
- var hasRequiredAlphabet;
107319
- function requireAlphabet() {
107320
- if (hasRequiredAlphabet) return alphabet_1;
107321
- hasRequiredAlphabet = 1;
107322
- var randomFromSeed2 = requireRandomFromSeed();
107323
- var ORIGINAL = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";
107324
- var alphabet;
107325
- var previousSeed;
107326
- var shuffled;
107327
- function reset2() {
107328
- shuffled = false;
107329
- }
107330
- __name(reset2, "reset");
107331
- function setCharacters(_alphabet_) {
107332
- if (!_alphabet_) {
107333
- if (alphabet !== ORIGINAL) {
107334
- alphabet = ORIGINAL;
107335
- reset2();
107336
- }
107337
- return;
107338
- }
107339
- if (_alphabet_ === alphabet) {
107340
- return;
107341
- }
107342
- if (_alphabet_.length !== ORIGINAL.length) {
107343
- throw new Error("Custom alphabet for shortid must be " + ORIGINAL.length + " unique characters. You submitted " + _alphabet_.length + " characters: " + _alphabet_);
107344
- }
107345
- var unique2 = _alphabet_.split("").filter(function(item, ind, arr) {
107346
- return ind !== arr.lastIndexOf(item);
107347
- });
107348
- if (unique2.length) {
107349
- throw new Error("Custom alphabet for shortid must be " + ORIGINAL.length + " unique characters. These characters were not unique: " + unique2.join(", "));
107350
- }
107351
- alphabet = _alphabet_;
107352
- reset2();
107353
- }
107354
- __name(setCharacters, "setCharacters");
107355
- function characters(_alphabet_) {
107356
- setCharacters(_alphabet_);
107357
- return alphabet;
107358
- }
107359
- __name(characters, "characters");
107360
- function setSeed(seed) {
107361
- randomFromSeed2.seed(seed);
107362
- if (previousSeed !== seed) {
107363
- reset2();
107364
- previousSeed = seed;
107365
- }
107366
- }
107367
- __name(setSeed, "setSeed");
107368
- function shuffle() {
107369
- if (!alphabet) {
107370
- setCharacters(ORIGINAL);
107371
- }
107372
- var sourceArray = alphabet.split("");
107373
- var targetArray = [];
107374
- var r2 = randomFromSeed2.nextValue();
107375
- var characterIndex;
107376
- while (sourceArray.length > 0) {
107377
- r2 = randomFromSeed2.nextValue();
107378
- characterIndex = Math.floor(r2 * sourceArray.length);
107379
- targetArray.push(sourceArray.splice(characterIndex, 1)[0]);
107380
- }
107381
- return targetArray.join("");
107382
- }
107383
- __name(shuffle, "shuffle");
107384
- function getShuffled() {
107385
- if (shuffled) {
107386
- return shuffled;
107387
- }
107388
- shuffled = shuffle();
107389
- return shuffled;
107390
- }
107391
- __name(getShuffled, "getShuffled");
107392
- function lookup2(index2) {
107393
- var alphabetShuffled = getShuffled();
107394
- return alphabetShuffled[index2];
107395
- }
107396
- __name(lookup2, "lookup");
107397
- function get2() {
107398
- return alphabet || ORIGINAL;
107399
- }
107400
- __name(get2, "get");
107401
- alphabet_1 = {
107402
- get: get2,
107403
- characters,
107404
- seed: setSeed,
107405
- lookup: lookup2,
107406
- shuffled: getShuffled
107407
- };
107408
- return alphabet_1;
107409
- }
107410
- __name(requireAlphabet, "requireAlphabet");
107411
- var randomByteBrowser;
107412
- var hasRequiredRandomByteBrowser;
107413
- function requireRandomByteBrowser() {
107414
- if (hasRequiredRandomByteBrowser) return randomByteBrowser;
107415
- hasRequiredRandomByteBrowser = 1;
107416
- var crypto2 = typeof window === "object" && (window.crypto || window.msCrypto);
107417
- var randomByte;
107418
- if (!crypto2 || !crypto2.getRandomValues) {
107419
- randomByte = /* @__PURE__ */ __name(function(size2) {
107420
- var bytes = [];
107421
- for (var i2 = 0; i2 < size2; i2++) {
107422
- bytes.push(Math.floor(Math.random() * 256));
107423
- }
107424
- return bytes;
107425
- }, "randomByte");
107426
- } else {
107427
- randomByte = /* @__PURE__ */ __name(function(size2) {
107428
- return crypto2.getRandomValues(new Uint8Array(size2));
107429
- }, "randomByte");
107430
- }
107431
- randomByteBrowser = randomByte;
107432
- return randomByteBrowser;
107433
- }
107434
- __name(requireRandomByteBrowser, "requireRandomByteBrowser");
107435
- var format_browser;
107436
- var hasRequiredFormat_browser;
107437
- function requireFormat_browser() {
107438
- if (hasRequiredFormat_browser) return format_browser;
107439
- hasRequiredFormat_browser = 1;
107440
- format_browser = /* @__PURE__ */ __name(function(random, alphabet, size2) {
107441
- var mask = (2 << Math.log(alphabet.length - 1) / Math.LN2) - 1;
107442
- var step = -~(1.6 * mask * size2 / alphabet.length);
107443
- var id2 = "";
107444
- while (true) {
107445
- var bytes = random(step);
107446
- var i2 = step;
107447
- while (i2--) {
107448
- id2 += alphabet[bytes[i2] & mask] || "";
107449
- if (id2.length === +size2) return id2;
107450
- }
107451
- }
107452
- }, "format_browser");
107453
- return format_browser;
107454
- }
107455
- __name(requireFormat_browser, "requireFormat_browser");
107456
- var generate_1;
107457
- var hasRequiredGenerate;
107458
- function requireGenerate() {
107459
- if (hasRequiredGenerate) return generate_1;
107460
- hasRequiredGenerate = 1;
107461
- var alphabet = requireAlphabet();
107462
- var random = requireRandomByteBrowser();
107463
- var format2 = /* @__PURE__ */ requireFormat_browser();
107464
- function generate(number2) {
107465
- var loopCounter = 0;
107466
- var done;
107467
- var str = "";
107468
- while (!done) {
107469
- str = str + format2(random, alphabet.get(), 1);
107470
- done = number2 < Math.pow(16, loopCounter + 1);
107471
- loopCounter++;
107472
- }
107473
- return str;
107474
- }
107475
- __name(generate, "generate");
107476
- generate_1 = generate;
107477
- return generate_1;
107478
- }
107479
- __name(requireGenerate, "requireGenerate");
107480
- var build_1;
107481
- var hasRequiredBuild;
107482
- function requireBuild() {
107483
- if (hasRequiredBuild) return build_1;
107484
- hasRequiredBuild = 1;
107485
- var generate = requireGenerate();
107486
- requireAlphabet();
107487
- var REDUCE_TIME = 1567752802062;
107488
- var version2 = 7;
107489
- var counter2;
107490
- var previousSeconds;
107491
- function build2(clusterWorkerId) {
107492
- var str = "";
107493
- var seconds = Math.floor((Date.now() - REDUCE_TIME) * 1e-3);
107494
- if (seconds === previousSeconds) {
107495
- counter2++;
107496
- } else {
107497
- counter2 = 0;
107498
- previousSeconds = seconds;
107499
- }
107500
- str = str + generate(version2);
107501
- str = str + generate(clusterWorkerId);
107502
- if (counter2 > 0) {
107503
- str = str + generate(counter2);
107504
- }
107505
- str = str + generate(seconds);
107506
- return str;
107507
- }
107508
- __name(build2, "build");
107509
- build_1 = build2;
107510
- return build_1;
107511
- }
107512
- __name(requireBuild, "requireBuild");
107513
- var isValid;
107514
- var hasRequiredIsValid;
107515
- function requireIsValid() {
107516
- if (hasRequiredIsValid) return isValid;
107517
- hasRequiredIsValid = 1;
107518
- var alphabet = requireAlphabet();
107519
- function isShortId(id2) {
107520
- if (!id2 || typeof id2 !== "string" || id2.length < 6) {
107521
- return false;
107522
- }
107523
- var nonAlphabetic = new RegExp("[^" + alphabet.get().replace(/[|\\{}()[\]^$+*?.-]/g, "\\$&") + "]");
107524
- return !nonAlphabetic.test(id2);
107525
- }
107526
- __name(isShortId, "isShortId");
107527
- isValid = isShortId;
107528
- return isValid;
107529
- }
107530
- __name(requireIsValid, "requireIsValid");
107531
- var clusterWorkerIdBrowser;
107532
- var hasRequiredClusterWorkerIdBrowser;
107533
- function requireClusterWorkerIdBrowser() {
107534
- if (hasRequiredClusterWorkerIdBrowser) return clusterWorkerIdBrowser;
107535
- hasRequiredClusterWorkerIdBrowser = 1;
107536
- clusterWorkerIdBrowser = 0;
107537
- return clusterWorkerIdBrowser;
107538
- }
107539
- __name(requireClusterWorkerIdBrowser, "requireClusterWorkerIdBrowser");
107540
- var hasRequiredLib$6;
107541
- function requireLib$6() {
107542
- if (hasRequiredLib$6) return lib$6.exports;
107543
- hasRequiredLib$6 = 1;
107544
- (function(module2) {
107545
- var alphabet = requireAlphabet();
107546
- var build2 = requireBuild();
107547
- var isValid2 = requireIsValid();
107548
- var clusterWorkerId = requireClusterWorkerIdBrowser() || 0;
107549
- function seed(seedValue) {
107550
- alphabet.seed(seedValue);
107551
- return module2.exports;
107552
- }
107553
- __name(seed, "seed");
107554
- function worker(workerId) {
107555
- clusterWorkerId = workerId;
107556
- return module2.exports;
107557
- }
107558
- __name(worker, "worker");
107559
- function characters(newCharacters) {
107560
- if (newCharacters !== void 0) {
107561
- alphabet.characters(newCharacters);
107562
- }
107563
- return alphabet.shuffled();
107564
- }
107565
- __name(characters, "characters");
107566
- function generate() {
107567
- return build2(clusterWorkerId);
107568
- }
107569
- __name(generate, "generate");
107570
- module2.exports = generate;
107571
- module2.exports.generate = generate;
107572
- module2.exports.seed = seed;
107573
- module2.exports.worker = worker;
107574
- module2.exports.characters = characters;
107575
- module2.exports.isValid = isValid2;
107576
- })(lib$6);
107577
- return lib$6.exports;
107578
- }
107579
- __name(requireLib$6, "requireLib$6");
107580
- var shortid;
107581
- var hasRequiredShortid;
107582
- function requireShortid() {
107583
- if (hasRequiredShortid) return shortid;
107584
- hasRequiredShortid = 1;
107585
- shortid = requireLib$6();
107586
- return shortid;
107587
- }
107588
- __name(requireShortid, "requireShortid");
107589
- var shortidExports = requireShortid();
107590
- const uuid = /* @__PURE__ */ getDefaultExportFromCjs(shortidExports);
107591
107127
  function cutSequenceByRestrictionEnzyme(pSequence, circular2, restrictionEnzyme) {
107592
107128
  if (restrictionEnzyme.forwardRegex.length === 0 || restrictionEnzyme.reverseRegex.length === 0) {
107593
107129
  const returnArray = [];
@@ -107795,7 +107331,7 @@ ${latestSubscriptionCallbackError.current.stack}
107795
107331
  }
107796
107332
  const overhangBps = getSequenceWithinRange(cutRange, originalSequence);
107797
107333
  restrictionCutSite = {
107798
- id: uuid(),
107334
+ id: nanoid(),
107799
107335
  start: start2,
107800
107336
  end: end2,
107801
107337
  topSnipPosition,
@@ -112430,10 +111966,10 @@ ${latestSubscriptionCallbackError.current.stack}
112430
111966
  annotation.name = "Untitled annotation";
112431
111967
  }
112432
111968
  if (provideNewIdsForAnnotations) {
112433
- annotation.id = uuid();
111969
+ annotation.id = nanoid();
112434
111970
  }
112435
111971
  if (!annotation.id && annotation.id !== 0 && !doNotProvideIdsForAnnotations) {
112436
- annotation.id = uuid();
111972
+ annotation.id = nanoid();
112437
111973
  messages.push(
112438
111974
  "Unable to detect valid ID for annotation, setting ID to " + annotation.id
112439
111975
  );
@@ -112677,7 +112213,7 @@ ${latestSubscriptionCallbackError.current.stack}
112677
112213
  if (item.id || item.id === 0) {
112678
112214
  itemId = item.id;
112679
112215
  } else {
112680
- itemId = uuid();
112216
+ itemId = nanoid();
112681
112217
  if (!doNotProvideIdsForAnnotations) {
112682
112218
  item.id = itemId;
112683
112219
  }
@@ -112740,7 +112276,7 @@ ${latestSubscriptionCallbackError.current.stack}
112740
112276
  });
112741
112277
  sortedCutsites.forEach((cutsite1, index2) => {
112742
112278
  if (computePartialDigest && !computePartialDigestDisabled) {
112743
- sortedCutsites.forEach((cs, index22) => {
112279
+ sortedCutsites.forEach((cs2, index22) => {
112744
112280
  pairs.push([cutsite1, sortedCutsites[index22]]);
112745
112281
  });
112746
112282
  }
@@ -121109,7 +120645,7 @@ ${latestSubscriptionCallbackError.current.stack}
121109
120645
  forward,
121110
120646
  annotationTypePlural: "orfs",
121111
120647
  isOrf: true,
121112
- id: uuid()
120648
+ id: nanoid()
121113
120649
  });
121114
120650
  }
121115
120651
  }
@@ -123239,11 +122775,11 @@ ${latestSubscriptionCallbackError.current.stack}
123239
122775
  if (attrStr[attrStr.length - 1] === "/") {
123240
122776
  const attrStrStart = i2 - attrStr.length;
123241
122777
  attrStr = attrStr.substring(0, attrStr.length - 1);
123242
- const isValid2 = validateAttributeString(attrStr, options);
123243
- if (isValid2 === true) {
122778
+ const isValid = validateAttributeString(attrStr, options);
122779
+ if (isValid === true) {
123244
122780
  tagFound = true;
123245
122781
  } else {
123246
- return getErrorObject(isValid2.err.code, isValid2.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid2.err.line));
122782
+ return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));
123247
122783
  }
123248
122784
  } else if (closingTag) {
123249
122785
  if (!result.tagClosed) {
@@ -123265,9 +122801,9 @@ ${latestSubscriptionCallbackError.current.stack}
123265
122801
  }
123266
122802
  }
123267
122803
  } else {
123268
- const isValid2 = validateAttributeString(attrStr, options);
123269
- if (isValid2 !== true) {
123270
- return getErrorObject(isValid2.err.code, isValid2.err.msg, getLineNumberForPosition(xmlData, i2 - attrStr.length + isValid2.err.line));
122804
+ const isValid = validateAttributeString(attrStr, options);
122805
+ if (isValid !== true) {
122806
+ return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i2 - attrStr.length + isValid.err.line));
123271
122807
  }
123272
122808
  if (reachedRoot === true) {
123273
122809
  return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i2));
@@ -132443,7 +131979,7 @@ ${seq.sequence}
132443
131979
  if (type2 === "UPSERT_ALIGNMENT_RUN") {
132444
131980
  const { id: id2 } = payload;
132445
131981
  const payloadToUse = __spreadValues(__spreadValues({
132446
- stateTrackingId: ((_a2 = state2[id2]) == null ? void 0 : _a2.stateTrackingId) ? uuid() : "initialLoadId",
131982
+ stateTrackingId: ((_a2 = state2[id2]) == null ? void 0 : _a2.stateTrackingId) ? nanoid() : "initialLoadId",
132447
131983
  alignmentType: (_b2 = state2[id2]) == null ? void 0 : _b2.alignmentType
132448
131984
  }, payload), defaultVisibilityTypes.reduce((acc, type22) => {
132449
131985
  if (type22.startsWith("pairwise_") && payload.pairwiseAlignments || !type22.startsWith("pairwise_") && !payload.pairwiseAlignments) {
@@ -132665,10 +132201,10 @@ ${seq.sequence}
132665
132201
  "flipActiveTabFromLinearOrCircularIfNecessary"
132666
132202
  );
132667
132203
  const expandTabToSplitScreen = createMetaAction("expandTabToSplitScreen");
132668
- const propertiesViewOpen = /* @__PURE__ */ __name((unused, meta) => {
132669
- return setPanelAsActive("properties", meta);
132204
+ const propertiesViewOpen = /* @__PURE__ */ __name((unused, meta2) => {
132205
+ return setPanelAsActive("properties", meta2);
132670
132206
  }, "propertiesViewOpen");
132671
- const createNewDigest = /* @__PURE__ */ __name((unused, meta) => {
132207
+ const createNewDigest = /* @__PURE__ */ __name((unused, meta2) => {
132672
132208
  return (dispatch) => {
132673
132209
  dispatch(
132674
132210
  addPanelIfItDoesntAlreadyExist(
@@ -132678,13 +132214,13 @@ ${seq.sequence}
132678
132214
  active: true,
132679
132215
  canClose: true
132680
132216
  },
132681
- meta
132217
+ meta2
132682
132218
  )
132683
132219
  );
132684
- dispatch(setPanelAsActive("digestTool", meta));
132220
+ dispatch(setPanelAsActive("digestTool", meta2));
132685
132221
  };
132686
132222
  }, "createNewDigest");
132687
- const createNewPCR = /* @__PURE__ */ __name((unused, meta) => {
132223
+ const createNewPCR = /* @__PURE__ */ __name((unused, meta2) => {
132688
132224
  return (dispatch) => {
132689
132225
  dispatch(
132690
132226
  addPanelIfItDoesntAlreadyExist(
@@ -132694,13 +132230,13 @@ ${seq.sequence}
132694
132230
  active: true,
132695
132231
  canClose: true
132696
132232
  },
132697
- meta
132233
+ meta2
132698
132234
  )
132699
132235
  );
132700
- dispatch(setPanelAsActive("pcrTool", meta));
132236
+ dispatch(setPanelAsActive("pcrTool", meta2));
132701
132237
  };
132702
132238
  }, "createNewPCR");
132703
- const createNewAlignment = /* @__PURE__ */ __name((payload, meta) => {
132239
+ const createNewAlignment = /* @__PURE__ */ __name((payload, meta2) => {
132704
132240
  return (dispatch) => {
132705
132241
  dispatch(
132706
132242
  addPanelIfItDoesntAlreadyExist(
@@ -132710,13 +132246,13 @@ ${seq.sequence}
132710
132246
  active: true,
132711
132247
  canClose: true
132712
132248
  }, payload),
132713
- meta
132249
+ meta2
132714
132250
  )
132715
132251
  );
132716
- dispatch(setPanelAsActive(payload.id, meta));
132252
+ dispatch(setPanelAsActive(payload.id, meta2));
132717
132253
  };
132718
132254
  }, "createNewAlignment");
132719
- const createNewMismatchesList = /* @__PURE__ */ __name((payload, meta) => {
132255
+ const createNewMismatchesList = /* @__PURE__ */ __name((payload, meta2) => {
132720
132256
  return (dispatch) => {
132721
132257
  dispatch(
132722
132258
  addPanelIfItDoesntAlreadyExist(
@@ -132726,16 +132262,16 @@ ${seq.sequence}
132726
132262
  active: true,
132727
132263
  canClose: true
132728
132264
  }, payload),
132729
- meta
132265
+ meta2
132730
132266
  )
132731
132267
  );
132732
- dispatch(setPanelAsActive(payload.id, meta));
132268
+ dispatch(setPanelAsActive(payload.id, meta2));
132733
132269
  };
132734
132270
  }, "createNewMismatchesList");
132735
- const collapseSplitScreen = /* @__PURE__ */ __name((activePanelId, meta) => {
132271
+ const collapseSplitScreen = /* @__PURE__ */ __name((activePanelId, meta2) => {
132736
132272
  return (dispatch) => {
132737
- dispatch(_collapseSplitScreen(activePanelId, meta));
132738
- activePanelId && dispatch(setPanelAsActive(activePanelId, meta));
132273
+ dispatch(_collapseSplitScreen(activePanelId, meta2));
132274
+ activePanelId && dispatch(setPanelAsActive(activePanelId, meta2));
132739
132275
  };
132740
132276
  }, "collapseSplitScreen");
132741
132277
  const reducer$1 = createReducer(
@@ -133244,7 +132780,7 @@ ${seq.sequence}
133244
132780
  );
133245
132781
  const annotationDeselect = createMetaAction("VE_ANNOTATION_DESELECT");
133246
132782
  const annotationDeselectAll = createMetaAction("VE_ANNOTATION_DESELECT_ALL");
133247
- function replacementLayerRightClicked({ event, annotation }, meta) {
132783
+ function replacementLayerRightClicked({ event, annotation }, meta2) {
133248
132784
  event.preventDefault();
133249
132785
  event.stopPropagation();
133250
132786
  return function(dispatch) {
@@ -133254,7 +132790,7 @@ ${seq.sequence}
133254
132790
  onClick: /* @__PURE__ */ __name(function() {
133255
132791
  dispatch({
133256
132792
  type: "REPLACEMENT_LAYER_DELETE",
133257
- meta,
132793
+ meta: meta2,
133258
132794
  payload: __spreadValues({}, annotation)
133259
132795
  });
133260
132796
  }, "onClick")
@@ -133394,7 +132930,7 @@ ${seq.sequence}
133394
132930
  function upsertDeleteActionGenerator(upsertAction, deleteAction) {
133395
132931
  return {
133396
132932
  [upsertAction]: (state2, payload) => {
133397
- const idToUse = payload.id || uuid();
132933
+ const idToUse = payload.id || nanoid();
133398
132934
  return __spreadProps(__spreadValues({}, state2), {
133399
132935
  [idToUse]: __spreadProps(__spreadValues(__spreadValues({}, state2[idToUse] || {}), payload), { id: idToUse })
133400
132936
  });
@@ -133518,7 +133054,7 @@ ${seq.sequence}
133518
133054
  return state2;
133519
133055
  } else {
133520
133056
  return __spreadProps(__spreadValues({}, newState), {
133521
- stateTrackingId: newState.stateTrackingId ? uuid() : "initialLoadId"
133057
+ stateTrackingId: newState.stateTrackingId ? nanoid() : "initialLoadId"
133522
133058
  });
133523
133059
  }
133524
133060
  }
@@ -133977,11 +133513,11 @@ ${seq.sequence}
133977
133513
  };
133978
133514
  __name(_FillWindow, "FillWindow");
133979
133515
  let FillWindow = _FillWindow;
133980
- function addMetaToActionCreators(actions2, meta) {
133516
+ function addMetaToActionCreators(actions2, meta2) {
133981
133517
  const metaActions = {};
133982
133518
  Object.keys(actions2).forEach(function(actionName) {
133983
133519
  metaActions[actionName] = function(firstArg, additionalMeta) {
133984
- return actions2[actionName](firstArg, __spreadValues(__spreadValues({}, meta), additionalMeta || {}));
133520
+ return actions2[actionName](firstArg, __spreadValues(__spreadValues({}, meta2), additionalMeta || {}));
133985
133521
  };
133986
133522
  });
133987
133523
  return metaActions;
@@ -134219,7 +133755,7 @@ ${seq.sequence}
134219
133755
  const cutsitesForEnzyme = cutsitesByName[enzymeName];
134220
133756
  cutsitesForEnzyme.forEach(function(cutsite) {
134221
133757
  const numberOfCuts = cutsitesByName[enzymeName].length;
134222
- const uniqueId2 = uuid();
133758
+ const uniqueId2 = nanoid();
134223
133759
  cutsite.id = uniqueId2;
134224
133760
  cutsite.numberOfCuts = numberOfCuts;
134225
133761
  cutsite.annotationType = "cutsite";
@@ -134623,7 +134159,7 @@ ${seq.sequence}
134623
134159
  function translationsSelector(isCircular, translationSearchMatches, sequence2, orfs, showOrfTranslations, showOrfs, cdsFeatures, showCdsFeatureTranslations, showFeatures, translations2, frameTranslations2) {
134624
134160
  const translationsToPass = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, translationSearchMatches.reduce((acc, match) => {
134625
134161
  if (!match) return acc;
134626
- const id2 = match.id || uuid();
134162
+ const id2 = match.id || nanoid();
134627
134163
  acc[id2] = __spreadProps(__spreadValues({}, match), {
134628
134164
  id: id2,
134629
134165
  translationType: "AA Search Match",
@@ -134664,7 +134200,7 @@ ${seq.sequence}
134664
134200
  (acc, isActive2, frameName) => {
134665
134201
  const frameOffset = Number(frameName);
134666
134202
  if (isActive2) {
134667
- const id2 = uuid();
134203
+ const id2 = nanoid();
134668
134204
  acc[id2] = {
134669
134205
  id: id2,
134670
134206
  start: isCircular || frameOffset > 0 ? normalizePositionByRangeLength(
@@ -135377,7 +134913,7 @@ ${seq.sequence}
135377
134913
  return new Promise(function(resolve) {
135378
134914
  var request = new XMLHttpRequest();
135379
134915
  request.onreadystatechange = done;
135380
- request.ontimeout = timeout;
134916
+ request.ontimeout = timeout2;
135381
134917
  request.responseType = "blob";
135382
134918
  request.timeout = TIMEOUT;
135383
134919
  request.open("GET", url, true);
@@ -135407,14 +134943,14 @@ ${seq.sequence}
135407
134943
  encoder.readAsDataURL(request.response);
135408
134944
  }
135409
134945
  __name(done, "done");
135410
- function timeout() {
134946
+ function timeout2() {
135411
134947
  if (placeholder) {
135412
134948
  resolve(placeholder);
135413
134949
  } else {
135414
134950
  fail("timeout of " + TIMEOUT + "ms occured while fetching resource: " + url);
135415
134951
  }
135416
134952
  }
135417
- __name(timeout, "timeout");
134953
+ __name(timeout2, "timeout");
135418
134954
  function fail(message) {
135419
134955
  console.error(message);
135420
134956
  resolve("");
@@ -135676,7 +135212,7 @@ ${seq.sequence}
135676
135212
  dialogHolder.CustomModalComponent = ModalComponent;
135677
135213
  dialogHolder.props = props;
135678
135214
  dialogHolder.overrideName = overrideName;
135679
- dialogHolder.setUniqKeyToForceRerender(uuid());
135215
+ dialogHolder.setUniqKeyToForceRerender(nanoid());
135680
135216
  }
135681
135217
  __name(showDialog, "showDialog");
135682
135218
  function hideDialog() {
@@ -136066,7 +135602,7 @@ ${seq.sequence}
136066
135602
  seqData = yield onImport(seqData, file, props);
136067
135603
  }
136068
135604
  if (seqData) {
136069
- seqData.stateTrackingId = uuid();
135605
+ seqData.stateTrackingId = nanoid();
136070
135606
  updateEditor(
136071
135607
  {
136072
135608
  getState: /* @__PURE__ */ __name(() => ({ VectorEditor: { [props.editorName]: props } }), "getState"),
@@ -136328,7 +135864,7 @@ ${seq.sequence}
136328
135864
  readOnly: readOnly2
136329
135865
  } = ownProps;
136330
135866
  const editorState = getEditorState(state2, editorName);
136331
- const meta = { editorName };
135867
+ const meta2 = { editorName };
136332
135868
  const { VectorEditor } = state2;
136333
135869
  const { __allEditorsOptions } = VectorEditor;
136334
135870
  const { uppercaseSequenceMapFont: uppercaseSequenceMapFont2 } = __allEditorsOptions;
@@ -136356,7 +135892,7 @@ ${seq.sequence}
136356
135892
  }
136357
135893
  });
136358
135894
  const toReturn = __spreadProps(__spreadValues({}, editorState), {
136359
- meta,
135895
+ meta: meta2,
136360
135896
  annotationToAdd
136361
135897
  });
136362
135898
  if (sequenceDataFromProps && allowSeqDataOverride) {
@@ -136390,7 +135926,7 @@ ${seq.sequence}
136390
135926
  const f2 = getFindTool(findTool2, matchesTotal);
136391
135927
  return __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, editorState), {
136392
135928
  readOnly: readOnly2 || editorState.readOnly,
136393
- meta,
135929
+ meta: meta2,
136394
135930
  annotationToAdd
136395
135931
  }), newSelection && { selectionLayer: newSelection }), {
136396
135932
  selectedCutsites,
@@ -136449,8 +135985,8 @@ ${seq.sequence}
136449
135985
  }
136450
135986
  __name(fakeActionOverrides, "fakeActionOverrides");
136451
135987
  function getCombinedActions(editorName, actions2, actionOverrides, dispatch) {
136452
- const meta = { editorName };
136453
- let metaActions = addMetaToActionCreators(actions2, meta);
135988
+ const meta2 = { editorName };
135989
+ let metaActions = addMetaToActionCreators(actions2, meta2);
136454
135990
  const overrides = {};
136455
135991
  metaActions = __spreadValues(__spreadValues({
136456
135992
  undo: /* @__PURE__ */ __name(() => {
@@ -148412,7 +147948,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
148412
147948
  }, hovered && { textDecoration: "underline" }), annotation.annotationTypePlural !== "cutsites" && {
148413
147949
  fontStyle: "normal"
148414
147950
  }), {
148415
- left: clamp$3(xStart, 0, Number.MAX_VALUE),
147951
+ left: clamp$4(xStart, 0, Number.MAX_VALUE),
148416
147952
  whiteSpace: "nowrap",
148417
147953
  color: annotation.annotationTypePlural === "parts" ? "#ac68cc" : annotation.labelColor,
148418
147954
  zIndex: 10
@@ -150466,7 +150002,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
150466
150002
  input.click();
150467
150003
  }
150468
150004
  __name(showFileDialog, "showFileDialog");
150469
- const version = "0.7.29";
150005
+ const version = "0.7.30-beta.1";
150470
150006
  const packageJson = {
150471
150007
  version
150472
150008
  };
@@ -154797,8 +154333,8 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
154797
154333
  __name(assignDefault, "assignDefault");
154798
154334
  const BEFORE_LAST_KINEMATICS_DELAY = 32;
154799
154335
  const _Engine = class _Engine {
154800
- constructor(ctrl, args, key) {
154801
- this.ctrl = ctrl;
154336
+ constructor(ctrl2, args, key) {
154337
+ this.ctrl = ctrl2;
154802
154338
  this.args = args;
154803
154339
  this.key = key;
154804
154340
  if (!this.state) {
@@ -155601,9 +155137,9 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
155601
155137
  }
155602
155138
  __name(parse$1, "parse$1");
155603
155139
  const _EventStore = class _EventStore {
155604
- constructor(ctrl, gestureKey) {
155140
+ constructor(ctrl2, gestureKey) {
155605
155141
  _defineProperty(this, "_listeners", /* @__PURE__ */ new Set());
155606
- this._ctrl = ctrl;
155142
+ this._ctrl = ctrl2;
155607
155143
  this._gestureKey = gestureKey;
155608
155144
  }
155609
155145
  add(element2, device, action2, handler, options) {
@@ -155635,11 +155171,11 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
155635
155171
  this._timeouts.set(key, window.setTimeout(callback2, ms, ...args));
155636
155172
  }
155637
155173
  remove(key) {
155638
- const timeout = this._timeouts.get(key);
155639
- if (timeout) window.clearTimeout(timeout);
155174
+ const timeout2 = this._timeouts.get(key);
155175
+ if (timeout2) window.clearTimeout(timeout2);
155640
155176
  }
155641
155177
  clean() {
155642
- this._timeouts.forEach((timeout) => void window.clearTimeout(timeout));
155178
+ this._timeouts.forEach((timeout2) => void window.clearTimeout(timeout2));
155643
155179
  this._timeouts.clear();
155644
155180
  }
155645
155181
  };
@@ -155737,19 +155273,19 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
155737
155273
  };
155738
155274
  __name(_Controller, "Controller");
155739
155275
  let Controller = _Controller;
155740
- function setupGesture(ctrl, gestureKey) {
155741
- ctrl.gestures.add(gestureKey);
155742
- ctrl.gestureEventStores[gestureKey] = new EventStore(ctrl, gestureKey);
155743
- ctrl.gestureTimeoutStores[gestureKey] = new TimeoutStore();
155276
+ function setupGesture(ctrl2, gestureKey) {
155277
+ ctrl2.gestures.add(gestureKey);
155278
+ ctrl2.gestureEventStores[gestureKey] = new EventStore(ctrl2, gestureKey);
155279
+ ctrl2.gestureTimeoutStores[gestureKey] = new TimeoutStore();
155744
155280
  }
155745
155281
  __name(setupGesture, "setupGesture");
155746
- function resolveGestures(ctrl, internalHandlers) {
155747
- if (internalHandlers.drag) setupGesture(ctrl, "drag");
155748
- if (internalHandlers.wheel) setupGesture(ctrl, "wheel");
155749
- if (internalHandlers.scroll) setupGesture(ctrl, "scroll");
155750
- if (internalHandlers.move) setupGesture(ctrl, "move");
155751
- if (internalHandlers.pinch) setupGesture(ctrl, "pinch");
155752
- if (internalHandlers.hover) setupGesture(ctrl, "hover");
155282
+ function resolveGestures(ctrl2, internalHandlers) {
155283
+ if (internalHandlers.drag) setupGesture(ctrl2, "drag");
155284
+ if (internalHandlers.wheel) setupGesture(ctrl2, "wheel");
155285
+ if (internalHandlers.scroll) setupGesture(ctrl2, "scroll");
155286
+ if (internalHandlers.move) setupGesture(ctrl2, "move");
155287
+ if (internalHandlers.pinch) setupGesture(ctrl2, "pinch");
155288
+ if (internalHandlers.hover) setupGesture(ctrl2, "hover");
155753
155289
  }
155754
155290
  __name(resolveGestures, "resolveGestures");
155755
155291
  const bindToProps = /* @__PURE__ */ __name((props, eventOptions, withPassiveOption) => (device, action2, handler, options = {}, isNative2 = false) => {
@@ -155762,15 +155298,15 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
155762
155298
  props[handlerProp].push(handler);
155763
155299
  }, "bindToProps");
155764
155300
  function useRecognizers(handlers2, config = {}, gestureKey, nativeHandlers) {
155765
- const ctrl = React.useMemo(() => new Controller(handlers2), []);
155766
- ctrl.applyHandlers(handlers2, nativeHandlers);
155767
- ctrl.applyConfig(config, gestureKey);
155768
- React.useEffect(ctrl.effect.bind(ctrl));
155301
+ const ctrl2 = React.useMemo(() => new Controller(handlers2), []);
155302
+ ctrl2.applyHandlers(handlers2, nativeHandlers);
155303
+ ctrl2.applyConfig(config, gestureKey);
155304
+ React.useEffect(ctrl2.effect.bind(ctrl2));
155769
155305
  React.useEffect(() => {
155770
- return ctrl.clean.bind(ctrl);
155306
+ return ctrl2.clean.bind(ctrl2);
155771
155307
  }, []);
155772
155308
  if (config.target === void 0) {
155773
- return ctrl.bind.bind(ctrl);
155309
+ return ctrl2.bind.bind(ctrl2);
155774
155310
  }
155775
155311
  return void 0;
155776
155312
  }
@@ -155929,7 +155465,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
155929
155465
  return fn2({
155930
155466
  value: valToPass,
155931
155467
  changeValue: /* @__PURE__ */ __name((newVal2) => {
155932
- const newnew = clamp$3(newVal2, min2, max2);
155468
+ const newnew = clamp$4(newVal2, min2, max2);
155933
155469
  this.setState({ value: newnew });
155934
155470
  this.props.onChange && this.props.onChange(newnew);
155935
155471
  this.props.onRelease && this.props.onRelease(newnew);
@@ -158459,7 +157995,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
158459
157995
  const radius = outerRadius;
158460
157996
  const outerPointRadius = outerRadius - 20;
158461
157997
  const fontWidth = labelSize2 * (textScalingFactor < 1 ? textScalingFactor : 1);
158462
- const fontHeight = fontWidth * clamp$3(fontHeightMultiplier, 1.5, 3.5);
157998
+ const fontHeight = fontWidth * clamp$4(fontHeightMultiplier, 1.5, 3.5);
158463
157999
  const labelPoints = labels.map(function(label) {
158464
158000
  const {
158465
158001
  annotationCenterAngle: _annotationCenterAngle,
@@ -169652,7 +169188,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
169652
169188
  seqsToAlign = addedSequencesToUse;
169653
169189
  }
169654
169190
  hideModal();
169655
- const alignmentId = uuid();
169191
+ const alignmentId = nanoid();
169656
169192
  createNewAlignment2({
169657
169193
  id: alignmentId,
169658
169194
  name: seqsToAlign[0].name + " Alignment"
@@ -169971,7 +169507,7 @@ Part of ${annotation.translationType} Translation from BPs ${annotation.start +
169971
169507
  }
169972
169508
  upsertFeature2(
169973
169509
  __spreadProps(__spreadValues({}, feat1), {
169974
- id: uuid(),
169510
+ id: nanoid(),
169975
169511
  start: start2 - 1,
169976
169512
  end: end2 - 1,
169977
169513
  name: name2