commerce-toolkit 0.0.27 → 0.0.28
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/components/spinner/index.d.ts +2 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/components/spinner/spinner.d.ts +17 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +287 -266
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18,8 +18,8 @@ function je(e, t = []) {
|
|
|
18
18
|
const l = f.createContext(s), d = n.length;
|
|
19
19
|
n = [...n, s];
|
|
20
20
|
const u = (i) => {
|
|
21
|
-
const { scope: p, children: h, ...v } = i, g = p?.[e]?.[d] || l,
|
|
22
|
-
return /* @__PURE__ */ c(g.Provider, { value:
|
|
21
|
+
const { scope: p, children: h, ...v } = i, g = p?.[e]?.[d] || l, w = f.useMemo(() => v, Object.values(v));
|
|
22
|
+
return /* @__PURE__ */ c(g.Provider, { value: w, children: h });
|
|
23
23
|
};
|
|
24
24
|
u.displayName = a + "Provider";
|
|
25
25
|
function m(i, p) {
|
|
@@ -87,7 +87,7 @@ function ee(...e) {
|
|
|
87
87
|
// @__NO_SIDE_EFFECTS__
|
|
88
88
|
function Jt(e) {
|
|
89
89
|
const t = /* @__PURE__ */ bi(e), n = f.forwardRef((r, o) => {
|
|
90
|
-
const { children: a, ...s } = r, l = f.Children.toArray(a), d = l.find(
|
|
90
|
+
const { children: a, ...s } = r, l = f.Children.toArray(a), d = l.find(yi);
|
|
91
91
|
if (d) {
|
|
92
92
|
const u = d.props.children, m = l.map((i) => i === d ? f.Children.count(u) > 1 ? f.Children.only(null) : f.isValidElement(u) ? u.props.children : null : i);
|
|
93
93
|
return /* @__PURE__ */ c(t, { ...s, ref: o, children: f.isValidElement(u) ? f.cloneElement(u, void 0, m) : null });
|
|
@@ -108,9 +108,9 @@ function bi(e) {
|
|
|
108
108
|
});
|
|
109
109
|
return t.displayName = `${e}.SlotClone`, t;
|
|
110
110
|
}
|
|
111
|
-
var
|
|
112
|
-
function
|
|
113
|
-
return f.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
111
|
+
var wi = Symbol("radix.slottable");
|
|
112
|
+
function yi(e) {
|
|
113
|
+
return f.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === wi;
|
|
114
114
|
}
|
|
115
115
|
function xi(e, t) {
|
|
116
116
|
const n = { ...t };
|
|
@@ -132,34 +132,34 @@ function tr(e) {
|
|
|
132
132
|
t,
|
|
133
133
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
134
134
|
), s = (g) => {
|
|
135
|
-
const { scope:
|
|
136
|
-
return /* @__PURE__ */ c(o, { scope:
|
|
135
|
+
const { scope: w, children: b } = g, y = E.useRef(null), x = E.useRef(/* @__PURE__ */ new Map()).current;
|
|
136
|
+
return /* @__PURE__ */ c(o, { scope: w, itemMap: x, collectionRef: y, children: b });
|
|
137
137
|
};
|
|
138
138
|
s.displayName = t;
|
|
139
139
|
const l = e + "CollectionSlot", d = /* @__PURE__ */ Jt(l), u = E.forwardRef(
|
|
140
|
-
(g,
|
|
141
|
-
const { scope: b, children:
|
|
142
|
-
return /* @__PURE__ */ c(d, { ref: C, children:
|
|
140
|
+
(g, w) => {
|
|
141
|
+
const { scope: b, children: y } = g, x = a(l, b), C = ee(w, x.collectionRef);
|
|
142
|
+
return /* @__PURE__ */ c(d, { ref: C, children: y });
|
|
143
143
|
}
|
|
144
144
|
);
|
|
145
145
|
u.displayName = l;
|
|
146
146
|
const m = e + "CollectionItemSlot", i = "data-radix-collection-item", p = /* @__PURE__ */ Jt(m), h = E.forwardRef(
|
|
147
|
-
(g,
|
|
148
|
-
const { scope: b, children:
|
|
149
|
-
return E.useEffect(() => (M.itemMap.set(C, { ref: C, ...x }), () => void M.itemMap.delete(C))), /* @__PURE__ */ c(p, { [i]: "", ref: k, children:
|
|
147
|
+
(g, w) => {
|
|
148
|
+
const { scope: b, children: y, ...x } = g, C = E.useRef(null), k = ee(w, C), M = a(m, b);
|
|
149
|
+
return E.useEffect(() => (M.itemMap.set(C, { ref: C, ...x }), () => void M.itemMap.delete(C))), /* @__PURE__ */ c(p, { [i]: "", ref: k, children: y });
|
|
150
150
|
}
|
|
151
151
|
);
|
|
152
152
|
h.displayName = m;
|
|
153
153
|
function v(g) {
|
|
154
|
-
const
|
|
154
|
+
const w = a(e + "CollectionConsumer", g);
|
|
155
155
|
return E.useCallback(() => {
|
|
156
|
-
const
|
|
157
|
-
if (!
|
|
158
|
-
const x = Array.from(
|
|
159
|
-
return Array.from(
|
|
156
|
+
const y = w.collectionRef.current;
|
|
157
|
+
if (!y) return [];
|
|
158
|
+
const x = Array.from(y.querySelectorAll(`[${i}]`));
|
|
159
|
+
return Array.from(w.itemMap.values()).sort(
|
|
160
160
|
(M, A) => x.indexOf(M.ref.current) - x.indexOf(A.ref.current)
|
|
161
161
|
);
|
|
162
|
-
}, [
|
|
162
|
+
}, [w.collectionRef, w.itemMap]);
|
|
163
163
|
}
|
|
164
164
|
return [
|
|
165
165
|
{ Provider: s, Slot: u, ItemSlot: h },
|
|
@@ -286,9 +286,9 @@ function Pi(e) {
|
|
|
286
286
|
const m = t.ownerDocument.defaultView ?? window, i = (h) => {
|
|
287
287
|
const g = Bt(r.current).includes(CSS.escape(h.animationName));
|
|
288
288
|
if (h.target === t && g && (d("ANIMATION_END"), !o.current)) {
|
|
289
|
-
const
|
|
289
|
+
const w = t.style.animationFillMode;
|
|
290
290
|
t.style.animationFillMode = "forwards", u = m.setTimeout(() => {
|
|
291
|
-
t.style.animationFillMode === "forwards" && (t.style.animationFillMode =
|
|
291
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = w);
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
294
|
}, p = (h) => {
|
|
@@ -386,19 +386,19 @@ var rr = "CollapsibleContent", _o = f.forwardRef(
|
|
|
386
386
|
);
|
|
387
387
|
_o.displayName = rr;
|
|
388
388
|
var Oi = f.forwardRef((e, t) => {
|
|
389
|
-
const { __scopeCollapsible: n, present: r, children: o, ...a } = e, s = nr(rr, n), [l, d] = f.useState(r), u = f.useRef(null), m = ee(t, u), i = f.useRef(0), p = i.current, h = f.useRef(0), v = h.current, g = s.open || l,
|
|
389
|
+
const { __scopeCollapsible: n, present: r, children: o, ...a } = e, s = nr(rr, n), [l, d] = f.useState(r), u = f.useRef(null), m = ee(t, u), i = f.useRef(0), p = i.current, h = f.useRef(0), v = h.current, g = s.open || l, w = f.useRef(g), b = f.useRef(void 0);
|
|
390
390
|
return f.useEffect(() => {
|
|
391
|
-
const
|
|
392
|
-
return () => cancelAnimationFrame(
|
|
391
|
+
const y = requestAnimationFrame(() => w.current = !1);
|
|
392
|
+
return () => cancelAnimationFrame(y);
|
|
393
393
|
}, []), _e(() => {
|
|
394
|
-
const
|
|
395
|
-
if (
|
|
394
|
+
const y = u.current;
|
|
395
|
+
if (y) {
|
|
396
396
|
b.current = b.current || {
|
|
397
|
-
transitionDuration:
|
|
398
|
-
animationName:
|
|
399
|
-
},
|
|
400
|
-
const x =
|
|
401
|
-
i.current = x.height, h.current = x.width,
|
|
397
|
+
transitionDuration: y.style.transitionDuration,
|
|
398
|
+
animationName: y.style.animationName
|
|
399
|
+
}, y.style.transitionDuration = "0s", y.style.animationName = "none";
|
|
400
|
+
const x = y.getBoundingClientRect();
|
|
401
|
+
i.current = x.height, h.current = x.width, w.current || (y.style.transitionDuration = b.current.transitionDuration, y.style.animationName = b.current.animationName), d(r);
|
|
402
402
|
}
|
|
403
403
|
}, [s.open, r]), /* @__PURE__ */ c(
|
|
404
404
|
Q.div,
|
|
@@ -498,21 +498,21 @@ var [To, Hi] = mn(Ee), [Io, Vi] = mn(
|
|
|
498
498
|
(e, t) => {
|
|
499
499
|
const { __scopeAccordion: n, disabled: r, dir: o, orientation: a = "vertical", ...s } = e, l = E.useRef(null), d = ee(l, t), u = zi(n), i = fn(o) === "ltr", p = $(e.onKeyDown, (h) => {
|
|
500
500
|
if (!$i.includes(h.key)) return;
|
|
501
|
-
const v = h.target, g = u().filter((S) => !S.ref.current?.disabled),
|
|
502
|
-
if (
|
|
501
|
+
const v = h.target, g = u().filter((S) => !S.ref.current?.disabled), w = g.findIndex((S) => S.ref.current === v), b = g.length;
|
|
502
|
+
if (w === -1) return;
|
|
503
503
|
h.preventDefault();
|
|
504
|
-
let
|
|
504
|
+
let y = w;
|
|
505
505
|
const x = 0, C = b - 1, k = () => {
|
|
506
|
-
|
|
506
|
+
y = w + 1, y > C && (y = x);
|
|
507
507
|
}, M = () => {
|
|
508
|
-
|
|
508
|
+
y = w - 1, y < x && (y = C);
|
|
509
509
|
};
|
|
510
510
|
switch (h.key) {
|
|
511
511
|
case "Home":
|
|
512
|
-
|
|
512
|
+
y = x;
|
|
513
513
|
break;
|
|
514
514
|
case "End":
|
|
515
|
-
|
|
515
|
+
y = C;
|
|
516
516
|
break;
|
|
517
517
|
case "ArrowRight":
|
|
518
518
|
a === "horizontal" && (i ? k() : M());
|
|
@@ -527,7 +527,7 @@ var [To, Hi] = mn(Ee), [Io, Vi] = mn(
|
|
|
527
527
|
a === "vertical" && M();
|
|
528
528
|
break;
|
|
529
529
|
}
|
|
530
|
-
const A =
|
|
530
|
+
const A = y % b;
|
|
531
531
|
g[A].ref.current?.focus();
|
|
532
532
|
});
|
|
533
533
|
return /* @__PURE__ */ c(
|
|
@@ -833,9 +833,9 @@ const lr = "-", el = (e) => {
|
|
|
833
833
|
d = m + (d.length > 0 ? " " + d : d);
|
|
834
834
|
continue;
|
|
835
835
|
}
|
|
836
|
-
let
|
|
836
|
+
let w = !!g, b = r(w ? v.substring(0, g) : v);
|
|
837
837
|
if (!b) {
|
|
838
|
-
if (!
|
|
838
|
+
if (!w) {
|
|
839
839
|
d = m + (d.length > 0 ? " " + d : d);
|
|
840
840
|
continue;
|
|
841
841
|
}
|
|
@@ -843,13 +843,13 @@ const lr = "-", el = (e) => {
|
|
|
843
843
|
d = m + (d.length > 0 ? " " + d : d);
|
|
844
844
|
continue;
|
|
845
845
|
}
|
|
846
|
-
|
|
846
|
+
w = !1;
|
|
847
847
|
}
|
|
848
|
-
const
|
|
848
|
+
const y = a(p).join(":"), x = h ? y + Un : y, C = x + b;
|
|
849
849
|
if (s.includes(C))
|
|
850
850
|
continue;
|
|
851
851
|
s.push(C);
|
|
852
|
-
const k = o(b,
|
|
852
|
+
const k = o(b, w);
|
|
853
853
|
for (let M = 0; M < k.length; ++M) {
|
|
854
854
|
const A = k[M];
|
|
855
855
|
s.push(x + A);
|
|
@@ -892,19 +892,19 @@ function ml(e, ...t) {
|
|
|
892
892
|
const ne = (e) => {
|
|
893
893
|
const t = (n) => n[e] || [];
|
|
894
894
|
return t.isThemeGetter = !0, t;
|
|
895
|
-
}, jo = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Go = /^\((?:(\w[\w-]*):)?(.+)\)$/i, pl = /^\d+\/\d+$/, hl = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, gl = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, vl = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, bl = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,
|
|
895
|
+
}, jo = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Go = /^\((?:(\w[\w-]*):)?(.+)\)$/i, pl = /^\d+\/\d+$/, hl = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, gl = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, vl = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, bl = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, wl = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, st = (e) => pl.test(e), H = (e) => !!e && !Number.isNaN(Number(e)), ze = (e) => !!e && Number.isInteger(Number(e)), Mn = (e) => e.endsWith("%") && H(e.slice(0, -1)), Le = (e) => hl.test(e), yl = () => !0, xl = (e) => (
|
|
896
896
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
897
897
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
898
898
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
899
899
|
gl.test(e) && !vl.test(e)
|
|
900
|
-
), Yo = () => !1, Cl = (e) => bl.test(e), Sl = (e) =>
|
|
900
|
+
), Yo = () => !1, Cl = (e) => bl.test(e), Sl = (e) => wl.test(e), El = (e) => !T(e) && !I(e), Rl = (e) => gt(e, qo, Yo), T = (e) => jo.test(e), Ke = (e) => gt(e, Zo, xl), _n = (e) => gt(e, _l, H), Ur = (e) => gt(e, Ko, Yo), kl = (e) => gt(e, Xo, Sl), $t = (e) => gt(e, Qo, Cl), I = (e) => Go.test(e), Ct = (e) => vt(e, Zo), Al = (e) => vt(e, Nl), jr = (e) => vt(e, Ko), Pl = (e) => vt(e, qo), Ml = (e) => vt(e, Xo), zt = (e) => vt(e, Qo, !0), gt = (e, t, n) => {
|
|
901
901
|
const r = jo.exec(e);
|
|
902
902
|
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
|
|
903
903
|
}, vt = (e, t, n = !1) => {
|
|
904
904
|
const r = Go.exec(e);
|
|
905
905
|
return r ? r[1] ? t(r[1]) : n : !1;
|
|
906
906
|
}, Ko = (e) => e === "position" || e === "percentage", Xo = (e) => e === "image" || e === "url", qo = (e) => e === "length" || e === "size" || e === "bg-size", Zo = (e) => e === "length", _l = (e) => e === "number", Nl = (e) => e === "family-name", Qo = (e) => e === "shadow", Tl = () => {
|
|
907
|
-
const e = ne("color"), t = ne("font"), n = ne("text"), r = ne("font-weight"), o = ne("tracking"), a = ne("leading"), s = ne("breakpoint"), l = ne("container"), d = ne("spacing"), u = ne("radius"), m = ne("shadow"), i = ne("inset-shadow"), p = ne("text-shadow"), h = ne("drop-shadow"), v = ne("blur"), g = ne("perspective"),
|
|
907
|
+
const e = ne("color"), t = ne("font"), n = ne("text"), r = ne("font-weight"), o = ne("tracking"), a = ne("leading"), s = ne("breakpoint"), l = ne("container"), d = ne("spacing"), u = ne("radius"), m = ne("shadow"), i = ne("inset-shadow"), p = ne("text-shadow"), h = ne("drop-shadow"), v = ne("blur"), g = ne("perspective"), w = ne("aspect"), b = ne("ease"), y = ne("animate"), x = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], C = () => [
|
|
908
908
|
"center",
|
|
909
909
|
"top",
|
|
910
910
|
"bottom",
|
|
@@ -945,7 +945,7 @@ const ne = (e) => {
|
|
|
945
945
|
v,
|
|
946
946
|
I,
|
|
947
947
|
T
|
|
948
|
-
], de = () => ["none", H, I, T],
|
|
948
|
+
], de = () => ["none", H, I, T], we = () => ["none", H, I, T], Re = () => [H, I, T], ue = () => [st, "full", ...S()];
|
|
949
949
|
return {
|
|
950
950
|
cacheSize: 500,
|
|
951
951
|
theme: {
|
|
@@ -953,7 +953,7 @@ const ne = (e) => {
|
|
|
953
953
|
aspect: ["video"],
|
|
954
954
|
blur: [Le],
|
|
955
955
|
breakpoint: [Le],
|
|
956
|
-
color: [
|
|
956
|
+
color: [yl],
|
|
957
957
|
container: [Le],
|
|
958
958
|
"drop-shadow": [Le],
|
|
959
959
|
ease: ["in", "out", "in-out"],
|
|
@@ -978,7 +978,7 @@ const ne = (e) => {
|
|
|
978
978
|
* @see https://tailwindcss.com/docs/aspect-ratio
|
|
979
979
|
*/
|
|
980
980
|
aspect: [{
|
|
981
|
-
aspect: ["auto", "square", st, T, I,
|
|
981
|
+
aspect: ["auto", "square", st, T, I, w]
|
|
982
982
|
}],
|
|
983
983
|
/**
|
|
984
984
|
* Container
|
|
@@ -2861,7 +2861,7 @@ const ne = (e) => {
|
|
|
2861
2861
|
* @see https://tailwindcss.com/docs/animation
|
|
2862
2862
|
*/
|
|
2863
2863
|
animate: [{
|
|
2864
|
-
animate: ["none",
|
|
2864
|
+
animate: ["none", y, I, T]
|
|
2865
2865
|
}],
|
|
2866
2866
|
// ------------------
|
|
2867
2867
|
// --- Transforms ---
|
|
@@ -2920,28 +2920,28 @@ const ne = (e) => {
|
|
|
2920
2920
|
* @see https://tailwindcss.com/docs/scale
|
|
2921
2921
|
*/
|
|
2922
2922
|
scale: [{
|
|
2923
|
-
scale:
|
|
2923
|
+
scale: we()
|
|
2924
2924
|
}],
|
|
2925
2925
|
/**
|
|
2926
2926
|
* Scale X
|
|
2927
2927
|
* @see https://tailwindcss.com/docs/scale
|
|
2928
2928
|
*/
|
|
2929
2929
|
"scale-x": [{
|
|
2930
|
-
"scale-x":
|
|
2930
|
+
"scale-x": we()
|
|
2931
2931
|
}],
|
|
2932
2932
|
/**
|
|
2933
2933
|
* Scale Y
|
|
2934
2934
|
* @see https://tailwindcss.com/docs/scale
|
|
2935
2935
|
*/
|
|
2936
2936
|
"scale-y": [{
|
|
2937
|
-
"scale-y":
|
|
2937
|
+
"scale-y": we()
|
|
2938
2938
|
}],
|
|
2939
2939
|
/**
|
|
2940
2940
|
* Scale Z
|
|
2941
2941
|
* @see https://tailwindcss.com/docs/scale
|
|
2942
2942
|
*/
|
|
2943
2943
|
"scale-z": [{
|
|
2944
|
-
"scale-z":
|
|
2944
|
+
"scale-z": we()
|
|
2945
2945
|
}],
|
|
2946
2946
|
/**
|
|
2947
2947
|
* Scale 3D
|
|
@@ -4071,12 +4071,12 @@ function bc({ children: e, className: t, ...n }) {
|
|
|
4071
4071
|
}
|
|
4072
4072
|
);
|
|
4073
4073
|
}
|
|
4074
|
-
var
|
|
4075
|
-
function
|
|
4074
|
+
var wc = Symbol.for("react.lazy"), tn = f[" use ".trim().toString()];
|
|
4075
|
+
function yc(e) {
|
|
4076
4076
|
return typeof e == "object" && e !== null && "then" in e;
|
|
4077
4077
|
}
|
|
4078
4078
|
function aa(e) {
|
|
4079
|
-
return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof ===
|
|
4079
|
+
return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === wc && "_payload" in e && yc(e._payload);
|
|
4080
4080
|
}
|
|
4081
4081
|
// @__NO_SIDE_EFFECTS__
|
|
4082
4082
|
function xc(e) {
|
|
@@ -4370,7 +4370,7 @@ function Dc({
|
|
|
4370
4370
|
function bh({ className: e, ...t }) {
|
|
4371
4371
|
return /* @__PURE__ */ c("div", { className: P("@container", e), ...t, children: /* @__PURE__ */ c(sa, {}) });
|
|
4372
4372
|
}
|
|
4373
|
-
function
|
|
4373
|
+
function wh({ className: e, children: t, removeLabel: n = "Remove", ...r }) {
|
|
4374
4374
|
return /* @__PURE__ */ Z(Lc, { className: e, children: [
|
|
4375
4375
|
t,
|
|
4376
4376
|
/* @__PURE__ */ c(Fc, { title: n, ...r })
|
|
@@ -4402,7 +4402,7 @@ function Fc({ className: e, ...t }) {
|
|
|
4402
4402
|
}
|
|
4403
4403
|
);
|
|
4404
4404
|
}
|
|
4405
|
-
function
|
|
4405
|
+
function yh({
|
|
4406
4406
|
className: e,
|
|
4407
4407
|
items: t,
|
|
4408
4408
|
trigger: n,
|
|
@@ -4458,7 +4458,7 @@ var $c = "DismissableLayer", Gn = "dismissableLayer.update", zc = "dismissableLa
|
|
|
4458
4458
|
onInteractOutside: s,
|
|
4459
4459
|
onDismiss: l,
|
|
4460
4460
|
...d
|
|
4461
|
-
} = e, u = f.useContext(ia), [m, i] = f.useState(null), p = m?.ownerDocument ?? globalThis?.document, [, h] = f.useState({}), v = ee(t, (A) => i(A)), g = Array.from(u.layers), [
|
|
4461
|
+
} = e, u = f.useContext(ia), [m, i] = f.useState(null), p = m?.ownerDocument ?? globalThis?.document, [, h] = f.useState({}), v = ee(t, (A) => i(A)), g = Array.from(u.layers), [w] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), b = g.indexOf(w), y = m ? g.indexOf(m) : -1, x = u.layersWithOutsidePointerEventsDisabled.size > 0, C = y >= b, k = Uc((A) => {
|
|
4462
4462
|
const S = A.target, O = [...u.branches].some((L) => L.contains(S));
|
|
4463
4463
|
!C || O || (o?.(A), s?.(A), A.defaultPrevented || l?.());
|
|
4464
4464
|
}, p), M = jc((A) => {
|
|
@@ -4466,7 +4466,7 @@ var $c = "DismissableLayer", Gn = "dismissableLayer.update", zc = "dismissableLa
|
|
|
4466
4466
|
[...u.branches].some((L) => L.contains(S)) || (a?.(A), s?.(A), A.defaultPrevented || l?.());
|
|
4467
4467
|
}, p);
|
|
4468
4468
|
return Bc((A) => {
|
|
4469
|
-
|
|
4469
|
+
y === u.layers.size - 1 && (r?.(A), !A.defaultPrevented && l && (A.preventDefault(), l()));
|
|
4470
4470
|
}, p), f.useEffect(() => {
|
|
4471
4471
|
if (m)
|
|
4472
4472
|
return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (Yr = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(m)), u.layers.add(m), Kr(), () => {
|
|
@@ -4595,7 +4595,7 @@ var Tn = "focusScope.autoFocusOnMount", In = "focusScope.autoFocusOnUnmount", qr
|
|
|
4595
4595
|
if (h.paused || !l) return;
|
|
4596
4596
|
const C = x.target;
|
|
4597
4597
|
l.contains(C) ? i.current = C : He(i.current, { select: !0 });
|
|
4598
|
-
},
|
|
4598
|
+
}, w = function(x) {
|
|
4599
4599
|
if (h.paused || !l) return;
|
|
4600
4600
|
const C = x.relatedTarget;
|
|
4601
4601
|
C !== null && (l.contains(C) || He(i.current, { select: !0 }));
|
|
@@ -4604,10 +4604,10 @@ var Tn = "focusScope.autoFocusOnMount", In = "focusScope.autoFocusOnUnmount", qr
|
|
|
4604
4604
|
for (const k of x)
|
|
4605
4605
|
k.removedNodes.length > 0 && He(l);
|
|
4606
4606
|
};
|
|
4607
|
-
document.addEventListener("focusin", g), document.addEventListener("focusout",
|
|
4608
|
-
const
|
|
4609
|
-
return l &&
|
|
4610
|
-
document.removeEventListener("focusin", g), document.removeEventListener("focusout",
|
|
4607
|
+
document.addEventListener("focusin", g), document.addEventListener("focusout", w);
|
|
4608
|
+
const y = new MutationObserver(b);
|
|
4609
|
+
return l && y.observe(l, { childList: !0, subtree: !0 }), () => {
|
|
4610
|
+
document.removeEventListener("focusin", g), document.removeEventListener("focusout", w), y.disconnect();
|
|
4611
4611
|
};
|
|
4612
4612
|
}
|
|
4613
4613
|
}, [r, l, h.paused]), f.useEffect(() => {
|
|
@@ -4629,10 +4629,10 @@ var Tn = "focusScope.autoFocusOnMount", In = "focusScope.autoFocusOnUnmount", qr
|
|
|
4629
4629
|
const v = f.useCallback(
|
|
4630
4630
|
(g) => {
|
|
4631
4631
|
if (!n && !r || h.paused) return;
|
|
4632
|
-
const
|
|
4633
|
-
if (
|
|
4634
|
-
const
|
|
4635
|
-
x && C ? !g.shiftKey && b === C ? (g.preventDefault(), n && He(x, { select: !0 })) : g.shiftKey && b === x && (g.preventDefault(), n && He(C, { select: !0 })) : b ===
|
|
4632
|
+
const w = g.key === "Tab" && !g.altKey && !g.ctrlKey && !g.metaKey, b = document.activeElement;
|
|
4633
|
+
if (w && b) {
|
|
4634
|
+
const y = g.currentTarget, [x, C] = Xc(y);
|
|
4635
|
+
x && C ? !g.shiftKey && b === C ? (g.preventDefault(), n && He(x, { select: !0 })) : g.shiftKey && b === x && (g.preventDefault(), n && He(C, { select: !0 })) : b === y && g.preventDefault();
|
|
4636
4636
|
}
|
|
4637
4637
|
},
|
|
4638
4638
|
[n, r, h.paused]
|
|
@@ -4722,7 +4722,7 @@ function Fe(e, t) {
|
|
|
4722
4722
|
function Be(e) {
|
|
4723
4723
|
return e.split("-")[0];
|
|
4724
4724
|
}
|
|
4725
|
-
function
|
|
4725
|
+
function wt(e) {
|
|
4726
4726
|
return e.split("-")[1];
|
|
4727
4727
|
}
|
|
4728
4728
|
function ur(e) {
|
|
@@ -4740,7 +4740,7 @@ function mr(e) {
|
|
|
4740
4740
|
}
|
|
4741
4741
|
function od(e, t, n) {
|
|
4742
4742
|
n === void 0 && (n = !1);
|
|
4743
|
-
const r =
|
|
4743
|
+
const r = wt(e), o = mr(e), a = fr(o);
|
|
4744
4744
|
let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
4745
4745
|
return t.reference[a] > t.floating[a] && (s = rn(s)), [s, rn(s)];
|
|
4746
4746
|
}
|
|
@@ -4765,7 +4765,7 @@ function ld(e, t, n) {
|
|
|
4765
4765
|
}
|
|
4766
4766
|
}
|
|
4767
4767
|
function cd(e, t, n, r) {
|
|
4768
|
-
const o =
|
|
4768
|
+
const o = wt(e);
|
|
4769
4769
|
let a = ld(Be(e), n === "start", r);
|
|
4770
4770
|
return o && (a = a.map((s) => s + "-" + o), t && (a = a.concat(a.map(Kn)))), a;
|
|
4771
4771
|
}
|
|
@@ -4845,7 +4845,7 @@ function no(e, t, n) {
|
|
|
4845
4845
|
y: r.y
|
|
4846
4846
|
};
|
|
4847
4847
|
}
|
|
4848
|
-
switch (
|
|
4848
|
+
switch (wt(t)) {
|
|
4849
4849
|
case "start":
|
|
4850
4850
|
h[s] -= p * (n && u ? -1 : 1);
|
|
4851
4851
|
break;
|
|
@@ -4872,10 +4872,10 @@ const ud = async (e, t, n) => {
|
|
|
4872
4872
|
} = no(u, r, d), p = r, h = {}, v = 0;
|
|
4873
4873
|
for (let g = 0; g < l.length; g++) {
|
|
4874
4874
|
const {
|
|
4875
|
-
name:
|
|
4875
|
+
name: w,
|
|
4876
4876
|
fn: b
|
|
4877
4877
|
} = l[g], {
|
|
4878
|
-
x:
|
|
4878
|
+
x: y,
|
|
4879
4879
|
y: x,
|
|
4880
4880
|
data: C,
|
|
4881
4881
|
reset: k
|
|
@@ -4893,10 +4893,10 @@ const ud = async (e, t, n) => {
|
|
|
4893
4893
|
floating: t
|
|
4894
4894
|
}
|
|
4895
4895
|
});
|
|
4896
|
-
m =
|
|
4896
|
+
m = y ?? m, i = x ?? i, h = {
|
|
4897
4897
|
...h,
|
|
4898
|
-
[
|
|
4899
|
-
...h[
|
|
4898
|
+
[w]: {
|
|
4899
|
+
...h[w],
|
|
4900
4900
|
...C
|
|
4901
4901
|
}
|
|
4902
4902
|
}, k && v <= 50 && (v++, typeof k == "object" && (k.placement && (p = k.placement), k.rects && (u = k.rects === !0 ? await s.getElementRects({
|
|
@@ -4932,12 +4932,12 @@ async function Rt(e, t) {
|
|
|
4932
4932
|
elementContext: i = "floating",
|
|
4933
4933
|
altBoundary: p = !1,
|
|
4934
4934
|
padding: h = 0
|
|
4935
|
-
} = Fe(t, e), v = fa(h),
|
|
4936
|
-
element: (n = await (a.isElement == null ? void 0 : a.isElement(
|
|
4935
|
+
} = Fe(t, e), v = fa(h), w = l[p ? i === "floating" ? "reference" : "floating" : i], b = on(await a.getClippingRect({
|
|
4936
|
+
element: (n = await (a.isElement == null ? void 0 : a.isElement(w))) == null || n ? w : w.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(l.floating)),
|
|
4937
4937
|
boundary: u,
|
|
4938
4938
|
rootBoundary: m,
|
|
4939
4939
|
strategy: d
|
|
4940
|
-
})),
|
|
4940
|
+
})), y = i === "floating" ? {
|
|
4941
4941
|
x: r,
|
|
4942
4942
|
y: o,
|
|
4943
4943
|
width: s.floating.width,
|
|
@@ -4950,10 +4950,10 @@ async function Rt(e, t) {
|
|
|
4950
4950
|
y: 1
|
|
4951
4951
|
}, k = on(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
4952
4952
|
elements: l,
|
|
4953
|
-
rect:
|
|
4953
|
+
rect: y,
|
|
4954
4954
|
offsetParent: x,
|
|
4955
4955
|
strategy: d
|
|
4956
|
-
}) :
|
|
4956
|
+
}) : y);
|
|
4957
4957
|
return {
|
|
4958
4958
|
top: (b.top - k.top + v.top) / C.y,
|
|
4959
4959
|
bottom: (k.bottom - b.bottom + v.bottom) / C.y,
|
|
@@ -4982,10 +4982,10 @@ const fd = (e) => ({
|
|
|
4982
4982
|
const i = fa(m), p = {
|
|
4983
4983
|
x: n,
|
|
4984
4984
|
y: r
|
|
4985
|
-
}, h = mr(o), v = fr(h), g = await s.getDimensions(u),
|
|
4985
|
+
}, h = mr(o), v = fr(h), g = await s.getDimensions(u), w = h === "y", b = w ? "top" : "left", y = w ? "bottom" : "right", x = w ? "clientHeight" : "clientWidth", C = a.reference[v] + a.reference[h] - p[h] - a.floating[v], k = p[h] - a.reference[h], M = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
|
|
4986
4986
|
let A = M ? M[x] : 0;
|
|
4987
4987
|
(!A || !await (s.isElement == null ? void 0 : s.isElement(M))) && (A = l.floating[x] || a.floating[v]);
|
|
4988
|
-
const S = C / 2 - k / 2, O = A / 2 - g[v] / 2 - 1, L = Ve(i[b], O), U = Ve(i[
|
|
4988
|
+
const S = C / 2 - k / 2, O = A / 2 - g[v] / 2 - 1, L = Ve(i[b], O), U = Ve(i[y], O), G = L, V = A - g[v] - U, j = A / 2 - g[v] / 2 + S, q = Yn(G, j, V), N = !d.arrow && wt(o) != null && j !== q && a.reference[v] / 2 - (j < G ? L : U) - g[v] / 2 < 0, F = N ? j < G ? j - G : j - V : 0;
|
|
4989
4989
|
return {
|
|
4990
4990
|
[h]: p[h] + F,
|
|
4991
4991
|
data: {
|
|
@@ -5018,13 +5018,13 @@ const fd = (e) => ({
|
|
|
5018
5018
|
fallbackStrategy: h = "bestFit",
|
|
5019
5019
|
fallbackAxisSideDirection: v = "none",
|
|
5020
5020
|
flipAlignment: g = !0,
|
|
5021
|
-
...
|
|
5021
|
+
...w
|
|
5022
5022
|
} = Fe(e, t);
|
|
5023
5023
|
if ((n = a.arrow) != null && n.alignmentOffset)
|
|
5024
5024
|
return {};
|
|
5025
|
-
const b = Be(o),
|
|
5025
|
+
const b = Be(o), y = Pe(l), x = Be(l) === l, C = await (d.isRTL == null ? void 0 : d.isRTL(u.floating)), k = p || (x || !g ? [rn(l)] : ad(l)), M = v !== "none";
|
|
5026
5026
|
!p && M && k.push(...cd(l, g, v, C));
|
|
5027
|
-
const A = [l, ...k], S = await Rt(t,
|
|
5027
|
+
const A = [l, ...k], S = await Rt(t, w), O = [];
|
|
5028
5028
|
let L = ((r = a.flip) == null ? void 0 : r.overflows) || [];
|
|
5029
5029
|
if (m && O.push(S[b]), i) {
|
|
5030
5030
|
const j = od(o, s, C);
|
|
@@ -5036,9 +5036,9 @@ const fd = (e) => ({
|
|
|
5036
5036
|
}], !O.every((j) => j <= 0)) {
|
|
5037
5037
|
var U, G;
|
|
5038
5038
|
const j = (((U = a.flip) == null ? void 0 : U.index) || 0) + 1, q = A[j];
|
|
5039
|
-
if (q && (!(i === "alignment" ?
|
|
5039
|
+
if (q && (!(i === "alignment" ? y !== Pe(q) : !1) || // We leave the current main axis only if every placement on that axis
|
|
5040
5040
|
// overflows the main axis.
|
|
5041
|
-
L.every((R) => Pe(R.placement) ===
|
|
5041
|
+
L.every((R) => Pe(R.placement) === y ? R.overflows[0] > 0 : !0)))
|
|
5042
5042
|
return {
|
|
5043
5043
|
data: {
|
|
5044
5044
|
index: j,
|
|
@@ -5056,7 +5056,7 @@ const fd = (e) => ({
|
|
|
5056
5056
|
const F = (V = L.filter((R) => {
|
|
5057
5057
|
if (M) {
|
|
5058
5058
|
const _ = Pe(R.placement);
|
|
5059
|
-
return _ ===
|
|
5059
|
+
return _ === y || // Create a bias to the `y` side axis due to horizontal
|
|
5060
5060
|
// reading directions favoring greater width.
|
|
5061
5061
|
_ === "y";
|
|
5062
5062
|
}
|
|
@@ -5138,7 +5138,7 @@ async function hd(e, t) {
|
|
|
5138
5138
|
placement: n,
|
|
5139
5139
|
platform: r,
|
|
5140
5140
|
elements: o
|
|
5141
|
-
} = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = Be(n), l =
|
|
5141
|
+
} = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = Be(n), l = wt(n), d = Pe(n) === "y", u = ma.has(s) ? -1 : 1, m = a && d ? -1 : 1, i = Fe(t, e);
|
|
5142
5142
|
let {
|
|
5143
5143
|
mainAxis: p,
|
|
5144
5144
|
crossAxis: h,
|
|
@@ -5195,14 +5195,14 @@ const gd = function(e) {
|
|
|
5195
5195
|
mainAxis: a = !0,
|
|
5196
5196
|
crossAxis: s = !1,
|
|
5197
5197
|
limiter: l = {
|
|
5198
|
-
fn: (
|
|
5198
|
+
fn: (w) => {
|
|
5199
5199
|
let {
|
|
5200
5200
|
x: b,
|
|
5201
|
-
y
|
|
5202
|
-
} =
|
|
5201
|
+
y
|
|
5202
|
+
} = w;
|
|
5203
5203
|
return {
|
|
5204
5204
|
x: b,
|
|
5205
|
-
y
|
|
5205
|
+
y
|
|
5206
5206
|
};
|
|
5207
5207
|
}
|
|
5208
5208
|
},
|
|
@@ -5213,12 +5213,12 @@ const gd = function(e) {
|
|
|
5213
5213
|
}, m = await Rt(t, d), i = Pe(Be(o)), p = ur(i);
|
|
5214
5214
|
let h = u[p], v = u[i];
|
|
5215
5215
|
if (a) {
|
|
5216
|
-
const
|
|
5217
|
-
h = Yn(
|
|
5216
|
+
const w = p === "y" ? "top" : "left", b = p === "y" ? "bottom" : "right", y = h + m[w], x = h - m[b];
|
|
5217
|
+
h = Yn(y, h, x);
|
|
5218
5218
|
}
|
|
5219
5219
|
if (s) {
|
|
5220
|
-
const
|
|
5221
|
-
v = Yn(
|
|
5220
|
+
const w = i === "y" ? "top" : "left", b = i === "y" ? "bottom" : "right", y = v + m[w], x = v - m[b];
|
|
5221
|
+
v = Yn(y, v, x);
|
|
5222
5222
|
}
|
|
5223
5223
|
const g = l.fn({
|
|
5224
5224
|
...t,
|
|
@@ -5257,7 +5257,7 @@ const gd = function(e) {
|
|
|
5257
5257
|
y: r
|
|
5258
5258
|
}, i = Pe(o), p = ur(i);
|
|
5259
5259
|
let h = m[p], v = m[i];
|
|
5260
|
-
const g = Fe(l, t),
|
|
5260
|
+
const g = Fe(l, t), w = typeof g == "number" ? {
|
|
5261
5261
|
mainAxis: g,
|
|
5262
5262
|
crossAxis: 0
|
|
5263
5263
|
} : {
|
|
@@ -5266,12 +5266,12 @@ const gd = function(e) {
|
|
|
5266
5266
|
...g
|
|
5267
5267
|
};
|
|
5268
5268
|
if (d) {
|
|
5269
|
-
const x = p === "y" ? "height" : "width", C = a.reference[p] - a.floating[x] +
|
|
5269
|
+
const x = p === "y" ? "height" : "width", C = a.reference[p] - a.floating[x] + w.mainAxis, k = a.reference[p] + a.reference[x] - w.mainAxis;
|
|
5270
5270
|
h < C ? h = C : h > k && (h = k);
|
|
5271
5271
|
}
|
|
5272
5272
|
if (u) {
|
|
5273
|
-
var b,
|
|
5274
|
-
const x = p === "y" ? "width" : "height", C = ma.has(Be(o)), k = a.reference[i] - a.floating[x] + (C && ((b = s.offset) == null ? void 0 : b[i]) || 0) + (C ? 0 :
|
|
5273
|
+
var b, y;
|
|
5274
|
+
const x = p === "y" ? "width" : "height", C = ma.has(Be(o)), k = a.reference[i] - a.floating[x] + (C && ((b = s.offset) == null ? void 0 : b[i]) || 0) + (C ? 0 : w.crossAxis), M = a.reference[i] + a.reference[x] + (C ? 0 : ((y = s.offset) == null ? void 0 : y[i]) || 0) - (C ? w.crossAxis : 0);
|
|
5275
5275
|
v < k ? v = k : v > M && (v = M);
|
|
5276
5276
|
}
|
|
5277
5277
|
return {
|
|
@@ -5280,7 +5280,7 @@ const gd = function(e) {
|
|
|
5280
5280
|
};
|
|
5281
5281
|
}
|
|
5282
5282
|
};
|
|
5283
|
-
},
|
|
5283
|
+
}, wd = function(e) {
|
|
5284
5284
|
return e === void 0 && (e = {}), {
|
|
5285
5285
|
name: "size",
|
|
5286
5286
|
options: e,
|
|
@@ -5295,15 +5295,15 @@ const gd = function(e) {
|
|
|
5295
5295
|
apply: d = () => {
|
|
5296
5296
|
},
|
|
5297
5297
|
...u
|
|
5298
|
-
} = Fe(e, t), m = await Rt(t, u), i = Be(o), p =
|
|
5298
|
+
} = Fe(e, t), m = await Rt(t, u), i = Be(o), p = wt(o), h = Pe(o) === "y", {
|
|
5299
5299
|
width: v,
|
|
5300
5300
|
height: g
|
|
5301
5301
|
} = a.floating;
|
|
5302
|
-
let
|
|
5303
|
-
i === "top" || i === "bottom" ? (
|
|
5304
|
-
const
|
|
5302
|
+
let w, b;
|
|
5303
|
+
i === "top" || i === "bottom" ? (w = i, b = p === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (b = i, w = p === "end" ? "top" : "bottom");
|
|
5304
|
+
const y = g - m.top - m.bottom, x = v - m.left - m.right, C = Ve(g - m[w], y), k = Ve(v - m[b], x), M = !t.middlewareData.shift;
|
|
5305
5305
|
let A = C, S = k;
|
|
5306
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (S = x), (r = t.middlewareData.shift) != null && r.enabled.y && (A =
|
|
5306
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (S = x), (r = t.middlewareData.shift) != null && r.enabled.y && (A = y), M && !p) {
|
|
5307
5307
|
const L = pe(m.left, 0), U = pe(m.right, 0), G = pe(m.top, 0), V = pe(m.bottom, 0);
|
|
5308
5308
|
h ? S = v - 2 * (L !== 0 || U !== 0 ? L + U : pe(m.left, m.right)) : A = g - 2 * (G !== 0 || V !== 0 ? G + V : pe(m.top, m.bottom));
|
|
5309
5309
|
}
|
|
@@ -5324,7 +5324,7 @@ const gd = function(e) {
|
|
|
5324
5324
|
function vn() {
|
|
5325
5325
|
return typeof window < "u";
|
|
5326
5326
|
}
|
|
5327
|
-
function
|
|
5327
|
+
function yt(e) {
|
|
5328
5328
|
return pa(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
5329
5329
|
}
|
|
5330
5330
|
function he(e) {
|
|
@@ -5347,7 +5347,7 @@ function Ne(e) {
|
|
|
5347
5347
|
function ao(e) {
|
|
5348
5348
|
return !vn() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof he(e).ShadowRoot;
|
|
5349
5349
|
}
|
|
5350
|
-
const
|
|
5350
|
+
const yd = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
5351
5351
|
function _t(e) {
|
|
5352
5352
|
const {
|
|
5353
5353
|
overflow: t,
|
|
@@ -5355,11 +5355,11 @@ function _t(e) {
|
|
|
5355
5355
|
overflowY: r,
|
|
5356
5356
|
display: o
|
|
5357
5357
|
} = Se(e);
|
|
5358
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !
|
|
5358
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !yd.has(o);
|
|
5359
5359
|
}
|
|
5360
5360
|
const xd = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
5361
5361
|
function Cd(e) {
|
|
5362
|
-
return xd.has(
|
|
5362
|
+
return xd.has(yt(e));
|
|
5363
5363
|
}
|
|
5364
5364
|
const Sd = [":popover-open", ":modal"];
|
|
5365
5365
|
function bn(e) {
|
|
@@ -5392,12 +5392,12 @@ function hr() {
|
|
|
5392
5392
|
}
|
|
5393
5393
|
const Pd = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
5394
5394
|
function mt(e) {
|
|
5395
|
-
return Pd.has(
|
|
5395
|
+
return Pd.has(yt(e));
|
|
5396
5396
|
}
|
|
5397
5397
|
function Se(e) {
|
|
5398
5398
|
return he(e).getComputedStyle(e);
|
|
5399
5399
|
}
|
|
5400
|
-
function
|
|
5400
|
+
function wn(e) {
|
|
5401
5401
|
return Ce(e) ? {
|
|
5402
5402
|
scrollLeft: e.scrollLeft,
|
|
5403
5403
|
scrollTop: e.scrollTop
|
|
@@ -5407,7 +5407,7 @@ function yn(e) {
|
|
|
5407
5407
|
};
|
|
5408
5408
|
}
|
|
5409
5409
|
function Ue(e) {
|
|
5410
|
-
if (
|
|
5410
|
+
if (yt(e) === "html")
|
|
5411
5411
|
return e;
|
|
5412
5412
|
const t = (
|
|
5413
5413
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
@@ -5485,8 +5485,8 @@ function qe(e, t, n, r) {
|
|
|
5485
5485
|
const p = he(a), h = r && Ce(r) ? he(r) : r;
|
|
5486
5486
|
let v = p, g = Xn(v);
|
|
5487
5487
|
for (; g && r && h !== v; ) {
|
|
5488
|
-
const
|
|
5489
|
-
d *=
|
|
5488
|
+
const w = dt(g), b = g.getBoundingClientRect(), y = Se(g), x = b.left + (g.clientLeft + parseFloat(y.paddingLeft)) * w.x, C = b.top + (g.clientTop + parseFloat(y.paddingTop)) * w.y;
|
|
5489
|
+
d *= w.x, u *= w.y, m *= w.x, i *= w.y, d += x, u += C, v = he(g), g = Xn(v);
|
|
5490
5490
|
}
|
|
5491
5491
|
}
|
|
5492
5492
|
return on({
|
|
@@ -5496,12 +5496,12 @@ function qe(e, t, n, r) {
|
|
|
5496
5496
|
y: u
|
|
5497
5497
|
});
|
|
5498
5498
|
}
|
|
5499
|
-
function
|
|
5500
|
-
const n =
|
|
5499
|
+
function yn(e, t) {
|
|
5500
|
+
const n = wn(e).scrollLeft;
|
|
5501
5501
|
return t ? t.left + n : qe(Ie(e)).left + n;
|
|
5502
5502
|
}
|
|
5503
5503
|
function ba(e, t) {
|
|
5504
|
-
const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft -
|
|
5504
|
+
const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - yn(e, n), o = n.top + t.scrollTop;
|
|
5505
5505
|
return {
|
|
5506
5506
|
x: r,
|
|
5507
5507
|
y: o
|
|
@@ -5522,7 +5522,7 @@ function Nd(e) {
|
|
|
5522
5522
|
scrollTop: 0
|
|
5523
5523
|
}, u = Me(1);
|
|
5524
5524
|
const m = Me(0), i = Ne(r);
|
|
5525
|
-
if ((i || !i && !a) && ((
|
|
5525
|
+
if ((i || !i && !a) && ((yt(r) !== "body" || _t(s)) && (d = wn(r)), Ne(r))) {
|
|
5526
5526
|
const h = qe(r);
|
|
5527
5527
|
u = dt(r), m.x = h.x + r.clientLeft, m.y = h.y + r.clientTop;
|
|
5528
5528
|
}
|
|
@@ -5538,8 +5538,8 @@ function Td(e) {
|
|
|
5538
5538
|
return Array.from(e.getClientRects());
|
|
5539
5539
|
}
|
|
5540
5540
|
function Id(e) {
|
|
5541
|
-
const t = Ie(e), n =
|
|
5542
|
-
let s = -n.scrollLeft +
|
|
5541
|
+
const t = Ie(e), n = wn(e), r = e.ownerDocument.body, o = pe(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = pe(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
5542
|
+
let s = -n.scrollLeft + yn(e);
|
|
5543
5543
|
const l = -n.scrollTop;
|
|
5544
5544
|
return Se(r).direction === "rtl" && (s += pe(t.clientWidth, r.clientWidth) - o), {
|
|
5545
5545
|
width: o,
|
|
@@ -5557,7 +5557,7 @@ function Od(e, t) {
|
|
|
5557
5557
|
const m = hr();
|
|
5558
5558
|
(!m || m && t === "fixed") && (l = o.offsetLeft, d = o.offsetTop);
|
|
5559
5559
|
}
|
|
5560
|
-
const u =
|
|
5560
|
+
const u = yn(r);
|
|
5561
5561
|
if (u <= 0) {
|
|
5562
5562
|
const m = r.ownerDocument, i = m.body, p = getComputedStyle(i), h = m.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, v = Math.abs(r.clientWidth - i.clientWidth - h);
|
|
5563
5563
|
v <= so && (a -= v);
|
|
@@ -5598,20 +5598,20 @@ function io(e, t, n) {
|
|
|
5598
5598
|
}
|
|
5599
5599
|
return on(r);
|
|
5600
5600
|
}
|
|
5601
|
-
function
|
|
5601
|
+
function wa(e, t) {
|
|
5602
5602
|
const n = Ue(e);
|
|
5603
|
-
return n === t || !Ce(n) || mt(n) ? !1 : Se(n).position === "fixed" ||
|
|
5603
|
+
return n === t || !Ce(n) || mt(n) ? !1 : Se(n).position === "fixed" || wa(n, t);
|
|
5604
5604
|
}
|
|
5605
5605
|
function Fd(e, t) {
|
|
5606
5606
|
const n = t.get(e);
|
|
5607
5607
|
if (n)
|
|
5608
5608
|
return n;
|
|
5609
|
-
let r = kt(e, [], !1).filter((l) => Ce(l) &&
|
|
5609
|
+
let r = kt(e, [], !1).filter((l) => Ce(l) && yt(l) !== "body"), o = null;
|
|
5610
5610
|
const a = Se(e).position === "fixed";
|
|
5611
5611
|
let s = a ? Ue(e) : e;
|
|
5612
5612
|
for (; Ce(s) && !mt(s); ) {
|
|
5613
5613
|
const l = Se(s), d = pr(s);
|
|
5614
|
-
!d && l.position === "fixed" && (o = null), (a ? !d && !o : !d && l.position === "static" && !!o && Dd.has(o.position) || _t(s) && !d &&
|
|
5614
|
+
!d && l.position === "fixed" && (o = null), (a ? !d && !o : !d && l.position === "static" && !!o && Dd.has(o.position) || _t(s) && !d && wa(e, s)) ? r = r.filter((m) => m !== s) : o = l, s = Ue(s);
|
|
5615
5615
|
}
|
|
5616
5616
|
return t.set(e, r), r;
|
|
5617
5617
|
}
|
|
@@ -5651,10 +5651,10 @@ function zd(e, t, n) {
|
|
|
5651
5651
|
};
|
|
5652
5652
|
const d = Me(0);
|
|
5653
5653
|
function u() {
|
|
5654
|
-
d.x =
|
|
5654
|
+
d.x = yn(o);
|
|
5655
5655
|
}
|
|
5656
5656
|
if (r || !r && !a)
|
|
5657
|
-
if ((
|
|
5657
|
+
if ((yt(t) !== "body" || _t(o)) && (l = wn(t)), r) {
|
|
5658
5658
|
const h = qe(t, !0, a, t);
|
|
5659
5659
|
d.x = h.x + t.clientLeft, d.y = h.y + t.clientTop;
|
|
5660
5660
|
} else o && u();
|
|
@@ -5678,7 +5678,7 @@ function lo(e, t) {
|
|
|
5678
5678
|
let n = e.offsetParent;
|
|
5679
5679
|
return Ie(e) === n && (n = n.ownerDocument.body), n;
|
|
5680
5680
|
}
|
|
5681
|
-
function
|
|
5681
|
+
function ya(e, t) {
|
|
5682
5682
|
const n = he(e);
|
|
5683
5683
|
if (bn(e))
|
|
5684
5684
|
return n;
|
|
@@ -5697,7 +5697,7 @@ function wa(e, t) {
|
|
|
5697
5697
|
return r && mt(r) && On(r) && !pr(r) ? n : r || Ad(e) || n;
|
|
5698
5698
|
}
|
|
5699
5699
|
const Wd = async function(e) {
|
|
5700
|
-
const t = this.getOffsetParent ||
|
|
5700
|
+
const t = this.getOffsetParent || ya, n = this.getDimensions, r = await n(e.floating);
|
|
5701
5701
|
return {
|
|
5702
5702
|
reference: zd(e.reference, await t(e.floating), e.strategy),
|
|
5703
5703
|
floating: {
|
|
@@ -5715,7 +5715,7 @@ const Vd = {
|
|
|
5715
5715
|
convertOffsetParentRelativeRectToViewportRelativeRect: Nd,
|
|
5716
5716
|
getDocumentElement: Ie,
|
|
5717
5717
|
getClippingRect: Bd,
|
|
5718
|
-
getOffsetParent:
|
|
5718
|
+
getOffsetParent: ya,
|
|
5719
5719
|
getElementRects: Wd,
|
|
5720
5720
|
getClientRects: Td,
|
|
5721
5721
|
getDimensions: $d,
|
|
@@ -5743,8 +5743,8 @@ function Ud(e, t) {
|
|
|
5743
5743
|
} = u;
|
|
5744
5744
|
if (l || t(), !p || !h)
|
|
5745
5745
|
return;
|
|
5746
|
-
const v = Ht(i), g = Ht(o.clientWidth - (m + p)),
|
|
5747
|
-
rootMargin: -v + "px " + -g + "px " + -
|
|
5746
|
+
const v = Ht(i), g = Ht(o.clientWidth - (m + p)), w = Ht(o.clientHeight - (i + h)), b = Ht(m), x = {
|
|
5747
|
+
rootMargin: -v + "px " + -g + "px " + -w + "px " + -b + "px",
|
|
5748
5748
|
threshold: pe(0, Ve(1, d)) || 1
|
|
5749
5749
|
};
|
|
5750
5750
|
let C = !0;
|
|
@@ -5789,26 +5789,26 @@ function jd(e, t, n, r) {
|
|
|
5789
5789
|
const i = u && l ? Ud(u, n) : null;
|
|
5790
5790
|
let p = -1, h = null;
|
|
5791
5791
|
s && (h = new ResizeObserver((b) => {
|
|
5792
|
-
let [
|
|
5793
|
-
|
|
5792
|
+
let [y] = b;
|
|
5793
|
+
y && y.target === u && h && (h.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
5794
5794
|
var x;
|
|
5795
5795
|
(x = h) == null || x.observe(t);
|
|
5796
5796
|
})), n();
|
|
5797
5797
|
}), u && !d && h.observe(u), h.observe(t));
|
|
5798
5798
|
let v, g = d ? qe(e) : null;
|
|
5799
|
-
d &&
|
|
5800
|
-
function
|
|
5799
|
+
d && w();
|
|
5800
|
+
function w() {
|
|
5801
5801
|
const b = qe(e);
|
|
5802
|
-
g && !xa(g, b) && n(), g = b, v = requestAnimationFrame(
|
|
5802
|
+
g && !xa(g, b) && n(), g = b, v = requestAnimationFrame(w);
|
|
5803
5803
|
}
|
|
5804
5804
|
return n(), () => {
|
|
5805
5805
|
var b;
|
|
5806
|
-
m.forEach((
|
|
5807
|
-
o &&
|
|
5806
|
+
m.forEach((y) => {
|
|
5807
|
+
o && y.removeEventListener("scroll", n), a && y.removeEventListener("resize", n);
|
|
5808
5808
|
}), i?.(), (b = h) == null || b.disconnect(), h = null, d && cancelAnimationFrame(v);
|
|
5809
5809
|
};
|
|
5810
5810
|
}
|
|
5811
|
-
const Gd = gd, Yd = vd, Kd = md, Xd =
|
|
5811
|
+
const Gd = gd, Yd = vd, Kd = md, Xd = wd, qd = pd, co = fd, Zd = bd, Qd = (e, t, n) => {
|
|
5812
5812
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
5813
5813
|
platform: Vd,
|
|
5814
5814
|
...n
|
|
@@ -5889,11 +5889,11 @@ function tu(e) {
|
|
|
5889
5889
|
isPositioned: !1
|
|
5890
5890
|
}), [p, h] = f.useState(r);
|
|
5891
5891
|
an(p, r) || h(r);
|
|
5892
|
-
const [v, g] = f.useState(null), [
|
|
5892
|
+
const [v, g] = f.useState(null), [w, b] = f.useState(null), y = f.useCallback((R) => {
|
|
5893
5893
|
R !== M.current && (M.current = R, g(R));
|
|
5894
5894
|
}, []), x = f.useCallback((R) => {
|
|
5895
5895
|
R !== A.current && (A.current = R, b(R));
|
|
5896
|
-
}, []), C = a || v, k = s ||
|
|
5896
|
+
}, []), C = a || v, k = s || w, M = f.useRef(null), A = f.useRef(null), S = f.useRef(m), O = d != null, L = Dn(d), U = Dn(o), G = Dn(u), V = f.useCallback(() => {
|
|
5897
5897
|
if (!M.current || !A.current)
|
|
5898
5898
|
return;
|
|
5899
5899
|
const R = {
|
|
@@ -5934,9 +5934,9 @@ function tu(e) {
|
|
|
5934
5934
|
const q = f.useMemo(() => ({
|
|
5935
5935
|
reference: M,
|
|
5936
5936
|
floating: A,
|
|
5937
|
-
setReference:
|
|
5937
|
+
setReference: y,
|
|
5938
5938
|
setFloating: x
|
|
5939
|
-
}), [
|
|
5939
|
+
}), [y, x]), N = f.useMemo(() => ({
|
|
5940
5940
|
reference: C,
|
|
5941
5941
|
floating: k
|
|
5942
5942
|
}), [C, k]), F = f.useMemo(() => {
|
|
@@ -6082,7 +6082,7 @@ var br = "PopperContent", [pu, hu] = Ea(br), _a = f.forwardRef(
|
|
|
6082
6082
|
updatePositionStrategy: h = "optimized",
|
|
6083
6083
|
onPlaced: v,
|
|
6084
6084
|
...g
|
|
6085
|
-
} = e,
|
|
6085
|
+
} = e, w = ka(br, n), [b, y] = f.useState(null), x = ee(t, (B) => y(B)), [C, k] = f.useState(null), M = fu(C), A = M?.width ?? 0, S = M?.height ?? 0, O = r + (a !== "center" ? "-" + a : ""), L = typeof m == "number" ? m : { top: 0, right: 0, bottom: 0, left: 0, ...m }, U = Array.isArray(u) ? u : [u], G = U.length > 0, V = {
|
|
6086
6086
|
padding: L,
|
|
6087
6087
|
boundary: U.filter(vu),
|
|
6088
6088
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
@@ -6095,7 +6095,7 @@ var br = "PopperContent", [pu, hu] = Ea(br), _a = f.forwardRef(
|
|
|
6095
6095
|
animationFrame: h === "always"
|
|
6096
6096
|
}),
|
|
6097
6097
|
elements: {
|
|
6098
|
-
reference:
|
|
6098
|
+
reference: w.anchor
|
|
6099
6099
|
},
|
|
6100
6100
|
middleware: [
|
|
6101
6101
|
ru({ mainAxis: o + S, alignmentAxis: s }),
|
|
@@ -6108,9 +6108,9 @@ var br = "PopperContent", [pu, hu] = Ea(br), _a = f.forwardRef(
|
|
|
6108
6108
|
d && su({ ...V }),
|
|
6109
6109
|
iu({
|
|
6110
6110
|
...V,
|
|
6111
|
-
apply: ({ elements: B, rects: Y, availableWidth: de, availableHeight:
|
|
6111
|
+
apply: ({ elements: B, rects: Y, availableWidth: de, availableHeight: we }) => {
|
|
6112
6112
|
const { width: Re, height: ue } = Y.reference, nt = B.floating.style;
|
|
6113
|
-
nt.setProperty("--radix-popper-available-width", `${de}px`), nt.setProperty("--radix-popper-available-height", `${
|
|
6113
|
+
nt.setProperty("--radix-popper-available-width", `${de}px`), nt.setProperty("--radix-popper-available-height", `${we}px`), nt.setProperty("--radix-popper-anchor-width", `${Re}px`), nt.setProperty("--radix-popper-anchor-height", `${ue}px`);
|
|
6114
6114
|
}
|
|
6115
6115
|
}),
|
|
6116
6116
|
C && cu({ element: C, padding: l }),
|
|
@@ -6246,7 +6246,7 @@ function Ia(e) {
|
|
|
6246
6246
|
const [t, n = "center"] = e.split("-");
|
|
6247
6247
|
return [t, n];
|
|
6248
6248
|
}
|
|
6249
|
-
var Oa = Aa,
|
|
6249
|
+
var Oa = Aa, wu = Ma, yu = _a, xu = Ta, Cu = "Portal", Da = f.forwardRef((e, t) => {
|
|
6250
6250
|
const { container: n, ...r } = e, [o, a] = f.useState(!1);
|
|
6251
6251
|
_e(() => a(!0), []);
|
|
6252
6252
|
const s = n || o && globalThis?.document?.body;
|
|
@@ -6272,12 +6272,12 @@ var Pu = f.forwardRef((e, t) => {
|
|
|
6272
6272
|
onEntryFocus: u,
|
|
6273
6273
|
preventScrollOnEntryFocus: m = !1,
|
|
6274
6274
|
...i
|
|
6275
|
-
} = e, p = f.useRef(null), h = ee(t, p), v = fn(a), [g,
|
|
6275
|
+
} = e, p = f.useRef(null), h = ee(t, p), v = fn(a), [g, w] = et({
|
|
6276
6276
|
prop: s,
|
|
6277
6277
|
defaultProp: l ?? null,
|
|
6278
6278
|
onChange: d,
|
|
6279
6279
|
caller: Nt
|
|
6280
|
-
}), [b,
|
|
6280
|
+
}), [b, y] = f.useState(!1), x = ae(u), C = La(n), k = f.useRef(!1), [M, A] = f.useState(0);
|
|
6281
6281
|
return f.useEffect(() => {
|
|
6282
6282
|
const S = p.current;
|
|
6283
6283
|
if (S)
|
|
@@ -6291,10 +6291,10 @@ var Pu = f.forwardRef((e, t) => {
|
|
|
6291
6291
|
loop: o,
|
|
6292
6292
|
currentTabStopId: g,
|
|
6293
6293
|
onItemFocus: f.useCallback(
|
|
6294
|
-
(S) =>
|
|
6295
|
-
[
|
|
6294
|
+
(S) => w(S),
|
|
6295
|
+
[w]
|
|
6296
6296
|
),
|
|
6297
|
-
onItemShiftTab: f.useCallback(() =>
|
|
6297
|
+
onItemShiftTab: f.useCallback(() => y(!0), []),
|
|
6298
6298
|
onFocusableItemAdd: f.useCallback(
|
|
6299
6299
|
() => A((S) => S + 1),
|
|
6300
6300
|
[]
|
|
@@ -6327,7 +6327,7 @@ var Pu = f.forwardRef((e, t) => {
|
|
|
6327
6327
|
}
|
|
6328
6328
|
k.current = !1;
|
|
6329
6329
|
}),
|
|
6330
|
-
onBlur: $(e.onBlur, () =>
|
|
6330
|
+
onBlur: $(e.onBlur, () => y(!1))
|
|
6331
6331
|
}
|
|
6332
6332
|
)
|
|
6333
6333
|
}
|
|
@@ -6359,25 +6359,25 @@ var Pu = f.forwardRef((e, t) => {
|
|
|
6359
6359
|
"data-orientation": m.orientation,
|
|
6360
6360
|
...l,
|
|
6361
6361
|
ref: t,
|
|
6362
|
-
onMouseDown: $(e.onMouseDown, (
|
|
6363
|
-
r ? m.onItemFocus(u) :
|
|
6362
|
+
onMouseDown: $(e.onMouseDown, (w) => {
|
|
6363
|
+
r ? m.onItemFocus(u) : w.preventDefault();
|
|
6364
6364
|
}),
|
|
6365
6365
|
onFocus: $(e.onFocus, () => m.onItemFocus(u)),
|
|
6366
|
-
onKeyDown: $(e.onKeyDown, (
|
|
6367
|
-
if (
|
|
6366
|
+
onKeyDown: $(e.onKeyDown, (w) => {
|
|
6367
|
+
if (w.key === "Tab" && w.shiftKey) {
|
|
6368
6368
|
m.onItemShiftTab();
|
|
6369
6369
|
return;
|
|
6370
6370
|
}
|
|
6371
|
-
if (
|
|
6372
|
-
const b = Nu(
|
|
6371
|
+
if (w.target !== w.currentTarget) return;
|
|
6372
|
+
const b = Nu(w, m.orientation, m.dir);
|
|
6373
6373
|
if (b !== void 0) {
|
|
6374
|
-
if (
|
|
6375
|
-
|
|
6374
|
+
if (w.metaKey || w.ctrlKey || w.altKey || w.shiftKey) return;
|
|
6375
|
+
w.preventDefault();
|
|
6376
6376
|
let x = p().filter((C) => C.focusable).map((C) => C.ref.current);
|
|
6377
6377
|
if (b === "last") x.reverse();
|
|
6378
6378
|
else if (b === "prev" || b === "next") {
|
|
6379
6379
|
b === "prev" && x.reverse();
|
|
6380
|
-
const C = x.indexOf(
|
|
6380
|
+
const C = x.indexOf(w.currentTarget);
|
|
6381
6381
|
x = m.loop ? Tu(x, C + 1) : x.slice(C + 1);
|
|
6382
6382
|
}
|
|
6383
6383
|
setTimeout(() => Wa(x));
|
|
@@ -6446,8 +6446,8 @@ var Iu = Ba, Ou = za, Du = function(e) {
|
|
|
6446
6446
|
m(p);
|
|
6447
6447
|
else
|
|
6448
6448
|
try {
|
|
6449
|
-
var h = p.getAttribute(r), v = h !== null && h !== "false", g = (it.get(p) || 0) + 1,
|
|
6450
|
-
it.set(p, g), a.set(p,
|
|
6449
|
+
var h = p.getAttribute(r), v = h !== null && h !== "false", g = (it.get(p) || 0) + 1, w = (a.get(p) || 0) + 1;
|
|
6450
|
+
it.set(p, g), a.set(p, w), s.push(p), g === 1 && v && Vt.set(p, !0), w === 1 && p.setAttribute(n, "true"), v || p.setAttribute(r, "true");
|
|
6451
6451
|
} catch (b) {
|
|
6452
6452
|
console.error("aria-hidden: cannot operate on ", p, b);
|
|
6453
6453
|
}
|
|
@@ -6614,12 +6614,12 @@ var ja = Yu(), $n = function() {
|
|
|
6614
6614
|
onScrollCapture: $n,
|
|
6615
6615
|
onWheelCapture: $n,
|
|
6616
6616
|
onTouchMoveCapture: $n
|
|
6617
|
-
}), o = r[0], a = r[1], s = e.forwardProps, l = e.children, d = e.className, u = e.removeScrollBar, m = e.enabled, i = e.shards, p = e.sideCar, h = e.noRelative, v = e.noIsolation, g = e.inert,
|
|
6617
|
+
}), o = r[0], a = r[1], s = e.forwardProps, l = e.children, d = e.className, u = e.removeScrollBar, m = e.enabled, i = e.shards, p = e.sideCar, h = e.noRelative, v = e.noIsolation, g = e.inert, w = e.allowPinchZoom, b = e.as, y = b === void 0 ? "div" : b, x = e.gapMode, C = Va(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), k = p, M = Uu([n, t]), A = Ae(Ae({}, C), o);
|
|
6618
6618
|
return f.createElement(
|
|
6619
6619
|
f.Fragment,
|
|
6620
6620
|
null,
|
|
6621
|
-
m && f.createElement(k, { sideCar: ja, removeScrollBar: u, shards: i, noRelative: h, noIsolation: v, inert: g, setCallbacks: a, allowPinchZoom: !!
|
|
6622
|
-
s ? f.cloneElement(f.Children.only(l), Ae(Ae({}, A), { ref: M })) : f.createElement(
|
|
6621
|
+
m && f.createElement(k, { sideCar: ja, removeScrollBar: u, shards: i, noRelative: h, noIsolation: v, inert: g, setCallbacks: a, allowPinchZoom: !!w, lockRef: n, gapMode: x }),
|
|
6622
|
+
s ? f.cloneElement(f.Children.only(l), Ae(Ae({}, A), { ref: M })) : f.createElement(y, Ae({}, A, { className: d, ref: M }), l)
|
|
6623
6623
|
);
|
|
6624
6624
|
});
|
|
6625
6625
|
xn.defaultProps = {
|
|
@@ -6821,10 +6821,10 @@ var lt = Zn ? { passive: !1 } : !1, cf = function(e) {
|
|
|
6821
6821
|
do {
|
|
6822
6822
|
if (!l)
|
|
6823
6823
|
break;
|
|
6824
|
-
var h = Xa(e, l), v = h[0], g = h[1],
|
|
6824
|
+
var h = Xa(e, l), v = h[0], g = h[1], w = h[2], b = g - w - a * v;
|
|
6825
6825
|
(v || b) && Ka(e, l) && (i += b, p += v);
|
|
6826
|
-
var
|
|
6827
|
-
l =
|
|
6826
|
+
var y = l.parentNode;
|
|
6827
|
+
l = y && y.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? y.host : y;
|
|
6828
6828
|
} while (
|
|
6829
6829
|
// portaled content
|
|
6830
6830
|
!d && l !== document.body || // self content
|
|
@@ -6845,7 +6845,7 @@ var lt = Zn ? { passive: !1 } : !1, cf = function(e) {
|
|
|
6845
6845
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
6846
6846
|
`);
|
|
6847
6847
|
}, bf = 0, ct = [];
|
|
6848
|
-
function
|
|
6848
|
+
function wf(e) {
|
|
6849
6849
|
var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(bf++)[0], a = f.useState(Ga)[0], s = f.useRef(e);
|
|
6850
6850
|
f.useEffect(function() {
|
|
6851
6851
|
s.current = e;
|
|
@@ -6853,19 +6853,19 @@ function yf(e) {
|
|
|
6853
6853
|
if (e.inert) {
|
|
6854
6854
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
6855
6855
|
var g = $u([e.lockRef.current], (e.shards || []).map(go), !0).filter(Boolean);
|
|
6856
|
-
return g.forEach(function(
|
|
6857
|
-
return
|
|
6856
|
+
return g.forEach(function(w) {
|
|
6857
|
+
return w.classList.add("allow-interactivity-".concat(o));
|
|
6858
6858
|
}), function() {
|
|
6859
|
-
document.body.classList.remove("block-interactivity-".concat(o)), g.forEach(function(
|
|
6860
|
-
return
|
|
6859
|
+
document.body.classList.remove("block-interactivity-".concat(o)), g.forEach(function(w) {
|
|
6860
|
+
return w.classList.remove("allow-interactivity-".concat(o));
|
|
6861
6861
|
});
|
|
6862
6862
|
};
|
|
6863
6863
|
}
|
|
6864
6864
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
6865
|
-
var l = f.useCallback(function(g,
|
|
6865
|
+
var l = f.useCallback(function(g, w) {
|
|
6866
6866
|
if ("touches" in g && g.touches.length === 2 || g.type === "wheel" && g.ctrlKey)
|
|
6867
6867
|
return !s.current.allowPinchZoom;
|
|
6868
|
-
var b = Gt(g),
|
|
6868
|
+
var b = Gt(g), y = n.current, x = "deltaX" in g ? g.deltaX : y[0] - b[0], C = "deltaY" in g ? g.deltaY : y[1] - b[1], k, M = g.target, A = Math.abs(x) > Math.abs(C) ? "h" : "v";
|
|
6869
6869
|
if ("touches" in g && A === "h" && M.type === "range")
|
|
6870
6870
|
return !1;
|
|
6871
6871
|
var S = po(A, M);
|
|
@@ -6876,26 +6876,26 @@ function yf(e) {
|
|
|
6876
6876
|
if (!r.current && "changedTouches" in g && (x || C) && (r.current = k), !k)
|
|
6877
6877
|
return !0;
|
|
6878
6878
|
var O = r.current || k;
|
|
6879
|
-
return hf(O,
|
|
6879
|
+
return hf(O, w, g, O === "h" ? x : C);
|
|
6880
6880
|
}, []), d = f.useCallback(function(g) {
|
|
6881
|
-
var
|
|
6881
|
+
var w = g;
|
|
6882
6882
|
if (!(!ct.length || ct[ct.length - 1] !== a)) {
|
|
6883
|
-
var b = "deltaY" in
|
|
6884
|
-
return k.name ===
|
|
6883
|
+
var b = "deltaY" in w ? ho(w) : Gt(w), y = t.current.filter(function(k) {
|
|
6884
|
+
return k.name === w.type && (k.target === w.target || w.target === k.shadowParent) && gf(k.delta, b);
|
|
6885
6885
|
})[0];
|
|
6886
|
-
if (
|
|
6887
|
-
|
|
6886
|
+
if (y && y.should) {
|
|
6887
|
+
w.cancelable && w.preventDefault();
|
|
6888
6888
|
return;
|
|
6889
6889
|
}
|
|
6890
|
-
if (!
|
|
6890
|
+
if (!y) {
|
|
6891
6891
|
var x = (s.current.shards || []).map(go).filter(Boolean).filter(function(k) {
|
|
6892
|
-
return k.contains(
|
|
6893
|
-
}), C = x.length > 0 ? l(
|
|
6894
|
-
C &&
|
|
6892
|
+
return k.contains(w.target);
|
|
6893
|
+
}), C = x.length > 0 ? l(w, x[0]) : !s.current.noIsolation;
|
|
6894
|
+
C && w.cancelable && w.preventDefault();
|
|
6895
6895
|
}
|
|
6896
6896
|
}
|
|
6897
|
-
}, []), u = f.useCallback(function(g,
|
|
6898
|
-
var x = { name: g, delta:
|
|
6897
|
+
}, []), u = f.useCallback(function(g, w, b, y) {
|
|
6898
|
+
var x = { name: g, delta: w, target: b, should: y, shadowParent: yf(b) };
|
|
6899
6899
|
t.current.push(x), setTimeout(function() {
|
|
6900
6900
|
t.current = t.current.filter(function(C) {
|
|
6901
6901
|
return C !== x;
|
|
@@ -6927,12 +6927,12 @@ function yf(e) {
|
|
|
6927
6927
|
h ? f.createElement(lf, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
6928
6928
|
);
|
|
6929
6929
|
}
|
|
6930
|
-
function
|
|
6930
|
+
function yf(e) {
|
|
6931
6931
|
for (var t = null; e !== null; )
|
|
6932
6932
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
6933
6933
|
return t;
|
|
6934
6934
|
}
|
|
6935
|
-
const xf = Ku(ja,
|
|
6935
|
+
const xf = Ku(ja, wf);
|
|
6936
6936
|
var qa = f.forwardRef(function(e, t) {
|
|
6937
6937
|
return f.createElement(xn, Ae({}, e, { ref: t, sideCar: xf }));
|
|
6938
6938
|
});
|
|
@@ -6979,20 +6979,20 @@ var Qn = ["Enter", " "], Cf = ["ArrowDown", "PageUp", "Home"], Za = ["ArrowUp",
|
|
|
6979
6979
|
) });
|
|
6980
6980
|
};
|
|
6981
6981
|
ts.displayName = Tt;
|
|
6982
|
-
var Mf = "MenuAnchor",
|
|
6982
|
+
var Mf = "MenuAnchor", wr = f.forwardRef(
|
|
6983
6983
|
(e, t) => {
|
|
6984
6984
|
const { __scopeMenu: n, ...r } = e, o = It(n);
|
|
6985
|
-
return /* @__PURE__ */ c(
|
|
6985
|
+
return /* @__PURE__ */ c(wu, { ...o, ...r, ref: t });
|
|
6986
6986
|
}
|
|
6987
6987
|
);
|
|
6988
|
-
|
|
6989
|
-
var
|
|
6988
|
+
wr.displayName = Mf;
|
|
6989
|
+
var yr = "MenuPortal", [_f, ns] = tt(yr, {
|
|
6990
6990
|
forceMount: void 0
|
|
6991
6991
|
}), rs = (e) => {
|
|
6992
|
-
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, a = Ge(
|
|
6992
|
+
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, a = Ge(yr, t);
|
|
6993
6993
|
return /* @__PURE__ */ c(_f, { scope: t, forceMount: n, children: /* @__PURE__ */ c(Te, { present: n || a.open, children: /* @__PURE__ */ c(Da, { asChild: !0, container: o, children: r }) }) });
|
|
6994
6994
|
};
|
|
6995
|
-
rs.displayName =
|
|
6995
|
+
rs.displayName = yr;
|
|
6996
6996
|
var ve = "MenuContent", [Nf, xr] = tt(ve), os = f.forwardRef(
|
|
6997
6997
|
(e, t) => {
|
|
6998
6998
|
const n = ns(ve, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, a = Ge(ve, e.__scopeMenu), s = Ot(ve, e.__scopeMenu);
|
|
@@ -7051,7 +7051,7 @@ var ve = "MenuContent", [Nf, xr] = tt(ve), os = f.forwardRef(
|
|
|
7051
7051
|
onDismiss: h,
|
|
7052
7052
|
disableOutsideScroll: v,
|
|
7053
7053
|
...g
|
|
7054
|
-
} = e,
|
|
7054
|
+
} = e, w = Ge(ve, n), b = Ot(ve, n), y = It(n), x = Ja(n), C = kf(n), [k, M] = f.useState(null), A = f.useRef(null), S = ee(t, A, w.onContentChange), O = f.useRef(0), L = f.useRef(""), U = f.useRef(0), G = f.useRef(null), V = f.useRef("right"), j = f.useRef(0), q = v ? qa : f.Fragment, N = v ? { as: Of, allowPinchZoom: !0 } : void 0, F = (_) => {
|
|
7055
7055
|
const K = L.current + _, te = C().filter((B) => !B.disabled), se = document.activeElement, D = te.find((B) => B.ref.current === se)?.textValue, z = te.map((B) => B.textValue), X = Gf(z, K, D), J = te.find((B) => B.textValue === X)?.ref.current;
|
|
7056
7056
|
(function B(Y) {
|
|
7057
7057
|
L.current = Y, window.clearTimeout(O.current), Y !== "" && (O.current = window.setTimeout(() => B(""), 1e3));
|
|
@@ -7120,14 +7120,14 @@ var ve = "MenuContent", [Nf, xr] = tt(ve), os = f.forwardRef(
|
|
|
7120
7120
|
}),
|
|
7121
7121
|
preventScrollOnEntryFocus: !0,
|
|
7122
7122
|
children: /* @__PURE__ */ c(
|
|
7123
|
-
|
|
7123
|
+
yu,
|
|
7124
7124
|
{
|
|
7125
7125
|
role: "menu",
|
|
7126
7126
|
"aria-orientation": "vertical",
|
|
7127
|
-
"data-state": xs(
|
|
7127
|
+
"data-state": xs(w.open),
|
|
7128
7128
|
"data-radix-menu-content": "",
|
|
7129
7129
|
dir: b.dir,
|
|
7130
|
-
...
|
|
7130
|
+
...y,
|
|
7131
7131
|
...g,
|
|
7132
7132
|
ref: S,
|
|
7133
7133
|
style: { outline: "none", ...g.style },
|
|
@@ -7382,7 +7382,7 @@ var Et = "MenuSubTrigger", bs = f.forwardRef(
|
|
|
7382
7382
|
return () => {
|
|
7383
7383
|
window.clearTimeout(i), d(null);
|
|
7384
7384
|
};
|
|
7385
|
-
}, [l, d]), /* @__PURE__ */ c(
|
|
7385
|
+
}, [l, d]), /* @__PURE__ */ c(wr, { asChild: !0, ...u, children: /* @__PURE__ */ c(
|
|
7386
7386
|
ss,
|
|
7387
7387
|
{
|
|
7388
7388
|
id: o.triggerId,
|
|
@@ -7409,16 +7409,16 @@ var Et = "MenuSubTrigger", bs = f.forwardRef(
|
|
|
7409
7409
|
m();
|
|
7410
7410
|
const p = n.content?.getBoundingClientRect();
|
|
7411
7411
|
if (p) {
|
|
7412
|
-
const h = n.content?.dataset.side, v = h === "right", g = v ? -5 : 5,
|
|
7412
|
+
const h = n.content?.dataset.side, v = h === "right", g = v ? -5 : 5, w = p[v ? "left" : "right"], b = p[v ? "right" : "left"];
|
|
7413
7413
|
a.onPointerGraceIntentChange({
|
|
7414
7414
|
area: [
|
|
7415
7415
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
7416
7416
|
// consistently within polygon bounds
|
|
7417
7417
|
{ x: i.clientX + g, y: i.clientY },
|
|
7418
|
-
{ x:
|
|
7418
|
+
{ x: w, y: p.top },
|
|
7419
7419
|
{ x: b, y: p.top },
|
|
7420
7420
|
{ x: b, y: p.bottom },
|
|
7421
|
-
{ x:
|
|
7421
|
+
{ x: w, y: p.bottom }
|
|
7422
7422
|
],
|
|
7423
7423
|
side: h
|
|
7424
7424
|
}), window.clearTimeout(l.current), l.current = window.setTimeout(
|
|
@@ -7440,9 +7440,9 @@ var Et = "MenuSubTrigger", bs = f.forwardRef(
|
|
|
7440
7440
|
}
|
|
7441
7441
|
);
|
|
7442
7442
|
bs.displayName = Et;
|
|
7443
|
-
var
|
|
7443
|
+
var ws = "MenuSubContent", ys = f.forwardRef(
|
|
7444
7444
|
(e, t) => {
|
|
7445
|
-
const n = ns(ve, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, a = Ge(ve, e.__scopeMenu), s = Ot(ve, e.__scopeMenu), l = gs(
|
|
7445
|
+
const n = ns(ve, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, a = Ge(ve, e.__scopeMenu), s = Ot(ve, e.__scopeMenu), l = gs(ws, e.__scopeMenu), d = f.useRef(null), u = ee(t, d);
|
|
7446
7446
|
return /* @__PURE__ */ c(At.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ c(Te, { present: r || a.open, children: /* @__PURE__ */ c(At.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ c(
|
|
7447
7447
|
Cr,
|
|
7448
7448
|
{
|
|
@@ -7473,7 +7473,7 @@ var ys = "MenuSubContent", ws = f.forwardRef(
|
|
|
7473
7473
|
) }) }) });
|
|
7474
7474
|
}
|
|
7475
7475
|
);
|
|
7476
|
-
|
|
7476
|
+
ys.displayName = ws;
|
|
7477
7477
|
function xs(e) {
|
|
7478
7478
|
return e ? "open" : "closed";
|
|
7479
7479
|
}
|
|
@@ -7517,7 +7517,7 @@ function Kf(e, t) {
|
|
|
7517
7517
|
function Pt(e) {
|
|
7518
7518
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
7519
7519
|
}
|
|
7520
|
-
var Xf = ts, qf =
|
|
7520
|
+
var Xf = ts, qf = wr, Zf = rs, Qf = os, Jf = Sr, em = as, tm = Cn, nm = is, rm = cs, om = us, am = ms, sm = ps, im = hs, lm = vs, cm = bs, dm = ys, Sn = "DropdownMenu", [um] = je(
|
|
7521
7521
|
Sn,
|
|
7522
7522
|
[Qa]
|
|
7523
7523
|
), le = Qa(), [fm, Cs] = um(Sn), Ss = (e) => {
|
|
@@ -7640,16 +7640,16 @@ var vm = "DropdownMenuCheckboxItem", Ts = f.forwardRef((e, t) => {
|
|
|
7640
7640
|
return /* @__PURE__ */ c(nm, { ...o, ...r, ref: t });
|
|
7641
7641
|
});
|
|
7642
7642
|
Ts.displayName = vm;
|
|
7643
|
-
var bm = "DropdownMenuRadioGroup",
|
|
7643
|
+
var bm = "DropdownMenuRadioGroup", wm = f.forwardRef((e, t) => {
|
|
7644
7644
|
const { __scopeDropdownMenu: n, ...r } = e, o = le(n);
|
|
7645
7645
|
return /* @__PURE__ */ c(rm, { ...o, ...r, ref: t });
|
|
7646
7646
|
});
|
|
7647
|
-
|
|
7648
|
-
var
|
|
7647
|
+
wm.displayName = bm;
|
|
7648
|
+
var ym = "DropdownMenuRadioItem", xm = f.forwardRef((e, t) => {
|
|
7649
7649
|
const { __scopeDropdownMenu: n, ...r } = e, o = le(n);
|
|
7650
7650
|
return /* @__PURE__ */ c(om, { ...o, ...r, ref: t });
|
|
7651
7651
|
});
|
|
7652
|
-
xm.displayName =
|
|
7652
|
+
xm.displayName = ym;
|
|
7653
7653
|
var Cm = "DropdownMenuItemIndicator", Is = f.forwardRef((e, t) => {
|
|
7654
7654
|
const { __scopeDropdownMenu: n, ...r } = e, o = le(n);
|
|
7655
7655
|
return /* @__PURE__ */ c(am, { ...o, ...r, ref: t });
|
|
@@ -7884,7 +7884,7 @@ var Ar = "ScrollArea", [zs] = je(Ar), [Jm, be] = zs(Ar), Ws = f.forwardRef(
|
|
|
7884
7884
|
dir: o,
|
|
7885
7885
|
scrollHideDelay: a = 600,
|
|
7886
7886
|
...s
|
|
7887
|
-
} = e, [l, d] = f.useState(null), [u, m] = f.useState(null), [i, p] = f.useState(null), [h, v] = f.useState(null), [g,
|
|
7887
|
+
} = e, [l, d] = f.useState(null), [u, m] = f.useState(null), [i, p] = f.useState(null), [h, v] = f.useState(null), [g, w] = f.useState(null), [b, y] = f.useState(0), [x, C] = f.useState(0), [k, M] = f.useState(!1), [A, S] = f.useState(!1), O = ee(t, (U) => d(U)), L = fn(o);
|
|
7888
7888
|
return /* @__PURE__ */ c(
|
|
7889
7889
|
Jm,
|
|
7890
7890
|
{
|
|
@@ -7902,10 +7902,10 @@ var Ar = "ScrollArea", [zs] = je(Ar), [Jm, be] = zs(Ar), Ws = f.forwardRef(
|
|
|
7902
7902
|
scrollbarXEnabled: k,
|
|
7903
7903
|
onScrollbarXEnabledChange: M,
|
|
7904
7904
|
scrollbarY: g,
|
|
7905
|
-
onScrollbarYChange:
|
|
7905
|
+
onScrollbarYChange: w,
|
|
7906
7906
|
scrollbarYEnabled: A,
|
|
7907
7907
|
onScrollbarYEnabledChange: S,
|
|
7908
|
-
onCornerWidthChange:
|
|
7908
|
+
onCornerWidthChange: y,
|
|
7909
7909
|
onCornerHeightChange: C,
|
|
7910
7910
|
children: /* @__PURE__ */ c(
|
|
7911
7911
|
Q.div,
|
|
@@ -8206,7 +8206,7 @@ var ep = f.forwardRef((e, t) => {
|
|
|
8206
8206
|
onWheelScroll: m,
|
|
8207
8207
|
onResize: i,
|
|
8208
8208
|
...p
|
|
8209
|
-
} = e, h = be(Oe, n), [v, g] = f.useState(null),
|
|
8209
|
+
} = e, h = be(Oe, n), [v, g] = f.useState(null), w = ee(t, (O) => g(O)), b = f.useRef(null), y = f.useRef(""), x = h.viewport, C = r.content - r.viewport, k = ae(m), M = ae(d), A = Rn(i, 10);
|
|
8210
8210
|
function S(O) {
|
|
8211
8211
|
if (b.current) {
|
|
8212
8212
|
const L = O.clientX - b.current.left, U = O.clientY - b.current.top;
|
|
@@ -8233,15 +8233,15 @@ var ep = f.forwardRef((e, t) => {
|
|
|
8233
8233
|
Q.div,
|
|
8234
8234
|
{
|
|
8235
8235
|
...p,
|
|
8236
|
-
ref:
|
|
8236
|
+
ref: w,
|
|
8237
8237
|
style: { position: "absolute", ...p.style },
|
|
8238
8238
|
onPointerDown: $(e.onPointerDown, (O) => {
|
|
8239
|
-
O.button === 0 && (O.target.setPointerCapture(O.pointerId), b.current = v.getBoundingClientRect(),
|
|
8239
|
+
O.button === 0 && (O.target.setPointerCapture(O.pointerId), b.current = v.getBoundingClientRect(), y.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", h.viewport && (h.viewport.style.scrollBehavior = "auto"), S(O));
|
|
8240
8240
|
}),
|
|
8241
8241
|
onPointerMove: $(e.onPointerMove, S),
|
|
8242
8242
|
onPointerUp: $(e.onPointerUp, (O) => {
|
|
8243
8243
|
const L = O.target;
|
|
8244
|
-
L.hasPointerCapture(O.pointerId) && L.releasePointerCapture(O.pointerId), document.body.style.webkitUserSelect =
|
|
8244
|
+
L.hasPointerCapture(O.pointerId) && L.releasePointerCapture(O.pointerId), document.body.style.webkitUserSelect = y.current, h.viewport && (h.viewport.style.scrollBehavior = ""), b.current = null;
|
|
8245
8245
|
})
|
|
8246
8246
|
}
|
|
8247
8247
|
)
|
|
@@ -8505,10 +8505,10 @@ function Js({
|
|
|
8505
8505
|
}
|
|
8506
8506
|
);
|
|
8507
8507
|
}
|
|
8508
|
-
function
|
|
8508
|
+
function wp({ ...e }) {
|
|
8509
8509
|
return /* @__PURE__ */ c($m, { "data-slot": "dropdown-menu-sub", ...e });
|
|
8510
8510
|
}
|
|
8511
|
-
function
|
|
8511
|
+
function yp({
|
|
8512
8512
|
children: e,
|
|
8513
8513
|
variant: t = "default",
|
|
8514
8514
|
className: n,
|
|
@@ -8581,8 +8581,8 @@ function Cp({ menuNode: e, menuKey: t }) {
|
|
|
8581
8581
|
case "group":
|
|
8582
8582
|
return /* @__PURE__ */ c(Km, { ...r.props, children: r.items.map((a, s) => n(a, String(s))) }, o);
|
|
8583
8583
|
case "sub":
|
|
8584
|
-
return /* @__PURE__ */ Z(
|
|
8585
|
-
/* @__PURE__ */ c(
|
|
8584
|
+
return /* @__PURE__ */ Z(wp, { ...r.props, children: [
|
|
8585
|
+
/* @__PURE__ */ c(yp, { ...r.trigger.props }),
|
|
8586
8586
|
r.content && /* @__PURE__ */ c($s, { children: /* @__PURE__ */ c(
|
|
8587
8587
|
xp,
|
|
8588
8588
|
{
|
|
@@ -8849,9 +8849,9 @@ function _p({
|
|
|
8849
8849
|
}
|
|
8850
8850
|
}
|
|
8851
8851
|
g();
|
|
8852
|
-
const
|
|
8853
|
-
return p.current &&
|
|
8854
|
-
|
|
8852
|
+
const w = new ResizeObserver(g);
|
|
8853
|
+
return p.current && w.observe(p.current), () => {
|
|
8854
|
+
w.disconnect();
|
|
8855
8855
|
};
|
|
8856
8856
|
}, [s]);
|
|
8857
8857
|
const h = Qt(() => {
|
|
@@ -8925,6 +8925,26 @@ function Ip({ children: e, className: t, ...n }) {
|
|
|
8925
8925
|
)
|
|
8926
8926
|
] });
|
|
8927
8927
|
}
|
|
8928
|
+
function Rh({ className: e, size: t = "sm", ...n }) {
|
|
8929
|
+
return /* @__PURE__ */ c(
|
|
8930
|
+
"span",
|
|
8931
|
+
{
|
|
8932
|
+
"aria-label": "Loading...",
|
|
8933
|
+
className: P(
|
|
8934
|
+
"box-border inline-block animate-spin rounded-full border-[var(--spinner-base,hsl(var(--contrast-100)))] [border-bottom-color:var(--spinner-ring,color-mix(in_oklab,hsl(var(--primary)),black_75%))]",
|
|
8935
|
+
{
|
|
8936
|
+
xs: "h-5 w-5 border-2",
|
|
8937
|
+
sm: "h-6 w-6 border-2",
|
|
8938
|
+
md: "h-10 w-10 border-[3px]",
|
|
8939
|
+
lg: "h-14 w-14 border-4"
|
|
8940
|
+
}[t],
|
|
8941
|
+
e
|
|
8942
|
+
),
|
|
8943
|
+
role: "status",
|
|
8944
|
+
...n
|
|
8945
|
+
}
|
|
8946
|
+
);
|
|
8947
|
+
}
|
|
8928
8948
|
function Op(e) {
|
|
8929
8949
|
if (typeof document > "u") return;
|
|
8930
8950
|
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
@@ -9203,7 +9223,7 @@ Op("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;
|
|
|
9203
9223
|
function Yt(e) {
|
|
9204
9224
|
return e.label !== void 0;
|
|
9205
9225
|
}
|
|
9206
|
-
const qp = 3, Zp = "24px", Qp = "16px",
|
|
9226
|
+
const qp = 3, Zp = "24px", Qp = "16px", wo = 4e3, Jp = 356, eh = 14, th = 45, nh = 200;
|
|
9207
9227
|
function ke(...e) {
|
|
9208
9228
|
return e.filter(Boolean).join(" ");
|
|
9209
9229
|
}
|
|
@@ -9213,8 +9233,8 @@ function rh(e) {
|
|
|
9213
9233
|
}
|
|
9214
9234
|
const oh = (e) => {
|
|
9215
9235
|
var t, n, r, o, a, s, l, d, u;
|
|
9216
|
-
const { invert: m, toast: i, unstyled: p, interacting: h, setHeights: v, visibleToasts: g, heights:
|
|
9217
|
-
|
|
9236
|
+
const { invert: m, toast: i, unstyled: p, interacting: h, setHeights: v, visibleToasts: g, heights: w, index: b, toasts: y, expanded: x, removeToast: C, defaultRichColors: k, closeButton: M, style: A, cancelButtonStyle: S, actionButtonStyle: O, className: L = "", descriptionClassName: U = "", duration: G, position: V, gap: j, expandByDefault: q, classNames: N, icons: F, closeButtonAriaLabel: R = "Close toast" } = e, [_, K] = E.useState(null), [te, se] = E.useState(null), [D, z] = E.useState(!1), [X, J] = E.useState(!1), [B, Y] = E.useState(!1), [de, we] = E.useState(!1), [Re, ue] = E.useState(!1), [nt, kn] = E.useState(0), [oi, Tr] = E.useState(0), xt = E.useRef(i.duration || G || wo), Ir = E.useRef(null), De = E.useRef(null), ai = b === 0, si = b + 1 <= g, fe = i.type, rt = i.dismissible !== !1, ii = i.className || "", li = i.descriptionClassName || "", Dt = E.useMemo(() => w.findIndex((W) => W.toastId === i.id) || 0, [
|
|
9237
|
+
w,
|
|
9218
9238
|
i.id
|
|
9219
9239
|
]), ci = E.useMemo(() => {
|
|
9220
9240
|
var W;
|
|
@@ -9222,11 +9242,11 @@ const oh = (e) => {
|
|
|
9222
9242
|
}, [
|
|
9223
9243
|
i.closeButton,
|
|
9224
9244
|
M
|
|
9225
|
-
]), Or = E.useMemo(() => i.duration || G ||
|
|
9245
|
+
]), Or = E.useMemo(() => i.duration || G || wo, [
|
|
9226
9246
|
i.duration,
|
|
9227
9247
|
G
|
|
9228
|
-
]), An = E.useRef(0), ot = E.useRef(0), Dr = E.useRef(0), at = E.useRef(null), [di, ui] = V.split("-"), Lr = E.useMemo(() =>
|
|
9229
|
-
|
|
9248
|
+
]), An = E.useRef(0), ot = E.useRef(0), Dr = E.useRef(0), at = E.useRef(null), [di, ui] = V.split("-"), Lr = E.useMemo(() => w.reduce((W, re, ie) => ie >= Dt ? W : W + re.height, 0), [
|
|
9249
|
+
w,
|
|
9230
9250
|
Dt
|
|
9231
9251
|
]), Fr = Vp(), fi = i.invert || m, Pn = fe === "loading";
|
|
9232
9252
|
ot.current = E.useMemo(() => Dt * j + Lr, [
|
|
@@ -9360,7 +9380,7 @@ const oh = (e) => {
|
|
|
9360
9380
|
style: {
|
|
9361
9381
|
"--index": b,
|
|
9362
9382
|
"--toasts-before": b,
|
|
9363
|
-
"--z-index":
|
|
9383
|
+
"--z-index": y.length - b,
|
|
9364
9384
|
"--offset": `${X ? nt : ot.current}px`,
|
|
9365
9385
|
"--initial-height": q ? "auto" : `${oi}px`,
|
|
9366
9386
|
...A,
|
|
@@ -9381,11 +9401,11 @@ const oh = (e) => {
|
|
|
9381
9401
|
at.current = null;
|
|
9382
9402
|
const me = Number(((W = De.current) == null ? void 0 : W.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), Lt = Number(((re = De.current) == null ? void 0 : re.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), oe = (/* @__PURE__ */ new Date()).getTime() - ((ie = Ir.current) == null ? void 0 : ie.getTime()), ge = _ === "x" ? me : Lt, Ft = Math.abs(ge) / oe;
|
|
9383
9403
|
if (Math.abs(ge) >= th || Ft > 0.11) {
|
|
9384
|
-
kn(ot.current), i.onDismiss == null || i.onDismiss.call(i, i), se(_ === "x" ? me > 0 ? "right" : "left" : Lt > 0 ? "down" : "up"), $e(),
|
|
9404
|
+
kn(ot.current), i.onDismiss == null || i.onDismiss.call(i, i), se(_ === "x" ? me > 0 ? "right" : "left" : Lt > 0 ? "down" : "up"), $e(), we(!0);
|
|
9385
9405
|
return;
|
|
9386
9406
|
} else {
|
|
9387
|
-
var
|
|
9388
|
-
(
|
|
9407
|
+
var ye, xe;
|
|
9408
|
+
(ye = De.current) == null || ye.style.setProperty("--swipe-amount-x", "0px"), (xe = De.current) == null || xe.style.setProperty("--swipe-amount-y", "0px");
|
|
9389
9409
|
}
|
|
9390
9410
|
ue(!1), Y(!1), K(null);
|
|
9391
9411
|
},
|
|
@@ -9394,7 +9414,7 @@ const oh = (e) => {
|
|
|
9394
9414
|
if (!at.current || !rt || ((re = window.getSelection()) == null ? void 0 : re.toString().length) > 0) return;
|
|
9395
9415
|
const oe = W.clientY - at.current.y, ge = W.clientX - at.current.x;
|
|
9396
9416
|
var Ft;
|
|
9397
|
-
const
|
|
9417
|
+
const ye = (Ft = e.swipeDirections) != null ? Ft : rh(V);
|
|
9398
9418
|
!_ && (Math.abs(ge) > 1 || Math.abs(oe) > 1) && K(Math.abs(ge) > Math.abs(oe) ? "x" : "y");
|
|
9399
9419
|
let xe = {
|
|
9400
9420
|
x: 0,
|
|
@@ -9402,15 +9422,15 @@ const oh = (e) => {
|
|
|
9402
9422
|
};
|
|
9403
9423
|
const zr = (Ye) => 1 / (1.5 + Math.abs(Ye) / 20);
|
|
9404
9424
|
if (_ === "y") {
|
|
9405
|
-
if (
|
|
9406
|
-
if (
|
|
9425
|
+
if (ye.includes("top") || ye.includes("bottom"))
|
|
9426
|
+
if (ye.includes("top") && oe < 0 || ye.includes("bottom") && oe > 0)
|
|
9407
9427
|
xe.y = oe;
|
|
9408
9428
|
else {
|
|
9409
9429
|
const Ye = oe * zr(oe);
|
|
9410
9430
|
xe.y = Math.abs(Ye) < Math.abs(oe) ? Ye : oe;
|
|
9411
9431
|
}
|
|
9412
|
-
} else if (_ === "x" && (
|
|
9413
|
-
if (
|
|
9432
|
+
} else if (_ === "x" && (ye.includes("left") || ye.includes("right")))
|
|
9433
|
+
if (ye.includes("left") && ge < 0 || ye.includes("right") && ge > 0)
|
|
9414
9434
|
xe.x = ge;
|
|
9415
9435
|
else {
|
|
9416
9436
|
const Ye = ge * zr(ge);
|
|
@@ -9457,7 +9477,7 @@ const oh = (e) => {
|
|
|
9457
9477
|
className: ke(N?.actionButton, i == null || (u = i.classNames) == null ? void 0 : u.actionButton)
|
|
9458
9478
|
}, i.action.label) : null);
|
|
9459
9479
|
};
|
|
9460
|
-
function
|
|
9480
|
+
function yo() {
|
|
9461
9481
|
if (typeof window > "u" || typeof document > "u") return "ltr";
|
|
9462
9482
|
const e = document.documentElement.getAttribute("dir");
|
|
9463
9483
|
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
|
|
@@ -9493,7 +9513,7 @@ const sh = /* @__PURE__ */ E.forwardRef(function(t, n) {
|
|
|
9493
9513
|
const { id: r, invert: o, position: a = "bottom-right", hotkey: s = [
|
|
9494
9514
|
"altKey",
|
|
9495
9515
|
"KeyT"
|
|
9496
|
-
], expand: l, closeButton: d, className: u, offset: m, mobileOffset: i, theme: p = "light", richColors: h, duration: v, style: g, visibleToasts:
|
|
9516
|
+
], expand: l, closeButton: d, className: u, offset: m, mobileOffset: i, theme: p = "light", richColors: h, duration: v, style: g, visibleToasts: w = qp, toastOptions: b, dir: y = yo(), gap: x = eh, icons: C, containerAriaLabel: k = "Notifications" } = t, [M, A] = E.useState([]), S = E.useMemo(() => r ? M.filter((D) => D.toasterId === r) : M.filter((D) => !D.toasterId), [
|
|
9497
9517
|
M,
|
|
9498
9518
|
r
|
|
9499
9519
|
]), O = E.useMemo(() => Array.from(new Set([
|
|
@@ -9598,7 +9618,7 @@ const sh = /* @__PURE__ */ E.forwardRef(function(t, n) {
|
|
|
9598
9618
|
const [J, B] = D.split("-");
|
|
9599
9619
|
return S.length ? /* @__PURE__ */ E.createElement("ol", {
|
|
9600
9620
|
key: D,
|
|
9601
|
-
dir:
|
|
9621
|
+
dir: y === "auto" ? yo() : y,
|
|
9602
9622
|
tabIndex: -1,
|
|
9603
9623
|
ref: R,
|
|
9604
9624
|
className: u,
|
|
@@ -9632,18 +9652,18 @@ const sh = /* @__PURE__ */ E.forwardRef(function(t, n) {
|
|
|
9632
9652
|
},
|
|
9633
9653
|
onPointerUp: () => q(!1)
|
|
9634
9654
|
}, S.filter((Y) => !Y.position && z === 0 || Y.position === D).map((Y, de) => {
|
|
9635
|
-
var
|
|
9655
|
+
var we, Re;
|
|
9636
9656
|
return /* @__PURE__ */ E.createElement(oh, {
|
|
9637
9657
|
key: Y.id,
|
|
9638
9658
|
icons: C,
|
|
9639
9659
|
index: de,
|
|
9640
9660
|
toast: Y,
|
|
9641
9661
|
defaultRichColors: h,
|
|
9642
|
-
duration: (
|
|
9662
|
+
duration: (we = b?.duration) != null ? we : v,
|
|
9643
9663
|
className: b?.className,
|
|
9644
9664
|
descriptionClassName: b?.descriptionClassName,
|
|
9645
9665
|
invert: o,
|
|
9646
|
-
visibleToasts:
|
|
9666
|
+
visibleToasts: w,
|
|
9647
9667
|
closeButton: (Re = b?.closeButton) != null ? Re : d,
|
|
9648
9668
|
interacting: j,
|
|
9649
9669
|
position: D,
|
|
@@ -9664,7 +9684,7 @@ const sh = /* @__PURE__ */ E.forwardRef(function(t, n) {
|
|
|
9664
9684
|
});
|
|
9665
9685
|
})) : null;
|
|
9666
9686
|
}));
|
|
9667
|
-
}),
|
|
9687
|
+
}), kh = ({ className: e, ...t }) => /* @__PURE__ */ c(
|
|
9668
9688
|
sh,
|
|
9669
9689
|
{
|
|
9670
9690
|
className: P("flex w-full flex-col items-end", e),
|
|
@@ -9676,7 +9696,7 @@ const sh = /* @__PURE__ */ E.forwardRef(function(t, n) {
|
|
|
9676
9696
|
},
|
|
9677
9697
|
...t
|
|
9678
9698
|
}
|
|
9679
|
-
),
|
|
9699
|
+
), Ah = {
|
|
9680
9700
|
success: (e, t) => {
|
|
9681
9701
|
const n = t?.position, r = We(
|
|
9682
9702
|
/* @__PURE__ */ c(
|
|
@@ -9789,10 +9809,10 @@ export {
|
|
|
9789
9809
|
Oc as CardLink,
|
|
9790
9810
|
Dc as CardRoot,
|
|
9791
9811
|
bh as CardSkeleton,
|
|
9792
|
-
|
|
9812
|
+
wh as Chip,
|
|
9793
9813
|
Fc as ChipButton,
|
|
9794
9814
|
Lc as ChipRoot,
|
|
9795
|
-
|
|
9815
|
+
yh as DropdownMenu,
|
|
9796
9816
|
Gm as DropdownMenuCheckboxItem,
|
|
9797
9817
|
Um as DropdownMenuContent,
|
|
9798
9818
|
Km as DropdownMenuGroup,
|
|
@@ -9803,9 +9823,9 @@ export {
|
|
|
9803
9823
|
Hm as DropdownMenuRoot,
|
|
9804
9824
|
Js as DropdownMenuScrollArea,
|
|
9805
9825
|
Xm as DropdownMenuSeparator,
|
|
9806
|
-
|
|
9826
|
+
wp as DropdownMenuSub,
|
|
9807
9827
|
xp as DropdownMenuSubContent,
|
|
9808
|
-
|
|
9828
|
+
yp as DropdownMenuSubTrigger,
|
|
9809
9829
|
Vm as DropdownMenuTrigger,
|
|
9810
9830
|
xh as Favorite,
|
|
9811
9831
|
Rp as FavoriteHeart,
|
|
@@ -9828,8 +9848,9 @@ export {
|
|
|
9828
9848
|
fp as ScrollAreaRoot,
|
|
9829
9849
|
vp as ScrollAreaThumb,
|
|
9830
9850
|
hp as ScrollAreaViewport,
|
|
9831
|
-
Rh as
|
|
9832
|
-
kh as
|
|
9851
|
+
Rh as Spinner,
|
|
9852
|
+
kh as Toaster,
|
|
9853
|
+
Ah as toast,
|
|
9833
9854
|
hn as useAccordion,
|
|
9834
9855
|
ta as useAlert,
|
|
9835
9856
|
oa as useBanner,
|