highsoft-ui 1.0.46 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/GPTInput/index.js +2 -4
- package/dist/components/Header/index.js +64 -64
- package/dist/components/Logo/index.js +1 -1
- package/dist/components/Notification/index.js +1 -1
- package/dist/components/PrefPanel/index.js +838 -854
- package/dist/highsoft-ui.css +1 -1
- package/dist/{index-BFhQ-SSv.js → index-CRjV8IBy.js} +13 -13
- package/dist/{index-CMegByeX.js → index-DAWHN3cH.js} +1 -1
- package/dist/main.js +2 -2
- package/package.json +2 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as C, jsxs as Q, Fragment as
|
|
2
|
-
import { z as
|
|
1
|
+
import { jsx as C, jsxs as Q, Fragment as It } from "react/jsx-runtime";
|
|
2
|
+
import { z as Yn } from "../../index-DAWHN3cH.js";
|
|
3
3
|
import * as a from "react";
|
|
4
|
-
import { useState as
|
|
5
|
-
import { _ as be, B as
|
|
6
|
-
import { c as
|
|
7
|
-
import { useMounted as
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
10
|
-
var
|
|
4
|
+
import { useState as Kn, useLayoutEffect as Xn } from "react";
|
|
5
|
+
import { _ as be, B as Zn } from "../../index-DKE1ODpv.js";
|
|
6
|
+
import { c as Gn } from "../../clsx-OuTLNxxd.js";
|
|
7
|
+
import { useMounted as qn } from "../../utils.js";
|
|
8
|
+
import * as Wt from "react-dom";
|
|
9
|
+
import Qn from "react-dom";
|
|
10
|
+
var Jn = function(t) {
|
|
11
11
|
return /* @__PURE__ */ C("svg", be({
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13
13
|
width: 24,
|
|
@@ -23,7 +23,7 @@ var ir = function(t) {
|
|
|
23
23
|
d: "M20 6 9 17l-5-5"
|
|
24
24
|
})
|
|
25
25
|
}));
|
|
26
|
-
},
|
|
26
|
+
}, er = function(t) {
|
|
27
27
|
return /* @__PURE__ */ C("svg", be({
|
|
28
28
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29
29
|
width: 24,
|
|
@@ -39,7 +39,7 @@ var ir = function(t) {
|
|
|
39
39
|
d: "M15 17v4H9v-4m-3.8 0h13.6c1.1201 0 1.6802 0 2.108-.218a2 2 0 0 0 .874-.874C22 15.4802 22 14.9201 22 13.8V6.2c0-1.1201 0-1.6802-.218-2.108a2 2 0 0 0-.874-.874C20.4802 3 19.9201 3 18.8 3H5.2c-1.1201 0-1.6802 0-2.108.218a2 2 0 0 0-.874.874C2 4.5198 2 5.08 2 6.2v7.6c0 1.1201 0 1.6802.218 2.108.1917.3763.4977.6823.874.874C3.5198 17 4.08 17 5.2 17"
|
|
40
40
|
})
|
|
41
41
|
}));
|
|
42
|
-
},
|
|
42
|
+
}, tr = function(t) {
|
|
43
43
|
return /* @__PURE__ */ C("svg", be({
|
|
44
44
|
xmlns: "http://www.w3.org/2000/svg",
|
|
45
45
|
width: 24,
|
|
@@ -55,7 +55,7 @@ var ir = function(t) {
|
|
|
55
55
|
d: "M21.9548 12.9564c-1.3769 2.4153-3.9757 4.0437-6.9548 4.0437-4.4183 0-8-3.5817-8-8 0-2.9794 1.6287-5.5783 4.0443-6.9552C5.9698 2.5261 2 6.7994 2 11.9998c0 5.5229 4.4772 10 10 10 5.2002 0 9.4733-3.9693 9.9548-9.0434"
|
|
56
56
|
})
|
|
57
57
|
}));
|
|
58
|
-
},
|
|
58
|
+
}, nr = function(t) {
|
|
59
59
|
return /* @__PURE__ */ C("svg", be({
|
|
60
60
|
xmlns: "http://www.w3.org/2000/svg",
|
|
61
61
|
width: 24,
|
|
@@ -71,7 +71,7 @@ var ir = function(t) {
|
|
|
71
71
|
d: "M3 8h12m0 0c0 1.6569 1.3431 3 3 3s3-1.3431 3-3-1.3431-3-3-3-3 1.3431-3 3m-6 8h12M9 16c0 1.6569-1.3431 3-3 3s-3-1.3431-3-3 1.3431-3 3-3 3 1.3431 3 3"
|
|
72
72
|
})
|
|
73
73
|
}));
|
|
74
|
-
},
|
|
74
|
+
}, rr = function(t) {
|
|
75
75
|
return /* @__PURE__ */ C("svg", be({
|
|
76
76
|
xmlns: "http://www.w3.org/2000/svg",
|
|
77
77
|
width: 24,
|
|
@@ -88,34 +88,34 @@ var ir = function(t) {
|
|
|
88
88
|
})
|
|
89
89
|
}));
|
|
90
90
|
};
|
|
91
|
-
function
|
|
91
|
+
function vt(e, t) {
|
|
92
92
|
if (typeof e == "function")
|
|
93
93
|
return e(t);
|
|
94
94
|
e != null && (e.current = t);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function Bt(...e) {
|
|
97
97
|
return (t) => {
|
|
98
98
|
let n = !1;
|
|
99
99
|
const r = e.map((o) => {
|
|
100
|
-
const i =
|
|
100
|
+
const i = vt(o, t);
|
|
101
101
|
return !n && typeof i == "function" && (n = !0), i;
|
|
102
102
|
});
|
|
103
103
|
if (n)
|
|
104
104
|
return () => {
|
|
105
105
|
for (let o = 0; o < r.length; o++) {
|
|
106
106
|
const i = r[o];
|
|
107
|
-
typeof i == "function" ? i() :
|
|
107
|
+
typeof i == "function" ? i() : vt(e[o], null);
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
112
|
function re(...e) {
|
|
113
|
-
return a.useCallback(
|
|
113
|
+
return a.useCallback(Bt(...e), e);
|
|
114
114
|
}
|
|
115
115
|
// @__NO_SIDE_EFFECTS__
|
|
116
|
-
function
|
|
117
|
-
const t = /* @__PURE__ */
|
|
118
|
-
const { children: i, ...s } = r, c = a.Children.toArray(i), u = c.find(
|
|
116
|
+
function $t(e) {
|
|
117
|
+
const t = /* @__PURE__ */ or(e), n = a.forwardRef((r, o) => {
|
|
118
|
+
const { children: i, ...s } = r, c = a.Children.toArray(i), u = c.find(sr);
|
|
119
119
|
if (u) {
|
|
120
120
|
const l = u.props.children, f = c.map((d) => d === u ? a.Children.count(l) > 1 ? a.Children.only(null) : a.isValidElement(l) ? l.props.children : null : d);
|
|
121
121
|
return /* @__PURE__ */ C(t, { ...s, ref: o, children: a.isValidElement(l) ? a.cloneElement(l, void 0, f) : null });
|
|
@@ -125,22 +125,22 @@ function Yt(e) {
|
|
|
125
125
|
return n.displayName = `${e}.Slot`, n;
|
|
126
126
|
}
|
|
127
127
|
// @__NO_SIDE_EFFECTS__
|
|
128
|
-
function
|
|
128
|
+
function or(e) {
|
|
129
129
|
const t = a.forwardRef((n, r) => {
|
|
130
130
|
const { children: o, ...i } = n;
|
|
131
131
|
if (a.isValidElement(o)) {
|
|
132
|
-
const s =
|
|
133
|
-
return o.type !== a.Fragment && (c.ref = r ?
|
|
132
|
+
const s = ar(o), c = cr(i, o.props);
|
|
133
|
+
return o.type !== a.Fragment && (c.ref = r ? Bt(r, s) : s), a.cloneElement(o, c);
|
|
134
134
|
}
|
|
135
135
|
return a.Children.count(o) > 1 ? a.Children.only(null) : null;
|
|
136
136
|
});
|
|
137
137
|
return t.displayName = `${e}.SlotClone`, t;
|
|
138
138
|
}
|
|
139
|
-
var
|
|
140
|
-
function
|
|
141
|
-
return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
139
|
+
var ir = Symbol("radix.slottable");
|
|
140
|
+
function sr(e) {
|
|
141
|
+
return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === ir;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function cr(e, t) {
|
|
144
144
|
const n = { ...t };
|
|
145
145
|
for (const r in t) {
|
|
146
146
|
const o = e[r], i = t[r];
|
|
@@ -151,12 +151,11 @@ function hr(e, t) {
|
|
|
151
151
|
}
|
|
152
152
|
return { ...e, ...n };
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
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);
|
|
154
|
+
function ar(e) {
|
|
155
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
156
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
158
157
|
}
|
|
159
|
-
var
|
|
158
|
+
var lr = [
|
|
160
159
|
"a",
|
|
161
160
|
"button",
|
|
162
161
|
"div",
|
|
@@ -174,31 +173,29 @@ var mr = [
|
|
|
174
173
|
"span",
|
|
175
174
|
"svg",
|
|
176
175
|
"ul"
|
|
177
|
-
], G =
|
|
178
|
-
const n = /* @__PURE__ */
|
|
176
|
+
], G = lr.reduce((e, t) => {
|
|
177
|
+
const n = /* @__PURE__ */ $t(`Primitive.${t}`), r = a.forwardRef((o, i) => {
|
|
179
178
|
const { asChild: s, ...c } = o, u = s ? n : t;
|
|
180
179
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ C(u, { ...c, ref: i });
|
|
181
180
|
});
|
|
182
181
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
183
182
|
}, {});
|
|
184
|
-
function
|
|
185
|
-
e &&
|
|
183
|
+
function ur(e, t) {
|
|
184
|
+
e && Wt.flushSync(() => e.dispatchEvent(t));
|
|
186
185
|
}
|
|
187
|
-
function
|
|
186
|
+
function Ht(e, t = []) {
|
|
188
187
|
let n = [];
|
|
189
188
|
function r(i, s) {
|
|
190
189
|
const c = a.createContext(s), u = n.length;
|
|
191
190
|
n = [...n, s];
|
|
192
191
|
const l = (d) => {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
return /* @__PURE__ */ C(h.Provider, { value: v, children: m });
|
|
192
|
+
const { scope: m, children: h, ...v } = d, p = m?.[e]?.[u] || c, g = a.useMemo(() => v, Object.values(v));
|
|
193
|
+
return /* @__PURE__ */ C(p.Provider, { value: g, children: h });
|
|
196
194
|
};
|
|
197
195
|
l.displayName = i + "Provider";
|
|
198
|
-
function f(d,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
if (g) return g;
|
|
196
|
+
function f(d, m) {
|
|
197
|
+
const h = m?.[e]?.[u] || c, v = a.useContext(h);
|
|
198
|
+
if (v) return v;
|
|
202
199
|
if (s !== void 0) return s;
|
|
203
200
|
throw new Error(`\`${d}\` must be used within \`${i}\``);
|
|
204
201
|
}
|
|
@@ -207,16 +204,16 @@ function Xt(e, t = []) {
|
|
|
207
204
|
const o = () => {
|
|
208
205
|
const i = n.map((s) => a.createContext(s));
|
|
209
206
|
return function(c) {
|
|
210
|
-
const u =
|
|
207
|
+
const u = c?.[e] || i;
|
|
211
208
|
return a.useMemo(
|
|
212
209
|
() => ({ [`__scope${e}`]: { ...c, [e]: u } }),
|
|
213
210
|
[c, u]
|
|
214
211
|
);
|
|
215
212
|
};
|
|
216
213
|
};
|
|
217
|
-
return o.scopeName = e, [r,
|
|
214
|
+
return o.scopeName = e, [r, fr(o, ...t)];
|
|
218
215
|
}
|
|
219
|
-
function
|
|
216
|
+
function fr(...e) {
|
|
220
217
|
const t = e[0];
|
|
221
218
|
if (e.length === 1) return t;
|
|
222
219
|
const n = () => {
|
|
@@ -236,20 +233,20 @@ function gr(...e) {
|
|
|
236
233
|
}
|
|
237
234
|
function J(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
238
235
|
return function(o) {
|
|
239
|
-
if (e
|
|
240
|
-
return t
|
|
236
|
+
if (e?.(o), n === !1 || !o.defaultPrevented)
|
|
237
|
+
return t?.(o);
|
|
241
238
|
};
|
|
242
239
|
}
|
|
243
|
-
var ee = globalThis
|
|
244
|
-
},
|
|
245
|
-
function
|
|
240
|
+
var ee = globalThis?.document ? a.useLayoutEffect : () => {
|
|
241
|
+
}, dr = a[" useInsertionEffect ".trim().toString()] || ee;
|
|
242
|
+
function pr({
|
|
246
243
|
prop: e,
|
|
247
244
|
defaultProp: t,
|
|
248
245
|
onChange: n = () => {
|
|
249
246
|
},
|
|
250
247
|
caller: r
|
|
251
248
|
}) {
|
|
252
|
-
const [o, i, s] =
|
|
249
|
+
const [o, i, s] = hr({
|
|
253
250
|
defaultProp: t,
|
|
254
251
|
onChange: n
|
|
255
252
|
}), c = e !== void 0, u = c ? e : o;
|
|
@@ -264,10 +261,9 @@ function wr({
|
|
|
264
261
|
}
|
|
265
262
|
const l = a.useCallback(
|
|
266
263
|
(f) => {
|
|
267
|
-
var d;
|
|
268
264
|
if (c) {
|
|
269
|
-
const
|
|
270
|
-
|
|
265
|
+
const d = mr(f) ? f(e) : f;
|
|
266
|
+
d !== e && s.current?.(d);
|
|
271
267
|
} else
|
|
272
268
|
i(f);
|
|
273
269
|
},
|
|
@@ -275,31 +271,30 @@ function wr({
|
|
|
275
271
|
);
|
|
276
272
|
return [u, l];
|
|
277
273
|
}
|
|
278
|
-
function
|
|
274
|
+
function hr({
|
|
279
275
|
defaultProp: e,
|
|
280
276
|
onChange: t
|
|
281
277
|
}) {
|
|
282
278
|
const [n, r] = a.useState(e), o = a.useRef(n), i = a.useRef(t);
|
|
283
|
-
return
|
|
279
|
+
return dr(() => {
|
|
284
280
|
i.current = t;
|
|
285
281
|
}, [t]), a.useEffect(() => {
|
|
286
|
-
|
|
287
|
-
o.current !== n && ((s = i.current) == null || s.call(i, n), o.current = n);
|
|
282
|
+
o.current !== n && (i.current?.(n), o.current = n);
|
|
288
283
|
}, [n, o]), [n, r, i];
|
|
289
284
|
}
|
|
290
|
-
function
|
|
285
|
+
function mr(e) {
|
|
291
286
|
return typeof e == "function";
|
|
292
287
|
}
|
|
293
|
-
function
|
|
288
|
+
function vr(e, t) {
|
|
294
289
|
return a.useReducer((n, r) => t[n][r] ?? n, e);
|
|
295
290
|
}
|
|
296
|
-
var
|
|
297
|
-
const { present: t, children: n } = e, r =
|
|
291
|
+
var rt = (e) => {
|
|
292
|
+
const { present: t, children: n } = e, r = gr(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), i = re(r.ref, yr(o));
|
|
298
293
|
return typeof n == "function" || r.isPresent ? a.cloneElement(o, { ref: i }) : null;
|
|
299
294
|
};
|
|
300
|
-
|
|
301
|
-
function
|
|
302
|
-
const [t, n] = a.useState(), r = a.useRef(null), o = a.useRef(e), i = a.useRef("none"), s = e ? "mounted" : "unmounted", [c, u] =
|
|
295
|
+
rt.displayName = "Presence";
|
|
296
|
+
function gr(e) {
|
|
297
|
+
const [t, n] = a.useState(), r = a.useRef(null), o = a.useRef(e), i = a.useRef("none"), s = e ? "mounted" : "unmounted", [c, u] = vr(s, {
|
|
303
298
|
mounted: {
|
|
304
299
|
UNMOUNT: "unmounted",
|
|
305
300
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -313,30 +308,30 @@ function Cr(e) {
|
|
|
313
308
|
}
|
|
314
309
|
});
|
|
315
310
|
return a.useEffect(() => {
|
|
316
|
-
const l =
|
|
311
|
+
const l = Pe(r.current);
|
|
317
312
|
i.current = c === "mounted" ? l : "none";
|
|
318
313
|
}, [c]), ee(() => {
|
|
319
314
|
const l = r.current, f = o.current;
|
|
320
315
|
if (f !== e) {
|
|
321
|
-
const
|
|
322
|
-
e ? u("MOUNT") :
|
|
316
|
+
const m = i.current, h = Pe(l);
|
|
317
|
+
e ? u("MOUNT") : h === "none" || l?.display === "none" ? u("UNMOUNT") : u(f && m !== h ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
323
318
|
}
|
|
324
319
|
}, [e, u]), ee(() => {
|
|
325
320
|
if (t) {
|
|
326
321
|
let l;
|
|
327
|
-
const f = t.ownerDocument.defaultView ?? window, d = (
|
|
328
|
-
const
|
|
329
|
-
if (
|
|
330
|
-
const
|
|
322
|
+
const f = t.ownerDocument.defaultView ?? window, d = (h) => {
|
|
323
|
+
const p = Pe(r.current).includes(h.animationName);
|
|
324
|
+
if (h.target === t && p && (u("ANIMATION_END"), !o.current)) {
|
|
325
|
+
const g = t.style.animationFillMode;
|
|
331
326
|
t.style.animationFillMode = "forwards", l = f.setTimeout(() => {
|
|
332
|
-
t.style.animationFillMode === "forwards" && (t.style.animationFillMode =
|
|
327
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = g);
|
|
333
328
|
});
|
|
334
329
|
}
|
|
335
|
-
},
|
|
336
|
-
|
|
330
|
+
}, m = (h) => {
|
|
331
|
+
h.target === t && (i.current = Pe(r.current));
|
|
337
332
|
};
|
|
338
|
-
return t.addEventListener("animationstart",
|
|
339
|
-
f.clearTimeout(l), t.removeEventListener("animationstart",
|
|
333
|
+
return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", d), t.addEventListener("animationend", d), () => {
|
|
334
|
+
f.clearTimeout(l), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", d), t.removeEventListener("animationend", d);
|
|
340
335
|
};
|
|
341
336
|
} else
|
|
342
337
|
u("ANIMATION_END");
|
|
@@ -347,32 +342,28 @@ function Cr(e) {
|
|
|
347
342
|
}, [])
|
|
348
343
|
};
|
|
349
344
|
}
|
|
350
|
-
function
|
|
351
|
-
return
|
|
345
|
+
function Pe(e) {
|
|
346
|
+
return e?.animationName || "none";
|
|
352
347
|
}
|
|
353
|
-
function
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
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);
|
|
348
|
+
function yr(e) {
|
|
349
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
350
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
357
351
|
}
|
|
358
|
-
var
|
|
359
|
-
}),
|
|
360
|
-
function
|
|
361
|
-
const [t, n] = a.useState(
|
|
352
|
+
var wr = a[" useId ".trim().toString()] || (() => {
|
|
353
|
+
}), br = 0;
|
|
354
|
+
function xr(e) {
|
|
355
|
+
const [t, n] = a.useState(wr());
|
|
362
356
|
return ee(() => {
|
|
363
|
-
n((r) => r ?? String(
|
|
357
|
+
n((r) => r ?? String(br++));
|
|
364
358
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
365
359
|
}
|
|
366
360
|
function fe(e) {
|
|
367
361
|
const t = a.useRef(e);
|
|
368
362
|
return a.useEffect(() => {
|
|
369
363
|
t.current = e;
|
|
370
|
-
}), a.useMemo(() => (...n) =>
|
|
371
|
-
var r;
|
|
372
|
-
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
373
|
-
}, []);
|
|
364
|
+
}), a.useMemo(() => (...n) => t.current?.(...n), []);
|
|
374
365
|
}
|
|
375
|
-
function
|
|
366
|
+
function Er(e, t = globalThis?.document) {
|
|
376
367
|
const n = fe(e);
|
|
377
368
|
a.useEffect(() => {
|
|
378
369
|
const r = (o) => {
|
|
@@ -381,11 +372,11 @@ function Or(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
381
372
|
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
382
373
|
}, [n, t]);
|
|
383
374
|
}
|
|
384
|
-
var
|
|
375
|
+
var Cr = "DismissableLayer", Qe = "dismissableLayer.update", Pr = "dismissableLayer.pointerDownOutside", Sr = "dismissableLayer.focusOutside", gt, zt = a.createContext({
|
|
385
376
|
layers: /* @__PURE__ */ new Set(),
|
|
386
377
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
387
378
|
branches: /* @__PURE__ */ new Set()
|
|
388
|
-
}),
|
|
379
|
+
}), Vt = a.forwardRef(
|
|
389
380
|
(e, t) => {
|
|
390
381
|
const {
|
|
391
382
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -395,36 +386,36 @@ var Nr = "DismissableLayer", Je = "dismissableLayer.update", Mr = "dismissableLa
|
|
|
395
386
|
onInteractOutside: s,
|
|
396
387
|
onDismiss: c,
|
|
397
388
|
...u
|
|
398
|
-
} = e, l = a.useContext(
|
|
389
|
+
} = e, l = a.useContext(zt), [f, d] = a.useState(null), m = f?.ownerDocument ?? globalThis?.document, [, h] = a.useState({}), v = re(t, (P) => d(P)), p = Array.from(l.layers), [g] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), y = p.indexOf(g), w = f ? p.indexOf(f) : -1, x = l.layersWithOutsidePointerEventsDisabled.size > 0, b = w >= y, E = Or((P) => {
|
|
399
390
|
const R = P.target, M = [...l.branches].some((O) => O.contains(R));
|
|
400
|
-
!b || M || (o
|
|
401
|
-
},
|
|
391
|
+
!b || M || (o?.(P), s?.(P), P.defaultPrevented || c?.());
|
|
392
|
+
}, m), S = Nr((P) => {
|
|
402
393
|
const R = P.target;
|
|
403
|
-
[...l.branches].some((O) => O.contains(R)) || (i
|
|
404
|
-
},
|
|
405
|
-
return
|
|
406
|
-
w === l.layers.size - 1 && (r
|
|
407
|
-
},
|
|
394
|
+
[...l.branches].some((O) => O.contains(R)) || (i?.(P), s?.(P), P.defaultPrevented || c?.());
|
|
395
|
+
}, m);
|
|
396
|
+
return Er((P) => {
|
|
397
|
+
w === l.layers.size - 1 && (r?.(P), !P.defaultPrevented && c && (P.preventDefault(), c()));
|
|
398
|
+
}, m), a.useEffect(() => {
|
|
408
399
|
if (f)
|
|
409
|
-
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
410
|
-
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (
|
|
400
|
+
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (gt = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(f)), l.layers.add(f), yt(), () => {
|
|
401
|
+
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = gt);
|
|
411
402
|
};
|
|
412
|
-
}, [f,
|
|
413
|
-
f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f),
|
|
403
|
+
}, [f, m, n, l]), a.useEffect(() => () => {
|
|
404
|
+
f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f), yt());
|
|
414
405
|
}, [f, l]), a.useEffect(() => {
|
|
415
|
-
const P = () =>
|
|
416
|
-
return document.addEventListener(
|
|
406
|
+
const P = () => h({});
|
|
407
|
+
return document.addEventListener(Qe, P), () => document.removeEventListener(Qe, P);
|
|
417
408
|
}, []), /* @__PURE__ */ C(
|
|
418
409
|
G.div,
|
|
419
410
|
{
|
|
420
411
|
...u,
|
|
421
|
-
ref:
|
|
412
|
+
ref: v,
|
|
422
413
|
style: {
|
|
423
414
|
pointerEvents: x ? b ? "auto" : "none" : void 0,
|
|
424
415
|
...e.style
|
|
425
416
|
},
|
|
426
|
-
onFocusCapture: J(e.onFocusCapture,
|
|
427
|
-
onBlurCapture: J(e.onBlurCapture,
|
|
417
|
+
onFocusCapture: J(e.onFocusCapture, S.onFocusCapture),
|
|
418
|
+
onBlurCapture: J(e.onBlurCapture, S.onBlurCapture),
|
|
428
419
|
onPointerDownCapture: J(
|
|
429
420
|
e.onPointerDownCapture,
|
|
430
421
|
E.onPointerDownCapture
|
|
@@ -433,9 +424,9 @@ var Nr = "DismissableLayer", Je = "dismissableLayer.update", Mr = "dismissableLa
|
|
|
433
424
|
);
|
|
434
425
|
}
|
|
435
426
|
);
|
|
436
|
-
|
|
437
|
-
var
|
|
438
|
-
const n = a.useContext(
|
|
427
|
+
Vt.displayName = Cr;
|
|
428
|
+
var Ar = "DismissableLayerBranch", Rr = a.forwardRef((e, t) => {
|
|
429
|
+
const n = a.useContext(zt), r = a.useRef(null), o = re(t, r);
|
|
439
430
|
return a.useEffect(() => {
|
|
440
431
|
const i = r.current;
|
|
441
432
|
if (i)
|
|
@@ -444,16 +435,16 @@ var kr = "DismissableLayerBranch", Lr = a.forwardRef((e, t) => {
|
|
|
444
435
|
};
|
|
445
436
|
}, [n.branches]), /* @__PURE__ */ C(G.div, { ...e, ref: o });
|
|
446
437
|
});
|
|
447
|
-
|
|
448
|
-
function
|
|
438
|
+
Rr.displayName = Ar;
|
|
439
|
+
function Or(e, t = globalThis?.document) {
|
|
449
440
|
const n = fe(e), r = a.useRef(!1), o = a.useRef(() => {
|
|
450
441
|
});
|
|
451
442
|
return a.useEffect(() => {
|
|
452
443
|
const i = (c) => {
|
|
453
444
|
if (c.target && !r.current) {
|
|
454
445
|
let u = function() {
|
|
455
|
-
|
|
456
|
-
|
|
446
|
+
Ut(
|
|
447
|
+
Pr,
|
|
457
448
|
n,
|
|
458
449
|
l,
|
|
459
450
|
{ discrete: !0 }
|
|
@@ -475,11 +466,11 @@ function Dr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
475
466
|
onPointerDownCapture: () => r.current = !0
|
|
476
467
|
};
|
|
477
468
|
}
|
|
478
|
-
function
|
|
469
|
+
function Nr(e, t = globalThis?.document) {
|
|
479
470
|
const n = fe(e), r = a.useRef(!1);
|
|
480
471
|
return a.useEffect(() => {
|
|
481
472
|
const o = (i) => {
|
|
482
|
-
i.target && !r.current &&
|
|
473
|
+
i.target && !r.current && Ut(Sr, n, { originalEvent: i }, {
|
|
483
474
|
discrete: !1
|
|
484
475
|
});
|
|
485
476
|
};
|
|
@@ -489,22 +480,22 @@ function _r(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
489
480
|
onBlurCapture: () => r.current = !1
|
|
490
481
|
};
|
|
491
482
|
}
|
|
492
|
-
function
|
|
493
|
-
const e = new CustomEvent(
|
|
483
|
+
function yt() {
|
|
484
|
+
const e = new CustomEvent(Qe);
|
|
494
485
|
document.dispatchEvent(e);
|
|
495
486
|
}
|
|
496
|
-
function
|
|
487
|
+
function Ut(e, t, n, { discrete: r }) {
|
|
497
488
|
const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
498
|
-
t && o.addEventListener(e, t, { once: !0 }), r ?
|
|
489
|
+
t && o.addEventListener(e, t, { once: !0 }), r ? ur(o, i) : o.dispatchEvent(i);
|
|
499
490
|
}
|
|
500
|
-
var
|
|
491
|
+
var ze = "focusScope.autoFocusOnMount", Ve = "focusScope.autoFocusOnUnmount", wt = { bubbles: !1, cancelable: !0 }, Mr = "FocusScope", jt = a.forwardRef((e, t) => {
|
|
501
492
|
const {
|
|
502
493
|
loop: n = !1,
|
|
503
494
|
trapped: r = !1,
|
|
504
495
|
onMountAutoFocus: o,
|
|
505
496
|
onUnmountAutoFocus: i,
|
|
506
497
|
...s
|
|
507
|
-
} = e, [c, u] = a.useState(null), l = fe(o), f = fe(i), d = a.useRef(null),
|
|
498
|
+
} = e, [c, u] = a.useState(null), l = fe(o), f = fe(i), d = a.useRef(null), m = re(t, (p) => u(p)), h = a.useRef({
|
|
508
499
|
paused: !1,
|
|
509
500
|
pause() {
|
|
510
501
|
this.paused = !0;
|
|
@@ -515,12 +506,12 @@ var Ue = "focusScope.autoFocusOnMount", ze = "focusScope.autoFocusOnUnmount", At
|
|
|
515
506
|
}).current;
|
|
516
507
|
a.useEffect(() => {
|
|
517
508
|
if (r) {
|
|
518
|
-
let
|
|
519
|
-
if (
|
|
509
|
+
let p = function(x) {
|
|
510
|
+
if (h.paused || !c) return;
|
|
520
511
|
const b = x.target;
|
|
521
512
|
c.contains(b) ? d.current = b : q(d.current, { select: !0 });
|
|
522
|
-
},
|
|
523
|
-
if (
|
|
513
|
+
}, g = function(x) {
|
|
514
|
+
if (h.paused || !c) return;
|
|
524
515
|
const b = x.relatedTarget;
|
|
525
516
|
b !== null && (c.contains(b) || q(d.current, { select: !0 }));
|
|
526
517
|
}, y = function(x) {
|
|
@@ -528,52 +519,52 @@ var Ue = "focusScope.autoFocusOnMount", ze = "focusScope.autoFocusOnUnmount", At
|
|
|
528
519
|
for (const E of x)
|
|
529
520
|
E.removedNodes.length > 0 && q(c);
|
|
530
521
|
};
|
|
531
|
-
document.addEventListener("focusin",
|
|
522
|
+
document.addEventListener("focusin", p), document.addEventListener("focusout", g);
|
|
532
523
|
const w = new MutationObserver(y);
|
|
533
524
|
return c && w.observe(c, { childList: !0, subtree: !0 }), () => {
|
|
534
|
-
document.removeEventListener("focusin",
|
|
525
|
+
document.removeEventListener("focusin", p), document.removeEventListener("focusout", g), w.disconnect();
|
|
535
526
|
};
|
|
536
527
|
}
|
|
537
|
-
}, [r, c,
|
|
528
|
+
}, [r, c, h.paused]), a.useEffect(() => {
|
|
538
529
|
if (c) {
|
|
539
|
-
|
|
540
|
-
const
|
|
541
|
-
if (!c.contains(
|
|
542
|
-
const y = new CustomEvent(
|
|
543
|
-
c.addEventListener(
|
|
530
|
+
xt.add(h);
|
|
531
|
+
const p = document.activeElement;
|
|
532
|
+
if (!c.contains(p)) {
|
|
533
|
+
const y = new CustomEvent(ze, wt);
|
|
534
|
+
c.addEventListener(ze, l), c.dispatchEvent(y), y.defaultPrevented || (Tr(Fr(Yt(c)), { select: !0 }), document.activeElement === p && q(c));
|
|
544
535
|
}
|
|
545
536
|
return () => {
|
|
546
|
-
c.removeEventListener(
|
|
547
|
-
const y = new CustomEvent(
|
|
548
|
-
c.addEventListener(
|
|
537
|
+
c.removeEventListener(ze, l), setTimeout(() => {
|
|
538
|
+
const y = new CustomEvent(Ve, wt);
|
|
539
|
+
c.addEventListener(Ve, f), c.dispatchEvent(y), y.defaultPrevented || q(p ?? document.body, { select: !0 }), c.removeEventListener(Ve, f), xt.remove(h);
|
|
549
540
|
}, 0);
|
|
550
541
|
};
|
|
551
542
|
}
|
|
552
|
-
}, [c, l, f,
|
|
553
|
-
const
|
|
554
|
-
(
|
|
555
|
-
if (!n && !r ||
|
|
556
|
-
const
|
|
557
|
-
if (
|
|
558
|
-
const w =
|
|
559
|
-
x && b ? !
|
|
543
|
+
}, [c, l, f, h]);
|
|
544
|
+
const v = a.useCallback(
|
|
545
|
+
(p) => {
|
|
546
|
+
if (!n && !r || h.paused) return;
|
|
547
|
+
const g = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, y = document.activeElement;
|
|
548
|
+
if (g && y) {
|
|
549
|
+
const w = p.currentTarget, [x, b] = kr(w);
|
|
550
|
+
x && b ? !p.shiftKey && y === b ? (p.preventDefault(), n && q(x, { select: !0 })) : p.shiftKey && y === x && (p.preventDefault(), n && q(b, { select: !0 })) : y === w && p.preventDefault();
|
|
560
551
|
}
|
|
561
552
|
},
|
|
562
|
-
[n, r,
|
|
553
|
+
[n, r, h.paused]
|
|
563
554
|
);
|
|
564
|
-
return /* @__PURE__ */ C(G.div, { tabIndex: -1, ...s, ref:
|
|
555
|
+
return /* @__PURE__ */ C(G.div, { tabIndex: -1, ...s, ref: m, onKeyDown: v });
|
|
565
556
|
});
|
|
566
|
-
|
|
567
|
-
function
|
|
557
|
+
jt.displayName = Mr;
|
|
558
|
+
function Tr(e, { select: t = !1 } = {}) {
|
|
568
559
|
const n = document.activeElement;
|
|
569
560
|
for (const r of e)
|
|
570
561
|
if (q(r, { select: t }), document.activeElement !== n) return;
|
|
571
562
|
}
|
|
572
|
-
function
|
|
573
|
-
const t =
|
|
563
|
+
function kr(e) {
|
|
564
|
+
const t = Yt(e), n = bt(t, e), r = bt(t.reverse(), e);
|
|
574
565
|
return [n, r];
|
|
575
566
|
}
|
|
576
|
-
function
|
|
567
|
+
function Yt(e) {
|
|
577
568
|
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
578
569
|
acceptNode: (r) => {
|
|
579
570
|
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
@@ -583,11 +574,11 @@ function Qt(e) {
|
|
|
583
574
|
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
584
575
|
return t;
|
|
585
576
|
}
|
|
586
|
-
function
|
|
577
|
+
function bt(e, t) {
|
|
587
578
|
for (const n of e)
|
|
588
|
-
if (!
|
|
579
|
+
if (!Lr(n, { upTo: t })) return n;
|
|
589
580
|
}
|
|
590
|
-
function
|
|
581
|
+
function Lr(e, { upTo: t }) {
|
|
591
582
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
592
583
|
for (; e; ) {
|
|
593
584
|
if (t !== void 0 && e === t) return !1;
|
|
@@ -596,67 +587,65 @@ function Br(e, { upTo: t }) {
|
|
|
596
587
|
}
|
|
597
588
|
return !1;
|
|
598
589
|
}
|
|
599
|
-
function
|
|
590
|
+
function Dr(e) {
|
|
600
591
|
return e instanceof HTMLInputElement && "select" in e;
|
|
601
592
|
}
|
|
602
593
|
function q(e, { select: t = !1 } = {}) {
|
|
603
594
|
if (e && e.focus) {
|
|
604
595
|
const n = document.activeElement;
|
|
605
|
-
e.focus({ preventScroll: !0 }), e !== n &&
|
|
596
|
+
e.focus({ preventScroll: !0 }), e !== n && Dr(e) && t && e.select();
|
|
606
597
|
}
|
|
607
598
|
}
|
|
608
|
-
var
|
|
609
|
-
function
|
|
599
|
+
var xt = _r();
|
|
600
|
+
function _r() {
|
|
610
601
|
let e = [];
|
|
611
602
|
return {
|
|
612
603
|
add(t) {
|
|
613
604
|
const n = e[0];
|
|
614
|
-
t !== n &&
|
|
605
|
+
t !== n && n?.pause(), e = Et(e, t), e.unshift(t);
|
|
615
606
|
},
|
|
616
607
|
remove(t) {
|
|
617
|
-
|
|
618
|
-
e = Ot(e, t), (n = e[0]) == null || n.resume();
|
|
608
|
+
e = Et(e, t), e[0]?.resume();
|
|
619
609
|
}
|
|
620
610
|
};
|
|
621
611
|
}
|
|
622
|
-
function
|
|
612
|
+
function Et(e, t) {
|
|
623
613
|
const n = [...e], r = n.indexOf(t);
|
|
624
614
|
return r !== -1 && n.splice(r, 1), n;
|
|
625
615
|
}
|
|
626
|
-
function
|
|
616
|
+
function Fr(e) {
|
|
627
617
|
return e.filter((t) => t.tagName !== "A");
|
|
628
618
|
}
|
|
629
|
-
var
|
|
630
|
-
var c;
|
|
619
|
+
var Ir = "Portal", Kt = a.forwardRef((e, t) => {
|
|
631
620
|
const { container: n, ...r } = e, [o, i] = a.useState(!1);
|
|
632
621
|
ee(() => i(!0), []);
|
|
633
|
-
const s = n || o &&
|
|
634
|
-
return s ?
|
|
622
|
+
const s = n || o && globalThis?.document?.body;
|
|
623
|
+
return s ? Qn.createPortal(/* @__PURE__ */ C(G.div, { ...r, ref: t }), s) : null;
|
|
635
624
|
});
|
|
636
|
-
|
|
637
|
-
var
|
|
638
|
-
function
|
|
625
|
+
Kt.displayName = Ir;
|
|
626
|
+
var Ue = 0;
|
|
627
|
+
function Wr() {
|
|
639
628
|
a.useEffect(() => {
|
|
640
629
|
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
641
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ??
|
|
642
|
-
|
|
630
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Ct()), document.body.insertAdjacentElement("beforeend", e[1] ?? Ct()), Ue++, () => {
|
|
631
|
+
Ue === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Ue--;
|
|
643
632
|
};
|
|
644
633
|
}, []);
|
|
645
634
|
}
|
|
646
|
-
function
|
|
635
|
+
function Ct() {
|
|
647
636
|
const e = document.createElement("span");
|
|
648
637
|
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;
|
|
649
638
|
}
|
|
650
|
-
var
|
|
651
|
-
return
|
|
639
|
+
var V = function() {
|
|
640
|
+
return V = Object.assign || function(t) {
|
|
652
641
|
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
653
642
|
n = arguments[r];
|
|
654
643
|
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
655
644
|
}
|
|
656
645
|
return t;
|
|
657
|
-
},
|
|
646
|
+
}, V.apply(this, arguments);
|
|
658
647
|
};
|
|
659
|
-
function
|
|
648
|
+
function Xt(e, t) {
|
|
660
649
|
var n = {};
|
|
661
650
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
662
651
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -664,17 +653,17 @@ function en(e, t) {
|
|
|
664
653
|
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
665
654
|
return n;
|
|
666
655
|
}
|
|
667
|
-
function
|
|
656
|
+
function Br(e, t, n) {
|
|
668
657
|
if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
|
|
669
658
|
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
670
659
|
return e.concat(i || Array.prototype.slice.call(t));
|
|
671
660
|
}
|
|
672
|
-
var
|
|
673
|
-
function
|
|
661
|
+
var Me = "right-scroll-bar-position", Te = "width-before-scroll-bar", $r = "with-scroll-bars-hidden", Hr = "--removed-body-scroll-bar-size";
|
|
662
|
+
function je(e, t) {
|
|
674
663
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
675
664
|
}
|
|
676
|
-
function
|
|
677
|
-
var n =
|
|
665
|
+
function zr(e, t) {
|
|
666
|
+
var n = Kn(function() {
|
|
678
667
|
return {
|
|
679
668
|
// value
|
|
680
669
|
value: e,
|
|
@@ -694,31 +683,31 @@ function Kr(e, t) {
|
|
|
694
683
|
})[0];
|
|
695
684
|
return n.callback = t, n.facade;
|
|
696
685
|
}
|
|
697
|
-
var
|
|
698
|
-
function
|
|
699
|
-
var n =
|
|
686
|
+
var Vr = typeof window < "u" ? a.useLayoutEffect : a.useEffect, Pt = /* @__PURE__ */ new WeakMap();
|
|
687
|
+
function Ur(e, t) {
|
|
688
|
+
var n = zr(null, function(r) {
|
|
700
689
|
return e.forEach(function(o) {
|
|
701
|
-
return
|
|
690
|
+
return je(o, r);
|
|
702
691
|
});
|
|
703
692
|
});
|
|
704
|
-
return
|
|
705
|
-
var r =
|
|
693
|
+
return Vr(function() {
|
|
694
|
+
var r = Pt.get(n);
|
|
706
695
|
if (r) {
|
|
707
696
|
var o = new Set(r), i = new Set(e), s = n.current;
|
|
708
697
|
o.forEach(function(c) {
|
|
709
|
-
i.has(c) ||
|
|
698
|
+
i.has(c) || je(c, null);
|
|
710
699
|
}), i.forEach(function(c) {
|
|
711
|
-
o.has(c) ||
|
|
700
|
+
o.has(c) || je(c, s);
|
|
712
701
|
});
|
|
713
702
|
}
|
|
714
|
-
|
|
703
|
+
Pt.set(n, e);
|
|
715
704
|
}, [e]), n;
|
|
716
705
|
}
|
|
717
|
-
function
|
|
706
|
+
function jr(e) {
|
|
718
707
|
return e;
|
|
719
708
|
}
|
|
720
|
-
function
|
|
721
|
-
t === void 0 && (t =
|
|
709
|
+
function Yr(e, t) {
|
|
710
|
+
t === void 0 && (t = jr);
|
|
722
711
|
var n = [], r = !1, o = {
|
|
723
712
|
read: function() {
|
|
724
713
|
if (r)
|
|
@@ -772,78 +761,78 @@ function Qr(e, t) {
|
|
|
772
761
|
};
|
|
773
762
|
return o;
|
|
774
763
|
}
|
|
775
|
-
function
|
|
764
|
+
function Kr(e) {
|
|
776
765
|
e === void 0 && (e = {});
|
|
777
|
-
var t =
|
|
778
|
-
return t.options =
|
|
766
|
+
var t = Yr(null);
|
|
767
|
+
return t.options = V({ async: !0, ssr: !1 }, e), t;
|
|
779
768
|
}
|
|
780
|
-
var
|
|
781
|
-
var t = e.sideCar, n =
|
|
769
|
+
var Zt = function(e) {
|
|
770
|
+
var t = e.sideCar, n = Xt(e, ["sideCar"]);
|
|
782
771
|
if (!t)
|
|
783
772
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
784
773
|
var r = t.read();
|
|
785
774
|
if (!r)
|
|
786
775
|
throw new Error("Sidecar medium not found");
|
|
787
|
-
return a.createElement(r,
|
|
776
|
+
return a.createElement(r, V({}, n));
|
|
788
777
|
};
|
|
789
|
-
|
|
790
|
-
function
|
|
791
|
-
return e.useMedium(t),
|
|
778
|
+
Zt.isSideCarExport = !0;
|
|
779
|
+
function Xr(e, t) {
|
|
780
|
+
return e.useMedium(t), Zt;
|
|
792
781
|
}
|
|
793
|
-
var
|
|
794
|
-
},
|
|
782
|
+
var Gt = Kr(), Ye = function() {
|
|
783
|
+
}, Ie = a.forwardRef(function(e, t) {
|
|
795
784
|
var n = a.useRef(null), r = a.useState({
|
|
796
|
-
onScrollCapture:
|
|
797
|
-
onWheelCapture:
|
|
798
|
-
onTouchMoveCapture:
|
|
799
|
-
}), o = r[0], i = r[1], s = e.forwardProps, c = e.children, u = e.className, l = e.removeScrollBar, f = e.enabled, d = e.shards,
|
|
785
|
+
onScrollCapture: Ye,
|
|
786
|
+
onWheelCapture: Ye,
|
|
787
|
+
onTouchMoveCapture: Ye
|
|
788
|
+
}), o = r[0], i = r[1], s = e.forwardProps, c = e.children, u = e.className, l = e.removeScrollBar, f = e.enabled, d = e.shards, m = e.sideCar, h = e.noRelative, v = e.noIsolation, p = e.inert, g = e.allowPinchZoom, y = e.as, w = y === void 0 ? "div" : y, x = e.gapMode, b = Xt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = m, S = Ur([n, t]), P = V(V({}, b), o);
|
|
800
789
|
return a.createElement(
|
|
801
790
|
a.Fragment,
|
|
802
791
|
null,
|
|
803
|
-
f && a.createElement(E, { sideCar:
|
|
804
|
-
s ? a.cloneElement(a.Children.only(c),
|
|
792
|
+
f && a.createElement(E, { sideCar: Gt, removeScrollBar: l, shards: d, noRelative: h, noIsolation: v, inert: p, setCallbacks: i, allowPinchZoom: !!g, lockRef: n, gapMode: x }),
|
|
793
|
+
s ? a.cloneElement(a.Children.only(c), V(V({}, P), { ref: S })) : a.createElement(w, V({}, P, { className: u, ref: S }), c)
|
|
805
794
|
);
|
|
806
795
|
});
|
|
807
|
-
|
|
796
|
+
Ie.defaultProps = {
|
|
808
797
|
enabled: !0,
|
|
809
798
|
removeScrollBar: !0,
|
|
810
799
|
inert: !1
|
|
811
800
|
};
|
|
812
|
-
|
|
813
|
-
fullWidth:
|
|
814
|
-
zeroRight:
|
|
801
|
+
Ie.classNames = {
|
|
802
|
+
fullWidth: Te,
|
|
803
|
+
zeroRight: Me
|
|
815
804
|
};
|
|
816
|
-
var
|
|
805
|
+
var Zr = function() {
|
|
817
806
|
if (typeof __webpack_nonce__ < "u")
|
|
818
807
|
return __webpack_nonce__;
|
|
819
808
|
};
|
|
820
|
-
function
|
|
809
|
+
function Gr() {
|
|
821
810
|
if (!document)
|
|
822
811
|
return null;
|
|
823
812
|
var e = document.createElement("style");
|
|
824
813
|
e.type = "text/css";
|
|
825
|
-
var t =
|
|
814
|
+
var t = Zr();
|
|
826
815
|
return t && e.setAttribute("nonce", t), e;
|
|
827
816
|
}
|
|
828
|
-
function
|
|
817
|
+
function qr(e, t) {
|
|
829
818
|
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
830
819
|
}
|
|
831
|
-
function
|
|
820
|
+
function Qr(e) {
|
|
832
821
|
var t = document.head || document.getElementsByTagName("head")[0];
|
|
833
822
|
t.appendChild(e);
|
|
834
823
|
}
|
|
835
|
-
var
|
|
824
|
+
var Jr = function() {
|
|
836
825
|
var e = 0, t = null;
|
|
837
826
|
return {
|
|
838
827
|
add: function(n) {
|
|
839
|
-
e == 0 && (t =
|
|
828
|
+
e == 0 && (t = Gr()) && (qr(t, n), Qr(t)), e++;
|
|
840
829
|
},
|
|
841
830
|
remove: function() {
|
|
842
831
|
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
843
832
|
}
|
|
844
833
|
};
|
|
845
|
-
},
|
|
846
|
-
var e =
|
|
834
|
+
}, eo = function() {
|
|
835
|
+
var e = Jr();
|
|
847
836
|
return function(t, n) {
|
|
848
837
|
a.useEffect(function() {
|
|
849
838
|
return e.add(t), function() {
|
|
@@ -851,36 +840,36 @@ var io = function() {
|
|
|
851
840
|
};
|
|
852
841
|
}, [t && n]);
|
|
853
842
|
};
|
|
854
|
-
},
|
|
855
|
-
var e =
|
|
843
|
+
}, qt = function() {
|
|
844
|
+
var e = eo(), t = function(n) {
|
|
856
845
|
var r = n.styles, o = n.dynamic;
|
|
857
846
|
return e(r, o), null;
|
|
858
847
|
};
|
|
859
848
|
return t;
|
|
860
|
-
},
|
|
849
|
+
}, to = {
|
|
861
850
|
left: 0,
|
|
862
851
|
top: 0,
|
|
863
852
|
right: 0,
|
|
864
853
|
gap: 0
|
|
865
854
|
}, Ke = function(e) {
|
|
866
855
|
return parseInt(e || "", 10) || 0;
|
|
867
|
-
},
|
|
856
|
+
}, no = function(e) {
|
|
868
857
|
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
869
858
|
return [Ke(n), Ke(r), Ke(o)];
|
|
870
|
-
},
|
|
859
|
+
}, ro = function(e) {
|
|
871
860
|
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
872
|
-
return
|
|
873
|
-
var t =
|
|
861
|
+
return to;
|
|
862
|
+
var t = no(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
874
863
|
return {
|
|
875
864
|
left: t[0],
|
|
876
865
|
top: t[1],
|
|
877
866
|
right: t[2],
|
|
878
867
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
879
868
|
};
|
|
880
|
-
},
|
|
869
|
+
}, oo = qt(), le = "data-scroll-locked", io = function(e, t, n, r) {
|
|
881
870
|
var o = e.left, i = e.top, s = e.right, c = e.gap;
|
|
882
871
|
return n === void 0 && (n = "margin"), `
|
|
883
|
-
.`.concat(
|
|
872
|
+
.`.concat($r, ` {
|
|
884
873
|
overflow: hidden `).concat(r, `;
|
|
885
874
|
padding-right: `).concat(c, "px ").concat(r, `;
|
|
886
875
|
}
|
|
@@ -901,110 +890,110 @@ var io = function() {
|
|
|
901
890
|
].filter(Boolean).join(""), `
|
|
902
891
|
}
|
|
903
892
|
|
|
904
|
-
.`).concat(
|
|
893
|
+
.`).concat(Me, ` {
|
|
905
894
|
right: `).concat(c, "px ").concat(r, `;
|
|
906
895
|
}
|
|
907
896
|
|
|
908
|
-
.`).concat(
|
|
897
|
+
.`).concat(Te, ` {
|
|
909
898
|
margin-right: `).concat(c, "px ").concat(r, `;
|
|
910
899
|
}
|
|
911
900
|
|
|
912
|
-
.`).concat(
|
|
901
|
+
.`).concat(Me, " .").concat(Me, ` {
|
|
913
902
|
right: 0 `).concat(r, `;
|
|
914
903
|
}
|
|
915
904
|
|
|
916
|
-
.`).concat(
|
|
905
|
+
.`).concat(Te, " .").concat(Te, ` {
|
|
917
906
|
margin-right: 0 `).concat(r, `;
|
|
918
907
|
}
|
|
919
908
|
|
|
920
909
|
body[`).concat(le, `] {
|
|
921
|
-
`).concat(
|
|
910
|
+
`).concat(Hr, ": ").concat(c, `px;
|
|
922
911
|
}
|
|
923
912
|
`);
|
|
924
|
-
},
|
|
913
|
+
}, St = function() {
|
|
925
914
|
var e = parseInt(document.body.getAttribute(le) || "0", 10);
|
|
926
915
|
return isFinite(e) ? e : 0;
|
|
927
|
-
},
|
|
916
|
+
}, so = function() {
|
|
928
917
|
a.useEffect(function() {
|
|
929
|
-
return document.body.setAttribute(le, (
|
|
930
|
-
var e =
|
|
918
|
+
return document.body.setAttribute(le, (St() + 1).toString()), function() {
|
|
919
|
+
var e = St() - 1;
|
|
931
920
|
e <= 0 ? document.body.removeAttribute(le) : document.body.setAttribute(le, e.toString());
|
|
932
921
|
};
|
|
933
922
|
}, []);
|
|
934
|
-
},
|
|
923
|
+
}, co = function(e) {
|
|
935
924
|
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
936
|
-
|
|
925
|
+
so();
|
|
937
926
|
var i = a.useMemo(function() {
|
|
938
|
-
return
|
|
927
|
+
return ro(o);
|
|
939
928
|
}, [o]);
|
|
940
|
-
return a.createElement(
|
|
941
|
-
},
|
|
929
|
+
return a.createElement(oo, { styles: io(i, !t, o, n ? "" : "!important") });
|
|
930
|
+
}, Je = !1;
|
|
942
931
|
if (typeof window < "u")
|
|
943
932
|
try {
|
|
944
933
|
var Se = Object.defineProperty({}, "passive", {
|
|
945
934
|
get: function() {
|
|
946
|
-
return
|
|
935
|
+
return Je = !0, !0;
|
|
947
936
|
}
|
|
948
937
|
});
|
|
949
938
|
window.addEventListener("test", Se, Se), window.removeEventListener("test", Se, Se);
|
|
950
939
|
} catch {
|
|
951
|
-
|
|
940
|
+
Je = !1;
|
|
952
941
|
}
|
|
953
|
-
var se =
|
|
942
|
+
var se = Je ? { passive: !1 } : !1, ao = function(e) {
|
|
954
943
|
return e.tagName === "TEXTAREA";
|
|
955
|
-
},
|
|
944
|
+
}, Qt = function(e, t) {
|
|
956
945
|
if (!(e instanceof Element))
|
|
957
946
|
return !1;
|
|
958
947
|
var n = window.getComputedStyle(e);
|
|
959
948
|
return (
|
|
960
949
|
// not-not-scrollable
|
|
961
950
|
n[t] !== "hidden" && // contains scroll inside self
|
|
962
|
-
!(n.overflowY === n.overflowX && !
|
|
951
|
+
!(n.overflowY === n.overflowX && !ao(e) && n[t] === "visible")
|
|
963
952
|
);
|
|
964
|
-
},
|
|
965
|
-
return
|
|
966
|
-
},
|
|
967
|
-
return
|
|
968
|
-
},
|
|
953
|
+
}, lo = function(e) {
|
|
954
|
+
return Qt(e, "overflowY");
|
|
955
|
+
}, uo = function(e) {
|
|
956
|
+
return Qt(e, "overflowX");
|
|
957
|
+
}, At = function(e, t) {
|
|
969
958
|
var n = t.ownerDocument, r = t;
|
|
970
959
|
do {
|
|
971
960
|
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
972
|
-
var o =
|
|
961
|
+
var o = Jt(e, r);
|
|
973
962
|
if (o) {
|
|
974
|
-
var i =
|
|
963
|
+
var i = en(e, r), s = i[1], c = i[2];
|
|
975
964
|
if (s > c)
|
|
976
965
|
return !0;
|
|
977
966
|
}
|
|
978
967
|
r = r.parentNode;
|
|
979
968
|
} while (r && r !== n.body);
|
|
980
969
|
return !1;
|
|
981
|
-
},
|
|
970
|
+
}, fo = function(e) {
|
|
982
971
|
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
983
972
|
return [
|
|
984
973
|
t,
|
|
985
974
|
n,
|
|
986
975
|
r
|
|
987
976
|
];
|
|
988
|
-
},
|
|
977
|
+
}, po = function(e) {
|
|
989
978
|
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
990
979
|
return [
|
|
991
980
|
t,
|
|
992
981
|
n,
|
|
993
982
|
r
|
|
994
983
|
];
|
|
995
|
-
},
|
|
996
|
-
return e === "v" ?
|
|
997
|
-
},
|
|
998
|
-
return e === "v" ?
|
|
999
|
-
},
|
|
984
|
+
}, Jt = function(e, t) {
|
|
985
|
+
return e === "v" ? lo(t) : uo(t);
|
|
986
|
+
}, en = function(e, t) {
|
|
987
|
+
return e === "v" ? fo(t) : po(t);
|
|
988
|
+
}, ho = function(e, t) {
|
|
1000
989
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
1001
|
-
},
|
|
1002
|
-
var i =
|
|
990
|
+
}, mo = function(e, t, n, r, o) {
|
|
991
|
+
var i = ho(e, window.getComputedStyle(t).direction), s = i * r, c = n.target, u = t.contains(c), l = !1, f = s > 0, d = 0, m = 0;
|
|
1003
992
|
do {
|
|
1004
993
|
if (!c)
|
|
1005
994
|
break;
|
|
1006
|
-
var
|
|
1007
|
-
(
|
|
995
|
+
var h = en(e, c), v = h[0], p = h[1], g = h[2], y = p - g - i * v;
|
|
996
|
+
(v || y) && Jt(e, c) && (d += y, m += v);
|
|
1008
997
|
var w = c.parentNode;
|
|
1009
998
|
c = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
|
|
1010
999
|
} while (
|
|
@@ -1012,163 +1001,163 @@ var se = et ? { passive: !1 } : !1, mo = function(e) {
|
|
|
1012
1001
|
!u && c !== document.body || // self content
|
|
1013
1002
|
u && (t.contains(c) || t === c)
|
|
1014
1003
|
);
|
|
1015
|
-
return (f && Math.abs(d) < 1 || !f && Math.abs(
|
|
1016
|
-
},
|
|
1004
|
+
return (f && Math.abs(d) < 1 || !f && Math.abs(m) < 1) && (l = !0), l;
|
|
1005
|
+
}, Ae = function(e) {
|
|
1017
1006
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
1018
|
-
},
|
|
1007
|
+
}, Rt = function(e) {
|
|
1019
1008
|
return [e.deltaX, e.deltaY];
|
|
1020
|
-
},
|
|
1009
|
+
}, Ot = function(e) {
|
|
1021
1010
|
return e && "current" in e ? e.current : e;
|
|
1022
|
-
},
|
|
1011
|
+
}, vo = function(e, t) {
|
|
1023
1012
|
return e[0] === t[0] && e[1] === t[1];
|
|
1024
|
-
},
|
|
1013
|
+
}, go = function(e) {
|
|
1025
1014
|
return `
|
|
1026
1015
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
1027
1016
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
1028
1017
|
`);
|
|
1029
|
-
},
|
|
1030
|
-
function
|
|
1031
|
-
var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(
|
|
1018
|
+
}, yo = 0, ce = [];
|
|
1019
|
+
function wo(e) {
|
|
1020
|
+
var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(yo++)[0], i = a.useState(qt)[0], s = a.useRef(e);
|
|
1032
1021
|
a.useEffect(function() {
|
|
1033
1022
|
s.current = e;
|
|
1034
1023
|
}, [e]), a.useEffect(function() {
|
|
1035
1024
|
if (e.inert) {
|
|
1036
1025
|
document.body.classList.add("block-interactivity-".concat(o));
|
|
1037
|
-
var
|
|
1038
|
-
return
|
|
1039
|
-
return
|
|
1026
|
+
var p = Br([e.lockRef.current], (e.shards || []).map(Ot), !0).filter(Boolean);
|
|
1027
|
+
return p.forEach(function(g) {
|
|
1028
|
+
return g.classList.add("allow-interactivity-".concat(o));
|
|
1040
1029
|
}), function() {
|
|
1041
|
-
document.body.classList.remove("block-interactivity-".concat(o)),
|
|
1042
|
-
return
|
|
1030
|
+
document.body.classList.remove("block-interactivity-".concat(o)), p.forEach(function(g) {
|
|
1031
|
+
return g.classList.remove("allow-interactivity-".concat(o));
|
|
1043
1032
|
});
|
|
1044
1033
|
};
|
|
1045
1034
|
}
|
|
1046
1035
|
}, [e.inert, e.lockRef.current, e.shards]);
|
|
1047
|
-
var c = a.useCallback(function(
|
|
1048
|
-
if ("touches" in
|
|
1036
|
+
var c = a.useCallback(function(p, g) {
|
|
1037
|
+
if ("touches" in p && p.touches.length === 2 || p.type === "wheel" && p.ctrlKey)
|
|
1049
1038
|
return !s.current.allowPinchZoom;
|
|
1050
|
-
var y =
|
|
1051
|
-
if ("touches" in
|
|
1039
|
+
var y = Ae(p), w = n.current, x = "deltaX" in p ? p.deltaX : w[0] - y[0], b = "deltaY" in p ? p.deltaY : w[1] - y[1], E, S = p.target, P = Math.abs(x) > Math.abs(b) ? "h" : "v";
|
|
1040
|
+
if ("touches" in p && P === "h" && S.type === "range")
|
|
1052
1041
|
return !1;
|
|
1053
|
-
var R =
|
|
1042
|
+
var R = At(P, S);
|
|
1054
1043
|
if (!R)
|
|
1055
1044
|
return !0;
|
|
1056
|
-
if (R ? E = P : (E = P === "v" ? "h" : "v", R =
|
|
1045
|
+
if (R ? E = P : (E = P === "v" ? "h" : "v", R = At(P, S)), !R)
|
|
1057
1046
|
return !1;
|
|
1058
|
-
if (!r.current && "changedTouches" in
|
|
1047
|
+
if (!r.current && "changedTouches" in p && (x || b) && (r.current = E), !E)
|
|
1059
1048
|
return !0;
|
|
1060
1049
|
var M = r.current || E;
|
|
1061
|
-
return
|
|
1062
|
-
}, []), u = a.useCallback(function(
|
|
1063
|
-
var
|
|
1050
|
+
return mo(M, g, p, M === "h" ? x : b);
|
|
1051
|
+
}, []), u = a.useCallback(function(p) {
|
|
1052
|
+
var g = p;
|
|
1064
1053
|
if (!(!ce.length || ce[ce.length - 1] !== i)) {
|
|
1065
|
-
var y = "deltaY" in
|
|
1066
|
-
return E.name ===
|
|
1054
|
+
var y = "deltaY" in g ? Rt(g) : Ae(g), w = t.current.filter(function(E) {
|
|
1055
|
+
return E.name === g.type && (E.target === g.target || g.target === E.shadowParent) && vo(E.delta, y);
|
|
1067
1056
|
})[0];
|
|
1068
1057
|
if (w && w.should) {
|
|
1069
|
-
|
|
1058
|
+
g.cancelable && g.preventDefault();
|
|
1070
1059
|
return;
|
|
1071
1060
|
}
|
|
1072
1061
|
if (!w) {
|
|
1073
|
-
var x = (s.current.shards || []).map(
|
|
1074
|
-
return E.contains(
|
|
1075
|
-
}), b = x.length > 0 ? c(
|
|
1076
|
-
b &&
|
|
1062
|
+
var x = (s.current.shards || []).map(Ot).filter(Boolean).filter(function(E) {
|
|
1063
|
+
return E.contains(g.target);
|
|
1064
|
+
}), b = x.length > 0 ? c(g, x[0]) : !s.current.noIsolation;
|
|
1065
|
+
b && g.cancelable && g.preventDefault();
|
|
1077
1066
|
}
|
|
1078
1067
|
}
|
|
1079
|
-
}, []), l = a.useCallback(function(
|
|
1080
|
-
var x = { name:
|
|
1068
|
+
}, []), l = a.useCallback(function(p, g, y, w) {
|
|
1069
|
+
var x = { name: p, delta: g, target: y, should: w, shadowParent: bo(y) };
|
|
1081
1070
|
t.current.push(x), setTimeout(function() {
|
|
1082
1071
|
t.current = t.current.filter(function(b) {
|
|
1083
1072
|
return b !== x;
|
|
1084
1073
|
});
|
|
1085
1074
|
}, 1);
|
|
1086
|
-
}, []), f = a.useCallback(function(
|
|
1087
|
-
n.current =
|
|
1088
|
-
}, []), d = a.useCallback(function(
|
|
1089
|
-
l(
|
|
1090
|
-
}, []),
|
|
1091
|
-
l(
|
|
1075
|
+
}, []), f = a.useCallback(function(p) {
|
|
1076
|
+
n.current = Ae(p), r.current = void 0;
|
|
1077
|
+
}, []), d = a.useCallback(function(p) {
|
|
1078
|
+
l(p.type, Rt(p), p.target, c(p, e.lockRef.current));
|
|
1079
|
+
}, []), m = a.useCallback(function(p) {
|
|
1080
|
+
l(p.type, Ae(p), p.target, c(p, e.lockRef.current));
|
|
1092
1081
|
}, []);
|
|
1093
1082
|
a.useEffect(function() {
|
|
1094
1083
|
return ce.push(i), e.setCallbacks({
|
|
1095
1084
|
onScrollCapture: d,
|
|
1096
1085
|
onWheelCapture: d,
|
|
1097
|
-
onTouchMoveCapture:
|
|
1086
|
+
onTouchMoveCapture: m
|
|
1098
1087
|
}), document.addEventListener("wheel", u, se), document.addEventListener("touchmove", u, se), document.addEventListener("touchstart", f, se), function() {
|
|
1099
|
-
ce = ce.filter(function(
|
|
1100
|
-
return
|
|
1088
|
+
ce = ce.filter(function(p) {
|
|
1089
|
+
return p !== i;
|
|
1101
1090
|
}), document.removeEventListener("wheel", u, se), document.removeEventListener("touchmove", u, se), document.removeEventListener("touchstart", f, se);
|
|
1102
1091
|
};
|
|
1103
1092
|
}, []);
|
|
1104
|
-
var
|
|
1093
|
+
var h = e.removeScrollBar, v = e.inert;
|
|
1105
1094
|
return a.createElement(
|
|
1106
1095
|
a.Fragment,
|
|
1107
1096
|
null,
|
|
1108
|
-
|
|
1109
|
-
|
|
1097
|
+
v ? a.createElement(i, { styles: go(o) }) : null,
|
|
1098
|
+
h ? a.createElement(co, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
1110
1099
|
);
|
|
1111
1100
|
}
|
|
1112
|
-
function
|
|
1101
|
+
function bo(e) {
|
|
1113
1102
|
for (var t = null; e !== null; )
|
|
1114
1103
|
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
1115
1104
|
return t;
|
|
1116
1105
|
}
|
|
1117
|
-
const
|
|
1118
|
-
var
|
|
1119
|
-
return a.createElement(
|
|
1106
|
+
const xo = Xr(Gt, wo);
|
|
1107
|
+
var tn = a.forwardRef(function(e, t) {
|
|
1108
|
+
return a.createElement(Ie, V({}, e, { ref: t, sideCar: xo }));
|
|
1120
1109
|
});
|
|
1121
|
-
|
|
1122
|
-
var
|
|
1110
|
+
tn.classNames = Ie.classNames;
|
|
1111
|
+
var Eo = function(e) {
|
|
1123
1112
|
if (typeof document > "u")
|
|
1124
1113
|
return null;
|
|
1125
1114
|
var t = Array.isArray(e) ? e[0] : e;
|
|
1126
1115
|
return t.ownerDocument.body;
|
|
1127
|
-
}, ae = /* @__PURE__ */ new WeakMap(),
|
|
1128
|
-
return e && (e.host ||
|
|
1129
|
-
},
|
|
1116
|
+
}, ae = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Oe = {}, Xe = 0, nn = function(e) {
|
|
1117
|
+
return e && (e.host || nn(e.parentNode));
|
|
1118
|
+
}, Co = function(e, t) {
|
|
1130
1119
|
return t.map(function(n) {
|
|
1131
1120
|
if (e.contains(n))
|
|
1132
1121
|
return n;
|
|
1133
|
-
var r =
|
|
1122
|
+
var r = nn(n);
|
|
1134
1123
|
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
1135
1124
|
}).filter(function(n) {
|
|
1136
1125
|
return !!n;
|
|
1137
1126
|
});
|
|
1138
|
-
},
|
|
1139
|
-
var o =
|
|
1140
|
-
|
|
1141
|
-
var i =
|
|
1127
|
+
}, Po = function(e, t, n, r) {
|
|
1128
|
+
var o = Co(t, Array.isArray(e) ? e : [e]);
|
|
1129
|
+
Oe[n] || (Oe[n] = /* @__PURE__ */ new WeakMap());
|
|
1130
|
+
var i = Oe[n], s = [], c = /* @__PURE__ */ new Set(), u = new Set(o), l = function(d) {
|
|
1142
1131
|
!d || c.has(d) || (c.add(d), l(d.parentNode));
|
|
1143
1132
|
};
|
|
1144
1133
|
o.forEach(l);
|
|
1145
1134
|
var f = function(d) {
|
|
1146
|
-
!d || u.has(d) || Array.prototype.forEach.call(d.children, function(
|
|
1147
|
-
if (c.has(
|
|
1148
|
-
f(
|
|
1135
|
+
!d || u.has(d) || Array.prototype.forEach.call(d.children, function(m) {
|
|
1136
|
+
if (c.has(m))
|
|
1137
|
+
f(m);
|
|
1149
1138
|
else
|
|
1150
1139
|
try {
|
|
1151
|
-
var
|
|
1152
|
-
ae.set(
|
|
1140
|
+
var h = m.getAttribute(r), v = h !== null && h !== "false", p = (ae.get(m) || 0) + 1, g = (i.get(m) || 0) + 1;
|
|
1141
|
+
ae.set(m, p), i.set(m, g), s.push(m), p === 1 && v && Re.set(m, !0), g === 1 && m.setAttribute(n, "true"), v || m.setAttribute(r, "true");
|
|
1153
1142
|
} catch (y) {
|
|
1154
|
-
console.error("aria-hidden: cannot operate on ",
|
|
1143
|
+
console.error("aria-hidden: cannot operate on ", m, y);
|
|
1155
1144
|
}
|
|
1156
1145
|
});
|
|
1157
1146
|
};
|
|
1158
|
-
return f(t), c.clear(),
|
|
1147
|
+
return f(t), c.clear(), Xe++, function() {
|
|
1159
1148
|
s.forEach(function(d) {
|
|
1160
|
-
var
|
|
1161
|
-
ae.set(d,
|
|
1162
|
-
}),
|
|
1149
|
+
var m = ae.get(d) - 1, h = i.get(d) - 1;
|
|
1150
|
+
ae.set(d, m), i.set(d, h), m || (Re.has(d) || d.removeAttribute(r), Re.delete(d)), h || d.removeAttribute(n);
|
|
1151
|
+
}), Xe--, Xe || (ae = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Oe = {});
|
|
1163
1152
|
};
|
|
1164
|
-
},
|
|
1153
|
+
}, So = function(e, t, n) {
|
|
1165
1154
|
n === void 0 && (n = "data-aria-hidden");
|
|
1166
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), o =
|
|
1167
|
-
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))),
|
|
1155
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), o = Eo(e);
|
|
1156
|
+
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Po(r, o, n, "aria-hidden")) : function() {
|
|
1168
1157
|
return null;
|
|
1169
1158
|
};
|
|
1170
1159
|
};
|
|
1171
|
-
function
|
|
1160
|
+
function Ao(e) {
|
|
1172
1161
|
const [t, n] = a.useState(void 0);
|
|
1173
1162
|
return ee(() => {
|
|
1174
1163
|
if (e) {
|
|
@@ -1190,56 +1179,56 @@ function ko(e) {
|
|
|
1190
1179
|
n(void 0);
|
|
1191
1180
|
}, [e]), t;
|
|
1192
1181
|
}
|
|
1193
|
-
const
|
|
1182
|
+
const Ro = ["top", "right", "bottom", "left"], te = Math.min, W = Math.max, Le = Math.round, Ne = Math.floor, j = (e) => ({
|
|
1194
1183
|
x: e,
|
|
1195
1184
|
y: e
|
|
1196
|
-
}),
|
|
1185
|
+
}), Oo = {
|
|
1197
1186
|
left: "right",
|
|
1198
1187
|
right: "left",
|
|
1199
1188
|
bottom: "top",
|
|
1200
1189
|
top: "bottom"
|
|
1201
|
-
},
|
|
1190
|
+
}, No = {
|
|
1202
1191
|
start: "end",
|
|
1203
1192
|
end: "start"
|
|
1204
1193
|
};
|
|
1205
|
-
function
|
|
1194
|
+
function et(e, t, n) {
|
|
1206
1195
|
return W(e, te(t, n));
|
|
1207
1196
|
}
|
|
1208
|
-
function
|
|
1197
|
+
function X(e, t) {
|
|
1209
1198
|
return typeof e == "function" ? e(t) : e;
|
|
1210
1199
|
}
|
|
1211
1200
|
function Z(e) {
|
|
1212
1201
|
return e.split("-")[0];
|
|
1213
1202
|
}
|
|
1214
|
-
function
|
|
1203
|
+
function he(e) {
|
|
1215
1204
|
return e.split("-")[1];
|
|
1216
1205
|
}
|
|
1217
|
-
function
|
|
1206
|
+
function ot(e) {
|
|
1218
1207
|
return e === "x" ? "y" : "x";
|
|
1219
1208
|
}
|
|
1220
|
-
function
|
|
1209
|
+
function it(e) {
|
|
1221
1210
|
return e === "y" ? "height" : "width";
|
|
1222
1211
|
}
|
|
1223
|
-
function
|
|
1212
|
+
function U(e) {
|
|
1224
1213
|
return ["top", "bottom"].includes(Z(e)) ? "y" : "x";
|
|
1225
1214
|
}
|
|
1226
|
-
function
|
|
1227
|
-
return
|
|
1215
|
+
function st(e) {
|
|
1216
|
+
return ot(U(e));
|
|
1228
1217
|
}
|
|
1229
|
-
function
|
|
1218
|
+
function Mo(e, t, n) {
|
|
1230
1219
|
n === void 0 && (n = !1);
|
|
1231
|
-
const r =
|
|
1220
|
+
const r = he(e), o = st(e), i = it(o);
|
|
1232
1221
|
let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
1233
|
-
return t.reference[i] > t.floating[i] && (s =
|
|
1222
|
+
return t.reference[i] > t.floating[i] && (s = De(s)), [s, De(s)];
|
|
1234
1223
|
}
|
|
1235
|
-
function
|
|
1236
|
-
const t =
|
|
1237
|
-
return [
|
|
1224
|
+
function To(e) {
|
|
1225
|
+
const t = De(e);
|
|
1226
|
+
return [tt(e), t, tt(t)];
|
|
1238
1227
|
}
|
|
1239
|
-
function
|
|
1240
|
-
return e.replace(/start|end/g, (t) =>
|
|
1228
|
+
function tt(e) {
|
|
1229
|
+
return e.replace(/start|end/g, (t) => No[t]);
|
|
1241
1230
|
}
|
|
1242
|
-
function
|
|
1231
|
+
function ko(e, t, n) {
|
|
1243
1232
|
const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
|
|
1244
1233
|
switch (e) {
|
|
1245
1234
|
case "top":
|
|
@@ -1252,15 +1241,15 @@ function Wo(e, t, n) {
|
|
|
1252
1241
|
return [];
|
|
1253
1242
|
}
|
|
1254
1243
|
}
|
|
1255
|
-
function
|
|
1256
|
-
const o =
|
|
1257
|
-
let i =
|
|
1258
|
-
return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(
|
|
1244
|
+
function Lo(e, t, n, r) {
|
|
1245
|
+
const o = he(e);
|
|
1246
|
+
let i = ko(Z(e), n === "start", r);
|
|
1247
|
+
return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(tt)))), i;
|
|
1259
1248
|
}
|
|
1260
|
-
function
|
|
1261
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
1249
|
+
function De(e) {
|
|
1250
|
+
return e.replace(/left|right|bottom|top/g, (t) => Oo[t]);
|
|
1262
1251
|
}
|
|
1263
|
-
function
|
|
1252
|
+
function Do(e) {
|
|
1264
1253
|
return {
|
|
1265
1254
|
top: 0,
|
|
1266
1255
|
right: 0,
|
|
@@ -1269,15 +1258,15 @@ function $o(e) {
|
|
|
1269
1258
|
...e
|
|
1270
1259
|
};
|
|
1271
1260
|
}
|
|
1272
|
-
function
|
|
1273
|
-
return typeof e != "number" ?
|
|
1261
|
+
function rn(e) {
|
|
1262
|
+
return typeof e != "number" ? Do(e) : {
|
|
1274
1263
|
top: e,
|
|
1275
1264
|
right: e,
|
|
1276
1265
|
bottom: e,
|
|
1277
1266
|
left: e
|
|
1278
1267
|
};
|
|
1279
1268
|
}
|
|
1280
|
-
function
|
|
1269
|
+
function _e(e) {
|
|
1281
1270
|
const {
|
|
1282
1271
|
x: t,
|
|
1283
1272
|
y: n,
|
|
@@ -1295,55 +1284,55 @@ function Fe(e) {
|
|
|
1295
1284
|
y: n
|
|
1296
1285
|
};
|
|
1297
1286
|
}
|
|
1298
|
-
function
|
|
1287
|
+
function Nt(e, t, n) {
|
|
1299
1288
|
let {
|
|
1300
1289
|
reference: r,
|
|
1301
1290
|
floating: o
|
|
1302
1291
|
} = e;
|
|
1303
|
-
const i =
|
|
1304
|
-
let
|
|
1292
|
+
const i = U(t), s = st(t), c = it(s), u = Z(t), l = i === "y", f = r.x + r.width / 2 - o.width / 2, d = r.y + r.height / 2 - o.height / 2, m = r[c] / 2 - o[c] / 2;
|
|
1293
|
+
let h;
|
|
1305
1294
|
switch (u) {
|
|
1306
1295
|
case "top":
|
|
1307
|
-
|
|
1296
|
+
h = {
|
|
1308
1297
|
x: f,
|
|
1309
1298
|
y: r.y - o.height
|
|
1310
1299
|
};
|
|
1311
1300
|
break;
|
|
1312
1301
|
case "bottom":
|
|
1313
|
-
|
|
1302
|
+
h = {
|
|
1314
1303
|
x: f,
|
|
1315
1304
|
y: r.y + r.height
|
|
1316
1305
|
};
|
|
1317
1306
|
break;
|
|
1318
1307
|
case "right":
|
|
1319
|
-
|
|
1308
|
+
h = {
|
|
1320
1309
|
x: r.x + r.width,
|
|
1321
1310
|
y: d
|
|
1322
1311
|
};
|
|
1323
1312
|
break;
|
|
1324
1313
|
case "left":
|
|
1325
|
-
|
|
1314
|
+
h = {
|
|
1326
1315
|
x: r.x - o.width,
|
|
1327
1316
|
y: d
|
|
1328
1317
|
};
|
|
1329
1318
|
break;
|
|
1330
1319
|
default:
|
|
1331
|
-
|
|
1320
|
+
h = {
|
|
1332
1321
|
x: r.x,
|
|
1333
1322
|
y: r.y
|
|
1334
1323
|
};
|
|
1335
1324
|
}
|
|
1336
|
-
switch (
|
|
1325
|
+
switch (he(t)) {
|
|
1337
1326
|
case "start":
|
|
1338
|
-
|
|
1327
|
+
h[s] -= m * (n && l ? -1 : 1);
|
|
1339
1328
|
break;
|
|
1340
1329
|
case "end":
|
|
1341
|
-
|
|
1330
|
+
h[s] += m * (n && l ? -1 : 1);
|
|
1342
1331
|
break;
|
|
1343
1332
|
}
|
|
1344
|
-
return
|
|
1333
|
+
return h;
|
|
1345
1334
|
}
|
|
1346
|
-
const
|
|
1335
|
+
const _o = async (e, t, n) => {
|
|
1347
1336
|
const {
|
|
1348
1337
|
placement: r = "bottom",
|
|
1349
1338
|
strategy: o = "absolute",
|
|
@@ -1357,12 +1346,12 @@ const Ho = async (e, t, n) => {
|
|
|
1357
1346
|
}), {
|
|
1358
1347
|
x: f,
|
|
1359
1348
|
y: d
|
|
1360
|
-
} =
|
|
1361
|
-
for (let
|
|
1349
|
+
} = Nt(l, r, u), m = r, h = {}, v = 0;
|
|
1350
|
+
for (let p = 0; p < c.length; p++) {
|
|
1362
1351
|
const {
|
|
1363
|
-
name:
|
|
1352
|
+
name: g,
|
|
1364
1353
|
fn: y
|
|
1365
|
-
} = c[
|
|
1354
|
+
} = c[p], {
|
|
1366
1355
|
x: w,
|
|
1367
1356
|
y: x,
|
|
1368
1357
|
data: b,
|
|
@@ -1371,9 +1360,9 @@ const Ho = async (e, t, n) => {
|
|
|
1371
1360
|
x: f,
|
|
1372
1361
|
y: d,
|
|
1373
1362
|
initialPlacement: r,
|
|
1374
|
-
placement:
|
|
1363
|
+
placement: m,
|
|
1375
1364
|
strategy: o,
|
|
1376
|
-
middlewareData:
|
|
1365
|
+
middlewareData: h,
|
|
1377
1366
|
rects: l,
|
|
1378
1367
|
platform: s,
|
|
1379
1368
|
elements: {
|
|
@@ -1381,27 +1370,27 @@ const Ho = async (e, t, n) => {
|
|
|
1381
1370
|
floating: t
|
|
1382
1371
|
}
|
|
1383
1372
|
});
|
|
1384
|
-
f = w ?? f, d = x ?? d,
|
|
1385
|
-
...
|
|
1386
|
-
[
|
|
1387
|
-
...
|
|
1373
|
+
f = w ?? f, d = x ?? d, h = {
|
|
1374
|
+
...h,
|
|
1375
|
+
[g]: {
|
|
1376
|
+
...h[g],
|
|
1388
1377
|
...b
|
|
1389
1378
|
}
|
|
1390
|
-
}, E &&
|
|
1379
|
+
}, E && v <= 50 && (v++, typeof E == "object" && (E.placement && (m = E.placement), E.rects && (l = E.rects === !0 ? await s.getElementRects({
|
|
1391
1380
|
reference: e,
|
|
1392
1381
|
floating: t,
|
|
1393
1382
|
strategy: o
|
|
1394
1383
|
}) : E.rects), {
|
|
1395
1384
|
x: f,
|
|
1396
1385
|
y: d
|
|
1397
|
-
} =
|
|
1386
|
+
} = Nt(l, m, u)), p = -1);
|
|
1398
1387
|
}
|
|
1399
1388
|
return {
|
|
1400
1389
|
x: f,
|
|
1401
1390
|
y: d,
|
|
1402
|
-
placement:
|
|
1391
|
+
placement: m,
|
|
1403
1392
|
strategy: o,
|
|
1404
|
-
middlewareData:
|
|
1393
|
+
middlewareData: h
|
|
1405
1394
|
};
|
|
1406
1395
|
};
|
|
1407
1396
|
async function ye(e, t) {
|
|
@@ -1418,10 +1407,10 @@ async function ye(e, t) {
|
|
|
1418
1407
|
boundary: l = "clippingAncestors",
|
|
1419
1408
|
rootBoundary: f = "viewport",
|
|
1420
1409
|
elementContext: d = "floating",
|
|
1421
|
-
altBoundary:
|
|
1422
|
-
padding:
|
|
1423
|
-
} =
|
|
1424
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(
|
|
1410
|
+
altBoundary: m = !1,
|
|
1411
|
+
padding: h = 0
|
|
1412
|
+
} = X(t, e), v = rn(h), g = c[m ? d === "floating" ? "reference" : "floating" : d], y = _e(await i.getClippingRect({
|
|
1413
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(g))) == null || n ? g : g.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
1425
1414
|
boundary: l,
|
|
1426
1415
|
rootBoundary: f,
|
|
1427
1416
|
strategy: u
|
|
@@ -1436,20 +1425,20 @@ async function ye(e, t) {
|
|
|
1436
1425
|
} : {
|
|
1437
1426
|
x: 1,
|
|
1438
1427
|
y: 1
|
|
1439
|
-
}, E =
|
|
1428
|
+
}, E = _e(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1440
1429
|
elements: c,
|
|
1441
1430
|
rect: w,
|
|
1442
1431
|
offsetParent: x,
|
|
1443
1432
|
strategy: u
|
|
1444
1433
|
}) : w);
|
|
1445
1434
|
return {
|
|
1446
|
-
top: (y.top - E.top +
|
|
1447
|
-
bottom: (E.bottom - y.bottom +
|
|
1448
|
-
left: (y.left - E.left +
|
|
1449
|
-
right: (E.right - y.right +
|
|
1435
|
+
top: (y.top - E.top + v.top) / b.y,
|
|
1436
|
+
bottom: (E.bottom - y.bottom + v.bottom) / b.y,
|
|
1437
|
+
left: (y.left - E.left + v.left) / b.x,
|
|
1438
|
+
right: (E.right - y.right + v.right) / b.x
|
|
1450
1439
|
};
|
|
1451
1440
|
}
|
|
1452
|
-
const
|
|
1441
|
+
const Fo = (e) => ({
|
|
1453
1442
|
name: "arrow",
|
|
1454
1443
|
options: e,
|
|
1455
1444
|
async fn(t) {
|
|
@@ -1464,20 +1453,20 @@ const Vo = (e) => ({
|
|
|
1464
1453
|
} = t, {
|
|
1465
1454
|
element: l,
|
|
1466
1455
|
padding: f = 0
|
|
1467
|
-
} =
|
|
1456
|
+
} = X(e, t) || {};
|
|
1468
1457
|
if (l == null)
|
|
1469
1458
|
return {};
|
|
1470
|
-
const d =
|
|
1459
|
+
const d = rn(f), m = {
|
|
1471
1460
|
x: n,
|
|
1472
1461
|
y: r
|
|
1473
|
-
},
|
|
1474
|
-
let P =
|
|
1475
|
-
(!P || !await (s.isElement == null ? void 0 : s.isElement(
|
|
1476
|
-
const R = b / 2 - E / 2, M = P / 2 -
|
|
1462
|
+
}, h = st(o), v = it(h), p = await s.getDimensions(l), g = h === "y", y = g ? "top" : "left", w = g ? "bottom" : "right", x = g ? "clientHeight" : "clientWidth", b = i.reference[v] + i.reference[h] - m[h] - i.floating[v], E = m[h] - i.reference[h], S = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
1463
|
+
let P = S ? S[x] : 0;
|
|
1464
|
+
(!P || !await (s.isElement == null ? void 0 : s.isElement(S))) && (P = c.floating[x] || i.floating[v]);
|
|
1465
|
+
const R = b / 2 - E / 2, M = P / 2 - p[v] / 2 - 1, O = te(d[y], M), _ = te(d[w], M), F = O, T = P - p[v] - _, N = P / 2 - p[v] / 2 + R, I = et(F, N, T), k = !u.arrow && he(o) != null && N !== I && i.reference[v] / 2 - (N < F ? O : _) - p[v] / 2 < 0, L = k ? N < F ? N - F : N - T : 0;
|
|
1477
1466
|
return {
|
|
1478
|
-
[
|
|
1467
|
+
[h]: m[h] + L,
|
|
1479
1468
|
data: {
|
|
1480
|
-
[
|
|
1469
|
+
[h]: I,
|
|
1481
1470
|
centerOffset: N - I - L,
|
|
1482
1471
|
...k && {
|
|
1483
1472
|
alignmentOffset: L
|
|
@@ -1486,7 +1475,7 @@ const Vo = (e) => ({
|
|
|
1486
1475
|
reset: k
|
|
1487
1476
|
};
|
|
1488
1477
|
}
|
|
1489
|
-
}),
|
|
1478
|
+
}), Io = function(e) {
|
|
1490
1479
|
return e === void 0 && (e = {}), {
|
|
1491
1480
|
name: "flip",
|
|
1492
1481
|
options: e,
|
|
@@ -1502,20 +1491,20 @@ const Vo = (e) => ({
|
|
|
1502
1491
|
} = t, {
|
|
1503
1492
|
mainAxis: f = !0,
|
|
1504
1493
|
crossAxis: d = !0,
|
|
1505
|
-
fallbackPlacements:
|
|
1506
|
-
fallbackStrategy:
|
|
1507
|
-
fallbackAxisSideDirection:
|
|
1508
|
-
flipAlignment:
|
|
1509
|
-
...
|
|
1510
|
-
} =
|
|
1494
|
+
fallbackPlacements: m,
|
|
1495
|
+
fallbackStrategy: h = "bestFit",
|
|
1496
|
+
fallbackAxisSideDirection: v = "none",
|
|
1497
|
+
flipAlignment: p = !0,
|
|
1498
|
+
...g
|
|
1499
|
+
} = X(e, t);
|
|
1511
1500
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
1512
1501
|
return {};
|
|
1513
|
-
const y = Z(o), w =
|
|
1514
|
-
!
|
|
1515
|
-
const P = [c, ...E], R = await ye(t,
|
|
1502
|
+
const y = Z(o), w = U(c), x = Z(c) === c, b = await (u.isRTL == null ? void 0 : u.isRTL(l.floating)), E = m || (x || !p ? [De(c)] : To(c)), S = v !== "none";
|
|
1503
|
+
!m && S && E.push(...Lo(c, p, v, b));
|
|
1504
|
+
const P = [c, ...E], R = await ye(t, g), M = [];
|
|
1516
1505
|
let O = ((r = i.flip) == null ? void 0 : r.overflows) || [];
|
|
1517
1506
|
if (f && M.push(R[y]), d) {
|
|
1518
|
-
const N =
|
|
1507
|
+
const N = Mo(o, s, b);
|
|
1519
1508
|
M.push(R[N[0]], R[N[1]]);
|
|
1520
1509
|
}
|
|
1521
1510
|
if (O = [...O, {
|
|
@@ -1524,9 +1513,9 @@ const Vo = (e) => ({
|
|
|
1524
1513
|
}], !M.every((N) => N <= 0)) {
|
|
1525
1514
|
var _, F;
|
|
1526
1515
|
const N = (((_ = i.flip) == null ? void 0 : _.index) || 0) + 1, I = P[N];
|
|
1527
|
-
if (I && (!(d === "alignment" ? w !==
|
|
1516
|
+
if (I && (!(d === "alignment" ? w !== U(I) : !1) || // We leave the current main axis only if every placement on that axis
|
|
1528
1517
|
// overflows the main axis.
|
|
1529
|
-
O.every((
|
|
1518
|
+
O.every((A) => A.overflows[0] > 0 && U(A.placement) === w)))
|
|
1530
1519
|
return {
|
|
1531
1520
|
data: {
|
|
1532
1521
|
index: N,
|
|
@@ -1536,20 +1525,20 @@ const Vo = (e) => ({
|
|
|
1536
1525
|
placement: I
|
|
1537
1526
|
}
|
|
1538
1527
|
};
|
|
1539
|
-
let k = (F = O.filter((L) => L.overflows[0] <= 0).sort((L,
|
|
1528
|
+
let k = (F = O.filter((L) => L.overflows[0] <= 0).sort((L, A) => L.overflows[1] - A.overflows[1])[0]) == null ? void 0 : F.placement;
|
|
1540
1529
|
if (!k)
|
|
1541
|
-
switch (
|
|
1530
|
+
switch (h) {
|
|
1542
1531
|
case "bestFit": {
|
|
1543
1532
|
var T;
|
|
1544
|
-
const L = (T = O.filter((
|
|
1545
|
-
if (
|
|
1546
|
-
const D =
|
|
1533
|
+
const L = (T = O.filter((A) => {
|
|
1534
|
+
if (S) {
|
|
1535
|
+
const D = U(A.placement);
|
|
1547
1536
|
return D === w || // Create a bias to the `y` side axis due to horizontal
|
|
1548
1537
|
// reading directions favoring greater width.
|
|
1549
1538
|
D === "y";
|
|
1550
1539
|
}
|
|
1551
1540
|
return !0;
|
|
1552
|
-
}).map((
|
|
1541
|
+
}).map((A) => [A.placement, A.overflows.filter((D) => D > 0).reduce((D, z) => D + z, 0)]).sort((A, D) => A[1] - D[1])[0]) == null ? void 0 : T[0];
|
|
1553
1542
|
L && (k = L);
|
|
1554
1543
|
break;
|
|
1555
1544
|
}
|
|
@@ -1568,7 +1557,7 @@ const Vo = (e) => ({
|
|
|
1568
1557
|
}
|
|
1569
1558
|
};
|
|
1570
1559
|
};
|
|
1571
|
-
function
|
|
1560
|
+
function Mt(e, t) {
|
|
1572
1561
|
return {
|
|
1573
1562
|
top: e.top - t.height,
|
|
1574
1563
|
right: e.right - t.width,
|
|
@@ -1576,10 +1565,10 @@ function Ft(e, t) {
|
|
|
1576
1565
|
left: e.left - t.width
|
|
1577
1566
|
};
|
|
1578
1567
|
}
|
|
1579
|
-
function
|
|
1580
|
-
return
|
|
1568
|
+
function Tt(e) {
|
|
1569
|
+
return Ro.some((t) => e[t] >= 0);
|
|
1581
1570
|
}
|
|
1582
|
-
const
|
|
1571
|
+
const Wo = function(e) {
|
|
1583
1572
|
return e === void 0 && (e = {}), {
|
|
1584
1573
|
name: "hide",
|
|
1585
1574
|
options: e,
|
|
@@ -1589,17 +1578,17 @@ const zo = function(e) {
|
|
|
1589
1578
|
} = t, {
|
|
1590
1579
|
strategy: r = "referenceHidden",
|
|
1591
1580
|
...o
|
|
1592
|
-
} =
|
|
1581
|
+
} = X(e, t);
|
|
1593
1582
|
switch (r) {
|
|
1594
1583
|
case "referenceHidden": {
|
|
1595
1584
|
const i = await ye(t, {
|
|
1596
1585
|
...o,
|
|
1597
1586
|
elementContext: "reference"
|
|
1598
|
-
}), s =
|
|
1587
|
+
}), s = Mt(i, n.reference);
|
|
1599
1588
|
return {
|
|
1600
1589
|
data: {
|
|
1601
1590
|
referenceHiddenOffsets: s,
|
|
1602
|
-
referenceHidden:
|
|
1591
|
+
referenceHidden: Tt(s)
|
|
1603
1592
|
}
|
|
1604
1593
|
};
|
|
1605
1594
|
}
|
|
@@ -1607,11 +1596,11 @@ const zo = function(e) {
|
|
|
1607
1596
|
const i = await ye(t, {
|
|
1608
1597
|
...o,
|
|
1609
1598
|
altBoundary: !0
|
|
1610
|
-
}), s =
|
|
1599
|
+
}), s = Mt(i, n.floating);
|
|
1611
1600
|
return {
|
|
1612
1601
|
data: {
|
|
1613
1602
|
escapedOffsets: s,
|
|
1614
|
-
escaped:
|
|
1603
|
+
escaped: Tt(s)
|
|
1615
1604
|
}
|
|
1616
1605
|
};
|
|
1617
1606
|
}
|
|
@@ -1621,16 +1610,16 @@ const zo = function(e) {
|
|
|
1621
1610
|
}
|
|
1622
1611
|
};
|
|
1623
1612
|
};
|
|
1624
|
-
async function
|
|
1613
|
+
async function Bo(e, t) {
|
|
1625
1614
|
const {
|
|
1626
1615
|
placement: n,
|
|
1627
1616
|
platform: r,
|
|
1628
1617
|
elements: o
|
|
1629
|
-
} = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = Z(n), c =
|
|
1618
|
+
} = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = Z(n), c = he(n), u = U(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, f = i && u ? -1 : 1, d = X(t, e);
|
|
1630
1619
|
let {
|
|
1631
|
-
mainAxis:
|
|
1632
|
-
crossAxis:
|
|
1633
|
-
alignmentAxis:
|
|
1620
|
+
mainAxis: m,
|
|
1621
|
+
crossAxis: h,
|
|
1622
|
+
alignmentAxis: v
|
|
1634
1623
|
} = typeof d == "number" ? {
|
|
1635
1624
|
mainAxis: d,
|
|
1636
1625
|
crossAxis: 0,
|
|
@@ -1640,15 +1629,15 @@ async function jo(e, t) {
|
|
|
1640
1629
|
crossAxis: d.crossAxis || 0,
|
|
1641
1630
|
alignmentAxis: d.alignmentAxis
|
|
1642
1631
|
};
|
|
1643
|
-
return c && typeof
|
|
1644
|
-
x:
|
|
1645
|
-
y:
|
|
1632
|
+
return c && typeof v == "number" && (h = c === "end" ? v * -1 : v), u ? {
|
|
1633
|
+
x: h * f,
|
|
1634
|
+
y: m * l
|
|
1646
1635
|
} : {
|
|
1647
|
-
x:
|
|
1648
|
-
y:
|
|
1636
|
+
x: m * l,
|
|
1637
|
+
y: h * f
|
|
1649
1638
|
};
|
|
1650
1639
|
}
|
|
1651
|
-
const
|
|
1640
|
+
const $o = function(e) {
|
|
1652
1641
|
return e === void 0 && (e = 0), {
|
|
1653
1642
|
name: "offset",
|
|
1654
1643
|
options: e,
|
|
@@ -1659,7 +1648,7 @@ const Yo = function(e) {
|
|
|
1659
1648
|
y: i,
|
|
1660
1649
|
placement: s,
|
|
1661
1650
|
middlewareData: c
|
|
1662
|
-
} = t, u = await
|
|
1651
|
+
} = t, u = await Bo(t, e);
|
|
1663
1652
|
return s === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
|
|
1664
1653
|
x: o + u.x,
|
|
1665
1654
|
y: i + u.y,
|
|
@@ -1670,7 +1659,7 @@ const Yo = function(e) {
|
|
|
1670
1659
|
};
|
|
1671
1660
|
}
|
|
1672
1661
|
};
|
|
1673
|
-
},
|
|
1662
|
+
}, Ho = function(e) {
|
|
1674
1663
|
return e === void 0 && (e = {}), {
|
|
1675
1664
|
name: "shift",
|
|
1676
1665
|
options: e,
|
|
@@ -1683,11 +1672,11 @@ const Yo = function(e) {
|
|
|
1683
1672
|
mainAxis: i = !0,
|
|
1684
1673
|
crossAxis: s = !1,
|
|
1685
1674
|
limiter: c = {
|
|
1686
|
-
fn: (
|
|
1675
|
+
fn: (g) => {
|
|
1687
1676
|
let {
|
|
1688
1677
|
x: y,
|
|
1689
1678
|
y: w
|
|
1690
|
-
} =
|
|
1679
|
+
} = g;
|
|
1691
1680
|
return {
|
|
1692
1681
|
x: y,
|
|
1693
1682
|
y: w
|
|
@@ -1695,38 +1684,38 @@ const Yo = function(e) {
|
|
|
1695
1684
|
}
|
|
1696
1685
|
},
|
|
1697
1686
|
...u
|
|
1698
|
-
} =
|
|
1687
|
+
} = X(e, t), l = {
|
|
1699
1688
|
x: n,
|
|
1700
1689
|
y: r
|
|
1701
|
-
}, f = await ye(t, u), d =
|
|
1702
|
-
let
|
|
1690
|
+
}, f = await ye(t, u), d = U(Z(o)), m = ot(d);
|
|
1691
|
+
let h = l[m], v = l[d];
|
|
1703
1692
|
if (i) {
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1693
|
+
const g = m === "y" ? "top" : "left", y = m === "y" ? "bottom" : "right", w = h + f[g], x = h - f[y];
|
|
1694
|
+
h = et(w, h, x);
|
|
1706
1695
|
}
|
|
1707
1696
|
if (s) {
|
|
1708
|
-
const
|
|
1709
|
-
|
|
1697
|
+
const g = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", w = v + f[g], x = v - f[y];
|
|
1698
|
+
v = et(w, v, x);
|
|
1710
1699
|
}
|
|
1711
|
-
const
|
|
1700
|
+
const p = c.fn({
|
|
1712
1701
|
...t,
|
|
1713
|
-
[
|
|
1714
|
-
[d]:
|
|
1702
|
+
[m]: h,
|
|
1703
|
+
[d]: v
|
|
1715
1704
|
});
|
|
1716
1705
|
return {
|
|
1717
|
-
...
|
|
1706
|
+
...p,
|
|
1718
1707
|
data: {
|
|
1719
|
-
x:
|
|
1720
|
-
y:
|
|
1708
|
+
x: p.x - n,
|
|
1709
|
+
y: p.y - r,
|
|
1721
1710
|
enabled: {
|
|
1722
|
-
[
|
|
1711
|
+
[m]: i,
|
|
1723
1712
|
[d]: s
|
|
1724
1713
|
}
|
|
1725
1714
|
}
|
|
1726
1715
|
};
|
|
1727
1716
|
}
|
|
1728
1717
|
};
|
|
1729
|
-
},
|
|
1718
|
+
}, zo = function(e) {
|
|
1730
1719
|
return e === void 0 && (e = {}), {
|
|
1731
1720
|
options: e,
|
|
1732
1721
|
fn(t) {
|
|
@@ -1740,35 +1729,35 @@ const Yo = function(e) {
|
|
|
1740
1729
|
offset: c = 0,
|
|
1741
1730
|
mainAxis: u = !0,
|
|
1742
1731
|
crossAxis: l = !0
|
|
1743
|
-
} =
|
|
1732
|
+
} = X(e, t), f = {
|
|
1744
1733
|
x: n,
|
|
1745
1734
|
y: r
|
|
1746
|
-
}, d =
|
|
1747
|
-
let
|
|
1748
|
-
const
|
|
1749
|
-
mainAxis:
|
|
1735
|
+
}, d = U(o), m = ot(d);
|
|
1736
|
+
let h = f[m], v = f[d];
|
|
1737
|
+
const p = X(c, t), g = typeof p == "number" ? {
|
|
1738
|
+
mainAxis: p,
|
|
1750
1739
|
crossAxis: 0
|
|
1751
1740
|
} : {
|
|
1752
1741
|
mainAxis: 0,
|
|
1753
1742
|
crossAxis: 0,
|
|
1754
|
-
...
|
|
1743
|
+
...p
|
|
1755
1744
|
};
|
|
1756
1745
|
if (u) {
|
|
1757
|
-
const x =
|
|
1758
|
-
|
|
1746
|
+
const x = m === "y" ? "height" : "width", b = i.reference[m] - i.floating[x] + g.mainAxis, E = i.reference[m] + i.reference[x] - g.mainAxis;
|
|
1747
|
+
h < b ? h = b : h > E && (h = E);
|
|
1759
1748
|
}
|
|
1760
1749
|
if (l) {
|
|
1761
1750
|
var y, w;
|
|
1762
|
-
const x =
|
|
1763
|
-
|
|
1751
|
+
const x = m === "y" ? "width" : "height", b = ["top", "left"].includes(Z(o)), E = i.reference[d] - i.floating[x] + (b && ((y = s.offset) == null ? void 0 : y[d]) || 0) + (b ? 0 : g.crossAxis), S = i.reference[d] + i.reference[x] + (b ? 0 : ((w = s.offset) == null ? void 0 : w[d]) || 0) - (b ? g.crossAxis : 0);
|
|
1752
|
+
v < E ? v = E : v > S && (v = S);
|
|
1764
1753
|
}
|
|
1765
1754
|
return {
|
|
1766
|
-
[
|
|
1767
|
-
[d]:
|
|
1755
|
+
[m]: h,
|
|
1756
|
+
[d]: v
|
|
1768
1757
|
};
|
|
1769
1758
|
}
|
|
1770
1759
|
};
|
|
1771
|
-
},
|
|
1760
|
+
}, Vo = function(e) {
|
|
1772
1761
|
return e === void 0 && (e = {}), {
|
|
1773
1762
|
name: "size",
|
|
1774
1763
|
options: e,
|
|
@@ -1783,17 +1772,17 @@ const Yo = function(e) {
|
|
|
1783
1772
|
apply: u = () => {
|
|
1784
1773
|
},
|
|
1785
1774
|
...l
|
|
1786
|
-
} =
|
|
1787
|
-
width:
|
|
1788
|
-
height:
|
|
1775
|
+
} = X(e, t), f = await ye(t, l), d = Z(o), m = he(o), h = U(o) === "y", {
|
|
1776
|
+
width: v,
|
|
1777
|
+
height: p
|
|
1789
1778
|
} = i.floating;
|
|
1790
|
-
let
|
|
1791
|
-
d === "top" || d === "bottom" ? (
|
|
1792
|
-
const w =
|
|
1779
|
+
let g, y;
|
|
1780
|
+
d === "top" || d === "bottom" ? (g = d, y = m === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (y = d, g = m === "end" ? "top" : "bottom");
|
|
1781
|
+
const w = p - f.top - f.bottom, x = v - f.left - f.right, b = te(p - f[g], w), E = te(v - f[y], x), S = !t.middlewareData.shift;
|
|
1793
1782
|
let P = b, R = E;
|
|
1794
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = x), (r = t.middlewareData.shift) != null && r.enabled.y && (P = w),
|
|
1783
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = x), (r = t.middlewareData.shift) != null && r.enabled.y && (P = w), S && !m) {
|
|
1795
1784
|
const O = W(f.left, 0), _ = W(f.right, 0), F = W(f.top, 0), T = W(f.bottom, 0);
|
|
1796
|
-
|
|
1785
|
+
h ? R = v - 2 * (O !== 0 || _ !== 0 ? O + _ : W(f.left, f.right)) : P = p - 2 * (F !== 0 || T !== 0 ? F + T : W(f.top, f.bottom));
|
|
1797
1786
|
}
|
|
1798
1787
|
await u({
|
|
1799
1788
|
...t,
|
|
@@ -1801,7 +1790,7 @@ const Yo = function(e) {
|
|
|
1801
1790
|
availableHeight: P
|
|
1802
1791
|
});
|
|
1803
1792
|
const M = await s.getDimensions(c.floating);
|
|
1804
|
-
return
|
|
1793
|
+
return v !== M.width || p !== M.height ? {
|
|
1805
1794
|
reset: {
|
|
1806
1795
|
rects: !0
|
|
1807
1796
|
}
|
|
@@ -1809,31 +1798,31 @@ const Yo = function(e) {
|
|
|
1809
1798
|
}
|
|
1810
1799
|
};
|
|
1811
1800
|
};
|
|
1812
|
-
function
|
|
1801
|
+
function We() {
|
|
1813
1802
|
return typeof window < "u";
|
|
1814
1803
|
}
|
|
1815
1804
|
function me(e) {
|
|
1816
|
-
return
|
|
1805
|
+
return on(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1817
1806
|
}
|
|
1818
1807
|
function B(e) {
|
|
1819
1808
|
var t;
|
|
1820
1809
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1821
1810
|
}
|
|
1822
|
-
function
|
|
1811
|
+
function K(e) {
|
|
1823
1812
|
var t;
|
|
1824
|
-
return (t = (
|
|
1813
|
+
return (t = (on(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1825
1814
|
}
|
|
1826
|
-
function
|
|
1827
|
-
return
|
|
1815
|
+
function on(e) {
|
|
1816
|
+
return We() ? e instanceof Node || e instanceof B(e).Node : !1;
|
|
1828
1817
|
}
|
|
1829
1818
|
function $(e) {
|
|
1830
|
-
return
|
|
1819
|
+
return We() ? e instanceof Element || e instanceof B(e).Element : !1;
|
|
1831
1820
|
}
|
|
1832
1821
|
function Y(e) {
|
|
1833
|
-
return
|
|
1822
|
+
return We() ? e instanceof HTMLElement || e instanceof B(e).HTMLElement : !1;
|
|
1834
1823
|
}
|
|
1835
|
-
function
|
|
1836
|
-
return !
|
|
1824
|
+
function kt(e) {
|
|
1825
|
+
return !We() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof B(e).ShadowRoot;
|
|
1837
1826
|
}
|
|
1838
1827
|
function xe(e) {
|
|
1839
1828
|
const {
|
|
@@ -1844,10 +1833,10 @@ function xe(e) {
|
|
|
1844
1833
|
} = H(e);
|
|
1845
1834
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
|
|
1846
1835
|
}
|
|
1847
|
-
function
|
|
1836
|
+
function Uo(e) {
|
|
1848
1837
|
return ["table", "td", "th"].includes(me(e));
|
|
1849
1838
|
}
|
|
1850
|
-
function
|
|
1839
|
+
function Be(e) {
|
|
1851
1840
|
return [":popover-open", ":modal"].some((t) => {
|
|
1852
1841
|
try {
|
|
1853
1842
|
return e.matches(t);
|
|
@@ -1856,22 +1845,22 @@ function $e(e) {
|
|
|
1856
1845
|
}
|
|
1857
1846
|
});
|
|
1858
1847
|
}
|
|
1859
|
-
function
|
|
1860
|
-
const t =
|
|
1848
|
+
function ct(e) {
|
|
1849
|
+
const t = at(), n = $(e) ? H(e) : e;
|
|
1861
1850
|
return ["transform", "translate", "scale", "rotate", "perspective"].some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
|
|
1862
1851
|
}
|
|
1863
|
-
function
|
|
1852
|
+
function jo(e) {
|
|
1864
1853
|
let t = ne(e);
|
|
1865
1854
|
for (; Y(t) && !de(t); ) {
|
|
1866
|
-
if (
|
|
1855
|
+
if (ct(t))
|
|
1867
1856
|
return t;
|
|
1868
|
-
if (
|
|
1857
|
+
if (Be(t))
|
|
1869
1858
|
return null;
|
|
1870
1859
|
t = ne(t);
|
|
1871
1860
|
}
|
|
1872
1861
|
return null;
|
|
1873
1862
|
}
|
|
1874
|
-
function
|
|
1863
|
+
function at() {
|
|
1875
1864
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1876
1865
|
}
|
|
1877
1866
|
function de(e) {
|
|
@@ -1880,7 +1869,7 @@ function de(e) {
|
|
|
1880
1869
|
function H(e) {
|
|
1881
1870
|
return B(e).getComputedStyle(e);
|
|
1882
1871
|
}
|
|
1883
|
-
function
|
|
1872
|
+
function $e(e) {
|
|
1884
1873
|
return $(e) ? {
|
|
1885
1874
|
scrollLeft: e.scrollLeft,
|
|
1886
1875
|
scrollTop: e.scrollTop
|
|
@@ -1896,112 +1885,112 @@ function ne(e) {
|
|
|
1896
1885
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1897
1886
|
e.assignedSlot || // DOM Element detected.
|
|
1898
1887
|
e.parentNode || // ShadowRoot detected.
|
|
1899
|
-
|
|
1900
|
-
|
|
1888
|
+
kt(e) && e.host || // Fallback.
|
|
1889
|
+
K(e)
|
|
1901
1890
|
);
|
|
1902
|
-
return
|
|
1891
|
+
return kt(t) ? t.host : t;
|
|
1903
1892
|
}
|
|
1904
|
-
function
|
|
1893
|
+
function sn(e) {
|
|
1905
1894
|
const t = ne(e);
|
|
1906
|
-
return de(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Y(t) && xe(t) ? t :
|
|
1895
|
+
return de(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Y(t) && xe(t) ? t : sn(t);
|
|
1907
1896
|
}
|
|
1908
1897
|
function we(e, t, n) {
|
|
1909
1898
|
var r;
|
|
1910
1899
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1911
|
-
const o =
|
|
1900
|
+
const o = sn(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = B(o);
|
|
1912
1901
|
if (i) {
|
|
1913
|
-
const c =
|
|
1902
|
+
const c = nt(s);
|
|
1914
1903
|
return t.concat(s, s.visualViewport || [], xe(o) ? o : [], c && n ? we(c) : []);
|
|
1915
1904
|
}
|
|
1916
1905
|
return t.concat(o, we(o, [], n));
|
|
1917
1906
|
}
|
|
1918
|
-
function
|
|
1907
|
+
function nt(e) {
|
|
1919
1908
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1920
1909
|
}
|
|
1921
|
-
function
|
|
1910
|
+
function cn(e) {
|
|
1922
1911
|
const t = H(e);
|
|
1923
1912
|
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
1924
|
-
const o = Y(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c =
|
|
1913
|
+
const o = Y(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c = Le(n) !== i || Le(r) !== s;
|
|
1925
1914
|
return c && (n = i, r = s), {
|
|
1926
1915
|
width: n,
|
|
1927
1916
|
height: r,
|
|
1928
1917
|
$: c
|
|
1929
1918
|
};
|
|
1930
1919
|
}
|
|
1931
|
-
function
|
|
1920
|
+
function lt(e) {
|
|
1932
1921
|
return $(e) ? e : e.contextElement;
|
|
1933
1922
|
}
|
|
1934
1923
|
function ue(e) {
|
|
1935
|
-
const t =
|
|
1924
|
+
const t = lt(e);
|
|
1936
1925
|
if (!Y(t))
|
|
1937
1926
|
return j(1);
|
|
1938
1927
|
const n = t.getBoundingClientRect(), {
|
|
1939
1928
|
width: r,
|
|
1940
1929
|
height: o,
|
|
1941
1930
|
$: i
|
|
1942
|
-
} =
|
|
1943
|
-
let s = (i ?
|
|
1931
|
+
} = cn(t);
|
|
1932
|
+
let s = (i ? Le(n.width) : n.width) / r, c = (i ? Le(n.height) : n.height) / o;
|
|
1944
1933
|
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
1945
1934
|
x: s,
|
|
1946
1935
|
y: c
|
|
1947
1936
|
};
|
|
1948
1937
|
}
|
|
1949
|
-
const
|
|
1950
|
-
function
|
|
1938
|
+
const Yo = /* @__PURE__ */ j(0);
|
|
1939
|
+
function an(e) {
|
|
1951
1940
|
const t = B(e);
|
|
1952
|
-
return !
|
|
1941
|
+
return !at() || !t.visualViewport ? Yo : {
|
|
1953
1942
|
x: t.visualViewport.offsetLeft,
|
|
1954
1943
|
y: t.visualViewport.offsetTop
|
|
1955
1944
|
};
|
|
1956
1945
|
}
|
|
1957
|
-
function
|
|
1946
|
+
function Ko(e, t, n) {
|
|
1958
1947
|
return t === void 0 && (t = !1), !n || t && n !== B(e) ? !1 : t;
|
|
1959
1948
|
}
|
|
1960
1949
|
function ie(e, t, n, r) {
|
|
1961
1950
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1962
|
-
const o = e.getBoundingClientRect(), i =
|
|
1951
|
+
const o = e.getBoundingClientRect(), i = lt(e);
|
|
1963
1952
|
let s = j(1);
|
|
1964
1953
|
t && (r ? $(r) && (s = ue(r)) : s = ue(e));
|
|
1965
|
-
const c =
|
|
1954
|
+
const c = Ko(i, n, r) ? an(i) : j(0);
|
|
1966
1955
|
let u = (o.left + c.x) / s.x, l = (o.top + c.y) / s.y, f = o.width / s.x, d = o.height / s.y;
|
|
1967
1956
|
if (i) {
|
|
1968
|
-
const
|
|
1969
|
-
let
|
|
1970
|
-
for (;
|
|
1971
|
-
const
|
|
1972
|
-
u *=
|
|
1957
|
+
const m = B(i), h = r && $(r) ? B(r) : r;
|
|
1958
|
+
let v = m, p = nt(v);
|
|
1959
|
+
for (; p && r && h !== v; ) {
|
|
1960
|
+
const g = ue(p), y = p.getBoundingClientRect(), w = H(p), x = y.left + (p.clientLeft + parseFloat(w.paddingLeft)) * g.x, b = y.top + (p.clientTop + parseFloat(w.paddingTop)) * g.y;
|
|
1961
|
+
u *= g.x, l *= g.y, f *= g.x, d *= g.y, u += x, l += b, v = B(p), p = nt(v);
|
|
1973
1962
|
}
|
|
1974
1963
|
}
|
|
1975
|
-
return
|
|
1964
|
+
return _e({
|
|
1976
1965
|
width: f,
|
|
1977
1966
|
height: d,
|
|
1978
1967
|
x: u,
|
|
1979
1968
|
y: l
|
|
1980
1969
|
});
|
|
1981
1970
|
}
|
|
1982
|
-
function
|
|
1983
|
-
const n =
|
|
1984
|
-
return t ? t.left + n : ie(
|
|
1971
|
+
function ut(e, t) {
|
|
1972
|
+
const n = $e(e).scrollLeft;
|
|
1973
|
+
return t ? t.left + n : ie(K(e)).left + n;
|
|
1985
1974
|
}
|
|
1986
|
-
function
|
|
1975
|
+
function ln(e, t, n) {
|
|
1987
1976
|
n === void 0 && (n = !1);
|
|
1988
1977
|
const r = e.getBoundingClientRect(), o = r.left + t.scrollLeft - (n ? 0 : (
|
|
1989
1978
|
// RTL <body> scrollbar.
|
|
1990
|
-
|
|
1979
|
+
ut(e, r)
|
|
1991
1980
|
)), i = r.top + t.scrollTop;
|
|
1992
1981
|
return {
|
|
1993
1982
|
x: o,
|
|
1994
1983
|
y: i
|
|
1995
1984
|
};
|
|
1996
1985
|
}
|
|
1997
|
-
function
|
|
1986
|
+
function Xo(e) {
|
|
1998
1987
|
let {
|
|
1999
1988
|
elements: t,
|
|
2000
1989
|
rect: n,
|
|
2001
1990
|
offsetParent: r,
|
|
2002
1991
|
strategy: o
|
|
2003
1992
|
} = e;
|
|
2004
|
-
const i = o === "fixed", s =
|
|
1993
|
+
const i = o === "fixed", s = K(r), c = t ? Be(t.floating) : !1;
|
|
2005
1994
|
if (r === s || c && i)
|
|
2006
1995
|
return n;
|
|
2007
1996
|
let u = {
|
|
@@ -2009,24 +1998,24 @@ function ei(e) {
|
|
|
2009
1998
|
scrollTop: 0
|
|
2010
1999
|
}, l = j(1);
|
|
2011
2000
|
const f = j(0), d = Y(r);
|
|
2012
|
-
if ((d || !d && !i) && ((me(r) !== "body" || xe(s)) && (u =
|
|
2013
|
-
const
|
|
2014
|
-
l = ue(r), f.x =
|
|
2001
|
+
if ((d || !d && !i) && ((me(r) !== "body" || xe(s)) && (u = $e(r)), Y(r))) {
|
|
2002
|
+
const h = ie(r);
|
|
2003
|
+
l = ue(r), f.x = h.x + r.clientLeft, f.y = h.y + r.clientTop;
|
|
2015
2004
|
}
|
|
2016
|
-
const
|
|
2005
|
+
const m = s && !d && !i ? ln(s, u, !0) : j(0);
|
|
2017
2006
|
return {
|
|
2018
2007
|
width: n.width * l.x,
|
|
2019
2008
|
height: n.height * l.y,
|
|
2020
|
-
x: n.x * l.x - u.scrollLeft * l.x + f.x +
|
|
2021
|
-
y: n.y * l.y - u.scrollTop * l.y + f.y +
|
|
2009
|
+
x: n.x * l.x - u.scrollLeft * l.x + f.x + m.x,
|
|
2010
|
+
y: n.y * l.y - u.scrollTop * l.y + f.y + m.y
|
|
2022
2011
|
};
|
|
2023
2012
|
}
|
|
2024
|
-
function
|
|
2013
|
+
function Zo(e) {
|
|
2025
2014
|
return Array.from(e.getClientRects());
|
|
2026
2015
|
}
|
|
2027
|
-
function
|
|
2028
|
-
const t =
|
|
2029
|
-
let s = -n.scrollLeft +
|
|
2016
|
+
function Go(e) {
|
|
2017
|
+
const t = K(e), n = $e(e), r = e.ownerDocument.body, o = W(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = W(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
2018
|
+
let s = -n.scrollLeft + ut(e);
|
|
2030
2019
|
const c = -n.scrollTop;
|
|
2031
2020
|
return H(r).direction === "rtl" && (s += W(t.clientWidth, r.clientWidth) - o), {
|
|
2032
2021
|
width: o,
|
|
@@ -2035,12 +2024,12 @@ function ni(e) {
|
|
|
2035
2024
|
y: c
|
|
2036
2025
|
};
|
|
2037
2026
|
}
|
|
2038
|
-
function
|
|
2039
|
-
const n = B(e), r =
|
|
2027
|
+
function qo(e, t) {
|
|
2028
|
+
const n = B(e), r = K(e), o = n.visualViewport;
|
|
2040
2029
|
let i = r.clientWidth, s = r.clientHeight, c = 0, u = 0;
|
|
2041
2030
|
if (o) {
|
|
2042
2031
|
i = o.width, s = o.height;
|
|
2043
|
-
const l =
|
|
2032
|
+
const l = at();
|
|
2044
2033
|
(!l || l && t === "fixed") && (c = o.offsetLeft, u = o.offsetTop);
|
|
2045
2034
|
}
|
|
2046
2035
|
return {
|
|
@@ -2050,7 +2039,7 @@ function ri(e, t) {
|
|
|
2050
2039
|
y: u
|
|
2051
2040
|
};
|
|
2052
2041
|
}
|
|
2053
|
-
function
|
|
2042
|
+
function Qo(e, t) {
|
|
2054
2043
|
const n = ie(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = Y(e) ? ue(e) : j(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, u = o * i.x, l = r * i.y;
|
|
2055
2044
|
return {
|
|
2056
2045
|
width: s,
|
|
@@ -2059,16 +2048,16 @@ function oi(e, t) {
|
|
|
2059
2048
|
y: l
|
|
2060
2049
|
};
|
|
2061
2050
|
}
|
|
2062
|
-
function
|
|
2051
|
+
function Lt(e, t, n) {
|
|
2063
2052
|
let r;
|
|
2064
2053
|
if (t === "viewport")
|
|
2065
|
-
r =
|
|
2054
|
+
r = qo(e, n);
|
|
2066
2055
|
else if (t === "document")
|
|
2067
|
-
r =
|
|
2056
|
+
r = Go(K(e));
|
|
2068
2057
|
else if ($(t))
|
|
2069
|
-
r =
|
|
2058
|
+
r = Qo(t, n);
|
|
2070
2059
|
else {
|
|
2071
|
-
const o =
|
|
2060
|
+
const o = an(e);
|
|
2072
2061
|
r = {
|
|
2073
2062
|
x: t.x - o.x,
|
|
2074
2063
|
y: t.y - o.y,
|
|
@@ -2076,13 +2065,13 @@ function Bt(e, t, n) {
|
|
|
2076
2065
|
height: t.height
|
|
2077
2066
|
};
|
|
2078
2067
|
}
|
|
2079
|
-
return
|
|
2068
|
+
return _e(r);
|
|
2080
2069
|
}
|
|
2081
|
-
function
|
|
2070
|
+
function un(e, t) {
|
|
2082
2071
|
const n = ne(e);
|
|
2083
|
-
return n === t || !$(n) || de(n) ? !1 : H(n).position === "fixed" ||
|
|
2072
|
+
return n === t || !$(n) || de(n) ? !1 : H(n).position === "fixed" || un(n, t);
|
|
2084
2073
|
}
|
|
2085
|
-
function
|
|
2074
|
+
function Jo(e, t) {
|
|
2086
2075
|
const n = t.get(e);
|
|
2087
2076
|
if (n)
|
|
2088
2077
|
return n;
|
|
@@ -2090,22 +2079,22 @@ function ii(e, t) {
|
|
|
2090
2079
|
const i = H(e).position === "fixed";
|
|
2091
2080
|
let s = i ? ne(e) : e;
|
|
2092
2081
|
for (; $(s) && !de(s); ) {
|
|
2093
|
-
const c = H(s), u =
|
|
2094
|
-
!u && c.position === "fixed" && (o = null), (i ? !u && !o : !u && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || xe(s) && !u &&
|
|
2082
|
+
const c = H(s), u = ct(s);
|
|
2083
|
+
!u && c.position === "fixed" && (o = null), (i ? !u && !o : !u && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || xe(s) && !u && un(e, s)) ? r = r.filter((f) => f !== s) : o = c, s = ne(s);
|
|
2095
2084
|
}
|
|
2096
2085
|
return t.set(e, r), r;
|
|
2097
2086
|
}
|
|
2098
|
-
function
|
|
2087
|
+
function ei(e) {
|
|
2099
2088
|
let {
|
|
2100
2089
|
element: t,
|
|
2101
2090
|
boundary: n,
|
|
2102
2091
|
rootBoundary: r,
|
|
2103
2092
|
strategy: o
|
|
2104
2093
|
} = e;
|
|
2105
|
-
const s = [...n === "clippingAncestors" ?
|
|
2106
|
-
const d =
|
|
2094
|
+
const s = [...n === "clippingAncestors" ? Be(t) ? [] : Jo(t, this._c) : [].concat(n), r], c = s[0], u = s.reduce((l, f) => {
|
|
2095
|
+
const d = Lt(t, f, o);
|
|
2107
2096
|
return l.top = W(d.top, l.top), l.right = te(d.right, l.right), l.bottom = te(d.bottom, l.bottom), l.left = W(d.left, l.left), l;
|
|
2108
|
-
},
|
|
2097
|
+
}, Lt(t, c, o));
|
|
2109
2098
|
return {
|
|
2110
2099
|
width: u.right - u.left,
|
|
2111
2100
|
height: u.bottom - u.top,
|
|
@@ -2113,73 +2102,73 @@ function si(e) {
|
|
|
2113
2102
|
y: u.top
|
|
2114
2103
|
};
|
|
2115
2104
|
}
|
|
2116
|
-
function
|
|
2105
|
+
function ti(e) {
|
|
2117
2106
|
const {
|
|
2118
2107
|
width: t,
|
|
2119
2108
|
height: n
|
|
2120
|
-
} =
|
|
2109
|
+
} = cn(e);
|
|
2121
2110
|
return {
|
|
2122
2111
|
width: t,
|
|
2123
2112
|
height: n
|
|
2124
2113
|
};
|
|
2125
2114
|
}
|
|
2126
|
-
function
|
|
2127
|
-
const r = Y(t), o =
|
|
2115
|
+
function ni(e, t, n) {
|
|
2116
|
+
const r = Y(t), o = K(t), i = n === "fixed", s = ie(e, !0, i, t);
|
|
2128
2117
|
let c = {
|
|
2129
2118
|
scrollLeft: 0,
|
|
2130
2119
|
scrollTop: 0
|
|
2131
2120
|
};
|
|
2132
2121
|
const u = j(0);
|
|
2133
2122
|
function l() {
|
|
2134
|
-
u.x =
|
|
2123
|
+
u.x = ut(o);
|
|
2135
2124
|
}
|
|
2136
2125
|
if (r || !r && !i)
|
|
2137
|
-
if ((me(t) !== "body" || xe(o)) && (c =
|
|
2138
|
-
const
|
|
2139
|
-
u.x =
|
|
2126
|
+
if ((me(t) !== "body" || xe(o)) && (c = $e(t)), r) {
|
|
2127
|
+
const h = ie(t, !0, i, t);
|
|
2128
|
+
u.x = h.x + t.clientLeft, u.y = h.y + t.clientTop;
|
|
2140
2129
|
} else o && l();
|
|
2141
2130
|
i && !r && o && l();
|
|
2142
|
-
const f = o && !r && !i ?
|
|
2131
|
+
const f = o && !r && !i ? ln(o, c) : j(0), d = s.left + c.scrollLeft - u.x - f.x, m = s.top + c.scrollTop - u.y - f.y;
|
|
2143
2132
|
return {
|
|
2144
2133
|
x: d,
|
|
2145
|
-
y:
|
|
2134
|
+
y: m,
|
|
2146
2135
|
width: s.width,
|
|
2147
2136
|
height: s.height
|
|
2148
2137
|
};
|
|
2149
2138
|
}
|
|
2150
|
-
function
|
|
2139
|
+
function Ze(e) {
|
|
2151
2140
|
return H(e).position === "static";
|
|
2152
2141
|
}
|
|
2153
|
-
function
|
|
2142
|
+
function Dt(e, t) {
|
|
2154
2143
|
if (!Y(e) || H(e).position === "fixed")
|
|
2155
2144
|
return null;
|
|
2156
2145
|
if (t)
|
|
2157
2146
|
return t(e);
|
|
2158
2147
|
let n = e.offsetParent;
|
|
2159
|
-
return
|
|
2148
|
+
return K(e) === n && (n = n.ownerDocument.body), n;
|
|
2160
2149
|
}
|
|
2161
|
-
function
|
|
2150
|
+
function fn(e, t) {
|
|
2162
2151
|
const n = B(e);
|
|
2163
|
-
if (
|
|
2152
|
+
if (Be(e))
|
|
2164
2153
|
return n;
|
|
2165
2154
|
if (!Y(e)) {
|
|
2166
2155
|
let o = ne(e);
|
|
2167
2156
|
for (; o && !de(o); ) {
|
|
2168
|
-
if ($(o) && !
|
|
2157
|
+
if ($(o) && !Ze(o))
|
|
2169
2158
|
return o;
|
|
2170
2159
|
o = ne(o);
|
|
2171
2160
|
}
|
|
2172
2161
|
return n;
|
|
2173
2162
|
}
|
|
2174
|
-
let r =
|
|
2175
|
-
for (; r &&
|
|
2176
|
-
r =
|
|
2177
|
-
return r && de(r) &&
|
|
2163
|
+
let r = Dt(e, t);
|
|
2164
|
+
for (; r && Uo(r) && Ze(r); )
|
|
2165
|
+
r = Dt(r, t);
|
|
2166
|
+
return r && de(r) && Ze(r) && !ct(r) ? n : r || jo(e) || n;
|
|
2178
2167
|
}
|
|
2179
|
-
const
|
|
2180
|
-
const t = this.getOffsetParent ||
|
|
2168
|
+
const ri = async function(e) {
|
|
2169
|
+
const t = this.getOffsetParent || fn, n = this.getDimensions, r = await n(e.floating);
|
|
2181
2170
|
return {
|
|
2182
|
-
reference:
|
|
2171
|
+
reference: ni(e.reference, await t(e.floating), e.strategy),
|
|
2183
2172
|
floating: {
|
|
2184
2173
|
x: 0,
|
|
2185
2174
|
y: 0,
|
|
@@ -2188,27 +2177,27 @@ const li = async function(e) {
|
|
|
2188
2177
|
}
|
|
2189
2178
|
};
|
|
2190
2179
|
};
|
|
2191
|
-
function
|
|
2180
|
+
function oi(e) {
|
|
2192
2181
|
return H(e).direction === "rtl";
|
|
2193
2182
|
}
|
|
2194
|
-
const
|
|
2195
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
2196
|
-
getDocumentElement:
|
|
2197
|
-
getClippingRect:
|
|
2198
|
-
getOffsetParent:
|
|
2199
|
-
getElementRects:
|
|
2200
|
-
getClientRects:
|
|
2201
|
-
getDimensions:
|
|
2183
|
+
const ii = {
|
|
2184
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Xo,
|
|
2185
|
+
getDocumentElement: K,
|
|
2186
|
+
getClippingRect: ei,
|
|
2187
|
+
getOffsetParent: fn,
|
|
2188
|
+
getElementRects: ri,
|
|
2189
|
+
getClientRects: Zo,
|
|
2190
|
+
getDimensions: ti,
|
|
2202
2191
|
getScale: ue,
|
|
2203
2192
|
isElement: $,
|
|
2204
|
-
isRTL:
|
|
2193
|
+
isRTL: oi
|
|
2205
2194
|
};
|
|
2206
|
-
function
|
|
2195
|
+
function dn(e, t) {
|
|
2207
2196
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
2208
2197
|
}
|
|
2209
|
-
function
|
|
2198
|
+
function si(e, t) {
|
|
2210
2199
|
let n = null, r;
|
|
2211
|
-
const o =
|
|
2200
|
+
const o = K(e);
|
|
2212
2201
|
function i() {
|
|
2213
2202
|
var c;
|
|
2214
2203
|
clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
|
|
@@ -2218,18 +2207,18 @@ function di(e, t) {
|
|
|
2218
2207
|
const l = e.getBoundingClientRect(), {
|
|
2219
2208
|
left: f,
|
|
2220
2209
|
top: d,
|
|
2221
|
-
width:
|
|
2222
|
-
height:
|
|
2210
|
+
width: m,
|
|
2211
|
+
height: h
|
|
2223
2212
|
} = l;
|
|
2224
|
-
if (c || t(), !
|
|
2213
|
+
if (c || t(), !m || !h)
|
|
2225
2214
|
return;
|
|
2226
|
-
const
|
|
2227
|
-
rootMargin: -
|
|
2215
|
+
const v = Ne(d), p = Ne(o.clientWidth - (f + m)), g = Ne(o.clientHeight - (d + h)), y = Ne(f), x = {
|
|
2216
|
+
rootMargin: -v + "px " + -p + "px " + -g + "px " + -y + "px",
|
|
2228
2217
|
threshold: W(0, te(1, u)) || 1
|
|
2229
2218
|
};
|
|
2230
2219
|
let b = !0;
|
|
2231
|
-
function E(
|
|
2232
|
-
const P =
|
|
2220
|
+
function E(S) {
|
|
2221
|
+
const P = S[0].intersectionRatio;
|
|
2233
2222
|
if (P !== u) {
|
|
2234
2223
|
if (!b)
|
|
2235
2224
|
return s();
|
|
@@ -2237,7 +2226,7 @@ function di(e, t) {
|
|
|
2237
2226
|
s(!1, 1e-7);
|
|
2238
2227
|
}, 1e3);
|
|
2239
2228
|
}
|
|
2240
|
-
P === 1 && !
|
|
2229
|
+
P === 1 && !dn(l, e.getBoundingClientRect()) && s(), b = !1;
|
|
2241
2230
|
}
|
|
2242
2231
|
try {
|
|
2243
2232
|
n = new IntersectionObserver(E, {
|
|
@@ -2252,7 +2241,7 @@ function di(e, t) {
|
|
|
2252
2241
|
}
|
|
2253
2242
|
return s(!0), i;
|
|
2254
2243
|
}
|
|
2255
|
-
function
|
|
2244
|
+
function ci(e, t, n, r) {
|
|
2256
2245
|
r === void 0 && (r = {});
|
|
2257
2246
|
const {
|
|
2258
2247
|
ancestorScroll: o = !0,
|
|
@@ -2260,50 +2249,50 @@ function hi(e, t, n, r) {
|
|
|
2260
2249
|
elementResize: s = typeof ResizeObserver == "function",
|
|
2261
2250
|
layoutShift: c = typeof IntersectionObserver == "function",
|
|
2262
2251
|
animationFrame: u = !1
|
|
2263
|
-
} = r, l =
|
|
2252
|
+
} = r, l = lt(e), f = o || i ? [...l ? we(l) : [], ...we(t)] : [];
|
|
2264
2253
|
f.forEach((y) => {
|
|
2265
2254
|
o && y.addEventListener("scroll", n, {
|
|
2266
2255
|
passive: !0
|
|
2267
2256
|
}), i && y.addEventListener("resize", n);
|
|
2268
2257
|
});
|
|
2269
|
-
const d = l && c ?
|
|
2270
|
-
let
|
|
2271
|
-
s && (
|
|
2258
|
+
const d = l && c ? si(l, n) : null;
|
|
2259
|
+
let m = -1, h = null;
|
|
2260
|
+
s && (h = new ResizeObserver((y) => {
|
|
2272
2261
|
let [w] = y;
|
|
2273
|
-
w && w.target === l &&
|
|
2262
|
+
w && w.target === l && h && (h.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
2274
2263
|
var x;
|
|
2275
|
-
(x =
|
|
2264
|
+
(x = h) == null || x.observe(t);
|
|
2276
2265
|
})), n();
|
|
2277
|
-
}), l && !u &&
|
|
2278
|
-
let
|
|
2279
|
-
u &&
|
|
2280
|
-
function
|
|
2266
|
+
}), l && !u && h.observe(l), h.observe(t));
|
|
2267
|
+
let v, p = u ? ie(e) : null;
|
|
2268
|
+
u && g();
|
|
2269
|
+
function g() {
|
|
2281
2270
|
const y = ie(e);
|
|
2282
|
-
|
|
2271
|
+
p && !dn(p, y) && n(), p = y, v = requestAnimationFrame(g);
|
|
2283
2272
|
}
|
|
2284
2273
|
return n(), () => {
|
|
2285
2274
|
var y;
|
|
2286
2275
|
f.forEach((w) => {
|
|
2287
2276
|
o && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
|
|
2288
|
-
}), d
|
|
2277
|
+
}), d?.(), (y = h) == null || y.disconnect(), h = null, u && cancelAnimationFrame(v);
|
|
2289
2278
|
};
|
|
2290
2279
|
}
|
|
2291
|
-
const
|
|
2280
|
+
const ai = $o, li = Ho, ui = Io, fi = Vo, di = Wo, _t = Fo, pi = zo, hi = (e, t, n) => {
|
|
2292
2281
|
const r = /* @__PURE__ */ new Map(), o = {
|
|
2293
|
-
platform:
|
|
2282
|
+
platform: ii,
|
|
2294
2283
|
...n
|
|
2295
2284
|
}, i = {
|
|
2296
2285
|
...o.platform,
|
|
2297
2286
|
_c: r
|
|
2298
2287
|
};
|
|
2299
|
-
return
|
|
2288
|
+
return _o(e, t, {
|
|
2300
2289
|
...o,
|
|
2301
2290
|
platform: i
|
|
2302
2291
|
});
|
|
2303
2292
|
};
|
|
2304
|
-
var
|
|
2305
|
-
},
|
|
2306
|
-
function
|
|
2293
|
+
var mi = typeof document < "u", vi = function() {
|
|
2294
|
+
}, ke = mi ? Xn : vi;
|
|
2295
|
+
function Fe(e, t) {
|
|
2307
2296
|
if (e === t)
|
|
2308
2297
|
return !0;
|
|
2309
2298
|
if (typeof e != typeof t)
|
|
@@ -2315,7 +2304,7 @@ function Ie(e, t) {
|
|
|
2315
2304
|
if (Array.isArray(e)) {
|
|
2316
2305
|
if (n = e.length, n !== t.length) return !1;
|
|
2317
2306
|
for (r = n; r-- !== 0; )
|
|
2318
|
-
if (!
|
|
2307
|
+
if (!Fe(e[r], t[r]))
|
|
2319
2308
|
return !1;
|
|
2320
2309
|
return !0;
|
|
2321
2310
|
}
|
|
@@ -2326,27 +2315,27 @@ function Ie(e, t) {
|
|
|
2326
2315
|
return !1;
|
|
2327
2316
|
for (r = n; r-- !== 0; ) {
|
|
2328
2317
|
const i = o[r];
|
|
2329
|
-
if (!(i === "_owner" && e.$$typeof) && !
|
|
2318
|
+
if (!(i === "_owner" && e.$$typeof) && !Fe(e[i], t[i]))
|
|
2330
2319
|
return !1;
|
|
2331
2320
|
}
|
|
2332
2321
|
return !0;
|
|
2333
2322
|
}
|
|
2334
2323
|
return e !== e && t !== t;
|
|
2335
2324
|
}
|
|
2336
|
-
function
|
|
2325
|
+
function pn(e) {
|
|
2337
2326
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
2338
2327
|
}
|
|
2339
|
-
function
|
|
2340
|
-
const n =
|
|
2328
|
+
function Ft(e, t) {
|
|
2329
|
+
const n = pn(e);
|
|
2341
2330
|
return Math.round(t * n) / n;
|
|
2342
2331
|
}
|
|
2343
|
-
function
|
|
2332
|
+
function Ge(e) {
|
|
2344
2333
|
const t = a.useRef(e);
|
|
2345
|
-
return
|
|
2334
|
+
return ke(() => {
|
|
2346
2335
|
t.current = e;
|
|
2347
2336
|
}), t;
|
|
2348
2337
|
}
|
|
2349
|
-
function
|
|
2338
|
+
function gi(e) {
|
|
2350
2339
|
e === void 0 && (e = {});
|
|
2351
2340
|
const {
|
|
2352
2341
|
placement: t = "bottom",
|
|
@@ -2367,22 +2356,22 @@ function Ci(e) {
|
|
|
2367
2356
|
placement: t,
|
|
2368
2357
|
middlewareData: {},
|
|
2369
2358
|
isPositioned: !1
|
|
2370
|
-
}), [
|
|
2371
|
-
|
|
2372
|
-
const [
|
|
2373
|
-
|
|
2374
|
-
}, []), x = a.useCallback((
|
|
2375
|
-
|
|
2376
|
-
}, []), b = i ||
|
|
2377
|
-
if (!
|
|
2359
|
+
}), [m, h] = a.useState(r);
|
|
2360
|
+
Fe(m, r) || h(r);
|
|
2361
|
+
const [v, p] = a.useState(null), [g, y] = a.useState(null), w = a.useCallback((A) => {
|
|
2362
|
+
A !== S.current && (S.current = A, p(A));
|
|
2363
|
+
}, []), x = a.useCallback((A) => {
|
|
2364
|
+
A !== P.current && (P.current = A, y(A));
|
|
2365
|
+
}, []), b = i || v, E = s || g, S = a.useRef(null), P = a.useRef(null), R = a.useRef(f), M = u != null, O = Ge(u), _ = Ge(o), F = Ge(l), T = a.useCallback(() => {
|
|
2366
|
+
if (!S.current || !P.current)
|
|
2378
2367
|
return;
|
|
2379
|
-
const
|
|
2368
|
+
const A = {
|
|
2380
2369
|
placement: t,
|
|
2381
2370
|
strategy: n,
|
|
2382
|
-
middleware:
|
|
2371
|
+
middleware: m
|
|
2383
2372
|
};
|
|
2384
|
-
_.current && (
|
|
2385
|
-
const
|
|
2373
|
+
_.current && (A.platform = _.current), hi(S.current, P.current, A).then((D) => {
|
|
2374
|
+
const z = {
|
|
2386
2375
|
...D,
|
|
2387
2376
|
// The floating element's position may be recomputed while it's closed
|
|
2388
2377
|
// but still mounted (such as when transitioning out). To ensure
|
|
@@ -2390,29 +2379,29 @@ function Ci(e) {
|
|
|
2390
2379
|
// setting it to `true` when `open === false` (must be specified).
|
|
2391
2380
|
isPositioned: F.current !== !1
|
|
2392
2381
|
};
|
|
2393
|
-
N.current && !
|
|
2394
|
-
d(
|
|
2382
|
+
N.current && !Fe(R.current, z) && (R.current = z, Wt.flushSync(() => {
|
|
2383
|
+
d(z);
|
|
2395
2384
|
}));
|
|
2396
2385
|
});
|
|
2397
|
-
}, [
|
|
2398
|
-
|
|
2399
|
-
l === !1 && R.current.isPositioned && (R.current.isPositioned = !1, d((
|
|
2400
|
-
...
|
|
2386
|
+
}, [m, t, n, _, F]);
|
|
2387
|
+
ke(() => {
|
|
2388
|
+
l === !1 && R.current.isPositioned && (R.current.isPositioned = !1, d((A) => ({
|
|
2389
|
+
...A,
|
|
2401
2390
|
isPositioned: !1
|
|
2402
2391
|
})));
|
|
2403
2392
|
}, [l]);
|
|
2404
2393
|
const N = a.useRef(!1);
|
|
2405
|
-
|
|
2394
|
+
ke(() => (N.current = !0, () => {
|
|
2406
2395
|
N.current = !1;
|
|
2407
|
-
}), []),
|
|
2408
|
-
if (b && (
|
|
2396
|
+
}), []), ke(() => {
|
|
2397
|
+
if (b && (S.current = b), E && (P.current = E), b && E) {
|
|
2409
2398
|
if (O.current)
|
|
2410
2399
|
return O.current(b, E, T);
|
|
2411
2400
|
T();
|
|
2412
2401
|
}
|
|
2413
2402
|
}, [b, E, T, O, M]);
|
|
2414
2403
|
const I = a.useMemo(() => ({
|
|
2415
|
-
reference:
|
|
2404
|
+
reference: S,
|
|
2416
2405
|
floating: P,
|
|
2417
2406
|
setReference: w,
|
|
2418
2407
|
setFloating: x
|
|
@@ -2420,24 +2409,24 @@ function Ci(e) {
|
|
|
2420
2409
|
reference: b,
|
|
2421
2410
|
floating: E
|
|
2422
2411
|
}), [b, E]), L = a.useMemo(() => {
|
|
2423
|
-
const
|
|
2412
|
+
const A = {
|
|
2424
2413
|
position: n,
|
|
2425
2414
|
left: 0,
|
|
2426
2415
|
top: 0
|
|
2427
2416
|
};
|
|
2428
2417
|
if (!k.floating)
|
|
2429
|
-
return
|
|
2430
|
-
const D =
|
|
2418
|
+
return A;
|
|
2419
|
+
const D = Ft(k.floating, f.x), z = Ft(k.floating, f.y);
|
|
2431
2420
|
return c ? {
|
|
2432
|
-
...
|
|
2433
|
-
transform: "translate(" + D + "px, " +
|
|
2434
|
-
...
|
|
2421
|
+
...A,
|
|
2422
|
+
transform: "translate(" + D + "px, " + z + "px)",
|
|
2423
|
+
...pn(k.floating) >= 1.5 && {
|
|
2435
2424
|
willChange: "transform"
|
|
2436
2425
|
}
|
|
2437
2426
|
} : {
|
|
2438
2427
|
position: n,
|
|
2439
2428
|
left: D,
|
|
2440
|
-
top:
|
|
2429
|
+
top: z
|
|
2441
2430
|
};
|
|
2442
2431
|
}, [n, c, k.floating, f.x, f.y]);
|
|
2443
2432
|
return a.useMemo(() => ({
|
|
@@ -2448,7 +2437,7 @@ function Ci(e) {
|
|
|
2448
2437
|
floatingStyles: L
|
|
2449
2438
|
}), [f, T, I, k, L]);
|
|
2450
2439
|
}
|
|
2451
|
-
const
|
|
2440
|
+
const yi = (e) => {
|
|
2452
2441
|
function t(n) {
|
|
2453
2442
|
return {}.hasOwnProperty.call(n, "current");
|
|
2454
2443
|
}
|
|
@@ -2460,38 +2449,38 @@ const Pi = (e) => {
|
|
|
2460
2449
|
element: r,
|
|
2461
2450
|
padding: o
|
|
2462
2451
|
} = typeof e == "function" ? e(n) : e;
|
|
2463
|
-
return r && t(r) ? r.current != null ?
|
|
2452
|
+
return r && t(r) ? r.current != null ? _t({
|
|
2464
2453
|
element: r.current,
|
|
2465
2454
|
padding: o
|
|
2466
|
-
}).fn(n) : {} : r ?
|
|
2455
|
+
}).fn(n) : {} : r ? _t({
|
|
2467
2456
|
element: r,
|
|
2468
2457
|
padding: o
|
|
2469
2458
|
}).fn(n) : {};
|
|
2470
2459
|
}
|
|
2471
2460
|
};
|
|
2472
|
-
},
|
|
2473
|
-
...
|
|
2461
|
+
}, wi = (e, t) => ({
|
|
2462
|
+
...ai(e),
|
|
2474
2463
|
options: [e, t]
|
|
2475
|
-
}),
|
|
2476
|
-
...
|
|
2464
|
+
}), bi = (e, t) => ({
|
|
2465
|
+
...li(e),
|
|
2466
|
+
options: [e, t]
|
|
2467
|
+
}), xi = (e, t) => ({
|
|
2468
|
+
...pi(e),
|
|
2477
2469
|
options: [e, t]
|
|
2478
|
-
}),
|
|
2479
|
-
...
|
|
2470
|
+
}), Ei = (e, t) => ({
|
|
2471
|
+
...ui(e),
|
|
2480
2472
|
options: [e, t]
|
|
2481
|
-
}),
|
|
2482
|
-
...
|
|
2473
|
+
}), Ci = (e, t) => ({
|
|
2474
|
+
...fi(e),
|
|
2483
2475
|
options: [e, t]
|
|
2484
|
-
}),
|
|
2485
|
-
...
|
|
2476
|
+
}), Pi = (e, t) => ({
|
|
2477
|
+
...di(e),
|
|
2486
2478
|
options: [e, t]
|
|
2487
|
-
}),
|
|
2479
|
+
}), Si = (e, t) => ({
|
|
2488
2480
|
...yi(e),
|
|
2489
2481
|
options: [e, t]
|
|
2490
|
-
}), Ti = (e, t) => ({
|
|
2491
|
-
...Pi(e),
|
|
2492
|
-
options: [e, t]
|
|
2493
2482
|
});
|
|
2494
|
-
var
|
|
2483
|
+
var Ai = "Arrow", hn = a.forwardRef((e, t) => {
|
|
2495
2484
|
const { children: n, width: r = 10, height: o = 5, ...i } = e;
|
|
2496
2485
|
return /* @__PURE__ */ C(
|
|
2497
2486
|
G.svg,
|
|
@@ -2506,24 +2495,23 @@ var ki = "Arrow", bn = a.forwardRef((e, t) => {
|
|
|
2506
2495
|
}
|
|
2507
2496
|
);
|
|
2508
2497
|
});
|
|
2509
|
-
|
|
2510
|
-
var
|
|
2498
|
+
hn.displayName = Ai;
|
|
2499
|
+
var Ri = hn, ft = "Popper", [mn, vn] = Ht(ft), [Oi, gn] = mn(ft), yn = (e) => {
|
|
2511
2500
|
const { __scopePopper: t, children: n } = e, [r, o] = a.useState(null);
|
|
2512
|
-
return /* @__PURE__ */ C(
|
|
2501
|
+
return /* @__PURE__ */ C(Oi, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
2513
2502
|
};
|
|
2514
|
-
|
|
2515
|
-
var
|
|
2503
|
+
yn.displayName = ft;
|
|
2504
|
+
var wn = "PopperAnchor", bn = a.forwardRef(
|
|
2516
2505
|
(e, t) => {
|
|
2517
|
-
const { __scopePopper: n, virtualRef: r, ...o } = e, i =
|
|
2506
|
+
const { __scopePopper: n, virtualRef: r, ...o } = e, i = gn(wn, n), s = a.useRef(null), c = re(t, s);
|
|
2518
2507
|
return a.useEffect(() => {
|
|
2519
|
-
i.onAnchorChange(
|
|
2508
|
+
i.onAnchorChange(r?.current || s.current);
|
|
2520
2509
|
}), r ? null : /* @__PURE__ */ C(G.div, { ...o, ref: c });
|
|
2521
2510
|
}
|
|
2522
2511
|
);
|
|
2523
|
-
|
|
2524
|
-
var
|
|
2512
|
+
bn.displayName = wn;
|
|
2513
|
+
var dt = "PopperContent", [Ni, Mi] = mn(dt), xn = a.forwardRef(
|
|
2525
2514
|
(e, t) => {
|
|
2526
|
-
var mt, vt, gt, yt, wt, bt;
|
|
2527
2515
|
const {
|
|
2528
2516
|
__scopePopper: n,
|
|
2529
2517
|
side: r = "bottom",
|
|
@@ -2535,52 +2523,52 @@ var ht = "PopperContent", [_i, Fi] = xn(ht), Rn = a.forwardRef(
|
|
|
2535
2523
|
collisionBoundary: l = [],
|
|
2536
2524
|
collisionPadding: f = 0,
|
|
2537
2525
|
sticky: d = "partial",
|
|
2538
|
-
hideWhenDetached:
|
|
2539
|
-
updatePositionStrategy:
|
|
2540
|
-
onPlaced:
|
|
2541
|
-
...
|
|
2542
|
-
} = e,
|
|
2526
|
+
hideWhenDetached: m = !1,
|
|
2527
|
+
updatePositionStrategy: h = "optimized",
|
|
2528
|
+
onPlaced: v,
|
|
2529
|
+
...p
|
|
2530
|
+
} = e, g = gn(dt, n), [y, w] = a.useState(null), x = re(t, (ve) => w(ve)), [b, E] = a.useState(null), S = Ao(b), P = S?.width ?? 0, R = S?.height ?? 0, M = r + (i !== "center" ? "-" + i : ""), O = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, _ = Array.isArray(l) ? l : [l], F = _.length > 0, T = {
|
|
2543
2531
|
padding: O,
|
|
2544
|
-
boundary: _.filter(
|
|
2532
|
+
boundary: _.filter(ki),
|
|
2545
2533
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2546
2534
|
altBoundary: F
|
|
2547
|
-
}, { refs: N, floatingStyles: I, placement: k, isPositioned: L, middlewareData:
|
|
2535
|
+
}, { refs: N, floatingStyles: I, placement: k, isPositioned: L, middlewareData: A } = gi({
|
|
2548
2536
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
2549
2537
|
strategy: "fixed",
|
|
2550
2538
|
placement: M,
|
|
2551
|
-
whileElementsMounted: (...ve) =>
|
|
2552
|
-
animationFrame:
|
|
2539
|
+
whileElementsMounted: (...ve) => ci(...ve, {
|
|
2540
|
+
animationFrame: h === "always"
|
|
2553
2541
|
}),
|
|
2554
2542
|
elements: {
|
|
2555
|
-
reference:
|
|
2543
|
+
reference: g.anchor
|
|
2556
2544
|
},
|
|
2557
2545
|
middleware: [
|
|
2558
|
-
|
|
2559
|
-
u &&
|
|
2546
|
+
wi({ mainAxis: o + R, alignmentAxis: s }),
|
|
2547
|
+
u && bi({
|
|
2560
2548
|
mainAxis: !0,
|
|
2561
2549
|
crossAxis: !1,
|
|
2562
|
-
limiter: d === "partial" ?
|
|
2550
|
+
limiter: d === "partial" ? xi() : void 0,
|
|
2563
2551
|
...T
|
|
2564
2552
|
}),
|
|
2565
|
-
u &&
|
|
2566
|
-
|
|
2553
|
+
u && Ei({ ...T }),
|
|
2554
|
+
Ci({
|
|
2567
2555
|
...T,
|
|
2568
|
-
apply: ({ elements: ve, rects:
|
|
2569
|
-
const { width:
|
|
2570
|
-
|
|
2556
|
+
apply: ({ elements: ve, rects: mt, availableWidth: zn, availableHeight: Vn }) => {
|
|
2557
|
+
const { width: Un, height: jn } = mt.reference, Ce = ve.floating.style;
|
|
2558
|
+
Ce.setProperty("--radix-popper-available-width", `${zn}px`), Ce.setProperty("--radix-popper-available-height", `${Vn}px`), Ce.setProperty("--radix-popper-anchor-width", `${Un}px`), Ce.setProperty("--radix-popper-anchor-height", `${jn}px`);
|
|
2571
2559
|
}
|
|
2572
2560
|
}),
|
|
2573
|
-
b &&
|
|
2574
|
-
|
|
2575
|
-
|
|
2561
|
+
b && Si({ element: b, padding: c }),
|
|
2562
|
+
Li({ arrowWidth: P, arrowHeight: R }),
|
|
2563
|
+
m && Pi({ strategy: "referenceHidden", ...T })
|
|
2576
2564
|
]
|
|
2577
|
-
}), [D,
|
|
2565
|
+
}), [D, z] = Pn(k), ht = fe(v);
|
|
2578
2566
|
ee(() => {
|
|
2579
|
-
L && (
|
|
2580
|
-
}, [L,
|
|
2581
|
-
const
|
|
2567
|
+
L && ht?.();
|
|
2568
|
+
}, [L, ht]);
|
|
2569
|
+
const In = A.arrow?.x, Wn = A.arrow?.y, Bn = A.arrow?.centerOffset !== 0, [$n, Hn] = a.useState();
|
|
2582
2570
|
return ee(() => {
|
|
2583
|
-
y &&
|
|
2571
|
+
y && Hn(window.getComputedStyle(y).zIndex);
|
|
2584
2572
|
}, [y]), /* @__PURE__ */ C(
|
|
2585
2573
|
"div",
|
|
2586
2574
|
{
|
|
@@ -2591,38 +2579,38 @@ var ht = "PopperContent", [_i, Fi] = xn(ht), Rn = a.forwardRef(
|
|
|
2591
2579
|
transform: L ? I.transform : "translate(0, -200%)",
|
|
2592
2580
|
// keep off the page when measuring
|
|
2593
2581
|
minWidth: "max-content",
|
|
2594
|
-
zIndex:
|
|
2582
|
+
zIndex: $n,
|
|
2595
2583
|
"--radix-popper-transform-origin": [
|
|
2596
|
-
|
|
2597
|
-
|
|
2584
|
+
A.transformOrigin?.x,
|
|
2585
|
+
A.transformOrigin?.y
|
|
2598
2586
|
].join(" "),
|
|
2599
2587
|
// hide the content if using the hide middleware and should be hidden
|
|
2600
2588
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
2601
2589
|
// as if the PopperContent isn't there at all
|
|
2602
|
-
...
|
|
2590
|
+
...A.hide?.referenceHidden && {
|
|
2603
2591
|
visibility: "hidden",
|
|
2604
2592
|
pointerEvents: "none"
|
|
2605
2593
|
}
|
|
2606
2594
|
},
|
|
2607
2595
|
dir: e.dir,
|
|
2608
2596
|
children: /* @__PURE__ */ C(
|
|
2609
|
-
|
|
2597
|
+
Ni,
|
|
2610
2598
|
{
|
|
2611
2599
|
scope: n,
|
|
2612
2600
|
placedSide: D,
|
|
2613
2601
|
onArrowChange: E,
|
|
2614
|
-
arrowX:
|
|
2615
|
-
arrowY:
|
|
2616
|
-
shouldHideArrow:
|
|
2602
|
+
arrowX: In,
|
|
2603
|
+
arrowY: Wn,
|
|
2604
|
+
shouldHideArrow: Bn,
|
|
2617
2605
|
children: /* @__PURE__ */ C(
|
|
2618
2606
|
G.div,
|
|
2619
2607
|
{
|
|
2620
2608
|
"data-side": D,
|
|
2621
|
-
"data-align":
|
|
2622
|
-
...
|
|
2609
|
+
"data-align": z,
|
|
2610
|
+
...p,
|
|
2623
2611
|
ref: x,
|
|
2624
2612
|
style: {
|
|
2625
|
-
...
|
|
2613
|
+
...p.style,
|
|
2626
2614
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
2627
2615
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
2628
2616
|
animation: L ? void 0 : "none"
|
|
@@ -2635,14 +2623,14 @@ var ht = "PopperContent", [_i, Fi] = xn(ht), Rn = a.forwardRef(
|
|
|
2635
2623
|
);
|
|
2636
2624
|
}
|
|
2637
2625
|
);
|
|
2638
|
-
|
|
2639
|
-
var
|
|
2626
|
+
xn.displayName = dt;
|
|
2627
|
+
var En = "PopperArrow", Ti = {
|
|
2640
2628
|
top: "bottom",
|
|
2641
2629
|
right: "left",
|
|
2642
2630
|
bottom: "top",
|
|
2643
2631
|
left: "right"
|
|
2644
|
-
},
|
|
2645
|
-
const { __scopePopper: r, ...o } = t, i =
|
|
2632
|
+
}, Cn = a.forwardRef(function(t, n) {
|
|
2633
|
+
const { __scopePopper: r, ...o } = t, i = Mi(En, r), s = Ti[i.placedSide];
|
|
2646
2634
|
return (
|
|
2647
2635
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
2648
2636
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -2671,7 +2659,7 @@ var On = "PopperArrow", Ii = {
|
|
|
2671
2659
|
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
2672
2660
|
},
|
|
2673
2661
|
children: /* @__PURE__ */ C(
|
|
2674
|
-
|
|
2662
|
+
Ri,
|
|
2675
2663
|
{
|
|
2676
2664
|
...o,
|
|
2677
2665
|
ref: n,
|
|
@@ -2686,27 +2674,26 @@ var On = "PopperArrow", Ii = {
|
|
|
2686
2674
|
)
|
|
2687
2675
|
);
|
|
2688
2676
|
});
|
|
2689
|
-
|
|
2690
|
-
function
|
|
2677
|
+
Cn.displayName = En;
|
|
2678
|
+
function ki(e) {
|
|
2691
2679
|
return e !== null;
|
|
2692
2680
|
}
|
|
2693
|
-
var
|
|
2681
|
+
var Li = (e) => ({
|
|
2694
2682
|
name: "transformOrigin",
|
|
2695
2683
|
options: e,
|
|
2696
2684
|
fn(t) {
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
return l === "bottom" ? (g = s ? d : `${p}px`, h = `${-u}px`) : l === "top" ? (g = s ? d : `${p}px`, h = `${r.floating.height + u}px`) : l === "right" ? (g = `${-u}px`, h = s ? d : `${m}px`) : l === "left" && (g = `${r.floating.width + u}px`, h = s ? d : `${m}px`), { data: { x: g, y: h } };
|
|
2685
|
+
const { placement: n, rects: r, middlewareData: o } = t, s = o.arrow?.centerOffset !== 0, c = s ? 0 : e.arrowWidth, u = s ? 0 : e.arrowHeight, [l, f] = Pn(n), d = { start: "0%", center: "50%", end: "100%" }[f], m = (o.arrow?.x ?? 0) + c / 2, h = (o.arrow?.y ?? 0) + u / 2;
|
|
2686
|
+
let v = "", p = "";
|
|
2687
|
+
return l === "bottom" ? (v = s ? d : `${m}px`, p = `${-u}px`) : l === "top" ? (v = s ? d : `${m}px`, p = `${r.floating.height + u}px`) : l === "right" ? (v = `${-u}px`, p = s ? d : `${h}px`) : l === "left" && (v = `${r.floating.width + u}px`, p = s ? d : `${h}px`), { data: { x: v, y: p } };
|
|
2701
2688
|
}
|
|
2702
2689
|
});
|
|
2703
|
-
function
|
|
2690
|
+
function Pn(e) {
|
|
2704
2691
|
const [t, n = "center"] = e.split("-");
|
|
2705
2692
|
return [t, n];
|
|
2706
2693
|
}
|
|
2707
|
-
var
|
|
2708
|
-
|
|
2709
|
-
]), Ee =
|
|
2694
|
+
var Di = yn, Sn = bn, _i = xn, Fi = Cn, He = "Popover", [An, ls] = Ht(He, [
|
|
2695
|
+
vn
|
|
2696
|
+
]), Ee = vn(), [Ii, oe] = An(He), Rn = (e) => {
|
|
2710
2697
|
const {
|
|
2711
2698
|
__scopePopover: t,
|
|
2712
2699
|
children: n,
|
|
@@ -2714,21 +2701,21 @@ var $i = Pn, Tn = Sn, Hi = Rn, Vi = Nn, Ve = "Popover", [kn, ms] = Xt(Ve, [
|
|
|
2714
2701
|
defaultOpen: o,
|
|
2715
2702
|
onOpenChange: i,
|
|
2716
2703
|
modal: s = !1
|
|
2717
|
-
} = e, c = Ee(t), u = a.useRef(null), [l, f] = a.useState(!1), [d,
|
|
2704
|
+
} = e, c = Ee(t), u = a.useRef(null), [l, f] = a.useState(!1), [d, m] = pr({
|
|
2718
2705
|
prop: r,
|
|
2719
2706
|
defaultProp: o ?? !1,
|
|
2720
2707
|
onChange: i,
|
|
2721
|
-
caller:
|
|
2708
|
+
caller: He
|
|
2722
2709
|
});
|
|
2723
|
-
return /* @__PURE__ */ C(
|
|
2724
|
-
|
|
2710
|
+
return /* @__PURE__ */ C(Di, { ...c, children: /* @__PURE__ */ C(
|
|
2711
|
+
Ii,
|
|
2725
2712
|
{
|
|
2726
2713
|
scope: t,
|
|
2727
|
-
contentId:
|
|
2714
|
+
contentId: xr(),
|
|
2728
2715
|
triggerRef: u,
|
|
2729
2716
|
open: d,
|
|
2730
|
-
onOpenChange:
|
|
2731
|
-
onOpenToggle: a.useCallback(() =>
|
|
2717
|
+
onOpenChange: m,
|
|
2718
|
+
onOpenToggle: a.useCallback(() => m((h) => !h), [m]),
|
|
2732
2719
|
hasCustomAnchor: l,
|
|
2733
2720
|
onCustomAnchorAdd: a.useCallback(() => f(!0), []),
|
|
2734
2721
|
onCustomAnchorRemove: a.useCallback(() => f(!1), []),
|
|
@@ -2737,63 +2724,62 @@ var $i = Pn, Tn = Sn, Hi = Rn, Vi = Nn, Ve = "Popover", [kn, ms] = Xt(Ve, [
|
|
|
2737
2724
|
}
|
|
2738
2725
|
) });
|
|
2739
2726
|
};
|
|
2740
|
-
|
|
2741
|
-
var
|
|
2727
|
+
Rn.displayName = He;
|
|
2728
|
+
var On = "PopoverAnchor", Nn = a.forwardRef(
|
|
2742
2729
|
(e, t) => {
|
|
2743
|
-
const { __scopePopover: n, ...r } = e, o = oe(
|
|
2744
|
-
return a.useEffect(() => (s(), () => c()), [s, c]), /* @__PURE__ */ C(
|
|
2730
|
+
const { __scopePopover: n, ...r } = e, o = oe(On, n), i = Ee(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: c } = o;
|
|
2731
|
+
return a.useEffect(() => (s(), () => c()), [s, c]), /* @__PURE__ */ C(Sn, { ...i, ...r, ref: t });
|
|
2745
2732
|
}
|
|
2746
2733
|
);
|
|
2747
|
-
|
|
2748
|
-
var
|
|
2734
|
+
Nn.displayName = On;
|
|
2735
|
+
var Mn = "PopoverTrigger", Tn = a.forwardRef(
|
|
2749
2736
|
(e, t) => {
|
|
2750
|
-
const { __scopePopover: n, ...r } = e, o = oe(
|
|
2737
|
+
const { __scopePopover: n, ...r } = e, o = oe(Mn, n), i = Ee(n), s = re(t, o.triggerRef), c = /* @__PURE__ */ C(
|
|
2751
2738
|
G.button,
|
|
2752
2739
|
{
|
|
2753
2740
|
type: "button",
|
|
2754
2741
|
"aria-haspopup": "dialog",
|
|
2755
2742
|
"aria-expanded": o.open,
|
|
2756
2743
|
"aria-controls": o.contentId,
|
|
2757
|
-
"data-state":
|
|
2744
|
+
"data-state": Fn(o.open),
|
|
2758
2745
|
...r,
|
|
2759
2746
|
ref: s,
|
|
2760
2747
|
onClick: J(e.onClick, o.onOpenToggle)
|
|
2761
2748
|
}
|
|
2762
2749
|
);
|
|
2763
|
-
return o.hasCustomAnchor ? c : /* @__PURE__ */ C(
|
|
2750
|
+
return o.hasCustomAnchor ? c : /* @__PURE__ */ C(Sn, { asChild: !0, ...i, children: c });
|
|
2764
2751
|
}
|
|
2765
2752
|
);
|
|
2766
|
-
|
|
2767
|
-
var pt = "PopoverPortal", [
|
|
2753
|
+
Tn.displayName = Mn;
|
|
2754
|
+
var pt = "PopoverPortal", [Wi, Bi] = An(pt, {
|
|
2768
2755
|
forceMount: void 0
|
|
2769
|
-
}),
|
|
2756
|
+
}), kn = (e) => {
|
|
2770
2757
|
const { __scopePopover: t, forceMount: n, children: r, container: o } = e, i = oe(pt, t);
|
|
2771
|
-
return /* @__PURE__ */ C(
|
|
2758
|
+
return /* @__PURE__ */ C(Wi, { scope: t, forceMount: n, children: /* @__PURE__ */ C(rt, { present: n || i.open, children: /* @__PURE__ */ C(Kt, { asChild: !0, container: o, children: r }) }) });
|
|
2772
2759
|
};
|
|
2773
|
-
|
|
2774
|
-
var
|
|
2760
|
+
kn.displayName = pt;
|
|
2761
|
+
var pe = "PopoverContent", Ln = a.forwardRef(
|
|
2775
2762
|
(e, t) => {
|
|
2776
|
-
const n =
|
|
2777
|
-
return /* @__PURE__ */ C(
|
|
2763
|
+
const n = Bi(pe, e.__scopePopover), { forceMount: r = n.forceMount, ...o } = e, i = oe(pe, e.__scopePopover);
|
|
2764
|
+
return /* @__PURE__ */ C(rt, { present: r || i.open, children: i.modal ? /* @__PURE__ */ C(Hi, { ...o, ref: t }) : /* @__PURE__ */ C(zi, { ...o, ref: t }) });
|
|
2778
2765
|
}
|
|
2779
2766
|
);
|
|
2780
|
-
|
|
2781
|
-
var
|
|
2767
|
+
Ln.displayName = pe;
|
|
2768
|
+
var $i = /* @__PURE__ */ $t("PopoverContent.RemoveScroll"), Hi = a.forwardRef(
|
|
2782
2769
|
(e, t) => {
|
|
2783
|
-
const n = oe(
|
|
2770
|
+
const n = oe(pe, e.__scopePopover), r = a.useRef(null), o = re(t, r), i = a.useRef(!1);
|
|
2784
2771
|
return a.useEffect(() => {
|
|
2785
2772
|
const s = r.current;
|
|
2786
|
-
if (s) return
|
|
2787
|
-
}, []), /* @__PURE__ */ C(
|
|
2788
|
-
|
|
2773
|
+
if (s) return So(s);
|
|
2774
|
+
}, []), /* @__PURE__ */ C(tn, { as: $i, allowPinchZoom: !0, children: /* @__PURE__ */ C(
|
|
2775
|
+
Dn,
|
|
2789
2776
|
{
|
|
2790
2777
|
...e,
|
|
2791
2778
|
ref: o,
|
|
2792
2779
|
trapFocus: n.open,
|
|
2793
2780
|
disableOutsidePointerEvents: !0,
|
|
2794
2781
|
onCloseAutoFocus: J(e.onCloseAutoFocus, (s) => {
|
|
2795
|
-
|
|
2796
|
-
s.preventDefault(), i.current || (c = n.triggerRef.current) == null || c.focus();
|
|
2782
|
+
s.preventDefault(), i.current || n.triggerRef.current?.focus();
|
|
2797
2783
|
}),
|
|
2798
2784
|
onPointerDownOutside: J(
|
|
2799
2785
|
e.onPointerDownOutside,
|
|
@@ -2811,30 +2797,28 @@ var Yi = /* @__PURE__ */ Yt("PopoverContent.RemoveScroll"), Xi = a.forwardRef(
|
|
|
2811
2797
|
}
|
|
2812
2798
|
) });
|
|
2813
2799
|
}
|
|
2814
|
-
),
|
|
2800
|
+
), zi = a.forwardRef(
|
|
2815
2801
|
(e, t) => {
|
|
2816
|
-
const n = oe(
|
|
2802
|
+
const n = oe(pe, e.__scopePopover), r = a.useRef(!1), o = a.useRef(!1);
|
|
2817
2803
|
return /* @__PURE__ */ C(
|
|
2818
|
-
|
|
2804
|
+
Dn,
|
|
2819
2805
|
{
|
|
2820
2806
|
...e,
|
|
2821
2807
|
ref: t,
|
|
2822
2808
|
trapFocus: !1,
|
|
2823
2809
|
disableOutsidePointerEvents: !1,
|
|
2824
2810
|
onCloseAutoFocus: (i) => {
|
|
2825
|
-
|
|
2826
|
-
(s = e.onCloseAutoFocus) == null || s.call(e, i), i.defaultPrevented || (r.current || (c = n.triggerRef.current) == null || c.focus(), i.preventDefault()), r.current = !1, o.current = !1;
|
|
2811
|
+
e.onCloseAutoFocus?.(i), i.defaultPrevented || (r.current || n.triggerRef.current?.focus(), i.preventDefault()), r.current = !1, o.current = !1;
|
|
2827
2812
|
},
|
|
2828
2813
|
onInteractOutside: (i) => {
|
|
2829
|
-
|
|
2830
|
-
(u = e.onInteractOutside) == null || u.call(e, i), i.defaultPrevented || (r.current = !0, i.detail.originalEvent.type === "pointerdown" && (o.current = !0));
|
|
2814
|
+
e.onInteractOutside?.(i), i.defaultPrevented || (r.current = !0, i.detail.originalEvent.type === "pointerdown" && (o.current = !0));
|
|
2831
2815
|
const s = i.target;
|
|
2832
|
-
|
|
2816
|
+
n.triggerRef.current?.contains(s) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && o.current && i.preventDefault();
|
|
2833
2817
|
}
|
|
2834
2818
|
}
|
|
2835
2819
|
);
|
|
2836
2820
|
}
|
|
2837
|
-
),
|
|
2821
|
+
), Dn = a.forwardRef(
|
|
2838
2822
|
(e, t) => {
|
|
2839
2823
|
const {
|
|
2840
2824
|
__scopePopover: n,
|
|
@@ -2847,9 +2831,9 @@ var Yi = /* @__PURE__ */ Yt("PopoverContent.RemoveScroll"), Xi = a.forwardRef(
|
|
|
2847
2831
|
onFocusOutside: l,
|
|
2848
2832
|
onInteractOutside: f,
|
|
2849
2833
|
...d
|
|
2850
|
-
} = e,
|
|
2851
|
-
return
|
|
2852
|
-
|
|
2834
|
+
} = e, m = oe(pe, n), h = Ee(n);
|
|
2835
|
+
return Wr(), /* @__PURE__ */ C(
|
|
2836
|
+
jt,
|
|
2853
2837
|
{
|
|
2854
2838
|
asChild: !0,
|
|
2855
2839
|
loop: !0,
|
|
@@ -2857,7 +2841,7 @@ var Yi = /* @__PURE__ */ Yt("PopoverContent.RemoveScroll"), Xi = a.forwardRef(
|
|
|
2857
2841
|
onMountAutoFocus: o,
|
|
2858
2842
|
onUnmountAutoFocus: i,
|
|
2859
2843
|
children: /* @__PURE__ */ C(
|
|
2860
|
-
|
|
2844
|
+
Vt,
|
|
2861
2845
|
{
|
|
2862
2846
|
asChild: !0,
|
|
2863
2847
|
disableOutsidePointerEvents: s,
|
|
@@ -2865,14 +2849,14 @@ var Yi = /* @__PURE__ */ Yt("PopoverContent.RemoveScroll"), Xi = a.forwardRef(
|
|
|
2865
2849
|
onEscapeKeyDown: c,
|
|
2866
2850
|
onPointerDownOutside: u,
|
|
2867
2851
|
onFocusOutside: l,
|
|
2868
|
-
onDismiss: () =>
|
|
2852
|
+
onDismiss: () => m.onOpenChange(!1),
|
|
2869
2853
|
children: /* @__PURE__ */ C(
|
|
2870
|
-
|
|
2854
|
+
_i,
|
|
2871
2855
|
{
|
|
2872
|
-
"data-state":
|
|
2856
|
+
"data-state": Fn(m.open),
|
|
2873
2857
|
role: "dialog",
|
|
2874
|
-
id:
|
|
2875
|
-
...
|
|
2858
|
+
id: m.contentId,
|
|
2859
|
+
...h,
|
|
2876
2860
|
...d,
|
|
2877
2861
|
ref: t,
|
|
2878
2862
|
style: {
|
|
@@ -2890,9 +2874,9 @@ var Yi = /* @__PURE__ */ Yt("PopoverContent.RemoveScroll"), Xi = a.forwardRef(
|
|
|
2890
2874
|
}
|
|
2891
2875
|
);
|
|
2892
2876
|
}
|
|
2893
|
-
),
|
|
2877
|
+
), _n = "PopoverClose", Vi = a.forwardRef(
|
|
2894
2878
|
(e, t) => {
|
|
2895
|
-
const { __scopePopover: n, ...r } = e, o = oe(
|
|
2879
|
+
const { __scopePopover: n, ...r } = e, o = oe(_n, n);
|
|
2896
2880
|
return /* @__PURE__ */ C(
|
|
2897
2881
|
G.button,
|
|
2898
2882
|
{
|
|
@@ -2904,66 +2888,66 @@ var Yi = /* @__PURE__ */ Yt("PopoverContent.RemoveScroll"), Xi = a.forwardRef(
|
|
|
2904
2888
|
);
|
|
2905
2889
|
}
|
|
2906
2890
|
);
|
|
2907
|
-
|
|
2908
|
-
var
|
|
2891
|
+
Vi.displayName = _n;
|
|
2892
|
+
var Ui = "PopoverArrow", ji = a.forwardRef(
|
|
2909
2893
|
(e, t) => {
|
|
2910
2894
|
const { __scopePopover: n, ...r } = e, o = Ee(n);
|
|
2911
|
-
return /* @__PURE__ */ C(
|
|
2895
|
+
return /* @__PURE__ */ C(Fi, { ...o, ...r, ref: t });
|
|
2912
2896
|
}
|
|
2913
2897
|
);
|
|
2914
|
-
|
|
2915
|
-
function
|
|
2898
|
+
ji.displayName = Ui;
|
|
2899
|
+
function Fn(e) {
|
|
2916
2900
|
return e ? "open" : "closed";
|
|
2917
2901
|
}
|
|
2918
|
-
var
|
|
2919
|
-
const
|
|
2920
|
-
anchor:
|
|
2921
|
-
container:
|
|
2922
|
-
radio:
|
|
2923
|
-
check:
|
|
2924
|
-
radioInput:
|
|
2902
|
+
var Yi = Rn, Ki = Nn, Xi = Tn, Zi = kn, Gi = Ln;
|
|
2903
|
+
const qi = "_anchor_vbdag_270", Qi = "_container_vbdag_275", Ji = "_radio_vbdag_292", es = "_check_vbdag_304", ts = "_radioInput_vbdag_312", ge = {
|
|
2904
|
+
anchor: qi,
|
|
2905
|
+
container: Qi,
|
|
2906
|
+
radio: Ji,
|
|
2907
|
+
check: es,
|
|
2908
|
+
radioInput: ts
|
|
2925
2909
|
};
|
|
2926
|
-
function
|
|
2927
|
-
return /* @__PURE__ */ Q(
|
|
2910
|
+
function qe({ children: e, id: t, ...n }) {
|
|
2911
|
+
return /* @__PURE__ */ Q(It, { children: [
|
|
2928
2912
|
/* @__PURE__ */ C(
|
|
2929
2913
|
"input",
|
|
2930
2914
|
{
|
|
2931
2915
|
type: "radio",
|
|
2932
2916
|
id: t,
|
|
2933
|
-
className:
|
|
2917
|
+
className: Gn(ge.radioInput, "sr-only"),
|
|
2934
2918
|
...n
|
|
2935
2919
|
}
|
|
2936
2920
|
),
|
|
2937
2921
|
/* @__PURE__ */ Q("label", { htmlFor: t, className: ge.radio, children: [
|
|
2938
2922
|
e,
|
|
2939
|
-
/* @__PURE__ */ C(
|
|
2923
|
+
/* @__PURE__ */ C(Jn, { className: ge.check })
|
|
2940
2924
|
] })
|
|
2941
2925
|
] });
|
|
2942
2926
|
}
|
|
2943
|
-
function
|
|
2944
|
-
const { theme: e, systemTheme: t, setTheme: n } =
|
|
2945
|
-
return /* @__PURE__ */ Q(
|
|
2946
|
-
/* @__PURE__ */ C(
|
|
2947
|
-
/* @__PURE__ */ C(
|
|
2948
|
-
/* @__PURE__ */ C(
|
|
2927
|
+
function us() {
|
|
2928
|
+
const { theme: e, systemTheme: t, setTheme: n } = Yn(), r = qn();
|
|
2929
|
+
return /* @__PURE__ */ Q(Yi, { children: [
|
|
2930
|
+
/* @__PURE__ */ C(Xi, { asChild: !0, children: /* @__PURE__ */ Q(Zn, { variant: "transparent", "aria-label": "Preferences", children: [
|
|
2931
|
+
/* @__PURE__ */ C(nr, {}),
|
|
2932
|
+
/* @__PURE__ */ C(Ki, { className: ge.anchor })
|
|
2949
2933
|
] }) }),
|
|
2950
|
-
/* @__PURE__ */ C(
|
|
2951
|
-
|
|
2934
|
+
/* @__PURE__ */ C(Zi, { children: /* @__PURE__ */ C(
|
|
2935
|
+
Gi,
|
|
2952
2936
|
{
|
|
2953
2937
|
sideOffset: 8,
|
|
2954
2938
|
hideWhenDetached: !0,
|
|
2955
2939
|
className: ge.container,
|
|
2956
|
-
children: r && /* @__PURE__ */ Q(
|
|
2940
|
+
children: r && /* @__PURE__ */ Q(It, { children: [
|
|
2957
2941
|
/* @__PURE__ */ C("span", { children: "Appearance" }),
|
|
2958
2942
|
/* @__PURE__ */ Q(
|
|
2959
|
-
|
|
2943
|
+
qe,
|
|
2960
2944
|
{
|
|
2961
2945
|
id: "system",
|
|
2962
2946
|
name: "theme",
|
|
2963
2947
|
checked: e === "system",
|
|
2964
2948
|
onChange: () => n("system"),
|
|
2965
2949
|
children: [
|
|
2966
|
-
/* @__PURE__ */ C(
|
|
2950
|
+
/* @__PURE__ */ C(er, {}),
|
|
2967
2951
|
"Auto (",
|
|
2968
2952
|
t,
|
|
2969
2953
|
")"
|
|
@@ -2971,27 +2955,27 @@ function vs() {
|
|
|
2971
2955
|
}
|
|
2972
2956
|
),
|
|
2973
2957
|
/* @__PURE__ */ Q(
|
|
2974
|
-
|
|
2958
|
+
qe,
|
|
2975
2959
|
{
|
|
2976
2960
|
id: "light",
|
|
2977
2961
|
name: "theme",
|
|
2978
2962
|
checked: e === "light",
|
|
2979
2963
|
onChange: () => n("light"),
|
|
2980
2964
|
children: [
|
|
2981
|
-
/* @__PURE__ */ C(
|
|
2965
|
+
/* @__PURE__ */ C(rr, {}),
|
|
2982
2966
|
"Light"
|
|
2983
2967
|
]
|
|
2984
2968
|
}
|
|
2985
2969
|
),
|
|
2986
2970
|
/* @__PURE__ */ Q(
|
|
2987
|
-
|
|
2971
|
+
qe,
|
|
2988
2972
|
{
|
|
2989
2973
|
id: "dark",
|
|
2990
2974
|
name: "theme",
|
|
2991
2975
|
checked: e === "dark",
|
|
2992
2976
|
onChange: () => n("dark"),
|
|
2993
2977
|
children: [
|
|
2994
|
-
/* @__PURE__ */ C(
|
|
2978
|
+
/* @__PURE__ */ C(tr, {}),
|
|
2995
2979
|
"Dark"
|
|
2996
2980
|
]
|
|
2997
2981
|
}
|
|
@@ -3002,6 +2986,6 @@ function vs() {
|
|
|
3002
2986
|
] });
|
|
3003
2987
|
}
|
|
3004
2988
|
export {
|
|
3005
|
-
|
|
3006
|
-
|
|
2989
|
+
us as PrefPanel,
|
|
2990
|
+
qe as PrefRadio
|
|
3007
2991
|
};
|