@kommo-crm/crm-react-ui-kit 1.17.1 → 1.19.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/{ContextMenu-DY7dE-m3.mjs → ContextMenu-C5hUJzo_.mjs} +4 -4
- package/dist/ItemRoot.module-Bai745fc.mjs +7 -0
- package/dist/ItemRoot.module-aMBsZnCj.mjs +7 -0
- package/dist/assets/Item.css +1 -1
- package/dist/assets/Item3.css +1 -1
- package/dist/assets/ItemRoot.css +1 -1
- package/dist/assets/ItemRoot2.css +1 -1
- package/dist/assets/Ribbon.css +1 -0
- package/dist/components/CheckboxGroup/components/CheckboxSelectAll/ItemRootSelectAll.js +1 -1
- package/dist/components/CheckboxGroup/components/ItemRoot/ItemRoot.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.d.ts +5 -15
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +3 -3
- package/dist/components/ContextMenu/components/Arrow/Arrow.js +1 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts +1 -3
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.js +2 -2
- package/dist/components/ContextMenu/components/Content/Content.d.ts +1 -3
- package/dist/components/ContextMenu/components/Content/Content.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Content/Content.js +2 -2
- package/dist/components/ContextMenu/components/Content/index.js +1 -1
- package/dist/components/ContextMenu/components/Group/Group.js +1 -1
- package/dist/components/ContextMenu/components/Item/Item.js +3 -3
- package/dist/components/ContextMenu/components/ItemIndicator/ItemIndicator.js +1 -1
- package/dist/components/ContextMenu/components/Label/Label.js +2 -2
- package/dist/components/ContextMenu/components/Portal/Portal.js +1 -1
- package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts +1 -3
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.js +2 -2
- package/dist/components/ContextMenu/components/Sub/Sub.js +2 -2
- package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.js +1 -1
- package/dist/components/ContextMenu/components/Sub/index.js +1 -1
- package/dist/components/ContextMenu/components/SubContent/SubContent.js +2 -2
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts +1 -3
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +1 -1
- package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.js +2 -2
- package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.js +2 -2
- package/dist/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +1 -1
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.d.ts +1 -3
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +2 -2
- package/dist/components/ContextMenu/components/Trigger/Trigger.js +1 -1
- package/dist/components/ContextMenu/hooks/index.js +1 -1
- package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.js +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +1 -1
- package/dist/components/ContextMenu/index.js +1 -1
- package/dist/components/DropdownList/DropdownList.js +1 -1
- package/dist/components/FilterTabs/components/ItemRoot/ItemRoot.js +1 -1
- package/dist/components/FilterTabs/components/ItemRootReset/ItemRootReset.js +1 -1
- package/dist/components/Ribbon/Ribbon.d.ts +5 -0
- package/dist/components/Ribbon/Ribbon.d.ts.map +1 -0
- package/dist/components/Ribbon/Ribbon.js +66 -0
- package/dist/components/Ribbon/Ribbon.props.d.ts +47 -0
- package/dist/components/Ribbon/Ribbon.props.d.ts.map +1 -0
- package/dist/components/Ribbon/Ribbon.props.js +1 -0
- package/dist/components/Ribbon/Ribbon.themes.d.ts +7 -0
- package/dist/components/Ribbon/Ribbon.themes.d.ts.map +1 -0
- package/dist/components/Ribbon/Ribbon.themes.js +12 -0
- package/dist/components/Ribbon/index.d.ts +4 -0
- package/dist/components/Ribbon/index.d.ts.map +1 -0
- package/dist/components/Ribbon/index.js +6 -0
- package/dist/components/Select/components/Item/Item.js +1 -1
- package/dist/components/Select/components/List/List.js +12 -12
- package/dist/{index-SjVEUQPm.mjs → index-BSUeeun5.mjs} +1249 -1216
- package/dist/{index-DBS3EIVR.mjs → index-CitTBapb.mjs} +4 -4
- package/dist/{useContentPositioning-Dvz908Jg.mjs → useContentPositioning--C2HIYDR.mjs} +658 -636
- package/package.json +6 -1
- package/dist/ItemRoot.module-DaaOqYPx.mjs +0 -7
- package/dist/ItemRoot.module-fiKLca_h.mjs +0 -7
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as a from "react";
|
|
2
|
-
import de, { useLayoutEffect as
|
|
2
|
+
import de, { useLayoutEffect as uo, useState as lo } from "react";
|
|
3
3
|
import { jsx as y } from "react/jsx-runtime";
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
4
|
+
import * as xn from "react-dom";
|
|
5
|
+
import fo from "react-dom";
|
|
6
6
|
function O(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
7
7
|
return function(o) {
|
|
8
8
|
if (e == null || e(o), n === !1 || !o.defaultPrevented)
|
|
9
9
|
return t == null ? void 0 : t(o);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function qt(e, t) {
|
|
13
13
|
if (typeof e == "function")
|
|
14
14
|
return e(t);
|
|
15
15
|
e != null && (e.current = t);
|
|
@@ -18,14 +18,14 @@ function it(...e) {
|
|
|
18
18
|
return (t) => {
|
|
19
19
|
let n = !1;
|
|
20
20
|
const r = e.map((o) => {
|
|
21
|
-
const i =
|
|
21
|
+
const i = qt(o, t);
|
|
22
22
|
return !n && typeof i == "function" && (n = !0), i;
|
|
23
23
|
});
|
|
24
24
|
if (n)
|
|
25
25
|
return () => {
|
|
26
26
|
for (let o = 0; o < r.length; o++) {
|
|
27
27
|
const i = r[o];
|
|
28
|
-
typeof i == "function" ? i() :
|
|
28
|
+
typeof i == "function" ? i() : qt(e[o], null);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
};
|
|
@@ -38,20 +38,20 @@ function Ne(e, t = []) {
|
|
|
38
38
|
function r(i, s) {
|
|
39
39
|
const c = a.createContext(s), d = n.length;
|
|
40
40
|
n = [...n, s];
|
|
41
|
-
const
|
|
41
|
+
const f = (u) => {
|
|
42
42
|
var w;
|
|
43
43
|
const { scope: p, children: h, ...g } = u, m = ((w = p == null ? void 0 : p[e]) == null ? void 0 : w[d]) || c, v = a.useMemo(() => g, Object.values(g));
|
|
44
44
|
return /* @__PURE__ */ y(m.Provider, { value: v, children: h });
|
|
45
45
|
};
|
|
46
|
-
|
|
47
|
-
function
|
|
46
|
+
f.displayName = i + "Provider";
|
|
47
|
+
function l(u, p) {
|
|
48
48
|
var m;
|
|
49
49
|
const h = ((m = p == null ? void 0 : p[e]) == null ? void 0 : m[d]) || c, g = a.useContext(h);
|
|
50
50
|
if (g) return g;
|
|
51
51
|
if (s !== void 0) return s;
|
|
52
52
|
throw new Error(`\`${u}\` must be used within \`${i}\``);
|
|
53
53
|
}
|
|
54
|
-
return [
|
|
54
|
+
return [f, l];
|
|
55
55
|
}
|
|
56
56
|
const o = () => {
|
|
57
57
|
const i = n.map((s) => a.createContext(s));
|
|
@@ -63,9 +63,9 @@ function Ne(e, t = []) {
|
|
|
63
63
|
);
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
|
-
return o.scopeName = e, [r,
|
|
66
|
+
return o.scopeName = e, [r, po(o, ...t)];
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function po(...e) {
|
|
69
69
|
const t = e[0];
|
|
70
70
|
if (e.length === 1) return t;
|
|
71
71
|
const n = () => {
|
|
@@ -74,8 +74,8 @@ function lo(...e) {
|
|
|
74
74
|
scopeName: o.scopeName
|
|
75
75
|
}));
|
|
76
76
|
return function(i) {
|
|
77
|
-
const s = r.reduce((c, { useScope: d, scopeName:
|
|
78
|
-
const u = d(i)[`__scope${
|
|
77
|
+
const s = r.reduce((c, { useScope: d, scopeName: f }) => {
|
|
78
|
+
const u = d(i)[`__scope${f}`];
|
|
79
79
|
return { ...c, ...u };
|
|
80
80
|
}, {});
|
|
81
81
|
return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
@@ -83,85 +83,85 @@ function lo(...e) {
|
|
|
83
83
|
};
|
|
84
84
|
return n.scopeName = t.scopeName, n;
|
|
85
85
|
}
|
|
86
|
-
var
|
|
87
|
-
},
|
|
88
|
-
function
|
|
86
|
+
var se = globalThis != null && globalThis.document ? a.useLayoutEffect : () => {
|
|
87
|
+
}, mo = a[" useInsertionEffect ".trim().toString()] || se;
|
|
88
|
+
function Tt({
|
|
89
89
|
prop: e,
|
|
90
90
|
defaultProp: t,
|
|
91
91
|
onChange: n = () => {
|
|
92
92
|
},
|
|
93
93
|
caller: r
|
|
94
94
|
}) {
|
|
95
|
-
const [o, i, s] =
|
|
95
|
+
const [o, i, s] = ho({
|
|
96
96
|
defaultProp: t,
|
|
97
97
|
onChange: n
|
|
98
98
|
}), c = e !== void 0, d = c ? e : o;
|
|
99
99
|
{
|
|
100
|
-
const
|
|
100
|
+
const l = a.useRef(e !== void 0);
|
|
101
101
|
a.useEffect(() => {
|
|
102
|
-
const u =
|
|
102
|
+
const u = l.current;
|
|
103
103
|
u !== c && console.warn(
|
|
104
104
|
`${r} is changing from ${u ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
105
|
-
),
|
|
105
|
+
), l.current = c;
|
|
106
106
|
}, [c, r]);
|
|
107
107
|
}
|
|
108
|
-
const
|
|
109
|
-
(
|
|
108
|
+
const f = a.useCallback(
|
|
109
|
+
(l) => {
|
|
110
110
|
var u;
|
|
111
111
|
if (c) {
|
|
112
|
-
const p =
|
|
112
|
+
const p = vo(l) ? l(e) : l;
|
|
113
113
|
p !== e && ((u = s.current) == null || u.call(s, p));
|
|
114
114
|
} else
|
|
115
|
-
i(
|
|
115
|
+
i(l);
|
|
116
116
|
},
|
|
117
117
|
[c, e, i, s]
|
|
118
118
|
);
|
|
119
|
-
return [d,
|
|
119
|
+
return [d, f];
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function ho({
|
|
122
122
|
defaultProp: e,
|
|
123
123
|
onChange: t
|
|
124
124
|
}) {
|
|
125
125
|
const [n, r] = a.useState(e), o = a.useRef(n), i = a.useRef(t);
|
|
126
|
-
return
|
|
126
|
+
return mo(() => {
|
|
127
127
|
i.current = t;
|
|
128
128
|
}, [t]), a.useEffect(() => {
|
|
129
129
|
var s;
|
|
130
130
|
o.current !== n && ((s = i.current) == null || s.call(i, n), o.current = n);
|
|
131
131
|
}, [n, o]), [n, r, i];
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function vo(e) {
|
|
134
134
|
return typeof e == "function";
|
|
135
135
|
}
|
|
136
136
|
// @__NO_SIDE_EFFECTS__
|
|
137
137
|
function Qe(e) {
|
|
138
|
-
const t = /* @__PURE__ */
|
|
139
|
-
const { children: i, ...s } = r, c = a.Children.toArray(i), d = c.find(
|
|
138
|
+
const t = /* @__PURE__ */ go(e), n = a.forwardRef((r, o) => {
|
|
139
|
+
const { children: i, ...s } = r, c = a.Children.toArray(i), d = c.find(yo);
|
|
140
140
|
if (d) {
|
|
141
|
-
const
|
|
142
|
-
return /* @__PURE__ */ y(t, { ...s, ref: o, children: a.isValidElement(
|
|
141
|
+
const f = d.props.children, l = c.map((u) => u === d ? a.Children.count(f) > 1 ? a.Children.only(null) : a.isValidElement(f) ? f.props.children : null : u);
|
|
142
|
+
return /* @__PURE__ */ y(t, { ...s, ref: o, children: a.isValidElement(f) ? a.cloneElement(f, void 0, l) : null });
|
|
143
143
|
}
|
|
144
144
|
return /* @__PURE__ */ y(t, { ...s, ref: o, children: i });
|
|
145
145
|
});
|
|
146
146
|
return n.displayName = `${e}.Slot`, n;
|
|
147
147
|
}
|
|
148
148
|
// @__NO_SIDE_EFFECTS__
|
|
149
|
-
function
|
|
149
|
+
function go(e) {
|
|
150
150
|
const t = a.forwardRef((n, r) => {
|
|
151
151
|
const { children: o, ...i } = n;
|
|
152
152
|
if (a.isValidElement(o)) {
|
|
153
|
-
const s =
|
|
153
|
+
const s = Co(o), c = bo(i, o.props);
|
|
154
154
|
return o.type !== a.Fragment && (c.ref = r ? it(r, s) : s), a.cloneElement(o, c);
|
|
155
155
|
}
|
|
156
156
|
return a.Children.count(o) > 1 ? a.Children.only(null) : null;
|
|
157
157
|
});
|
|
158
158
|
return t.displayName = `${e}.SlotClone`, t;
|
|
159
159
|
}
|
|
160
|
-
var
|
|
161
|
-
function
|
|
162
|
-
return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
160
|
+
var wo = Symbol("radix.slottable");
|
|
161
|
+
function yo(e) {
|
|
162
|
+
return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === wo;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function bo(e, t) {
|
|
165
165
|
const n = { ...t };
|
|
166
166
|
for (const r in t) {
|
|
167
167
|
const o = e[r], i = t[r];
|
|
@@ -172,12 +172,12 @@ function wo(e, t) {
|
|
|
172
172
|
}
|
|
173
173
|
return { ...e, ...n };
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function Co(e) {
|
|
176
176
|
var r, o;
|
|
177
177
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
178
178
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
179
179
|
}
|
|
180
|
-
var
|
|
180
|
+
var Eo = [
|
|
181
181
|
"a",
|
|
182
182
|
"button",
|
|
183
183
|
"div",
|
|
@@ -195,59 +195,59 @@ var bo = [
|
|
|
195
195
|
"span",
|
|
196
196
|
"svg",
|
|
197
197
|
"ul"
|
|
198
|
-
], K =
|
|
198
|
+
], K = Eo.reduce((e, t) => {
|
|
199
199
|
const n = /* @__PURE__ */ Qe(`Primitive.${t}`), r = a.forwardRef((o, i) => {
|
|
200
200
|
const { asChild: s, ...c } = o, d = s ? n : t;
|
|
201
201
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ y(d, { ...c, ref: i });
|
|
202
202
|
});
|
|
203
203
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
204
204
|
}, {});
|
|
205
|
-
function
|
|
206
|
-
e &&
|
|
205
|
+
function Sn(e, t) {
|
|
206
|
+
e && xn.flushSync(() => e.dispatchEvent(t));
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function Rn(e) {
|
|
209
209
|
const t = e + "CollectionProvider", [n, r] = Ne(t), [o, i] = n(
|
|
210
210
|
t,
|
|
211
211
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
212
212
|
), s = (m) => {
|
|
213
|
-
const { scope: v, children: w } = m,
|
|
214
|
-
return /* @__PURE__ */ y(o, { scope: v, itemMap: b, collectionRef:
|
|
213
|
+
const { scope: v, children: w } = m, E = de.useRef(null), b = de.useRef(/* @__PURE__ */ new Map()).current;
|
|
214
|
+
return /* @__PURE__ */ y(o, { scope: v, itemMap: b, collectionRef: E, children: w });
|
|
215
215
|
};
|
|
216
216
|
s.displayName = t;
|
|
217
|
-
const c = e + "CollectionSlot", d = /* @__PURE__ */ Qe(c),
|
|
217
|
+
const c = e + "CollectionSlot", d = /* @__PURE__ */ Qe(c), f = de.forwardRef(
|
|
218
218
|
(m, v) => {
|
|
219
|
-
const { scope: w, children:
|
|
220
|
-
return /* @__PURE__ */ y(d, { ref:
|
|
219
|
+
const { scope: w, children: E } = m, b = i(c, w), C = G(v, b.collectionRef);
|
|
220
|
+
return /* @__PURE__ */ y(d, { ref: C, children: E });
|
|
221
221
|
}
|
|
222
222
|
);
|
|
223
|
-
|
|
224
|
-
const
|
|
223
|
+
f.displayName = c;
|
|
224
|
+
const l = e + "CollectionItemSlot", u = "data-radix-collection-item", p = /* @__PURE__ */ Qe(l), h = de.forwardRef(
|
|
225
225
|
(m, v) => {
|
|
226
|
-
const { scope: w, children:
|
|
227
|
-
return de.useEffect(() => (
|
|
226
|
+
const { scope: w, children: E, ...b } = m, C = de.useRef(null), S = G(v, C), R = i(l, w);
|
|
227
|
+
return de.useEffect(() => (R.itemMap.set(C, { ref: C, ...b }), () => void R.itemMap.delete(C))), /* @__PURE__ */ y(p, { [u]: "", ref: S, children: E });
|
|
228
228
|
}
|
|
229
229
|
);
|
|
230
|
-
h.displayName =
|
|
230
|
+
h.displayName = l;
|
|
231
231
|
function g(m) {
|
|
232
232
|
const v = i(e + "CollectionConsumer", m);
|
|
233
233
|
return de.useCallback(() => {
|
|
234
|
-
const
|
|
235
|
-
if (!
|
|
236
|
-
const b = Array.from(
|
|
234
|
+
const E = v.collectionRef.current;
|
|
235
|
+
if (!E) return [];
|
|
236
|
+
const b = Array.from(E.querySelectorAll(`[${u}]`));
|
|
237
237
|
return Array.from(v.itemMap.values()).sort(
|
|
238
|
-
(
|
|
238
|
+
(R, x) => b.indexOf(R.ref.current) - b.indexOf(x.ref.current)
|
|
239
239
|
);
|
|
240
240
|
}, [v.collectionRef, v.itemMap]);
|
|
241
241
|
}
|
|
242
242
|
return [
|
|
243
|
-
{ Provider: s, Slot:
|
|
243
|
+
{ Provider: s, Slot: f, ItemSlot: h },
|
|
244
244
|
g,
|
|
245
245
|
r
|
|
246
246
|
];
|
|
247
247
|
}
|
|
248
|
-
var
|
|
249
|
-
function
|
|
250
|
-
const t = a.useContext(
|
|
248
|
+
var xo = a.createContext(void 0);
|
|
249
|
+
function Mn(e) {
|
|
250
|
+
const t = a.useContext(xo);
|
|
251
251
|
return e || t || "ltr";
|
|
252
252
|
}
|
|
253
253
|
function ee(e) {
|
|
@@ -259,7 +259,7 @@ function ee(e) {
|
|
|
259
259
|
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
260
260
|
}, []);
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function So(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
263
263
|
const n = ee(e);
|
|
264
264
|
a.useEffect(() => {
|
|
265
265
|
const r = (o) => {
|
|
@@ -268,11 +268,11 @@ function Eo(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
268
268
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
269
269
|
}, [n, t]);
|
|
270
270
|
}
|
|
271
|
-
var
|
|
271
|
+
var Ro = "DismissableLayer", St = "dismissableLayer.update", Mo = "dismissableLayer.pointerDownOutside", Ao = "dismissableLayer.focusOutside", Qt, An = a.createContext({
|
|
272
272
|
layers: /* @__PURE__ */ new Set(),
|
|
273
273
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
274
274
|
branches: /* @__PURE__ */ new Set()
|
|
275
|
-
}),
|
|
275
|
+
}), Pn = a.forwardRef(
|
|
276
276
|
(e, t) => {
|
|
277
277
|
const {
|
|
278
278
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -282,47 +282,47 @@ var xo = "DismissableLayer", Et = "dismissableLayer.update", So = "dismissableLa
|
|
|
282
282
|
onInteractOutside: s,
|
|
283
283
|
onDismiss: c,
|
|
284
284
|
...d
|
|
285
|
-
} = e,
|
|
286
|
-
const A =
|
|
287
|
-
!
|
|
288
|
-
}, p),
|
|
289
|
-
const A =
|
|
290
|
-
[...
|
|
285
|
+
} = e, f = a.useContext(An), [l, u] = a.useState(null), p = (l == null ? void 0 : l.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, h] = a.useState({}), g = G(t, (x) => u(x)), m = Array.from(f.layers), [v] = [...f.layersWithOutsidePointerEventsDisabled].slice(-1), w = m.indexOf(v), E = l ? m.indexOf(l) : -1, b = f.layersWithOutsidePointerEventsDisabled.size > 0, C = E >= w, S = _o((x) => {
|
|
286
|
+
const A = x.target, I = [...f.branches].some((_) => _.contains(A));
|
|
287
|
+
!C || I || (o == null || o(x), s == null || s(x), x.defaultPrevented || c == null || c());
|
|
288
|
+
}, p), R = To((x) => {
|
|
289
|
+
const A = x.target;
|
|
290
|
+
[...f.branches].some((_) => _.contains(A)) || (i == null || i(x), s == null || s(x), x.defaultPrevented || c == null || c());
|
|
291
291
|
}, p);
|
|
292
|
-
return
|
|
293
|
-
|
|
292
|
+
return So((x) => {
|
|
293
|
+
E === f.layers.size - 1 && (r == null || r(x), !x.defaultPrevented && c && (x.preventDefault(), c()));
|
|
294
294
|
}, p), a.useEffect(() => {
|
|
295
|
-
if (
|
|
296
|
-
return n && (
|
|
297
|
-
n &&
|
|
295
|
+
if (l)
|
|
296
|
+
return n && (f.layersWithOutsidePointerEventsDisabled.size === 0 && (Qt = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), f.layersWithOutsidePointerEventsDisabled.add(l)), f.layers.add(l), Jt(), () => {
|
|
297
|
+
n && f.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = Qt);
|
|
298
298
|
};
|
|
299
|
-
}, [
|
|
300
|
-
|
|
301
|
-
}, [
|
|
302
|
-
const
|
|
303
|
-
return document.addEventListener(
|
|
299
|
+
}, [l, p, n, f]), a.useEffect(() => () => {
|
|
300
|
+
l && (f.layers.delete(l), f.layersWithOutsidePointerEventsDisabled.delete(l), Jt());
|
|
301
|
+
}, [l, f]), a.useEffect(() => {
|
|
302
|
+
const x = () => h({});
|
|
303
|
+
return document.addEventListener(St, x), () => document.removeEventListener(St, x);
|
|
304
304
|
}, []), /* @__PURE__ */ y(
|
|
305
305
|
K.div,
|
|
306
306
|
{
|
|
307
307
|
...d,
|
|
308
308
|
ref: g,
|
|
309
309
|
style: {
|
|
310
|
-
pointerEvents: b ?
|
|
310
|
+
pointerEvents: b ? C ? "auto" : "none" : void 0,
|
|
311
311
|
...e.style
|
|
312
312
|
},
|
|
313
|
-
onFocusCapture: O(e.onFocusCapture,
|
|
314
|
-
onBlurCapture: O(e.onBlurCapture,
|
|
313
|
+
onFocusCapture: O(e.onFocusCapture, R.onFocusCapture),
|
|
314
|
+
onBlurCapture: O(e.onBlurCapture, R.onBlurCapture),
|
|
315
315
|
onPointerDownCapture: O(
|
|
316
316
|
e.onPointerDownCapture,
|
|
317
|
-
|
|
317
|
+
S.onPointerDownCapture
|
|
318
318
|
)
|
|
319
319
|
}
|
|
320
320
|
);
|
|
321
321
|
}
|
|
322
322
|
);
|
|
323
|
-
|
|
324
|
-
var
|
|
325
|
-
const n = a.useContext(
|
|
323
|
+
Pn.displayName = Ro;
|
|
324
|
+
var Po = "DismissableLayerBranch", Oo = a.forwardRef((e, t) => {
|
|
325
|
+
const n = a.useContext(An), r = a.useRef(null), o = G(t, r);
|
|
326
326
|
return a.useEffect(() => {
|
|
327
327
|
const i = r.current;
|
|
328
328
|
if (i)
|
|
@@ -331,22 +331,22 @@ var Mo = "DismissableLayerBranch", Ao = a.forwardRef((e, t) => {
|
|
|
331
331
|
};
|
|
332
332
|
}, [n.branches]), /* @__PURE__ */ y(K.div, { ...e, ref: o });
|
|
333
333
|
});
|
|
334
|
-
|
|
335
|
-
function
|
|
334
|
+
Oo.displayName = Po;
|
|
335
|
+
function _o(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
336
336
|
const n = ee(e), r = a.useRef(!1), o = a.useRef(() => {
|
|
337
337
|
});
|
|
338
338
|
return a.useEffect(() => {
|
|
339
339
|
const i = (c) => {
|
|
340
340
|
if (c.target && !r.current) {
|
|
341
341
|
let d = function() {
|
|
342
|
-
|
|
343
|
-
|
|
342
|
+
On(
|
|
343
|
+
Mo,
|
|
344
344
|
n,
|
|
345
|
-
|
|
345
|
+
f,
|
|
346
346
|
{ discrete: !0 }
|
|
347
347
|
);
|
|
348
348
|
};
|
|
349
|
-
const
|
|
349
|
+
const f = { originalEvent: c };
|
|
350
350
|
c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = d, t.addEventListener("click", o.current, { once: !0 })) : d();
|
|
351
351
|
} else
|
|
352
352
|
t.removeEventListener("click", o.current);
|
|
@@ -362,11 +362,11 @@ function Po(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
362
362
|
onPointerDownCapture: () => r.current = !0
|
|
363
363
|
};
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function To(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
366
366
|
const n = ee(e), r = a.useRef(!1);
|
|
367
367
|
return a.useEffect(() => {
|
|
368
368
|
const o = (i) => {
|
|
369
|
-
i.target && !r.current &&
|
|
369
|
+
i.target && !r.current && On(Ao, n, { originalEvent: i }, {
|
|
370
370
|
discrete: !1
|
|
371
371
|
});
|
|
372
372
|
};
|
|
@@ -376,35 +376,35 @@ function Oo(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
376
376
|
onBlurCapture: () => r.current = !1
|
|
377
377
|
};
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
const e = new CustomEvent(
|
|
379
|
+
function Jt() {
|
|
380
|
+
const e = new CustomEvent(St);
|
|
381
381
|
document.dispatchEvent(e);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function On(e, t, n, { discrete: r }) {
|
|
384
384
|
const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
385
|
-
t && o.addEventListener(e, t, { once: !0 }), r ?
|
|
385
|
+
t && o.addEventListener(e, t, { once: !0 }), r ? Sn(o, i) : o.dispatchEvent(i);
|
|
386
386
|
}
|
|
387
|
-
var
|
|
388
|
-
function
|
|
387
|
+
var pt = 0;
|
|
388
|
+
function Io() {
|
|
389
389
|
a.useEffect(() => {
|
|
390
390
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
391
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
392
|
-
|
|
391
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? en()), document.body.insertAdjacentElement("beforeend", e[1] ?? en()), pt++, () => {
|
|
392
|
+
pt === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), pt--;
|
|
393
393
|
};
|
|
394
394
|
}, []);
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function en() {
|
|
397
397
|
const e = document.createElement("span");
|
|
398
398
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
399
399
|
}
|
|
400
|
-
var
|
|
400
|
+
var mt = "focusScope.autoFocusOnMount", ht = "focusScope.autoFocusOnUnmount", tn = { bubbles: !1, cancelable: !0 }, Do = "FocusScope", _n = a.forwardRef((e, t) => {
|
|
401
401
|
const {
|
|
402
402
|
loop: n = !1,
|
|
403
403
|
trapped: r = !1,
|
|
404
404
|
onMountAutoFocus: o,
|
|
405
405
|
onUnmountAutoFocus: i,
|
|
406
406
|
...s
|
|
407
|
-
} = e, [c, d] = a.useState(null),
|
|
407
|
+
} = e, [c, d] = a.useState(null), f = ee(o), l = ee(i), u = a.useRef(null), p = G(t, (m) => d(m)), h = a.useRef({
|
|
408
408
|
paused: !1,
|
|
409
409
|
pause() {
|
|
410
410
|
this.paused = !0;
|
|
@@ -417,63 +417,63 @@ var pt = "focusScope.autoFocusOnMount", mt = "focusScope.autoFocusOnUnmount", en
|
|
|
417
417
|
if (r) {
|
|
418
418
|
let m = function(b) {
|
|
419
419
|
if (h.paused || !c) return;
|
|
420
|
-
const
|
|
421
|
-
c.contains(
|
|
420
|
+
const C = b.target;
|
|
421
|
+
c.contains(C) ? u.current = C : ce(u.current, { select: !0 });
|
|
422
422
|
}, v = function(b) {
|
|
423
423
|
if (h.paused || !c) return;
|
|
424
|
-
const
|
|
425
|
-
|
|
424
|
+
const C = b.relatedTarget;
|
|
425
|
+
C !== null && (c.contains(C) || ce(u.current, { select: !0 }));
|
|
426
426
|
}, w = function(b) {
|
|
427
427
|
if (document.activeElement === document.body)
|
|
428
|
-
for (const
|
|
429
|
-
|
|
428
|
+
for (const S of b)
|
|
429
|
+
S.removedNodes.length > 0 && ce(c);
|
|
430
430
|
};
|
|
431
431
|
document.addEventListener("focusin", m), document.addEventListener("focusout", v);
|
|
432
|
-
const
|
|
433
|
-
return c &&
|
|
434
|
-
document.removeEventListener("focusin", m), document.removeEventListener("focusout", v),
|
|
432
|
+
const E = new MutationObserver(w);
|
|
433
|
+
return c && E.observe(c, { childList: !0, subtree: !0 }), () => {
|
|
434
|
+
document.removeEventListener("focusin", m), document.removeEventListener("focusout", v), E.disconnect();
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
437
|
}, [r, c, h.paused]), a.useEffect(() => {
|
|
438
438
|
if (c) {
|
|
439
|
-
|
|
439
|
+
rn.add(h);
|
|
440
440
|
const m = document.activeElement;
|
|
441
441
|
if (!c.contains(m)) {
|
|
442
|
-
const w = new CustomEvent(
|
|
443
|
-
c.addEventListener(
|
|
442
|
+
const w = new CustomEvent(mt, tn);
|
|
443
|
+
c.addEventListener(mt, f), c.dispatchEvent(w), w.defaultPrevented || (No(Wo(Tn(c)), { select: !0 }), document.activeElement === m && ce(c));
|
|
444
444
|
}
|
|
445
445
|
return () => {
|
|
446
|
-
c.removeEventListener(
|
|
447
|
-
const w = new CustomEvent(
|
|
448
|
-
c.addEventListener(
|
|
446
|
+
c.removeEventListener(mt, f), setTimeout(() => {
|
|
447
|
+
const w = new CustomEvent(ht, tn);
|
|
448
|
+
c.addEventListener(ht, l), c.dispatchEvent(w), w.defaultPrevented || ce(m ?? document.body, { select: !0 }), c.removeEventListener(ht, l), rn.remove(h);
|
|
449
449
|
}, 0);
|
|
450
450
|
};
|
|
451
451
|
}
|
|
452
|
-
}, [c,
|
|
452
|
+
}, [c, f, l, h]);
|
|
453
453
|
const g = a.useCallback(
|
|
454
454
|
(m) => {
|
|
455
455
|
if (!n && !r || h.paused) return;
|
|
456
456
|
const v = m.key === "Tab" && !m.altKey && !m.ctrlKey && !m.metaKey, w = document.activeElement;
|
|
457
457
|
if (v && w) {
|
|
458
|
-
const
|
|
459
|
-
b &&
|
|
458
|
+
const E = m.currentTarget, [b, C] = Lo(E);
|
|
459
|
+
b && C ? !m.shiftKey && w === C ? (m.preventDefault(), n && ce(b, { select: !0 })) : m.shiftKey && w === b && (m.preventDefault(), n && ce(C, { select: !0 })) : w === E && m.preventDefault();
|
|
460
460
|
}
|
|
461
461
|
},
|
|
462
462
|
[n, r, h.paused]
|
|
463
463
|
);
|
|
464
464
|
return /* @__PURE__ */ y(K.div, { tabIndex: -1, ...s, ref: p, onKeyDown: g });
|
|
465
465
|
});
|
|
466
|
-
|
|
467
|
-
function
|
|
466
|
+
_n.displayName = Do;
|
|
467
|
+
function No(e, { select: t = !1 } = {}) {
|
|
468
468
|
const n = document.activeElement;
|
|
469
469
|
for (const r of e)
|
|
470
|
-
if (
|
|
470
|
+
if (ce(r, { select: t }), document.activeElement !== n) return;
|
|
471
471
|
}
|
|
472
|
-
function
|
|
473
|
-
const t =
|
|
472
|
+
function Lo(e) {
|
|
473
|
+
const t = Tn(e), n = nn(t, e), r = nn(t.reverse(), e);
|
|
474
474
|
return [n, r];
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Tn(e) {
|
|
477
477
|
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
478
478
|
acceptNode: (r) => {
|
|
479
479
|
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
@@ -483,11 +483,11 @@ function On(e) {
|
|
|
483
483
|
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
484
484
|
return t;
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function nn(e, t) {
|
|
487
487
|
for (const n of e)
|
|
488
|
-
if (!
|
|
488
|
+
if (!Fo(n, { upTo: t })) return n;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Fo(e, { upTo: t }) {
|
|
491
491
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
492
492
|
for (; e; ) {
|
|
493
493
|
if (t !== void 0 && e === t) return !1;
|
|
@@ -496,100 +496,97 @@ function No(e, { upTo: t }) {
|
|
|
496
496
|
}
|
|
497
497
|
return !1;
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function ko(e) {
|
|
500
500
|
return e instanceof HTMLInputElement && "select" in e;
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function ce(e, { select: t = !1 } = {}) {
|
|
503
503
|
if (e && e.focus) {
|
|
504
504
|
const n = document.activeElement;
|
|
505
|
-
e.focus({ preventScroll: !0 }), e !== n &&
|
|
505
|
+
e.focus({ preventScroll: !0 }), e !== n && ko(e) && t && e.select();
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
|
-
var
|
|
509
|
-
function
|
|
508
|
+
var rn = $o();
|
|
509
|
+
function $o() {
|
|
510
510
|
let e = [];
|
|
511
511
|
return {
|
|
512
512
|
add(t) {
|
|
513
513
|
const n = e[0];
|
|
514
|
-
t !== n && (n == null || n.pause()), e =
|
|
514
|
+
t !== n && (n == null || n.pause()), e = on(e, t), e.unshift(t);
|
|
515
515
|
},
|
|
516
516
|
remove(t) {
|
|
517
517
|
var n;
|
|
518
|
-
e =
|
|
518
|
+
e = on(e, t), (n = e[0]) == null || n.resume();
|
|
519
519
|
}
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function on(e, t) {
|
|
523
523
|
const n = [...e], r = n.indexOf(t);
|
|
524
524
|
return r !== -1 && n.splice(r, 1), n;
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function Wo(e) {
|
|
527
527
|
return e.filter((t) => t.tagName !== "A");
|
|
528
528
|
}
|
|
529
|
-
var
|
|
530
|
-
}),
|
|
531
|
-
function
|
|
532
|
-
const [t, n] = a.useState(
|
|
533
|
-
return
|
|
534
|
-
n((r) => r ?? String(
|
|
529
|
+
var Bo = a[" useId ".trim().toString()] || (() => {
|
|
530
|
+
}), Uo = 0;
|
|
531
|
+
function _e(e) {
|
|
532
|
+
const [t, n] = a.useState(Bo());
|
|
533
|
+
return se(() => {
|
|
534
|
+
n((r) => r ?? String(Uo++));
|
|
535
535
|
}, [e]), t ? `radix-${t}` : "";
|
|
536
536
|
}
|
|
537
|
-
const
|
|
537
|
+
const Ko = ["top", "right", "bottom", "left"], ae = Math.min, V = Math.max, Je = Math.round, Ge = Math.floor, J = (e) => ({
|
|
538
538
|
x: e,
|
|
539
539
|
y: e
|
|
540
|
-
}),
|
|
540
|
+
}), Go = {
|
|
541
541
|
left: "right",
|
|
542
542
|
right: "left",
|
|
543
543
|
bottom: "top",
|
|
544
544
|
top: "bottom"
|
|
545
|
-
}, Ko = {
|
|
546
|
-
start: "end",
|
|
547
|
-
end: "start"
|
|
548
545
|
};
|
|
549
|
-
function
|
|
546
|
+
function Rt(e, t, n) {
|
|
550
547
|
return V(e, ae(t, n));
|
|
551
548
|
}
|
|
552
|
-
function
|
|
549
|
+
function re(e, t) {
|
|
553
550
|
return typeof e == "function" ? e(t) : e;
|
|
554
551
|
}
|
|
555
|
-
function
|
|
552
|
+
function oe(e) {
|
|
556
553
|
return e.split("-")[0];
|
|
557
554
|
}
|
|
558
|
-
function
|
|
555
|
+
function Ee(e) {
|
|
559
556
|
return e.split("-")[1];
|
|
560
557
|
}
|
|
561
|
-
function
|
|
558
|
+
function It(e) {
|
|
562
559
|
return e === "x" ? "y" : "x";
|
|
563
560
|
}
|
|
564
|
-
function
|
|
561
|
+
function Dt(e) {
|
|
565
562
|
return e === "y" ? "height" : "width";
|
|
566
563
|
}
|
|
567
|
-
const Go = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
568
564
|
function Q(e) {
|
|
569
|
-
|
|
565
|
+
const t = e[0];
|
|
566
|
+
return t === "t" || t === "b" ? "y" : "x";
|
|
570
567
|
}
|
|
571
|
-
function
|
|
572
|
-
return
|
|
568
|
+
function Nt(e) {
|
|
569
|
+
return It(Q(e));
|
|
573
570
|
}
|
|
574
571
|
function Vo(e, t, n) {
|
|
575
572
|
n === void 0 && (n = !1);
|
|
576
|
-
const r =
|
|
573
|
+
const r = Ee(e), o = Nt(e), i = Dt(o);
|
|
577
574
|
let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
578
575
|
return t.reference[i] > t.floating[i] && (s = et(s)), [s, et(s)];
|
|
579
576
|
}
|
|
580
577
|
function Ho(e) {
|
|
581
578
|
const t = et(e);
|
|
582
|
-
return [
|
|
579
|
+
return [Mt(e), t, Mt(t)];
|
|
583
580
|
}
|
|
584
|
-
function
|
|
585
|
-
return e.replace(
|
|
581
|
+
function Mt(e) {
|
|
582
|
+
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
586
583
|
}
|
|
587
|
-
const
|
|
584
|
+
const cn = ["left", "right"], sn = ["right", "left"], zo = ["top", "bottom"], Yo = ["bottom", "top"];
|
|
588
585
|
function jo(e, t, n) {
|
|
589
586
|
switch (e) {
|
|
590
587
|
case "top":
|
|
591
588
|
case "bottom":
|
|
592
|
-
return n ? t ? sn :
|
|
589
|
+
return n ? t ? sn : cn : t ? cn : sn;
|
|
593
590
|
case "left":
|
|
594
591
|
case "right":
|
|
595
592
|
return t ? zo : Yo;
|
|
@@ -598,12 +595,13 @@ function jo(e, t, n) {
|
|
|
598
595
|
}
|
|
599
596
|
}
|
|
600
597
|
function Xo(e, t, n, r) {
|
|
601
|
-
const o =
|
|
602
|
-
let i = jo(
|
|
603
|
-
return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(
|
|
598
|
+
const o = Ee(e);
|
|
599
|
+
let i = jo(oe(e), n === "start", r);
|
|
600
|
+
return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(Mt)))), i;
|
|
604
601
|
}
|
|
605
602
|
function et(e) {
|
|
606
|
-
|
|
603
|
+
const t = oe(e);
|
|
604
|
+
return Go[t] + e.slice(t.length);
|
|
607
605
|
}
|
|
608
606
|
function Zo(e) {
|
|
609
607
|
return {
|
|
@@ -614,7 +612,7 @@ function Zo(e) {
|
|
|
614
612
|
...e
|
|
615
613
|
};
|
|
616
614
|
}
|
|
617
|
-
function
|
|
615
|
+
function In(e) {
|
|
618
616
|
return typeof e != "number" ? Zo(e) : {
|
|
619
617
|
top: e,
|
|
620
618
|
right: e,
|
|
@@ -640,23 +638,23 @@ function tt(e) {
|
|
|
640
638
|
y: n
|
|
641
639
|
};
|
|
642
640
|
}
|
|
643
|
-
function
|
|
641
|
+
function an(e, t, n) {
|
|
644
642
|
let {
|
|
645
643
|
reference: r,
|
|
646
644
|
floating: o
|
|
647
645
|
} = e;
|
|
648
|
-
const i = Q(t), s =
|
|
646
|
+
const i = Q(t), s = Nt(t), c = Dt(s), d = oe(t), f = i === "y", l = r.x + r.width / 2 - o.width / 2, u = r.y + r.height / 2 - o.height / 2, p = r[c] / 2 - o[c] / 2;
|
|
649
647
|
let h;
|
|
650
648
|
switch (d) {
|
|
651
649
|
case "top":
|
|
652
650
|
h = {
|
|
653
|
-
x:
|
|
651
|
+
x: l,
|
|
654
652
|
y: r.y - o.height
|
|
655
653
|
};
|
|
656
654
|
break;
|
|
657
655
|
case "bottom":
|
|
658
656
|
h = {
|
|
659
|
-
x:
|
|
657
|
+
x: l,
|
|
660
658
|
y: r.y + r.height
|
|
661
659
|
};
|
|
662
660
|
break;
|
|
@@ -678,78 +676,17 @@ function cn(e, t, n) {
|
|
|
678
676
|
y: r.y
|
|
679
677
|
};
|
|
680
678
|
}
|
|
681
|
-
switch (
|
|
679
|
+
switch (Ee(t)) {
|
|
682
680
|
case "start":
|
|
683
|
-
h[s] -= p * (n &&
|
|
681
|
+
h[s] -= p * (n && f ? -1 : 1);
|
|
684
682
|
break;
|
|
685
683
|
case "end":
|
|
686
|
-
h[s] += p * (n &&
|
|
684
|
+
h[s] += p * (n && f ? -1 : 1);
|
|
687
685
|
break;
|
|
688
686
|
}
|
|
689
687
|
return h;
|
|
690
688
|
}
|
|
691
|
-
|
|
692
|
-
const {
|
|
693
|
-
placement: r = "bottom",
|
|
694
|
-
strategy: o = "absolute",
|
|
695
|
-
middleware: i = [],
|
|
696
|
-
platform: s
|
|
697
|
-
} = n, c = i.filter(Boolean), d = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
698
|
-
let l = await s.getElementRects({
|
|
699
|
-
reference: e,
|
|
700
|
-
floating: t,
|
|
701
|
-
strategy: o
|
|
702
|
-
}), {
|
|
703
|
-
x: f,
|
|
704
|
-
y: u
|
|
705
|
-
} = cn(l, r, d), p = r, h = {}, g = 0;
|
|
706
|
-
for (let m = 0; m < c.length; m++) {
|
|
707
|
-
const {
|
|
708
|
-
name: v,
|
|
709
|
-
fn: w
|
|
710
|
-
} = c[m], {
|
|
711
|
-
x: C,
|
|
712
|
-
y: b,
|
|
713
|
-
data: E,
|
|
714
|
-
reset: x
|
|
715
|
-
} = await w({
|
|
716
|
-
x: f,
|
|
717
|
-
y: u,
|
|
718
|
-
initialPlacement: r,
|
|
719
|
-
placement: p,
|
|
720
|
-
strategy: o,
|
|
721
|
-
middlewareData: h,
|
|
722
|
-
rects: l,
|
|
723
|
-
platform: s,
|
|
724
|
-
elements: {
|
|
725
|
-
reference: e,
|
|
726
|
-
floating: t
|
|
727
|
-
}
|
|
728
|
-
});
|
|
729
|
-
f = C ?? f, u = b ?? u, h = {
|
|
730
|
-
...h,
|
|
731
|
-
[v]: {
|
|
732
|
-
...h[v],
|
|
733
|
-
...E
|
|
734
|
-
}
|
|
735
|
-
}, x && g <= 50 && (g++, typeof x == "object" && (x.placement && (p = x.placement), x.rects && (l = x.rects === !0 ? await s.getElementRects({
|
|
736
|
-
reference: e,
|
|
737
|
-
floating: t,
|
|
738
|
-
strategy: o
|
|
739
|
-
}) : x.rects), {
|
|
740
|
-
x: f,
|
|
741
|
-
y: u
|
|
742
|
-
} = cn(l, p, d)), m = -1);
|
|
743
|
-
}
|
|
744
|
-
return {
|
|
745
|
-
x: f,
|
|
746
|
-
y: u,
|
|
747
|
-
placement: p,
|
|
748
|
-
strategy: o,
|
|
749
|
-
middlewareData: h
|
|
750
|
-
};
|
|
751
|
-
};
|
|
752
|
-
async function _e(e, t) {
|
|
689
|
+
async function qo(e, t) {
|
|
753
690
|
var n;
|
|
754
691
|
t === void 0 && (t = {});
|
|
755
692
|
const {
|
|
@@ -760,41 +697,105 @@ async function _e(e, t) {
|
|
|
760
697
|
elements: c,
|
|
761
698
|
strategy: d
|
|
762
699
|
} = e, {
|
|
763
|
-
boundary:
|
|
764
|
-
rootBoundary:
|
|
700
|
+
boundary: f = "clippingAncestors",
|
|
701
|
+
rootBoundary: l = "viewport",
|
|
765
702
|
elementContext: u = "floating",
|
|
766
703
|
altBoundary: p = !1,
|
|
767
704
|
padding: h = 0
|
|
768
|
-
} =
|
|
705
|
+
} = re(t, e), g = In(h), v = c[p ? u === "floating" ? "reference" : "floating" : u], w = tt(await i.getClippingRect({
|
|
769
706
|
element: (n = await (i.isElement == null ? void 0 : i.isElement(v))) == null || n ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
770
|
-
boundary:
|
|
771
|
-
rootBoundary:
|
|
707
|
+
boundary: f,
|
|
708
|
+
rootBoundary: l,
|
|
772
709
|
strategy: d
|
|
773
|
-
})),
|
|
710
|
+
})), E = u === "floating" ? {
|
|
774
711
|
x: r,
|
|
775
712
|
y: o,
|
|
776
713
|
width: s.floating.width,
|
|
777
714
|
height: s.floating.height
|
|
778
|
-
} : s.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)),
|
|
715
|
+
} : s.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), C = await (i.isElement == null ? void 0 : i.isElement(b)) ? await (i.getScale == null ? void 0 : i.getScale(b)) || {
|
|
779
716
|
x: 1,
|
|
780
717
|
y: 1
|
|
781
718
|
} : {
|
|
782
719
|
x: 1,
|
|
783
720
|
y: 1
|
|
784
|
-
},
|
|
721
|
+
}, S = tt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
785
722
|
elements: c,
|
|
786
|
-
rect:
|
|
723
|
+
rect: E,
|
|
787
724
|
offsetParent: b,
|
|
788
725
|
strategy: d
|
|
789
|
-
}) :
|
|
726
|
+
}) : E);
|
|
790
727
|
return {
|
|
791
|
-
top: (w.top -
|
|
792
|
-
bottom: (
|
|
793
|
-
left: (w.left -
|
|
794
|
-
right: (
|
|
728
|
+
top: (w.top - S.top + g.top) / C.y,
|
|
729
|
+
bottom: (S.bottom - w.bottom + g.bottom) / C.y,
|
|
730
|
+
left: (w.left - S.left + g.left) / C.x,
|
|
731
|
+
right: (S.right - w.right + g.right) / C.x
|
|
795
732
|
};
|
|
796
733
|
}
|
|
797
|
-
const Qo = (e) =>
|
|
734
|
+
const Qo = 50, Jo = async (e, t, n) => {
|
|
735
|
+
const {
|
|
736
|
+
placement: r = "bottom",
|
|
737
|
+
strategy: o = "absolute",
|
|
738
|
+
middleware: i = [],
|
|
739
|
+
platform: s
|
|
740
|
+
} = n, c = s.detectOverflow ? s : {
|
|
741
|
+
...s,
|
|
742
|
+
detectOverflow: qo
|
|
743
|
+
}, d = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
744
|
+
let f = await s.getElementRects({
|
|
745
|
+
reference: e,
|
|
746
|
+
floating: t,
|
|
747
|
+
strategy: o
|
|
748
|
+
}), {
|
|
749
|
+
x: l,
|
|
750
|
+
y: u
|
|
751
|
+
} = an(f, r, d), p = r, h = 0;
|
|
752
|
+
const g = {};
|
|
753
|
+
for (let m = 0; m < i.length; m++) {
|
|
754
|
+
const v = i[m];
|
|
755
|
+
if (!v)
|
|
756
|
+
continue;
|
|
757
|
+
const {
|
|
758
|
+
name: w,
|
|
759
|
+
fn: E
|
|
760
|
+
} = v, {
|
|
761
|
+
x: b,
|
|
762
|
+
y: C,
|
|
763
|
+
data: S,
|
|
764
|
+
reset: R
|
|
765
|
+
} = await E({
|
|
766
|
+
x: l,
|
|
767
|
+
y: u,
|
|
768
|
+
initialPlacement: r,
|
|
769
|
+
placement: p,
|
|
770
|
+
strategy: o,
|
|
771
|
+
middlewareData: g,
|
|
772
|
+
rects: f,
|
|
773
|
+
platform: c,
|
|
774
|
+
elements: {
|
|
775
|
+
reference: e,
|
|
776
|
+
floating: t
|
|
777
|
+
}
|
|
778
|
+
});
|
|
779
|
+
l = b ?? l, u = C ?? u, g[w] = {
|
|
780
|
+
...g[w],
|
|
781
|
+
...S
|
|
782
|
+
}, R && h < Qo && (h++, typeof R == "object" && (R.placement && (p = R.placement), R.rects && (f = R.rects === !0 ? await s.getElementRects({
|
|
783
|
+
reference: e,
|
|
784
|
+
floating: t,
|
|
785
|
+
strategy: o
|
|
786
|
+
}) : R.rects), {
|
|
787
|
+
x: l,
|
|
788
|
+
y: u
|
|
789
|
+
} = an(f, p, d)), m = -1);
|
|
790
|
+
}
|
|
791
|
+
return {
|
|
792
|
+
x: l,
|
|
793
|
+
y: u,
|
|
794
|
+
placement: p,
|
|
795
|
+
strategy: o,
|
|
796
|
+
middlewareData: g
|
|
797
|
+
};
|
|
798
|
+
}, ei = (e) => ({
|
|
798
799
|
name: "arrow",
|
|
799
800
|
options: e,
|
|
800
801
|
async fn(t) {
|
|
@@ -807,23 +808,23 @@ const Qo = (e) => ({
|
|
|
807
808
|
elements: c,
|
|
808
809
|
middlewareData: d
|
|
809
810
|
} = t, {
|
|
810
|
-
element:
|
|
811
|
-
padding:
|
|
812
|
-
} =
|
|
813
|
-
if (
|
|
811
|
+
element: f,
|
|
812
|
+
padding: l = 0
|
|
813
|
+
} = re(e, t) || {};
|
|
814
|
+
if (f == null)
|
|
814
815
|
return {};
|
|
815
|
-
const u =
|
|
816
|
+
const u = In(l), p = {
|
|
816
817
|
x: n,
|
|
817
818
|
y: r
|
|
818
|
-
}, h =
|
|
819
|
-
let
|
|
820
|
-
(!
|
|
821
|
-
const A =
|
|
819
|
+
}, h = Nt(o), g = Dt(h), m = await s.getDimensions(f), v = h === "y", w = v ? "top" : "left", E = v ? "bottom" : "right", b = v ? "clientHeight" : "clientWidth", C = i.reference[g] + i.reference[h] - p[h] - i.floating[g], S = p[h] - i.reference[h], R = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(f));
|
|
820
|
+
let x = R ? R[b] : 0;
|
|
821
|
+
(!x || !await (s.isElement == null ? void 0 : s.isElement(R))) && (x = c.floating[b] || i.floating[g]);
|
|
822
|
+
const A = C / 2 - S / 2, I = x / 2 - m[g] / 2 - 1, _ = ae(u[w], I), D = ae(u[E], I), L = _, F = x - m[g] - D, N = x / 2 - m[g] / 2 + A, W = Rt(L, N, F), T = !d.arrow && Ee(o) != null && N !== W && i.reference[g] / 2 - (N < L ? _ : D) - m[g] / 2 < 0, $ = T ? N < L ? N - L : N - F : 0;
|
|
822
823
|
return {
|
|
823
824
|
[h]: p[h] + $,
|
|
824
825
|
data: {
|
|
825
|
-
[h]:
|
|
826
|
-
centerOffset:
|
|
826
|
+
[h]: W,
|
|
827
|
+
centerOffset: N - W - $,
|
|
827
828
|
...T && {
|
|
828
829
|
alignmentOffset: $
|
|
829
830
|
}
|
|
@@ -831,7 +832,7 @@ const Qo = (e) => ({
|
|
|
831
832
|
reset: T
|
|
832
833
|
};
|
|
833
834
|
}
|
|
834
|
-
}),
|
|
835
|
+
}), ti = function(e) {
|
|
835
836
|
return e === void 0 && (e = {}), {
|
|
836
837
|
name: "flip",
|
|
837
838
|
options: e,
|
|
@@ -843,58 +844,58 @@ const Qo = (e) => ({
|
|
|
843
844
|
rects: s,
|
|
844
845
|
initialPlacement: c,
|
|
845
846
|
platform: d,
|
|
846
|
-
elements:
|
|
847
|
+
elements: f
|
|
847
848
|
} = t, {
|
|
848
|
-
mainAxis:
|
|
849
|
+
mainAxis: l = !0,
|
|
849
850
|
crossAxis: u = !0,
|
|
850
851
|
fallbackPlacements: p,
|
|
851
852
|
fallbackStrategy: h = "bestFit",
|
|
852
853
|
fallbackAxisSideDirection: g = "none",
|
|
853
854
|
flipAlignment: m = !0,
|
|
854
855
|
...v
|
|
855
|
-
} =
|
|
856
|
+
} = re(e, t);
|
|
856
857
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
857
858
|
return {};
|
|
858
|
-
const w =
|
|
859
|
-
!p &&
|
|
860
|
-
const
|
|
859
|
+
const w = oe(o), E = Q(c), b = oe(c) === c, C = await (d.isRTL == null ? void 0 : d.isRTL(f.floating)), S = p || (b || !m ? [et(c)] : Ho(c)), R = g !== "none";
|
|
860
|
+
!p && R && S.push(...Xo(c, m, g, C));
|
|
861
|
+
const x = [c, ...S], A = await d.detectOverflow(t, v), I = [];
|
|
861
862
|
let _ = ((r = i.flip) == null ? void 0 : r.overflows) || [];
|
|
862
|
-
if (
|
|
863
|
-
const
|
|
864
|
-
I.push(A[
|
|
863
|
+
if (l && I.push(A[w]), u) {
|
|
864
|
+
const N = Vo(o, s, C);
|
|
865
|
+
I.push(A[N[0]], A[N[1]]);
|
|
865
866
|
}
|
|
866
867
|
if (_ = [..._, {
|
|
867
868
|
placement: o,
|
|
868
869
|
overflows: I
|
|
869
|
-
}], !I.every((
|
|
870
|
-
var
|
|
871
|
-
const
|
|
872
|
-
if (
|
|
870
|
+
}], !I.every((N) => N <= 0)) {
|
|
871
|
+
var D, L;
|
|
872
|
+
const N = (((D = i.flip) == null ? void 0 : D.index) || 0) + 1, W = x[N];
|
|
873
|
+
if (W && (!(u === "alignment" ? E !== Q(W) : !1) || // We leave the current main axis only if every placement on that axis
|
|
873
874
|
// overflows the main axis.
|
|
874
|
-
_.every((P) => Q(P.placement) ===
|
|
875
|
+
_.every((P) => Q(P.placement) === E ? P.overflows[0] > 0 : !0)))
|
|
875
876
|
return {
|
|
876
877
|
data: {
|
|
877
|
-
index:
|
|
878
|
+
index: N,
|
|
878
879
|
overflows: _
|
|
879
880
|
},
|
|
880
881
|
reset: {
|
|
881
|
-
placement:
|
|
882
|
+
placement: W
|
|
882
883
|
}
|
|
883
884
|
};
|
|
884
|
-
let T = (
|
|
885
|
+
let T = (L = _.filter(($) => $.overflows[0] <= 0).sort(($, P) => $.overflows[1] - P.overflows[1])[0]) == null ? void 0 : L.placement;
|
|
885
886
|
if (!T)
|
|
886
887
|
switch (h) {
|
|
887
888
|
case "bestFit": {
|
|
888
|
-
var
|
|
889
|
-
const $ = (
|
|
890
|
-
if (
|
|
891
|
-
const
|
|
892
|
-
return
|
|
889
|
+
var F;
|
|
890
|
+
const $ = (F = _.filter((P) => {
|
|
891
|
+
if (R) {
|
|
892
|
+
const M = Q(P.placement);
|
|
893
|
+
return M === E || // Create a bias to the `y` side axis due to horizontal
|
|
893
894
|
// reading directions favoring greater width.
|
|
894
|
-
|
|
895
|
+
M === "y";
|
|
895
896
|
}
|
|
896
897
|
return !0;
|
|
897
|
-
}).map((P) => [P.placement, P.overflows.filter((
|
|
898
|
+
}).map((P) => [P.placement, P.overflows.filter((M) => M > 0).reduce((M, k) => M + k, 0)]).sort((P, M) => P[1] - M[1])[0]) == null ? void 0 : F[0];
|
|
898
899
|
$ && (T = $);
|
|
899
900
|
break;
|
|
900
901
|
}
|
|
@@ -913,7 +914,7 @@ const Qo = (e) => ({
|
|
|
913
914
|
}
|
|
914
915
|
};
|
|
915
916
|
};
|
|
916
|
-
function
|
|
917
|
+
function un(e, t) {
|
|
917
918
|
return {
|
|
918
919
|
top: e.top - t.height,
|
|
919
920
|
right: e.right - t.width,
|
|
@@ -921,42 +922,43 @@ function an(e, t) {
|
|
|
921
922
|
left: e.left - t.width
|
|
922
923
|
};
|
|
923
924
|
}
|
|
924
|
-
function
|
|
925
|
-
return
|
|
925
|
+
function ln(e) {
|
|
926
|
+
return Ko.some((t) => e[t] >= 0);
|
|
926
927
|
}
|
|
927
|
-
const
|
|
928
|
+
const ni = function(e) {
|
|
928
929
|
return e === void 0 && (e = {}), {
|
|
929
930
|
name: "hide",
|
|
930
931
|
options: e,
|
|
931
932
|
async fn(t) {
|
|
932
933
|
const {
|
|
933
|
-
rects: n
|
|
934
|
+
rects: n,
|
|
935
|
+
platform: r
|
|
934
936
|
} = t, {
|
|
935
|
-
strategy:
|
|
936
|
-
...
|
|
937
|
-
} =
|
|
938
|
-
switch (
|
|
937
|
+
strategy: o = "referenceHidden",
|
|
938
|
+
...i
|
|
939
|
+
} = re(e, t);
|
|
940
|
+
switch (o) {
|
|
939
941
|
case "referenceHidden": {
|
|
940
|
-
const
|
|
941
|
-
...
|
|
942
|
+
const s = await r.detectOverflow(t, {
|
|
943
|
+
...i,
|
|
942
944
|
elementContext: "reference"
|
|
943
|
-
}),
|
|
945
|
+
}), c = un(s, n.reference);
|
|
944
946
|
return {
|
|
945
947
|
data: {
|
|
946
|
-
referenceHiddenOffsets:
|
|
947
|
-
referenceHidden:
|
|
948
|
+
referenceHiddenOffsets: c,
|
|
949
|
+
referenceHidden: ln(c)
|
|
948
950
|
}
|
|
949
951
|
};
|
|
950
952
|
}
|
|
951
953
|
case "escaped": {
|
|
952
|
-
const
|
|
953
|
-
...
|
|
954
|
+
const s = await r.detectOverflow(t, {
|
|
955
|
+
...i,
|
|
954
956
|
altBoundary: !0
|
|
955
|
-
}),
|
|
957
|
+
}), c = un(s, n.floating);
|
|
956
958
|
return {
|
|
957
959
|
data: {
|
|
958
|
-
escapedOffsets:
|
|
959
|
-
escaped:
|
|
960
|
+
escapedOffsets: c,
|
|
961
|
+
escaped: ln(c)
|
|
960
962
|
}
|
|
961
963
|
};
|
|
962
964
|
}
|
|
@@ -965,13 +967,13 @@ const ei = function(e) {
|
|
|
965
967
|
}
|
|
966
968
|
}
|
|
967
969
|
};
|
|
968
|
-
},
|
|
969
|
-
async function
|
|
970
|
+
}, Dn = /* @__PURE__ */ new Set(["left", "top"]);
|
|
971
|
+
async function ri(e, t) {
|
|
970
972
|
const {
|
|
971
973
|
placement: n,
|
|
972
974
|
platform: r,
|
|
973
975
|
elements: o
|
|
974
|
-
} = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s =
|
|
976
|
+
} = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = oe(n), c = Ee(n), d = Q(n) === "y", f = Dn.has(s) ? -1 : 1, l = i && d ? -1 : 1, u = re(t, e);
|
|
975
977
|
let {
|
|
976
978
|
mainAxis: p,
|
|
977
979
|
crossAxis: h,
|
|
@@ -986,14 +988,14 @@ async function ti(e, t) {
|
|
|
986
988
|
alignmentAxis: u.alignmentAxis
|
|
987
989
|
};
|
|
988
990
|
return c && typeof g == "number" && (h = c === "end" ? g * -1 : g), d ? {
|
|
989
|
-
x: h *
|
|
990
|
-
y: p *
|
|
991
|
+
x: h * l,
|
|
992
|
+
y: p * f
|
|
991
993
|
} : {
|
|
992
|
-
x: p *
|
|
993
|
-
y: h *
|
|
994
|
+
x: p * f,
|
|
995
|
+
y: h * l
|
|
994
996
|
};
|
|
995
997
|
}
|
|
996
|
-
const
|
|
998
|
+
const oi = function(e) {
|
|
997
999
|
return e === void 0 && (e = 0), {
|
|
998
1000
|
name: "offset",
|
|
999
1001
|
options: e,
|
|
@@ -1004,7 +1006,7 @@ const ni = function(e) {
|
|
|
1004
1006
|
y: i,
|
|
1005
1007
|
placement: s,
|
|
1006
1008
|
middlewareData: c
|
|
1007
|
-
} = t, d = await
|
|
1009
|
+
} = t, d = await ri(t, e);
|
|
1008
1010
|
return s === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
|
|
1009
1011
|
x: o + d.x,
|
|
1010
1012
|
y: i + d.y,
|
|
@@ -1015,7 +1017,7 @@ const ni = function(e) {
|
|
|
1015
1017
|
};
|
|
1016
1018
|
}
|
|
1017
1019
|
};
|
|
1018
|
-
},
|
|
1020
|
+
}, ii = function(e) {
|
|
1019
1021
|
return e === void 0 && (e = {}), {
|
|
1020
1022
|
name: "shift",
|
|
1021
1023
|
options: e,
|
|
@@ -1023,55 +1025,56 @@ const ni = function(e) {
|
|
|
1023
1025
|
const {
|
|
1024
1026
|
x: n,
|
|
1025
1027
|
y: r,
|
|
1026
|
-
placement: o
|
|
1028
|
+
placement: o,
|
|
1029
|
+
platform: i
|
|
1027
1030
|
} = t, {
|
|
1028
|
-
mainAxis:
|
|
1029
|
-
crossAxis:
|
|
1030
|
-
limiter:
|
|
1031
|
-
fn: (
|
|
1031
|
+
mainAxis: s = !0,
|
|
1032
|
+
crossAxis: c = !1,
|
|
1033
|
+
limiter: d = {
|
|
1034
|
+
fn: (w) => {
|
|
1032
1035
|
let {
|
|
1033
|
-
x:
|
|
1034
|
-
y:
|
|
1035
|
-
} =
|
|
1036
|
+
x: E,
|
|
1037
|
+
y: b
|
|
1038
|
+
} = w;
|
|
1036
1039
|
return {
|
|
1037
|
-
x:
|
|
1038
|
-
y:
|
|
1040
|
+
x: E,
|
|
1041
|
+
y: b
|
|
1039
1042
|
};
|
|
1040
1043
|
}
|
|
1041
1044
|
},
|
|
1042
|
-
...
|
|
1043
|
-
} =
|
|
1045
|
+
...f
|
|
1046
|
+
} = re(e, t), l = {
|
|
1044
1047
|
x: n,
|
|
1045
1048
|
y: r
|
|
1046
|
-
},
|
|
1047
|
-
let
|
|
1048
|
-
if (i) {
|
|
1049
|
-
const v = p === "y" ? "top" : "left", w = p === "y" ? "bottom" : "right", C = h + f[v], b = h - f[w];
|
|
1050
|
-
h = xt(C, h, b);
|
|
1051
|
-
}
|
|
1049
|
+
}, u = await i.detectOverflow(t, f), p = Q(oe(o)), h = It(p);
|
|
1050
|
+
let g = l[h], m = l[p];
|
|
1052
1051
|
if (s) {
|
|
1053
|
-
const
|
|
1054
|
-
g =
|
|
1052
|
+
const w = h === "y" ? "top" : "left", E = h === "y" ? "bottom" : "right", b = g + u[w], C = g - u[E];
|
|
1053
|
+
g = Rt(b, g, C);
|
|
1054
|
+
}
|
|
1055
|
+
if (c) {
|
|
1056
|
+
const w = p === "y" ? "top" : "left", E = p === "y" ? "bottom" : "right", b = m + u[w], C = m - u[E];
|
|
1057
|
+
m = Rt(b, m, C);
|
|
1055
1058
|
}
|
|
1056
|
-
const
|
|
1059
|
+
const v = d.fn({
|
|
1057
1060
|
...t,
|
|
1058
|
-
[
|
|
1059
|
-
[
|
|
1061
|
+
[h]: g,
|
|
1062
|
+
[p]: m
|
|
1060
1063
|
});
|
|
1061
1064
|
return {
|
|
1062
|
-
...
|
|
1065
|
+
...v,
|
|
1063
1066
|
data: {
|
|
1064
|
-
x:
|
|
1065
|
-
y:
|
|
1067
|
+
x: v.x - n,
|
|
1068
|
+
y: v.y - r,
|
|
1066
1069
|
enabled: {
|
|
1067
|
-
[
|
|
1068
|
-
[
|
|
1070
|
+
[h]: s,
|
|
1071
|
+
[p]: c
|
|
1069
1072
|
}
|
|
1070
1073
|
}
|
|
1071
1074
|
};
|
|
1072
1075
|
}
|
|
1073
1076
|
};
|
|
1074
|
-
},
|
|
1077
|
+
}, ci = function(e) {
|
|
1075
1078
|
return e === void 0 && (e = {}), {
|
|
1076
1079
|
options: e,
|
|
1077
1080
|
fn(t) {
|
|
@@ -1084,13 +1087,13 @@ const ni = function(e) {
|
|
|
1084
1087
|
} = t, {
|
|
1085
1088
|
offset: c = 0,
|
|
1086
1089
|
mainAxis: d = !0,
|
|
1087
|
-
crossAxis:
|
|
1088
|
-
} =
|
|
1090
|
+
crossAxis: f = !0
|
|
1091
|
+
} = re(e, t), l = {
|
|
1089
1092
|
x: n,
|
|
1090
1093
|
y: r
|
|
1091
|
-
}, u = Q(o), p =
|
|
1092
|
-
let h =
|
|
1093
|
-
const m =
|
|
1094
|
+
}, u = Q(o), p = It(u);
|
|
1095
|
+
let h = l[p], g = l[u];
|
|
1096
|
+
const m = re(c, t), v = typeof m == "number" ? {
|
|
1094
1097
|
mainAxis: m,
|
|
1095
1098
|
crossAxis: 0
|
|
1096
1099
|
} : {
|
|
@@ -1099,13 +1102,13 @@ const ni = function(e) {
|
|
|
1099
1102
|
...m
|
|
1100
1103
|
};
|
|
1101
1104
|
if (d) {
|
|
1102
|
-
const b = p === "y" ? "height" : "width",
|
|
1103
|
-
h <
|
|
1105
|
+
const b = p === "y" ? "height" : "width", C = i.reference[p] - i.floating[b] + v.mainAxis, S = i.reference[p] + i.reference[b] - v.mainAxis;
|
|
1106
|
+
h < C ? h = C : h > S && (h = S);
|
|
1104
1107
|
}
|
|
1105
|
-
if (
|
|
1106
|
-
var w,
|
|
1107
|
-
const b = p === "y" ? "width" : "height",
|
|
1108
|
-
g <
|
|
1108
|
+
if (f) {
|
|
1109
|
+
var w, E;
|
|
1110
|
+
const b = p === "y" ? "width" : "height", C = Dn.has(oe(o)), S = i.reference[u] - i.floating[b] + (C && ((w = s.offset) == null ? void 0 : w[u]) || 0) + (C ? 0 : v.crossAxis), R = i.reference[u] + i.reference[b] + (C ? 0 : ((E = s.offset) == null ? void 0 : E[u]) || 0) - (C ? v.crossAxis : 0);
|
|
1111
|
+
g < S ? g = S : g > R && (g = R);
|
|
1109
1112
|
}
|
|
1110
1113
|
return {
|
|
1111
1114
|
[p]: h,
|
|
@@ -1113,7 +1116,7 @@ const ni = function(e) {
|
|
|
1113
1116
|
};
|
|
1114
1117
|
}
|
|
1115
1118
|
};
|
|
1116
|
-
},
|
|
1119
|
+
}, si = function(e) {
|
|
1117
1120
|
return e === void 0 && (e = {}), {
|
|
1118
1121
|
name: "size",
|
|
1119
1122
|
options: e,
|
|
@@ -1127,23 +1130,23 @@ const ni = function(e) {
|
|
|
1127
1130
|
} = t, {
|
|
1128
1131
|
apply: d = () => {
|
|
1129
1132
|
},
|
|
1130
|
-
...
|
|
1131
|
-
} =
|
|
1133
|
+
...f
|
|
1134
|
+
} = re(e, t), l = await s.detectOverflow(t, f), u = oe(o), p = Ee(o), h = Q(o) === "y", {
|
|
1132
1135
|
width: g,
|
|
1133
1136
|
height: m
|
|
1134
1137
|
} = i.floating;
|
|
1135
1138
|
let v, w;
|
|
1136
1139
|
u === "top" || u === "bottom" ? (v = u, w = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (w = u, v = p === "end" ? "top" : "bottom");
|
|
1137
|
-
const
|
|
1138
|
-
let
|
|
1139
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (A = b), (r = t.middlewareData.shift) != null && r.enabled.y && (
|
|
1140
|
-
const _ = V(
|
|
1141
|
-
h ? A = g - 2 * (_ !== 0 ||
|
|
1140
|
+
const E = m - l.top - l.bottom, b = g - l.left - l.right, C = ae(m - l[v], E), S = ae(g - l[w], b), R = !t.middlewareData.shift;
|
|
1141
|
+
let x = C, A = S;
|
|
1142
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (A = b), (r = t.middlewareData.shift) != null && r.enabled.y && (x = E), R && !p) {
|
|
1143
|
+
const _ = V(l.left, 0), D = V(l.right, 0), L = V(l.top, 0), F = V(l.bottom, 0);
|
|
1144
|
+
h ? A = g - 2 * (_ !== 0 || D !== 0 ? _ + D : V(l.left, l.right)) : x = m - 2 * (L !== 0 || F !== 0 ? L + F : V(l.top, l.bottom));
|
|
1142
1145
|
}
|
|
1143
1146
|
await d({
|
|
1144
1147
|
...t,
|
|
1145
1148
|
availableWidth: A,
|
|
1146
|
-
availableHeight:
|
|
1149
|
+
availableHeight: x
|
|
1147
1150
|
});
|
|
1148
1151
|
const I = await s.getDimensions(c.floating);
|
|
1149
1152
|
return g !== I.width || m !== I.height ? {
|
|
@@ -1154,33 +1157,32 @@ const ni = function(e) {
|
|
|
1154
1157
|
}
|
|
1155
1158
|
};
|
|
1156
1159
|
};
|
|
1157
|
-
function
|
|
1160
|
+
function ct() {
|
|
1158
1161
|
return typeof window < "u";
|
|
1159
1162
|
}
|
|
1160
|
-
function
|
|
1161
|
-
return
|
|
1163
|
+
function xe(e) {
|
|
1164
|
+
return Nn(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1162
1165
|
}
|
|
1163
1166
|
function H(e) {
|
|
1164
1167
|
var t;
|
|
1165
1168
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1166
1169
|
}
|
|
1167
|
-
function
|
|
1170
|
+
function te(e) {
|
|
1168
1171
|
var t;
|
|
1169
|
-
return (t = (
|
|
1172
|
+
return (t = (Nn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1170
1173
|
}
|
|
1171
|
-
function
|
|
1172
|
-
return
|
|
1174
|
+
function Nn(e) {
|
|
1175
|
+
return ct() ? e instanceof Node || e instanceof H(e).Node : !1;
|
|
1173
1176
|
}
|
|
1174
1177
|
function j(e) {
|
|
1175
|
-
return
|
|
1178
|
+
return ct() ? e instanceof Element || e instanceof H(e).Element : !1;
|
|
1176
1179
|
}
|
|
1177
|
-
function
|
|
1178
|
-
return
|
|
1180
|
+
function ie(e) {
|
|
1181
|
+
return ct() ? e instanceof HTMLElement || e instanceof H(e).HTMLElement : !1;
|
|
1179
1182
|
}
|
|
1180
|
-
function
|
|
1181
|
-
return !
|
|
1183
|
+
function fn(e) {
|
|
1184
|
+
return !ct() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof H(e).ShadowRoot;
|
|
1182
1185
|
}
|
|
1183
|
-
const si = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1184
1186
|
function Le(e) {
|
|
1185
1187
|
const {
|
|
1186
1188
|
overflow: t,
|
|
@@ -1188,44 +1190,45 @@ function Le(e) {
|
|
|
1188
1190
|
overflowY: r,
|
|
1189
1191
|
display: o
|
|
1190
1192
|
} = X(e);
|
|
1191
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) &&
|
|
1193
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && o !== "inline" && o !== "contents";
|
|
1192
1194
|
}
|
|
1193
|
-
const ci = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
1194
1195
|
function ai(e) {
|
|
1195
|
-
return
|
|
1196
|
+
return /^(table|td|th)$/.test(xe(e));
|
|
1196
1197
|
}
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
}
|
|
1198
|
+
function st(e) {
|
|
1199
|
+
try {
|
|
1200
|
+
if (e.matches(":popover-open"))
|
|
1201
|
+
return !0;
|
|
1202
|
+
} catch {
|
|
1203
|
+
}
|
|
1204
|
+
try {
|
|
1205
|
+
return e.matches(":modal");
|
|
1206
|
+
} catch {
|
|
1207
|
+
return !1;
|
|
1208
|
+
}
|
|
1206
1209
|
}
|
|
1207
|
-
const
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1210
|
+
const ui = /transform|translate|scale|rotate|perspective|filter/, li = /paint|layout|strict|content/, pe = (e) => !!e && e !== "none";
|
|
1211
|
+
let vt;
|
|
1212
|
+
function Lt(e) {
|
|
1213
|
+
const t = j(e) ? X(e) : e;
|
|
1214
|
+
return pe(t.transform) || pe(t.translate) || pe(t.scale) || pe(t.rotate) || pe(t.perspective) || !Ft() && (pe(t.backdropFilter) || pe(t.filter)) || ui.test(t.willChange || "") || li.test(t.contain || "");
|
|
1211
1215
|
}
|
|
1212
|
-
function
|
|
1216
|
+
function fi(e) {
|
|
1213
1217
|
let t = ue(e);
|
|
1214
|
-
for (;
|
|
1215
|
-
if (
|
|
1218
|
+
for (; ie(t) && !Ce(t); ) {
|
|
1219
|
+
if (Lt(t))
|
|
1216
1220
|
return t;
|
|
1217
|
-
if (
|
|
1221
|
+
if (st(t))
|
|
1218
1222
|
return null;
|
|
1219
1223
|
t = ue(t);
|
|
1220
1224
|
}
|
|
1221
1225
|
return null;
|
|
1222
1226
|
}
|
|
1223
|
-
function
|
|
1224
|
-
return typeof CSS
|
|
1227
|
+
function Ft() {
|
|
1228
|
+
return vt == null && (vt = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), vt;
|
|
1225
1229
|
}
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
return mi.has(Ee(e));
|
|
1230
|
+
function Ce(e) {
|
|
1231
|
+
return /^(html|body|#document)$/.test(xe(e));
|
|
1229
1232
|
}
|
|
1230
1233
|
function X(e) {
|
|
1231
1234
|
return H(e).getComputedStyle(e);
|
|
@@ -1240,143 +1243,139 @@ function at(e) {
|
|
|
1240
1243
|
};
|
|
1241
1244
|
}
|
|
1242
1245
|
function ue(e) {
|
|
1243
|
-
if (
|
|
1246
|
+
if (xe(e) === "html")
|
|
1244
1247
|
return e;
|
|
1245
1248
|
const t = (
|
|
1246
1249
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1247
1250
|
e.assignedSlot || // DOM Element detected.
|
|
1248
1251
|
e.parentNode || // ShadowRoot detected.
|
|
1249
|
-
|
|
1250
|
-
|
|
1252
|
+
fn(e) && e.host || // Fallback.
|
|
1253
|
+
te(e)
|
|
1251
1254
|
);
|
|
1252
|
-
return
|
|
1255
|
+
return fn(t) ? t.host : t;
|
|
1253
1256
|
}
|
|
1254
|
-
function
|
|
1257
|
+
function Ln(e) {
|
|
1255
1258
|
const t = ue(e);
|
|
1256
|
-
return
|
|
1259
|
+
return Ce(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : ie(t) && Le(t) ? t : Ln(t);
|
|
1257
1260
|
}
|
|
1258
1261
|
function Te(e, t, n) {
|
|
1259
1262
|
var r;
|
|
1260
1263
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1261
|
-
const o =
|
|
1264
|
+
const o = Ln(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = H(o);
|
|
1262
1265
|
if (i) {
|
|
1263
|
-
const c =
|
|
1266
|
+
const c = At(s);
|
|
1264
1267
|
return t.concat(s, s.visualViewport || [], Le(o) ? o : [], c && n ? Te(c) : []);
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1268
|
+
} else
|
|
1269
|
+
return t.concat(o, Te(o, [], n));
|
|
1267
1270
|
}
|
|
1268
|
-
function
|
|
1271
|
+
function At(e) {
|
|
1269
1272
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1270
1273
|
}
|
|
1271
|
-
function
|
|
1274
|
+
function Fn(e) {
|
|
1272
1275
|
const t = X(e);
|
|
1273
1276
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
1274
|
-
const o =
|
|
1277
|
+
const o = ie(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c = Je(n) !== i || Je(r) !== s;
|
|
1275
1278
|
return c && (n = i, r = s), {
|
|
1276
1279
|
width: n,
|
|
1277
1280
|
height: r,
|
|
1278
1281
|
$: c
|
|
1279
1282
|
};
|
|
1280
1283
|
}
|
|
1281
|
-
function
|
|
1284
|
+
function kt(e) {
|
|
1282
1285
|
return j(e) ? e : e.contextElement;
|
|
1283
1286
|
}
|
|
1284
|
-
function
|
|
1285
|
-
const t =
|
|
1286
|
-
if (!
|
|
1287
|
+
function ye(e) {
|
|
1288
|
+
const t = kt(e);
|
|
1289
|
+
if (!ie(t))
|
|
1287
1290
|
return J(1);
|
|
1288
1291
|
const n = t.getBoundingClientRect(), {
|
|
1289
1292
|
width: r,
|
|
1290
1293
|
height: o,
|
|
1291
1294
|
$: i
|
|
1292
|
-
} =
|
|
1295
|
+
} = Fn(t);
|
|
1293
1296
|
let s = (i ? Je(n.width) : n.width) / r, c = (i ? Je(n.height) : n.height) / o;
|
|
1294
1297
|
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
1295
1298
|
x: s,
|
|
1296
1299
|
y: c
|
|
1297
1300
|
};
|
|
1298
1301
|
}
|
|
1299
|
-
const
|
|
1300
|
-
function
|
|
1302
|
+
const di = /* @__PURE__ */ J(0);
|
|
1303
|
+
function kn(e) {
|
|
1301
1304
|
const t = H(e);
|
|
1302
|
-
return !
|
|
1305
|
+
return !Ft() || !t.visualViewport ? di : {
|
|
1303
1306
|
x: t.visualViewport.offsetLeft,
|
|
1304
1307
|
y: t.visualViewport.offsetTop
|
|
1305
1308
|
};
|
|
1306
1309
|
}
|
|
1307
|
-
function
|
|
1310
|
+
function pi(e, t, n) {
|
|
1308
1311
|
return t === void 0 && (t = !1), !n || t && n !== H(e) ? !1 : t;
|
|
1309
1312
|
}
|
|
1310
|
-
function
|
|
1313
|
+
function me(e, t, n, r) {
|
|
1311
1314
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1312
|
-
const o = e.getBoundingClientRect(), i =
|
|
1315
|
+
const o = e.getBoundingClientRect(), i = kt(e);
|
|
1313
1316
|
let s = J(1);
|
|
1314
|
-
t && (r ? j(r) && (s =
|
|
1315
|
-
const c =
|
|
1316
|
-
let d = (o.left + c.x) / s.x,
|
|
1317
|
+
t && (r ? j(r) && (s = ye(r)) : s = ye(e));
|
|
1318
|
+
const c = pi(i, n, r) ? kn(i) : J(0);
|
|
1319
|
+
let d = (o.left + c.x) / s.x, f = (o.top + c.y) / s.y, l = o.width / s.x, u = o.height / s.y;
|
|
1317
1320
|
if (i) {
|
|
1318
1321
|
const p = H(i), h = r && j(r) ? H(r) : r;
|
|
1319
|
-
let g = p, m =
|
|
1322
|
+
let g = p, m = At(g);
|
|
1320
1323
|
for (; m && r && h !== g; ) {
|
|
1321
|
-
const v =
|
|
1322
|
-
d *= v.x,
|
|
1324
|
+
const v = ye(m), w = m.getBoundingClientRect(), E = X(m), b = w.left + (m.clientLeft + parseFloat(E.paddingLeft)) * v.x, C = w.top + (m.clientTop + parseFloat(E.paddingTop)) * v.y;
|
|
1325
|
+
d *= v.x, f *= v.y, l *= v.x, u *= v.y, d += b, f += C, g = H(m), m = At(g);
|
|
1323
1326
|
}
|
|
1324
1327
|
}
|
|
1325
1328
|
return tt({
|
|
1326
|
-
width:
|
|
1329
|
+
width: l,
|
|
1327
1330
|
height: u,
|
|
1328
1331
|
x: d,
|
|
1329
|
-
y:
|
|
1332
|
+
y: f
|
|
1330
1333
|
});
|
|
1331
1334
|
}
|
|
1332
|
-
function
|
|
1335
|
+
function ut(e, t) {
|
|
1333
1336
|
const n = at(e).scrollLeft;
|
|
1334
|
-
return t ? t.left + n :
|
|
1337
|
+
return t ? t.left + n : me(te(e)).left + n;
|
|
1335
1338
|
}
|
|
1336
|
-
function
|
|
1337
|
-
n
|
|
1338
|
-
const r = e.getBoundingClientRect(), o = r.left + t.scrollLeft - (n ? 0 : (
|
|
1339
|
-
// RTL <body> scrollbar.
|
|
1340
|
-
Ft(e, r)
|
|
1341
|
-
)), i = r.top + t.scrollTop;
|
|
1339
|
+
function $n(e, t) {
|
|
1340
|
+
const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - ut(e, n), o = n.top + t.scrollTop;
|
|
1342
1341
|
return {
|
|
1343
|
-
x:
|
|
1344
|
-
y:
|
|
1342
|
+
x: r,
|
|
1343
|
+
y: o
|
|
1345
1344
|
};
|
|
1346
1345
|
}
|
|
1347
|
-
function
|
|
1346
|
+
function mi(e) {
|
|
1348
1347
|
let {
|
|
1349
1348
|
elements: t,
|
|
1350
1349
|
rect: n,
|
|
1351
1350
|
offsetParent: r,
|
|
1352
1351
|
strategy: o
|
|
1353
1352
|
} = e;
|
|
1354
|
-
const i = o === "fixed", s =
|
|
1353
|
+
const i = o === "fixed", s = te(r), c = t ? st(t.floating) : !1;
|
|
1355
1354
|
if (r === s || c && i)
|
|
1356
1355
|
return n;
|
|
1357
1356
|
let d = {
|
|
1358
1357
|
scrollLeft: 0,
|
|
1359
1358
|
scrollTop: 0
|
|
1360
|
-
},
|
|
1361
|
-
const
|
|
1362
|
-
if ((u || !u && !i) && ((
|
|
1363
|
-
const h =
|
|
1364
|
-
|
|
1359
|
+
}, f = J(1);
|
|
1360
|
+
const l = J(0), u = ie(r);
|
|
1361
|
+
if ((u || !u && !i) && ((xe(r) !== "body" || Le(s)) && (d = at(r)), u)) {
|
|
1362
|
+
const h = me(r);
|
|
1363
|
+
f = ye(r), l.x = h.x + r.clientLeft, l.y = h.y + r.clientTop;
|
|
1365
1364
|
}
|
|
1366
|
-
const p = s && !u && !i ?
|
|
1365
|
+
const p = s && !u && !i ? $n(s, d) : J(0);
|
|
1367
1366
|
return {
|
|
1368
|
-
width: n.width *
|
|
1369
|
-
height: n.height *
|
|
1370
|
-
x: n.x *
|
|
1371
|
-
y: n.y *
|
|
1367
|
+
width: n.width * f.x,
|
|
1368
|
+
height: n.height * f.y,
|
|
1369
|
+
x: n.x * f.x - d.scrollLeft * f.x + l.x + p.x,
|
|
1370
|
+
y: n.y * f.y - d.scrollTop * f.y + l.y + p.y
|
|
1372
1371
|
};
|
|
1373
1372
|
}
|
|
1374
|
-
function
|
|
1373
|
+
function hi(e) {
|
|
1375
1374
|
return Array.from(e.getClientRects());
|
|
1376
1375
|
}
|
|
1377
|
-
function
|
|
1378
|
-
const t =
|
|
1379
|
-
let s = -n.scrollLeft +
|
|
1376
|
+
function vi(e) {
|
|
1377
|
+
const t = te(e), n = at(e), r = e.ownerDocument.body, o = V(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = V(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
1378
|
+
let s = -n.scrollLeft + ut(e);
|
|
1380
1379
|
const c = -n.scrollTop;
|
|
1381
1380
|
return X(r).direction === "rtl" && (s += V(t.clientWidth, r.clientWidth) - o), {
|
|
1382
1381
|
width: o,
|
|
@@ -1385,14 +1384,20 @@ function yi(e) {
|
|
|
1385
1384
|
y: c
|
|
1386
1385
|
};
|
|
1387
1386
|
}
|
|
1388
|
-
|
|
1389
|
-
|
|
1387
|
+
const dn = 25;
|
|
1388
|
+
function gi(e, t) {
|
|
1389
|
+
const n = H(e), r = te(e), o = n.visualViewport;
|
|
1390
1390
|
let i = r.clientWidth, s = r.clientHeight, c = 0, d = 0;
|
|
1391
1391
|
if (o) {
|
|
1392
1392
|
i = o.width, s = o.height;
|
|
1393
|
-
const l =
|
|
1393
|
+
const l = Ft();
|
|
1394
1394
|
(!l || l && t === "fixed") && (c = o.offsetLeft, d = o.offsetTop);
|
|
1395
1395
|
}
|
|
1396
|
+
const f = ut(r);
|
|
1397
|
+
if (f <= 0) {
|
|
1398
|
+
const l = r.ownerDocument, u = l.body, p = getComputedStyle(u), h = l.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, g = Math.abs(r.clientWidth - u.clientWidth - h);
|
|
1399
|
+
g <= dn && (i -= g);
|
|
1400
|
+
} else f <= dn && (i += f);
|
|
1396
1401
|
return {
|
|
1397
1402
|
width: i,
|
|
1398
1403
|
height: s,
|
|
@@ -1400,26 +1405,25 @@ function bi(e, t) {
|
|
|
1400
1405
|
y: d
|
|
1401
1406
|
};
|
|
1402
1407
|
}
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
const n = pe(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = te(e) ? we(e) : J(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, d = o * i.x, l = r * i.y;
|
|
1408
|
+
function wi(e, t) {
|
|
1409
|
+
const n = me(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = ie(e) ? ye(e) : J(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, d = o * i.x, f = r * i.y;
|
|
1406
1410
|
return {
|
|
1407
1411
|
width: s,
|
|
1408
1412
|
height: c,
|
|
1409
1413
|
x: d,
|
|
1410
|
-
y:
|
|
1414
|
+
y: f
|
|
1411
1415
|
};
|
|
1412
1416
|
}
|
|
1413
|
-
function
|
|
1417
|
+
function pn(e, t, n) {
|
|
1414
1418
|
let r;
|
|
1415
1419
|
if (t === "viewport")
|
|
1416
|
-
r =
|
|
1420
|
+
r = gi(e, n);
|
|
1417
1421
|
else if (t === "document")
|
|
1418
|
-
r =
|
|
1422
|
+
r = vi(te(e));
|
|
1419
1423
|
else if (j(t))
|
|
1420
|
-
r =
|
|
1424
|
+
r = wi(t, n);
|
|
1421
1425
|
else {
|
|
1422
|
-
const o =
|
|
1426
|
+
const o = kn(e);
|
|
1423
1427
|
r = {
|
|
1424
1428
|
x: t.x - o.x,
|
|
1425
1429
|
y: t.y - o.y,
|
|
@@ -1429,68 +1433,70 @@ function fn(e, t, n) {
|
|
|
1429
1433
|
}
|
|
1430
1434
|
return tt(r);
|
|
1431
1435
|
}
|
|
1432
|
-
function
|
|
1436
|
+
function Wn(e, t) {
|
|
1433
1437
|
const n = ue(e);
|
|
1434
|
-
return n === t || !j(n) ||
|
|
1438
|
+
return n === t || !j(n) || Ce(n) ? !1 : X(n).position === "fixed" || Wn(n, t);
|
|
1435
1439
|
}
|
|
1436
|
-
function
|
|
1440
|
+
function yi(e, t) {
|
|
1437
1441
|
const n = t.get(e);
|
|
1438
1442
|
if (n)
|
|
1439
1443
|
return n;
|
|
1440
|
-
let r = Te(e, [], !1).filter((c) => j(c) &&
|
|
1444
|
+
let r = Te(e, [], !1).filter((c) => j(c) && xe(c) !== "body"), o = null;
|
|
1441
1445
|
const i = X(e).position === "fixed";
|
|
1442
1446
|
let s = i ? ue(e) : e;
|
|
1443
|
-
for (; j(s) && !
|
|
1444
|
-
const c = X(s), d =
|
|
1445
|
-
!d && c.position === "fixed" && (o = null), (i ? !d && !o : !d && c.position === "static" && !!o &&
|
|
1447
|
+
for (; j(s) && !Ce(s); ) {
|
|
1448
|
+
const c = X(s), d = Lt(s);
|
|
1449
|
+
!d && c.position === "fixed" && (o = null), (i ? !d && !o : !d && c.position === "static" && !!o && (o.position === "absolute" || o.position === "fixed") || Le(s) && !d && Wn(e, s)) ? r = r.filter((l) => l !== s) : o = c, s = ue(s);
|
|
1446
1450
|
}
|
|
1447
1451
|
return t.set(e, r), r;
|
|
1448
1452
|
}
|
|
1449
|
-
function
|
|
1453
|
+
function bi(e) {
|
|
1450
1454
|
let {
|
|
1451
1455
|
element: t,
|
|
1452
1456
|
boundary: n,
|
|
1453
1457
|
rootBoundary: r,
|
|
1454
1458
|
strategy: o
|
|
1455
1459
|
} = e;
|
|
1456
|
-
const s = [...n === "clippingAncestors" ?
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
+
const s = [...n === "clippingAncestors" ? st(t) ? [] : yi(t, this._c) : [].concat(n), r], c = pn(t, s[0], o);
|
|
1461
|
+
let d = c.top, f = c.right, l = c.bottom, u = c.left;
|
|
1462
|
+
for (let p = 1; p < s.length; p++) {
|
|
1463
|
+
const h = pn(t, s[p], o);
|
|
1464
|
+
d = V(h.top, d), f = ae(h.right, f), l = ae(h.bottom, l), u = V(h.left, u);
|
|
1465
|
+
}
|
|
1460
1466
|
return {
|
|
1461
|
-
width:
|
|
1462
|
-
height:
|
|
1463
|
-
x:
|
|
1464
|
-
y: d
|
|
1467
|
+
width: f - u,
|
|
1468
|
+
height: l - d,
|
|
1469
|
+
x: u,
|
|
1470
|
+
y: d
|
|
1465
1471
|
};
|
|
1466
1472
|
}
|
|
1467
|
-
function
|
|
1473
|
+
function Ci(e) {
|
|
1468
1474
|
const {
|
|
1469
1475
|
width: t,
|
|
1470
1476
|
height: n
|
|
1471
|
-
} =
|
|
1477
|
+
} = Fn(e);
|
|
1472
1478
|
return {
|
|
1473
1479
|
width: t,
|
|
1474
1480
|
height: n
|
|
1475
1481
|
};
|
|
1476
1482
|
}
|
|
1477
|
-
function
|
|
1478
|
-
const r =
|
|
1483
|
+
function Ei(e, t, n) {
|
|
1484
|
+
const r = ie(t), o = te(t), i = n === "fixed", s = me(e, !0, i, t);
|
|
1479
1485
|
let c = {
|
|
1480
1486
|
scrollLeft: 0,
|
|
1481
1487
|
scrollTop: 0
|
|
1482
1488
|
};
|
|
1483
1489
|
const d = J(0);
|
|
1484
|
-
function
|
|
1485
|
-
d.x =
|
|
1490
|
+
function f() {
|
|
1491
|
+
d.x = ut(o);
|
|
1486
1492
|
}
|
|
1487
1493
|
if (r || !r && !i)
|
|
1488
|
-
if ((
|
|
1489
|
-
const h =
|
|
1494
|
+
if ((xe(t) !== "body" || Le(o)) && (c = at(t)), r) {
|
|
1495
|
+
const h = me(t, !0, i, t);
|
|
1490
1496
|
d.x = h.x + t.clientLeft, d.y = h.y + t.clientTop;
|
|
1491
|
-
} else o &&
|
|
1492
|
-
i && !r && o &&
|
|
1493
|
-
const
|
|
1497
|
+
} else o && f();
|
|
1498
|
+
i && !r && o && f();
|
|
1499
|
+
const l = o && !r && !i ? $n(o, c) : J(0), u = s.left + c.scrollLeft - d.x - l.x, p = s.top + c.scrollTop - d.y - l.y;
|
|
1494
1500
|
return {
|
|
1495
1501
|
x: u,
|
|
1496
1502
|
y: p,
|
|
@@ -1498,39 +1504,39 @@ function Mi(e, t, n) {
|
|
|
1498
1504
|
height: s.height
|
|
1499
1505
|
};
|
|
1500
1506
|
}
|
|
1501
|
-
function
|
|
1507
|
+
function gt(e) {
|
|
1502
1508
|
return X(e).position === "static";
|
|
1503
1509
|
}
|
|
1504
|
-
function
|
|
1505
|
-
if (!
|
|
1510
|
+
function mn(e, t) {
|
|
1511
|
+
if (!ie(e) || X(e).position === "fixed")
|
|
1506
1512
|
return null;
|
|
1507
1513
|
if (t)
|
|
1508
1514
|
return t(e);
|
|
1509
1515
|
let n = e.offsetParent;
|
|
1510
|
-
return
|
|
1516
|
+
return te(e) === n && (n = n.ownerDocument.body), n;
|
|
1511
1517
|
}
|
|
1512
|
-
function
|
|
1518
|
+
function Bn(e, t) {
|
|
1513
1519
|
const n = H(e);
|
|
1514
|
-
if (
|
|
1520
|
+
if (st(e))
|
|
1515
1521
|
return n;
|
|
1516
|
-
if (!
|
|
1522
|
+
if (!ie(e)) {
|
|
1517
1523
|
let o = ue(e);
|
|
1518
|
-
for (; o && !
|
|
1519
|
-
if (j(o) && !
|
|
1524
|
+
for (; o && !Ce(o); ) {
|
|
1525
|
+
if (j(o) && !gt(o))
|
|
1520
1526
|
return o;
|
|
1521
1527
|
o = ue(o);
|
|
1522
1528
|
}
|
|
1523
1529
|
return n;
|
|
1524
1530
|
}
|
|
1525
|
-
let r =
|
|
1526
|
-
for (; r && ai(r) &&
|
|
1527
|
-
r =
|
|
1528
|
-
return r &&
|
|
1531
|
+
let r = mn(e, t);
|
|
1532
|
+
for (; r && ai(r) && gt(r); )
|
|
1533
|
+
r = mn(r, t);
|
|
1534
|
+
return r && Ce(r) && gt(r) && !Lt(r) ? n : r || fi(e) || n;
|
|
1529
1535
|
}
|
|
1530
|
-
const
|
|
1531
|
-
const t = this.getOffsetParent ||
|
|
1536
|
+
const xi = async function(e) {
|
|
1537
|
+
const t = this.getOffsetParent || Bn, n = this.getDimensions, r = await n(e.floating);
|
|
1532
1538
|
return {
|
|
1533
|
-
reference:
|
|
1539
|
+
reference: Ei(e.reference, await t(e.floating), e.strategy),
|
|
1534
1540
|
floating: {
|
|
1535
1541
|
x: 0,
|
|
1536
1542
|
y: 0,
|
|
@@ -1539,71 +1545,71 @@ const Ai = async function(e) {
|
|
|
1539
1545
|
}
|
|
1540
1546
|
};
|
|
1541
1547
|
};
|
|
1542
|
-
function
|
|
1548
|
+
function Si(e) {
|
|
1543
1549
|
return X(e).direction === "rtl";
|
|
1544
1550
|
}
|
|
1545
|
-
const
|
|
1546
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1547
|
-
getDocumentElement:
|
|
1548
|
-
getClippingRect:
|
|
1549
|
-
getOffsetParent:
|
|
1550
|
-
getElementRects:
|
|
1551
|
-
getClientRects:
|
|
1552
|
-
getDimensions:
|
|
1553
|
-
getScale:
|
|
1551
|
+
const Ri = {
|
|
1552
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: mi,
|
|
1553
|
+
getDocumentElement: te,
|
|
1554
|
+
getClippingRect: bi,
|
|
1555
|
+
getOffsetParent: Bn,
|
|
1556
|
+
getElementRects: xi,
|
|
1557
|
+
getClientRects: hi,
|
|
1558
|
+
getDimensions: Ci,
|
|
1559
|
+
getScale: ye,
|
|
1554
1560
|
isElement: j,
|
|
1555
|
-
isRTL:
|
|
1561
|
+
isRTL: Si
|
|
1556
1562
|
};
|
|
1557
|
-
function
|
|
1563
|
+
function Un(e, t) {
|
|
1558
1564
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1559
1565
|
}
|
|
1560
|
-
function
|
|
1566
|
+
function Mi(e, t) {
|
|
1561
1567
|
let n = null, r;
|
|
1562
|
-
const o =
|
|
1568
|
+
const o = te(e);
|
|
1563
1569
|
function i() {
|
|
1564
1570
|
var c;
|
|
1565
1571
|
clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
|
|
1566
1572
|
}
|
|
1567
1573
|
function s(c, d) {
|
|
1568
1574
|
c === void 0 && (c = !1), d === void 0 && (d = 1), i();
|
|
1569
|
-
const
|
|
1570
|
-
left:
|
|
1575
|
+
const f = e.getBoundingClientRect(), {
|
|
1576
|
+
left: l,
|
|
1571
1577
|
top: u,
|
|
1572
1578
|
width: p,
|
|
1573
1579
|
height: h
|
|
1574
|
-
} =
|
|
1580
|
+
} = f;
|
|
1575
1581
|
if (c || t(), !p || !h)
|
|
1576
1582
|
return;
|
|
1577
|
-
const g = Ge(u), m = Ge(o.clientWidth - (
|
|
1583
|
+
const g = Ge(u), m = Ge(o.clientWidth - (l + p)), v = Ge(o.clientHeight - (u + h)), w = Ge(l), b = {
|
|
1578
1584
|
rootMargin: -g + "px " + -m + "px " + -v + "px " + -w + "px",
|
|
1579
1585
|
threshold: V(0, ae(1, d)) || 1
|
|
1580
1586
|
};
|
|
1581
|
-
let
|
|
1582
|
-
function
|
|
1583
|
-
const
|
|
1584
|
-
if (
|
|
1585
|
-
if (!
|
|
1587
|
+
let C = !0;
|
|
1588
|
+
function S(R) {
|
|
1589
|
+
const x = R[0].intersectionRatio;
|
|
1590
|
+
if (x !== d) {
|
|
1591
|
+
if (!C)
|
|
1586
1592
|
return s();
|
|
1587
|
-
|
|
1593
|
+
x ? s(!1, x) : r = setTimeout(() => {
|
|
1588
1594
|
s(!1, 1e-7);
|
|
1589
1595
|
}, 1e3);
|
|
1590
1596
|
}
|
|
1591
|
-
|
|
1597
|
+
x === 1 && !Un(f, e.getBoundingClientRect()) && s(), C = !1;
|
|
1592
1598
|
}
|
|
1593
1599
|
try {
|
|
1594
|
-
n = new IntersectionObserver(
|
|
1600
|
+
n = new IntersectionObserver(S, {
|
|
1595
1601
|
...b,
|
|
1596
1602
|
// Handle <iframe>s
|
|
1597
1603
|
root: o.ownerDocument
|
|
1598
1604
|
});
|
|
1599
1605
|
} catch {
|
|
1600
|
-
n = new IntersectionObserver(
|
|
1606
|
+
n = new IntersectionObserver(S, b);
|
|
1601
1607
|
}
|
|
1602
1608
|
n.observe(e);
|
|
1603
1609
|
}
|
|
1604
1610
|
return s(!0), i;
|
|
1605
1611
|
}
|
|
1606
|
-
function
|
|
1612
|
+
function Ai(e, t, n, r) {
|
|
1607
1613
|
r === void 0 && (r = {});
|
|
1608
1614
|
const {
|
|
1609
1615
|
ancestorScroll: o = !0,
|
|
@@ -1611,49 +1617,49 @@ function Ti(e, t, n, r) {
|
|
|
1611
1617
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1612
1618
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1613
1619
|
animationFrame: d = !1
|
|
1614
|
-
} = r,
|
|
1615
|
-
|
|
1620
|
+
} = r, f = kt(e), l = o || i ? [...f ? Te(f) : [], ...t ? Te(t) : []] : [];
|
|
1621
|
+
l.forEach((w) => {
|
|
1616
1622
|
o && w.addEventListener("scroll", n, {
|
|
1617
1623
|
passive: !0
|
|
1618
1624
|
}), i && w.addEventListener("resize", n);
|
|
1619
1625
|
});
|
|
1620
|
-
const u =
|
|
1626
|
+
const u = f && c ? Mi(f, n) : null;
|
|
1621
1627
|
let p = -1, h = null;
|
|
1622
1628
|
s && (h = new ResizeObserver((w) => {
|
|
1623
|
-
let [
|
|
1624
|
-
|
|
1629
|
+
let [E] = w;
|
|
1630
|
+
E && E.target === f && h && t && (h.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1625
1631
|
var b;
|
|
1626
1632
|
(b = h) == null || b.observe(t);
|
|
1627
1633
|
})), n();
|
|
1628
|
-
}),
|
|
1629
|
-
let g, m = d ?
|
|
1634
|
+
}), f && !d && h.observe(f), t && h.observe(t));
|
|
1635
|
+
let g, m = d ? me(e) : null;
|
|
1630
1636
|
d && v();
|
|
1631
1637
|
function v() {
|
|
1632
|
-
const w =
|
|
1633
|
-
m && !
|
|
1638
|
+
const w = me(e);
|
|
1639
|
+
m && !Un(m, w) && n(), m = w, g = requestAnimationFrame(v);
|
|
1634
1640
|
}
|
|
1635
1641
|
return n(), () => {
|
|
1636
1642
|
var w;
|
|
1637
|
-
|
|
1638
|
-
o &&
|
|
1643
|
+
l.forEach((E) => {
|
|
1644
|
+
o && E.removeEventListener("scroll", n), i && E.removeEventListener("resize", n);
|
|
1639
1645
|
}), u == null || u(), (w = h) == null || w.disconnect(), h = null, d && cancelAnimationFrame(g);
|
|
1640
1646
|
};
|
|
1641
1647
|
}
|
|
1642
|
-
const
|
|
1648
|
+
const Pi = oi, Oi = ii, _i = ti, Ti = si, Ii = ni, hn = ei, Di = ci, Ni = (e, t, n) => {
|
|
1643
1649
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
1644
|
-
platform:
|
|
1650
|
+
platform: Ri,
|
|
1645
1651
|
...n
|
|
1646
1652
|
}, i = {
|
|
1647
1653
|
...o.platform,
|
|
1648
1654
|
_c: r
|
|
1649
1655
|
};
|
|
1650
|
-
return
|
|
1656
|
+
return Jo(e, t, {
|
|
1651
1657
|
...o,
|
|
1652
1658
|
platform: i
|
|
1653
1659
|
});
|
|
1654
1660
|
};
|
|
1655
|
-
var
|
|
1656
|
-
}, Xe =
|
|
1661
|
+
var Li = typeof document < "u", Fi = function() {
|
|
1662
|
+
}, Xe = Li ? uo : Fi;
|
|
1657
1663
|
function nt(e, t) {
|
|
1658
1664
|
if (e === t)
|
|
1659
1665
|
return !0;
|
|
@@ -1684,20 +1690,20 @@ function nt(e, t) {
|
|
|
1684
1690
|
}
|
|
1685
1691
|
return e !== e && t !== t;
|
|
1686
1692
|
}
|
|
1687
|
-
function
|
|
1693
|
+
function Kn(e) {
|
|
1688
1694
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1689
1695
|
}
|
|
1690
|
-
function
|
|
1691
|
-
const n =
|
|
1696
|
+
function vn(e, t) {
|
|
1697
|
+
const n = Kn(e);
|
|
1692
1698
|
return Math.round(t * n) / n;
|
|
1693
1699
|
}
|
|
1694
|
-
function
|
|
1700
|
+
function wt(e) {
|
|
1695
1701
|
const t = a.useRef(e);
|
|
1696
1702
|
return Xe(() => {
|
|
1697
1703
|
t.current = e;
|
|
1698
1704
|
}), t;
|
|
1699
1705
|
}
|
|
1700
|
-
function
|
|
1706
|
+
function ki(e) {
|
|
1701
1707
|
e === void 0 && (e = {});
|
|
1702
1708
|
const {
|
|
1703
1709
|
placement: t = "bottom",
|
|
@@ -1710,8 +1716,8 @@ function Ui(e) {
|
|
|
1710
1716
|
} = {},
|
|
1711
1717
|
transform: c = !0,
|
|
1712
1718
|
whileElementsMounted: d,
|
|
1713
|
-
open:
|
|
1714
|
-
} = e, [
|
|
1719
|
+
open: f
|
|
1720
|
+
} = e, [l, u] = a.useState({
|
|
1715
1721
|
x: 0,
|
|
1716
1722
|
y: 0,
|
|
1717
1723
|
strategy: n,
|
|
@@ -1720,57 +1726,57 @@ function Ui(e) {
|
|
|
1720
1726
|
isPositioned: !1
|
|
1721
1727
|
}), [p, h] = a.useState(r);
|
|
1722
1728
|
nt(p, r) || h(r);
|
|
1723
|
-
const [g, m] = a.useState(null), [v, w] = a.useState(null),
|
|
1724
|
-
P !==
|
|
1729
|
+
const [g, m] = a.useState(null), [v, w] = a.useState(null), E = a.useCallback((P) => {
|
|
1730
|
+
P !== R.current && (R.current = P, m(P));
|
|
1725
1731
|
}, []), b = a.useCallback((P) => {
|
|
1726
|
-
P !==
|
|
1727
|
-
}, []),
|
|
1728
|
-
if (!
|
|
1732
|
+
P !== x.current && (x.current = P, w(P));
|
|
1733
|
+
}, []), C = i || g, S = s || v, R = a.useRef(null), x = a.useRef(null), A = a.useRef(l), I = d != null, _ = wt(d), D = wt(o), L = wt(f), F = a.useCallback(() => {
|
|
1734
|
+
if (!R.current || !x.current)
|
|
1729
1735
|
return;
|
|
1730
1736
|
const P = {
|
|
1731
1737
|
placement: t,
|
|
1732
1738
|
strategy: n,
|
|
1733
1739
|
middleware: p
|
|
1734
1740
|
};
|
|
1735
|
-
|
|
1736
|
-
const
|
|
1737
|
-
...
|
|
1741
|
+
D.current && (P.platform = D.current), Ni(R.current, x.current, P).then((M) => {
|
|
1742
|
+
const k = {
|
|
1743
|
+
...M,
|
|
1738
1744
|
// The floating element's position may be recomputed while it's closed
|
|
1739
1745
|
// but still mounted (such as when transitioning out). To ensure
|
|
1740
1746
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1741
1747
|
// setting it to `true` when `open === false` (must be specified).
|
|
1742
|
-
isPositioned:
|
|
1748
|
+
isPositioned: L.current !== !1
|
|
1743
1749
|
};
|
|
1744
|
-
|
|
1745
|
-
u(
|
|
1750
|
+
N.current && !nt(A.current, k) && (A.current = k, xn.flushSync(() => {
|
|
1751
|
+
u(k);
|
|
1746
1752
|
}));
|
|
1747
1753
|
});
|
|
1748
|
-
}, [p, t, n,
|
|
1754
|
+
}, [p, t, n, D, L]);
|
|
1749
1755
|
Xe(() => {
|
|
1750
|
-
|
|
1756
|
+
f === !1 && A.current.isPositioned && (A.current.isPositioned = !1, u((P) => ({
|
|
1751
1757
|
...P,
|
|
1752
1758
|
isPositioned: !1
|
|
1753
1759
|
})));
|
|
1754
|
-
}, [
|
|
1755
|
-
const
|
|
1756
|
-
Xe(() => (
|
|
1757
|
-
|
|
1760
|
+
}, [f]);
|
|
1761
|
+
const N = a.useRef(!1);
|
|
1762
|
+
Xe(() => (N.current = !0, () => {
|
|
1763
|
+
N.current = !1;
|
|
1758
1764
|
}), []), Xe(() => {
|
|
1759
|
-
if (
|
|
1765
|
+
if (C && (R.current = C), S && (x.current = S), C && S) {
|
|
1760
1766
|
if (_.current)
|
|
1761
|
-
return _.current(
|
|
1762
|
-
|
|
1767
|
+
return _.current(C, S, F);
|
|
1768
|
+
F();
|
|
1763
1769
|
}
|
|
1764
|
-
}, [
|
|
1765
|
-
const
|
|
1766
|
-
reference:
|
|
1767
|
-
floating:
|
|
1768
|
-
setReference:
|
|
1770
|
+
}, [C, S, F, _, I]);
|
|
1771
|
+
const W = a.useMemo(() => ({
|
|
1772
|
+
reference: R,
|
|
1773
|
+
floating: x,
|
|
1774
|
+
setReference: E,
|
|
1769
1775
|
setFloating: b
|
|
1770
|
-
}), [
|
|
1771
|
-
reference:
|
|
1772
|
-
floating:
|
|
1773
|
-
}), [
|
|
1776
|
+
}), [E, b]), T = a.useMemo(() => ({
|
|
1777
|
+
reference: C,
|
|
1778
|
+
floating: S
|
|
1779
|
+
}), [C, S]), $ = a.useMemo(() => {
|
|
1774
1780
|
const P = {
|
|
1775
1781
|
position: n,
|
|
1776
1782
|
left: 0,
|
|
@@ -1778,28 +1784,28 @@ function Ui(e) {
|
|
|
1778
1784
|
};
|
|
1779
1785
|
if (!T.floating)
|
|
1780
1786
|
return P;
|
|
1781
|
-
const
|
|
1787
|
+
const M = vn(T.floating, l.x), k = vn(T.floating, l.y);
|
|
1782
1788
|
return c ? {
|
|
1783
1789
|
...P,
|
|
1784
|
-
transform: "translate(" +
|
|
1785
|
-
...
|
|
1790
|
+
transform: "translate(" + M + "px, " + k + "px)",
|
|
1791
|
+
...Kn(T.floating) >= 1.5 && {
|
|
1786
1792
|
willChange: "transform"
|
|
1787
1793
|
}
|
|
1788
1794
|
} : {
|
|
1789
1795
|
position: n,
|
|
1790
|
-
left:
|
|
1791
|
-
top:
|
|
1796
|
+
left: M,
|
|
1797
|
+
top: k
|
|
1792
1798
|
};
|
|
1793
|
-
}, [n, c, T.floating,
|
|
1799
|
+
}, [n, c, T.floating, l.x, l.y]);
|
|
1794
1800
|
return a.useMemo(() => ({
|
|
1795
|
-
...
|
|
1796
|
-
update:
|
|
1797
|
-
refs:
|
|
1801
|
+
...l,
|
|
1802
|
+
update: F,
|
|
1803
|
+
refs: W,
|
|
1798
1804
|
elements: T,
|
|
1799
1805
|
floatingStyles: $
|
|
1800
|
-
}), [
|
|
1806
|
+
}), [l, F, W, T, $]);
|
|
1801
1807
|
}
|
|
1802
|
-
const
|
|
1808
|
+
const $i = (e) => {
|
|
1803
1809
|
function t(n) {
|
|
1804
1810
|
return {}.hasOwnProperty.call(n, "current");
|
|
1805
1811
|
}
|
|
@@ -1811,38 +1817,62 @@ const Ki = (e) => {
|
|
|
1811
1817
|
element: r,
|
|
1812
1818
|
padding: o
|
|
1813
1819
|
} = typeof e == "function" ? e(n) : e;
|
|
1814
|
-
return r && t(r) ? r.current != null ?
|
|
1820
|
+
return r && t(r) ? r.current != null ? hn({
|
|
1815
1821
|
element: r.current,
|
|
1816
1822
|
padding: o
|
|
1817
|
-
}).fn(n) : {} : r ?
|
|
1823
|
+
}).fn(n) : {} : r ? hn({
|
|
1818
1824
|
element: r,
|
|
1819
1825
|
padding: o
|
|
1820
1826
|
}).fn(n) : {};
|
|
1821
1827
|
}
|
|
1822
1828
|
};
|
|
1823
|
-
},
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
...Fi(e),
|
|
1840
|
-
options: [e, t]
|
|
1841
|
-
}), Xi = (e, t) => ({
|
|
1842
|
-
...Ki(e),
|
|
1829
|
+
}, Wi = (e, t) => {
|
|
1830
|
+
const n = Pi(e);
|
|
1831
|
+
return {
|
|
1832
|
+
name: n.name,
|
|
1833
|
+
fn: n.fn,
|
|
1834
|
+
options: [e, t]
|
|
1835
|
+
};
|
|
1836
|
+
}, Bi = (e, t) => {
|
|
1837
|
+
const n = Oi(e);
|
|
1838
|
+
return {
|
|
1839
|
+
name: n.name,
|
|
1840
|
+
fn: n.fn,
|
|
1841
|
+
options: [e, t]
|
|
1842
|
+
};
|
|
1843
|
+
}, Ui = (e, t) => ({
|
|
1844
|
+
fn: Di(e).fn,
|
|
1843
1845
|
options: [e, t]
|
|
1844
|
-
})
|
|
1845
|
-
|
|
1846
|
+
}), Ki = (e, t) => {
|
|
1847
|
+
const n = _i(e);
|
|
1848
|
+
return {
|
|
1849
|
+
name: n.name,
|
|
1850
|
+
fn: n.fn,
|
|
1851
|
+
options: [e, t]
|
|
1852
|
+
};
|
|
1853
|
+
}, Gi = (e, t) => {
|
|
1854
|
+
const n = Ti(e);
|
|
1855
|
+
return {
|
|
1856
|
+
name: n.name,
|
|
1857
|
+
fn: n.fn,
|
|
1858
|
+
options: [e, t]
|
|
1859
|
+
};
|
|
1860
|
+
}, Vi = (e, t) => {
|
|
1861
|
+
const n = Ii(e);
|
|
1862
|
+
return {
|
|
1863
|
+
name: n.name,
|
|
1864
|
+
fn: n.fn,
|
|
1865
|
+
options: [e, t]
|
|
1866
|
+
};
|
|
1867
|
+
}, Hi = (e, t) => {
|
|
1868
|
+
const n = $i(e);
|
|
1869
|
+
return {
|
|
1870
|
+
name: n.name,
|
|
1871
|
+
fn: n.fn,
|
|
1872
|
+
options: [e, t]
|
|
1873
|
+
};
|
|
1874
|
+
};
|
|
1875
|
+
var zi = "Arrow", Gn = a.forwardRef((e, t) => {
|
|
1846
1876
|
const { children: n, width: r = 10, height: o = 5, ...i } = e;
|
|
1847
1877
|
return /* @__PURE__ */ y(
|
|
1848
1878
|
K.svg,
|
|
@@ -1857,11 +1887,11 @@ var Zi = "Arrow", Un = a.forwardRef((e, t) => {
|
|
|
1857
1887
|
}
|
|
1858
1888
|
);
|
|
1859
1889
|
});
|
|
1860
|
-
|
|
1861
|
-
var
|
|
1862
|
-
function
|
|
1890
|
+
Gn.displayName = zi;
|
|
1891
|
+
var Yi = Gn;
|
|
1892
|
+
function ji(e) {
|
|
1863
1893
|
const [t, n] = a.useState(void 0);
|
|
1864
|
-
return
|
|
1894
|
+
return se(() => {
|
|
1865
1895
|
if (e) {
|
|
1866
1896
|
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
1867
1897
|
const r = new ResizeObserver((o) => {
|
|
@@ -1870,8 +1900,8 @@ function Qi(e) {
|
|
|
1870
1900
|
const i = o[0];
|
|
1871
1901
|
let s, c;
|
|
1872
1902
|
if ("borderBoxSize" in i) {
|
|
1873
|
-
const d = i.borderBoxSize,
|
|
1874
|
-
s =
|
|
1903
|
+
const d = i.borderBoxSize, f = Array.isArray(d) ? d[0] : d;
|
|
1904
|
+
s = f.inlineSize, c = f.blockSize;
|
|
1875
1905
|
} else
|
|
1876
1906
|
s = e.offsetWidth, c = e.offsetHeight;
|
|
1877
1907
|
n({ width: s, height: c });
|
|
@@ -1881,23 +1911,23 @@ function Qi(e) {
|
|
|
1881
1911
|
n(void 0);
|
|
1882
1912
|
}, [e]), t;
|
|
1883
1913
|
}
|
|
1884
|
-
var
|
|
1914
|
+
var $t = "Popper", [Vn, Hn] = Ne($t), [Xi, zn] = Vn($t), Yn = (e) => {
|
|
1885
1915
|
const { __scopePopper: t, children: n } = e, [r, o] = a.useState(null);
|
|
1886
|
-
return /* @__PURE__ */ y(
|
|
1916
|
+
return /* @__PURE__ */ y(Xi, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
1887
1917
|
};
|
|
1888
|
-
|
|
1889
|
-
var
|
|
1918
|
+
Yn.displayName = $t;
|
|
1919
|
+
var jn = "PopperAnchor", Xn = a.forwardRef(
|
|
1890
1920
|
(e, t) => {
|
|
1891
|
-
const { __scopePopper: n, virtualRef: r, ...o } = e, i =
|
|
1921
|
+
const { __scopePopper: n, virtualRef: r, ...o } = e, i = zn(jn, n), s = a.useRef(null), c = G(t, s);
|
|
1892
1922
|
return a.useEffect(() => {
|
|
1893
1923
|
i.onAnchorChange((r == null ? void 0 : r.current) || s.current);
|
|
1894
1924
|
}), r ? null : /* @__PURE__ */ y(K.div, { ...o, ref: c });
|
|
1895
1925
|
}
|
|
1896
1926
|
);
|
|
1897
|
-
|
|
1898
|
-
var
|
|
1927
|
+
Xn.displayName = jn;
|
|
1928
|
+
var Wt = "PopperContent", [Zi, qi] = Vn(Wt), Zn = a.forwardRef(
|
|
1899
1929
|
(e, t) => {
|
|
1900
|
-
var
|
|
1930
|
+
var ne, Me, z, Ae, jt, Xt;
|
|
1901
1931
|
const {
|
|
1902
1932
|
__scopePopper: n,
|
|
1903
1933
|
side: r = "bottom",
|
|
@@ -1906,93 +1936,93 @@ var $t = "PopperContent", [es, ts] = Kn($t), jn = a.forwardRef(
|
|
|
1906
1936
|
alignOffset: s = 0,
|
|
1907
1937
|
arrowPadding: c = 0,
|
|
1908
1938
|
avoidCollisions: d = !0,
|
|
1909
|
-
collisionBoundary:
|
|
1910
|
-
collisionPadding:
|
|
1939
|
+
collisionBoundary: f = [],
|
|
1940
|
+
collisionPadding: l = 0,
|
|
1911
1941
|
sticky: u = "partial",
|
|
1912
1942
|
hideWhenDetached: p = !1,
|
|
1913
1943
|
updatePositionStrategy: h = "optimized",
|
|
1914
1944
|
onPlaced: g,
|
|
1915
1945
|
...m
|
|
1916
|
-
} = e, v =
|
|
1946
|
+
} = e, v = zn(Wt, n), [w, E] = a.useState(null), b = G(t, (Pe) => E(Pe)), [C, S] = a.useState(null), R = ji(C), x = (R == null ? void 0 : R.width) ?? 0, A = (R == null ? void 0 : R.height) ?? 0, I = r + (i !== "center" ? "-" + i : ""), _ = typeof l == "number" ? l : { top: 0, right: 0, bottom: 0, left: 0, ...l }, D = Array.isArray(f) ? f : [f], L = D.length > 0, F = {
|
|
1917
1947
|
padding: _,
|
|
1918
|
-
boundary:
|
|
1948
|
+
boundary: D.filter(Ji),
|
|
1919
1949
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
1920
|
-
altBoundary:
|
|
1921
|
-
}, { refs:
|
|
1950
|
+
altBoundary: L
|
|
1951
|
+
}, { refs: N, floatingStyles: W, placement: T, isPositioned: $, middlewareData: P } = ki({
|
|
1922
1952
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
1923
1953
|
strategy: "fixed",
|
|
1924
1954
|
placement: I,
|
|
1925
|
-
whileElementsMounted: (...
|
|
1955
|
+
whileElementsMounted: (...Pe) => Ai(...Pe, {
|
|
1926
1956
|
animationFrame: h === "always"
|
|
1927
1957
|
}),
|
|
1928
1958
|
elements: {
|
|
1929
1959
|
reference: v.anchor
|
|
1930
1960
|
},
|
|
1931
1961
|
middleware: [
|
|
1932
|
-
|
|
1933
|
-
d &&
|
|
1962
|
+
Wi({ mainAxis: o + A, alignmentAxis: s }),
|
|
1963
|
+
d && Bi({
|
|
1934
1964
|
mainAxis: !0,
|
|
1935
1965
|
crossAxis: !1,
|
|
1936
|
-
limiter: u === "partial" ?
|
|
1937
|
-
...
|
|
1966
|
+
limiter: u === "partial" ? Ui() : void 0,
|
|
1967
|
+
...F
|
|
1938
1968
|
}),
|
|
1939
|
-
d &&
|
|
1940
|
-
|
|
1941
|
-
...
|
|
1942
|
-
apply: ({ elements:
|
|
1943
|
-
const { width:
|
|
1944
|
-
Ke.setProperty("--radix-popper-available-width", `${
|
|
1969
|
+
d && Ki({ ...F }),
|
|
1970
|
+
Gi({
|
|
1971
|
+
...F,
|
|
1972
|
+
apply: ({ elements: Pe, rects: Zt, availableWidth: io, availableHeight: co }) => {
|
|
1973
|
+
const { width: so, height: ao } = Zt.reference, Ke = Pe.floating.style;
|
|
1974
|
+
Ke.setProperty("--radix-popper-available-width", `${io}px`), Ke.setProperty("--radix-popper-available-height", `${co}px`), Ke.setProperty("--radix-popper-anchor-width", `${so}px`), Ke.setProperty("--radix-popper-anchor-height", `${ao}px`);
|
|
1945
1975
|
}
|
|
1946
1976
|
}),
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
p &&
|
|
1977
|
+
C && Hi({ element: C, padding: c }),
|
|
1978
|
+
ec({ arrowWidth: x, arrowHeight: A }),
|
|
1979
|
+
p && Vi({ strategy: "referenceHidden", ...F })
|
|
1950
1980
|
]
|
|
1951
|
-
}), [
|
|
1952
|
-
|
|
1981
|
+
}), [M, k] = Jn(T), U = ee(g);
|
|
1982
|
+
se(() => {
|
|
1953
1983
|
$ && (U == null || U());
|
|
1954
1984
|
}, [$, U]);
|
|
1955
|
-
const Z = (
|
|
1956
|
-
return
|
|
1985
|
+
const Z = (ne = P.arrow) == null ? void 0 : ne.x, Se = (Me = P.arrow) == null ? void 0 : Me.y, Re = ((z = P.arrow) == null ? void 0 : z.centerOffset) !== 0, [Ue, fe] = a.useState();
|
|
1986
|
+
return se(() => {
|
|
1957
1987
|
w && fe(window.getComputedStyle(w).zIndex);
|
|
1958
1988
|
}, [w]), /* @__PURE__ */ y(
|
|
1959
1989
|
"div",
|
|
1960
1990
|
{
|
|
1961
|
-
ref:
|
|
1991
|
+
ref: N.setFloating,
|
|
1962
1992
|
"data-radix-popper-content-wrapper": "",
|
|
1963
1993
|
style: {
|
|
1964
|
-
...
|
|
1965
|
-
transform: $ ?
|
|
1994
|
+
...W,
|
|
1995
|
+
transform: $ ? W.transform : "translate(0, -200%)",
|
|
1966
1996
|
// keep off the page when measuring
|
|
1967
1997
|
minWidth: "max-content",
|
|
1968
1998
|
zIndex: Ue,
|
|
1969
1999
|
"--radix-popper-transform-origin": [
|
|
1970
|
-
(
|
|
1971
|
-
(
|
|
2000
|
+
(Ae = P.transformOrigin) == null ? void 0 : Ae.x,
|
|
2001
|
+
(jt = P.transformOrigin) == null ? void 0 : jt.y
|
|
1972
2002
|
].join(" "),
|
|
1973
2003
|
// hide the content if using the hide middleware and should be hidden
|
|
1974
2004
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
1975
2005
|
// as if the PopperContent isn't there at all
|
|
1976
|
-
...((
|
|
2006
|
+
...((Xt = P.hide) == null ? void 0 : Xt.referenceHidden) && {
|
|
1977
2007
|
visibility: "hidden",
|
|
1978
2008
|
pointerEvents: "none"
|
|
1979
2009
|
}
|
|
1980
2010
|
},
|
|
1981
2011
|
dir: e.dir,
|
|
1982
2012
|
children: /* @__PURE__ */ y(
|
|
1983
|
-
|
|
2013
|
+
Zi,
|
|
1984
2014
|
{
|
|
1985
2015
|
scope: n,
|
|
1986
|
-
placedSide:
|
|
1987
|
-
onArrowChange:
|
|
2016
|
+
placedSide: M,
|
|
2017
|
+
onArrowChange: S,
|
|
1988
2018
|
arrowX: Z,
|
|
1989
|
-
arrowY:
|
|
1990
|
-
shouldHideArrow:
|
|
2019
|
+
arrowY: Se,
|
|
2020
|
+
shouldHideArrow: Re,
|
|
1991
2021
|
children: /* @__PURE__ */ y(
|
|
1992
2022
|
K.div,
|
|
1993
2023
|
{
|
|
1994
|
-
"data-side":
|
|
1995
|
-
"data-align":
|
|
2024
|
+
"data-side": M,
|
|
2025
|
+
"data-align": k,
|
|
1996
2026
|
...m,
|
|
1997
2027
|
ref: b,
|
|
1998
2028
|
style: {
|
|
@@ -2009,14 +2039,14 @@ var $t = "PopperContent", [es, ts] = Kn($t), jn = a.forwardRef(
|
|
|
2009
2039
|
);
|
|
2010
2040
|
}
|
|
2011
2041
|
);
|
|
2012
|
-
|
|
2013
|
-
var
|
|
2042
|
+
Zn.displayName = Wt;
|
|
2043
|
+
var qn = "PopperArrow", Qi = {
|
|
2014
2044
|
top: "bottom",
|
|
2015
2045
|
right: "left",
|
|
2016
2046
|
bottom: "top",
|
|
2017
2047
|
left: "right"
|
|
2018
|
-
},
|
|
2019
|
-
const { __scopePopper: r, ...o } = t, i =
|
|
2048
|
+
}, Qn = a.forwardRef(function(t, n) {
|
|
2049
|
+
const { __scopePopper: r, ...o } = t, i = qi(qn, r), s = Qi[i.placedSide];
|
|
2020
2050
|
return (
|
|
2021
2051
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
2022
2052
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -2045,7 +2075,7 @@ var Xn = "PopperArrow", ns = {
|
|
|
2045
2075
|
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
2046
2076
|
},
|
|
2047
2077
|
children: /* @__PURE__ */ y(
|
|
2048
|
-
|
|
2078
|
+
Yi,
|
|
2049
2079
|
{
|
|
2050
2080
|
...o,
|
|
2051
2081
|
ref: n,
|
|
@@ -2060,42 +2090,42 @@ var Xn = "PopperArrow", ns = {
|
|
|
2060
2090
|
)
|
|
2061
2091
|
);
|
|
2062
2092
|
});
|
|
2063
|
-
|
|
2064
|
-
function
|
|
2093
|
+
Qn.displayName = qn;
|
|
2094
|
+
function Ji(e) {
|
|
2065
2095
|
return e !== null;
|
|
2066
2096
|
}
|
|
2067
|
-
var
|
|
2097
|
+
var ec = (e) => ({
|
|
2068
2098
|
name: "transformOrigin",
|
|
2069
2099
|
options: e,
|
|
2070
2100
|
fn(t) {
|
|
2071
|
-
var v, w,
|
|
2072
|
-
const { placement: n, rects: r, middlewareData: o } = t, s = ((v = o.arrow) == null ? void 0 : v.centerOffset) !== 0, c = s ? 0 : e.arrowWidth, d = s ? 0 : e.arrowHeight, [
|
|
2101
|
+
var v, w, E;
|
|
2102
|
+
const { placement: n, rects: r, middlewareData: o } = t, s = ((v = o.arrow) == null ? void 0 : v.centerOffset) !== 0, c = s ? 0 : e.arrowWidth, d = s ? 0 : e.arrowHeight, [f, l] = Jn(n), u = { start: "0%", center: "50%", end: "100%" }[l], p = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + c / 2, h = (((E = o.arrow) == null ? void 0 : E.y) ?? 0) + d / 2;
|
|
2073
2103
|
let g = "", m = "";
|
|
2074
|
-
return
|
|
2104
|
+
return f === "bottom" ? (g = s ? u : `${p}px`, m = `${-d}px`) : f === "top" ? (g = s ? u : `${p}px`, m = `${r.floating.height + d}px`) : f === "right" ? (g = `${-d}px`, m = s ? u : `${h}px`) : f === "left" && (g = `${r.floating.width + d}px`, m = s ? u : `${h}px`), { data: { x: g, y: m } };
|
|
2075
2105
|
}
|
|
2076
2106
|
});
|
|
2077
|
-
function
|
|
2107
|
+
function Jn(e) {
|
|
2078
2108
|
const [t, n = "center"] = e.split("-");
|
|
2079
2109
|
return [t, n];
|
|
2080
2110
|
}
|
|
2081
|
-
var
|
|
2111
|
+
var er = Yn, tc = Xn, nc = Zn, rc = Qn, oc = "Portal", tr = a.forwardRef((e, t) => {
|
|
2082
2112
|
var c;
|
|
2083
2113
|
const { container: n, ...r } = e, [o, i] = a.useState(!1);
|
|
2084
|
-
|
|
2114
|
+
se(() => i(!0), []);
|
|
2085
2115
|
const s = n || o && ((c = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : c.body);
|
|
2086
|
-
return s ?
|
|
2116
|
+
return s ? fo.createPortal(/* @__PURE__ */ y(K.div, { ...r, ref: t }), s) : null;
|
|
2087
2117
|
});
|
|
2088
|
-
|
|
2089
|
-
function
|
|
2118
|
+
tr.displayName = oc;
|
|
2119
|
+
function ic(e, t) {
|
|
2090
2120
|
return a.useReducer((n, r) => t[n][r] ?? n, e);
|
|
2091
2121
|
}
|
|
2092
2122
|
var Fe = (e) => {
|
|
2093
|
-
const { present: t, children: n } = e, r =
|
|
2123
|
+
const { present: t, children: n } = e, r = cc(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), i = G(r.ref, sc(o));
|
|
2094
2124
|
return typeof n == "function" || r.isPresent ? a.cloneElement(o, { ref: i }) : null;
|
|
2095
2125
|
};
|
|
2096
2126
|
Fe.displayName = "Presence";
|
|
2097
|
-
function
|
|
2098
|
-
const [t, n] = a.useState(), r = a.useRef(null), o = a.useRef(e), i = a.useRef("none"), s = e ? "mounted" : "unmounted", [c, d] =
|
|
2127
|
+
function cc(e) {
|
|
2128
|
+
const [t, n] = a.useState(), r = a.useRef(null), o = a.useRef(e), i = a.useRef("none"), s = e ? "mounted" : "unmounted", [c, d] = ic(s, {
|
|
2099
2129
|
mounted: {
|
|
2100
2130
|
UNMOUNT: "unmounted",
|
|
2101
2131
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -2109,22 +2139,22 @@ function ls(e) {
|
|
|
2109
2139
|
}
|
|
2110
2140
|
});
|
|
2111
2141
|
return a.useEffect(() => {
|
|
2112
|
-
const
|
|
2113
|
-
i.current = c === "mounted" ?
|
|
2114
|
-
}, [c]),
|
|
2115
|
-
const
|
|
2116
|
-
if (
|
|
2117
|
-
const p = i.current, h = Ve(
|
|
2118
|
-
e ? d("MOUNT") : h === "none" || (
|
|
2142
|
+
const f = Ve(r.current);
|
|
2143
|
+
i.current = c === "mounted" ? f : "none";
|
|
2144
|
+
}, [c]), se(() => {
|
|
2145
|
+
const f = r.current, l = o.current;
|
|
2146
|
+
if (l !== e) {
|
|
2147
|
+
const p = i.current, h = Ve(f);
|
|
2148
|
+
e ? d("MOUNT") : h === "none" || (f == null ? void 0 : f.display) === "none" ? d("UNMOUNT") : d(l && p !== h ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
2119
2149
|
}
|
|
2120
|
-
}, [e, d]),
|
|
2150
|
+
}, [e, d]), se(() => {
|
|
2121
2151
|
if (t) {
|
|
2122
|
-
let
|
|
2123
|
-
const
|
|
2152
|
+
let f;
|
|
2153
|
+
const l = t.ownerDocument.defaultView ?? window, u = (h) => {
|
|
2124
2154
|
const m = Ve(r.current).includes(h.animationName);
|
|
2125
2155
|
if (h.target === t && m && (d("ANIMATION_END"), !o.current)) {
|
|
2126
2156
|
const v = t.style.animationFillMode;
|
|
2127
|
-
t.style.animationFillMode = "forwards",
|
|
2157
|
+
t.style.animationFillMode = "forwards", f = l.setTimeout(() => {
|
|
2128
2158
|
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
|
|
2129
2159
|
});
|
|
2130
2160
|
}
|
|
@@ -2132,33 +2162,33 @@ function ls(e) {
|
|
|
2132
2162
|
h.target === t && (i.current = Ve(r.current));
|
|
2133
2163
|
};
|
|
2134
2164
|
return t.addEventListener("animationstart", p), t.addEventListener("animationcancel", u), t.addEventListener("animationend", u), () => {
|
|
2135
|
-
|
|
2165
|
+
l.clearTimeout(f), t.removeEventListener("animationstart", p), t.removeEventListener("animationcancel", u), t.removeEventListener("animationend", u);
|
|
2136
2166
|
};
|
|
2137
2167
|
} else
|
|
2138
2168
|
d("ANIMATION_END");
|
|
2139
2169
|
}, [t, d]), {
|
|
2140
2170
|
isPresent: ["mounted", "unmountSuspended"].includes(c),
|
|
2141
|
-
ref: a.useCallback((
|
|
2142
|
-
r.current =
|
|
2171
|
+
ref: a.useCallback((f) => {
|
|
2172
|
+
r.current = f ? getComputedStyle(f) : null, n(f);
|
|
2143
2173
|
}, [])
|
|
2144
2174
|
};
|
|
2145
2175
|
}
|
|
2146
2176
|
function Ve(e) {
|
|
2147
2177
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
2148
2178
|
}
|
|
2149
|
-
function
|
|
2179
|
+
function sc(e) {
|
|
2150
2180
|
var r, o;
|
|
2151
2181
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
2152
2182
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
2153
2183
|
}
|
|
2154
|
-
var
|
|
2184
|
+
var yt = "rovingFocusGroup.onEntryFocus", ac = { bubbles: !1, cancelable: !0 }, ke = "RovingFocusGroup", [Pt, nr, uc] = Rn(ke), [lc, rr] = Ne(
|
|
2155
2185
|
ke,
|
|
2156
|
-
[
|
|
2157
|
-
), [
|
|
2158
|
-
(e, t) => /* @__PURE__ */ y(
|
|
2186
|
+
[uc]
|
|
2187
|
+
), [fc, dc] = lc(ke), or = a.forwardRef(
|
|
2188
|
+
(e, t) => /* @__PURE__ */ y(Pt.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ y(Pt.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ y(pc, { ...e, ref: t }) }) })
|
|
2159
2189
|
);
|
|
2160
|
-
|
|
2161
|
-
var
|
|
2190
|
+
or.displayName = ke;
|
|
2191
|
+
var pc = a.forwardRef((e, t) => {
|
|
2162
2192
|
const {
|
|
2163
2193
|
__scopeRovingFocusGroup: n,
|
|
2164
2194
|
orientation: r,
|
|
@@ -2167,21 +2197,21 @@ var gs = a.forwardRef((e, t) => {
|
|
|
2167
2197
|
currentTabStopId: s,
|
|
2168
2198
|
defaultCurrentTabStopId: c,
|
|
2169
2199
|
onCurrentTabStopIdChange: d,
|
|
2170
|
-
onEntryFocus:
|
|
2171
|
-
preventScrollOnEntryFocus:
|
|
2200
|
+
onEntryFocus: f,
|
|
2201
|
+
preventScrollOnEntryFocus: l = !1,
|
|
2172
2202
|
...u
|
|
2173
|
-
} = e, p = a.useRef(null), h = G(t, p), g =
|
|
2203
|
+
} = e, p = a.useRef(null), h = G(t, p), g = Mn(i), [m, v] = Tt({
|
|
2174
2204
|
prop: s,
|
|
2175
2205
|
defaultProp: c ?? null,
|
|
2176
2206
|
onChange: d,
|
|
2177
2207
|
caller: ke
|
|
2178
|
-
}), [w,
|
|
2208
|
+
}), [w, E] = a.useState(!1), b = ee(f), C = nr(n), S = a.useRef(!1), [R, x] = a.useState(0);
|
|
2179
2209
|
return a.useEffect(() => {
|
|
2180
2210
|
const A = p.current;
|
|
2181
2211
|
if (A)
|
|
2182
|
-
return A.addEventListener(
|
|
2212
|
+
return A.addEventListener(yt, b), () => A.removeEventListener(yt, b);
|
|
2183
2213
|
}, [b]), /* @__PURE__ */ y(
|
|
2184
|
-
|
|
2214
|
+
fc,
|
|
2185
2215
|
{
|
|
2186
2216
|
scope: n,
|
|
2187
2217
|
orientation: r,
|
|
@@ -2192,45 +2222,45 @@ var gs = a.forwardRef((e, t) => {
|
|
|
2192
2222
|
(A) => v(A),
|
|
2193
2223
|
[v]
|
|
2194
2224
|
),
|
|
2195
|
-
onItemShiftTab: a.useCallback(() =>
|
|
2225
|
+
onItemShiftTab: a.useCallback(() => E(!0), []),
|
|
2196
2226
|
onFocusableItemAdd: a.useCallback(
|
|
2197
|
-
() =>
|
|
2227
|
+
() => x((A) => A + 1),
|
|
2198
2228
|
[]
|
|
2199
2229
|
),
|
|
2200
2230
|
onFocusableItemRemove: a.useCallback(
|
|
2201
|
-
() =>
|
|
2231
|
+
() => x((A) => A - 1),
|
|
2202
2232
|
[]
|
|
2203
2233
|
),
|
|
2204
2234
|
children: /* @__PURE__ */ y(
|
|
2205
2235
|
K.div,
|
|
2206
2236
|
{
|
|
2207
|
-
tabIndex: w ||
|
|
2237
|
+
tabIndex: w || R === 0 ? -1 : 0,
|
|
2208
2238
|
"data-orientation": r,
|
|
2209
2239
|
...u,
|
|
2210
2240
|
ref: h,
|
|
2211
2241
|
style: { outline: "none", ...e.style },
|
|
2212
2242
|
onMouseDown: O(e.onMouseDown, () => {
|
|
2213
|
-
|
|
2243
|
+
S.current = !0;
|
|
2214
2244
|
}),
|
|
2215
2245
|
onFocus: O(e.onFocus, (A) => {
|
|
2216
|
-
const I = !
|
|
2246
|
+
const I = !S.current;
|
|
2217
2247
|
if (A.target === A.currentTarget && I && !w) {
|
|
2218
|
-
const _ = new CustomEvent(
|
|
2248
|
+
const _ = new CustomEvent(yt, ac);
|
|
2219
2249
|
if (A.currentTarget.dispatchEvent(_), !_.defaultPrevented) {
|
|
2220
|
-
const
|
|
2250
|
+
const D = C().filter((T) => T.focusable), L = D.find((T) => T.active), F = D.find((T) => T.id === m), W = [L, F, ...D].filter(
|
|
2221
2251
|
Boolean
|
|
2222
2252
|
).map((T) => T.ref.current);
|
|
2223
|
-
|
|
2253
|
+
sr(W, l);
|
|
2224
2254
|
}
|
|
2225
2255
|
}
|
|
2226
|
-
|
|
2256
|
+
S.current = !1;
|
|
2227
2257
|
}),
|
|
2228
|
-
onBlur: O(e.onBlur, () =>
|
|
2258
|
+
onBlur: O(e.onBlur, () => E(!1))
|
|
2229
2259
|
}
|
|
2230
2260
|
)
|
|
2231
2261
|
}
|
|
2232
2262
|
);
|
|
2233
|
-
}),
|
|
2263
|
+
}), ir = "RovingFocusGroupItem", cr = a.forwardRef(
|
|
2234
2264
|
(e, t) => {
|
|
2235
2265
|
const {
|
|
2236
2266
|
__scopeRovingFocusGroup: n,
|
|
@@ -2239,46 +2269,46 @@ var gs = a.forwardRef((e, t) => {
|
|
|
2239
2269
|
tabStopId: i,
|
|
2240
2270
|
children: s,
|
|
2241
2271
|
...c
|
|
2242
|
-
} = e, d =
|
|
2272
|
+
} = e, d = _e(), f = i || d, l = dc(ir, n), u = l.currentTabStopId === f, p = nr(n), { onFocusableItemAdd: h, onFocusableItemRemove: g, currentTabStopId: m } = l;
|
|
2243
2273
|
return a.useEffect(() => {
|
|
2244
2274
|
if (r)
|
|
2245
2275
|
return h(), () => g();
|
|
2246
2276
|
}, [r, h, g]), /* @__PURE__ */ y(
|
|
2247
|
-
|
|
2277
|
+
Pt.ItemSlot,
|
|
2248
2278
|
{
|
|
2249
2279
|
scope: n,
|
|
2250
|
-
id:
|
|
2280
|
+
id: f,
|
|
2251
2281
|
focusable: r,
|
|
2252
2282
|
active: o,
|
|
2253
2283
|
children: /* @__PURE__ */ y(
|
|
2254
2284
|
K.span,
|
|
2255
2285
|
{
|
|
2256
2286
|
tabIndex: u ? 0 : -1,
|
|
2257
|
-
"data-orientation":
|
|
2287
|
+
"data-orientation": l.orientation,
|
|
2258
2288
|
...c,
|
|
2259
2289
|
ref: t,
|
|
2260
2290
|
onMouseDown: O(e.onMouseDown, (v) => {
|
|
2261
|
-
r ?
|
|
2291
|
+
r ? l.onItemFocus(f) : v.preventDefault();
|
|
2262
2292
|
}),
|
|
2263
|
-
onFocus: O(e.onFocus, () =>
|
|
2293
|
+
onFocus: O(e.onFocus, () => l.onItemFocus(f)),
|
|
2264
2294
|
onKeyDown: O(e.onKeyDown, (v) => {
|
|
2265
2295
|
if (v.key === "Tab" && v.shiftKey) {
|
|
2266
|
-
|
|
2296
|
+
l.onItemShiftTab();
|
|
2267
2297
|
return;
|
|
2268
2298
|
}
|
|
2269
2299
|
if (v.target !== v.currentTarget) return;
|
|
2270
|
-
const w =
|
|
2300
|
+
const w = vc(v, l.orientation, l.dir);
|
|
2271
2301
|
if (w !== void 0) {
|
|
2272
2302
|
if (v.metaKey || v.ctrlKey || v.altKey || v.shiftKey) return;
|
|
2273
2303
|
v.preventDefault();
|
|
2274
|
-
let b = p().filter((
|
|
2304
|
+
let b = p().filter((C) => C.focusable).map((C) => C.ref.current);
|
|
2275
2305
|
if (w === "last") b.reverse();
|
|
2276
2306
|
else if (w === "prev" || w === "next") {
|
|
2277
2307
|
w === "prev" && b.reverse();
|
|
2278
|
-
const
|
|
2279
|
-
b =
|
|
2308
|
+
const C = b.indexOf(v.currentTarget);
|
|
2309
|
+
b = l.loop ? gc(b, C + 1) : b.slice(C + 1);
|
|
2280
2310
|
}
|
|
2281
|
-
setTimeout(() =>
|
|
2311
|
+
setTimeout(() => sr(b));
|
|
2282
2312
|
}
|
|
2283
2313
|
}),
|
|
2284
2314
|
children: typeof s == "function" ? s({ isCurrentTabStop: u, hasTabStop: m != null }) : s
|
|
@@ -2288,8 +2318,8 @@ var gs = a.forwardRef((e, t) => {
|
|
|
2288
2318
|
);
|
|
2289
2319
|
}
|
|
2290
2320
|
);
|
|
2291
|
-
|
|
2292
|
-
var
|
|
2321
|
+
cr.displayName = ir;
|
|
2322
|
+
var mc = {
|
|
2293
2323
|
ArrowLeft: "prev",
|
|
2294
2324
|
ArrowUp: "prev",
|
|
2295
2325
|
ArrowRight: "next",
|
|
@@ -2299,68 +2329,68 @@ var ws = {
|
|
|
2299
2329
|
PageDown: "last",
|
|
2300
2330
|
End: "last"
|
|
2301
2331
|
};
|
|
2302
|
-
function
|
|
2332
|
+
function hc(e, t) {
|
|
2303
2333
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
2304
2334
|
}
|
|
2305
|
-
function
|
|
2306
|
-
const r =
|
|
2335
|
+
function vc(e, t, n) {
|
|
2336
|
+
const r = hc(e.key, n);
|
|
2307
2337
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
|
|
2308
|
-
return
|
|
2338
|
+
return mc[r];
|
|
2309
2339
|
}
|
|
2310
|
-
function
|
|
2340
|
+
function sr(e, t = !1) {
|
|
2311
2341
|
const n = document.activeElement;
|
|
2312
2342
|
for (const r of e)
|
|
2313
2343
|
if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
2314
2344
|
}
|
|
2315
|
-
function
|
|
2345
|
+
function gc(e, t) {
|
|
2316
2346
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
2317
2347
|
}
|
|
2318
|
-
var
|
|
2348
|
+
var wc = or, yc = cr, bc = function(e) {
|
|
2319
2349
|
if (typeof document > "u")
|
|
2320
2350
|
return null;
|
|
2321
2351
|
var t = Array.isArray(e) ? e[0] : e;
|
|
2322
2352
|
return t.ownerDocument.body;
|
|
2323
|
-
},
|
|
2324
|
-
return e && (e.host ||
|
|
2325
|
-
},
|
|
2353
|
+
}, ve = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), ze = {}, bt = 0, ar = function(e) {
|
|
2354
|
+
return e && (e.host || ar(e.parentNode));
|
|
2355
|
+
}, Cc = function(e, t) {
|
|
2326
2356
|
return t.map(function(n) {
|
|
2327
2357
|
if (e.contains(n))
|
|
2328
2358
|
return n;
|
|
2329
|
-
var r =
|
|
2359
|
+
var r = ar(n);
|
|
2330
2360
|
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
2331
2361
|
}).filter(function(n) {
|
|
2332
2362
|
return !!n;
|
|
2333
2363
|
});
|
|
2334
|
-
},
|
|
2335
|
-
var o =
|
|
2364
|
+
}, Ec = function(e, t, n, r) {
|
|
2365
|
+
var o = Cc(t, Array.isArray(e) ? e : [e]);
|
|
2336
2366
|
ze[n] || (ze[n] = /* @__PURE__ */ new WeakMap());
|
|
2337
|
-
var i = ze[n], s = [], c = /* @__PURE__ */ new Set(), d = new Set(o),
|
|
2338
|
-
!u || c.has(u) || (c.add(u),
|
|
2367
|
+
var i = ze[n], s = [], c = /* @__PURE__ */ new Set(), d = new Set(o), f = function(u) {
|
|
2368
|
+
!u || c.has(u) || (c.add(u), f(u.parentNode));
|
|
2339
2369
|
};
|
|
2340
|
-
o.forEach(
|
|
2341
|
-
var
|
|
2370
|
+
o.forEach(f);
|
|
2371
|
+
var l = function(u) {
|
|
2342
2372
|
!u || d.has(u) || Array.prototype.forEach.call(u.children, function(p) {
|
|
2343
2373
|
if (c.has(p))
|
|
2344
|
-
|
|
2374
|
+
l(p);
|
|
2345
2375
|
else
|
|
2346
2376
|
try {
|
|
2347
|
-
var h = p.getAttribute(r), g = h !== null && h !== "false", m = (
|
|
2348
|
-
|
|
2377
|
+
var h = p.getAttribute(r), g = h !== null && h !== "false", m = (ve.get(p) || 0) + 1, v = (i.get(p) || 0) + 1;
|
|
2378
|
+
ve.set(p, m), i.set(p, v), s.push(p), m === 1 && g && He.set(p, !0), v === 1 && p.setAttribute(n, "true"), g || p.setAttribute(r, "true");
|
|
2349
2379
|
} catch (w) {
|
|
2350
2380
|
console.error("aria-hidden: cannot operate on ", p, w);
|
|
2351
2381
|
}
|
|
2352
2382
|
});
|
|
2353
2383
|
};
|
|
2354
|
-
return
|
|
2384
|
+
return l(t), c.clear(), bt++, function() {
|
|
2355
2385
|
s.forEach(function(u) {
|
|
2356
|
-
var p =
|
|
2357
|
-
|
|
2358
|
-
}),
|
|
2386
|
+
var p = ve.get(u) - 1, h = i.get(u) - 1;
|
|
2387
|
+
ve.set(u, p), i.set(u, h), p || (He.has(u) || u.removeAttribute(r), He.delete(u)), h || u.removeAttribute(n);
|
|
2388
|
+
}), bt--, bt || (ve = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), ze = {});
|
|
2359
2389
|
};
|
|
2360
|
-
},
|
|
2390
|
+
}, xc = function(e, t, n) {
|
|
2361
2391
|
n === void 0 && (n = "data-aria-hidden");
|
|
2362
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), o =
|
|
2363
|
-
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))),
|
|
2392
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), o = bc(e);
|
|
2393
|
+
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Ec(r, o, n, "aria-hidden")) : function() {
|
|
2364
2394
|
return null;
|
|
2365
2395
|
};
|
|
2366
2396
|
}, q = function() {
|
|
@@ -2372,7 +2402,7 @@ var Es = nr, xs = or, Ss = function(e) {
|
|
|
2372
2402
|
return t;
|
|
2373
2403
|
}, q.apply(this, arguments);
|
|
2374
2404
|
};
|
|
2375
|
-
function
|
|
2405
|
+
function ur(e, t) {
|
|
2376
2406
|
var n = {};
|
|
2377
2407
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2378
2408
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -2380,17 +2410,17 @@ function cr(e, t) {
|
|
|
2380
2410
|
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
2381
2411
|
return n;
|
|
2382
2412
|
}
|
|
2383
|
-
function
|
|
2413
|
+
function Sc(e, t, n) {
|
|
2384
2414
|
if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
|
|
2385
2415
|
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
2386
2416
|
return e.concat(i || Array.prototype.slice.call(t));
|
|
2387
2417
|
}
|
|
2388
|
-
var Ze = "right-scroll-bar-position", qe = "width-before-scroll-bar",
|
|
2389
|
-
function
|
|
2418
|
+
var Ze = "right-scroll-bar-position", qe = "width-before-scroll-bar", Rc = "with-scroll-bars-hidden", Mc = "--removed-body-scroll-bar-size";
|
|
2419
|
+
function Ct(e, t) {
|
|
2390
2420
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
2391
2421
|
}
|
|
2392
|
-
function
|
|
2393
|
-
var n =
|
|
2422
|
+
function Ac(e, t) {
|
|
2423
|
+
var n = lo(function() {
|
|
2394
2424
|
return {
|
|
2395
2425
|
// value
|
|
2396
2426
|
value: e,
|
|
@@ -2410,31 +2440,31 @@ function Ts(e, t) {
|
|
|
2410
2440
|
})[0];
|
|
2411
2441
|
return n.callback = t, n.facade;
|
|
2412
2442
|
}
|
|
2413
|
-
var
|
|
2414
|
-
function
|
|
2415
|
-
var n =
|
|
2443
|
+
var Pc = typeof window < "u" ? a.useLayoutEffect : a.useEffect, gn = /* @__PURE__ */ new WeakMap();
|
|
2444
|
+
function Oc(e, t) {
|
|
2445
|
+
var n = Ac(null, function(r) {
|
|
2416
2446
|
return e.forEach(function(o) {
|
|
2417
|
-
return
|
|
2447
|
+
return Ct(o, r);
|
|
2418
2448
|
});
|
|
2419
2449
|
});
|
|
2420
|
-
return
|
|
2421
|
-
var r =
|
|
2450
|
+
return Pc(function() {
|
|
2451
|
+
var r = gn.get(n);
|
|
2422
2452
|
if (r) {
|
|
2423
2453
|
var o = new Set(r), i = new Set(e), s = n.current;
|
|
2424
2454
|
o.forEach(function(c) {
|
|
2425
|
-
i.has(c) ||
|
|
2455
|
+
i.has(c) || Ct(c, null);
|
|
2426
2456
|
}), i.forEach(function(c) {
|
|
2427
|
-
o.has(c) ||
|
|
2457
|
+
o.has(c) || Ct(c, s);
|
|
2428
2458
|
});
|
|
2429
2459
|
}
|
|
2430
|
-
|
|
2460
|
+
gn.set(n, e);
|
|
2431
2461
|
}, [e]), n;
|
|
2432
2462
|
}
|
|
2433
|
-
function
|
|
2463
|
+
function _c(e) {
|
|
2434
2464
|
return e;
|
|
2435
2465
|
}
|
|
2436
|
-
function
|
|
2437
|
-
t === void 0 && (t =
|
|
2466
|
+
function Tc(e, t) {
|
|
2467
|
+
t === void 0 && (t = _c);
|
|
2438
2468
|
var n = [], r = !1, o = {
|
|
2439
2469
|
read: function() {
|
|
2440
2470
|
if (r)
|
|
@@ -2471,30 +2501,30 @@ function Ls(e, t) {
|
|
|
2471
2501
|
n = [], c.forEach(i), s = n;
|
|
2472
2502
|
}
|
|
2473
2503
|
var d = function() {
|
|
2474
|
-
var
|
|
2475
|
-
s = [],
|
|
2476
|
-
},
|
|
2504
|
+
var l = s;
|
|
2505
|
+
s = [], l.forEach(i);
|
|
2506
|
+
}, f = function() {
|
|
2477
2507
|
return Promise.resolve().then(d);
|
|
2478
2508
|
};
|
|
2479
|
-
|
|
2480
|
-
push: function(
|
|
2481
|
-
s.push(
|
|
2509
|
+
f(), n = {
|
|
2510
|
+
push: function(l) {
|
|
2511
|
+
s.push(l), f();
|
|
2482
2512
|
},
|
|
2483
|
-
filter: function(
|
|
2484
|
-
return s = s.filter(
|
|
2513
|
+
filter: function(l) {
|
|
2514
|
+
return s = s.filter(l), n;
|
|
2485
2515
|
}
|
|
2486
2516
|
};
|
|
2487
2517
|
}
|
|
2488
2518
|
};
|
|
2489
2519
|
return o;
|
|
2490
2520
|
}
|
|
2491
|
-
function
|
|
2521
|
+
function Ic(e) {
|
|
2492
2522
|
e === void 0 && (e = {});
|
|
2493
|
-
var t =
|
|
2523
|
+
var t = Tc(null);
|
|
2494
2524
|
return t.options = q({ async: !0, ssr: !1 }, e), t;
|
|
2495
2525
|
}
|
|
2496
|
-
var
|
|
2497
|
-
var t = e.sideCar, n =
|
|
2526
|
+
var lr = function(e) {
|
|
2527
|
+
var t = e.sideCar, n = ur(e, ["sideCar"]);
|
|
2498
2528
|
if (!t)
|
|
2499
2529
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
2500
2530
|
var r = t.read();
|
|
@@ -2502,64 +2532,64 @@ var ar = function(e) {
|
|
|
2502
2532
|
throw new Error("Sidecar medium not found");
|
|
2503
2533
|
return a.createElement(r, q({}, n));
|
|
2504
2534
|
};
|
|
2505
|
-
|
|
2506
|
-
function
|
|
2507
|
-
return e.useMedium(t),
|
|
2535
|
+
lr.isSideCarExport = !0;
|
|
2536
|
+
function Dc(e, t) {
|
|
2537
|
+
return e.useMedium(t), lr;
|
|
2508
2538
|
}
|
|
2509
|
-
var
|
|
2510
|
-
},
|
|
2539
|
+
var fr = Ic(), Et = function() {
|
|
2540
|
+
}, lt = a.forwardRef(function(e, t) {
|
|
2511
2541
|
var n = a.useRef(null), r = a.useState({
|
|
2512
|
-
onScrollCapture:
|
|
2513
|
-
onWheelCapture:
|
|
2514
|
-
onTouchMoveCapture:
|
|
2515
|
-
}), o = r[0], i = r[1], s = e.forwardProps, c = e.children, d = e.className,
|
|
2542
|
+
onScrollCapture: Et,
|
|
2543
|
+
onWheelCapture: Et,
|
|
2544
|
+
onTouchMoveCapture: Et
|
|
2545
|
+
}), o = r[0], i = r[1], s = e.forwardProps, c = e.children, d = e.className, f = e.removeScrollBar, l = e.enabled, u = e.shards, p = e.sideCar, h = e.noRelative, g = e.noIsolation, m = e.inert, v = e.allowPinchZoom, w = e.as, E = w === void 0 ? "div" : w, b = e.gapMode, C = ur(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = p, R = Oc([n, t]), x = q(q({}, C), o);
|
|
2516
2546
|
return a.createElement(
|
|
2517
2547
|
a.Fragment,
|
|
2518
2548
|
null,
|
|
2519
|
-
|
|
2520
|
-
s ? a.cloneElement(a.Children.only(c), q(q({},
|
|
2549
|
+
l && a.createElement(S, { sideCar: fr, removeScrollBar: f, shards: u, noRelative: h, noIsolation: g, inert: m, setCallbacks: i, allowPinchZoom: !!v, lockRef: n, gapMode: b }),
|
|
2550
|
+
s ? a.cloneElement(a.Children.only(c), q(q({}, x), { ref: R })) : a.createElement(E, q({}, x, { className: d, ref: R }), c)
|
|
2521
2551
|
);
|
|
2522
2552
|
});
|
|
2523
|
-
|
|
2553
|
+
lt.defaultProps = {
|
|
2524
2554
|
enabled: !0,
|
|
2525
2555
|
removeScrollBar: !0,
|
|
2526
2556
|
inert: !1
|
|
2527
2557
|
};
|
|
2528
|
-
|
|
2558
|
+
lt.classNames = {
|
|
2529
2559
|
fullWidth: qe,
|
|
2530
2560
|
zeroRight: Ze
|
|
2531
2561
|
};
|
|
2532
|
-
var
|
|
2562
|
+
var Nc = function() {
|
|
2533
2563
|
if (typeof __webpack_nonce__ < "u")
|
|
2534
2564
|
return __webpack_nonce__;
|
|
2535
2565
|
};
|
|
2536
|
-
function
|
|
2566
|
+
function Lc() {
|
|
2537
2567
|
if (!document)
|
|
2538
2568
|
return null;
|
|
2539
2569
|
var e = document.createElement("style");
|
|
2540
2570
|
e.type = "text/css";
|
|
2541
|
-
var t =
|
|
2571
|
+
var t = Nc();
|
|
2542
2572
|
return t && e.setAttribute("nonce", t), e;
|
|
2543
2573
|
}
|
|
2544
|
-
function
|
|
2574
|
+
function Fc(e, t) {
|
|
2545
2575
|
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
2546
2576
|
}
|
|
2547
|
-
function
|
|
2577
|
+
function kc(e) {
|
|
2548
2578
|
var t = document.head || document.getElementsByTagName("head")[0];
|
|
2549
2579
|
t.appendChild(e);
|
|
2550
2580
|
}
|
|
2551
|
-
var
|
|
2581
|
+
var $c = function() {
|
|
2552
2582
|
var e = 0, t = null;
|
|
2553
2583
|
return {
|
|
2554
2584
|
add: function(n) {
|
|
2555
|
-
e == 0 && (t =
|
|
2585
|
+
e == 0 && (t = Lc()) && (Fc(t, n), kc(t)), e++;
|
|
2556
2586
|
},
|
|
2557
2587
|
remove: function() {
|
|
2558
2588
|
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
2559
2589
|
}
|
|
2560
2590
|
};
|
|
2561
|
-
},
|
|
2562
|
-
var e =
|
|
2591
|
+
}, Wc = function() {
|
|
2592
|
+
var e = $c();
|
|
2563
2593
|
return function(t, n) {
|
|
2564
2594
|
a.useEffect(function() {
|
|
2565
2595
|
return e.add(t), function() {
|
|
@@ -2567,40 +2597,40 @@ var Ks = function() {
|
|
|
2567
2597
|
};
|
|
2568
2598
|
}, [t && n]);
|
|
2569
2599
|
};
|
|
2570
|
-
},
|
|
2571
|
-
var e =
|
|
2600
|
+
}, dr = function() {
|
|
2601
|
+
var e = Wc(), t = function(n) {
|
|
2572
2602
|
var r = n.styles, o = n.dynamic;
|
|
2573
2603
|
return e(r, o), null;
|
|
2574
2604
|
};
|
|
2575
2605
|
return t;
|
|
2576
|
-
},
|
|
2606
|
+
}, Bc = {
|
|
2577
2607
|
left: 0,
|
|
2578
2608
|
top: 0,
|
|
2579
2609
|
right: 0,
|
|
2580
2610
|
gap: 0
|
|
2581
|
-
},
|
|
2611
|
+
}, xt = function(e) {
|
|
2582
2612
|
return parseInt(e || "", 10) || 0;
|
|
2583
|
-
},
|
|
2613
|
+
}, Uc = function(e) {
|
|
2584
2614
|
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
2585
|
-
return [
|
|
2586
|
-
},
|
|
2615
|
+
return [xt(n), xt(r), xt(o)];
|
|
2616
|
+
}, Kc = function(e) {
|
|
2587
2617
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
2588
|
-
return
|
|
2589
|
-
var t =
|
|
2618
|
+
return Bc;
|
|
2619
|
+
var t = Uc(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
2590
2620
|
return {
|
|
2591
2621
|
left: t[0],
|
|
2592
2622
|
top: t[1],
|
|
2593
2623
|
right: t[2],
|
|
2594
2624
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
2595
2625
|
};
|
|
2596
|
-
},
|
|
2626
|
+
}, Gc = dr(), be = "data-scroll-locked", Vc = function(e, t, n, r) {
|
|
2597
2627
|
var o = e.left, i = e.top, s = e.right, c = e.gap;
|
|
2598
2628
|
return n === void 0 && (n = "margin"), `
|
|
2599
|
-
.`.concat(
|
|
2629
|
+
.`.concat(Rc, ` {
|
|
2600
2630
|
overflow: hidden `).concat(r, `;
|
|
2601
2631
|
padding-right: `).concat(c, "px ").concat(r, `;
|
|
2602
2632
|
}
|
|
2603
|
-
body[`).concat(
|
|
2633
|
+
body[`).concat(be, `] {
|
|
2604
2634
|
overflow: hidden `).concat(r, `;
|
|
2605
2635
|
overscroll-behavior: contain;
|
|
2606
2636
|
`).concat([
|
|
@@ -2633,124 +2663,124 @@ var Ks = function() {
|
|
|
2633
2663
|
margin-right: 0 `).concat(r, `;
|
|
2634
2664
|
}
|
|
2635
2665
|
|
|
2636
|
-
body[`).concat(
|
|
2637
|
-
`).concat(
|
|
2666
|
+
body[`).concat(be, `] {
|
|
2667
|
+
`).concat(Mc, ": ").concat(c, `px;
|
|
2638
2668
|
}
|
|
2639
2669
|
`);
|
|
2640
|
-
},
|
|
2641
|
-
var e = parseInt(document.body.getAttribute(
|
|
2670
|
+
}, wn = function() {
|
|
2671
|
+
var e = parseInt(document.body.getAttribute(be) || "0", 10);
|
|
2642
2672
|
return isFinite(e) ? e : 0;
|
|
2643
|
-
},
|
|
2673
|
+
}, Hc = function() {
|
|
2644
2674
|
a.useEffect(function() {
|
|
2645
|
-
return document.body.setAttribute(
|
|
2646
|
-
var e =
|
|
2647
|
-
e <= 0 ? document.body.removeAttribute(
|
|
2675
|
+
return document.body.setAttribute(be, (wn() + 1).toString()), function() {
|
|
2676
|
+
var e = wn() - 1;
|
|
2677
|
+
e <= 0 ? document.body.removeAttribute(be) : document.body.setAttribute(be, e.toString());
|
|
2648
2678
|
};
|
|
2649
2679
|
}, []);
|
|
2650
|
-
},
|
|
2680
|
+
}, zc = function(e) {
|
|
2651
2681
|
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
2652
|
-
|
|
2682
|
+
Hc();
|
|
2653
2683
|
var i = a.useMemo(function() {
|
|
2654
|
-
return
|
|
2684
|
+
return Kc(o);
|
|
2655
2685
|
}, [o]);
|
|
2656
|
-
return a.createElement(
|
|
2657
|
-
},
|
|
2686
|
+
return a.createElement(Gc, { styles: Vc(i, !t, o, n ? "" : "!important") });
|
|
2687
|
+
}, Ot = !1;
|
|
2658
2688
|
if (typeof window < "u")
|
|
2659
2689
|
try {
|
|
2660
2690
|
var Ye = Object.defineProperty({}, "passive", {
|
|
2661
2691
|
get: function() {
|
|
2662
|
-
return
|
|
2692
|
+
return Ot = !0, !0;
|
|
2663
2693
|
}
|
|
2664
2694
|
});
|
|
2665
2695
|
window.addEventListener("test", Ye, Ye), window.removeEventListener("test", Ye, Ye);
|
|
2666
2696
|
} catch {
|
|
2667
|
-
|
|
2697
|
+
Ot = !1;
|
|
2668
2698
|
}
|
|
2669
|
-
var
|
|
2699
|
+
var ge = Ot ? { passive: !1 } : !1, Yc = function(e) {
|
|
2670
2700
|
return e.tagName === "TEXTAREA";
|
|
2671
|
-
},
|
|
2701
|
+
}, pr = function(e, t) {
|
|
2672
2702
|
if (!(e instanceof Element))
|
|
2673
2703
|
return !1;
|
|
2674
2704
|
var n = window.getComputedStyle(e);
|
|
2675
2705
|
return (
|
|
2676
2706
|
// not-not-scrollable
|
|
2677
2707
|
n[t] !== "hidden" && // contains scroll inside self
|
|
2678
|
-
!(n.overflowY === n.overflowX && !
|
|
2708
|
+
!(n.overflowY === n.overflowX && !Yc(e) && n[t] === "visible")
|
|
2679
2709
|
);
|
|
2680
|
-
},
|
|
2681
|
-
return
|
|
2682
|
-
},
|
|
2683
|
-
return
|
|
2684
|
-
},
|
|
2710
|
+
}, jc = function(e) {
|
|
2711
|
+
return pr(e, "overflowY");
|
|
2712
|
+
}, Xc = function(e) {
|
|
2713
|
+
return pr(e, "overflowX");
|
|
2714
|
+
}, yn = function(e, t) {
|
|
2685
2715
|
var n = t.ownerDocument, r = t;
|
|
2686
2716
|
do {
|
|
2687
2717
|
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
2688
|
-
var o =
|
|
2718
|
+
var o = mr(e, r);
|
|
2689
2719
|
if (o) {
|
|
2690
|
-
var i =
|
|
2720
|
+
var i = hr(e, r), s = i[1], c = i[2];
|
|
2691
2721
|
if (s > c)
|
|
2692
2722
|
return !0;
|
|
2693
2723
|
}
|
|
2694
2724
|
r = r.parentNode;
|
|
2695
2725
|
} while (r && r !== n.body);
|
|
2696
2726
|
return !1;
|
|
2697
|
-
},
|
|
2727
|
+
}, Zc = function(e) {
|
|
2698
2728
|
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
2699
2729
|
return [
|
|
2700
2730
|
t,
|
|
2701
2731
|
n,
|
|
2702
2732
|
r
|
|
2703
2733
|
];
|
|
2704
|
-
},
|
|
2734
|
+
}, qc = function(e) {
|
|
2705
2735
|
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
2706
2736
|
return [
|
|
2707
2737
|
t,
|
|
2708
2738
|
n,
|
|
2709
2739
|
r
|
|
2710
2740
|
];
|
|
2711
|
-
},
|
|
2712
|
-
return e === "v" ?
|
|
2713
|
-
},
|
|
2714
|
-
return e === "v" ?
|
|
2715
|
-
},
|
|
2741
|
+
}, mr = function(e, t) {
|
|
2742
|
+
return e === "v" ? jc(t) : Xc(t);
|
|
2743
|
+
}, hr = function(e, t) {
|
|
2744
|
+
return e === "v" ? Zc(t) : qc(t);
|
|
2745
|
+
}, Qc = function(e, t) {
|
|
2716
2746
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
2717
|
-
},
|
|
2718
|
-
var i =
|
|
2747
|
+
}, Jc = function(e, t, n, r, o) {
|
|
2748
|
+
var i = Qc(e, window.getComputedStyle(t).direction), s = i * r, c = n.target, d = t.contains(c), f = !1, l = s > 0, u = 0, p = 0;
|
|
2719
2749
|
do {
|
|
2720
2750
|
if (!c)
|
|
2721
2751
|
break;
|
|
2722
|
-
var h =
|
|
2723
|
-
(g || w) &&
|
|
2724
|
-
var
|
|
2725
|
-
c =
|
|
2752
|
+
var h = hr(e, c), g = h[0], m = h[1], v = h[2], w = m - v - i * g;
|
|
2753
|
+
(g || w) && mr(e, c) && (u += w, p += g);
|
|
2754
|
+
var E = c.parentNode;
|
|
2755
|
+
c = E && E.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? E.host : E;
|
|
2726
2756
|
} while (
|
|
2727
2757
|
// portaled content
|
|
2728
2758
|
!d && c !== document.body || // self content
|
|
2729
2759
|
d && (t.contains(c) || t === c)
|
|
2730
2760
|
);
|
|
2731
|
-
return (
|
|
2761
|
+
return (l && Math.abs(u) < 1 || !l && Math.abs(p) < 1) && (f = !0), f;
|
|
2732
2762
|
}, je = function(e) {
|
|
2733
2763
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
2734
|
-
},
|
|
2764
|
+
}, bn = function(e) {
|
|
2735
2765
|
return [e.deltaX, e.deltaY];
|
|
2736
|
-
},
|
|
2766
|
+
}, Cn = function(e) {
|
|
2737
2767
|
return e && "current" in e ? e.current : e;
|
|
2738
|
-
},
|
|
2768
|
+
}, es = function(e, t) {
|
|
2739
2769
|
return e[0] === t[0] && e[1] === t[1];
|
|
2740
|
-
},
|
|
2770
|
+
}, ts = function(e) {
|
|
2741
2771
|
return `
|
|
2742
2772
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
2743
2773
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
2744
2774
|
`);
|
|
2745
|
-
},
|
|
2746
|
-
function
|
|
2747
|
-
var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(
|
|
2775
|
+
}, ns = 0, we = [];
|
|
2776
|
+
function rs(e) {
|
|
2777
|
+
var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(ns++)[0], i = a.useState(dr)[0], s = a.useRef(e);
|
|
2748
2778
|
a.useEffect(function() {
|
|
2749
2779
|
s.current = e;
|
|
2750
2780
|
}, [e]), a.useEffect(function() {
|
|
2751
2781
|
if (e.inert) {
|
|
2752
2782
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
2753
|
-
var m =
|
|
2783
|
+
var m = Sc([e.lockRef.current], (e.shards || []).map(Cn), !0).filter(Boolean);
|
|
2754
2784
|
return m.forEach(function(v) {
|
|
2755
2785
|
return v.classList.add("allow-interactivity-".concat(o));
|
|
2756
2786
|
}), function() {
|
|
@@ -2763,111 +2793,114 @@ function cc(e) {
|
|
|
2763
2793
|
var c = a.useCallback(function(m, v) {
|
|
2764
2794
|
if ("touches" in m && m.touches.length === 2 || m.type === "wheel" && m.ctrlKey)
|
|
2765
2795
|
return !s.current.allowPinchZoom;
|
|
2766
|
-
var w = je(m),
|
|
2767
|
-
if ("touches" in m &&
|
|
2796
|
+
var w = je(m), E = n.current, b = "deltaX" in m ? m.deltaX : E[0] - w[0], C = "deltaY" in m ? m.deltaY : E[1] - w[1], S, R = m.target, x = Math.abs(b) > Math.abs(C) ? "h" : "v";
|
|
2797
|
+
if ("touches" in m && x === "h" && R.type === "range")
|
|
2768
2798
|
return !1;
|
|
2769
|
-
var A =
|
|
2770
|
-
if (
|
|
2799
|
+
var A = window.getSelection(), I = A && A.anchorNode, _ = I ? I === R || I.contains(R) : !1;
|
|
2800
|
+
if (_)
|
|
2801
|
+
return !1;
|
|
2802
|
+
var D = yn(x, R);
|
|
2803
|
+
if (!D)
|
|
2771
2804
|
return !0;
|
|
2772
|
-
if (
|
|
2805
|
+
if (D ? S = x : (S = x === "v" ? "h" : "v", D = yn(x, R)), !D)
|
|
2773
2806
|
return !1;
|
|
2774
|
-
if (!r.current && "changedTouches" in m && (b ||
|
|
2807
|
+
if (!r.current && "changedTouches" in m && (b || C) && (r.current = S), !S)
|
|
2775
2808
|
return !0;
|
|
2776
|
-
var
|
|
2777
|
-
return
|
|
2809
|
+
var L = r.current || S;
|
|
2810
|
+
return Jc(L, v, m, L === "h" ? b : C);
|
|
2778
2811
|
}, []), d = a.useCallback(function(m) {
|
|
2779
2812
|
var v = m;
|
|
2780
|
-
if (!(!
|
|
2781
|
-
var w = "deltaY" in v ?
|
|
2782
|
-
return
|
|
2813
|
+
if (!(!we.length || we[we.length - 1] !== i)) {
|
|
2814
|
+
var w = "deltaY" in v ? bn(v) : je(v), E = t.current.filter(function(S) {
|
|
2815
|
+
return S.name === v.type && (S.target === v.target || v.target === S.shadowParent) && es(S.delta, w);
|
|
2783
2816
|
})[0];
|
|
2784
|
-
if (
|
|
2817
|
+
if (E && E.should) {
|
|
2785
2818
|
v.cancelable && v.preventDefault();
|
|
2786
2819
|
return;
|
|
2787
2820
|
}
|
|
2788
|
-
if (!
|
|
2789
|
-
var b = (s.current.shards || []).map(
|
|
2790
|
-
return
|
|
2791
|
-
}),
|
|
2792
|
-
|
|
2821
|
+
if (!E) {
|
|
2822
|
+
var b = (s.current.shards || []).map(Cn).filter(Boolean).filter(function(S) {
|
|
2823
|
+
return S.contains(v.target);
|
|
2824
|
+
}), C = b.length > 0 ? c(v, b[0]) : !s.current.noIsolation;
|
|
2825
|
+
C && v.cancelable && v.preventDefault();
|
|
2793
2826
|
}
|
|
2794
2827
|
}
|
|
2795
|
-
}, []),
|
|
2796
|
-
var b = { name: m, delta: v, target: w, should:
|
|
2828
|
+
}, []), f = a.useCallback(function(m, v, w, E) {
|
|
2829
|
+
var b = { name: m, delta: v, target: w, should: E, shadowParent: os(w) };
|
|
2797
2830
|
t.current.push(b), setTimeout(function() {
|
|
2798
|
-
t.current = t.current.filter(function(
|
|
2799
|
-
return
|
|
2831
|
+
t.current = t.current.filter(function(C) {
|
|
2832
|
+
return C !== b;
|
|
2800
2833
|
});
|
|
2801
2834
|
}, 1);
|
|
2802
|
-
}, []),
|
|
2835
|
+
}, []), l = a.useCallback(function(m) {
|
|
2803
2836
|
n.current = je(m), r.current = void 0;
|
|
2804
2837
|
}, []), u = a.useCallback(function(m) {
|
|
2805
|
-
|
|
2838
|
+
f(m.type, bn(m), m.target, c(m, e.lockRef.current));
|
|
2806
2839
|
}, []), p = a.useCallback(function(m) {
|
|
2807
|
-
|
|
2840
|
+
f(m.type, je(m), m.target, c(m, e.lockRef.current));
|
|
2808
2841
|
}, []);
|
|
2809
2842
|
a.useEffect(function() {
|
|
2810
|
-
return
|
|
2843
|
+
return we.push(i), e.setCallbacks({
|
|
2811
2844
|
onScrollCapture: u,
|
|
2812
2845
|
onWheelCapture: u,
|
|
2813
2846
|
onTouchMoveCapture: p
|
|
2814
|
-
}), document.addEventListener("wheel", d,
|
|
2815
|
-
|
|
2847
|
+
}), document.addEventListener("wheel", d, ge), document.addEventListener("touchmove", d, ge), document.addEventListener("touchstart", l, ge), function() {
|
|
2848
|
+
we = we.filter(function(m) {
|
|
2816
2849
|
return m !== i;
|
|
2817
|
-
}), document.removeEventListener("wheel", d,
|
|
2850
|
+
}), document.removeEventListener("wheel", d, ge), document.removeEventListener("touchmove", d, ge), document.removeEventListener("touchstart", l, ge);
|
|
2818
2851
|
};
|
|
2819
2852
|
}, []);
|
|
2820
2853
|
var h = e.removeScrollBar, g = e.inert;
|
|
2821
2854
|
return a.createElement(
|
|
2822
2855
|
a.Fragment,
|
|
2823
2856
|
null,
|
|
2824
|
-
g ? a.createElement(i, { styles:
|
|
2825
|
-
h ? a.createElement(
|
|
2857
|
+
g ? a.createElement(i, { styles: ts(o) }) : null,
|
|
2858
|
+
h ? a.createElement(zc, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
2826
2859
|
);
|
|
2827
2860
|
}
|
|
2828
|
-
function
|
|
2861
|
+
function os(e) {
|
|
2829
2862
|
for (var t = null; e !== null; )
|
|
2830
2863
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
2831
2864
|
return t;
|
|
2832
2865
|
}
|
|
2833
|
-
const
|
|
2834
|
-
var
|
|
2835
|
-
return a.createElement(
|
|
2866
|
+
const is = Dc(fr, rs);
|
|
2867
|
+
var vr = a.forwardRef(function(e, t) {
|
|
2868
|
+
return a.createElement(lt, q({}, e, { ref: t, sideCar: is }));
|
|
2836
2869
|
});
|
|
2837
|
-
|
|
2838
|
-
var
|
|
2839
|
-
ltr: [...
|
|
2840
|
-
rtl: [...
|
|
2841
|
-
},
|
|
2870
|
+
vr.classNames = lt.classNames;
|
|
2871
|
+
var _t = ["Enter", " "], cs = ["ArrowDown", "PageUp", "Home"], gr = ["ArrowUp", "PageDown", "End"], ss = [...cs, ...gr], as = {
|
|
2872
|
+
ltr: [..._t, "ArrowRight"],
|
|
2873
|
+
rtl: [..._t, "ArrowLeft"]
|
|
2874
|
+
}, us = {
|
|
2842
2875
|
ltr: ["ArrowLeft"],
|
|
2843
2876
|
rtl: ["ArrowRight"]
|
|
2844
|
-
}, $e = "Menu", [Ie,
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
]),
|
|
2849
|
-
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: i, modal: s = !0 } = e, c =
|
|
2877
|
+
}, $e = "Menu", [Ie, ls, fs] = Rn($e), [he, wr] = Ne($e, [
|
|
2878
|
+
fs,
|
|
2879
|
+
Hn,
|
|
2880
|
+
rr
|
|
2881
|
+
]), We = Hn(), yr = rr(), [br, le] = he($e), [ds, Be] = he($e), Cr = (e) => {
|
|
2882
|
+
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: i, modal: s = !0 } = e, c = We(t), [d, f] = a.useState(null), l = a.useRef(!1), u = ee(i), p = Mn(o);
|
|
2850
2883
|
return a.useEffect(() => {
|
|
2851
2884
|
const h = () => {
|
|
2852
|
-
|
|
2853
|
-
}, g = () =>
|
|
2885
|
+
l.current = !0, document.addEventListener("pointerdown", g, { capture: !0, once: !0 }), document.addEventListener("pointermove", g, { capture: !0, once: !0 });
|
|
2886
|
+
}, g = () => l.current = !1;
|
|
2854
2887
|
return document.addEventListener("keydown", h, { capture: !0 }), () => {
|
|
2855
2888
|
document.removeEventListener("keydown", h, { capture: !0 }), document.removeEventListener("pointerdown", g, { capture: !0 }), document.removeEventListener("pointermove", g, { capture: !0 });
|
|
2856
2889
|
};
|
|
2857
|
-
}, []), /* @__PURE__ */ y(
|
|
2858
|
-
|
|
2890
|
+
}, []), /* @__PURE__ */ y(er, { ...c, children: /* @__PURE__ */ y(
|
|
2891
|
+
br,
|
|
2859
2892
|
{
|
|
2860
2893
|
scope: t,
|
|
2861
2894
|
open: n,
|
|
2862
2895
|
onOpenChange: u,
|
|
2863
2896
|
content: d,
|
|
2864
|
-
onContentChange:
|
|
2897
|
+
onContentChange: f,
|
|
2865
2898
|
children: /* @__PURE__ */ y(
|
|
2866
|
-
|
|
2899
|
+
ds,
|
|
2867
2900
|
{
|
|
2868
2901
|
scope: t,
|
|
2869
2902
|
onClose: a.useCallback(() => u(!1), [u]),
|
|
2870
|
-
isUsingKeyboardRef:
|
|
2903
|
+
isUsingKeyboardRef: l,
|
|
2871
2904
|
dir: p,
|
|
2872
2905
|
modal: s,
|
|
2873
2906
|
children: r
|
|
@@ -2876,34 +2909,34 @@ var Pt = ["Enter", " "], lc = ["ArrowDown", "PageUp", "Home"], hr = ["ArrowUp",
|
|
|
2876
2909
|
}
|
|
2877
2910
|
) });
|
|
2878
2911
|
};
|
|
2879
|
-
|
|
2880
|
-
var
|
|
2912
|
+
Cr.displayName = $e;
|
|
2913
|
+
var ps = "MenuAnchor", Bt = a.forwardRef(
|
|
2881
2914
|
(e, t) => {
|
|
2882
|
-
const { __scopeMenu: n, ...r } = e, o =
|
|
2883
|
-
return /* @__PURE__ */ y(
|
|
2915
|
+
const { __scopeMenu: n, ...r } = e, o = We(n);
|
|
2916
|
+
return /* @__PURE__ */ y(tc, { ...o, ...r, ref: t });
|
|
2884
2917
|
}
|
|
2885
2918
|
);
|
|
2886
|
-
Bt.displayName =
|
|
2887
|
-
var
|
|
2919
|
+
Bt.displayName = ps;
|
|
2920
|
+
var Ut = "MenuPortal", [ms, Er] = he(Ut, {
|
|
2888
2921
|
forceMount: void 0
|
|
2889
|
-
}),
|
|
2890
|
-
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, i = le(
|
|
2891
|
-
return /* @__PURE__ */ y(
|
|
2922
|
+
}), xr = (e) => {
|
|
2923
|
+
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, i = le(Ut, t);
|
|
2924
|
+
return /* @__PURE__ */ y(ms, { scope: t, forceMount: n, children: /* @__PURE__ */ y(Fe, { present: n || i.open, children: /* @__PURE__ */ y(tr, { asChild: !0, container: o, children: r }) }) });
|
|
2892
2925
|
};
|
|
2893
|
-
|
|
2894
|
-
var Y = "MenuContent", [
|
|
2926
|
+
xr.displayName = Ut;
|
|
2927
|
+
var Y = "MenuContent", [hs, Kt] = he(Y), Sr = a.forwardRef(
|
|
2895
2928
|
(e, t) => {
|
|
2896
|
-
const n =
|
|
2897
|
-
return /* @__PURE__ */ y(Ie.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ y(Fe, { present: r || i.open, children: /* @__PURE__ */ y(Ie.Slot, { scope: e.__scopeMenu, children: s.modal ? /* @__PURE__ */ y(
|
|
2929
|
+
const n = Er(Y, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = le(Y, e.__scopeMenu), s = Be(Y, e.__scopeMenu);
|
|
2930
|
+
return /* @__PURE__ */ y(Ie.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ y(Fe, { present: r || i.open, children: /* @__PURE__ */ y(Ie.Slot, { scope: e.__scopeMenu, children: s.modal ? /* @__PURE__ */ y(vs, { ...o, ref: t }) : /* @__PURE__ */ y(gs, { ...o, ref: t }) }) }) });
|
|
2898
2931
|
}
|
|
2899
|
-
),
|
|
2932
|
+
), vs = a.forwardRef(
|
|
2900
2933
|
(e, t) => {
|
|
2901
2934
|
const n = le(Y, e.__scopeMenu), r = a.useRef(null), o = G(t, r);
|
|
2902
2935
|
return a.useEffect(() => {
|
|
2903
2936
|
const i = r.current;
|
|
2904
|
-
if (i) return
|
|
2937
|
+
if (i) return xc(i);
|
|
2905
2938
|
}, []), /* @__PURE__ */ y(
|
|
2906
|
-
|
|
2939
|
+
Gt,
|
|
2907
2940
|
{
|
|
2908
2941
|
...e,
|
|
2909
2942
|
ref: o,
|
|
@@ -2919,10 +2952,10 @@ var Y = "MenuContent", [yc, Ut] = me(Y), Er = a.forwardRef(
|
|
|
2919
2952
|
}
|
|
2920
2953
|
);
|
|
2921
2954
|
}
|
|
2922
|
-
),
|
|
2955
|
+
), gs = a.forwardRef((e, t) => {
|
|
2923
2956
|
const n = le(Y, e.__scopeMenu);
|
|
2924
2957
|
return /* @__PURE__ */ y(
|
|
2925
|
-
|
|
2958
|
+
Gt,
|
|
2926
2959
|
{
|
|
2927
2960
|
...e,
|
|
2928
2961
|
ref: t,
|
|
@@ -2932,7 +2965,7 @@ var Y = "MenuContent", [yc, Ut] = me(Y), Er = a.forwardRef(
|
|
|
2932
2965
|
onDismiss: () => n.onOpenChange(!1)
|
|
2933
2966
|
}
|
|
2934
2967
|
);
|
|
2935
|
-
}),
|
|
2968
|
+
}), ws = /* @__PURE__ */ Qe("MenuContent.ScrollLock"), Gt = a.forwardRef(
|
|
2936
2969
|
(e, t) => {
|
|
2937
2970
|
const {
|
|
2938
2971
|
__scopeMenu: n,
|
|
@@ -2942,118 +2975,118 @@ var Y = "MenuContent", [yc, Ut] = me(Y), Er = a.forwardRef(
|
|
|
2942
2975
|
onCloseAutoFocus: s,
|
|
2943
2976
|
disableOutsidePointerEvents: c,
|
|
2944
2977
|
onEntryFocus: d,
|
|
2945
|
-
onEscapeKeyDown:
|
|
2946
|
-
onPointerDownOutside:
|
|
2978
|
+
onEscapeKeyDown: f,
|
|
2979
|
+
onPointerDownOutside: l,
|
|
2947
2980
|
onFocusOutside: u,
|
|
2948
2981
|
onInteractOutside: p,
|
|
2949
2982
|
onDismiss: h,
|
|
2950
2983
|
disableOutsideScroll: g,
|
|
2951
2984
|
...m
|
|
2952
|
-
} = e, v = le(Y, n), w =
|
|
2953
|
-
var
|
|
2954
|
-
const
|
|
2955
|
-
(function z(
|
|
2956
|
-
_.current =
|
|
2957
|
-
})(
|
|
2985
|
+
} = e, v = le(Y, n), w = Be(Y, n), E = We(n), b = yr(n), C = ls(n), [S, R] = a.useState(null), x = a.useRef(null), A = G(t, x, v.onContentChange), I = a.useRef(0), _ = a.useRef(""), D = a.useRef(0), L = a.useRef(null), F = a.useRef("right"), N = a.useRef(0), W = g ? vr : a.Fragment, T = g ? { as: ws, allowPinchZoom: !0 } : void 0, $ = (M) => {
|
|
2986
|
+
var ne, Me;
|
|
2987
|
+
const k = _.current + M, U = C().filter((z) => !z.disabled), Z = document.activeElement, Se = (ne = U.find((z) => z.ref.current === Z)) == null ? void 0 : ne.textValue, Re = U.map((z) => z.textValue), Ue = _s(Re, k, Se), fe = (Me = U.find((z) => z.textValue === Ue)) == null ? void 0 : Me.ref.current;
|
|
2988
|
+
(function z(Ae) {
|
|
2989
|
+
_.current = Ae, window.clearTimeout(I.current), Ae !== "" && (I.current = window.setTimeout(() => z(""), 1e3));
|
|
2990
|
+
})(k), fe && setTimeout(() => fe.focus());
|
|
2958
2991
|
};
|
|
2959
|
-
a.useEffect(() => () => window.clearTimeout(I.current), []),
|
|
2960
|
-
const P = a.useCallback((
|
|
2992
|
+
a.useEffect(() => () => window.clearTimeout(I.current), []), Io();
|
|
2993
|
+
const P = a.useCallback((M) => {
|
|
2961
2994
|
var U, Z;
|
|
2962
|
-
return
|
|
2995
|
+
return F.current === ((U = L.current) == null ? void 0 : U.side) && Is(M, (Z = L.current) == null ? void 0 : Z.area);
|
|
2963
2996
|
}, []);
|
|
2964
2997
|
return /* @__PURE__ */ y(
|
|
2965
|
-
|
|
2998
|
+
hs,
|
|
2966
2999
|
{
|
|
2967
3000
|
scope: n,
|
|
2968
3001
|
searchRef: _,
|
|
2969
3002
|
onItemEnter: a.useCallback(
|
|
2970
|
-
(
|
|
2971
|
-
P(
|
|
3003
|
+
(M) => {
|
|
3004
|
+
P(M) && M.preventDefault();
|
|
2972
3005
|
},
|
|
2973
3006
|
[P]
|
|
2974
3007
|
),
|
|
2975
3008
|
onItemLeave: a.useCallback(
|
|
2976
|
-
(
|
|
2977
|
-
var
|
|
2978
|
-
P(
|
|
3009
|
+
(M) => {
|
|
3010
|
+
var k;
|
|
3011
|
+
P(M) || ((k = x.current) == null || k.focus(), R(null));
|
|
2979
3012
|
},
|
|
2980
3013
|
[P]
|
|
2981
3014
|
),
|
|
2982
3015
|
onTriggerLeave: a.useCallback(
|
|
2983
|
-
(
|
|
2984
|
-
P(
|
|
3016
|
+
(M) => {
|
|
3017
|
+
P(M) && M.preventDefault();
|
|
2985
3018
|
},
|
|
2986
3019
|
[P]
|
|
2987
3020
|
),
|
|
2988
|
-
pointerGraceTimerRef:
|
|
2989
|
-
onPointerGraceIntentChange: a.useCallback((
|
|
2990
|
-
|
|
3021
|
+
pointerGraceTimerRef: D,
|
|
3022
|
+
onPointerGraceIntentChange: a.useCallback((M) => {
|
|
3023
|
+
L.current = M;
|
|
2991
3024
|
}, []),
|
|
2992
|
-
children: /* @__PURE__ */ y(
|
|
2993
|
-
|
|
3025
|
+
children: /* @__PURE__ */ y(W, { ...T, children: /* @__PURE__ */ y(
|
|
3026
|
+
_n,
|
|
2994
3027
|
{
|
|
2995
3028
|
asChild: !0,
|
|
2996
3029
|
trapped: o,
|
|
2997
|
-
onMountAutoFocus: O(i, (
|
|
2998
|
-
var
|
|
2999
|
-
|
|
3030
|
+
onMountAutoFocus: O(i, (M) => {
|
|
3031
|
+
var k;
|
|
3032
|
+
M.preventDefault(), (k = x.current) == null || k.focus({ preventScroll: !0 });
|
|
3000
3033
|
}),
|
|
3001
3034
|
onUnmountAutoFocus: s,
|
|
3002
3035
|
children: /* @__PURE__ */ y(
|
|
3003
|
-
|
|
3036
|
+
Pn,
|
|
3004
3037
|
{
|
|
3005
3038
|
asChild: !0,
|
|
3006
3039
|
disableOutsidePointerEvents: c,
|
|
3007
|
-
onEscapeKeyDown:
|
|
3008
|
-
onPointerDownOutside:
|
|
3040
|
+
onEscapeKeyDown: f,
|
|
3041
|
+
onPointerDownOutside: l,
|
|
3009
3042
|
onFocusOutside: u,
|
|
3010
3043
|
onInteractOutside: p,
|
|
3011
3044
|
onDismiss: h,
|
|
3012
3045
|
children: /* @__PURE__ */ y(
|
|
3013
|
-
|
|
3046
|
+
wc,
|
|
3014
3047
|
{
|
|
3015
3048
|
asChild: !0,
|
|
3016
3049
|
...b,
|
|
3017
3050
|
dir: w.dir,
|
|
3018
3051
|
orientation: "vertical",
|
|
3019
3052
|
loop: r,
|
|
3020
|
-
currentTabStopId:
|
|
3021
|
-
onCurrentTabStopIdChange:
|
|
3022
|
-
onEntryFocus: O(d, (
|
|
3023
|
-
w.isUsingKeyboardRef.current ||
|
|
3053
|
+
currentTabStopId: S,
|
|
3054
|
+
onCurrentTabStopIdChange: R,
|
|
3055
|
+
onEntryFocus: O(d, (M) => {
|
|
3056
|
+
w.isUsingKeyboardRef.current || M.preventDefault();
|
|
3024
3057
|
}),
|
|
3025
3058
|
preventScrollOnEntryFocus: !0,
|
|
3026
3059
|
children: /* @__PURE__ */ y(
|
|
3027
|
-
|
|
3060
|
+
nc,
|
|
3028
3061
|
{
|
|
3029
3062
|
role: "menu",
|
|
3030
3063
|
"aria-orientation": "vertical",
|
|
3031
|
-
"data-state":
|
|
3064
|
+
"data-state": Ur(v.open),
|
|
3032
3065
|
"data-radix-menu-content": "",
|
|
3033
3066
|
dir: w.dir,
|
|
3034
|
-
...
|
|
3067
|
+
...E,
|
|
3035
3068
|
...m,
|
|
3036
3069
|
ref: A,
|
|
3037
3070
|
style: { outline: "none", ...m.style },
|
|
3038
|
-
onKeyDown: O(m.onKeyDown, (
|
|
3039
|
-
const U =
|
|
3040
|
-
U && (
|
|
3041
|
-
const
|
|
3042
|
-
if (
|
|
3043
|
-
|
|
3044
|
-
const fe =
|
|
3045
|
-
|
|
3071
|
+
onKeyDown: O(m.onKeyDown, (M) => {
|
|
3072
|
+
const U = M.target.closest("[data-radix-menu-content]") === M.currentTarget, Z = M.ctrlKey || M.altKey || M.metaKey, Se = M.key.length === 1;
|
|
3073
|
+
U && (M.key === "Tab" && M.preventDefault(), !Z && Se && $(M.key));
|
|
3074
|
+
const Re = x.current;
|
|
3075
|
+
if (M.target !== Re || !ss.includes(M.key)) return;
|
|
3076
|
+
M.preventDefault();
|
|
3077
|
+
const fe = C().filter((ne) => !ne.disabled).map((ne) => ne.ref.current);
|
|
3078
|
+
gr.includes(M.key) && fe.reverse(), Ps(fe);
|
|
3046
3079
|
}),
|
|
3047
|
-
onBlur: O(e.onBlur, (
|
|
3048
|
-
|
|
3080
|
+
onBlur: O(e.onBlur, (M) => {
|
|
3081
|
+
M.currentTarget.contains(M.target) || (window.clearTimeout(I.current), _.current = "");
|
|
3049
3082
|
}),
|
|
3050
3083
|
onPointerMove: O(
|
|
3051
3084
|
e.onPointerMove,
|
|
3052
|
-
De((
|
|
3053
|
-
const
|
|
3054
|
-
if (
|
|
3055
|
-
const Z =
|
|
3056
|
-
|
|
3085
|
+
De((M) => {
|
|
3086
|
+
const k = M.target, U = N.current !== M.clientX;
|
|
3087
|
+
if (M.currentTarget.contains(k) && U) {
|
|
3088
|
+
const Z = M.clientX > N.current ? "right" : "left";
|
|
3089
|
+
F.current = Z, N.current = M.clientX;
|
|
3057
3090
|
}
|
|
3058
3091
|
})
|
|
3059
3092
|
)
|
|
@@ -3069,57 +3102,57 @@ var Y = "MenuContent", [yc, Ut] = me(Y), Er = a.forwardRef(
|
|
|
3069
3102
|
);
|
|
3070
3103
|
}
|
|
3071
3104
|
);
|
|
3072
|
-
|
|
3073
|
-
var
|
|
3105
|
+
Sr.displayName = Y;
|
|
3106
|
+
var ys = "MenuGroup", Vt = a.forwardRef(
|
|
3074
3107
|
(e, t) => {
|
|
3075
3108
|
const { __scopeMenu: n, ...r } = e;
|
|
3076
3109
|
return /* @__PURE__ */ y(K.div, { role: "group", ...r, ref: t });
|
|
3077
3110
|
}
|
|
3078
3111
|
);
|
|
3079
|
-
|
|
3080
|
-
var
|
|
3112
|
+
Vt.displayName = ys;
|
|
3113
|
+
var bs = "MenuLabel", Rr = a.forwardRef(
|
|
3081
3114
|
(e, t) => {
|
|
3082
3115
|
const { __scopeMenu: n, ...r } = e;
|
|
3083
3116
|
return /* @__PURE__ */ y(K.div, { ...r, ref: t });
|
|
3084
3117
|
}
|
|
3085
3118
|
);
|
|
3086
|
-
|
|
3087
|
-
var rt = "MenuItem",
|
|
3119
|
+
Rr.displayName = bs;
|
|
3120
|
+
var rt = "MenuItem", En = "menu.itemSelect", ft = a.forwardRef(
|
|
3088
3121
|
(e, t) => {
|
|
3089
|
-
const { disabled: n = !1, onSelect: r, ...o } = e, i = a.useRef(null), s =
|
|
3122
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, i = a.useRef(null), s = Be(rt, e.__scopeMenu), c = Kt(rt, e.__scopeMenu), d = G(t, i), f = a.useRef(!1), l = () => {
|
|
3090
3123
|
const u = i.current;
|
|
3091
3124
|
if (!n && u) {
|
|
3092
|
-
const p = new CustomEvent(
|
|
3093
|
-
u.addEventListener(
|
|
3125
|
+
const p = new CustomEvent(En, { bubbles: !0, cancelable: !0 });
|
|
3126
|
+
u.addEventListener(En, (h) => r == null ? void 0 : r(h), { once: !0 }), Sn(u, p), p.defaultPrevented ? f.current = !1 : s.onClose();
|
|
3094
3127
|
}
|
|
3095
3128
|
};
|
|
3096
3129
|
return /* @__PURE__ */ y(
|
|
3097
|
-
|
|
3130
|
+
Mr,
|
|
3098
3131
|
{
|
|
3099
3132
|
...o,
|
|
3100
3133
|
ref: d,
|
|
3101
3134
|
disabled: n,
|
|
3102
|
-
onClick: O(e.onClick,
|
|
3135
|
+
onClick: O(e.onClick, l),
|
|
3103
3136
|
onPointerDown: (u) => {
|
|
3104
3137
|
var p;
|
|
3105
|
-
(p = e.onPointerDown) == null || p.call(e, u),
|
|
3138
|
+
(p = e.onPointerDown) == null || p.call(e, u), f.current = !0;
|
|
3106
3139
|
},
|
|
3107
3140
|
onPointerUp: O(e.onPointerUp, (u) => {
|
|
3108
3141
|
var p;
|
|
3109
|
-
|
|
3142
|
+
f.current || (p = u.currentTarget) == null || p.click();
|
|
3110
3143
|
}),
|
|
3111
3144
|
onKeyDown: O(e.onKeyDown, (u) => {
|
|
3112
3145
|
const p = c.searchRef.current !== "";
|
|
3113
|
-
n || p && u.key === " " ||
|
|
3146
|
+
n || p && u.key === " " || _t.includes(u.key) && (u.currentTarget.click(), u.preventDefault());
|
|
3114
3147
|
})
|
|
3115
3148
|
}
|
|
3116
3149
|
);
|
|
3117
3150
|
}
|
|
3118
3151
|
);
|
|
3119
|
-
|
|
3120
|
-
var
|
|
3152
|
+
ft.displayName = rt;
|
|
3153
|
+
var Mr = a.forwardRef(
|
|
3121
3154
|
(e, t) => {
|
|
3122
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...i } = e, s =
|
|
3155
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...i } = e, s = Kt(rt, n), c = yr(n), d = a.useRef(null), f = G(t, d), [l, u] = a.useState(!1), [p, h] = a.useState("");
|
|
3123
3156
|
return a.useEffect(() => {
|
|
3124
3157
|
const g = d.current;
|
|
3125
3158
|
g && h((g.textContent ?? "").trim());
|
|
@@ -3129,15 +3162,15 @@ var Sr = a.forwardRef(
|
|
|
3129
3162
|
scope: n,
|
|
3130
3163
|
disabled: r,
|
|
3131
3164
|
textValue: o ?? p,
|
|
3132
|
-
children: /* @__PURE__ */ y(
|
|
3165
|
+
children: /* @__PURE__ */ y(yc, { asChild: !0, ...c, focusable: !r, children: /* @__PURE__ */ y(
|
|
3133
3166
|
K.div,
|
|
3134
3167
|
{
|
|
3135
3168
|
role: "menuitem",
|
|
3136
|
-
"data-highlighted":
|
|
3169
|
+
"data-highlighted": l ? "" : void 0,
|
|
3137
3170
|
"aria-disabled": r || void 0,
|
|
3138
3171
|
"data-disabled": r ? "" : void 0,
|
|
3139
3172
|
...i,
|
|
3140
|
-
ref:
|
|
3173
|
+
ref: f,
|
|
3141
3174
|
onPointerMove: O(
|
|
3142
3175
|
e.onPointerMove,
|
|
3143
3176
|
De((g) => {
|
|
@@ -3155,17 +3188,17 @@ var Sr = a.forwardRef(
|
|
|
3155
3188
|
}
|
|
3156
3189
|
);
|
|
3157
3190
|
}
|
|
3158
|
-
),
|
|
3191
|
+
), Cs = "MenuCheckboxItem", Ar = a.forwardRef(
|
|
3159
3192
|
(e, t) => {
|
|
3160
3193
|
const { checked: n = !1, onCheckedChange: r, ...o } = e;
|
|
3161
|
-
return /* @__PURE__ */ y(
|
|
3162
|
-
|
|
3194
|
+
return /* @__PURE__ */ y(Ir, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ y(
|
|
3195
|
+
ft,
|
|
3163
3196
|
{
|
|
3164
3197
|
role: "menuitemcheckbox",
|
|
3165
3198
|
"aria-checked": ot(n) ? "mixed" : n,
|
|
3166
3199
|
...o,
|
|
3167
3200
|
ref: t,
|
|
3168
|
-
"data-state":
|
|
3201
|
+
"data-state": Yt(n),
|
|
3169
3202
|
onSelect: O(
|
|
3170
3203
|
o.onSelect,
|
|
3171
3204
|
() => r == null ? void 0 : r(ot(n) ? !0 : !n),
|
|
@@ -3175,29 +3208,29 @@ var Sr = a.forwardRef(
|
|
|
3175
3208
|
) });
|
|
3176
3209
|
}
|
|
3177
3210
|
);
|
|
3178
|
-
|
|
3179
|
-
var
|
|
3180
|
-
|
|
3211
|
+
Ar.displayName = Cs;
|
|
3212
|
+
var Pr = "MenuRadioGroup", [Es, xs] = he(
|
|
3213
|
+
Pr,
|
|
3181
3214
|
{ value: void 0, onValueChange: () => {
|
|
3182
3215
|
} }
|
|
3183
|
-
),
|
|
3216
|
+
), Or = a.forwardRef(
|
|
3184
3217
|
(e, t) => {
|
|
3185
3218
|
const { value: n, onValueChange: r, ...o } = e, i = ee(r);
|
|
3186
|
-
return /* @__PURE__ */ y(
|
|
3219
|
+
return /* @__PURE__ */ y(Es, { scope: e.__scopeMenu, value: n, onValueChange: i, children: /* @__PURE__ */ y(Vt, { ...o, ref: t }) });
|
|
3187
3220
|
}
|
|
3188
3221
|
);
|
|
3189
|
-
|
|
3190
|
-
var
|
|
3222
|
+
Or.displayName = Pr;
|
|
3223
|
+
var _r = "MenuRadioItem", Tr = a.forwardRef(
|
|
3191
3224
|
(e, t) => {
|
|
3192
|
-
const { value: n, ...r } = e, o =
|
|
3193
|
-
return /* @__PURE__ */ y(
|
|
3194
|
-
|
|
3225
|
+
const { value: n, ...r } = e, o = xs(_r, e.__scopeMenu), i = n === o.value;
|
|
3226
|
+
return /* @__PURE__ */ y(Ir, { scope: e.__scopeMenu, checked: i, children: /* @__PURE__ */ y(
|
|
3227
|
+
ft,
|
|
3195
3228
|
{
|
|
3196
3229
|
role: "menuitemradio",
|
|
3197
3230
|
"aria-checked": i,
|
|
3198
3231
|
...r,
|
|
3199
3232
|
ref: t,
|
|
3200
|
-
"data-state":
|
|
3233
|
+
"data-state": Yt(i),
|
|
3201
3234
|
onSelect: O(
|
|
3202
3235
|
r.onSelect,
|
|
3203
3236
|
() => {
|
|
@@ -3210,13 +3243,13 @@ var Pr = "MenuRadioItem", Or = a.forwardRef(
|
|
|
3210
3243
|
) });
|
|
3211
3244
|
}
|
|
3212
3245
|
);
|
|
3213
|
-
|
|
3214
|
-
var
|
|
3215
|
-
|
|
3246
|
+
Tr.displayName = _r;
|
|
3247
|
+
var Ht = "MenuItemIndicator", [Ir, Ss] = he(
|
|
3248
|
+
Ht,
|
|
3216
3249
|
{ checked: !1 }
|
|
3217
|
-
),
|
|
3250
|
+
), Dr = a.forwardRef(
|
|
3218
3251
|
(e, t) => {
|
|
3219
|
-
const { __scopeMenu: n, forceMount: r, ...o } = e, i =
|
|
3252
|
+
const { __scopeMenu: n, forceMount: r, ...o } = e, i = Ss(Ht, n);
|
|
3220
3253
|
return /* @__PURE__ */ y(
|
|
3221
3254
|
Fe,
|
|
3222
3255
|
{
|
|
@@ -3226,15 +3259,15 @@ var Vt = "MenuItemIndicator", [_r, Pc] = me(
|
|
|
3226
3259
|
{
|
|
3227
3260
|
...o,
|
|
3228
3261
|
ref: t,
|
|
3229
|
-
"data-state":
|
|
3262
|
+
"data-state": Yt(i.checked)
|
|
3230
3263
|
}
|
|
3231
3264
|
)
|
|
3232
3265
|
}
|
|
3233
3266
|
);
|
|
3234
3267
|
}
|
|
3235
3268
|
);
|
|
3236
|
-
|
|
3237
|
-
var
|
|
3269
|
+
Dr.displayName = Ht;
|
|
3270
|
+
var Rs = "MenuSeparator", Nr = a.forwardRef(
|
|
3238
3271
|
(e, t) => {
|
|
3239
3272
|
const { __scopeMenu: n, ...r } = e;
|
|
3240
3273
|
return /* @__PURE__ */ y(
|
|
@@ -3248,30 +3281,30 @@ var Oc = "MenuSeparator", Ir = a.forwardRef(
|
|
|
3248
3281
|
);
|
|
3249
3282
|
}
|
|
3250
3283
|
);
|
|
3251
|
-
|
|
3252
|
-
var
|
|
3284
|
+
Nr.displayName = Rs;
|
|
3285
|
+
var Ms = "MenuArrow", Lr = a.forwardRef(
|
|
3253
3286
|
(e, t) => {
|
|
3254
|
-
const { __scopeMenu: n, ...r } = e, o =
|
|
3255
|
-
return /* @__PURE__ */ y(
|
|
3287
|
+
const { __scopeMenu: n, ...r } = e, o = We(n);
|
|
3288
|
+
return /* @__PURE__ */ y(rc, { ...o, ...r, ref: t });
|
|
3256
3289
|
}
|
|
3257
3290
|
);
|
|
3258
|
-
|
|
3259
|
-
var
|
|
3260
|
-
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, i = le(
|
|
3261
|
-
return a.useEffect(() => (i.open === !1 && u(!1), () => u(!1)), [i.open, u]), /* @__PURE__ */ y(
|
|
3262
|
-
|
|
3291
|
+
Lr.displayName = Ms;
|
|
3292
|
+
var zt = "MenuSub", [As, Fr] = he(zt), kr = (e) => {
|
|
3293
|
+
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, i = le(zt, t), s = We(t), [c, d] = a.useState(null), [f, l] = a.useState(null), u = ee(o);
|
|
3294
|
+
return a.useEffect(() => (i.open === !1 && u(!1), () => u(!1)), [i.open, u]), /* @__PURE__ */ y(er, { ...s, children: /* @__PURE__ */ y(
|
|
3295
|
+
br,
|
|
3263
3296
|
{
|
|
3264
3297
|
scope: t,
|
|
3265
3298
|
open: r,
|
|
3266
3299
|
onOpenChange: u,
|
|
3267
|
-
content:
|
|
3268
|
-
onContentChange:
|
|
3300
|
+
content: f,
|
|
3301
|
+
onContentChange: l,
|
|
3269
3302
|
children: /* @__PURE__ */ y(
|
|
3270
|
-
|
|
3303
|
+
As,
|
|
3271
3304
|
{
|
|
3272
3305
|
scope: t,
|
|
3273
|
-
contentId:
|
|
3274
|
-
triggerId:
|
|
3306
|
+
contentId: _e(),
|
|
3307
|
+
triggerId: _e(),
|
|
3275
3308
|
trigger: c,
|
|
3276
3309
|
onTriggerChange: d,
|
|
3277
3310
|
children: n
|
|
@@ -3280,25 +3313,25 @@ var Ht = "MenuSub", [Tc, Nr] = me(Ht), Lr = (e) => {
|
|
|
3280
3313
|
}
|
|
3281
3314
|
) });
|
|
3282
3315
|
};
|
|
3283
|
-
|
|
3284
|
-
var
|
|
3316
|
+
kr.displayName = zt;
|
|
3317
|
+
var Oe = "MenuSubTrigger", $r = a.forwardRef(
|
|
3285
3318
|
(e, t) => {
|
|
3286
|
-
const n = le(
|
|
3319
|
+
const n = le(Oe, e.__scopeMenu), r = Be(Oe, e.__scopeMenu), o = Fr(Oe, e.__scopeMenu), i = Kt(Oe, e.__scopeMenu), s = a.useRef(null), { pointerGraceTimerRef: c, onPointerGraceIntentChange: d } = i, f = { __scopeMenu: e.__scopeMenu }, l = a.useCallback(() => {
|
|
3287
3320
|
s.current && window.clearTimeout(s.current), s.current = null;
|
|
3288
3321
|
}, []);
|
|
3289
|
-
return a.useEffect(() =>
|
|
3322
|
+
return a.useEffect(() => l, [l]), a.useEffect(() => {
|
|
3290
3323
|
const u = c.current;
|
|
3291
3324
|
return () => {
|
|
3292
3325
|
window.clearTimeout(u), d(null);
|
|
3293
3326
|
};
|
|
3294
|
-
}, [c, d]), /* @__PURE__ */ y(Bt, { asChild: !0, ...
|
|
3295
|
-
|
|
3327
|
+
}, [c, d]), /* @__PURE__ */ y(Bt, { asChild: !0, ...f, children: /* @__PURE__ */ y(
|
|
3328
|
+
Mr,
|
|
3296
3329
|
{
|
|
3297
3330
|
id: o.triggerId,
|
|
3298
3331
|
"aria-haspopup": "menu",
|
|
3299
3332
|
"aria-expanded": n.open,
|
|
3300
3333
|
"aria-controls": o.contentId,
|
|
3301
|
-
"data-state":
|
|
3334
|
+
"data-state": Ur(n.open),
|
|
3302
3335
|
...e,
|
|
3303
3336
|
ref: it(t, o.onTriggerChange),
|
|
3304
3337
|
onClick: (u) => {
|
|
@@ -3309,7 +3342,7 @@ var Pe = "MenuSubTrigger", Fr = a.forwardRef(
|
|
|
3309
3342
|
e.onPointerMove,
|
|
3310
3343
|
De((u) => {
|
|
3311
3344
|
i.onItemEnter(u), !u.defaultPrevented && !e.disabled && !n.open && !s.current && (i.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
|
|
3312
|
-
n.onOpenChange(!0),
|
|
3345
|
+
n.onOpenChange(!0), l();
|
|
3313
3346
|
}, 100));
|
|
3314
3347
|
})
|
|
3315
3348
|
),
|
|
@@ -3317,19 +3350,19 @@ var Pe = "MenuSubTrigger", Fr = a.forwardRef(
|
|
|
3317
3350
|
e.onPointerLeave,
|
|
3318
3351
|
De((u) => {
|
|
3319
3352
|
var h, g;
|
|
3320
|
-
|
|
3353
|
+
l();
|
|
3321
3354
|
const p = (h = n.content) == null ? void 0 : h.getBoundingClientRect();
|
|
3322
3355
|
if (p) {
|
|
3323
|
-
const m = (g = n.content) == null ? void 0 : g.dataset.side, v = m === "right", w = v ? -5 : 5,
|
|
3356
|
+
const m = (g = n.content) == null ? void 0 : g.dataset.side, v = m === "right", w = v ? -5 : 5, E = p[v ? "left" : "right"], b = p[v ? "right" : "left"];
|
|
3324
3357
|
i.onPointerGraceIntentChange({
|
|
3325
3358
|
area: [
|
|
3326
3359
|
// Apply a bleed on clientX to ensure that our exit point is
|
|
3327
3360
|
// consistently within polygon bounds
|
|
3328
3361
|
{ x: u.clientX + w, y: u.clientY },
|
|
3329
|
-
{ x:
|
|
3362
|
+
{ x: E, y: p.top },
|
|
3330
3363
|
{ x: b, y: p.top },
|
|
3331
3364
|
{ x: b, y: p.bottom },
|
|
3332
|
-
{ x:
|
|
3365
|
+
{ x: E, y: p.bottom }
|
|
3333
3366
|
],
|
|
3334
3367
|
side: m
|
|
3335
3368
|
}), window.clearTimeout(c.current), c.current = window.setTimeout(
|
|
@@ -3345,96 +3378,96 @@ var Pe = "MenuSubTrigger", Fr = a.forwardRef(
|
|
|
3345
3378
|
onKeyDown: O(e.onKeyDown, (u) => {
|
|
3346
3379
|
var h;
|
|
3347
3380
|
const p = i.searchRef.current !== "";
|
|
3348
|
-
e.disabled || p && u.key === " " ||
|
|
3381
|
+
e.disabled || p && u.key === " " || as[r.dir].includes(u.key) && (n.onOpenChange(!0), (h = n.content) == null || h.focus(), u.preventDefault());
|
|
3349
3382
|
})
|
|
3350
3383
|
}
|
|
3351
3384
|
) });
|
|
3352
3385
|
}
|
|
3353
3386
|
);
|
|
3354
|
-
|
|
3355
|
-
var
|
|
3387
|
+
$r.displayName = Oe;
|
|
3388
|
+
var Wr = "MenuSubContent", Br = a.forwardRef(
|
|
3356
3389
|
(e, t) => {
|
|
3357
|
-
const n =
|
|
3390
|
+
const n = Er(Y, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = le(Y, e.__scopeMenu), s = Be(Y, e.__scopeMenu), c = Fr(Wr, e.__scopeMenu), d = a.useRef(null), f = G(t, d);
|
|
3358
3391
|
return /* @__PURE__ */ y(Ie.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ y(Fe, { present: r || i.open, children: /* @__PURE__ */ y(Ie.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ y(
|
|
3359
|
-
|
|
3392
|
+
Gt,
|
|
3360
3393
|
{
|
|
3361
3394
|
id: c.contentId,
|
|
3362
3395
|
"aria-labelledby": c.triggerId,
|
|
3363
3396
|
...o,
|
|
3364
|
-
ref:
|
|
3397
|
+
ref: f,
|
|
3365
3398
|
align: "start",
|
|
3366
3399
|
side: s.dir === "rtl" ? "left" : "right",
|
|
3367
3400
|
disableOutsidePointerEvents: !1,
|
|
3368
3401
|
disableOutsideScroll: !1,
|
|
3369
3402
|
trapFocus: !1,
|
|
3370
|
-
onOpenAutoFocus: (
|
|
3403
|
+
onOpenAutoFocus: (l) => {
|
|
3371
3404
|
var u;
|
|
3372
|
-
s.isUsingKeyboardRef.current && ((u = d.current) == null || u.focus()),
|
|
3405
|
+
s.isUsingKeyboardRef.current && ((u = d.current) == null || u.focus()), l.preventDefault();
|
|
3373
3406
|
},
|
|
3374
|
-
onCloseAutoFocus: (
|
|
3375
|
-
onFocusOutside: O(e.onFocusOutside, (
|
|
3376
|
-
|
|
3407
|
+
onCloseAutoFocus: (l) => l.preventDefault(),
|
|
3408
|
+
onFocusOutside: O(e.onFocusOutside, (l) => {
|
|
3409
|
+
l.target !== c.trigger && i.onOpenChange(!1);
|
|
3377
3410
|
}),
|
|
3378
|
-
onEscapeKeyDown: O(e.onEscapeKeyDown, (
|
|
3379
|
-
s.onClose(),
|
|
3411
|
+
onEscapeKeyDown: O(e.onEscapeKeyDown, (l) => {
|
|
3412
|
+
s.onClose(), l.preventDefault();
|
|
3380
3413
|
}),
|
|
3381
|
-
onKeyDown: O(e.onKeyDown, (
|
|
3414
|
+
onKeyDown: O(e.onKeyDown, (l) => {
|
|
3382
3415
|
var h;
|
|
3383
|
-
const u =
|
|
3384
|
-
u && p && (i.onOpenChange(!1), (h = c.trigger) == null || h.focus(),
|
|
3416
|
+
const u = l.currentTarget.contains(l.target), p = us[s.dir].includes(l.key);
|
|
3417
|
+
u && p && (i.onOpenChange(!1), (h = c.trigger) == null || h.focus(), l.preventDefault());
|
|
3385
3418
|
})
|
|
3386
3419
|
}
|
|
3387
3420
|
) }) }) });
|
|
3388
3421
|
}
|
|
3389
3422
|
);
|
|
3390
|
-
|
|
3391
|
-
function
|
|
3423
|
+
Br.displayName = Wr;
|
|
3424
|
+
function Ur(e) {
|
|
3392
3425
|
return e ? "open" : "closed";
|
|
3393
3426
|
}
|
|
3394
3427
|
function ot(e) {
|
|
3395
3428
|
return e === "indeterminate";
|
|
3396
3429
|
}
|
|
3397
|
-
function
|
|
3430
|
+
function Yt(e) {
|
|
3398
3431
|
return ot(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
3399
3432
|
}
|
|
3400
|
-
function
|
|
3433
|
+
function Ps(e) {
|
|
3401
3434
|
const t = document.activeElement;
|
|
3402
3435
|
for (const n of e)
|
|
3403
3436
|
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
3404
3437
|
}
|
|
3405
|
-
function
|
|
3438
|
+
function Os(e, t) {
|
|
3406
3439
|
return e.map((n, r) => e[(t + r) % e.length]);
|
|
3407
3440
|
}
|
|
3408
|
-
function
|
|
3409
|
-
const o = t.length > 1 && Array.from(t).every((
|
|
3410
|
-
let s =
|
|
3411
|
-
o.length === 1 && (s = s.filter((
|
|
3441
|
+
function _s(e, t, n) {
|
|
3442
|
+
const o = t.length > 1 && Array.from(t).every((f) => f === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1;
|
|
3443
|
+
let s = Os(e, Math.max(i, 0));
|
|
3444
|
+
o.length === 1 && (s = s.filter((f) => f !== n));
|
|
3412
3445
|
const d = s.find(
|
|
3413
|
-
(
|
|
3446
|
+
(f) => f.toLowerCase().startsWith(o.toLowerCase())
|
|
3414
3447
|
);
|
|
3415
3448
|
return d !== n ? d : void 0;
|
|
3416
3449
|
}
|
|
3417
|
-
function
|
|
3450
|
+
function Ts(e, t) {
|
|
3418
3451
|
const { x: n, y: r } = e;
|
|
3419
3452
|
let o = !1;
|
|
3420
3453
|
for (let i = 0, s = t.length - 1; i < t.length; s = i++) {
|
|
3421
|
-
const c = t[i], d = t[s],
|
|
3422
|
-
|
|
3454
|
+
const c = t[i], d = t[s], f = c.x, l = c.y, u = d.x, p = d.y;
|
|
3455
|
+
l > r != p > r && n < (u - f) * (r - l) / (p - l) + f && (o = !o);
|
|
3423
3456
|
}
|
|
3424
3457
|
return o;
|
|
3425
3458
|
}
|
|
3426
|
-
function
|
|
3459
|
+
function Is(e, t) {
|
|
3427
3460
|
if (!t) return !1;
|
|
3428
3461
|
const n = { x: e.clientX, y: e.clientY };
|
|
3429
|
-
return
|
|
3462
|
+
return Ts(n, t);
|
|
3430
3463
|
}
|
|
3431
3464
|
function De(e) {
|
|
3432
3465
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
3433
3466
|
}
|
|
3434
|
-
var
|
|
3435
|
-
|
|
3436
|
-
[
|
|
3437
|
-
),
|
|
3467
|
+
var Ds = Cr, Ns = Bt, Ls = xr, Fs = Sr, ks = Vt, $s = Rr, Ws = ft, Bs = Ar, Us = Or, Ks = Tr, Gs = Dr, Vs = Nr, Hs = Lr, zs = kr, Ys = $r, js = Br, dt = "DropdownMenu", [Xs] = Ne(
|
|
3468
|
+
dt,
|
|
3469
|
+
[wr]
|
|
3470
|
+
), B = wr(), [Zs, Kr] = Xs(dt), Gr = (e) => {
|
|
3438
3471
|
const {
|
|
3439
3472
|
__scopeDropdownMenu: t,
|
|
3440
3473
|
children: n,
|
|
@@ -3443,32 +3476,32 @@ var kc = yr, $c = Bt, Bc = Cr, Wc = Er, Uc = Gt, Kc = xr, Gc = lt, Vc = Rr, Hc =
|
|
|
3443
3476
|
defaultOpen: i,
|
|
3444
3477
|
onOpenChange: s,
|
|
3445
3478
|
modal: c = !0
|
|
3446
|
-
} = e, d =
|
|
3479
|
+
} = e, d = B(t), f = a.useRef(null), [l, u] = Tt({
|
|
3447
3480
|
prop: o,
|
|
3448
3481
|
defaultProp: i ?? !1,
|
|
3449
3482
|
onChange: s,
|
|
3450
|
-
caller:
|
|
3483
|
+
caller: dt
|
|
3451
3484
|
});
|
|
3452
3485
|
return /* @__PURE__ */ y(
|
|
3453
|
-
|
|
3486
|
+
Zs,
|
|
3454
3487
|
{
|
|
3455
3488
|
scope: t,
|
|
3456
|
-
triggerId:
|
|
3457
|
-
triggerRef:
|
|
3458
|
-
contentId:
|
|
3459
|
-
open:
|
|
3489
|
+
triggerId: _e(),
|
|
3490
|
+
triggerRef: f,
|
|
3491
|
+
contentId: _e(),
|
|
3492
|
+
open: l,
|
|
3460
3493
|
onOpenChange: u,
|
|
3461
3494
|
onOpenToggle: a.useCallback(() => u((p) => !p), [u]),
|
|
3462
3495
|
modal: c,
|
|
3463
|
-
children: /* @__PURE__ */ y(
|
|
3496
|
+
children: /* @__PURE__ */ y(Ds, { ...d, open: l, onOpenChange: u, dir: r, modal: c, children: n })
|
|
3464
3497
|
}
|
|
3465
3498
|
);
|
|
3466
3499
|
};
|
|
3467
|
-
|
|
3468
|
-
var
|
|
3500
|
+
Gr.displayName = dt;
|
|
3501
|
+
var Vr = "DropdownMenuTrigger", Hr = a.forwardRef(
|
|
3469
3502
|
(e, t) => {
|
|
3470
|
-
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, i =
|
|
3471
|
-
return /* @__PURE__ */ y(
|
|
3503
|
+
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, i = Kr(Vr, n), s = B(n);
|
|
3504
|
+
return /* @__PURE__ */ y(Ns, { asChild: !0, ...s, children: /* @__PURE__ */ y(
|
|
3472
3505
|
K.button,
|
|
3473
3506
|
{
|
|
3474
3507
|
type: "button",
|
|
@@ -3491,17 +3524,17 @@ var Kr = "DropdownMenuTrigger", Gr = a.forwardRef(
|
|
|
3491
3524
|
) });
|
|
3492
3525
|
}
|
|
3493
3526
|
);
|
|
3494
|
-
|
|
3495
|
-
var
|
|
3496
|
-
const { __scopeDropdownMenu: t, ...n } = e, r =
|
|
3497
|
-
return /* @__PURE__ */ y(
|
|
3527
|
+
Hr.displayName = Vr;
|
|
3528
|
+
var qs = "DropdownMenuPortal", zr = (e) => {
|
|
3529
|
+
const { __scopeDropdownMenu: t, ...n } = e, r = B(t);
|
|
3530
|
+
return /* @__PURE__ */ y(Ls, { ...r, ...n });
|
|
3498
3531
|
};
|
|
3499
|
-
|
|
3500
|
-
var
|
|
3532
|
+
zr.displayName = qs;
|
|
3533
|
+
var Yr = "DropdownMenuContent", jr = a.forwardRef(
|
|
3501
3534
|
(e, t) => {
|
|
3502
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
3535
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Kr(Yr, n), i = B(n), s = a.useRef(!1);
|
|
3503
3536
|
return /* @__PURE__ */ y(
|
|
3504
|
-
|
|
3537
|
+
Fs,
|
|
3505
3538
|
{
|
|
3506
3539
|
id: o.contentId,
|
|
3507
3540
|
"aria-labelledby": o.triggerId,
|
|
@@ -3513,8 +3546,8 @@ var Hr = "DropdownMenuContent", zr = a.forwardRef(
|
|
|
3513
3546
|
s.current || (d = o.triggerRef.current) == null || d.focus(), s.current = !1, c.preventDefault();
|
|
3514
3547
|
}),
|
|
3515
3548
|
onInteractOutside: O(e.onInteractOutside, (c) => {
|
|
3516
|
-
const d = c.detail.originalEvent,
|
|
3517
|
-
(!o.modal ||
|
|
3549
|
+
const d = c.detail.originalEvent, f = d.button === 0 && d.ctrlKey === !0, l = d.button === 2 || f;
|
|
3550
|
+
(!o.modal || l) && (s.current = !0);
|
|
3518
3551
|
}),
|
|
3519
3552
|
style: {
|
|
3520
3553
|
...e.style,
|
|
@@ -3528,77 +3561,77 @@ var Hr = "DropdownMenuContent", zr = a.forwardRef(
|
|
|
3528
3561
|
);
|
|
3529
3562
|
}
|
|
3530
3563
|
);
|
|
3531
|
-
|
|
3532
|
-
var
|
|
3564
|
+
jr.displayName = Yr;
|
|
3565
|
+
var Qs = "DropdownMenuGroup", Xr = a.forwardRef(
|
|
3533
3566
|
(e, t) => {
|
|
3534
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
3535
|
-
return /* @__PURE__ */ y(
|
|
3567
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = B(n);
|
|
3568
|
+
return /* @__PURE__ */ y(ks, { ...o, ...r, ref: t });
|
|
3536
3569
|
}
|
|
3537
3570
|
);
|
|
3538
|
-
|
|
3539
|
-
var
|
|
3571
|
+
Xr.displayName = Qs;
|
|
3572
|
+
var Js = "DropdownMenuLabel", Zr = a.forwardRef(
|
|
3540
3573
|
(e, t) => {
|
|
3541
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
3542
|
-
return /* @__PURE__ */ y(
|
|
3574
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = B(n);
|
|
3575
|
+
return /* @__PURE__ */ y($s, { ...o, ...r, ref: t });
|
|
3543
3576
|
}
|
|
3544
3577
|
);
|
|
3545
|
-
|
|
3546
|
-
var
|
|
3578
|
+
Zr.displayName = Js;
|
|
3579
|
+
var ea = "DropdownMenuItem", qr = a.forwardRef(
|
|
3547
3580
|
(e, t) => {
|
|
3548
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
3549
|
-
return /* @__PURE__ */ y(
|
|
3581
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = B(n);
|
|
3582
|
+
return /* @__PURE__ */ y(Ws, { ...o, ...r, ref: t });
|
|
3550
3583
|
}
|
|
3551
3584
|
);
|
|
3552
|
-
|
|
3553
|
-
var
|
|
3554
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
3555
|
-
return /* @__PURE__ */ y(
|
|
3585
|
+
qr.displayName = ea;
|
|
3586
|
+
var ta = "DropdownMenuCheckboxItem", Qr = a.forwardRef((e, t) => {
|
|
3587
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = B(n);
|
|
3588
|
+
return /* @__PURE__ */ y(Bs, { ...o, ...r, ref: t });
|
|
3556
3589
|
});
|
|
3557
|
-
|
|
3558
|
-
var
|
|
3559
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
3560
|
-
return /* @__PURE__ */ y(
|
|
3590
|
+
Qr.displayName = ta;
|
|
3591
|
+
var na = "DropdownMenuRadioGroup", Jr = a.forwardRef((e, t) => {
|
|
3592
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = B(n);
|
|
3593
|
+
return /* @__PURE__ */ y(Us, { ...o, ...r, ref: t });
|
|
3561
3594
|
});
|
|
3562
|
-
|
|
3563
|
-
var
|
|
3564
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
3565
|
-
return /* @__PURE__ */ y(
|
|
3595
|
+
Jr.displayName = na;
|
|
3596
|
+
var ra = "DropdownMenuRadioItem", eo = a.forwardRef((e, t) => {
|
|
3597
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = B(n);
|
|
3598
|
+
return /* @__PURE__ */ y(Ks, { ...o, ...r, ref: t });
|
|
3566
3599
|
});
|
|
3567
|
-
|
|
3568
|
-
var
|
|
3569
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
3570
|
-
return /* @__PURE__ */ y(
|
|
3600
|
+
eo.displayName = ra;
|
|
3601
|
+
var oa = "DropdownMenuItemIndicator", to = a.forwardRef((e, t) => {
|
|
3602
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = B(n);
|
|
3603
|
+
return /* @__PURE__ */ y(Gs, { ...o, ...r, ref: t });
|
|
3571
3604
|
});
|
|
3572
|
-
|
|
3573
|
-
var
|
|
3574
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
3575
|
-
return /* @__PURE__ */ y(
|
|
3605
|
+
to.displayName = oa;
|
|
3606
|
+
var ia = "DropdownMenuSeparator", ca = a.forwardRef((e, t) => {
|
|
3607
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = B(n);
|
|
3608
|
+
return /* @__PURE__ */ y(Vs, { ...o, ...r, ref: t });
|
|
3576
3609
|
});
|
|
3577
|
-
|
|
3578
|
-
var
|
|
3610
|
+
ca.displayName = ia;
|
|
3611
|
+
var sa = "DropdownMenuArrow", no = a.forwardRef(
|
|
3579
3612
|
(e, t) => {
|
|
3580
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
3581
|
-
return /* @__PURE__ */ y(
|
|
3613
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = B(n);
|
|
3614
|
+
return /* @__PURE__ */ y(Hs, { ...o, ...r, ref: t });
|
|
3582
3615
|
}
|
|
3583
3616
|
);
|
|
3584
|
-
|
|
3585
|
-
var
|
|
3586
|
-
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: i } = e, s =
|
|
3617
|
+
no.displayName = sa;
|
|
3618
|
+
var aa = (e) => {
|
|
3619
|
+
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: i } = e, s = B(t), [c, d] = Tt({
|
|
3587
3620
|
prop: r,
|
|
3588
3621
|
defaultProp: i ?? !1,
|
|
3589
3622
|
onChange: o,
|
|
3590
3623
|
caller: "DropdownMenuSub"
|
|
3591
3624
|
});
|
|
3592
|
-
return /* @__PURE__ */ y(
|
|
3593
|
-
},
|
|
3594
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
3595
|
-
return /* @__PURE__ */ y(
|
|
3625
|
+
return /* @__PURE__ */ y(zs, { ...s, open: c, onOpenChange: d, children: n });
|
|
3626
|
+
}, ua = "DropdownMenuSubTrigger", ro = a.forwardRef((e, t) => {
|
|
3627
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = B(n);
|
|
3628
|
+
return /* @__PURE__ */ y(Ys, { ...o, ...r, ref: t });
|
|
3596
3629
|
});
|
|
3597
|
-
|
|
3598
|
-
var
|
|
3599
|
-
const { __scopeDropdownMenu: n, ...r } = e, o =
|
|
3630
|
+
ro.displayName = ua;
|
|
3631
|
+
var la = "DropdownMenuSubContent", oo = a.forwardRef((e, t) => {
|
|
3632
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = B(n);
|
|
3600
3633
|
return /* @__PURE__ */ y(
|
|
3601
|
-
|
|
3634
|
+
js,
|
|
3602
3635
|
{
|
|
3603
3636
|
...o,
|
|
3604
3637
|
...r,
|
|
@@ -3614,22 +3647,22 @@ var ma = "DropdownMenuSubContent", no = a.forwardRef((e, t) => {
|
|
|
3614
3647
|
}
|
|
3615
3648
|
);
|
|
3616
3649
|
});
|
|
3617
|
-
|
|
3618
|
-
var
|
|
3650
|
+
oo.displayName = la;
|
|
3651
|
+
var ma = Gr, ha = Hr, va = zr, ga = jr, wa = Xr, ya = Zr, ba = qr, Ca = Qr, Ea = Jr, xa = eo, Sa = to, Ra = no, Ma = aa, Aa = ro, Pa = oo;
|
|
3619
3652
|
export {
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3653
|
+
Ra as A,
|
|
3654
|
+
Ca as C,
|
|
3655
|
+
wa as G,
|
|
3656
|
+
ba as I,
|
|
3657
|
+
ya as L,
|
|
3658
|
+
va as P,
|
|
3659
|
+
Ea as R,
|
|
3660
|
+
Ma as S,
|
|
3661
|
+
ha as T,
|
|
3662
|
+
ma as a,
|
|
3663
|
+
Aa as b,
|
|
3664
|
+
Pa as c,
|
|
3665
|
+
Sa as d,
|
|
3666
|
+
xa as e,
|
|
3667
|
+
ga as f
|
|
3635
3668
|
};
|