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