@stackable-labs/embeddables 1.41.0 → 1.42.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 +159 -161
- package/dist/stackable-widget.external.js +8 -8
- package/dist/stackable-widget.js +11 -11
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as H, jsx as p, Fragment as Fe } from "react/jsx-runtime";
|
|
2
2
|
import * as f from "react";
|
|
3
|
-
import _, { createContext as Wc, useState as ie, useRef as lt, useEffect as
|
|
3
|
+
import _, { createContext as Wc, useState as ie, useRef as lt, useEffect as ce, useContext as Uc, createElement as dn, useMemo as co, forwardRef as cs, useLayoutEffect as jc, useCallback as Le } from "react";
|
|
4
4
|
import * as wn from "react-dom";
|
|
5
5
|
import ls from "react-dom";
|
|
6
6
|
const Gc = () => {
|
|
7
7
|
try {
|
|
8
|
-
return "
|
|
8
|
+
return "52114b9a-7416-4f5e-bba6-816bb13afef4";
|
|
9
9
|
} catch {
|
|
10
10
|
return "dev";
|
|
11
11
|
}
|
|
@@ -437,7 +437,7 @@ const Qc = (e) => {
|
|
|
437
437
|
children: o
|
|
438
438
|
}) => {
|
|
439
439
|
const [r, s] = ie(!1), a = lt(null), i = lt(null);
|
|
440
|
-
return
|
|
440
|
+
return ce(() => {
|
|
441
441
|
if (!a.current) return;
|
|
442
442
|
let c = !1;
|
|
443
443
|
return (async () => {
|
|
@@ -534,7 +534,7 @@ const Qc = (e) => {
|
|
|
534
534
|
() => ol(i, { surfaceId: e, logPrefix: "[ExtensionSlot]" }),
|
|
535
535
|
[e, i]
|
|
536
536
|
);
|
|
537
|
-
if (
|
|
537
|
+
if (ce(() => {
|
|
538
538
|
const v = m.map((w) => w.id).join(",");
|
|
539
539
|
if (l.current !== v && (l.current = v, u({})), !c || m.length === 0) return;
|
|
540
540
|
const y = (w) => {
|
|
@@ -889,7 +889,7 @@ function Pl(e) {
|
|
|
889
889
|
}
|
|
890
890
|
const Al = (e) => {
|
|
891
891
|
var t, n, o, r, s, a, i, c, d;
|
|
892
|
-
const { invert: u, toast: l, unstyled: m, interacting: g, setHeights: b, visibleToasts: h, heights: v, index: y, toasts: w, expanded: x, removeToast: S, defaultRichColors: R, closeButton: E, style: k, cancelButtonStyle: C, actionButtonStyle: M, className: B = "", descriptionClassName: A = "", duration: T, position: P, gap: O, expandByDefault: L, classNames: N, icons: D, closeButtonAriaLabel: z = "Close toast" } = e, [
|
|
892
|
+
const { invert: u, toast: l, unstyled: m, interacting: g, setHeights: b, visibleToasts: h, heights: v, index: y, toasts: w, expanded: x, removeToast: S, defaultRichColors: R, closeButton: E, style: k, cancelButtonStyle: C, actionButtonStyle: M, className: B = "", descriptionClassName: A = "", duration: T, position: P, gap: O, expandByDefault: L, classNames: N, icons: D, closeButtonAriaLabel: z = "Close toast" } = e, [q, I] = _.useState(null), [ae, de] = _.useState(null), [K, oe] = _.useState(!1), [Y, te] = _.useState(!1), [V, W] = _.useState(!1), [X, re] = _.useState(!1), [ee, J] = _.useState(!1), [ue, fe] = _.useState(0), [rt, Ye] = _.useState(0), Ne = _.useRef(l.duration || T || mr), Gt = _.useRef(null), be = _.useRef(null), Mc = y === 0, Oc = y + 1 <= h, xe = l.type, gt = l.dismissible !== !1, Lc = l.className || "", Dc = l.descriptionClassName || "", Yt = _.useMemo(() => v.findIndex((Z) => Z.toastId === l.id) || 0, [
|
|
893
893
|
v,
|
|
894
894
|
l.id
|
|
895
895
|
]), zc = _.useMemo(() => {
|
|
@@ -931,7 +931,7 @@ const Al = (e) => {
|
|
|
931
931
|
b,
|
|
932
932
|
l.id
|
|
933
933
|
]), _.useLayoutEffect(() => {
|
|
934
|
-
if (!
|
|
934
|
+
if (!K) return;
|
|
935
935
|
const Z = be.current, me = Z.style.height;
|
|
936
936
|
Z.style.height = "auto";
|
|
937
937
|
const ge = Z.getBoundingClientRect().height;
|
|
@@ -947,7 +947,7 @@ const Al = (e) => {
|
|
|
947
947
|
...Se
|
|
948
948
|
]);
|
|
949
949
|
}, [
|
|
950
|
-
|
|
950
|
+
K,
|
|
951
951
|
l.title,
|
|
952
952
|
l.description,
|
|
953
953
|
b,
|
|
@@ -1016,10 +1016,10 @@ const Al = (e) => {
|
|
|
1016
1016
|
"data-sonner-toast": "",
|
|
1017
1017
|
"data-rich-colors": (dr = l.richColors) != null ? dr : R,
|
|
1018
1018
|
"data-styled": !(l.jsx || l.unstyled || m),
|
|
1019
|
-
"data-mounted":
|
|
1019
|
+
"data-mounted": K,
|
|
1020
1020
|
"data-promise": !!l.promise,
|
|
1021
1021
|
"data-swiped": ee,
|
|
1022
|
-
"data-removed":
|
|
1022
|
+
"data-removed": Y,
|
|
1023
1023
|
"data-visible": Oc,
|
|
1024
1024
|
"data-y-position": $c,
|
|
1025
1025
|
"data-x-position": Fc,
|
|
@@ -1031,13 +1031,13 @@ const Al = (e) => {
|
|
|
1031
1031
|
"data-invert": Bc,
|
|
1032
1032
|
"data-swipe-out": X,
|
|
1033
1033
|
"data-swipe-direction": ae,
|
|
1034
|
-
"data-expanded": !!(x || L &&
|
|
1034
|
+
"data-expanded": !!(x || L && K),
|
|
1035
1035
|
"data-testid": l.testId,
|
|
1036
1036
|
style: {
|
|
1037
1037
|
"--index": y,
|
|
1038
1038
|
"--toasts-before": y,
|
|
1039
1039
|
"--z-index": w.length - y,
|
|
1040
|
-
"--offset": `${
|
|
1040
|
+
"--offset": `${Y ? ue : vt.current}px`,
|
|
1041
1041
|
"--initial-height": L ? "auto" : `${rt}px`,
|
|
1042
1042
|
...k,
|
|
1043
1043
|
...l.style
|
|
@@ -1055,9 +1055,9 @@ const Al = (e) => {
|
|
|
1055
1055
|
var Z, me, ge;
|
|
1056
1056
|
if (X || !gt) return;
|
|
1057
1057
|
bt.current = null;
|
|
1058
|
-
const Se = Number(((Z = be.current) == null ? void 0 : Z.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), qt = Number(((me = be.current) == null ? void 0 : me.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), he = (/* @__PURE__ */ new Date()).getTime() - ((ge = Gt.current) == null ? void 0 : ge.getTime()), Ee =
|
|
1058
|
+
const Se = Number(((Z = be.current) == null ? void 0 : Z.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), qt = Number(((me = be.current) == null ? void 0 : me.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), he = (/* @__PURE__ */ new Date()).getTime() - ((ge = Gt.current) == null ? void 0 : ge.getTime()), Ee = q === "x" ? Se : qt, Kt = Math.abs(Ee) / he;
|
|
1059
1059
|
if (Math.abs(Ee) >= Nl || Kt > 0.11) {
|
|
1060
|
-
fe(vt.current), l.onDismiss == null || l.onDismiss.call(l, l),
|
|
1060
|
+
fe(vt.current), l.onDismiss == null || l.onDismiss.call(l, l), de(q === "x" ? Se > 0 ? "right" : "left" : qt > 0 ? "down" : "up"), qe(), re(!0);
|
|
1061
1061
|
return;
|
|
1062
1062
|
} else {
|
|
1063
1063
|
var Te, Pe;
|
|
@@ -1071,13 +1071,13 @@ const Al = (e) => {
|
|
|
1071
1071
|
const he = Z.clientY - bt.current.y, Ee = Z.clientX - bt.current.x;
|
|
1072
1072
|
var Kt;
|
|
1073
1073
|
const Te = (Kt = e.swipeDirections) != null ? Kt : Pl(P);
|
|
1074
|
-
!
|
|
1074
|
+
!q && (Math.abs(Ee) > 1 || Math.abs(he) > 1) && I(Math.abs(Ee) > Math.abs(he) ? "x" : "y");
|
|
1075
1075
|
let Pe = {
|
|
1076
1076
|
x: 0,
|
|
1077
1077
|
y: 0
|
|
1078
1078
|
};
|
|
1079
1079
|
const fr = (st) => 1 / (1.5 + Math.abs(st) / 20);
|
|
1080
|
-
if (
|
|
1080
|
+
if (q === "y") {
|
|
1081
1081
|
if (Te.includes("top") || Te.includes("bottom"))
|
|
1082
1082
|
if (Te.includes("top") && he < 0 || Te.includes("bottom") && he > 0)
|
|
1083
1083
|
Pe.y = he;
|
|
@@ -1085,7 +1085,7 @@ const Al = (e) => {
|
|
|
1085
1085
|
const st = he * fr(he);
|
|
1086
1086
|
Pe.y = Math.abs(st) < Math.abs(he) ? st : he;
|
|
1087
1087
|
}
|
|
1088
|
-
} else if (
|
|
1088
|
+
} else if (q === "x" && (Te.includes("left") || Te.includes("right")))
|
|
1089
1089
|
if (Te.includes("left") && Ee < 0 || Te.includes("right") && Ee > 0)
|
|
1090
1090
|
Pe.x = Ee;
|
|
1091
1091
|
else {
|
|
@@ -1169,43 +1169,43 @@ const Il = /* @__PURE__ */ _.forwardRef(function(t, n) {
|
|
|
1169
1169
|
const { id: o, invert: r, position: s = "bottom-right", hotkey: a = [
|
|
1170
1170
|
"altKey",
|
|
1171
1171
|
"KeyT"
|
|
1172
|
-
], expand: i, closeButton: c, className: d, offset: u, mobileOffset: l, theme: m = "light", richColors: g, duration: b, style: h, visibleToasts: v = Sl, toastOptions: y, dir: w = hr(), gap: x = Rl, icons: S, containerAriaLabel: R = "Notifications" } = t, [E, k] = _.useState([]), C = _.useMemo(() => o ? E.filter((
|
|
1172
|
+
], expand: i, closeButton: c, className: d, offset: u, mobileOffset: l, theme: m = "light", richColors: g, duration: b, style: h, visibleToasts: v = Sl, toastOptions: y, dir: w = hr(), gap: x = Rl, icons: S, containerAriaLabel: R = "Notifications" } = t, [E, k] = _.useState([]), C = _.useMemo(() => o ? E.filter((K) => K.toasterId === o) : E.filter((K) => !K.toasterId), [
|
|
1173
1173
|
E,
|
|
1174
1174
|
o
|
|
1175
1175
|
]), M = _.useMemo(() => Array.from(new Set([
|
|
1176
1176
|
s
|
|
1177
|
-
].concat(C.filter((
|
|
1177
|
+
].concat(C.filter((K) => K.position).map((K) => K.position)))), [
|
|
1178
1178
|
C,
|
|
1179
1179
|
s
|
|
1180
|
-
]), [B, A] = _.useState([]), [T, P] = _.useState(!1), [O, L] = _.useState(!1), [N, D] = _.useState(m !== "system" ? m : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), z = _.useRef(null),
|
|
1180
|
+
]), [B, A] = _.useState([]), [T, P] = _.useState(!1), [O, L] = _.useState(!1), [N, D] = _.useState(m !== "system" ? m : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), z = _.useRef(null), q = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), I = _.useRef(null), ae = _.useRef(!1), de = _.useCallback((K) => {
|
|
1181
1181
|
k((oe) => {
|
|
1182
|
-
var
|
|
1183
|
-
return (
|
|
1182
|
+
var Y;
|
|
1183
|
+
return (Y = oe.find((te) => te.id === K.id)) != null && Y.delete || ye.dismiss(K.id), oe.filter(({ id: te }) => te !== K.id);
|
|
1184
1184
|
});
|
|
1185
1185
|
}, []);
|
|
1186
|
-
return _.useEffect(() => ye.subscribe((
|
|
1187
|
-
if (
|
|
1186
|
+
return _.useEffect(() => ye.subscribe((K) => {
|
|
1187
|
+
if (K.dismiss) {
|
|
1188
1188
|
requestAnimationFrame(() => {
|
|
1189
|
-
k((oe) => oe.map((
|
|
1190
|
-
...
|
|
1189
|
+
k((oe) => oe.map((Y) => Y.id === K.id ? {
|
|
1190
|
+
...Y,
|
|
1191
1191
|
delete: !0
|
|
1192
|
-
} :
|
|
1192
|
+
} : Y));
|
|
1193
1193
|
});
|
|
1194
1194
|
return;
|
|
1195
1195
|
}
|
|
1196
1196
|
setTimeout(() => {
|
|
1197
1197
|
ls.flushSync(() => {
|
|
1198
1198
|
k((oe) => {
|
|
1199
|
-
const
|
|
1200
|
-
return
|
|
1201
|
-
...oe.slice(0,
|
|
1199
|
+
const Y = oe.findIndex((te) => te.id === K.id);
|
|
1200
|
+
return Y !== -1 ? [
|
|
1201
|
+
...oe.slice(0, Y),
|
|
1202
1202
|
{
|
|
1203
|
-
...oe[
|
|
1204
|
-
...
|
|
1203
|
+
...oe[Y],
|
|
1204
|
+
...K
|
|
1205
1205
|
},
|
|
1206
|
-
...oe.slice(
|
|
1206
|
+
...oe.slice(Y + 1)
|
|
1207
1207
|
] : [
|
|
1208
|
-
|
|
1208
|
+
K,
|
|
1209
1209
|
...oe
|
|
1210
1210
|
];
|
|
1211
1211
|
});
|
|
@@ -1219,15 +1219,15 @@ const Il = /* @__PURE__ */ _.forwardRef(function(t, n) {
|
|
|
1219
1219
|
return;
|
|
1220
1220
|
}
|
|
1221
1221
|
if (m === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? D("dark") : D("light")), typeof window > "u") return;
|
|
1222
|
-
const
|
|
1222
|
+
const K = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1223
1223
|
try {
|
|
1224
|
-
|
|
1224
|
+
K.addEventListener("change", ({ matches: oe }) => {
|
|
1225
1225
|
D(oe ? "dark" : "light");
|
|
1226
1226
|
});
|
|
1227
1227
|
} catch {
|
|
1228
|
-
|
|
1228
|
+
K.addListener(({ matches: Y }) => {
|
|
1229
1229
|
try {
|
|
1230
|
-
D(
|
|
1230
|
+
D(Y ? "dark" : "light");
|
|
1231
1231
|
} catch (te) {
|
|
1232
1232
|
console.error(te);
|
|
1233
1233
|
}
|
|
@@ -1240,15 +1240,15 @@ const Il = /* @__PURE__ */ _.forwardRef(function(t, n) {
|
|
|
1240
1240
|
}, [
|
|
1241
1241
|
E
|
|
1242
1242
|
]), _.useEffect(() => {
|
|
1243
|
-
const
|
|
1244
|
-
var
|
|
1243
|
+
const K = (oe) => {
|
|
1244
|
+
var Y;
|
|
1245
1245
|
if (a.every((W) => oe[W] || oe.code === W)) {
|
|
1246
1246
|
var V;
|
|
1247
1247
|
P(!0), (V = z.current) == null || V.focus();
|
|
1248
1248
|
}
|
|
1249
|
-
oe.code === "Escape" && (document.activeElement === z.current || (
|
|
1249
|
+
oe.code === "Escape" && (document.activeElement === z.current || (Y = z.current) != null && Y.contains(document.activeElement)) && P(!1);
|
|
1250
1250
|
};
|
|
1251
|
-
return document.addEventListener("keydown",
|
|
1251
|
+
return document.addEventListener("keydown", K), () => document.removeEventListener("keydown", K);
|
|
1252
1252
|
}, [
|
|
1253
1253
|
a
|
|
1254
1254
|
]), _.useEffect(() => {
|
|
@@ -1263,17 +1263,17 @@ const Il = /* @__PURE__ */ _.forwardRef(function(t, n) {
|
|
|
1263
1263
|
]), // Remove item from normal navigation flow, only available via hotkey
|
|
1264
1264
|
/* @__PURE__ */ _.createElement("section", {
|
|
1265
1265
|
ref: n,
|
|
1266
|
-
"aria-label": `${R} ${
|
|
1266
|
+
"aria-label": `${R} ${q}`,
|
|
1267
1267
|
tabIndex: -1,
|
|
1268
1268
|
"aria-live": "polite",
|
|
1269
1269
|
"aria-relevant": "additions text",
|
|
1270
1270
|
"aria-atomic": "false",
|
|
1271
1271
|
suppressHydrationWarning: !0
|
|
1272
|
-
}, M.map((
|
|
1273
|
-
var
|
|
1274
|
-
const [te, V] =
|
|
1272
|
+
}, M.map((K, oe) => {
|
|
1273
|
+
var Y;
|
|
1274
|
+
const [te, V] = K.split("-");
|
|
1275
1275
|
return C.length ? /* @__PURE__ */ _.createElement("ol", {
|
|
1276
|
-
key:
|
|
1276
|
+
key: K,
|
|
1277
1277
|
dir: w === "auto" ? hr() : w,
|
|
1278
1278
|
tabIndex: -1,
|
|
1279
1279
|
ref: z,
|
|
@@ -1283,7 +1283,7 @@ const Il = /* @__PURE__ */ _.forwardRef(function(t, n) {
|
|
|
1283
1283
|
"data-y-position": te,
|
|
1284
1284
|
"data-x-position": V,
|
|
1285
1285
|
style: {
|
|
1286
|
-
"--front-toast-height": `${((
|
|
1286
|
+
"--front-toast-height": `${((Y = B[0]) == null ? void 0 : Y.height) || 0}px`,
|
|
1287
1287
|
"--width": `${El}px`,
|
|
1288
1288
|
"--gap": `${x}px`,
|
|
1289
1289
|
...h,
|
|
@@ -1307,7 +1307,7 @@ const Il = /* @__PURE__ */ _.forwardRef(function(t, n) {
|
|
|
1307
1307
|
W.target instanceof HTMLElement && W.target.dataset.dismissible === "false" || L(!0);
|
|
1308
1308
|
},
|
|
1309
1309
|
onPointerUp: () => L(!1)
|
|
1310
|
-
}, C.filter((W) => !W.position && oe === 0 || W.position ===
|
|
1310
|
+
}, C.filter((W) => !W.position && oe === 0 || W.position === K).map((W, X) => {
|
|
1311
1311
|
var re, ee;
|
|
1312
1312
|
return /* @__PURE__ */ _.createElement(Al, {
|
|
1313
1313
|
key: W.id,
|
|
@@ -1322,14 +1322,14 @@ const Il = /* @__PURE__ */ _.forwardRef(function(t, n) {
|
|
|
1322
1322
|
visibleToasts: v,
|
|
1323
1323
|
closeButton: (ee = y == null ? void 0 : y.closeButton) != null ? ee : c,
|
|
1324
1324
|
interacting: O,
|
|
1325
|
-
position:
|
|
1325
|
+
position: K,
|
|
1326
1326
|
style: y == null ? void 0 : y.style,
|
|
1327
1327
|
unstyled: y == null ? void 0 : y.unstyled,
|
|
1328
1328
|
classNames: y == null ? void 0 : y.classNames,
|
|
1329
1329
|
cancelButtonStyle: y == null ? void 0 : y.cancelButtonStyle,
|
|
1330
1330
|
actionButtonStyle: y == null ? void 0 : y.actionButtonStyle,
|
|
1331
1331
|
closeButtonAriaLabel: y == null ? void 0 : y.closeButtonAriaLabel,
|
|
1332
|
-
removeToast:
|
|
1332
|
+
removeToast: de,
|
|
1333
1333
|
toasts: C.filter((J) => J.position == W.position),
|
|
1334
1334
|
heights: B.filter((J) => J.position == W.position),
|
|
1335
1335
|
setHeights: A,
|
|
@@ -2232,13 +2232,13 @@ const Vd = (e, t) => {
|
|
|
2232
2232
|
"left-bottom"
|
|
2233
2233
|
], R = () => [...S(), F, $], E = () => ["auto", "hidden", "clip", "visible", "scroll"], k = () => ["auto", "contain", "none"], C = () => [F, $, c], M = () => [Ke, "full", "auto", ...C()], B = () => [Xe, "none", "subgrid", F, $], A = () => ["auto", {
|
|
2234
2234
|
span: ["full", Xe, F, $]
|
|
2235
|
-
}, Xe, F, $], T = () => [Xe, "auto", F, $], P = () => ["auto", "min", "max", "fr", F, $], O = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], L = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], N = () => ["auto", ...C()], D = () => [Ke, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...C()], z = () => [Ke, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...C()],
|
|
2235
|
+
}, Xe, F, $], T = () => [Xe, "auto", F, $], P = () => ["auto", "min", "max", "fr", F, $], O = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], L = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], N = () => ["auto", ...C()], D = () => [Ke, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...C()], z = () => [Ke, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...C()], q = () => [Ke, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...C()], I = () => [e, F, $], ae = () => [...S(), kr, Cr, {
|
|
2236
2236
|
position: [F, $]
|
|
2237
|
-
}],
|
|
2237
|
+
}], de = () => ["no-repeat", {
|
|
2238
2238
|
repeat: ["", "x", "y", "space", "round"]
|
|
2239
|
-
}],
|
|
2239
|
+
}], K = () => ["auto", "cover", "contain", Eu, wu, {
|
|
2240
2240
|
size: [F, $]
|
|
2241
|
-
}], oe = () => [Gn, Mt, at],
|
|
2241
|
+
}], oe = () => [Gn, Mt, at], Y = () => [
|
|
2242
2242
|
// Deprecated since Tailwind CSS v4.0.0
|
|
2243
2243
|
"",
|
|
2244
2244
|
"none",
|
|
@@ -2959,21 +2959,21 @@ const Vd = (e, t) => {
|
|
|
2959
2959
|
* @see https://tailwindcss.com/docs/height
|
|
2960
2960
|
*/
|
|
2961
2961
|
"block-size": [{
|
|
2962
|
-
block: ["auto", ...
|
|
2962
|
+
block: ["auto", ...q()]
|
|
2963
2963
|
}],
|
|
2964
2964
|
/**
|
|
2965
2965
|
* Min-Block Size
|
|
2966
2966
|
* @see https://tailwindcss.com/docs/min-height
|
|
2967
2967
|
*/
|
|
2968
2968
|
"min-block-size": [{
|
|
2969
|
-
"min-block": ["auto", ...
|
|
2969
|
+
"min-block": ["auto", ...q()]
|
|
2970
2970
|
}],
|
|
2971
2971
|
/**
|
|
2972
2972
|
* Max-Block Size
|
|
2973
2973
|
* @see https://tailwindcss.com/docs/max-height
|
|
2974
2974
|
*/
|
|
2975
2975
|
"max-block-size": [{
|
|
2976
|
-
"max-block": ["none", ...
|
|
2976
|
+
"max-block": ["none", ...q()]
|
|
2977
2977
|
}],
|
|
2978
2978
|
/**
|
|
2979
2979
|
* Width
|
|
@@ -3315,14 +3315,14 @@ const Vd = (e, t) => {
|
|
|
3315
3315
|
* @see https://tailwindcss.com/docs/background-repeat
|
|
3316
3316
|
*/
|
|
3317
3317
|
"bg-repeat": [{
|
|
3318
|
-
bg:
|
|
3318
|
+
bg: de()
|
|
3319
3319
|
}],
|
|
3320
3320
|
/**
|
|
3321
3321
|
* Background Size
|
|
3322
3322
|
* @see https://tailwindcss.com/docs/background-size
|
|
3323
3323
|
*/
|
|
3324
3324
|
"bg-size": [{
|
|
3325
|
-
bg:
|
|
3325
|
+
bg: K()
|
|
3326
3326
|
}],
|
|
3327
3327
|
/**
|
|
3328
3328
|
* Background Image
|
|
@@ -3394,105 +3394,105 @@ const Vd = (e, t) => {
|
|
|
3394
3394
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3395
3395
|
*/
|
|
3396
3396
|
rounded: [{
|
|
3397
|
-
rounded:
|
|
3397
|
+
rounded: Y()
|
|
3398
3398
|
}],
|
|
3399
3399
|
/**
|
|
3400
3400
|
* Border Radius Start
|
|
3401
3401
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3402
3402
|
*/
|
|
3403
3403
|
"rounded-s": [{
|
|
3404
|
-
"rounded-s":
|
|
3404
|
+
"rounded-s": Y()
|
|
3405
3405
|
}],
|
|
3406
3406
|
/**
|
|
3407
3407
|
* Border Radius End
|
|
3408
3408
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3409
3409
|
*/
|
|
3410
3410
|
"rounded-e": [{
|
|
3411
|
-
"rounded-e":
|
|
3411
|
+
"rounded-e": Y()
|
|
3412
3412
|
}],
|
|
3413
3413
|
/**
|
|
3414
3414
|
* Border Radius Top
|
|
3415
3415
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3416
3416
|
*/
|
|
3417
3417
|
"rounded-t": [{
|
|
3418
|
-
"rounded-t":
|
|
3418
|
+
"rounded-t": Y()
|
|
3419
3419
|
}],
|
|
3420
3420
|
/**
|
|
3421
3421
|
* Border Radius Right
|
|
3422
3422
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3423
3423
|
*/
|
|
3424
3424
|
"rounded-r": [{
|
|
3425
|
-
"rounded-r":
|
|
3425
|
+
"rounded-r": Y()
|
|
3426
3426
|
}],
|
|
3427
3427
|
/**
|
|
3428
3428
|
* Border Radius Bottom
|
|
3429
3429
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3430
3430
|
*/
|
|
3431
3431
|
"rounded-b": [{
|
|
3432
|
-
"rounded-b":
|
|
3432
|
+
"rounded-b": Y()
|
|
3433
3433
|
}],
|
|
3434
3434
|
/**
|
|
3435
3435
|
* Border Radius Left
|
|
3436
3436
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3437
3437
|
*/
|
|
3438
3438
|
"rounded-l": [{
|
|
3439
|
-
"rounded-l":
|
|
3439
|
+
"rounded-l": Y()
|
|
3440
3440
|
}],
|
|
3441
3441
|
/**
|
|
3442
3442
|
* Border Radius Start Start
|
|
3443
3443
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3444
3444
|
*/
|
|
3445
3445
|
"rounded-ss": [{
|
|
3446
|
-
"rounded-ss":
|
|
3446
|
+
"rounded-ss": Y()
|
|
3447
3447
|
}],
|
|
3448
3448
|
/**
|
|
3449
3449
|
* Border Radius Start End
|
|
3450
3450
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3451
3451
|
*/
|
|
3452
3452
|
"rounded-se": [{
|
|
3453
|
-
"rounded-se":
|
|
3453
|
+
"rounded-se": Y()
|
|
3454
3454
|
}],
|
|
3455
3455
|
/**
|
|
3456
3456
|
* Border Radius End End
|
|
3457
3457
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3458
3458
|
*/
|
|
3459
3459
|
"rounded-ee": [{
|
|
3460
|
-
"rounded-ee":
|
|
3460
|
+
"rounded-ee": Y()
|
|
3461
3461
|
}],
|
|
3462
3462
|
/**
|
|
3463
3463
|
* Border Radius End Start
|
|
3464
3464
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3465
3465
|
*/
|
|
3466
3466
|
"rounded-es": [{
|
|
3467
|
-
"rounded-es":
|
|
3467
|
+
"rounded-es": Y()
|
|
3468
3468
|
}],
|
|
3469
3469
|
/**
|
|
3470
3470
|
* Border Radius Top Left
|
|
3471
3471
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3472
3472
|
*/
|
|
3473
3473
|
"rounded-tl": [{
|
|
3474
|
-
"rounded-tl":
|
|
3474
|
+
"rounded-tl": Y()
|
|
3475
3475
|
}],
|
|
3476
3476
|
/**
|
|
3477
3477
|
* Border Radius Top Right
|
|
3478
3478
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3479
3479
|
*/
|
|
3480
3480
|
"rounded-tr": [{
|
|
3481
|
-
"rounded-tr":
|
|
3481
|
+
"rounded-tr": Y()
|
|
3482
3482
|
}],
|
|
3483
3483
|
/**
|
|
3484
3484
|
* Border Radius Bottom Right
|
|
3485
3485
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3486
3486
|
*/
|
|
3487
3487
|
"rounded-br": [{
|
|
3488
|
-
"rounded-br":
|
|
3488
|
+
"rounded-br": Y()
|
|
3489
3489
|
}],
|
|
3490
3490
|
/**
|
|
3491
3491
|
* Border Radius Bottom Left
|
|
3492
3492
|
* @see https://tailwindcss.com/docs/border-radius
|
|
3493
3493
|
*/
|
|
3494
3494
|
"rounded-bl": [{
|
|
3495
|
-
"rounded-bl":
|
|
3495
|
+
"rounded-bl": Y()
|
|
3496
3496
|
}],
|
|
3497
3497
|
/**
|
|
3498
3498
|
* Border Width
|
|
@@ -4020,14 +4020,14 @@ const Vd = (e, t) => {
|
|
|
4020
4020
|
* @see https://tailwindcss.com/docs/mask-repeat
|
|
4021
4021
|
*/
|
|
4022
4022
|
"mask-repeat": [{
|
|
4023
|
-
mask:
|
|
4023
|
+
mask: de()
|
|
4024
4024
|
}],
|
|
4025
4025
|
/**
|
|
4026
4026
|
* Mask Size
|
|
4027
4027
|
* @see https://tailwindcss.com/docs/mask-size
|
|
4028
4028
|
*/
|
|
4029
4029
|
"mask-size": [{
|
|
4030
|
-
mask:
|
|
4030
|
+
mask: K()
|
|
4031
4031
|
}],
|
|
4032
4032
|
/**
|
|
4033
4033
|
* Mask Type
|
|
@@ -5129,8 +5129,8 @@ function G(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
|
5129
5129
|
return t == null ? void 0 : t(r);
|
|
5130
5130
|
};
|
|
5131
5131
|
}
|
|
5132
|
-
var
|
|
5133
|
-
}, Vu = f[" useInsertionEffect ".trim().toString()] ||
|
|
5132
|
+
var le = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
|
|
5133
|
+
}, Vu = f[" useInsertionEffect ".trim().toString()] || le;
|
|
5134
5134
|
function We({
|
|
5135
5135
|
prop: e,
|
|
5136
5136
|
defaultProp: t,
|
|
@@ -5204,13 +5204,13 @@ function Gu(e) {
|
|
|
5204
5204
|
return f.useEffect(() => {
|
|
5205
5205
|
const d = en(o.current);
|
|
5206
5206
|
s.current = i === "mounted" ? d : "none";
|
|
5207
|
-
}, [i]),
|
|
5207
|
+
}, [i]), le(() => {
|
|
5208
5208
|
const d = o.current, u = r.current;
|
|
5209
5209
|
if (u !== e) {
|
|
5210
5210
|
const m = s.current, g = en(d);
|
|
5211
5211
|
e ? c("MOUNT") : g === "none" || (d == null ? void 0 : d.display) === "none" ? c("UNMOUNT") : c(u && m !== g ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
|
|
5212
5212
|
}
|
|
5213
|
-
}, [e, c]),
|
|
5213
|
+
}, [e, c]), le(() => {
|
|
5214
5214
|
if (t) {
|
|
5215
5215
|
let d;
|
|
5216
5216
|
const u = t.ownerDocument.defaultView ?? window, l = (g) => {
|
|
@@ -5248,7 +5248,7 @@ var qu = f[" useId ".trim().toString()] || (() => {
|
|
|
5248
5248
|
}), Ku = 0;
|
|
5249
5249
|
function ht(e) {
|
|
5250
5250
|
const [t, n] = f.useState(qu());
|
|
5251
|
-
return
|
|
5251
|
+
return le(() => {
|
|
5252
5252
|
n((o) => o ?? String(Ku++));
|
|
5253
5253
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
5254
5254
|
}
|
|
@@ -5321,7 +5321,7 @@ var Ju = f.forwardRef((e, t) => {
|
|
|
5321
5321
|
return f.useEffect(() => {
|
|
5322
5322
|
const w = requestAnimationFrame(() => v.current = !1);
|
|
5323
5323
|
return () => cancelAnimationFrame(w);
|
|
5324
|
-
}, []),
|
|
5324
|
+
}, []), le(() => {
|
|
5325
5325
|
const w = d.current;
|
|
5326
5326
|
if (w) {
|
|
5327
5327
|
y.current = y.current || {
|
|
@@ -5623,7 +5623,7 @@ function gf(e) {
|
|
|
5623
5623
|
var vf = "Portal", Fo = f.forwardRef((e, t) => {
|
|
5624
5624
|
var i;
|
|
5625
5625
|
const { container: n, ...o } = e, [r, s] = f.useState(!1);
|
|
5626
|
-
|
|
5626
|
+
le(() => s(!0), []);
|
|
5627
5627
|
const a = n || r && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
|
|
5628
5628
|
return a ? ls.createPortal(/* @__PURE__ */ p(j.div, { ...o, ref: t }), a) : null;
|
|
5629
5629
|
});
|
|
@@ -6252,7 +6252,7 @@ var ca = "AvatarImage", la = f.forwardRef(
|
|
|
6252
6252
|
}, ...s } = e, a = aa(ca, n), i = fp(o, s), c = ve((d) => {
|
|
6253
6253
|
r(d), a.onImageLoadingStatusChange(d);
|
|
6254
6254
|
});
|
|
6255
|
-
return
|
|
6255
|
+
return le(() => {
|
|
6256
6256
|
i !== "idle" && c(i);
|
|
6257
6257
|
}, [i, c]), i === "loaded" ? /* @__PURE__ */ p(j.img, { ...s, ref: t, src: o }) : null;
|
|
6258
6258
|
}
|
|
@@ -6277,9 +6277,9 @@ function fp(e, { referrerPolicy: t, crossOrigin: n }) {
|
|
|
6277
6277
|
const o = cp(), r = f.useRef(null), s = o ? (r.current || (r.current = new window.Image()), r.current) : null, [a, i] = f.useState(
|
|
6278
6278
|
() => Vr(s, e)
|
|
6279
6279
|
);
|
|
6280
|
-
return
|
|
6280
|
+
return le(() => {
|
|
6281
6281
|
i(Vr(s, e));
|
|
6282
|
-
}, [s, e]),
|
|
6282
|
+
}, [s, e]), le(() => {
|
|
6283
6283
|
const c = (l) => () => {
|
|
6284
6284
|
i(l);
|
|
6285
6285
|
};
|
|
@@ -6297,7 +6297,7 @@ function En(e) {
|
|
|
6297
6297
|
}
|
|
6298
6298
|
function Rn(e) {
|
|
6299
6299
|
const [t, n] = f.useState(void 0);
|
|
6300
|
-
return
|
|
6300
|
+
return le(() => {
|
|
6301
6301
|
if (e) {
|
|
6302
6302
|
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
6303
6303
|
const o = new ResizeObserver((r) => {
|
|
@@ -6901,13 +6901,13 @@ const Ap = 50, _p = async (e, t, n) => {
|
|
|
6901
6901
|
var P;
|
|
6902
6902
|
const D = (P = B.filter((z) => {
|
|
6903
6903
|
if (E) {
|
|
6904
|
-
const
|
|
6905
|
-
return
|
|
6904
|
+
const q = ze(z.placement);
|
|
6905
|
+
return q === w || // Create a bias to the `y` side axis due to horizontal
|
|
6906
6906
|
// reading directions favoring greater width.
|
|
6907
|
-
|
|
6907
|
+
q === "y";
|
|
6908
6908
|
}
|
|
6909
6909
|
return !0;
|
|
6910
|
-
}).map((z) => [z.placement, z.overflows.filter((
|
|
6910
|
+
}).map((z) => [z.placement, z.overflows.filter((q) => q > 0).reduce((q, I) => q + I, 0)]).sort((z, q) => z[1] - q[1])[0]) == null ? void 0 : P[0];
|
|
6911
6911
|
D && (N = D);
|
|
6912
6912
|
break;
|
|
6913
6913
|
}
|
|
@@ -7750,9 +7750,9 @@ function hm(e) {
|
|
|
7750
7750
|
strategy: n,
|
|
7751
7751
|
middleware: m
|
|
7752
7752
|
};
|
|
7753
|
-
A.current && (z.platform = A.current), fm(E.current, k.current, z).then((
|
|
7753
|
+
A.current && (z.platform = A.current), fm(E.current, k.current, z).then((q) => {
|
|
7754
7754
|
const I = {
|
|
7755
|
-
...
|
|
7755
|
+
...q,
|
|
7756
7756
|
// The floating element's position may be recomputed while it's closed
|
|
7757
7757
|
// but still mounted (such as when transitioning out). To ensure
|
|
7758
7758
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
@@ -7796,16 +7796,16 @@ function hm(e) {
|
|
|
7796
7796
|
};
|
|
7797
7797
|
if (!N.floating)
|
|
7798
7798
|
return z;
|
|
7799
|
-
const
|
|
7799
|
+
const q = Qr(N.floating, u.x), I = Qr(N.floating, u.y);
|
|
7800
7800
|
return i ? {
|
|
7801
7801
|
...z,
|
|
7802
|
-
transform: "translate(" +
|
|
7802
|
+
transform: "translate(" + q + "px, " + I + "px)",
|
|
7803
7803
|
...Aa(N.floating) >= 1.5 && {
|
|
7804
7804
|
willChange: "transform"
|
|
7805
7805
|
}
|
|
7806
7806
|
} : {
|
|
7807
7807
|
position: n,
|
|
7808
|
-
left:
|
|
7808
|
+
left: q,
|
|
7809
7809
|
top: I
|
|
7810
7810
|
};
|
|
7811
7811
|
}, [n, i, N.floating, u.x, u.y]);
|
|
@@ -7968,12 +7968,12 @@ var Ko = "PopperContent", [Nm, Tm] = Ia(Ko), za = f.forwardRef(
|
|
|
7968
7968
|
_m({ arrowWidth: k, arrowHeight: C }),
|
|
7969
7969
|
m && Sm({ strategy: "referenceHidden", ...P })
|
|
7970
7970
|
]
|
|
7971
|
-
}), [
|
|
7972
|
-
|
|
7971
|
+
}), [q, I] = Ba(N), ae = ve(b);
|
|
7972
|
+
le(() => {
|
|
7973
7973
|
D && (ae == null || ae());
|
|
7974
7974
|
}, [D, ae]);
|
|
7975
|
-
const
|
|
7976
|
-
return
|
|
7975
|
+
const de = (V = z.arrow) == null ? void 0 : V.x, K = (W = z.arrow) == null ? void 0 : W.y, oe = ((X = z.arrow) == null ? void 0 : X.centerOffset) !== 0, [Y, te] = f.useState();
|
|
7976
|
+
return le(() => {
|
|
7977
7977
|
y && te(window.getComputedStyle(y).zIndex);
|
|
7978
7978
|
}, [y]), /* @__PURE__ */ p(
|
|
7979
7979
|
"div",
|
|
@@ -7985,7 +7985,7 @@ var Ko = "PopperContent", [Nm, Tm] = Ia(Ko), za = f.forwardRef(
|
|
|
7985
7985
|
transform: D ? L.transform : "translate(0, -200%)",
|
|
7986
7986
|
// keep off the page when measuring
|
|
7987
7987
|
minWidth: "max-content",
|
|
7988
|
-
zIndex:
|
|
7988
|
+
zIndex: Y,
|
|
7989
7989
|
"--radix-popper-transform-origin": [
|
|
7990
7990
|
(re = z.transformOrigin) == null ? void 0 : re.x,
|
|
7991
7991
|
(ee = z.transformOrigin) == null ? void 0 : ee.y
|
|
@@ -8003,15 +8003,15 @@ var Ko = "PopperContent", [Nm, Tm] = Ia(Ko), za = f.forwardRef(
|
|
|
8003
8003
|
Nm,
|
|
8004
8004
|
{
|
|
8005
8005
|
scope: n,
|
|
8006
|
-
placedSide:
|
|
8006
|
+
placedSide: q,
|
|
8007
8007
|
onArrowChange: R,
|
|
8008
|
-
arrowX:
|
|
8009
|
-
arrowY:
|
|
8008
|
+
arrowX: de,
|
|
8009
|
+
arrowY: K,
|
|
8010
8010
|
shouldHideArrow: oe,
|
|
8011
8011
|
children: /* @__PURE__ */ p(
|
|
8012
8012
|
j.div,
|
|
8013
8013
|
{
|
|
8014
|
-
"data-side":
|
|
8014
|
+
"data-side": q,
|
|
8015
8015
|
"data-align": I,
|
|
8016
8016
|
...h,
|
|
8017
8017
|
ref: x,
|
|
@@ -9067,7 +9067,7 @@ function Dn(e, t) {
|
|
|
9067
9067
|
}
|
|
9068
9068
|
function Tt(e, t) {
|
|
9069
9069
|
const n = ve(t);
|
|
9070
|
-
|
|
9070
|
+
le(() => {
|
|
9071
9071
|
let o = 0;
|
|
9072
9072
|
if (e) {
|
|
9073
9073
|
const r = new ResizeObserver(() => {
|
|
@@ -9216,7 +9216,7 @@ Ai.displayName = Pi;
|
|
|
9216
9216
|
var _i = "SelectValue", Ii = f.forwardRef(
|
|
9217
9217
|
(e, t) => {
|
|
9218
9218
|
const { __scopeSelect: n, className: o, style: r, children: s, placeholder: a = "", ...i } = e, c = nt(_i, n), { onValueNodeHasChildrenChange: d } = c, u = s !== void 0, l = ne(t, c.onValueNodeChange);
|
|
9219
|
-
return
|
|
9219
|
+
return le(() => {
|
|
9220
9220
|
d(u);
|
|
9221
9221
|
}, [d, u]), /* @__PURE__ */ p(
|
|
9222
9222
|
j.span,
|
|
@@ -9242,7 +9242,7 @@ Oi.displayName = _h;
|
|
|
9242
9242
|
var pt = "SelectContent", Li = f.forwardRef(
|
|
9243
9243
|
(e, t) => {
|
|
9244
9244
|
const n = nt(pt, e.__scopeSelect), [o, r] = f.useState();
|
|
9245
|
-
if (
|
|
9245
|
+
if (le(() => {
|
|
9246
9246
|
r(new DocumentFragment());
|
|
9247
9247
|
}, []), !n.open) {
|
|
9248
9248
|
const s = o;
|
|
@@ -9297,24 +9297,24 @@ var Ae = 10, [Di, ot] = It(pt), Ih = "SelectContentImpl", Mh = /* @__PURE__ */ $
|
|
|
9297
9297
|
f.useEffect(() => {
|
|
9298
9298
|
P && D();
|
|
9299
9299
|
}, [P, D]);
|
|
9300
|
-
const { onOpenChange: z, triggerPointerDownPosRef:
|
|
9300
|
+
const { onOpenChange: z, triggerPointerDownPosRef: q } = w;
|
|
9301
9301
|
f.useEffect(() => {
|
|
9302
9302
|
if (x) {
|
|
9303
9303
|
let V = { x: 0, y: 0 };
|
|
9304
9304
|
const W = (re) => {
|
|
9305
9305
|
var ee, J;
|
|
9306
9306
|
V = {
|
|
9307
|
-
x: Math.abs(Math.round(re.pageX) - (((ee =
|
|
9308
|
-
y: Math.abs(Math.round(re.pageY) - (((J =
|
|
9307
|
+
x: Math.abs(Math.round(re.pageX) - (((ee = q.current) == null ? void 0 : ee.x) ?? 0)),
|
|
9308
|
+
y: Math.abs(Math.round(re.pageY) - (((J = q.current) == null ? void 0 : J.y) ?? 0))
|
|
9309
9309
|
};
|
|
9310
9310
|
}, X = (re) => {
|
|
9311
|
-
V.x <= 10 && V.y <= 10 ? re.preventDefault() : x.contains(re.target) || z(!1), document.removeEventListener("pointermove", W),
|
|
9311
|
+
V.x <= 10 && V.y <= 10 ? re.preventDefault() : x.contains(re.target) || z(!1), document.removeEventListener("pointermove", W), q.current = null;
|
|
9312
9312
|
};
|
|
9313
|
-
return
|
|
9313
|
+
return q.current !== null && (document.addEventListener("pointermove", W), document.addEventListener("pointerup", X, { capture: !0, once: !0 })), () => {
|
|
9314
9314
|
document.removeEventListener("pointermove", W), document.removeEventListener("pointerup", X, { capture: !0 });
|
|
9315
9315
|
};
|
|
9316
9316
|
}
|
|
9317
|
-
}, [x, z,
|
|
9317
|
+
}, [x, z, q]), f.useEffect(() => {
|
|
9318
9318
|
const V = () => z(!1);
|
|
9319
9319
|
return window.addEventListener("blur", V), window.addEventListener("resize", V), () => {
|
|
9320
9320
|
window.removeEventListener("blur", V), window.removeEventListener("resize", V);
|
|
@@ -9323,19 +9323,19 @@ var Ae = 10, [Di, ot] = It(pt), Ih = "SelectContentImpl", Mh = /* @__PURE__ */ $
|
|
|
9323
9323
|
const [I, ae] = Ji((V) => {
|
|
9324
9324
|
const W = T().filter((ee) => !ee.disabled), X = W.find((ee) => ee.ref.current === document.activeElement), re = Qi(W, V, X);
|
|
9325
9325
|
re && setTimeout(() => re.ref.current.focus());
|
|
9326
|
-
}),
|
|
9326
|
+
}), de = f.useCallback(
|
|
9327
9327
|
(V, W, X) => {
|
|
9328
9328
|
const re = !L.current && !X;
|
|
9329
9329
|
(w.value !== void 0 && w.value === W || re) && (M(V), re && (L.current = !0));
|
|
9330
9330
|
},
|
|
9331
9331
|
[w.value]
|
|
9332
|
-
),
|
|
9332
|
+
), K = f.useCallback(() => x == null ? void 0 : x.focus(), [x]), oe = f.useCallback(
|
|
9333
9333
|
(V, W, X) => {
|
|
9334
9334
|
const re = !L.current && !X;
|
|
9335
9335
|
(w.value !== void 0 && w.value === W || re) && A(V);
|
|
9336
9336
|
},
|
|
9337
9337
|
[w.value]
|
|
9338
|
-
),
|
|
9338
|
+
), Y = o === "popper" ? xo : $i, te = Y === xo ? {
|
|
9339
9339
|
side: i,
|
|
9340
9340
|
sideOffset: c,
|
|
9341
9341
|
align: d,
|
|
@@ -9354,9 +9354,9 @@ var Ae = 10, [Di, ot] = It(pt), Ih = "SelectContentImpl", Mh = /* @__PURE__ */ $
|
|
|
9354
9354
|
content: x,
|
|
9355
9355
|
viewport: R,
|
|
9356
9356
|
onViewportChange: E,
|
|
9357
|
-
itemRefCallback:
|
|
9357
|
+
itemRefCallback: de,
|
|
9358
9358
|
selectedItem: C,
|
|
9359
|
-
onItemLeave:
|
|
9359
|
+
onItemLeave: K,
|
|
9360
9360
|
itemTextRefCallback: oe,
|
|
9361
9361
|
focusSelectedItem: D,
|
|
9362
9362
|
selectedItemText: B,
|
|
@@ -9385,7 +9385,7 @@ var Ae = 10, [Di, ot] = It(pt), Ih = "SelectContentImpl", Mh = /* @__PURE__ */ $
|
|
|
9385
9385
|
onFocusOutside: (V) => V.preventDefault(),
|
|
9386
9386
|
onDismiss: () => w.onOpenChange(!1),
|
|
9387
9387
|
children: /* @__PURE__ */ p(
|
|
9388
|
-
|
|
9388
|
+
Y,
|
|
9389
9389
|
{
|
|
9390
9390
|
role: "listbox",
|
|
9391
9391
|
id: w.contentId,
|
|
@@ -9448,14 +9448,14 @@ var Oh = "SelectItemAlignedPosition", $i = f.forwardRef((e, t) => {
|
|
|
9448
9448
|
]);
|
|
9449
9449
|
i.style.minWidth = fe + "px", i.style.right = Ne + "px";
|
|
9450
9450
|
}
|
|
9451
|
-
const A = m(), T = window.innerHeight - Ae * 2, P = h.scrollHeight, O = window.getComputedStyle(d), L = parseInt(O.borderTopWidth, 10), N = parseInt(O.paddingTop, 10), D = parseInt(O.borderBottomWidth, 10), z = parseInt(O.paddingBottom, 10),
|
|
9451
|
+
const A = m(), T = window.innerHeight - Ae * 2, P = h.scrollHeight, O = window.getComputedStyle(d), L = parseInt(O.borderTopWidth, 10), N = parseInt(O.paddingTop, 10), D = parseInt(O.borderBottomWidth, 10), z = parseInt(O.paddingBottom, 10), q = L + N + P + z + D, I = Math.min(v.offsetHeight * 5, q), ae = window.getComputedStyle(h), de = parseInt(ae.paddingTop, 10), K = parseInt(ae.paddingBottom, 10), oe = k.top + k.height / 2 - Ae, Y = T - oe, te = v.offsetHeight / 2, V = v.offsetTop + te, W = L + N + V, X = q - W;
|
|
9452
9452
|
if (W <= oe) {
|
|
9453
9453
|
const ee = A.length > 0 && v === A[A.length - 1].ref.current;
|
|
9454
9454
|
i.style.bottom = "0px";
|
|
9455
9455
|
const J = d.clientHeight - h.offsetTop - h.offsetHeight, ue = Math.max(
|
|
9456
|
-
|
|
9456
|
+
Y,
|
|
9457
9457
|
te + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
9458
|
-
(ee ?
|
|
9458
|
+
(ee ? K : 0) + J + D
|
|
9459
9459
|
), fe = W + ue;
|
|
9460
9460
|
i.style.height = fe + "px";
|
|
9461
9461
|
} else {
|
|
@@ -9464,7 +9464,7 @@ var Oh = "SelectItemAlignedPosition", $i = f.forwardRef((e, t) => {
|
|
|
9464
9464
|
const ue = Math.max(
|
|
9465
9465
|
oe,
|
|
9466
9466
|
L + h.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
9467
|
-
(ee ?
|
|
9467
|
+
(ee ? de : 0) + te
|
|
9468
9468
|
) + X;
|
|
9469
9469
|
i.style.height = ue + "px", h.scrollTop = W - oe + h.offsetTop;
|
|
9470
9470
|
}
|
|
@@ -9482,9 +9482,9 @@ var Oh = "SelectItemAlignedPosition", $i = f.forwardRef((e, t) => {
|
|
|
9482
9482
|
s.dir,
|
|
9483
9483
|
o
|
|
9484
9484
|
]);
|
|
9485
|
-
|
|
9485
|
+
le(() => x(), [x]);
|
|
9486
9486
|
const [S, R] = f.useState();
|
|
9487
|
-
|
|
9487
|
+
le(() => {
|
|
9488
9488
|
d && R(window.getComputedStyle(d).zIndex);
|
|
9489
9489
|
}, [d]);
|
|
9490
9490
|
const E = f.useCallback(
|
|
@@ -9725,7 +9725,7 @@ var Ot = "SelectItemText", Ui = f.forwardRef(
|
|
|
9725
9725
|
() => /* @__PURE__ */ p("option", { value: c.value, disabled: c.disabled, children: g }, c.value),
|
|
9726
9726
|
[c.disabled, c.value, g]
|
|
9727
9727
|
), { onNativeOptionAdd: h, onNativeOptionRemove: v } = d;
|
|
9728
|
-
return
|
|
9728
|
+
return le(() => (h(b), () => v(b)), [h, v, b]), /* @__PURE__ */ H(Fe, { children: [
|
|
9729
9729
|
/* @__PURE__ */ p(j.span, { id: c.textId, ...s, ref: m }),
|
|
9730
9730
|
c.isSelected && a.valueNode && !a.valueNodeHasChildren ? wn.createPortal(s.children, a.valueNode) : null
|
|
9731
9731
|
] });
|
|
@@ -9741,7 +9741,7 @@ var ji = "SelectItemIndicator", Gi = f.forwardRef(
|
|
|
9741
9741
|
Gi.displayName = ji;
|
|
9742
9742
|
var Co = "SelectScrollUpButton", Yi = f.forwardRef((e, t) => {
|
|
9743
9743
|
const n = ot(Co, e.__scopeSelect), o = nr(Co, e.__scopeSelect), [r, s] = f.useState(!1), a = ne(t, o.onScrollButtonChange);
|
|
9744
|
-
return
|
|
9744
|
+
return le(() => {
|
|
9745
9745
|
if (n.viewport && n.isPositioned) {
|
|
9746
9746
|
let i = function() {
|
|
9747
9747
|
const d = c.scrollTop > 0;
|
|
@@ -9765,7 +9765,7 @@ var Co = "SelectScrollUpButton", Yi = f.forwardRef((e, t) => {
|
|
|
9765
9765
|
Yi.displayName = Co;
|
|
9766
9766
|
var ko = "SelectScrollDownButton", qi = f.forwardRef((e, t) => {
|
|
9767
9767
|
const n = ot(ko, e.__scopeSelect), o = nr(ko, e.__scopeSelect), [r, s] = f.useState(!1), a = ne(t, o.onScrollButtonChange);
|
|
9768
|
-
return
|
|
9768
|
+
return le(() => {
|
|
9769
9769
|
if (n.viewport && n.isPositioned) {
|
|
9770
9770
|
let i = function() {
|
|
9771
9771
|
const d = c.scrollHeight - c.clientHeight, u = Math.ceil(c.scrollTop) < d;
|
|
@@ -9791,7 +9791,7 @@ var Ki = f.forwardRef((e, t) => {
|
|
|
9791
9791
|
const { __scopeSelect: n, onAutoScroll: o, ...r } = e, s = ot("SelectScrollButton", n), a = f.useRef(null), i = $n(n), c = f.useCallback(() => {
|
|
9792
9792
|
a.current !== null && (window.clearInterval(a.current), a.current = null);
|
|
9793
9793
|
}, []);
|
|
9794
|
-
return f.useEffect(() => () => c(), [c]),
|
|
9794
|
+
return f.useEffect(() => () => c(), [c]), le(() => {
|
|
9795
9795
|
var u;
|
|
9796
9796
|
const d = i().find((l) => l.ref.current === document.activeElement);
|
|
9797
9797
|
(u = d == null ? void 0 : d.ref.current) == null || u.scrollIntoView({ block: "nearest" });
|
|
@@ -11501,9 +11501,9 @@ const Rc = {
|
|
|
11501
11501
|
return t && n ? "Dev + Staging" : t ? "Staging Mode" : "Dev Mode";
|
|
11502
11502
|
}, mb = (e) => e.mode === "staging" ? "STAGING" : "DEV", hb = ({ className: e = "", extensions: t = [], tokenErrors: n = /* @__PURE__ */ new Map() }) => {
|
|
11503
11503
|
const [o, r] = ie([]), [s, a] = ie(!1), [i, c] = ie(!1), [d, u] = ie(!1), l = lt(null), m = n.size > 0;
|
|
11504
|
-
if (
|
|
11504
|
+
if (ce(() => {
|
|
11505
11505
|
fb();
|
|
11506
|
-
}, []),
|
|
11506
|
+
}, []), ce(() => {
|
|
11507
11507
|
if (!m) return;
|
|
11508
11508
|
const b = () => {
|
|
11509
11509
|
u(!0), setTimeout(() => u(!1), 600);
|
|
@@ -11511,7 +11511,7 @@ const Rc = {
|
|
|
11511
11511
|
b();
|
|
11512
11512
|
const h = setInterval(b, 4e3);
|
|
11513
11513
|
return () => clearInterval(h);
|
|
11514
|
-
}, [m]),
|
|
11514
|
+
}, [m]), ce(() => {
|
|
11515
11515
|
if (typeof window > "u") return;
|
|
11516
11516
|
const b = () => {
|
|
11517
11517
|
const v = ps(window.location.search);
|
|
@@ -11758,7 +11758,7 @@ const Rc = {
|
|
|
11758
11758
|
customerName: i
|
|
11759
11759
|
}) => {
|
|
11760
11760
|
const [c, d] = ie([]), [u, l] = ie([]), [m, g] = ie(/* @__PURE__ */ new Map()), [b, h] = ie(/* @__PURE__ */ new Map()), [v, y] = ie(!1), [w, x] = ie({ authenticated: !1, user: null });
|
|
11761
|
-
|
|
11761
|
+
ce(() => {
|
|
11762
11762
|
(async () => {
|
|
11763
11763
|
const T = e;
|
|
11764
11764
|
try {
|
|
@@ -11783,13 +11783,13 @@ const Rc = {
|
|
|
11783
11783
|
y(!0);
|
|
11784
11784
|
}
|
|
11785
11785
|
})();
|
|
11786
|
-
}, [e, o, t]),
|
|
11786
|
+
}, [e, o, t]), ce(() => {
|
|
11787
11787
|
if (!t || !o || c.length === 0) return;
|
|
11788
11788
|
const T = setInterval(async () => {
|
|
11789
11789
|
const P = [];
|
|
11790
11790
|
await Promise.all(
|
|
11791
11791
|
c.filter((O) => O.manifest.permissions.includes("data:fetch")).map(async (O) => {
|
|
11792
|
-
const L = u.find((I) => I.extensionId === O.id), N = L == null ? void 0 : L.token, D = L == null ? void 0 : L.mode, z = Lt(t, "/proxy-token"),
|
|
11792
|
+
const L = u.find((I) => I.extensionId === O.id), N = L == null ? void 0 : L.token, D = L == null ? void 0 : L.mode, z = Lt(t, "/proxy-token"), q = await fetch(z, {
|
|
11793
11793
|
method: "POST",
|
|
11794
11794
|
headers: { "Content-Type": "application/json" },
|
|
11795
11795
|
body: JSON.stringify({
|
|
@@ -11799,11 +11799,11 @@ const Rc = {
|
|
|
11799
11799
|
...N && { devSessionToken: N }
|
|
11800
11800
|
})
|
|
11801
11801
|
});
|
|
11802
|
-
if (
|
|
11803
|
-
const { token: I, encryptionKey: ae } = await
|
|
11802
|
+
if (q.ok) {
|
|
11803
|
+
const { token: I, encryptionKey: ae } = await q.json();
|
|
11804
11804
|
P.push([O.id, { token: I, encryptionKey: ae }]);
|
|
11805
11805
|
} else
|
|
11806
|
-
console.warn(`[embeddables] Proxy token refresh failed for extension ${O.id} (${
|
|
11806
|
+
console.warn(`[embeddables] Proxy token refresh failed for extension ${O.id} (${q.status}) — using stale token`);
|
|
11807
11807
|
})
|
|
11808
11808
|
), P.length > 0 && g((O) => {
|
|
11809
11809
|
const L = new Map(O);
|
|
@@ -11813,7 +11813,7 @@ const Rc = {
|
|
|
11813
11813
|
});
|
|
11814
11814
|
}, 3300 * 1e3);
|
|
11815
11815
|
return () => clearInterval(T);
|
|
11816
|
-
}, [c, u, t, o]),
|
|
11816
|
+
}, [c, u, t, o]), ce(() => {
|
|
11817
11817
|
if (m.size === 0) return;
|
|
11818
11818
|
const A = (T) => {
|
|
11819
11819
|
const P = T.data;
|
|
@@ -11840,18 +11840,16 @@ const Rc = {
|
|
|
11840
11840
|
for (const [L, N] of T) {
|
|
11841
11841
|
if (!N.manifest.permissions.includes("identity:extend")) continue;
|
|
11842
11842
|
const D = new Promise((z) => {
|
|
11843
|
-
const
|
|
11844
|
-
|
|
11845
|
-
|
|
11846
|
-
(ce == null ? void 0 : ce.type) !== "capability-response" || ce.id !== K || (window.removeEventListener("message", I), ce.success && ((Y = ce.data) != null && Y.additionalClaims) ? z(ce.data.additionalClaims) : z({}));
|
|
11843
|
+
const q = `enrich_${L}_${Date.now()}`, I = (ae) => {
|
|
11844
|
+
const de = ae.data;
|
|
11845
|
+
(de == null ? void 0 : de.type) !== "identity-extend-response" || de.id !== q || (window.removeEventListener("message", I), de.additionalClaims ? z(de.additionalClaims) : z({}));
|
|
11847
11846
|
};
|
|
11848
11847
|
window.addEventListener("message", I), setTimeout(() => {
|
|
11849
11848
|
window.removeEventListener("message", I), z({});
|
|
11850
11849
|
}, 5e3), ct(L, {
|
|
11851
|
-
type: "
|
|
11852
|
-
id:
|
|
11853
|
-
|
|
11854
|
-
data: { type: "identity.extend", claims: A }
|
|
11850
|
+
type: "identity-extend-request",
|
|
11851
|
+
id: q,
|
|
11852
|
+
claims: A
|
|
11855
11853
|
});
|
|
11856
11854
|
});
|
|
11857
11855
|
P.push(D);
|
|
@@ -11899,7 +11897,7 @@ const Rc = {
|
|
|
11899
11897
|
console.log("[embeddables] Sign result:", { hasToken: !!N }), N && k(N);
|
|
11900
11898
|
})();
|
|
11901
11899
|
}, [R, E, k]);
|
|
11902
|
-
|
|
11900
|
+
ce(() => {
|
|
11903
11901
|
if (s) {
|
|
11904
11902
|
console.log("[embeddables] Identity from props:", { customerId: s, customerEmail: a, customerName: i });
|
|
11905
11903
|
const A = {
|
|
@@ -11920,7 +11918,7 @@ const Rc = {
|
|
|
11920
11918
|
return;
|
|
11921
11919
|
x((A) => A.authenticated ? (console.log("[embeddables] Customer props cleared, logging out"), C(), S("identity.logout", { authenticated: !1, user: null }), { authenticated: !1, user: null }) : A);
|
|
11922
11920
|
}
|
|
11923
|
-
}, [s, a, i, M, S, C]),
|
|
11921
|
+
}, [s, a, i, M, S, C]), ce(() => {
|
|
11924
11922
|
if (s !== void 0) return;
|
|
11925
11923
|
const A = () => {
|
|
11926
11924
|
const P = document.getElementById("stackable-identity");
|
|
@@ -11948,7 +11946,7 @@ const Rc = {
|
|
|
11948
11946
|
A();
|
|
11949
11947
|
const T = new MutationObserver(A);
|
|
11950
11948
|
return T.observe(document.head, { childList: !0, subtree: !0 }), T.observe(document.body, { childList: !0, subtree: !0 }), () => T.disconnect();
|
|
11951
|
-
}, [s, M, S, C]),
|
|
11949
|
+
}, [s, M, S, C]), ce(() => {
|
|
11952
11950
|
if (!w.authenticated) return;
|
|
11953
11951
|
const A = (T) => {
|
|
11954
11952
|
const P = T.data;
|
|
@@ -12121,7 +12119,7 @@ const Cb = ({ ...e }) => {
|
|
|
12121
12119
|
const [o, r] = ie(!1), [s, a] = ie(!0), i = Le(() => {
|
|
12122
12120
|
r((c) => !c);
|
|
12123
12121
|
}, []);
|
|
12124
|
-
return
|
|
12122
|
+
return ce(() => {
|
|
12125
12123
|
const c = () => r((g) => !g), d = () => r(!0), u = () => r(!1), l = () => a(!0), m = () => {
|
|
12126
12124
|
r(!1), a(!1);
|
|
12127
12125
|
};
|
|
@@ -12147,7 +12145,7 @@ const Cb = ({ ...e }) => {
|
|
|
12147
12145
|
}
|
|
12148
12146
|
), Nb = (e, t) => {
|
|
12149
12147
|
const [n, o] = ie(null), [r, s] = ie(!1), [a, i] = ie(null);
|
|
12150
|
-
return
|
|
12148
|
+
return ce(() => {
|
|
12151
12149
|
if (!e) {
|
|
12152
12150
|
o(null);
|
|
12153
12151
|
return;
|
|
@@ -12226,7 +12224,7 @@ const Cb = ({ ...e }) => {
|
|
|
12226
12224
|
] })
|
|
12227
12225
|
] }) }) });
|
|
12228
12226
|
}, Ic = (e, t) => {
|
|
12229
|
-
|
|
12227
|
+
ce(() => {
|
|
12230
12228
|
const n = t.current;
|
|
12231
12229
|
if (!n) return;
|
|
12232
12230
|
let o = document.getElementById(e);
|
|
@@ -12241,7 +12239,7 @@ const Cb = ({ ...e }) => {
|
|
|
12241
12239
|
}, [e, t]);
|
|
12242
12240
|
}, Pb = ({ customization: e }) => {
|
|
12243
12241
|
const t = lt(null);
|
|
12244
|
-
return Ic("widget_conversations", t),
|
|
12242
|
+
return Ic("widget_conversations", t), ce(() => {
|
|
12245
12243
|
!window.zE || !t.current || e && window.zE("messenger:set", "customization", {
|
|
12246
12244
|
conversationList: e
|
|
12247
12245
|
});
|
|
@@ -12254,7 +12252,7 @@ const Cb = ({ ...e }) => {
|
|
|
12254
12252
|
);
|
|
12255
12253
|
}, Ab = ({ customization: e }) => {
|
|
12256
12254
|
const t = lt(null);
|
|
12257
|
-
return Ic("widget_messages", t),
|
|
12255
|
+
return Ic("widget_messages", t), ce(() => {
|
|
12258
12256
|
!window.zE || !t.current || e && window.zE("messenger:set", "customization", {
|
|
12259
12257
|
messageLog: e
|
|
12260
12258
|
});
|
|
@@ -12285,7 +12283,7 @@ const Cb = ({ ...e }) => {
|
|
|
12285
12283
|
conversationList: { hideHeader: !0, hideNewConversationButton: !0 },
|
|
12286
12284
|
messageLog: { hideHeader: !0 }
|
|
12287
12285
|
}), !0), []);
|
|
12288
|
-
|
|
12286
|
+
ce(() => {
|
|
12289
12287
|
if (w()) {
|
|
12290
12288
|
b(!0);
|
|
12291
12289
|
return;
|
|
@@ -12303,9 +12301,9 @@ const Cb = ({ ...e }) => {
|
|
|
12303
12301
|
const { detail: k } = E;
|
|
12304
12302
|
!window.zE || !(k != null && k.payload) || window.zE("messenger:ui", "newConversation", k.payload);
|
|
12305
12303
|
}, []);
|
|
12306
|
-
|
|
12304
|
+
ce(() => (window.addEventListener("ext-action-newConversation", x), () => {
|
|
12307
12305
|
window.removeEventListener("ext-action-newConversation", x);
|
|
12308
|
-
}), [x]),
|
|
12306
|
+
}), [x]), ce(() => {
|
|
12309
12307
|
if (!h) return;
|
|
12310
12308
|
const E = (C) => {
|
|
12311
12309
|
if (!y.current) return;
|
|
@@ -12322,7 +12320,7 @@ const Cb = ({ ...e }) => {
|
|
|
12322
12320
|
return document.body.style.cursor = l ? "col-resize" : "row-resize", document.body.style.userSelect = "none", window.addEventListener("mousemove", E), window.addEventListener("mouseup", k), window.addEventListener("blur", k), () => {
|
|
12323
12321
|
window.removeEventListener("mousemove", E), window.removeEventListener("mouseup", k), window.removeEventListener("blur", k), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
12324
12322
|
};
|
|
12325
|
-
}, [h, l]),
|
|
12323
|
+
}, [h, l]), ce(() => {
|
|
12326
12324
|
if (!y.current) return;
|
|
12327
12325
|
const E = y.current, k = () => {
|
|
12328
12326
|
const M = getComputedStyle(E).flexDirection === "row";
|
|
@@ -12505,7 +12503,7 @@ const Cb = ({ ...e }) => {
|
|
|
12505
12503
|
const i = document.createElement("script");
|
|
12506
12504
|
i.id = o, i.src = is(e), i.async = !0, i.onload = () => s(), i.onerror = () => a(new Error("Failed to load Zendesk snippet")), document.head.appendChild(i);
|
|
12507
12505
|
});
|
|
12508
|
-
}, Hb = ({ config: e }) => (
|
|
12506
|
+
}, Hb = ({ config: e }) => (ce(() => {
|
|
12509
12507
|
e.snippetKey && Ib(e.snippetKey, { autorender: e.autorender }).catch((t) => {
|
|
12510
12508
|
console.error("Failed to initialize Zendesk snippet:", t);
|
|
12511
12509
|
});
|