@stackable-labs/embeddables 1.83.2 → 1.84.0

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/react.js CHANGED
@@ -5,7 +5,7 @@ import * as kn from "react-dom";
5
5
  import hs from "react-dom";
6
6
  const nl = () => {
7
7
  try {
8
- return "b99fc94f-5ae9-4996-abbc-8ad10af60966";
8
+ return "ec4bb3a4-4213-4000-818d-f0f7e06b1c72";
9
9
  } catch {
10
10
  return "dev";
11
11
  }
@@ -402,7 +402,7 @@ const yt = {
402
402
  c = await e["actions.invoke"](r.payload);
403
403
  break;
404
404
  case "context.read":
405
- c = await e["context.read"]();
405
+ c = await e["context.read"](s);
406
406
  break;
407
407
  case "extend.identity":
408
408
  c = e["extend.identity"] ? await e["extend.identity"](s, r.payload) : null;
@@ -550,30 +550,30 @@ const yt = {
550
550
  return;
551
551
  const y = (w) => {
552
552
  const x = w.data;
553
- if (!(!x || typeof x != "object" || !m.some((N) => {
554
- const R = Nt(N.id);
555
- return R && w.source === R.iframe.contentWindow;
553
+ if (!(!x || typeof x != "object" || !m.some((R) => {
554
+ const T = Nt(R.id);
555
+ return T && w.source === T.iframe.contentWindow;
556
556
  }))) {
557
557
  if (x.type === "surface-update" && x.surfaceId === e) {
558
- const N = m.find((k) => {
559
- const E = Nt(k.id);
558
+ const R = m.find((N) => {
559
+ const E = Nt(N.id);
560
560
  return E && w.source === E.iframe.contentWindow;
561
561
  });
562
- if (!N)
562
+ if (!R)
563
563
  return;
564
- const R = h(x.tree, w.source ?? null);
565
- u((k) => ({
566
- ...k,
567
- [N.id]: R
564
+ const T = h(x.tree, w.source ?? null);
565
+ u((N) => ({
566
+ ...N,
567
+ [R.id]: T
568
568
  }));
569
569
  }
570
570
  if (x.type === "surface-ready" && x.surfaceId === e && t) {
571
- const N = gl(t);
572
- m.forEach((R) => {
571
+ const R = gl(t);
572
+ m.forEach((T) => {
573
573
  var E;
574
- const k = Nt(R.id);
575
- (E = k == null ? void 0 : k.iframe.contentWindow) == null || E.postMessage(
576
- { type: "context-update", surfaceId: e, context: N },
574
+ const N = Nt(T.id);
575
+ (E = N == null ? void 0 : N.iframe.contentWindow) == null || E.postMessage(
576
+ { type: "context-update", surfaceId: e, context: R },
577
577
  "*"
578
578
  );
579
579
  });
@@ -603,14 +603,14 @@ const yt = {
603
603
  }) : /* @__PURE__ */ f(I.Fragment, { children: v.children }, v.id), C = /* @__PURE__ */ f(I.Fragment, { children: x }, `extension:${v.id}`);
604
604
  if (y === 0 || !o)
605
605
  return [C];
606
- const N = w[y - 1], R = typeof o == "function" ? o({
606
+ const R = w[y - 1], T = typeof o == "function" ? o({
607
607
  index: y,
608
608
  total: w.length,
609
- previousExtensionId: N.id,
609
+ previousExtensionId: R.id,
610
610
  extensionId: v.id
611
611
  }) : o;
612
612
  return [
613
- /* @__PURE__ */ f(I.Fragment, { children: R }, `separator:${N.id}:${v.id}:${y}`),
613
+ /* @__PURE__ */ f(I.Fragment, { children: T }, `separator:${R.id}:${v.id}:${y}`),
614
614
  C
615
615
  ];
616
616
  }) : r;
@@ -904,15 +904,15 @@ function Bl(e) {
904
904
  }
905
905
  const Hl = (e) => {
906
906
  var t, n, o, r, s, a, i, c, d;
907
- const { invert: u, toast: l, unstyled: m, interacting: h, setHeights: b, visibleToasts: g, heights: v, index: y, toasts: w, expanded: x, removeToast: C, defaultRichColors: N, closeButton: R, style: k, cancelButtonStyle: E, actionButtonStyle: L, className: W = "", descriptionClassName: M = "", duration: F, position: H, gap: O, expandByDefault: K, classNames: P, icons: D, closeButtonAriaLabel: U = "Close toast" } = e, [T, S] = I.useState(null), [A, z] = I.useState(null), [_, $] = I.useState(!1), [B, J] = I.useState(!1), [j, Y] = I.useState(!1), [ee, te] = I.useState(!1), [se, oe] = I.useState(!1), [ue, fe] = I.useState(0), [at, Ke] = I.useState(0), Te = I.useRef(l.duration || F || wr), Zt = I.useRef(null), ye = I.useRef(null), Wc = y === 0, Uc = y + 1 <= g, Se = l.type, gt = l.dismissible !== !1, jc = l.className || "", Gc = l.descriptionClassName || "", Jt = I.useMemo(() => v.findIndex((ne) => ne.toastId === l.id) || 0, [
907
+ const { invert: u, toast: l, unstyled: m, interacting: h, setHeights: b, visibleToasts: g, heights: v, index: y, toasts: w, expanded: x, removeToast: C, defaultRichColors: R, closeButton: T, style: N, cancelButtonStyle: E, actionButtonStyle: L, className: W = "", descriptionClassName: M = "", duration: F, position: H, gap: O, expandByDefault: K, classNames: A, icons: D, closeButtonAriaLabel: U = "Close toast" } = e, [k, S] = I.useState(null), [_, $] = I.useState(null), [P, z] = I.useState(!1), [B, J] = I.useState(!1), [j, Y] = I.useState(!1), [ee, te] = I.useState(!1), [se, oe] = I.useState(!1), [ue, fe] = I.useState(0), [at, Ke] = I.useState(0), Te = I.useRef(l.duration || F || wr), Zt = I.useRef(null), ye = I.useRef(null), Wc = y === 0, Uc = y + 1 <= g, Se = l.type, gt = l.dismissible !== !1, jc = l.className || "", Gc = l.descriptionClassName || "", Jt = I.useMemo(() => v.findIndex((ne) => ne.toastId === l.id) || 0, [
908
908
  v,
909
909
  l.id
910
910
  ]), Yc = I.useMemo(() => {
911
911
  var ne;
912
- return (ne = l.closeButton) != null ? ne : R;
912
+ return (ne = l.closeButton) != null ? ne : T;
913
913
  }, [
914
914
  l.closeButton,
915
- R
915
+ T
916
916
  ]), fr = I.useMemo(() => l.duration || F || wr, [
917
917
  l.duration,
918
918
  F
@@ -928,7 +928,7 @@ const Hl = (e) => {
928
928
  }, [
929
929
  fr
930
930
  ]), I.useEffect(() => {
931
- $(!0);
931
+ z(!0);
932
932
  }, []), I.useEffect(() => {
933
933
  const ne = ye.current;
934
934
  if (ne) {
@@ -946,7 +946,7 @@ const Hl = (e) => {
946
946
  b,
947
947
  l.id
948
948
  ]), I.useLayoutEffect(() => {
949
- if (!_) return;
949
+ if (!P) return;
950
950
  const ne = ye.current, me = ne.style.height;
951
951
  ne.style.height = "auto";
952
952
  const ge = ne.getBoundingClientRect().height;
@@ -962,7 +962,7 @@ const Hl = (e) => {
962
962
  ...Ce
963
963
  ]);
964
964
  }, [
965
- _,
965
+ P,
966
966
  l.title,
967
967
  l.description,
968
968
  b,
@@ -1013,12 +1013,12 @@ const Hl = (e) => {
1013
1013
  if (D != null && D.loading) {
1014
1014
  var me;
1015
1015
  return /* @__PURE__ */ I.createElement("div", {
1016
- className: ze(P == null ? void 0 : P.loader, l == null || (me = l.classNames) == null ? void 0 : me.loader, "sonner-loader"),
1016
+ className: ze(A == null ? void 0 : A.loader, l == null || (me = l.classNames) == null ? void 0 : me.loader, "sonner-loader"),
1017
1017
  "data-visible": Se === "loading"
1018
1018
  }, D.loading);
1019
1019
  }
1020
1020
  return /* @__PURE__ */ I.createElement(wl, {
1021
- className: ze(P == null ? void 0 : P.loader, l == null || (ne = l.classNames) == null ? void 0 : ne.loader),
1021
+ className: ze(A == null ? void 0 : A.loader, l == null || (ne = l.classNames) == null ? void 0 : ne.loader),
1022
1022
  visible: Se === "loading"
1023
1023
  });
1024
1024
  }
@@ -1027,11 +1027,11 @@ const Hl = (e) => {
1027
1027
  return /* @__PURE__ */ I.createElement("li", {
1028
1028
  tabIndex: 0,
1029
1029
  ref: ye,
1030
- className: ze(W, jc, P == null ? void 0 : P.toast, l == null || (t = l.classNames) == null ? void 0 : t.toast, P == null ? void 0 : P.default, P == null ? void 0 : P[Se], l == null || (n = l.classNames) == null ? void 0 : n[Se]),
1030
+ className: ze(W, jc, A == null ? void 0 : A.toast, l == null || (t = l.classNames) == null ? void 0 : t.toast, A == null ? void 0 : A.default, A == null ? void 0 : A[Se], l == null || (n = l.classNames) == null ? void 0 : n[Se]),
1031
1031
  "data-sonner-toast": "",
1032
- "data-rich-colors": (gr = l.richColors) != null ? gr : N,
1032
+ "data-rich-colors": (gr = l.richColors) != null ? gr : R,
1033
1033
  "data-styled": !(l.jsx || l.unstyled || m),
1034
- "data-mounted": _,
1034
+ "data-mounted": P,
1035
1035
  "data-promise": !!l.promise,
1036
1036
  "data-swiped": se,
1037
1037
  "data-removed": B,
@@ -1045,8 +1045,8 @@ const Hl = (e) => {
1045
1045
  "data-type": Se,
1046
1046
  "data-invert": Xc,
1047
1047
  "data-swipe-out": ee,
1048
- "data-swipe-direction": A,
1049
- "data-expanded": !!(x || K && _),
1048
+ "data-swipe-direction": _,
1049
+ "data-expanded": !!(x || K && P),
1050
1050
  "data-testid": l.testId,
1051
1051
  style: {
1052
1052
  "--index": y,
@@ -1054,7 +1054,7 @@ const Hl = (e) => {
1054
1054
  "--z-index": w.length - y,
1055
1055
  "--offset": `${B ? ue : vt.current}px`,
1056
1056
  "--initial-height": K ? "auto" : `${at}px`,
1057
- ...k,
1057
+ ...N,
1058
1058
  ...l.style
1059
1059
  },
1060
1060
  onDragEnd: () => {
@@ -1070,9 +1070,9 @@ const Hl = (e) => {
1070
1070
  var ne, me, ge;
1071
1071
  if (ee || !gt) return;
1072
1072
  bt.current = null;
1073
- const Ce = Number(((ne = ye.current) == null ? void 0 : ne.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), Qt = Number(((me = ye.current) == null ? void 0 : me.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), he = (/* @__PURE__ */ new Date()).getTime() - ((ge = Zt.current) == null ? void 0 : ge.getTime()), Ne = T === "x" ? Ce : Qt, en = Math.abs(Ne) / he;
1073
+ const Ce = Number(((ne = ye.current) == null ? void 0 : ne.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), Qt = Number(((me = ye.current) == null ? void 0 : me.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), he = (/* @__PURE__ */ new Date()).getTime() - ((ge = Zt.current) == null ? void 0 : ge.getTime()), Ne = k === "x" ? Ce : Qt, en = Math.abs(Ne) / he;
1074
1074
  if (Math.abs(Ne) >= $l || en > 0.11) {
1075
- fe(vt.current), l.onDismiss == null || l.onDismiss.call(l, l), z(T === "x" ? Ce > 0 ? "right" : "left" : Qt > 0 ? "down" : "up"), Xe(), te(!0);
1075
+ fe(vt.current), l.onDismiss == null || l.onDismiss.call(l, l), $(k === "x" ? Ce > 0 ? "right" : "left" : Qt > 0 ? "down" : "up"), Xe(), te(!0);
1076
1076
  return;
1077
1077
  } else {
1078
1078
  var Pe, Ae;
@@ -1086,13 +1086,13 @@ const Hl = (e) => {
1086
1086
  const he = ne.clientY - bt.current.y, Ne = ne.clientX - bt.current.x;
1087
1087
  var en;
1088
1088
  const Pe = (en = e.swipeDirections) != null ? en : Bl(H);
1089
- !T && (Math.abs(Ne) > 1 || Math.abs(he) > 1) && S(Math.abs(Ne) > Math.abs(he) ? "x" : "y");
1089
+ !k && (Math.abs(Ne) > 1 || Math.abs(he) > 1) && S(Math.abs(Ne) > Math.abs(he) ? "x" : "y");
1090
1090
  let Ae = {
1091
1091
  x: 0,
1092
1092
  y: 0
1093
1093
  };
1094
1094
  const br = (it) => 1 / (1.5 + Math.abs(it) / 20);
1095
- if (T === "y") {
1095
+ if (k === "y") {
1096
1096
  if (Pe.includes("top") || Pe.includes("bottom"))
1097
1097
  if (Pe.includes("top") && he < 0 || Pe.includes("bottom") && he > 0)
1098
1098
  Ae.y = he;
@@ -1100,7 +1100,7 @@ const Hl = (e) => {
1100
1100
  const it = he * br(he);
1101
1101
  Ae.y = Math.abs(it) < Math.abs(he) ? it : he;
1102
1102
  }
1103
- } else if (T === "x" && (Pe.includes("left") || Pe.includes("right")))
1103
+ } else if (k === "x" && (Pe.includes("left") || Pe.includes("right")))
1104
1104
  if (Pe.includes("left") && Ne < 0 || Pe.includes("right") && Ne > 0)
1105
1105
  Ae.x = Ne;
1106
1106
  else {
@@ -1117,19 +1117,19 @@ const Hl = (e) => {
1117
1117
  } : () => {
1118
1118
  Xe(), l.onDismiss == null || l.onDismiss.call(l, l);
1119
1119
  },
1120
- className: ze(P == null ? void 0 : P.closeButton, l == null || (o = l.classNames) == null ? void 0 : o.closeButton)
1120
+ className: ze(A == null ? void 0 : A.closeButton, l == null || (o = l.classNames) == null ? void 0 : o.closeButton)
1121
1121
  }, (vr = D == null ? void 0 : D.close) != null ? vr : kl) : null, (Se || l.icon || l.promise) && l.icon !== null && ((D == null ? void 0 : D[Se]) !== null || l.icon) ? /* @__PURE__ */ I.createElement("div", {
1122
1122
  "data-icon": "",
1123
- className: ze(P == null ? void 0 : P.icon, l == null || (r = l.classNames) == null ? void 0 : r.icon)
1123
+ className: ze(A == null ? void 0 : A.icon, l == null || (r = l.classNames) == null ? void 0 : r.icon)
1124
1124
  }, l.promise || l.type === "loading" && !l.icon ? l.icon || Zc() : null, l.type !== "loading" ? Jc : null) : null, /* @__PURE__ */ I.createElement("div", {
1125
1125
  "data-content": "",
1126
- className: ze(P == null ? void 0 : P.content, l == null || (s = l.classNames) == null ? void 0 : s.content)
1126
+ className: ze(A == null ? void 0 : A.content, l == null || (s = l.classNames) == null ? void 0 : s.content)
1127
1127
  }, /* @__PURE__ */ I.createElement("div", {
1128
1128
  "data-title": "",
1129
- className: ze(P == null ? void 0 : P.title, l == null || (a = l.classNames) == null ? void 0 : a.title)
1129
+ className: ze(A == null ? void 0 : A.title, l == null || (a = l.classNames) == null ? void 0 : a.title)
1130
1130
  }, l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title), l.description ? /* @__PURE__ */ I.createElement("div", {
1131
1131
  "data-description": "",
1132
- className: ze(M, Gc, P == null ? void 0 : P.description, l == null || (i = l.classNames) == null ? void 0 : i.description)
1132
+ className: ze(M, Gc, A == null ? void 0 : A.description, l == null || (i = l.classNames) == null ? void 0 : i.description)
1133
1133
  }, typeof l.description == "function" ? l.description() : l.description) : null), /* @__PURE__ */ I.isValidElement(l.cancel) ? l.cancel : l.cancel && nn(l.cancel) ? /* @__PURE__ */ I.createElement("button", {
1134
1134
  "data-button": !0,
1135
1135
  "data-cancel": !0,
@@ -1137,7 +1137,7 @@ const Hl = (e) => {
1137
1137
  onClick: (ne) => {
1138
1138
  nn(l.cancel) && gt && (l.cancel.onClick == null || l.cancel.onClick.call(l.cancel, ne), Xe());
1139
1139
  },
1140
- className: ze(P == null ? void 0 : P.cancelButton, l == null || (c = l.classNames) == null ? void 0 : c.cancelButton)
1140
+ className: ze(A == null ? void 0 : A.cancelButton, l == null || (c = l.classNames) == null ? void 0 : c.cancelButton)
1141
1141
  }, l.cancel.label) : null, /* @__PURE__ */ I.isValidElement(l.action) ? l.action : l.action && nn(l.action) ? /* @__PURE__ */ I.createElement("button", {
1142
1142
  "data-button": !0,
1143
1143
  "data-action": !0,
@@ -1145,7 +1145,7 @@ const Hl = (e) => {
1145
1145
  onClick: (ne) => {
1146
1146
  nn(l.action) && (l.action.onClick == null || l.action.onClick.call(l.action, ne), !ne.defaultPrevented && Xe());
1147
1147
  },
1148
- className: ze(P == null ? void 0 : P.actionButton, l == null || (d = l.classNames) == null ? void 0 : d.actionButton)
1148
+ className: ze(A == null ? void 0 : A.actionButton, l == null || (d = l.classNames) == null ? void 0 : d.actionButton)
1149
1149
  }, l.action.label) : null);
1150
1150
  };
1151
1151
  function xr() {
@@ -1184,24 +1184,24 @@ const Wl = /* @__PURE__ */ I.forwardRef(function(t, n) {
1184
1184
  const { id: o, invert: r, position: s = "bottom-right", hotkey: a = [
1185
1185
  "altKey",
1186
1186
  "KeyT"
1187
- ], expand: i, closeButton: c, className: d, offset: u, mobileOffset: l, theme: m = "light", richColors: h, duration: b, style: g, visibleToasts: v = Ml, toastOptions: y, dir: w = xr(), gap: x = zl, icons: C, containerAriaLabel: N = "Notifications" } = t, [R, k] = I.useState([]), E = I.useMemo(() => o ? R.filter((_) => _.toasterId === o) : R.filter((_) => !_.toasterId), [
1188
- R,
1187
+ ], expand: i, closeButton: c, className: d, offset: u, mobileOffset: l, theme: m = "light", richColors: h, duration: b, style: g, visibleToasts: v = Ml, toastOptions: y, dir: w = xr(), gap: x = zl, icons: C, containerAriaLabel: R = "Notifications" } = t, [T, N] = I.useState([]), E = I.useMemo(() => o ? T.filter((P) => P.toasterId === o) : T.filter((P) => !P.toasterId), [
1188
+ T,
1189
1189
  o
1190
1190
  ]), L = I.useMemo(() => Array.from(new Set([
1191
1191
  s
1192
- ].concat(E.filter((_) => _.position).map((_) => _.position)))), [
1192
+ ].concat(E.filter((P) => P.position).map((P) => P.position)))), [
1193
1193
  E,
1194
1194
  s
1195
- ]), [W, M] = I.useState([]), [F, H] = I.useState(!1), [O, K] = I.useState(!1), [P, D] = I.useState(m !== "system" ? m : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), U = I.useRef(null), T = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), S = I.useRef(null), A = I.useRef(!1), z = I.useCallback((_) => {
1196
- k(($) => {
1195
+ ]), [W, M] = I.useState([]), [F, H] = I.useState(!1), [O, K] = I.useState(!1), [A, D] = I.useState(m !== "system" ? m : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), U = I.useRef(null), k = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), S = I.useRef(null), _ = I.useRef(!1), $ = I.useCallback((P) => {
1196
+ N((z) => {
1197
1197
  var B;
1198
- return (B = $.find((J) => J.id === _.id)) != null && B.delete || we.dismiss(_.id), $.filter(({ id: J }) => J !== _.id);
1198
+ return (B = z.find((J) => J.id === P.id)) != null && B.delete || we.dismiss(P.id), z.filter(({ id: J }) => J !== P.id);
1199
1199
  });
1200
1200
  }, []);
1201
- return I.useEffect(() => we.subscribe((_) => {
1202
- if (_.dismiss) {
1201
+ return I.useEffect(() => we.subscribe((P) => {
1202
+ if (P.dismiss) {
1203
1203
  requestAnimationFrame(() => {
1204
- k(($) => $.map((B) => B.id === _.id ? {
1204
+ N((z) => z.map((B) => B.id === P.id ? {
1205
1205
  ...B,
1206
1206
  delete: !0
1207
1207
  } : B));
@@ -1210,37 +1210,37 @@ const Wl = /* @__PURE__ */ I.forwardRef(function(t, n) {
1210
1210
  }
1211
1211
  setTimeout(() => {
1212
1212
  hs.flushSync(() => {
1213
- k(($) => {
1214
- const B = $.findIndex((J) => J.id === _.id);
1213
+ N((z) => {
1214
+ const B = z.findIndex((J) => J.id === P.id);
1215
1215
  return B !== -1 ? [
1216
- ...$.slice(0, B),
1216
+ ...z.slice(0, B),
1217
1217
  {
1218
- ...$[B],
1219
- ..._
1218
+ ...z[B],
1219
+ ...P
1220
1220
  },
1221
- ...$.slice(B + 1)
1221
+ ...z.slice(B + 1)
1222
1222
  ] : [
1223
- _,
1224
- ...$
1223
+ P,
1224
+ ...z
1225
1225
  ];
1226
1226
  });
1227
1227
  });
1228
1228
  });
1229
1229
  }), [
1230
- R
1230
+ T
1231
1231
  ]), I.useEffect(() => {
1232
1232
  if (m !== "system") {
1233
1233
  D(m);
1234
1234
  return;
1235
1235
  }
1236
1236
  if (m === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? D("dark") : D("light")), typeof window > "u") return;
1237
- const _ = window.matchMedia("(prefers-color-scheme: dark)");
1237
+ const P = window.matchMedia("(prefers-color-scheme: dark)");
1238
1238
  try {
1239
- _.addEventListener("change", ({ matches: $ }) => {
1240
- D($ ? "dark" : "light");
1239
+ P.addEventListener("change", ({ matches: z }) => {
1240
+ D(z ? "dark" : "light");
1241
1241
  });
1242
1242
  } catch {
1243
- _.addListener(({ matches: B }) => {
1243
+ P.addListener(({ matches: B }) => {
1244
1244
  try {
1245
1245
  D(B ? "dark" : "light");
1246
1246
  } catch (J) {
@@ -1251,19 +1251,19 @@ const Wl = /* @__PURE__ */ I.forwardRef(function(t, n) {
1251
1251
  }, [
1252
1252
  m
1253
1253
  ]), I.useEffect(() => {
1254
- R.length <= 1 && H(!1);
1254
+ T.length <= 1 && H(!1);
1255
1255
  }, [
1256
- R
1256
+ T
1257
1257
  ]), I.useEffect(() => {
1258
- const _ = ($) => {
1258
+ const P = (z) => {
1259
1259
  var B;
1260
- if (a.every((Y) => $[Y] || $.code === Y)) {
1260
+ if (a.every((Y) => z[Y] || z.code === Y)) {
1261
1261
  var j;
1262
1262
  H(!0), (j = U.current) == null || j.focus();
1263
1263
  }
1264
- $.code === "Escape" && (document.activeElement === U.current || (B = U.current) != null && B.contains(document.activeElement)) && H(!1);
1264
+ z.code === "Escape" && (document.activeElement === U.current || (B = U.current) != null && B.contains(document.activeElement)) && H(!1);
1265
1265
  };
1266
- return document.addEventListener("keydown", _), () => document.removeEventListener("keydown", _);
1266
+ return document.addEventListener("keydown", P), () => document.removeEventListener("keydown", P);
1267
1267
  }, [
1268
1268
  a
1269
1269
  ]), I.useEffect(() => {
@@ -1271,30 +1271,30 @@ const Wl = /* @__PURE__ */ I.forwardRef(function(t, n) {
1271
1271
  return () => {
1272
1272
  S.current && (S.current.focus({
1273
1273
  preventScroll: !0
1274
- }), S.current = null, A.current = !1);
1274
+ }), S.current = null, _.current = !1);
1275
1275
  };
1276
1276
  }, [
1277
1277
  U.current
1278
1278
  ]), // Remove item from normal navigation flow, only available via hotkey
1279
1279
  /* @__PURE__ */ I.createElement("section", {
1280
1280
  ref: n,
1281
- "aria-label": `${N} ${T}`,
1281
+ "aria-label": `${R} ${k}`,
1282
1282
  tabIndex: -1,
1283
1283
  "aria-live": "polite",
1284
1284
  "aria-relevant": "additions text",
1285
1285
  "aria-atomic": "false",
1286
1286
  suppressHydrationWarning: !0
1287
- }, L.map((_, $) => {
1287
+ }, L.map((P, z) => {
1288
1288
  var B;
1289
- const [J, j] = _.split("-");
1289
+ const [J, j] = P.split("-");
1290
1290
  return E.length ? /* @__PURE__ */ I.createElement("ol", {
1291
- key: _,
1291
+ key: P,
1292
1292
  dir: w === "auto" ? xr() : w,
1293
1293
  tabIndex: -1,
1294
1294
  ref: U,
1295
1295
  className: d,
1296
1296
  "data-sonner-toaster": !0,
1297
- "data-sonner-theme": P,
1297
+ "data-sonner-theme": A,
1298
1298
  "data-y-position": J,
1299
1299
  "data-x-position": j,
1300
1300
  style: {
@@ -1305,12 +1305,12 @@ const Wl = /* @__PURE__ */ I.forwardRef(function(t, n) {
1305
1305
  ...Vl(u, l)
1306
1306
  },
1307
1307
  onBlur: (Y) => {
1308
- A.current && !Y.currentTarget.contains(Y.relatedTarget) && (A.current = !1, S.current && (S.current.focus({
1308
+ _.current && !Y.currentTarget.contains(Y.relatedTarget) && (_.current = !1, S.current && (S.current.focus({
1309
1309
  preventScroll: !0
1310
1310
  }), S.current = null));
1311
1311
  },
1312
1312
  onFocus: (Y) => {
1313
- Y.target instanceof HTMLElement && Y.target.dataset.dismissible === "false" || A.current || (A.current = !0, S.current = Y.relatedTarget);
1313
+ Y.target instanceof HTMLElement && Y.target.dataset.dismissible === "false" || _.current || (_.current = !0, S.current = Y.relatedTarget);
1314
1314
  },
1315
1315
  onMouseEnter: () => H(!0),
1316
1316
  onMouseMove: () => H(!0),
@@ -1322,7 +1322,7 @@ const Wl = /* @__PURE__ */ I.forwardRef(function(t, n) {
1322
1322
  Y.target instanceof HTMLElement && Y.target.dataset.dismissible === "false" || K(!0);
1323
1323
  },
1324
1324
  onPointerUp: () => K(!1)
1325
- }, E.filter((Y) => !Y.position && $ === 0 || Y.position === _).map((Y, ee) => {
1325
+ }, E.filter((Y) => !Y.position && z === 0 || Y.position === P).map((Y, ee) => {
1326
1326
  var te, se;
1327
1327
  return /* @__PURE__ */ I.createElement(Hl, {
1328
1328
  key: Y.id,
@@ -1337,14 +1337,14 @@ const Wl = /* @__PURE__ */ I.forwardRef(function(t, n) {
1337
1337
  visibleToasts: v,
1338
1338
  closeButton: (se = y == null ? void 0 : y.closeButton) != null ? se : c,
1339
1339
  interacting: O,
1340
- position: _,
1340
+ position: P,
1341
1341
  style: y == null ? void 0 : y.style,
1342
1342
  unstyled: y == null ? void 0 : y.unstyled,
1343
1343
  classNames: y == null ? void 0 : y.classNames,
1344
1344
  cancelButtonStyle: y == null ? void 0 : y.cancelButtonStyle,
1345
1345
  actionButtonStyle: y == null ? void 0 : y.actionButtonStyle,
1346
1346
  closeButtonAriaLabel: y == null ? void 0 : y.closeButtonAriaLabel,
1347
- removeToast: z,
1347
+ removeToast: $,
1348
1348
  toasts: E.filter((oe) => oe.position == Y.position),
1349
1349
  heights: W.filter((oe) => oe.position == Y.position),
1350
1350
  setHeights: M,
@@ -2246,10 +2246,10 @@ const au = (e, t) => {
2246
2246
  if (a.indexOf(C) > -1)
2247
2247
  continue;
2248
2248
  a.push(C);
2249
- const N = r(y, v);
2250
- for (let R = 0; R < N.length; ++R) {
2251
- const k = N[R];
2252
- a.push(x + k);
2249
+ const R = r(y, v);
2250
+ for (let T = 0; T < R.length; ++T) {
2251
+ const N = R[T];
2252
+ a.push(x + N);
2253
2253
  }
2254
2254
  c = u + (c.length > 0 ? " " + c : c);
2255
2255
  }
@@ -2312,15 +2312,15 @@ const au = (e, t) => {
2312
2312
  "bottom-left",
2313
2313
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
2314
2314
  "left-bottom"
2315
- ], N = () => [...C(), G, V], R = () => ["auto", "hidden", "clip", "visible", "scroll"], k = () => ["auto", "contain", "none"], E = () => [G, V, c], L = () => [Ze, "full", "auto", ...E()], W = () => [Je, "none", "subgrid", G, V], M = () => ["auto", {
2315
+ ], R = () => [...C(), G, V], T = () => ["auto", "hidden", "clip", "visible", "scroll"], N = () => ["auto", "contain", "none"], E = () => [G, V, c], L = () => [Ze, "full", "auto", ...E()], W = () => [Je, "none", "subgrid", G, V], M = () => ["auto", {
2316
2316
  span: ["full", Je, G, V]
2317
- }, Je, G, V], F = () => [Je, "auto", G, V], H = () => ["auto", "min", "max", "fr", G, V], O = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], K = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], P = () => ["auto", ...E()], D = () => [Ze, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...E()], U = () => [Ze, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...E()], T = () => [Ze, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...E()], S = () => [e, G, V], A = () => [...C(), Ar, Pr, {
2317
+ }, Je, G, V], F = () => [Je, "auto", G, V], H = () => ["auto", "min", "max", "fr", G, V], O = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], K = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], A = () => ["auto", ...E()], D = () => [Ze, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...E()], U = () => [Ze, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...E()], k = () => [Ze, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...E()], S = () => [e, G, V], _ = () => [...C(), Ar, Pr, {
2318
2318
  position: [G, V]
2319
- }], z = () => ["no-repeat", {
2319
+ }], $ = () => ["no-repeat", {
2320
2320
  repeat: ["", "x", "y", "space", "round"]
2321
- }], _ = () => ["auto", "cover", "contain", Wu, $u, {
2321
+ }], P = () => ["auto", "cover", "contain", Wu, $u, {
2322
2322
  size: [G, V]
2323
- }], $ = () => [Jn, zt, ct], B = () => [
2323
+ }], z = () => [Jn, zt, ct], B = () => [
2324
2324
  // Deprecated since Tailwind CSS v4.0.0
2325
2325
  "",
2326
2326
  "none",
@@ -2459,49 +2459,49 @@ const au = (e, t) => {
2459
2459
  * @see https://tailwindcss.com/docs/object-position
2460
2460
  */
2461
2461
  "object-position": [{
2462
- object: N()
2462
+ object: R()
2463
2463
  }],
2464
2464
  /**
2465
2465
  * Overflow
2466
2466
  * @see https://tailwindcss.com/docs/overflow
2467
2467
  */
2468
2468
  overflow: [{
2469
- overflow: R()
2469
+ overflow: T()
2470
2470
  }],
2471
2471
  /**
2472
2472
  * Overflow X
2473
2473
  * @see https://tailwindcss.com/docs/overflow
2474
2474
  */
2475
2475
  "overflow-x": [{
2476
- "overflow-x": R()
2476
+ "overflow-x": T()
2477
2477
  }],
2478
2478
  /**
2479
2479
  * Overflow Y
2480
2480
  * @see https://tailwindcss.com/docs/overflow
2481
2481
  */
2482
2482
  "overflow-y": [{
2483
- "overflow-y": R()
2483
+ "overflow-y": T()
2484
2484
  }],
2485
2485
  /**
2486
2486
  * Overscroll Behavior
2487
2487
  * @see https://tailwindcss.com/docs/overscroll-behavior
2488
2488
  */
2489
2489
  overscroll: [{
2490
- overscroll: k()
2490
+ overscroll: N()
2491
2491
  }],
2492
2492
  /**
2493
2493
  * Overscroll Behavior X
2494
2494
  * @see https://tailwindcss.com/docs/overscroll-behavior
2495
2495
  */
2496
2496
  "overscroll-x": [{
2497
- "overscroll-x": k()
2497
+ "overscroll-x": N()
2498
2498
  }],
2499
2499
  /**
2500
2500
  * Overscroll Behavior Y
2501
2501
  * @see https://tailwindcss.com/docs/overscroll-behavior
2502
2502
  */
2503
2503
  "overscroll-y": [{
2504
- "overscroll-y": k()
2504
+ "overscroll-y": N()
2505
2505
  }],
2506
2506
  /**
2507
2507
  * Position
@@ -2909,77 +2909,77 @@ const au = (e, t) => {
2909
2909
  * @see https://tailwindcss.com/docs/margin
2910
2910
  */
2911
2911
  m: [{
2912
- m: P()
2912
+ m: A()
2913
2913
  }],
2914
2914
  /**
2915
2915
  * Margin Inline
2916
2916
  * @see https://tailwindcss.com/docs/margin
2917
2917
  */
2918
2918
  mx: [{
2919
- mx: P()
2919
+ mx: A()
2920
2920
  }],
2921
2921
  /**
2922
2922
  * Margin Block
2923
2923
  * @see https://tailwindcss.com/docs/margin
2924
2924
  */
2925
2925
  my: [{
2926
- my: P()
2926
+ my: A()
2927
2927
  }],
2928
2928
  /**
2929
2929
  * Margin Inline Start
2930
2930
  * @see https://tailwindcss.com/docs/margin
2931
2931
  */
2932
2932
  ms: [{
2933
- ms: P()
2933
+ ms: A()
2934
2934
  }],
2935
2935
  /**
2936
2936
  * Margin Inline End
2937
2937
  * @see https://tailwindcss.com/docs/margin
2938
2938
  */
2939
2939
  me: [{
2940
- me: P()
2940
+ me: A()
2941
2941
  }],
2942
2942
  /**
2943
2943
  * Margin Block Start
2944
2944
  * @see https://tailwindcss.com/docs/margin
2945
2945
  */
2946
2946
  mbs: [{
2947
- mbs: P()
2947
+ mbs: A()
2948
2948
  }],
2949
2949
  /**
2950
2950
  * Margin Block End
2951
2951
  * @see https://tailwindcss.com/docs/margin
2952
2952
  */
2953
2953
  mbe: [{
2954
- mbe: P()
2954
+ mbe: A()
2955
2955
  }],
2956
2956
  /**
2957
2957
  * Margin Top
2958
2958
  * @see https://tailwindcss.com/docs/margin
2959
2959
  */
2960
2960
  mt: [{
2961
- mt: P()
2961
+ mt: A()
2962
2962
  }],
2963
2963
  /**
2964
2964
  * Margin Right
2965
2965
  * @see https://tailwindcss.com/docs/margin
2966
2966
  */
2967
2967
  mr: [{
2968
- mr: P()
2968
+ mr: A()
2969
2969
  }],
2970
2970
  /**
2971
2971
  * Margin Bottom
2972
2972
  * @see https://tailwindcss.com/docs/margin
2973
2973
  */
2974
2974
  mb: [{
2975
- mb: P()
2975
+ mb: A()
2976
2976
  }],
2977
2977
  /**
2978
2978
  * Margin Left
2979
2979
  * @see https://tailwindcss.com/docs/margin
2980
2980
  */
2981
2981
  ml: [{
2982
- ml: P()
2982
+ ml: A()
2983
2983
  }],
2984
2984
  /**
2985
2985
  * Space Between X
@@ -3041,21 +3041,21 @@ const au = (e, t) => {
3041
3041
  * @see https://tailwindcss.com/docs/height
3042
3042
  */
3043
3043
  "block-size": [{
3044
- block: ["auto", ...T()]
3044
+ block: ["auto", ...k()]
3045
3045
  }],
3046
3046
  /**
3047
3047
  * Min-Block Size
3048
3048
  * @see https://tailwindcss.com/docs/min-height
3049
3049
  */
3050
3050
  "min-block-size": [{
3051
- "min-block": ["auto", ...T()]
3051
+ "min-block": ["auto", ...k()]
3052
3052
  }],
3053
3053
  /**
3054
3054
  * Max-Block Size
3055
3055
  * @see https://tailwindcss.com/docs/max-height
3056
3056
  */
3057
3057
  "max-block-size": [{
3058
- "max-block": ["none", ...T()]
3058
+ "max-block": ["none", ...k()]
3059
3059
  }],
3060
3060
  /**
3061
3061
  * Width
@@ -3390,21 +3390,21 @@ const au = (e, t) => {
3390
3390
  * @see https://tailwindcss.com/docs/background-position
3391
3391
  */
3392
3392
  "bg-position": [{
3393
- bg: A()
3393
+ bg: _()
3394
3394
  }],
3395
3395
  /**
3396
3396
  * Background Repeat
3397
3397
  * @see https://tailwindcss.com/docs/background-repeat
3398
3398
  */
3399
3399
  "bg-repeat": [{
3400
- bg: z()
3400
+ bg: $()
3401
3401
  }],
3402
3402
  /**
3403
3403
  * Background Size
3404
3404
  * @see https://tailwindcss.com/docs/background-size
3405
3405
  */
3406
3406
  "bg-size": [{
3407
- bg: _()
3407
+ bg: P()
3408
3408
  }],
3409
3409
  /**
3410
3410
  * Background Image
@@ -3431,21 +3431,21 @@ const au = (e, t) => {
3431
3431
  * @see https://tailwindcss.com/docs/gradient-color-stops
3432
3432
  */
3433
3433
  "gradient-from-pos": [{
3434
- from: $()
3434
+ from: z()
3435
3435
  }],
3436
3436
  /**
3437
3437
  * Gradient Color Stops Via Position
3438
3438
  * @see https://tailwindcss.com/docs/gradient-color-stops
3439
3439
  */
3440
3440
  "gradient-via-pos": [{
3441
- via: $()
3441
+ via: z()
3442
3442
  }],
3443
3443
  /**
3444
3444
  * Gradient Color Stops To Position
3445
3445
  * @see https://tailwindcss.com/docs/gradient-color-stops
3446
3446
  */
3447
3447
  "gradient-to-pos": [{
3448
- to: $()
3448
+ to: z()
3449
3449
  }],
3450
3450
  /**
3451
3451
  * Gradient Color Stops From
@@ -4095,21 +4095,21 @@ const au = (e, t) => {
4095
4095
  * @see https://tailwindcss.com/docs/mask-position
4096
4096
  */
4097
4097
  "mask-position": [{
4098
- mask: A()
4098
+ mask: _()
4099
4099
  }],
4100
4100
  /**
4101
4101
  * Mask Repeat
4102
4102
  * @see https://tailwindcss.com/docs/mask-repeat
4103
4103
  */
4104
4104
  "mask-repeat": [{
4105
- mask: z()
4105
+ mask: $()
4106
4106
  }],
4107
4107
  /**
4108
4108
  * Mask Size
4109
4109
  * @see https://tailwindcss.com/docs/mask-size
4110
4110
  */
4111
4111
  "mask-size": [{
4112
- mask: _()
4112
+ mask: P()
4113
4113
  }],
4114
4114
  /**
4115
4115
  * Mask Type
@@ -4406,7 +4406,7 @@ const au = (e, t) => {
4406
4406
  * @see https://tailwindcss.com/docs/perspective-origin
4407
4407
  */
4408
4408
  "perspective-origin": [{
4409
- "perspective-origin": N()
4409
+ "perspective-origin": R()
4410
4410
  }],
4411
4411
  /**
4412
4412
  * Rotate
@@ -4502,7 +4502,7 @@ const au = (e, t) => {
4502
4502
  * @see https://tailwindcss.com/docs/transform-origin
4503
4503
  */
4504
4504
  "transform-origin": [{
4505
- origin: N()
4505
+ origin: R()
4506
4506
  }],
4507
4507
  /**
4508
4508
  * Transform Style
@@ -5183,8 +5183,8 @@ function Zs(e) {
5183
5183
  d.displayName = i;
5184
5184
  const u = e + "CollectionItemSlot", l = "data-radix-collection-item", m = /* @__PURE__ */ Wt(u), h = I.forwardRef(
5185
5185
  (g, v) => {
5186
- const { scope: y, children: w, ...x } = g, C = I.useRef(null), N = ie(v, C), R = s(u, y);
5187
- return I.useEffect(() => (R.itemMap.set(C, { ref: C, ...x }), () => void R.itemMap.delete(C))), /* @__PURE__ */ f(m, { [l]: "", ref: N, children: w });
5186
+ const { scope: y, children: w, ...x } = g, C = I.useRef(null), R = ie(v, C), T = s(u, y);
5187
+ return I.useEffect(() => (T.itemMap.set(C, { ref: C, ...x }), () => void T.itemMap.delete(C))), /* @__PURE__ */ f(m, { [l]: "", ref: R, children: w });
5188
5188
  }
5189
5189
  );
5190
5190
  h.displayName = u;
@@ -5195,7 +5195,7 @@ function Zs(e) {
5195
5195
  if (!w) return [];
5196
5196
  const x = Array.from(w.querySelectorAll(`[${l}]`));
5197
5197
  return Array.from(v.itemMap.values()).sort(
5198
- (R, k) => x.indexOf(R.ref.current) - x.indexOf(k.ref.current)
5198
+ (T, N) => x.indexOf(T.ref.current) - x.indexOf(N.ref.current)
5199
5199
  );
5200
5200
  }, [v.collectionRef, v.itemMap]);
5201
5201
  }
@@ -5471,15 +5471,15 @@ var xf = "DismissableLayer", yo = "dismissableLayer.update", Sf = "dismissableLa
5471
5471
  onInteractOutside: a,
5472
5472
  onDismiss: i,
5473
5473
  ...c
5474
- } = e, d = p.useContext(na), [u, l] = p.useState(null), m = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, h] = p.useState({}), b = ie(t, (k) => l(k)), g = Array.from(d.layers), [v] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), y = g.indexOf(v), w = u ? g.indexOf(u) : -1, x = d.layersWithOutsidePointerEventsDisabled.size > 0, C = w >= y, N = Nf((k) => {
5475
- const E = k.target, L = [...d.branches].some((W) => W.contains(E));
5476
- !C || L || (r == null || r(k), a == null || a(k), k.defaultPrevented || i == null || i());
5477
- }, m), R = Rf((k) => {
5478
- const E = k.target;
5479
- [...d.branches].some((W) => W.contains(E)) || (s == null || s(k), a == null || a(k), k.defaultPrevented || i == null || i());
5474
+ } = e, d = p.useContext(na), [u, l] = p.useState(null), m = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, h] = p.useState({}), b = ie(t, (N) => l(N)), g = Array.from(d.layers), [v] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), y = g.indexOf(v), w = u ? g.indexOf(u) : -1, x = d.layersWithOutsidePointerEventsDisabled.size > 0, C = w >= y, R = Nf((N) => {
5475
+ const E = N.target, L = [...d.branches].some((W) => W.contains(E));
5476
+ !C || L || (r == null || r(N), a == null || a(N), N.defaultPrevented || i == null || i());
5477
+ }, m), T = Rf((N) => {
5478
+ const E = N.target;
5479
+ [...d.branches].some((W) => W.contains(E)) || (s == null || s(N), a == null || a(N), N.defaultPrevented || i == null || i());
5480
5480
  }, m);
5481
- return wf((k) => {
5482
- w === d.layers.size - 1 && (o == null || o(k), !k.defaultPrevented && i && (k.preventDefault(), i()));
5481
+ return wf((N) => {
5482
+ w === d.layers.size - 1 && (o == null || o(N), !N.defaultPrevented && i && (N.preventDefault(), i()));
5483
5483
  }, m), p.useEffect(() => {
5484
5484
  if (u)
5485
5485
  return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (Or = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(u)), d.layers.add(u), Lr(), () => {
@@ -5488,8 +5488,8 @@ var xf = "DismissableLayer", yo = "dismissableLayer.update", Sf = "dismissableLa
5488
5488
  }, [u, m, n, d]), p.useEffect(() => () => {
5489
5489
  u && (d.layers.delete(u), d.layersWithOutsidePointerEventsDisabled.delete(u), Lr());
5490
5490
  }, [u, d]), p.useEffect(() => {
5491
- const k = () => h({});
5492
- return document.addEventListener(yo, k), () => document.removeEventListener(yo, k);
5491
+ const N = () => h({});
5492
+ return document.addEventListener(yo, N), () => document.removeEventListener(yo, N);
5493
5493
  }, []), /* @__PURE__ */ f(
5494
5494
  Z.div,
5495
5495
  {
@@ -5499,11 +5499,11 @@ var xf = "DismissableLayer", yo = "dismissableLayer.update", Sf = "dismissableLa
5499
5499
  pointerEvents: x ? C ? "auto" : "none" : void 0,
5500
5500
  ...e.style
5501
5501
  },
5502
- onFocusCapture: Q(e.onFocusCapture, R.onFocusCapture),
5503
- onBlurCapture: Q(e.onBlurCapture, R.onBlurCapture),
5502
+ onFocusCapture: Q(e.onFocusCapture, T.onFocusCapture),
5503
+ onBlurCapture: Q(e.onBlurCapture, T.onBlurCapture),
5504
5504
  onPointerDownCapture: Q(
5505
5505
  e.onPointerDownCapture,
5506
- N.onPointerDownCapture
5506
+ R.onPointerDownCapture
5507
5507
  )
5508
5508
  }
5509
5509
  );
@@ -5601,8 +5601,8 @@ var Qn = "focusScope.autoFocusOnMount", eo = "focusScope.autoFocusOnUnmount", Dr
5601
5601
  C !== null && (i.contains(C) || Qe(l.current, { select: !0 }));
5602
5602
  }, y = function(x) {
5603
5603
  if (document.activeElement === document.body)
5604
- for (const N of x)
5605
- N.removedNodes.length > 0 && Qe(i);
5604
+ for (const R of x)
5605
+ R.removedNodes.length > 0 && Qe(i);
5606
5606
  };
5607
5607
  document.addEventListener("focusin", g), document.addEventListener("focusout", v);
5608
5608
  const w = new MutationObserver(y);
@@ -5872,12 +5872,12 @@ var ca = jf(), oo = function() {
5872
5872
  onScrollCapture: oo,
5873
5873
  onWheelCapture: oo,
5874
5874
  onTouchMoveCapture: oo
5875
- }), r = o[0], s = o[1], a = e.forwardProps, i = e.children, c = e.className, d = e.removeScrollBar, u = e.enabled, l = e.shards, m = e.sideCar, h = e.noRelative, b = e.noIsolation, g = e.inert, v = e.allowPinchZoom, y = e.as, w = y === void 0 ? "div" : y, x = e.gapMode, C = aa(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), N = m, R = Vf([n, t]), k = Fe(Fe({}, C), r);
5875
+ }), r = o[0], s = o[1], a = e.forwardProps, i = e.children, c = e.className, d = e.removeScrollBar, u = e.enabled, l = e.shards, m = e.sideCar, h = e.noRelative, b = e.noIsolation, g = e.inert, v = e.allowPinchZoom, y = e.as, w = y === void 0 ? "div" : y, x = e.gapMode, C = aa(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), R = m, T = Vf([n, t]), N = Fe(Fe({}, C), r);
5876
5876
  return p.createElement(
5877
5877
  p.Fragment,
5878
5878
  null,
5879
- u && p.createElement(N, { sideCar: ca, removeScrollBar: d, shards: l, noRelative: h, noIsolation: b, inert: g, setCallbacks: s, allowPinchZoom: !!v, lockRef: n, gapMode: x }),
5880
- a ? p.cloneElement(p.Children.only(i), Fe(Fe({}, k), { ref: R })) : p.createElement(w, Fe({}, k, { className: c, ref: R }), i)
5879
+ u && p.createElement(R, { sideCar: ca, removeScrollBar: d, shards: l, noRelative: h, noIsolation: b, inert: g, setCallbacks: s, allowPinchZoom: !!v, lockRef: n, gapMode: x }),
5880
+ a ? p.cloneElement(p.Children.only(i), Fe(Fe({}, N), { ref: T })) : p.createElement(w, Fe({}, N, { className: c, ref: T }), i)
5881
5881
  );
5882
5882
  });
5883
5883
  Pn.defaultProps = {
@@ -6123,34 +6123,34 @@ function gp(e) {
6123
6123
  var i = p.useCallback(function(g, v) {
6124
6124
  if ("touches" in g && g.touches.length === 2 || g.type === "wheel" && g.ctrlKey)
6125
6125
  return !a.current.allowPinchZoom;
6126
- var y = cn(g), w = n.current, x = "deltaX" in g ? g.deltaX : w[0] - y[0], C = "deltaY" in g ? g.deltaY : w[1] - y[1], N, R = g.target, k = Math.abs(x) > Math.abs(C) ? "h" : "v";
6127
- if ("touches" in g && k === "h" && R.type === "range")
6126
+ var y = cn(g), w = n.current, x = "deltaX" in g ? g.deltaX : w[0] - y[0], C = "deltaY" in g ? g.deltaY : w[1] - y[1], R, T = g.target, N = Math.abs(x) > Math.abs(C) ? "h" : "v";
6127
+ if ("touches" in g && N === "h" && T.type === "range")
6128
6128
  return !1;
6129
- var E = window.getSelection(), L = E && E.anchorNode, W = L ? L === R || L.contains(R) : !1;
6129
+ var E = window.getSelection(), L = E && E.anchorNode, W = L ? L === T || L.contains(T) : !1;
6130
6130
  if (W)
6131
6131
  return !1;
6132
- var M = Wr(k, R);
6132
+ var M = Wr(N, T);
6133
6133
  if (!M)
6134
6134
  return !0;
6135
- if (M ? N = k : (N = k === "v" ? "h" : "v", M = Wr(k, R)), !M)
6135
+ if (M ? R = N : (R = N === "v" ? "h" : "v", M = Wr(N, T)), !M)
6136
6136
  return !1;
6137
- if (!o.current && "changedTouches" in g && (x || C) && (o.current = N), !N)
6137
+ if (!o.current && "changedTouches" in g && (x || C) && (o.current = R), !R)
6138
6138
  return !0;
6139
- var F = o.current || N;
6139
+ var F = o.current || R;
6140
6140
  return fp(F, v, g, F === "h" ? x : C);
6141
6141
  }, []), c = p.useCallback(function(g) {
6142
6142
  var v = g;
6143
6143
  if (!(!St.length || St[St.length - 1] !== s)) {
6144
- var y = "deltaY" in v ? Ur(v) : cn(v), w = t.current.filter(function(N) {
6145
- return N.name === v.type && (N.target === v.target || v.target === N.shadowParent) && pp(N.delta, y);
6144
+ var y = "deltaY" in v ? Ur(v) : cn(v), w = t.current.filter(function(R) {
6145
+ return R.name === v.type && (R.target === v.target || v.target === R.shadowParent) && pp(R.delta, y);
6146
6146
  })[0];
6147
6147
  if (w && w.should) {
6148
6148
  v.cancelable && v.preventDefault();
6149
6149
  return;
6150
6150
  }
6151
6151
  if (!w) {
6152
- var x = (a.current.shards || []).map(jr).filter(Boolean).filter(function(N) {
6153
- return N.contains(v.target);
6152
+ var x = (a.current.shards || []).map(jr).filter(Boolean).filter(function(R) {
6153
+ return R.contains(v.target);
6154
6154
  }), C = x.length > 0 ? i(v, x[0]) : !a.current.noIsolation;
6155
6155
  C && v.cancelable && v.preventDefault();
6156
6156
  }
@@ -6578,13 +6578,13 @@ var Na = "CheckboxBubbleInput", Ra = p.forwardRef(
6578
6578
  p.useEffect(() => {
6579
6579
  const w = m;
6580
6580
  if (!w) return;
6581
- const x = window.HTMLInputElement.prototype, N = Object.getOwnPropertyDescriptor(
6581
+ const x = window.HTMLInputElement.prototype, R = Object.getOwnPropertyDescriptor(
6582
6582
  x,
6583
6583
  "checked"
6584
- ).set, R = !r.current;
6585
- if (g !== s && N) {
6586
- const k = new Event("click", { bubbles: R });
6587
- w.indeterminate = et(s), N.call(w, et(s) ? !1 : s), w.dispatchEvent(k);
6584
+ ).set, T = !r.current;
6585
+ if (g !== s && R) {
6586
+ const N = new Event("click", { bubbles: T });
6587
+ w.indeterminate = et(s), R.call(w, et(s) ? !1 : s), w.dispatchEvent(N);
6588
6588
  }
6589
6589
  }, [m, g, s, r]);
6590
6590
  const y = p.useRef(et(s) ? !1 : s);
@@ -6812,17 +6812,17 @@ async function Yp(e, t) {
6812
6812
  } : {
6813
6813
  x: 1,
6814
6814
  y: 1
6815
- }, N = yn(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
6815
+ }, R = yn(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
6816
6816
  elements: i,
6817
6817
  rect: w,
6818
6818
  offsetParent: x,
6819
6819
  strategy: c
6820
6820
  }) : w);
6821
6821
  return {
6822
- top: (y.top - N.top + b.top) / C.y,
6823
- bottom: (N.bottom - y.bottom + b.bottom) / C.y,
6824
- left: (y.left - N.left + b.left) / C.x,
6825
- right: (N.right - y.right + b.right) / C.x
6822
+ top: (y.top - R.top + b.top) / C.y,
6823
+ bottom: (R.bottom - y.bottom + b.bottom) / C.y,
6824
+ left: (y.left - R.left + b.left) / C.x,
6825
+ right: (R.right - y.right + b.right) / C.x
6826
6826
  };
6827
6827
  }
6828
6828
  const qp = 50, Kp = async (e, t, n) => {
@@ -6854,8 +6854,8 @@ const qp = 50, Kp = async (e, t, n) => {
6854
6854
  } = v, {
6855
6855
  x,
6856
6856
  y: C,
6857
- data: N,
6858
- reset: R
6857
+ data: R,
6858
+ reset: T
6859
6859
  } = await w({
6860
6860
  x: u,
6861
6861
  y: l,
@@ -6872,12 +6872,12 @@ const qp = 50, Kp = async (e, t, n) => {
6872
6872
  });
6873
6873
  u = x ?? u, l = C ?? l, b[y] = {
6874
6874
  ...b[y],
6875
- ...N
6876
- }, R && h < qp && (h++, typeof R == "object" && (R.placement && (m = R.placement), R.rects && (d = R.rects === !0 ? await a.getElementRects({
6875
+ ...R
6876
+ }, T && h < qp && (h++, typeof T == "object" && (T.placement && (m = T.placement), T.rects && (d = T.rects === !0 ? await a.getElementRects({
6877
6877
  reference: e,
6878
6878
  floating: t,
6879
6879
  strategy: r
6880
- }) : R.rects), {
6880
+ }) : T.rects), {
6881
6881
  x: u,
6882
6882
  y: l
6883
6883
  } = Zr(d, m, c)), g = -1);
@@ -6910,20 +6910,20 @@ const qp = 50, Kp = async (e, t, n) => {
6910
6910
  const l = Pa(u), m = {
6911
6911
  x: n,
6912
6912
  y: o
6913
- }, h = Xo(r), b = Ko(h), g = await a.getDimensions(d), v = h === "y", y = v ? "top" : "left", w = v ? "bottom" : "right", x = v ? "clientHeight" : "clientWidth", C = s.reference[b] + s.reference[h] - m[h] - s.floating[b], N = m[h] - s.reference[h], R = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(d));
6914
- let k = R ? R[x] : 0;
6915
- (!k || !await (a.isElement == null ? void 0 : a.isElement(R))) && (k = i.floating[x] || s.floating[b]);
6916
- const E = C / 2 - N / 2, L = k / 2 - g[b] / 2 - 1, W = tt(l[y], L), M = tt(l[w], L), F = W, H = k - g[b] - M, O = k / 2 - g[b] / 2 + E, K = xo(F, O, H), P = !c.arrow && Mt(r) != null && O !== K && s.reference[b] / 2 - (O < F ? W : M) - g[b] / 2 < 0, D = P ? O < F ? O - F : O - H : 0;
6913
+ }, h = Xo(r), b = Ko(h), g = await a.getDimensions(d), v = h === "y", y = v ? "top" : "left", w = v ? "bottom" : "right", x = v ? "clientHeight" : "clientWidth", C = s.reference[b] + s.reference[h] - m[h] - s.floating[b], R = m[h] - s.reference[h], T = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(d));
6914
+ let N = T ? T[x] : 0;
6915
+ (!N || !await (a.isElement == null ? void 0 : a.isElement(T))) && (N = i.floating[x] || s.floating[b]);
6916
+ const E = C / 2 - R / 2, L = N / 2 - g[b] / 2 - 1, W = tt(l[y], L), M = tt(l[w], L), F = W, H = N - g[b] - M, O = N / 2 - g[b] / 2 + E, K = xo(F, O, H), A = !c.arrow && Mt(r) != null && O !== K && s.reference[b] / 2 - (O < F ? W : M) - g[b] / 2 < 0, D = A ? O < F ? O - F : O - H : 0;
6917
6917
  return {
6918
6918
  [h]: m[h] + D,
6919
6919
  data: {
6920
6920
  [h]: K,
6921
6921
  centerOffset: O - K - D,
6922
- ...P && {
6922
+ ...A && {
6923
6923
  alignmentOffset: D
6924
6924
  }
6925
6925
  },
6926
- reset: P
6926
+ reset: A
6927
6927
  };
6928
6928
  }
6929
6929
  }), Zp = function(e) {
@@ -6950,9 +6950,9 @@ const qp = 50, Kp = async (e, t, n) => {
6950
6950
  } = Ge(e, t);
6951
6951
  if ((n = s.arrow) != null && n.alignmentOffset)
6952
6952
  return {};
6953
- const y = Ye(r), w = Be(i), x = Ye(i) === i, C = await (c.isRTL == null ? void 0 : c.isRTL(d.floating)), N = m || (x || !g ? [bn(i)] : Hp(i)), R = b !== "none";
6954
- !m && R && N.push(...jp(i, g, b, C));
6955
- const k = [i, ...N], E = await c.detectOverflow(t, v), L = [];
6953
+ const y = Ye(r), w = Be(i), x = Ye(i) === i, C = await (c.isRTL == null ? void 0 : c.isRTL(d.floating)), R = m || (x || !g ? [bn(i)] : Hp(i)), T = b !== "none";
6954
+ !m && T && R.push(...jp(i, g, b, C));
6955
+ const N = [i, ...R], E = await c.detectOverflow(t, v), L = [];
6956
6956
  let W = ((o = s.flip) == null ? void 0 : o.overflows) || [];
6957
6957
  if (u && L.push(E[y]), l) {
6958
6958
  const O = Bp(r, a, C);
@@ -6963,7 +6963,7 @@ const qp = 50, Kp = async (e, t, n) => {
6963
6963
  overflows: L
6964
6964
  }], !L.every((O) => O <= 0)) {
6965
6965
  var M, F;
6966
- const O = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1, K = k[O];
6966
+ const O = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1, K = N[O];
6967
6967
  if (K && (!(l === "alignment" ? w !== Be(K) : !1) || // We leave the current main axis only if every placement on that axis
6968
6968
  // overflows the main axis.
6969
6969
  W.every((U) => Be(U.placement) === w ? U.overflows[0] > 0 : !0)))
@@ -6976,31 +6976,31 @@ const qp = 50, Kp = async (e, t, n) => {
6976
6976
  placement: K
6977
6977
  }
6978
6978
  };
6979
- let P = (F = W.filter((D) => D.overflows[0] <= 0).sort((D, U) => D.overflows[1] - U.overflows[1])[0]) == null ? void 0 : F.placement;
6980
- if (!P)
6979
+ let A = (F = W.filter((D) => D.overflows[0] <= 0).sort((D, U) => D.overflows[1] - U.overflows[1])[0]) == null ? void 0 : F.placement;
6980
+ if (!A)
6981
6981
  switch (h) {
6982
6982
  case "bestFit": {
6983
6983
  var H;
6984
6984
  const D = (H = W.filter((U) => {
6985
- if (R) {
6986
- const T = Be(U.placement);
6987
- return T === w || // Create a bias to the `y` side axis due to horizontal
6985
+ if (T) {
6986
+ const k = Be(U.placement);
6987
+ return k === w || // Create a bias to the `y` side axis due to horizontal
6988
6988
  // reading directions favoring greater width.
6989
- T === "y";
6989
+ k === "y";
6990
6990
  }
6991
6991
  return !0;
6992
- }).map((U) => [U.placement, U.overflows.filter((T) => T > 0).reduce((T, S) => T + S, 0)]).sort((U, T) => U[1] - T[1])[0]) == null ? void 0 : H[0];
6993
- D && (P = D);
6992
+ }).map((U) => [U.placement, U.overflows.filter((k) => k > 0).reduce((k, S) => k + S, 0)]).sort((U, k) => U[1] - k[1])[0]) == null ? void 0 : H[0];
6993
+ D && (A = D);
6994
6994
  break;
6995
6995
  }
6996
6996
  case "initialPlacement":
6997
- P = i;
6997
+ A = i;
6998
6998
  break;
6999
6999
  }
7000
- if (r !== P)
7000
+ if (r !== A)
7001
7001
  return {
7002
7002
  reset: {
7003
- placement: P
7003
+ placement: A
7004
7004
  }
7005
7005
  };
7006
7006
  }
@@ -7196,13 +7196,13 @@ const em = function(e) {
7196
7196
  ...g
7197
7197
  };
7198
7198
  if (c) {
7199
- const x = m === "y" ? "height" : "width", C = s.reference[m] - s.floating[x] + v.mainAxis, N = s.reference[m] + s.reference[x] - v.mainAxis;
7200
- h < C ? h = C : h > N && (h = N);
7199
+ const x = m === "y" ? "height" : "width", C = s.reference[m] - s.floating[x] + v.mainAxis, R = s.reference[m] + s.reference[x] - v.mainAxis;
7200
+ h < C ? h = C : h > R && (h = R);
7201
7201
  }
7202
7202
  if (d) {
7203
7203
  var y, w;
7204
- const x = m === "y" ? "width" : "height", C = Aa.has(Ye(r)), N = s.reference[l] - s.floating[x] + (C && ((y = a.offset) == null ? void 0 : y[l]) || 0) + (C ? 0 : v.crossAxis), R = s.reference[l] + s.reference[x] + (C ? 0 : ((w = a.offset) == null ? void 0 : w[l]) || 0) - (C ? v.crossAxis : 0);
7205
- b < N ? b = N : b > R && (b = R);
7204
+ const x = m === "y" ? "width" : "height", C = Aa.has(Ye(r)), R = s.reference[l] - s.floating[x] + (C && ((y = a.offset) == null ? void 0 : y[l]) || 0) + (C ? 0 : v.crossAxis), T = s.reference[l] + s.reference[x] + (C ? 0 : ((w = a.offset) == null ? void 0 : w[l]) || 0) - (C ? v.crossAxis : 0);
7205
+ b < R ? b = R : b > T && (b = T);
7206
7206
  }
7207
7207
  return {
7208
7208
  [m]: h,
@@ -7231,16 +7231,16 @@ const em = function(e) {
7231
7231
  } = s.floating;
7232
7232
  let v, y;
7233
7233
  l === "top" || l === "bottom" ? (v = l, y = m === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (y = l, v = m === "end" ? "top" : "bottom");
7234
- const w = g - u.top - u.bottom, x = b - u.left - u.right, C = tt(g - u[v], w), N = tt(b - u[y], x), R = !t.middlewareData.shift;
7235
- let k = C, E = N;
7236
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (E = x), (o = t.middlewareData.shift) != null && o.enabled.y && (k = w), R && !m) {
7234
+ const w = g - u.top - u.bottom, x = b - u.left - u.right, C = tt(g - u[v], w), R = tt(b - u[y], x), T = !t.middlewareData.shift;
7235
+ let N = C, E = R;
7236
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (E = x), (o = t.middlewareData.shift) != null && o.enabled.y && (N = w), T && !m) {
7237
7237
  const W = Ee(u.left, 0), M = Ee(u.right, 0), F = Ee(u.top, 0), H = Ee(u.bottom, 0);
7238
- h ? E = b - 2 * (W !== 0 || M !== 0 ? W + M : Ee(u.left, u.right)) : k = g - 2 * (F !== 0 || H !== 0 ? F + H : Ee(u.top, u.bottom));
7238
+ h ? E = b - 2 * (W !== 0 || M !== 0 ? W + M : Ee(u.left, u.right)) : N = g - 2 * (F !== 0 || H !== 0 ? F + H : Ee(u.top, u.bottom));
7239
7239
  }
7240
7240
  await c({
7241
7241
  ...t,
7242
7242
  availableWidth: E,
7243
- availableHeight: k
7243
+ availableHeight: N
7244
7244
  });
7245
7245
  const L = await a.getDimensions(i.floating);
7246
7246
  return b !== L.width || g !== L.height ? {
@@ -7679,25 +7679,25 @@ function Sm(e, t) {
7679
7679
  threshold: Ee(0, tt(1, c)) || 1
7680
7680
  };
7681
7681
  let C = !0;
7682
- function N(R) {
7683
- const k = R[0].intersectionRatio;
7684
- if (k !== c) {
7682
+ function R(T) {
7683
+ const N = T[0].intersectionRatio;
7684
+ if (N !== c) {
7685
7685
  if (!C)
7686
7686
  return a();
7687
- k ? a(!1, k) : o = setTimeout(() => {
7687
+ N ? a(!1, N) : o = setTimeout(() => {
7688
7688
  a(!1, 1e-7);
7689
7689
  }, 1e3);
7690
7690
  }
7691
- k === 1 && !$a(d, e.getBoundingClientRect()) && a(), C = !1;
7691
+ N === 1 && !$a(d, e.getBoundingClientRect()) && a(), C = !1;
7692
7692
  }
7693
7693
  try {
7694
- n = new IntersectionObserver(N, {
7694
+ n = new IntersectionObserver(R, {
7695
7695
  ...x,
7696
7696
  // Handle <iframe>s
7697
7697
  root: r.ownerDocument
7698
7698
  });
7699
7699
  } catch {
7700
- n = new IntersectionObserver(N, x);
7700
+ n = new IntersectionObserver(R, x);
7701
7701
  }
7702
7702
  n.observe(e);
7703
7703
  }
@@ -7821,20 +7821,20 @@ function Mm(e) {
7821
7821
  }), [m, h] = p.useState(o);
7822
7822
  wn(m, o) || h(o);
7823
7823
  const [b, g] = p.useState(null), [v, y] = p.useState(null), w = p.useCallback((U) => {
7824
- U !== R.current && (R.current = U, g(U));
7824
+ U !== T.current && (T.current = U, g(U));
7825
7825
  }, []), x = p.useCallback((U) => {
7826
- U !== k.current && (k.current = U, y(U));
7827
- }, []), C = s || b, N = a || v, R = p.useRef(null), k = p.useRef(null), E = p.useRef(u), L = c != null, W = uo(c), M = uo(r), F = uo(d), H = p.useCallback(() => {
7828
- if (!R.current || !k.current)
7826
+ U !== N.current && (N.current = U, y(U));
7827
+ }, []), C = s || b, R = a || v, T = p.useRef(null), N = p.useRef(null), E = p.useRef(u), L = c != null, W = uo(c), M = uo(r), F = uo(d), H = p.useCallback(() => {
7828
+ if (!T.current || !N.current)
7829
7829
  return;
7830
7830
  const U = {
7831
7831
  placement: t,
7832
7832
  strategy: n,
7833
7833
  middleware: m
7834
7834
  };
7835
- M.current && (U.platform = M.current), Am(R.current, k.current, U).then((T) => {
7835
+ M.current && (U.platform = M.current), Am(T.current, N.current, U).then((k) => {
7836
7836
  const S = {
7837
- ...T,
7837
+ ...k,
7838
7838
  // The floating element's position may be recomputed while it's closed
7839
7839
  // but still mounted (such as when transitioning out). To ensure
7840
7840
  // `isPositioned` will be `false` initially on the next open, avoid
@@ -7856,48 +7856,48 @@ function Mm(e) {
7856
7856
  mn(() => (O.current = !0, () => {
7857
7857
  O.current = !1;
7858
7858
  }), []), mn(() => {
7859
- if (C && (R.current = C), N && (k.current = N), C && N) {
7859
+ if (C && (T.current = C), R && (N.current = R), C && R) {
7860
7860
  if (W.current)
7861
- return W.current(C, N, H);
7861
+ return W.current(C, R, H);
7862
7862
  H();
7863
7863
  }
7864
- }, [C, N, H, W, L]);
7864
+ }, [C, R, H, W, L]);
7865
7865
  const K = p.useMemo(() => ({
7866
- reference: R,
7867
- floating: k,
7866
+ reference: T,
7867
+ floating: N,
7868
7868
  setReference: w,
7869
7869
  setFloating: x
7870
- }), [w, x]), P = p.useMemo(() => ({
7870
+ }), [w, x]), A = p.useMemo(() => ({
7871
7871
  reference: C,
7872
- floating: N
7873
- }), [C, N]), D = p.useMemo(() => {
7872
+ floating: R
7873
+ }), [C, R]), D = p.useMemo(() => {
7874
7874
  const U = {
7875
7875
  position: n,
7876
7876
  left: 0,
7877
7877
  top: 0
7878
7878
  };
7879
- if (!P.floating)
7879
+ if (!A.floating)
7880
7880
  return U;
7881
- const T = ss(P.floating, u.x), S = ss(P.floating, u.y);
7881
+ const k = ss(A.floating, u.x), S = ss(A.floating, u.y);
7882
7882
  return i ? {
7883
7883
  ...U,
7884
- transform: "translate(" + T + "px, " + S + "px)",
7885
- ...Fa(P.floating) >= 1.5 && {
7884
+ transform: "translate(" + k + "px, " + S + "px)",
7885
+ ...Fa(A.floating) >= 1.5 && {
7886
7886
  willChange: "transform"
7887
7887
  }
7888
7888
  } : {
7889
7889
  position: n,
7890
- left: T,
7890
+ left: k,
7891
7891
  top: S
7892
7892
  };
7893
- }, [n, i, P.floating, u.x, u.y]);
7893
+ }, [n, i, A.floating, u.x, u.y]);
7894
7894
  return p.useMemo(() => ({
7895
7895
  ...u,
7896
7896
  update: H,
7897
7897
  refs: K,
7898
- elements: P,
7898
+ elements: A,
7899
7899
  floatingStyles: D
7900
- }), [u, H, K, P, D]);
7900
+ }), [u, H, K, A, D]);
7901
7901
  }
7902
7902
  const Om = (e) => {
7903
7903
  function t(n) {
@@ -8015,12 +8015,12 @@ var tr = "PopperContent", [jm, Gm] = Ha(tr), Ga = p.forwardRef(
8015
8015
  updatePositionStrategy: h = "optimized",
8016
8016
  onPlaced: b,
8017
8017
  ...g
8018
- } = e, v = Va(tr, n), [y, w] = p.useState(null), x = ie(t, (ue) => w(ue)), [C, N] = p.useState(null), R = _n(C), k = (R == null ? void 0 : R.width) ?? 0, E = (R == null ? void 0 : R.height) ?? 0, L = o + (s !== "center" ? "-" + s : ""), W = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, M = Array.isArray(d) ? d : [d], F = M.length > 0, H = {
8018
+ } = e, v = Va(tr, n), [y, w] = p.useState(null), x = ie(t, (ue) => w(ue)), [C, R] = p.useState(null), T = _n(C), N = (T == null ? void 0 : T.width) ?? 0, E = (T == null ? void 0 : T.height) ?? 0, L = o + (s !== "center" ? "-" + s : ""), W = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, M = Array.isArray(d) ? d : [d], F = M.length > 0, H = {
8019
8019
  padding: W,
8020
8020
  boundary: M.filter(qm),
8021
8021
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
8022
8022
  altBoundary: F
8023
- }, { refs: O, floatingStyles: K, placement: P, isPositioned: D, middlewareData: U } = Mm({
8023
+ }, { refs: O, floatingStyles: K, placement: A, isPositioned: D, middlewareData: U } = Mm({
8024
8024
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
8025
8025
  strategy: "fixed",
8026
8026
  placement: L,
@@ -8047,14 +8047,14 @@ var tr = "PopperContent", [jm, Gm] = Ha(tr), Ga = p.forwardRef(
8047
8047
  }
8048
8048
  }),
8049
8049
  C && Hm({ element: C, padding: i }),
8050
- Km({ arrowWidth: k, arrowHeight: E }),
8050
+ Km({ arrowWidth: N, arrowHeight: E }),
8051
8051
  m && Bm({ strategy: "referenceHidden", ...H })
8052
8052
  ]
8053
- }), [T, S] = Ka(P), A = be(b);
8053
+ }), [k, S] = Ka(A), _ = be(b);
8054
8054
  de(() => {
8055
- D && (A == null || A());
8056
- }, [D, A]);
8057
- const z = (j = U.arrow) == null ? void 0 : j.x, _ = (Y = U.arrow) == null ? void 0 : Y.y, $ = ((ee = U.arrow) == null ? void 0 : ee.centerOffset) !== 0, [B, J] = p.useState();
8055
+ D && (_ == null || _());
8056
+ }, [D, _]);
8057
+ const $ = (j = U.arrow) == null ? void 0 : j.x, P = (Y = U.arrow) == null ? void 0 : Y.y, z = ((ee = U.arrow) == null ? void 0 : ee.centerOffset) !== 0, [B, J] = p.useState();
8058
8058
  return de(() => {
8059
8059
  y && J(window.getComputedStyle(y).zIndex);
8060
8060
  }, [y]), /* @__PURE__ */ f(
@@ -8085,15 +8085,15 @@ var tr = "PopperContent", [jm, Gm] = Ha(tr), Ga = p.forwardRef(
8085
8085
  jm,
8086
8086
  {
8087
8087
  scope: n,
8088
- placedSide: T,
8089
- onArrowChange: N,
8090
- arrowX: z,
8091
- arrowY: _,
8092
- shouldHideArrow: $,
8088
+ placedSide: k,
8089
+ onArrowChange: R,
8090
+ arrowX: $,
8091
+ arrowY: P,
8092
+ shouldHideArrow: z,
8093
8093
  children: /* @__PURE__ */ f(
8094
8094
  Z.div,
8095
8095
  {
8096
- "data-side": T,
8096
+ "data-side": k,
8097
8097
  "data-align": S,
8098
8098
  ...g,
8099
8099
  ref: x,
@@ -8204,7 +8204,7 @@ var th = p.forwardRef((e, t) => {
8204
8204
  defaultProp: i ?? null,
8205
8205
  onChange: c,
8206
8206
  caller: Kt
8207
- }), [y, w] = p.useState(!1), x = be(d), C = ei(n), N = p.useRef(!1), [R, k] = p.useState(0);
8207
+ }), [y, w] = p.useState(!1), x = be(d), C = ei(n), R = p.useRef(!1), [T, N] = p.useState(0);
8208
8208
  return p.useEffect(() => {
8209
8209
  const E = m.current;
8210
8210
  if (E)
@@ -8223,36 +8223,36 @@ var th = p.forwardRef((e, t) => {
8223
8223
  ),
8224
8224
  onItemShiftTab: p.useCallback(() => w(!0), []),
8225
8225
  onFocusableItemAdd: p.useCallback(
8226
- () => k((E) => E + 1),
8226
+ () => N((E) => E + 1),
8227
8227
  []
8228
8228
  ),
8229
8229
  onFocusableItemRemove: p.useCallback(
8230
- () => k((E) => E - 1),
8230
+ () => N((E) => E - 1),
8231
8231
  []
8232
8232
  ),
8233
8233
  children: /* @__PURE__ */ f(
8234
8234
  Z.div,
8235
8235
  {
8236
- tabIndex: y || R === 0 ? -1 : 0,
8236
+ tabIndex: y || T === 0 ? -1 : 0,
8237
8237
  "data-orientation": o,
8238
8238
  ...l,
8239
8239
  ref: h,
8240
8240
  style: { outline: "none", ...e.style },
8241
8241
  onMouseDown: Q(e.onMouseDown, () => {
8242
- N.current = !0;
8242
+ R.current = !0;
8243
8243
  }),
8244
8244
  onFocus: Q(e.onFocus, (E) => {
8245
- const L = !N.current;
8245
+ const L = !R.current;
8246
8246
  if (E.target === E.currentTarget && L && !y) {
8247
8247
  const W = new CustomEvent(fo, Xm);
8248
8248
  if (E.currentTarget.dispatchEvent(W), !W.defaultPrevented) {
8249
- const M = C().filter((P) => P.focusable), F = M.find((P) => P.active), H = M.find((P) => P.id === g), K = [F, H, ...M].filter(
8249
+ const M = C().filter((A) => A.focusable), F = M.find((A) => A.active), H = M.find((A) => A.id === g), K = [F, H, ...M].filter(
8250
8250
  Boolean
8251
- ).map((P) => P.ref.current);
8251
+ ).map((A) => A.ref.current);
8252
8252
  ri(K, u);
8253
8253
  }
8254
8254
  }
8255
- N.current = !1;
8255
+ R.current = !1;
8256
8256
  }),
8257
8257
  onBlur: Q(e.onBlur, () => w(!1))
8258
8258
  }
@@ -8662,7 +8662,7 @@ var sr = "ScrollArea", [Ei] = xe(sr), [Ph, Re] = Ei(sr), ki = p.forwardRef(
8662
8662
  dir: r,
8663
8663
  scrollHideDelay: s = 600,
8664
8664
  ...a
8665
- } = e, [i, c] = p.useState(null), [d, u] = p.useState(null), [l, m] = p.useState(null), [h, b] = p.useState(null), [g, v] = p.useState(null), [y, w] = p.useState(0), [x, C] = p.useState(0), [N, R] = p.useState(!1), [k, E] = p.useState(!1), L = ie(t, (M) => c(M)), W = Yt(r);
8665
+ } = e, [i, c] = p.useState(null), [d, u] = p.useState(null), [l, m] = p.useState(null), [h, b] = p.useState(null), [g, v] = p.useState(null), [y, w] = p.useState(0), [x, C] = p.useState(0), [R, T] = p.useState(!1), [N, E] = p.useState(!1), L = ie(t, (M) => c(M)), W = Yt(r);
8666
8666
  return /* @__PURE__ */ f(
8667
8667
  Ph,
8668
8668
  {
@@ -8677,11 +8677,11 @@ var sr = "ScrollArea", [Ei] = xe(sr), [Ph, Re] = Ei(sr), ki = p.forwardRef(
8677
8677
  onContentChange: m,
8678
8678
  scrollbarX: h,
8679
8679
  onScrollbarXChange: b,
8680
- scrollbarXEnabled: N,
8681
- onScrollbarXEnabledChange: R,
8680
+ scrollbarXEnabled: R,
8681
+ onScrollbarXEnabledChange: T,
8682
8682
  scrollbarY: g,
8683
8683
  onScrollbarYChange: v,
8684
- scrollbarYEnabled: k,
8684
+ scrollbarYEnabled: N,
8685
8685
  onScrollbarYEnabledChange: E,
8686
8686
  onCornerWidthChange: w,
8687
8687
  onCornerHeightChange: C,
@@ -8984,7 +8984,7 @@ var Ah = p.forwardRef((e, t) => {
8984
8984
  onWheelScroll: u,
8985
8985
  onResize: l,
8986
8986
  ...m
8987
- } = e, h = Re(We, n), [b, g] = p.useState(null), v = ie(t, (L) => g(L)), y = p.useRef(null), w = p.useRef(""), x = h.viewport, C = o.content - o.viewport, N = be(u), R = be(c), k = Hn(l, 10);
8987
+ } = e, h = Re(We, n), [b, g] = p.useState(null), v = ie(t, (L) => g(L)), y = p.useRef(null), w = p.useRef(""), x = h.viewport, C = o.content - o.viewport, R = be(u), T = be(c), N = Hn(l, 10);
8988
8988
  function E(L) {
8989
8989
  if (y.current) {
8990
8990
  const W = L.clientX - y.current.left, M = L.clientY - y.current.top;
@@ -8994,10 +8994,10 @@ var Ah = p.forwardRef((e, t) => {
8994
8994
  return p.useEffect(() => {
8995
8995
  const L = (W) => {
8996
8996
  const M = W.target;
8997
- (b == null ? void 0 : b.contains(M)) && N(W, C);
8997
+ (b == null ? void 0 : b.contains(M)) && R(W, C);
8998
8998
  };
8999
8999
  return document.addEventListener("wheel", L, { passive: !1 }), () => document.removeEventListener("wheel", L, { passive: !1 });
9000
- }, [x, b, C, N]), p.useEffect(R, [o, R]), _t(b, k), _t(h.content, k), /* @__PURE__ */ f(
9000
+ }, [x, b, C, R]), p.useEffect(T, [o, T]), _t(b, N), _t(h.content, N), /* @__PURE__ */ f(
9001
9001
  Oh,
9002
9002
  {
9003
9003
  scope: n,
@@ -9005,7 +9005,7 @@ var Ah = p.forwardRef((e, t) => {
9005
9005
  hasThumb: r,
9006
9006
  onThumbChange: be(s),
9007
9007
  onThumbPointerUp: be(a),
9008
- onThumbPositionChange: R,
9008
+ onThumbPositionChange: T,
9009
9009
  onThumbPointerDown: be(i),
9010
9010
  children: /* @__PURE__ */ f(
9011
9011
  Z.div,
@@ -9180,7 +9180,7 @@ var Fh = ki, Bh = Ri, Hh = Mi, Vh = [" ", "Enter", "ArrowUp", "ArrowDown"], Wh =
9180
9180
  disabled: m,
9181
9181
  required: h,
9182
9182
  form: b
9183
- } = e, g = Un(t), [v, y] = p.useState(null), [w, x] = p.useState(null), [C, N] = p.useState(!1), R = Yt(d), [k, E] = je({
9183
+ } = e, g = Un(t), [v, y] = p.useState(null), [w, x] = p.useState(null), [C, R] = p.useState(!1), T = Yt(d), [N, E] = je({
9184
9184
  prop: o,
9185
9185
  defaultProp: r ?? !1,
9186
9186
  onChange: s,
@@ -9190,7 +9190,7 @@ var Fh = ki, Bh = Ri, Hh = Mi, Vh = [" ", "Enter", "ArrowUp", "ArrowDown"], Wh =
9190
9190
  defaultProp: i,
9191
9191
  onChange: c,
9192
9192
  caller: ft
9193
- }), M = p.useRef(null), F = v ? b || !!v.closest("form") : !0, [H, O] = p.useState(/* @__PURE__ */ new Set()), K = Array.from(H).map((P) => P.props.value).join(";");
9193
+ }), M = p.useRef(null), F = v ? b || !!v.closest("form") : !0, [H, O] = p.useState(/* @__PURE__ */ new Set()), K = Array.from(H).map((A) => A.props.value).join(";");
9194
9194
  return /* @__PURE__ */ f(Xa, { ...g, children: /* @__PURE__ */ q(
9195
9195
  jh,
9196
9196
  {
@@ -9201,13 +9201,13 @@ var Fh = ki, Bh = Ri, Hh = Mi, Vh = [" ", "Enter", "ArrowUp", "ArrowDown"], Wh =
9201
9201
  valueNode: w,
9202
9202
  onValueNodeChange: x,
9203
9203
  valueNodeHasChildren: C,
9204
- onValueNodeHasChildrenChange: N,
9204
+ onValueNodeHasChildrenChange: R,
9205
9205
  contentId: ht(),
9206
9206
  value: L,
9207
9207
  onValueChange: W,
9208
- open: k,
9208
+ open: N,
9209
9209
  onOpenChange: E,
9210
- dir: R,
9210
+ dir: T,
9211
9211
  triggerPointerDownPosRef: M,
9212
9212
  disabled: m,
9213
9213
  children: [
@@ -9215,13 +9215,13 @@ var Fh = ki, Bh = Ri, Hh = Mi, Vh = [" ", "Enter", "ArrowUp", "ArrowDown"], Wh =
9215
9215
  Gh,
9216
9216
  {
9217
9217
  scope: e.__scopeSelect,
9218
- onNativeOptionAdd: p.useCallback((P) => {
9219
- O((D) => new Set(D).add(P));
9218
+ onNativeOptionAdd: p.useCallback((A) => {
9219
+ O((D) => new Set(D).add(A));
9220
9220
  }, []),
9221
- onNativeOptionRemove: p.useCallback((P) => {
9221
+ onNativeOptionRemove: p.useCallback((A) => {
9222
9222
  O((D) => {
9223
9223
  const U = new Set(D);
9224
- return U.delete(P), U;
9224
+ return U.delete(A), U;
9225
9225
  });
9226
9226
  }, []),
9227
9227
  children: n
@@ -9236,7 +9236,7 @@ var Fh = ki, Bh = Ri, Hh = Mi, Vh = [" ", "Enter", "ArrowUp", "ArrowDown"], Wh =
9236
9236
  name: u,
9237
9237
  autoComplete: l,
9238
9238
  value: L,
9239
- onChange: (P) => W(P.target.value),
9239
+ onChange: (A) => W(A.target.value),
9240
9240
  disabled: m,
9241
9241
  form: b,
9242
9242
  children: [
@@ -9359,59 +9359,59 @@ var _e = 10, [ji, st] = Lt(pt), Xh = "SelectContentImpl", Zh = /* @__PURE__ */ W
9359
9359
  avoidCollisions: v,
9360
9360
  //
9361
9361
  ...y
9362
- } = e, w = rt(pt, n), [x, C] = p.useState(null), [N, R] = p.useState(null), k = ie(t, (j) => C(j)), [E, L] = p.useState(null), [W, M] = p.useState(
9362
+ } = e, w = rt(pt, n), [x, C] = p.useState(null), [R, T] = p.useState(null), N = ie(t, (j) => C(j)), [E, L] = p.useState(null), [W, M] = p.useState(
9363
9363
  null
9364
9364
  ), F = Wn(n), [H, O] = p.useState(!1), K = p.useRef(!1);
9365
9365
  p.useEffect(() => {
9366
9366
  if (x) return Sp(x);
9367
9367
  }, [x]), Df();
9368
- const P = p.useCallback(
9368
+ const A = p.useCallback(
9369
9369
  (j) => {
9370
9370
  const [Y, ...ee] = F().map((oe) => oe.ref.current), [te] = ee.slice(-1), se = document.activeElement;
9371
9371
  for (const oe of j)
9372
- if (oe === se || (oe == null || oe.scrollIntoView({ block: "nearest" }), oe === Y && N && (N.scrollTop = 0), oe === te && N && (N.scrollTop = N.scrollHeight), oe == null || oe.focus(), document.activeElement !== se)) return;
9372
+ if (oe === se || (oe == null || oe.scrollIntoView({ block: "nearest" }), oe === Y && R && (R.scrollTop = 0), oe === te && R && (R.scrollTop = R.scrollHeight), oe == null || oe.focus(), document.activeElement !== se)) return;
9373
9373
  },
9374
- [F, N]
9374
+ [F, R]
9375
9375
  ), D = p.useCallback(
9376
- () => P([E, x]),
9377
- [P, E, x]
9376
+ () => A([E, x]),
9377
+ [A, E, x]
9378
9378
  );
9379
9379
  p.useEffect(() => {
9380
9380
  H && D();
9381
9381
  }, [H, D]);
9382
- const { onOpenChange: U, triggerPointerDownPosRef: T } = w;
9382
+ const { onOpenChange: U, triggerPointerDownPosRef: k } = w;
9383
9383
  p.useEffect(() => {
9384
9384
  if (x) {
9385
9385
  let j = { x: 0, y: 0 };
9386
9386
  const Y = (te) => {
9387
9387
  var se, oe;
9388
9388
  j = {
9389
- x: Math.abs(Math.round(te.pageX) - (((se = T.current) == null ? void 0 : se.x) ?? 0)),
9390
- y: Math.abs(Math.round(te.pageY) - (((oe = T.current) == null ? void 0 : oe.y) ?? 0))
9389
+ x: Math.abs(Math.round(te.pageX) - (((se = k.current) == null ? void 0 : se.x) ?? 0)),
9390
+ y: Math.abs(Math.round(te.pageY) - (((oe = k.current) == null ? void 0 : oe.y) ?? 0))
9391
9391
  };
9392
9392
  }, ee = (te) => {
9393
- j.x <= 10 && j.y <= 10 ? te.preventDefault() : x.contains(te.target) || U(!1), document.removeEventListener("pointermove", Y), T.current = null;
9393
+ j.x <= 10 && j.y <= 10 ? te.preventDefault() : x.contains(te.target) || U(!1), document.removeEventListener("pointermove", Y), k.current = null;
9394
9394
  };
9395
- return T.current !== null && (document.addEventListener("pointermove", Y), document.addEventListener("pointerup", ee, { capture: !0, once: !0 })), () => {
9395
+ return k.current !== null && (document.addEventListener("pointermove", Y), document.addEventListener("pointerup", ee, { capture: !0, once: !0 })), () => {
9396
9396
  document.removeEventListener("pointermove", Y), document.removeEventListener("pointerup", ee, { capture: !0 });
9397
9397
  };
9398
9398
  }
9399
- }, [x, U, T]), p.useEffect(() => {
9399
+ }, [x, U, k]), p.useEffect(() => {
9400
9400
  const j = () => U(!1);
9401
9401
  return window.addEventListener("blur", j), window.addEventListener("resize", j), () => {
9402
9402
  window.removeEventListener("blur", j), window.removeEventListener("resize", j);
9403
9403
  };
9404
9404
  }, [U]);
9405
- const [S, A] = ic((j) => {
9405
+ const [S, _] = ic((j) => {
9406
9406
  const Y = F().filter((se) => !se.disabled), ee = Y.find((se) => se.ref.current === document.activeElement), te = cc(Y, j, ee);
9407
9407
  te && setTimeout(() => te.ref.current.focus());
9408
- }), z = p.useCallback(
9408
+ }), $ = p.useCallback(
9409
9409
  (j, Y, ee) => {
9410
9410
  const te = !K.current && !ee;
9411
9411
  (w.value !== void 0 && w.value === Y || te) && (L(j), te && (K.current = !0));
9412
9412
  },
9413
9413
  [w.value]
9414
- ), _ = p.useCallback(() => x == null ? void 0 : x.focus(), [x]), $ = p.useCallback(
9414
+ ), P = p.useCallback(() => x == null ? void 0 : x.focus(), [x]), z = p.useCallback(
9415
9415
  (j, Y, ee) => {
9416
9416
  const te = !K.current && !ee;
9417
9417
  (w.value !== void 0 && w.value === Y || te) && M(j);
@@ -9434,12 +9434,12 @@ var _e = 10, [ji, st] = Lt(pt), Xh = "SelectContentImpl", Zh = /* @__PURE__ */ W
9434
9434
  {
9435
9435
  scope: n,
9436
9436
  content: x,
9437
- viewport: N,
9438
- onViewportChange: R,
9439
- itemRefCallback: z,
9437
+ viewport: R,
9438
+ onViewportChange: T,
9439
+ itemRefCallback: $,
9440
9440
  selectedItem: E,
9441
- onItemLeave: _,
9442
- itemTextRefCallback: $,
9441
+ onItemLeave: P,
9442
+ itemTextRefCallback: z,
9443
9443
  focusSelectedItem: D,
9444
9444
  selectedItemText: W,
9445
9445
  position: o,
@@ -9477,7 +9477,7 @@ var _e = 10, [ji, st] = Lt(pt), Xh = "SelectContentImpl", Zh = /* @__PURE__ */ W
9477
9477
  ...y,
9478
9478
  ...J,
9479
9479
  onPlaced: () => O(!0),
9480
- ref: k,
9480
+ ref: N,
9481
9481
  style: {
9482
9482
  // flex layout so we can place the scroll buttons properly
9483
9483
  display: "flex",
@@ -9488,13 +9488,13 @@ var _e = 10, [ji, st] = Lt(pt), Xh = "SelectContentImpl", Zh = /* @__PURE__ */ W
9488
9488
  },
9489
9489
  onKeyDown: Q(y.onKeyDown, (j) => {
9490
9490
  const Y = j.ctrlKey || j.altKey || j.metaKey;
9491
- if (j.key === "Tab" && j.preventDefault(), !Y && j.key.length === 1 && A(j.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(j.key)) {
9491
+ if (j.key === "Tab" && j.preventDefault(), !Y && j.key.length === 1 && _(j.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(j.key)) {
9492
9492
  let te = F().filter((se) => !se.disabled).map((se) => se.ref.current);
9493
9493
  if (["ArrowUp", "End"].includes(j.key) && (te = te.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(j.key)) {
9494
9494
  const se = j.target, oe = te.indexOf(se);
9495
9495
  te = te.slice(oe + 1);
9496
9496
  }
9497
- setTimeout(() => P(te)), j.preventDefault();
9497
+ setTimeout(() => A(te)), j.preventDefault();
9498
9498
  }
9499
9499
  })
9500
9500
  }
@@ -9509,11 +9509,11 @@ var _e = 10, [ji, st] = Lt(pt), Xh = "SelectContentImpl", Zh = /* @__PURE__ */ W
9509
9509
  );
9510
9510
  Gi.displayName = Xh;
9511
9511
  var Jh = "SelectItemAlignedPosition", Yi = p.forwardRef((e, t) => {
9512
- const { __scopeSelect: n, onPlaced: o, ...r } = e, s = rt(pt, n), a = st(pt, n), [i, c] = p.useState(null), [d, u] = p.useState(null), l = ie(t, (k) => u(k)), m = Wn(n), h = p.useRef(!1), b = p.useRef(!0), { viewport: g, selectedItem: v, selectedItemText: y, focusSelectedItem: w } = a, x = p.useCallback(() => {
9512
+ const { __scopeSelect: n, onPlaced: o, ...r } = e, s = rt(pt, n), a = st(pt, n), [i, c] = p.useState(null), [d, u] = p.useState(null), l = ie(t, (N) => u(N)), m = Wn(n), h = p.useRef(!1), b = p.useRef(!0), { viewport: g, selectedItem: v, selectedItemText: y, focusSelectedItem: w } = a, x = p.useCallback(() => {
9513
9513
  if (s.trigger && s.valueNode && i && d && g && v && y) {
9514
- const k = s.trigger.getBoundingClientRect(), E = d.getBoundingClientRect(), L = s.valueNode.getBoundingClientRect(), W = y.getBoundingClientRect();
9514
+ const N = s.trigger.getBoundingClientRect(), E = d.getBoundingClientRect(), L = s.valueNode.getBoundingClientRect(), W = y.getBoundingClientRect();
9515
9515
  if (s.dir !== "rtl") {
9516
- const se = W.left - E.left, oe = L.left - se, ue = k.left - oe, fe = k.width + ue, at = Math.max(fe, E.width), Ke = window.innerWidth - _e, Te = ko(oe, [
9516
+ const se = W.left - E.left, oe = L.left - se, ue = N.left - oe, fe = N.width + ue, at = Math.max(fe, E.width), Ke = window.innerWidth - _e, Te = ko(oe, [
9517
9517
  _e,
9518
9518
  // Prevents the content from going off the starting edge of the
9519
9519
  // viewport. It may still go off the ending edge, but this can be
@@ -9524,31 +9524,31 @@ var Jh = "SelectItemAlignedPosition", Yi = p.forwardRef((e, t) => {
9524
9524
  ]);
9525
9525
  i.style.minWidth = fe + "px", i.style.left = Te + "px";
9526
9526
  } else {
9527
- const se = E.right - W.right, oe = window.innerWidth - L.right - se, ue = window.innerWidth - k.right - oe, fe = k.width + ue, at = Math.max(fe, E.width), Ke = window.innerWidth - _e, Te = ko(oe, [
9527
+ const se = E.right - W.right, oe = window.innerWidth - L.right - se, ue = window.innerWidth - N.right - oe, fe = N.width + ue, at = Math.max(fe, E.width), Ke = window.innerWidth - _e, Te = ko(oe, [
9528
9528
  _e,
9529
9529
  Math.max(_e, Ke - at)
9530
9530
  ]);
9531
9531
  i.style.minWidth = fe + "px", i.style.right = Te + "px";
9532
9532
  }
9533
- const M = m(), F = window.innerHeight - _e * 2, H = g.scrollHeight, O = window.getComputedStyle(d), K = parseInt(O.borderTopWidth, 10), P = parseInt(O.paddingTop, 10), D = parseInt(O.borderBottomWidth, 10), U = parseInt(O.paddingBottom, 10), T = K + P + H + U + D, S = Math.min(v.offsetHeight * 5, T), A = window.getComputedStyle(g), z = parseInt(A.paddingTop, 10), _ = parseInt(A.paddingBottom, 10), $ = k.top + k.height / 2 - _e, B = F - $, J = v.offsetHeight / 2, j = v.offsetTop + J, Y = K + P + j, ee = T - Y;
9534
- if (Y <= $) {
9533
+ const M = m(), F = window.innerHeight - _e * 2, H = g.scrollHeight, O = window.getComputedStyle(d), K = parseInt(O.borderTopWidth, 10), A = parseInt(O.paddingTop, 10), D = parseInt(O.borderBottomWidth, 10), U = parseInt(O.paddingBottom, 10), k = K + A + H + U + D, S = Math.min(v.offsetHeight * 5, k), _ = window.getComputedStyle(g), $ = parseInt(_.paddingTop, 10), P = parseInt(_.paddingBottom, 10), z = N.top + N.height / 2 - _e, B = F - z, J = v.offsetHeight / 2, j = v.offsetTop + J, Y = K + A + j, ee = k - Y;
9534
+ if (Y <= z) {
9535
9535
  const se = M.length > 0 && v === M[M.length - 1].ref.current;
9536
9536
  i.style.bottom = "0px";
9537
9537
  const oe = d.clientHeight - g.offsetTop - g.offsetHeight, ue = Math.max(
9538
9538
  B,
9539
9539
  J + // viewport might have padding bottom, include it to avoid a scrollable viewport
9540
- (se ? _ : 0) + oe + D
9540
+ (se ? P : 0) + oe + D
9541
9541
  ), fe = Y + ue;
9542
9542
  i.style.height = fe + "px";
9543
9543
  } else {
9544
9544
  const se = M.length > 0 && v === M[0].ref.current;
9545
9545
  i.style.top = "0px";
9546
9546
  const ue = Math.max(
9547
- $,
9547
+ z,
9548
9548
  K + g.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
9549
- (se ? z : 0) + J
9549
+ (se ? $ : 0) + J
9550
9550
  ) + ee;
9551
- i.style.height = ue + "px", g.scrollTop = Y - $ + g.offsetTop;
9551
+ i.style.height = ue + "px", g.scrollTop = Y - z + g.offsetTop;
9552
9552
  }
9553
9553
  i.style.margin = `${_e}px 0`, i.style.minHeight = S + "px", i.style.maxHeight = F + "px", o == null || o(), requestAnimationFrame(() => h.current = !0);
9554
9554
  }
@@ -9565,13 +9565,13 @@ var Jh = "SelectItemAlignedPosition", Yi = p.forwardRef((e, t) => {
9565
9565
  o
9566
9566
  ]);
9567
9567
  de(() => x(), [x]);
9568
- const [C, N] = p.useState();
9568
+ const [C, R] = p.useState();
9569
9569
  de(() => {
9570
- d && N(window.getComputedStyle(d).zIndex);
9570
+ d && R(window.getComputedStyle(d).zIndex);
9571
9571
  }, [d]);
9572
- const R = p.useCallback(
9573
- (k) => {
9574
- k && b.current === !0 && (x(), w == null || w(), b.current = !1);
9572
+ const T = p.useCallback(
9573
+ (N) => {
9574
+ N && b.current === !0 && (x(), w == null || w(), b.current = !1);
9575
9575
  },
9576
9576
  [x, w]
9577
9577
  );
@@ -9581,7 +9581,7 @@ var Jh = "SelectItemAlignedPosition", Yi = p.forwardRef((e, t) => {
9581
9581
  scope: n,
9582
9582
  contentWrapper: i,
9583
9583
  shouldExpandOnScrollRef: h,
9584
- onScrollButtonChange: R,
9584
+ onScrollButtonChange: T,
9585
9585
  children: /* @__PURE__ */ f(
9586
9586
  "div",
9587
9587
  {
@@ -10289,15 +10289,15 @@ var jt = "Tooltip", [Hg, Xt] = Yn(jt), Rc = (e) => {
10289
10289
  } = e, c = dr(jt, e.__scopeTooltip), d = qn(t), [u, l] = p.useState(null), m = ht(), h = p.useRef(0), b = a ?? c.disableHoverableContent, g = i ?? c.delayDuration, v = p.useRef(!1), [y, w] = je({
10290
10290
  prop: o,
10291
10291
  defaultProp: r ?? !1,
10292
- onChange: (k) => {
10293
- k ? (c.onOpen(), document.dispatchEvent(new CustomEvent(_o))) : c.onClose(), s == null || s(k);
10292
+ onChange: (N) => {
10293
+ N ? (c.onOpen(), document.dispatchEvent(new CustomEvent(_o))) : c.onClose(), s == null || s(N);
10294
10294
  },
10295
10295
  caller: jt
10296
10296
  }), x = p.useMemo(() => y ? v.current ? "delayed-open" : "instant-open" : "closed", [y]), C = p.useCallback(() => {
10297
10297
  window.clearTimeout(h.current), h.current = 0, v.current = !1, w(!0);
10298
- }, [w]), N = p.useCallback(() => {
10299
- window.clearTimeout(h.current), h.current = 0, w(!1);
10300
10298
  }, [w]), R = p.useCallback(() => {
10299
+ window.clearTimeout(h.current), h.current = 0, w(!1);
10300
+ }, [w]), T = p.useCallback(() => {
10301
10301
  window.clearTimeout(h.current), h.current = window.setTimeout(() => {
10302
10302
  v.current = !0, w(!0), h.current = 0;
10303
10303
  }, g);
@@ -10314,13 +10314,13 @@ var jt = "Tooltip", [Hg, Xt] = Yn(jt), Rc = (e) => {
10314
10314
  trigger: u,
10315
10315
  onTriggerChange: l,
10316
10316
  onTriggerEnter: p.useCallback(() => {
10317
- c.isOpenDelayedRef.current ? R() : C();
10318
- }, [c.isOpenDelayedRef, R, C]),
10317
+ c.isOpenDelayedRef.current ? T() : C();
10318
+ }, [c.isOpenDelayedRef, T, C]),
10319
10319
  onTriggerLeave: p.useCallback(() => {
10320
- b ? N() : (window.clearTimeout(h.current), h.current = 0);
10321
- }, [N, b]),
10320
+ b ? R() : (window.clearTimeout(h.current), h.current = 0);
10321
+ }, [R, b]),
10322
10322
  onOpen: C,
10323
- onClose: N,
10323
+ onClose: R,
10324
10324
  disableHoverableContent: b,
10325
10325
  children: n
10326
10326
  }
@@ -10373,8 +10373,8 @@ var It = "TooltipContent", Ac = p.forwardRef(
10373
10373
  i(null), l(!1);
10374
10374
  }, [l]), h = p.useCallback(
10375
10375
  (b, g) => {
10376
- const v = b.currentTarget, y = { x: b.clientX, y: b.clientY }, w = qg(y, v.getBoundingClientRect()), x = Kg(y, w), C = Xg(g.getBoundingClientRect()), N = Jg([...x, ...C]);
10377
- i(N), l(!0);
10376
+ const v = b.currentTarget, y = { x: b.clientX, y: b.clientY }, w = qg(y, v.getBoundingClientRect()), x = Kg(y, w), C = Xg(g.getBoundingClientRect()), R = Jg([...x, ...C]);
10377
+ i(R), l(!0);
10378
10378
  },
10379
10379
  [l]
10380
10380
  );
@@ -11813,7 +11813,10 @@ const Dt = (e) => e == null ? void 0 : e === !0 || e === "true", Lc = {
11813
11813
  }, Ob = 800, Ft = (e, t) => e ? `${e.replace(/\/$/, "")}${t}` : t, Lb = async (e, t, n, o, r) => {
11814
11814
  const s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
11815
11815
  return await Promise.all(
11816
- e.filter((i) => i.manifest.permissions.includes("data:fetch")).map(async (i) => {
11816
+ e.filter((i) => {
11817
+ var c;
11818
+ return i.manifest.permissions.includes("data:fetch") || (((c = i.manifest.settingsSchema) == null ? void 0 : c.length) ?? 0) > 0;
11819
+ }).map(async (i) => {
11817
11820
  const c = r.find((h) => h.extensionId === i.id), d = c == null ? void 0 : c.token, u = c == null ? void 0 : c.mode, l = Ft(t, "/proxy-token"), m = await fetch(l, {
11818
11821
  method: "POST",
11819
11822
  headers: { "Content-Type": "application/json" },
@@ -11848,18 +11851,18 @@ const Dt = (e) => e == null ? void 0 : e === !0 || e === "true", Lc = {
11848
11851
  customerEmail: a,
11849
11852
  customerName: i
11850
11853
  }) => {
11851
- const [c, d] = le([]), [u, l] = le([]), [m, h] = le(/* @__PURE__ */ new Map()), [b, g] = le(/* @__PURE__ */ new Map()), [v, y] = le(!1), [w, x] = le({ authenticated: !1, user: null }), [C, N] = le(void 0);
11854
+ const [c, d] = le([]), [u, l] = le([]), [m, h] = le(/* @__PURE__ */ new Map()), [b, g] = le(/* @__PURE__ */ new Map()), [v, y] = le(!1), [w, x] = le({ authenticated: !1, user: null }), [C, R] = le(void 0);
11852
11855
  ce(() => {
11853
11856
  window.stackable || (window.stackable = {
11854
- emit: (T, S = {}) => {
11855
- const [A, ...z] = T.split(":"), _ = z.join(":");
11856
- window.dispatchEvent(new CustomEvent(`stackable:${A}`, {
11857
- detail: { eventName: _, data: S }
11857
+ emit: (k, S = {}) => {
11858
+ const [_, ...$] = k.split(":"), P = $.join(":");
11859
+ window.dispatchEvent(new CustomEvent(`stackable:${_}`, {
11860
+ detail: { eventName: P, data: S }
11858
11861
  }));
11859
11862
  }
11860
11863
  });
11861
11864
  }, []);
11862
- const R = Me(null), k = Me(/* @__PURE__ */ new Set()), E = Vt(() => c.filter((T) => T.manifest.permissions.includes("extend:identity")).map((T) => T.id), [c]);
11865
+ const T = Me(null), N = Me(/* @__PURE__ */ new Set()), E = Vt(() => c.filter((k) => k.manifest.permissions.includes("extend:identity")).map((k) => k.id), [c]);
11863
11866
  ce(() => {
11864
11867
  (async () => {
11865
11868
  const S = e;
@@ -11872,15 +11875,15 @@ const Dt = (e) => e == null ? void 0 : e === !0 || e === "true", Lc = {
11872
11875
  console.warn("[ExtensionSetup] apiBase and appId are required to load extensions"), d([]), y(!0);
11873
11876
  return;
11874
11877
  }
11875
- const A = await fetch(Ft(n, `/instances/${o}/${S}`));
11876
- if (!A.ok) {
11878
+ const _ = await fetch(Ft(n, `/instances/${o}/${S}`));
11879
+ if (!_.ok) {
11877
11880
  console.warn(`[ExtensionSetup] Instance not found or failed to load: ${S}`), d([]), y(!0);
11878
11881
  return;
11879
11882
  }
11880
- const z = await A.json(), _ = ws(typeof window < "u" ? window.location.search : ""), $ = await Yl(z, _), { tokens: B, errors: J } = await Lb($, n, o, S, _);
11881
- d($), l(_), h(new Map(B)), g(J);
11882
- } catch (A) {
11883
- console.error("Failed to load extensions:", A);
11883
+ const $ = await _.json(), P = ws(typeof window < "u" ? window.location.search : ""), z = await Yl($, P), { tokens: B, errors: J } = await Lb(z, n, o, S, P);
11884
+ d(z), l(P), h(new Map(B)), g(J);
11885
+ } catch (_) {
11886
+ console.error("Failed to load extensions:", _);
11884
11887
  } finally {
11885
11888
  y(!0);
11886
11889
  }
@@ -11889,158 +11892,161 @@ const Dt = (e) => e == null ? void 0 : e === !0 || e === "true", Lc = {
11889
11892
  if (!n || !o || c.length === 0)
11890
11893
  return;
11891
11894
  const S = setInterval(async () => {
11892
- const A = [];
11895
+ const _ = [];
11893
11896
  await Promise.all(
11894
- c.filter((z) => z.manifest.permissions.includes("data:fetch")).map(async (z) => {
11895
- const _ = u.find((Y) => Y.extensionId === z.id), $ = _ == null ? void 0 : _.token, B = _ == null ? void 0 : _.mode, J = Ft(n, "/proxy-token"), j = await fetch(J, {
11897
+ c.filter(($) => {
11898
+ var P;
11899
+ return $.manifest.permissions.includes("data:fetch") || (((P = $.manifest.settingsSchema) == null ? void 0 : P.length) ?? 0) > 0;
11900
+ }).map(async ($) => {
11901
+ const P = u.find((Y) => Y.extensionId === $.id), z = P == null ? void 0 : P.token, B = P == null ? void 0 : P.mode, J = Ft(n, "/proxy-token"), j = await fetch(J, {
11896
11902
  method: "POST",
11897
11903
  headers: { "Content-Type": "application/json" },
11898
11904
  body: JSON.stringify({
11899
11905
  appId: o,
11900
- extensionId: z.id,
11906
+ extensionId: $.id,
11901
11907
  ...B && { mode: B },
11902
- ...$ && { devSessionToken: $ }
11908
+ ...z && { devSessionToken: z }
11903
11909
  })
11904
11910
  });
11905
11911
  if (j.ok) {
11906
11912
  const { token: Y, encryptionKey: ee } = await j.json();
11907
- A.push([z.id, { token: Y, encryptionKey: ee }]);
11913
+ _.push([$.id, { token: Y, encryptionKey: ee }]);
11908
11914
  } else
11909
- console.warn(`[embeddables] Proxy token refresh failed for extension ${z.id} (${j.status}) — using stale token`);
11915
+ console.warn(`[embeddables] Proxy token refresh failed for extension ${$.id} (${j.status}) — using stale token`);
11910
11916
  })
11911
- ), A.length > 0 && h((z) => {
11912
- const _ = new Map(z);
11913
- for (const [$, B] of A)
11914
- _.set($, B);
11915
- return _;
11917
+ ), _.length > 0 && h(($) => {
11918
+ const P = new Map($);
11919
+ for (const [z, B] of _)
11920
+ P.set(z, B);
11921
+ return P;
11916
11922
  });
11917
11923
  }, 3300 * 1e3);
11918
11924
  return () => clearInterval(S);
11919
11925
  }, [c, u, n, o]), ce(() => {
11920
11926
  if (m.size === 0)
11921
11927
  return;
11922
- const T = (S) => {
11923
- const A = S.data;
11924
- if ((A == null ? void 0 : A.type) !== "extension-ready")
11928
+ const k = (S) => {
11929
+ const _ = S.data;
11930
+ if ((_ == null ? void 0 : _.type) !== "extension-ready")
11925
11931
  return;
11926
- const z = A.extensionId, _ = c.find((J) => J.id === z);
11927
- if (!(_ != null && _.bundleUrl))
11932
+ const $ = _.extensionId, P = c.find((J) => J.id === $);
11933
+ if (!(P != null && P.bundleUrl))
11928
11934
  return;
11929
- const $ = u.find((J) => J.extensionId === z);
11930
- if (Ul(_.bundleUrl) && ($ == null ? void 0 : $.mode) !== "staging")
11935
+ const z = u.find((J) => J.extensionId === $);
11936
+ if (Ul(P.bundleUrl) && (z == null ? void 0 : z.mode) !== "staging")
11931
11937
  return;
11932
- const B = m.get(z);
11933
- B && $e(z, { type: "extension-encryption-key", encryptionKey: B.encryptionKey });
11938
+ const B = m.get($);
11939
+ B && $e($, { type: "extension-encryption-key", encryptionKey: B.encryptionKey });
11934
11940
  };
11935
- return window.addEventListener("message", T), () => window.removeEventListener("message", T);
11941
+ return window.addEventListener("message", k), () => window.removeEventListener("message", k);
11936
11942
  }, [c, u, m]);
11937
- const L = ve((T, S) => {
11938
- const A = kt();
11939
- for (const [z, _] of A) {
11940
- if (!_.manifest.permissions.includes("events:identity"))
11943
+ const L = ve((k, S) => {
11944
+ const _ = kt();
11945
+ for (const [$, P] of _) {
11946
+ if (!P.manifest.permissions.includes("events:identity"))
11941
11947
  continue;
11942
- const $ = _.manifest.events ?? [];
11943
- !$.includes("identity") && !$.includes(`identity:${T}`) || $e(z, {
11948
+ const z = P.manifest.events ?? [];
11949
+ !z.includes("identity") && !z.includes(`identity:${k}`) || $e($, {
11944
11950
  type: "extension-event",
11945
11951
  eventType: "identity",
11946
- payload: { eventName: T, data: { state: S, timestamp: Zn((/* @__PURE__ */ new Date()).toISOString()) } }
11952
+ payload: { eventName: k, data: { state: S, timestamp: Zn((/* @__PURE__ */ new Date()).toISOString()) } }
11947
11953
  });
11948
11954
  }
11949
- }, []), W = ve((T) => {
11955
+ }, []), W = ve((k) => {
11950
11956
  const S = kt();
11951
- for (const [A, z] of S) {
11952
- if (!z.manifest.permissions.includes("events:messaging"))
11957
+ for (const [_, $] of S) {
11958
+ if (!$.manifest.permissions.includes("events:messaging"))
11953
11959
  continue;
11954
- const _ = z.manifest.events ?? [];
11955
- !_.includes("messaging") && !_.includes("messaging:postback") && !_.includes(`messaging:postback:${T.data.actionName}`) || $e(A, {
11960
+ const P = $.manifest.events ?? [];
11961
+ !P.includes("messaging") && !P.includes("messaging:postback") && !P.includes(`messaging:postback:${k.data.actionName}`) || $e(_, {
11956
11962
  type: "extension-event",
11957
11963
  eventType: "messaging",
11958
- payload: T
11964
+ payload: k
11959
11965
  });
11960
11966
  }
11961
- }, []), M = ve((T) => {
11967
+ }, []), M = ve((k) => {
11962
11968
  const S = kt();
11963
- for (const [A, z] of S) {
11964
- if (!z.manifest.permissions.includes("events:activity"))
11969
+ for (const [_, $] of S) {
11970
+ if (!$.manifest.permissions.includes("events:activity"))
11965
11971
  continue;
11966
- const _ = z.manifest.events ?? [];
11967
- !_.includes("activity") && !_.includes(`activity:${T.eventName}`) || $e(A, {
11972
+ const P = $.manifest.events ?? [];
11973
+ !P.includes("activity") && !P.includes(`activity:${k.eventName}`) || $e(_, {
11968
11974
  type: "extension-event",
11969
11975
  eventType: "activity",
11970
- payload: T
11976
+ payload: k
11971
11977
  });
11972
11978
  }
11973
- }, []), F = ve(async (T) => {
11974
- const S = kt(), A = [];
11975
- for (const [_, $] of S) {
11976
- if (!$.manifest.permissions.includes("extend:identity"))
11979
+ }, []), F = ve(async (k) => {
11980
+ const S = kt(), _ = [];
11981
+ for (const [P, z] of S) {
11982
+ if (!z.manifest.permissions.includes("extend:identity"))
11977
11983
  continue;
11978
11984
  const B = new Promise((J) => {
11979
- const j = `enrich_${_}_${Date.now()}`, Y = (ee) => {
11985
+ const j = `enrich_${P}_${Date.now()}`, Y = (ee) => {
11980
11986
  const te = ee.data;
11981
11987
  (te == null ? void 0 : te.type) !== "extend-identity-response" || te.id !== j || (window.removeEventListener("message", Y), te.additionalClaims ? J(te.additionalClaims) : J({}));
11982
11988
  };
11983
11989
  window.addEventListener("message", Y), setTimeout(() => {
11984
11990
  window.removeEventListener("message", Y), J({});
11985
- }, 5e3), $e(_, {
11991
+ }, 5e3), $e(P, {
11986
11992
  type: "extend-identity-request",
11987
11993
  id: j,
11988
- claims: T
11994
+ claims: k
11989
11995
  });
11990
11996
  });
11991
- A.push(B);
11997
+ _.push(B);
11992
11998
  }
11993
- if (A.length === 0)
11999
+ if (_.length === 0)
11994
12000
  return {};
11995
- const z = await Promise.all(A);
11996
- return Object.assign({}, ...z);
11997
- }, []), H = ve(async (T) => {
12001
+ const $ = await Promise.all(_);
12002
+ return Object.assign({}, ...$);
12003
+ }, []), H = ve(async (k) => {
11998
12004
  if (!n || !o || !e)
11999
12005
  return console.warn("[embeddables] signIdentity skipped — missing:", { apiBase: !!n, appId: !!o, instanceId: !!e }), null;
12000
12006
  const S = Ft(n, `/instances/${o}/${e}/identity`);
12001
- console.log("[embeddables] Calling identity sign:", { url: S, claims: Object.keys(T) });
12007
+ console.log("[embeddables] Calling identity sign:", { url: S, claims: Object.keys(k) });
12002
12008
  try {
12003
- const A = await fetch(S, {
12009
+ const _ = await fetch(S, {
12004
12010
  method: "POST",
12005
12011
  headers: { "Content-Type": "application/json" },
12006
- body: JSON.stringify(T)
12012
+ body: JSON.stringify(k)
12007
12013
  });
12008
- if (!A.ok)
12009
- return console.warn(`[embeddables] Identity sign failed (${A.status})`), null;
12010
- const { token: z } = await A.json();
12011
- return z;
12012
- } catch (A) {
12013
- return console.warn("[embeddables] Identity sign request failed:", A), null;
12014
- }
12015
- }, [n, o, e]), O = ve((T) => {
12014
+ if (!_.ok)
12015
+ return console.warn(`[embeddables] Identity sign failed (${_.status})`), null;
12016
+ const { token: $ } = await _.json();
12017
+ return $;
12018
+ } catch (_) {
12019
+ return console.warn("[embeddables] Identity sign request failed:", _), null;
12020
+ }
12021
+ }, [n, o, e]), O = ve((k) => {
12016
12022
  const S = window.zE;
12017
- S && S("messenger", "loginUser", async (A) => {
12018
- A(T);
12023
+ S && S("messenger", "loginUser", async (_) => {
12024
+ _(k);
12019
12025
  });
12020
12026
  }, []), K = ve(() => {
12021
- const T = window.zE;
12022
- T && T("messenger", "logoutUser");
12023
- }, []), P = ve((T) => {
12024
- console.log("[embeddables] Running sign lifecycle for user:", T.id);
12025
- const { email: S, name: A } = T, z = { external_id: String(T.id) };
12027
+ const k = window.zE;
12028
+ k && k("messenger", "logoutUser");
12029
+ }, []), A = ve((k) => {
12030
+ console.log("[embeddables] Running sign lifecycle for user:", k.id);
12031
+ const { email: S, name: _ } = k, $ = { external_id: String(k.id) };
12026
12032
  (async () => {
12027
- const _ = await F({ ...z, email: S, name: A });
12028
- console.log("[embeddables] Enriched claims:", _);
12029
- const $ = await H({
12030
- ...z,
12031
- ..._,
12033
+ const P = await F({ ...$, email: S, name: _ });
12034
+ console.log("[embeddables] Enriched claims:", P);
12035
+ const z = await H({
12036
+ ...$,
12037
+ ...P,
12032
12038
  email: S,
12033
- name: A
12039
+ name: _
12034
12040
  });
12035
- console.log("[embeddables] Sign result:", { hasToken: !!$ }), $ && O($);
12041
+ console.log("[embeddables] Sign result:", { hasToken: !!z }), z && O(z);
12036
12042
  })();
12037
- }, [F, H, O]), D = ve((T) => {
12038
- if (E.length > 0 && k.current.size < E.length) {
12039
- console.log(`[embeddables] Deferring sign lifecycle — waiting for extend:identity extensions: ${k.current.size}/${E.length} ready`), R.current = T;
12043
+ }, [F, H, O]), D = ve((k) => {
12044
+ if (E.length > 0 && N.current.size < E.length) {
12045
+ console.log(`[embeddables] Deferring sign lifecycle — waiting for extend:identity extensions: ${N.current.size}/${E.length} ready`), T.current = k;
12040
12046
  return;
12041
12047
  }
12042
- console.log("[embeddables] No extend:identity extensions (or all ready) — signing immediately"), P(T);
12043
- }, [E, P]);
12048
+ console.log("[embeddables] No extend:identity extensions (or all ready) — signing immediately"), A(k);
12049
+ }, [E, A]);
12044
12050
  ce(() => {
12045
12051
  if (!v) {
12046
12052
  console.log("[embeddables] Identity effect skipped — extensions not loaded yet");
@@ -12048,7 +12054,7 @@ const Dt = (e) => e == null ? void 0 : e === !0 || e === "true", Lc = {
12048
12054
  }
12049
12055
  if (console.log("[embeddables] Identity effect running", { initialized: v, customerId: !!s, extendExtensions: E.length }), s) {
12050
12056
  console.log("[embeddables] Identity from props:", { customerId: s, customerEmail: a, customerName: i });
12051
- const T = {
12057
+ const k = {
12052
12058
  authenticated: !0,
12053
12059
  user: {
12054
12060
  id: String(s),
@@ -12058,128 +12064,133 @@ const Dt = (e) => e == null ? void 0 : e === !0 || e === "true", Lc = {
12058
12064
  }
12059
12065
  };
12060
12066
  x((S) => {
12061
- var A, z;
12062
- return S.authenticated && ((A = S.user) == null ? void 0 : A.id) === ((z = T.user) == null ? void 0 : z.id) ? S : (console.log("[embeddables] Identity state changed (props), starting sign lifecycle"), D(T.user), L("login", T), T);
12067
+ var _, $;
12068
+ return S.authenticated && ((_ = S.user) == null ? void 0 : _.id) === (($ = k.user) == null ? void 0 : $.id) ? S : (console.log("[embeddables] Identity state changed (props), starting sign lifecycle"), D(k.user), L("login", k), k);
12063
12069
  });
12064
12070
  } else {
12065
12071
  if (s === void 0)
12066
12072
  return;
12067
- x((T) => T.authenticated ? (console.log("[embeddables] Customer props cleared, logging out"), K(), L("logout", { authenticated: !1, user: null }), { authenticated: !1, user: null }) : T);
12073
+ x((k) => k.authenticated ? (console.log("[embeddables] Customer props cleared, logging out"), K(), L("logout", { authenticated: !1, user: null }), { authenticated: !1, user: null }) : k);
12068
12074
  }
12069
12075
  }, [v, s, a, i, E, D, L, K]), ce(() => {
12070
12076
  if (!v || s !== void 0)
12071
12077
  return;
12072
- const T = () => {
12073
- const A = document.getElementById("stackable-identity");
12074
- if (A)
12078
+ const k = () => {
12079
+ const _ = document.getElementById("stackable-identity");
12080
+ if (_)
12075
12081
  try {
12076
- const z = JSON.parse(A.textContent ?? "{}"), _ = {
12082
+ const $ = JSON.parse(_.textContent ?? "{}"), P = {
12077
12083
  authenticated: !0,
12078
12084
  user: {
12079
- id: String(z.customerId ?? ""),
12080
- email: z.customerEmail,
12081
- name: z.customerName,
12085
+ id: String($.customerId ?? ""),
12086
+ email: $.customerEmail,
12087
+ name: $.customerName,
12082
12088
  provider: "shopify"
12083
12089
  }
12084
12090
  };
12085
- x(($) => {
12091
+ x((z) => {
12086
12092
  var B, J;
12087
- return $.authenticated && ((B = $.user) == null ? void 0 : B.id) === ((J = _.user) == null ? void 0 : J.id) ? $ : (console.log("[embeddables] Identity state changed (DOM), starting sign lifecycle"), D(_.user), L("login", _), _);
12093
+ return z.authenticated && ((B = z.user) == null ? void 0 : B.id) === ((J = P.user) == null ? void 0 : J.id) ? z : (console.log("[embeddables] Identity state changed (DOM), starting sign lifecycle"), D(P.user), L("login", P), P);
12088
12094
  });
12089
12095
  } catch {
12090
12096
  console.warn("[embeddables] Failed to parse #stackable-identity JSON");
12091
12097
  }
12092
12098
  else
12093
- x((z) => z.authenticated ? (K(), L("logout", { authenticated: !1, user: null }), { authenticated: !1, user: null }) : z);
12099
+ x(($) => $.authenticated ? (K(), L("logout", { authenticated: !1, user: null }), { authenticated: !1, user: null }) : $);
12094
12100
  };
12095
- T();
12096
- const S = new MutationObserver(T);
12101
+ k();
12102
+ const S = new MutationObserver(k);
12097
12103
  return S.observe(document.head, { childList: !0, subtree: !0 }), S.observe(document.body, { childList: !0, subtree: !0 }), () => S.disconnect();
12098
12104
  }, [v, s, D, L, K]), ce(() => {
12099
12105
  if (!w.authenticated)
12100
12106
  return;
12101
- const T = (S) => {
12102
- const A = S.data;
12103
- if ((A == null ? void 0 : A.type) !== "extension-ready")
12107
+ const k = (S) => {
12108
+ const _ = S.data;
12109
+ if ((_ == null ? void 0 : _.type) !== "extension-ready")
12104
12110
  return;
12105
- const z = A.extensionId, _ = c.find((B) => B.id === z);
12106
- if (!(_ != null && _.manifest.permissions.includes("events:identity")))
12111
+ const $ = _.extensionId, P = c.find((B) => B.id === $);
12112
+ if (!(P != null && P.manifest.permissions.includes("events:identity")))
12107
12113
  return;
12108
- const $ = _.manifest.events ?? [];
12109
- !$.includes("identity") && !$.includes("identity:login") || $e(z, {
12114
+ const z = P.manifest.events ?? [];
12115
+ !z.includes("identity") && !z.includes("identity:login") || $e($, {
12110
12116
  type: "extension-event",
12111
12117
  eventType: "identity",
12112
12118
  payload: { eventName: "login", data: { state: w, timestamp: Zn((/* @__PURE__ */ new Date()).toISOString()) } }
12113
12119
  });
12114
12120
  };
12115
- return window.addEventListener("message", T), () => window.removeEventListener("message", T);
12121
+ return window.addEventListener("message", k), () => window.removeEventListener("message", k);
12116
12122
  }, [w, c]), ce(() => {
12117
12123
  if (E.length === 0)
12118
12124
  return;
12119
- const T = (A) => {
12120
- const z = A.data;
12121
- if ((z == null ? void 0 : z.type) !== "extension-ready")
12125
+ const k = (_) => {
12126
+ const $ = _.data;
12127
+ if (($ == null ? void 0 : $.type) !== "extension-ready")
12122
12128
  return;
12123
- const _ = z.extensionId;
12124
- if (E.includes(_) && (k.current.add(_), console.log(`[embeddables] extend:identity extension ready: ${_} (${k.current.size}/${E.length})`), k.current.size >= E.length && R.current)) {
12129
+ const P = $.extensionId;
12130
+ if (E.includes(P) && (N.current.add(P), console.log(`[embeddables] extend:identity extension ready: ${P} (${N.current.size}/${E.length})`), N.current.size >= E.length && T.current)) {
12125
12131
  console.log("[embeddables] All extend:identity extensions ready, running deferred sign lifecycle");
12126
- const $ = R.current;
12127
- R.current = null, P($);
12132
+ const z = T.current;
12133
+ T.current = null, A(z);
12128
12134
  }
12129
12135
  };
12130
- window.addEventListener("message", T);
12136
+ window.addEventListener("message", k);
12131
12137
  const S = setTimeout(() => {
12132
- if (R.current) {
12133
- console.warn(`[embeddables] extend:identity timeout (5s) — signing with ${k.current.size}/${E.length} extensions ready`);
12134
- const A = R.current;
12135
- R.current = null, P(A);
12138
+ if (T.current) {
12139
+ console.warn(`[embeddables] extend:identity timeout (5s) — signing with ${N.current.size}/${E.length} extensions ready`);
12140
+ const _ = T.current;
12141
+ T.current = null, A(_);
12136
12142
  }
12137
12143
  }, 5e3);
12138
12144
  return () => {
12139
- window.removeEventListener("message", T), clearTimeout(S);
12145
+ window.removeEventListener("message", k), clearTimeout(S);
12140
12146
  };
12141
- }, [E, P]), ce(() => {
12142
- const T = (S) => {
12143
- const { detail: A } = S;
12144
- A != null && A.eventName && (A.eventName === "postback" ? W({
12147
+ }, [E, A]), ce(() => {
12148
+ const k = (S) => {
12149
+ const { detail: _ } = S;
12150
+ _ != null && _.eventName && (_.eventName === "postback" ? W({
12145
12151
  eventName: "postback",
12146
12152
  data: {
12147
- actionName: A.data.actionName,
12148
- conversationId: A.data.conversationId ?? "",
12153
+ actionName: _.data.actionName,
12154
+ conversationId: _.data.conversationId ?? "",
12149
12155
  timestamp: Zn((/* @__PURE__ */ new Date()).toISOString())
12150
12156
  }
12151
- }) : A.eventName === "context" && N((z) => ({ ...z, ...A.data })));
12157
+ }) : _.eventName === "context" && R(($) => ({ ...$, ..._.data })));
12152
12158
  };
12153
- return window.addEventListener("stackable:messaging", T), () => window.removeEventListener("stackable:messaging", T);
12159
+ return window.addEventListener("stackable:messaging", k), () => window.removeEventListener("stackable:messaging", k);
12154
12160
  }, [W]), ce(() => {
12155
- const T = (S) => {
12156
- const { detail: A } = S;
12157
- A != null && A.eventName && M({
12158
- eventName: A.eventName,
12159
- data: A.data ?? {}
12161
+ const k = (S) => {
12162
+ const { detail: _ } = S;
12163
+ _ != null && _.eventName && M({
12164
+ eventName: _.eventName,
12165
+ data: _.data ?? {}
12160
12166
  });
12161
12167
  };
12162
- return window.addEventListener("stackable:activity", T), () => window.removeEventListener("stackable:activity", T);
12168
+ return window.addEventListener("stackable:activity", k), () => window.removeEventListener("stackable:activity", k);
12163
12169
  }, [M]), ce(() => {
12170
+ var _;
12164
12171
  if (!v)
12165
12172
  return;
12166
- const T = {
12173
+ const k = {
12167
12174
  customerId: s ?? "",
12168
12175
  customerEmail: a ?? "",
12169
12176
  customerName: i ?? "",
12170
12177
  messaging: C,
12171
12178
  identity: w
12172
12179
  }, S = kt();
12173
- for (const [A, z] of S)
12174
- z.manifest.permissions.includes("context:read") && $e(A, { type: "context-push", context: T });
12180
+ for (const [$, P] of S) {
12181
+ if (!P.manifest.permissions.includes("context:read"))
12182
+ continue;
12183
+ const z = (_ = m.get($)) == null ? void 0 : _.settings, B = z ? { ...k, settings: z } : k;
12184
+ $e($, { type: "context-push", context: B });
12185
+ }
12175
12186
  }, [v, s, a, i, w, C]);
12176
12187
  const U = Vt(
12177
12188
  () => ({
12178
12189
  // TODO(data.query-deprecation): Remove when data.query is deprecated — host-native ecommerce route replaced by extension + data.fetch
12179
- "data.query": async (T) => $c(T, t),
12180
- "data.fetch": async (T, S) => {
12181
- const A = m.get(T);
12182
- if (!A)
12190
+ "data.query": async (k) => $c(k, t),
12191
+ "data.fetch": async (k, S) => {
12192
+ const _ = m.get(k);
12193
+ if (!_)
12183
12194
  return {
12184
12195
  status: 0,
12185
12196
  ok: !1,
@@ -12187,29 +12198,29 @@ const Dt = (e) => e == null ? void 0 : e === !0 || e === "true", Lc = {
12187
12198
  error: "data.fetch: proxy token unavailable — ensure the extension has data:fetch permission and allowedDomains configured"
12188
12199
  }
12189
12200
  };
12190
- const z = Db(S) ? S : {
12201
+ const $ = Db(S) ? S : {
12191
12202
  url: S.url,
12192
12203
  method: S.method ?? "GET",
12193
12204
  headers: S.headers ?? {},
12194
12205
  body: S.body ?? null
12195
- }, _ = Ft(n, "/proxy"), $ = await fetch(_, {
12206
+ }, P = Ft(n, "/proxy"), z = await fetch(P, {
12196
12207
  method: "POST",
12197
12208
  headers: {
12198
12209
  "Content-Type": "application/json",
12199
- "X-Extension-Id": T,
12210
+ "X-Extension-Id": k,
12200
12211
  "X-Application-Id": o ?? "",
12201
- Authorization: `Bearer ${A.token}`
12212
+ Authorization: `Bearer ${_.token}`
12202
12213
  },
12203
- body: JSON.stringify(z)
12204
- }), B = await $.json();
12214
+ body: JSON.stringify($)
12215
+ }), B = await z.json();
12205
12216
  return {
12206
- status: B.status ?? $.status,
12207
- ok: B.ok ?? $.ok,
12217
+ status: B.status ?? z.status,
12218
+ ok: B.ok ?? z.ok,
12208
12219
  data: B.data
12209
12220
  };
12210
12221
  },
12211
- "actions.toast": async (T, S) => {
12212
- const A = {
12222
+ "actions.toast": async (k, S) => {
12223
+ const _ = {
12213
12224
  ...S.description && { description: S.description },
12214
12225
  ...S.duration && { duration: S.duration },
12215
12226
  ...S.position && { position: S.position },
@@ -12217,49 +12228,53 @@ const Dt = (e) => e == null ? void 0 : e === !0 || e === "true", Lc = {
12217
12228
  ...S.closeButton != null && { closeButton: S.closeButton }
12218
12229
  };
12219
12230
  if (S.fetch) {
12220
- const z = ($) => new Promise((B) => setTimeout(B, $)), _ = Promise.all([
12221
- U["data.fetch"](T, S.fetch),
12222
- z(Ob)
12223
- ]).then(([$]) => $);
12224
- wt.promise(_, {
12231
+ const $ = (z) => new Promise((B) => setTimeout(B, z)), P = Promise.all([
12232
+ U["data.fetch"](k, S.fetch),
12233
+ $(Ob)
12234
+ ]).then(([z]) => z);
12235
+ wt.promise(P, {
12225
12236
  loading: S.loading ?? S.message,
12226
12237
  success: S.success ?? S.message,
12227
12238
  error: S.error ?? "Something went wrong",
12228
- ...A
12239
+ ..._
12229
12240
  });
12230
12241
  return;
12231
12242
  }
12232
12243
  switch (S.type) {
12233
12244
  case "success": {
12234
- wt.success(S.message, A);
12245
+ wt.success(S.message, _);
12235
12246
  break;
12236
12247
  }
12237
12248
  case "error": {
12238
- wt.error(S.message, A);
12249
+ wt.error(S.message, _);
12239
12250
  break;
12240
12251
  }
12241
12252
  case "warning": {
12242
- wt.warning(S.message, A);
12253
+ wt.warning(S.message, _);
12243
12254
  break;
12244
12255
  }
12245
12256
  case "info": {
12246
- wt.info(S.message, A);
12257
+ wt.info(S.message, _);
12247
12258
  break;
12248
12259
  }
12249
12260
  default:
12250
- wt(S.message, A);
12261
+ wt(S.message, _);
12251
12262
  }
12252
12263
  },
12253
- "actions.invoke": async (T) => (window.dispatchEvent(new CustomEvent(`stackable:action:${T.action}`, { detail: T })), { success: !0 }),
12254
- "context.read": async () => ({
12255
- customerId: s ?? "",
12256
- customerEmail: a ?? "",
12257
- customerName: i ?? "",
12258
- // TODO: consider consolidating customerId/customerEmail/customerName
12259
- // inside identity object (breaking change for extensions reading top-level fields)
12260
- identity: w,
12261
- messaging: C
12262
- })
12264
+ "actions.invoke": async (k) => (window.dispatchEvent(new CustomEvent(`stackable:action:${k.action}`, { detail: k })), { success: !0 }),
12265
+ "context.read": async (k) => {
12266
+ var S;
12267
+ return {
12268
+ customerId: s ?? "",
12269
+ customerEmail: a ?? "",
12270
+ customerName: i ?? "",
12271
+ // TODO: consider consolidating customerId/customerEmail/customerName
12272
+ // inside identity object (breaking change for extensions reading top-level fields)
12273
+ identity: w,
12274
+ messaging: C,
12275
+ ...((S = m.get(k)) == null ? void 0 : S.settings) && { settings: m.get(k).settings }
12276
+ };
12277
+ }
12263
12278
  }),
12264
12279
  [n, o, t, s, a, i, m, w, C]
12265
12280
  );
@@ -12559,11 +12574,11 @@ const Hb = ({ ...e }) => {
12559
12574
  conversationList: { hideHeader: !0, hideNewConversationButton: !0 }
12560
12575
  }), !0), []);
12561
12576
  ce(() => {
12562
- var K, P;
12563
- const M = document.querySelector('script[src*="zdassets.com/ekr/snippet"]'), F = (P = (K = M == null ? void 0 : M.src) == null ? void 0 : K.match(/key=([a-f0-9-]+)/)) == null ? void 0 : P[1];
12577
+ var K, A;
12578
+ const M = document.querySelector('script[src*="zdassets.com/ekr/snippet"]'), F = (A = (K = M == null ? void 0 : M.src) == null ? void 0 : K.match(/key=([a-f0-9-]+)/)) == null ? void 0 : A[1];
12564
12579
  if (F && fetch(`https://ekr.zdassets.com/compose/${F}`).then((D) => D.text()).then((D) => {
12565
- var T;
12566
- const U = (T = D.match(/appId['"]?\s*:\s*['"]([a-f0-9]+)['"]/)) == null ? void 0 : T[1];
12580
+ var k;
12581
+ const U = (k = D.match(/appId['"]?\s*:\s*['"]([a-f0-9]+)['"]/)) == null ? void 0 : k[1];
12567
12582
  U && po({ appId: U });
12568
12583
  }).catch(() => {
12569
12584
  }), C()) {
@@ -12579,52 +12594,52 @@ const Hb = ({ ...e }) => {
12579
12594
  clearInterval(H), clearTimeout(O);
12580
12595
  };
12581
12596
  }, [C]);
12582
- const N = ve((M) => {
12597
+ const R = ve((M) => {
12583
12598
  !window.zE || !M.length || (console.log("[ZendeskMessenger] setConversationTags", M, { zE: !!window.zE }), window.zE("messenger:set", "conversationTags", M));
12584
- }, []), R = ve((M) => {
12599
+ }, []), T = ve((M) => {
12585
12600
  !window.zE || !M.length || (console.log("[ZendeskMessenger] setConversationFields", M, { zE: !!window.zE }), window.zE("messenger:set", "conversationFields", M));
12586
- }, []), k = ve((M) => {
12601
+ }, []), N = ve((M) => {
12587
12602
  if (!window.zE)
12588
12603
  return;
12589
12604
  const { tags: F = [], fields: H = [], ...O } = M ?? {};
12590
- N(F), R(H), window.zE("messenger:ui", "newConversation", Object.keys(O).length ? O : void 0);
12591
- }, [N, R]), E = ve((M) => {
12605
+ R(F), T(H), window.zE("messenger:ui", "newConversation", Object.keys(O).length ? O : void 0);
12606
+ }, [R, T]), E = ve((M) => {
12592
12607
  const { detail: F } = M;
12593
- F != null && F.payload && k(F.payload);
12594
- }, [k]);
12608
+ F != null && F.payload && N(F.payload);
12609
+ }, [N]);
12595
12610
  ce(() => (window.addEventListener(`${Et}:${yt.NEW_CONVERSATION}`, E), () => {
12596
12611
  window.removeEventListener(`${Et}:${yt.NEW_CONVERSATION}`, E);
12597
12612
  }), [E]), ce(() => {
12598
12613
  const M = (H) => {
12599
12614
  const { detail: O } = H;
12600
- O != null && O.payload && N(O.payload);
12615
+ O != null && O.payload && R(O.payload);
12601
12616
  }, F = (H) => {
12602
12617
  const { detail: O } = H;
12603
- O != null && O.payload && R(O.payload);
12618
+ O != null && O.payload && T(O.payload);
12604
12619
  };
12605
12620
  return window.addEventListener(`${Et}:${yt.SET_CONVERSATION_TAGS}`, M), window.addEventListener(`${Et}:${yt.SET_CONVERSATION_FIELDS}`, F), () => {
12606
12621
  window.removeEventListener(`${Et}:${yt.SET_CONVERSATION_TAGS}`, M), window.removeEventListener(`${Et}:${yt.SET_CONVERSATION_FIELDS}`, F);
12607
12622
  };
12608
- }, [N, R]), ce(() => {
12623
+ }, [R, T]), ce(() => {
12609
12624
  if (y !== "ready" || !window.zE)
12610
12625
  return;
12611
12626
  const M = window.zE("messenger:on", "conversationStarted", (O) => {
12612
- var P, D;
12613
- const K = (D = (P = O == null ? void 0 : O.payload) == null ? void 0 : P.conversation) == null ? void 0 : D.id;
12627
+ var A, D;
12628
+ const K = (D = (A = O == null ? void 0 : O.payload) == null ? void 0 : A.conversation) == null ? void 0 : D.id;
12614
12629
  K && po({ conversationId: K });
12615
12630
  }), F = window.zE("messenger:on", "messagesShown", (O) => {
12616
- var P, D;
12617
- const K = (D = (P = O == null ? void 0 : O.payload) == null ? void 0 : P.conversation) == null ? void 0 : D.id;
12631
+ var A, D;
12632
+ const K = (D = (A = O == null ? void 0 : O.payload) == null ? void 0 : A.conversation) == null ? void 0 : D.id;
12618
12633
  K && po({ conversationId: K });
12619
12634
  }), H = window.zE("messenger:on", "postbackButtonClicked", (O) => {
12620
- var P;
12635
+ var A;
12621
12636
  const K = O == null ? void 0 : O.payload;
12622
12637
  K != null && K.actionName && window.dispatchEvent(new CustomEvent("stackable:messaging", {
12623
12638
  detail: {
12624
12639
  eventName: "postback",
12625
12640
  data: {
12626
12641
  actionName: K.actionName,
12627
- conversationId: ((P = K.conversation) == null ? void 0 : P.id) ?? ""
12642
+ conversationId: ((A = K.conversation) == null ? void 0 : A.id) ?? ""
12628
12643
  }
12629
12644
  }
12630
12645
  }));
@@ -12641,9 +12656,9 @@ const Hb = ({ ...e }) => {
12641
12656
  const O = x.current.getBoundingClientRect();
12642
12657
  if ((l ? O.width : O.height) === 0)
12643
12658
  return;
12644
- const P = l ? (H.clientX - O.left) / O.width * 100 : (H.clientY - O.top) / O.height * 100, D = Math.max(
12659
+ const A = l ? (H.clientX - O.left) / O.width * 100 : (H.clientY - O.top) / O.height * 100, D = Math.max(
12645
12660
  mo,
12646
- Math.min(ho, P)
12661
+ Math.min(ho, A)
12647
12662
  );
12648
12663
  v(D);
12649
12664
  }, F = () => {
@@ -12693,7 +12708,7 @@ const Hb = ({ ...e }) => {
12693
12708
  y === "ready" && /* @__PURE__ */ f(
12694
12709
  "button",
12695
12710
  {
12696
- onClick: () => k({}),
12711
+ onClick: () => N({}),
12697
12712
  className: "rounded-md border border-transparent p-1.5 text-muted-foreground transition-colors hover:cursor-pointer hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
12698
12713
  title: "New Conversation",
12699
12714
  children: /* @__PURE__ */ f(Yd, { className: "h-4 w-4" })