@wistia/ui 1.0.0-beta.6c18e6db.4cbb83d → 1.0.0-beta.6cff98f0.8162ea1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v1.0.0-beta.6c18e6db.4cbb83d
3
+ * @license @wistia/ui v1.0.0-beta.6cff98f0.8162ea1
4
4
  *
5
5
  * Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
6
6
  *
@@ -1073,7 +1073,7 @@ const DEFAULT_GRADIENT = "defaultMidOne";
1073
1073
  */
1074
1074
  const getSemiRandomBackgroundGradient = (id) => {
1075
1075
  if (!(typeof id === "string" && id)) return gradientMap[0] ?? DEFAULT_GRADIENT;
1076
- const hashCode = [...id].reduce((num, char) => Math.imul(MULTIPLIER, num) + (char.codePointAt(0) ?? 0) || 0, 0);
1076
+ const hashCode = Array.from(id).reduce((num, char) => Math.imul(MULTIPLIER, num) + char.charCodeAt(0) || 0, 0);
1077
1077
  return gradientMap[Math.abs(hashCode) % gradientMap.length] ?? DEFAULT_GRADIENT;
1078
1078
  };
1079
1079
  //#endregion
@@ -5957,7 +5957,7 @@ const chooseColorScheme = (name) => {
5957
5957
  const multiplier = 31;
5958
5958
  const hashCode = (str) => {
5959
5959
  let sum = 0;
5960
- for (let i = 0; i < str.length; i += 1) sum = Math.trunc(Math.imul(multiplier, sum) + (str.codePointAt(i) ?? 0));
5960
+ for (let i = 0; i < str.length; i += 1) sum = Math.imul(multiplier, sum) + str.charCodeAt(i) | 0;
5961
5961
  return sum;
5962
5962
  };
5963
5963
  return brandColorSchemeOptions[Math.abs(hashCode(name)) % brandColorSchemeOptions.length] ?? "blue";