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