@arkitektbedriftene/fe-lib 0.3.5 → 0.3.7

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.
@@ -0,0 +1,3207 @@
1
+ import { j as G } from "./jsx-runtime-d0aa4c5b.js";
2
+ import * as y from "react";
3
+ import ve, { forwardRef as at, useLayoutEffect as Yt, useEffect as Kt, useRef as vn, createContext as xn, useMemo as wn, useContext as Xt, isValidElement as Sn, cloneElement as En } from "react";
4
+ import * as $n from "react-dom";
5
+ import { createPortal as Rn } from "react-dom";
6
+ var N = "colors", V = "sizes", R = "space", Cn = { gap: R, gridGap: R, columnGap: R, gridColumnGap: R, rowGap: R, gridRowGap: R, inset: R, insetBlock: R, insetBlockEnd: R, insetBlockStart: R, insetInline: R, insetInlineEnd: R, insetInlineStart: R, margin: R, marginTop: R, marginRight: R, marginBottom: R, marginLeft: R, marginBlock: R, marginBlockEnd: R, marginBlockStart: R, marginInline: R, marginInlineEnd: R, marginInlineStart: R, padding: R, paddingTop: R, paddingRight: R, paddingBottom: R, paddingLeft: R, paddingBlock: R, paddingBlockEnd: R, paddingBlockStart: R, paddingInline: R, paddingInlineEnd: R, paddingInlineStart: R, top: R, right: R, bottom: R, left: R, scrollMargin: R, scrollMarginTop: R, scrollMarginRight: R, scrollMarginBottom: R, scrollMarginLeft: R, scrollMarginX: R, scrollMarginY: R, scrollMarginBlock: R, scrollMarginBlockEnd: R, scrollMarginBlockStart: R, scrollMarginInline: R, scrollMarginInlineEnd: R, scrollMarginInlineStart: R, scrollPadding: R, scrollPaddingTop: R, scrollPaddingRight: R, scrollPaddingBottom: R, scrollPaddingLeft: R, scrollPaddingX: R, scrollPaddingY: R, scrollPaddingBlock: R, scrollPaddingBlockEnd: R, scrollPaddingBlockStart: R, scrollPaddingInline: R, scrollPaddingInlineEnd: R, scrollPaddingInlineStart: R, fontSize: "fontSizes", background: N, backgroundColor: N, backgroundImage: N, borderImage: N, border: N, borderBlock: N, borderBlockEnd: N, borderBlockStart: N, borderBottom: N, borderBottomColor: N, borderColor: N, borderInline: N, borderInlineEnd: N, borderInlineStart: N, borderLeft: N, borderLeftColor: N, borderRight: N, borderRightColor: N, borderTop: N, borderTopColor: N, caretColor: N, color: N, columnRuleColor: N, fill: N, outline: N, outlineColor: N, stroke: N, textDecorationColor: N, fontFamily: "fonts", fontWeight: "fontWeights", lineHeight: "lineHeights", letterSpacing: "letterSpacings", blockSize: V, minBlockSize: V, maxBlockSize: V, inlineSize: V, minInlineSize: V, maxInlineSize: V, width: V, minWidth: V, maxWidth: V, height: V, minHeight: V, maxHeight: V, flexBasis: V, gridTemplateColumns: V, gridTemplateRows: V, borderWidth: "borderWidths", borderTopWidth: "borderWidths", borderRightWidth: "borderWidths", borderBottomWidth: "borderWidths", borderLeftWidth: "borderWidths", borderStyle: "borderStyles", borderTopStyle: "borderStyles", borderRightStyle: "borderStyles", borderBottomStyle: "borderStyles", borderLeftStyle: "borderStyles", borderRadius: "radii", borderTopLeftRadius: "radii", borderTopRightRadius: "radii", borderBottomRightRadius: "radii", borderBottomLeftRadius: "radii", boxShadow: "shadows", textShadow: "shadows", transition: "transitions", zIndex: "zIndices" }, kn = (e, t) => typeof t == "function" ? { "()": Function.prototype.toString.call(t) } : t, Te = () => {
7
+ const e = /* @__PURE__ */ Object.create(null);
8
+ return (t, n, ...r) => {
9
+ const o = ((i) => JSON.stringify(i, kn))(t);
10
+ return o in e ? e[o] : e[o] = n(t, ...r);
11
+ };
12
+ }, ae = Symbol.for("sxs.internal"), ut = (e, t) => Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)), yt = (e) => {
13
+ for (const t in e)
14
+ return !0;
15
+ return !1;
16
+ }, { hasOwnProperty: Tn } = Object.prototype, rt = (e) => e.includes("-") ? e : e.replace(/[A-Z]/g, (t) => "-" + t.toLowerCase()), In = /\s+(?![^()]*\))/, xe = (e) => (t) => e(...typeof t == "string" ? String(t).split(In) : [t]), vt = { appearance: (e) => ({ WebkitAppearance: e, appearance: e }), backfaceVisibility: (e) => ({ WebkitBackfaceVisibility: e, backfaceVisibility: e }), backdropFilter: (e) => ({ WebkitBackdropFilter: e, backdropFilter: e }), backgroundClip: (e) => ({ WebkitBackgroundClip: e, backgroundClip: e }), boxDecorationBreak: (e) => ({ WebkitBoxDecorationBreak: e, boxDecorationBreak: e }), clipPath: (e) => ({ WebkitClipPath: e, clipPath: e }), content: (e) => ({ content: e.includes('"') || e.includes("'") || /^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e) ? e : `"${e}"` }), hyphens: (e) => ({ WebkitHyphens: e, hyphens: e }), maskImage: (e) => ({ WebkitMaskImage: e, maskImage: e }), maskSize: (e) => ({ WebkitMaskSize: e, maskSize: e }), tabSize: (e) => ({ MozTabSize: e, tabSize: e }), textSizeAdjust: (e) => ({ WebkitTextSizeAdjust: e, textSizeAdjust: e }), userSelect: (e) => ({ WebkitUserSelect: e, userSelect: e }), marginBlock: xe((e, t) => ({ marginBlockStart: e, marginBlockEnd: t || e })), marginInline: xe((e, t) => ({ marginInlineStart: e, marginInlineEnd: t || e })), maxSize: xe((e, t) => ({ maxBlockSize: e, maxInlineSize: t || e })), minSize: xe((e, t) => ({ minBlockSize: e, minInlineSize: t || e })), paddingBlock: xe((e, t) => ({ paddingBlockStart: e, paddingBlockEnd: t || e })), paddingInline: xe((e, t) => ({ paddingInlineStart: e, paddingInlineEnd: t || e })) }, Ge = /([\d.]+)([^]*)/, Pn = (e, t) => e.length ? e.reduce((n, r) => (n.push(...t.map((o) => o.includes("&") ? o.replace(/&/g, /[ +>|~]/.test(r) && /&.*&/.test(o) ? `:is(${r})` : r) : r + " " + o)), n), []) : t, An = (e, t) => e in Bn && typeof t == "string" ? t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/, (n, r, o, i) => r + (o === "stretch" ? `-moz-available${i};${rt(e)}:${r}-webkit-fill-available` : `-moz-fit-content${i};${rt(e)}:${r}fit-content`) + i) : String(t), Bn = { blockSize: 1, height: 1, inlineSize: 1, maxBlockSize: 1, maxHeight: 1, maxInlineSize: 1, maxWidth: 1, minBlockSize: 1, minHeight: 1, minInlineSize: 1, minWidth: 1, width: 1 }, J = (e) => e ? e + "-" : "", Ut = (e, t, n) => e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g, (r, o, i, s, l) => s == "$" == !!i ? r : (o || s == "--" ? "calc(" : "") + "var(--" + (s === "$" ? J(t) + (l.includes("$") ? "" : J(n)) + l.replace(/\$/g, "-") : l) + ")" + (o || s == "--" ? "*" + (o || "") + (i || "1") + ")" : "")), On = /\s*,\s*(?![^()]*\))/, Dn = Object.prototype.toString, $e = (e, t, n, r, o) => {
17
+ let i, s, l;
18
+ const c = (a, m, d) => {
19
+ let f, u;
20
+ const g = (p) => {
21
+ for (f in p) {
22
+ const x = f.charCodeAt(0) === 64, P = x && Array.isArray(p[f]) ? p[f] : [p[f]];
23
+ for (u of P) {
24
+ const E = /[A-Z]/.test(h = f) ? h : h.replace(/-[^]/g, (I) => I[1].toUpperCase()), C = typeof u == "object" && u && u.toString === Dn && (!r.utils[E] || !m.length);
25
+ if (E in r.utils && !C) {
26
+ const I = r.utils[E];
27
+ if (I !== s) {
28
+ s = I, g(I(u)), s = null;
29
+ continue;
30
+ }
31
+ } else if (E in vt) {
32
+ const I = vt[E];
33
+ if (I !== l) {
34
+ l = I, g(I(u)), l = null;
35
+ continue;
36
+ }
37
+ }
38
+ if (x && (S = f.slice(1) in r.media ? "@media " + r.media[f.slice(1)] : f, f = S.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g, (I, A, k, O, D, L) => {
39
+ const M = Ge.test(A), B = 0.0625 * (M ? -1 : 1), [b, v] = M ? [O, A] : [A, O];
40
+ return "(" + (k[0] === "=" ? "" : k[0] === ">" === M ? "max-" : "min-") + b + ":" + (k[0] !== "=" && k.length === 1 ? v.replace(Ge, (T, $, w) => Number($) + B * (k === ">" ? 1 : -1) + w) : v) + (D ? ") and (" + (D[0] === ">" ? "min-" : "max-") + b + ":" + (D.length === 1 ? L.replace(Ge, (T, $, w) => Number($) + B * (D === ">" ? -1 : 1) + w) : L) : "") + ")";
41
+ })), C) {
42
+ const I = x ? d.concat(f) : [...d], A = x ? [...m] : Pn(m, f.split(On));
43
+ i !== void 0 && o(xt(...i)), i = void 0, c(u, A, I);
44
+ } else
45
+ i === void 0 && (i = [[], m, d]), f = x || f.charCodeAt(0) !== 36 ? f : `--${J(r.prefix)}${f.slice(1).replace(/\$/g, "-")}`, u = C ? u : typeof u == "number" ? u && E in Mn ? String(u) + "px" : String(u) : Ut(An(E, u ?? ""), r.prefix, r.themeMap[E]), i[0].push(`${x ? `${f} ` : `${rt(f)}:`}${u}`);
46
+ }
47
+ }
48
+ var S, h;
49
+ };
50
+ g(a), i !== void 0 && o(xt(...i)), i = void 0;
51
+ };
52
+ c(e, t, n);
53
+ }, xt = (e, t, n) => `${n.map((r) => `${r}{`).join("")}${t.length ? `${t.join(",")}{` : ""}${e.join(";")}${t.length ? "}" : ""}${Array(n.length ? n.length + 1 : 0).join("}")}`, Mn = { animationDelay: 1, animationDuration: 1, backgroundSize: 1, blockSize: 1, border: 1, borderBlock: 1, borderBlockEnd: 1, borderBlockEndWidth: 1, borderBlockStart: 1, borderBlockStartWidth: 1, borderBlockWidth: 1, borderBottom: 1, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, borderBottomWidth: 1, borderEndEndRadius: 1, borderEndStartRadius: 1, borderInlineEnd: 1, borderInlineEndWidth: 1, borderInlineStart: 1, borderInlineStartWidth: 1, borderInlineWidth: 1, borderLeft: 1, borderLeftWidth: 1, borderRadius: 1, borderRight: 1, borderRightWidth: 1, borderSpacing: 1, borderStartEndRadius: 1, borderStartStartRadius: 1, borderTop: 1, borderTopLeftRadius: 1, borderTopRightRadius: 1, borderTopWidth: 1, borderWidth: 1, bottom: 1, columnGap: 1, columnRule: 1, columnRuleWidth: 1, columnWidth: 1, containIntrinsicSize: 1, flexBasis: 1, fontSize: 1, gap: 1, gridAutoColumns: 1, gridAutoRows: 1, gridTemplateColumns: 1, gridTemplateRows: 1, height: 1, inlineSize: 1, inset: 1, insetBlock: 1, insetBlockEnd: 1, insetBlockStart: 1, insetInline: 1, insetInlineEnd: 1, insetInlineStart: 1, left: 1, letterSpacing: 1, margin: 1, marginBlock: 1, marginBlockEnd: 1, marginBlockStart: 1, marginBottom: 1, marginInline: 1, marginInlineEnd: 1, marginInlineStart: 1, marginLeft: 1, marginRight: 1, marginTop: 1, maxBlockSize: 1, maxHeight: 1, maxInlineSize: 1, maxWidth: 1, minBlockSize: 1, minHeight: 1, minInlineSize: 1, minWidth: 1, offsetDistance: 1, offsetRotate: 1, outline: 1, outlineOffset: 1, outlineWidth: 1, overflowClipMargin: 1, padding: 1, paddingBlock: 1, paddingBlockEnd: 1, paddingBlockStart: 1, paddingBottom: 1, paddingInline: 1, paddingInlineEnd: 1, paddingInlineStart: 1, paddingLeft: 1, paddingRight: 1, paddingTop: 1, perspective: 1, right: 1, rowGap: 1, scrollMargin: 1, scrollMarginBlock: 1, scrollMarginBlockEnd: 1, scrollMarginBlockStart: 1, scrollMarginBottom: 1, scrollMarginInline: 1, scrollMarginInlineEnd: 1, scrollMarginInlineStart: 1, scrollMarginLeft: 1, scrollMarginRight: 1, scrollMarginTop: 1, scrollPadding: 1, scrollPaddingBlock: 1, scrollPaddingBlockEnd: 1, scrollPaddingBlockStart: 1, scrollPaddingBottom: 1, scrollPaddingInline: 1, scrollPaddingInlineEnd: 1, scrollPaddingInlineStart: 1, scrollPaddingLeft: 1, scrollPaddingRight: 1, scrollPaddingTop: 1, shapeMargin: 1, textDecoration: 1, textDecorationThickness: 1, textIndent: 1, textUnderlineOffset: 1, top: 1, transitionDelay: 1, transitionDuration: 1, verticalAlign: 1, width: 1, wordSpacing: 1 }, wt = (e) => String.fromCharCode(e + (e > 25 ? 39 : 97)), ue = (e) => ((t) => {
54
+ let n, r = "";
55
+ for (n = Math.abs(t); n > 52; n = n / 52 | 0)
56
+ r = wt(n % 52) + r;
57
+ return wt(n % 52) + r;
58
+ })(((t, n) => {
59
+ let r = n.length;
60
+ for (; r; )
61
+ t = 33 * t ^ n.charCodeAt(--r);
62
+ return t;
63
+ })(5381, JSON.stringify(e)) >>> 0), Ae = ["themed", "global", "styled", "onevar", "resonevar", "allvar", "inline"], Ln = (e) => {
64
+ if (e.href && !e.href.startsWith(location.origin))
65
+ return !1;
66
+ try {
67
+ return !!e.cssRules;
68
+ } catch {
69
+ return !1;
70
+ }
71
+ }, Fn = (e) => {
72
+ let t;
73
+ const n = () => {
74
+ const { cssRules: o } = t.sheet;
75
+ return [].map.call(o, (i, s) => {
76
+ const { cssText: l } = i;
77
+ let c = "";
78
+ if (l.startsWith("--sxs"))
79
+ return "";
80
+ if (o[s - 1] && (c = o[s - 1].cssText).startsWith("--sxs")) {
81
+ if (!i.cssRules.length)
82
+ return "";
83
+ for (const a in t.rules)
84
+ if (t.rules[a].group === i)
85
+ return `--sxs{--sxs:${[...t.rules[a].cache].join(" ")}}${l}`;
86
+ return i.cssRules.length ? `${c}${l}` : "";
87
+ }
88
+ return l;
89
+ }).join("");
90
+ }, r = () => {
91
+ if (t) {
92
+ const { rules: l, sheet: c } = t;
93
+ if (!c.deleteRule) {
94
+ for (; Object(Object(c.cssRules)[0]).type === 3; )
95
+ c.cssRules.splice(0, 1);
96
+ c.cssRules = [];
97
+ }
98
+ for (const a in l)
99
+ delete l[a];
100
+ }
101
+ const o = Object(e).styleSheets || [];
102
+ for (const l of o)
103
+ if (Ln(l)) {
104
+ for (let c = 0, a = l.cssRules; a[c]; ++c) {
105
+ const m = Object(a[c]);
106
+ if (m.type !== 1)
107
+ continue;
108
+ const d = Object(a[c + 1]);
109
+ if (d.type !== 4)
110
+ continue;
111
+ ++c;
112
+ const { cssText: f } = m;
113
+ if (!f.startsWith("--sxs"))
114
+ continue;
115
+ const u = f.slice(14, -3).trim().split(/\s+/), g = Ae[u[0]];
116
+ g && (t || (t = { sheet: l, reset: r, rules: {}, toString: n }), t.rules[g] = { group: d, index: c, cache: new Set(u) });
117
+ }
118
+ if (t)
119
+ break;
120
+ }
121
+ if (!t) {
122
+ const l = (c, a) => ({ type: a, cssRules: [], insertRule(m, d) {
123
+ this.cssRules.splice(d, 0, l(m, { import: 3, undefined: 1 }[(m.toLowerCase().match(/^@([a-z]+)/) || [])[1]] || 4));
124
+ }, get cssText() {
125
+ return c === "@media{}" ? `@media{${[].map.call(this.cssRules, (m) => m.cssText).join("")}}` : c;
126
+ } });
127
+ t = { sheet: e ? (e.head || e).appendChild(document.createElement("style")).sheet : l("", "text/css"), rules: {}, reset: r, toString: n };
128
+ }
129
+ const { sheet: i, rules: s } = t;
130
+ for (let l = Ae.length - 1; l >= 0; --l) {
131
+ const c = Ae[l];
132
+ if (!s[c]) {
133
+ const a = Ae[l + 1], m = s[a] ? s[a].index : i.cssRules.length;
134
+ i.insertRule("@media{}", m), i.insertRule(`--sxs{--sxs:${l}}`, m), s[c] = { group: i.cssRules[m + 1], index: m, cache: /* @__PURE__ */ new Set([l]) };
135
+ }
136
+ Nn(s[c]);
137
+ }
138
+ };
139
+ return r(), t;
140
+ }, Nn = (e) => {
141
+ const t = e.group;
142
+ let n = t.cssRules.length;
143
+ e.apply = (r) => {
144
+ try {
145
+ t.insertRule(r, n), ++n;
146
+ } catch {
147
+ }
148
+ };
149
+ }, Pe = Symbol(), Wn = Te(), St = (e, t) => Wn(e, () => (...n) => {
150
+ let r = { type: null, composers: /* @__PURE__ */ new Set() };
151
+ for (const o of n)
152
+ if (o != null)
153
+ if (o[ae]) {
154
+ r.type == null && (r.type = o[ae].type);
155
+ for (const i of o[ae].composers)
156
+ r.composers.add(i);
157
+ } else
158
+ o.constructor !== Object || o.$$typeof ? r.type == null && (r.type = o) : r.composers.add(jn(o, e));
159
+ return r.type == null && (r.type = "span"), r.composers.size || r.composers.add(["PJLV", {}, [], [], {}, []]), zn(e, r, t);
160
+ }), jn = ({ variants: e, compoundVariants: t, defaultVariants: n, ...r }, o) => {
161
+ const i = `${J(o.prefix)}c-${ue(r)}`, s = [], l = [], c = /* @__PURE__ */ Object.create(null), a = [];
162
+ for (const f in n)
163
+ c[f] = String(n[f]);
164
+ if (typeof e == "object" && e)
165
+ for (const f in e) {
166
+ m = c, d = f, Tn.call(m, d) || (c[f] = "undefined");
167
+ const u = e[f];
168
+ for (const g in u) {
169
+ const p = { [f]: String(g) };
170
+ String(g) === "undefined" && a.push(f);
171
+ const S = u[g], h = [p, S, !yt(S)];
172
+ s.push(h);
173
+ }
174
+ }
175
+ var m, d;
176
+ if (typeof t == "object" && t)
177
+ for (const f of t) {
178
+ let { css: u, ...g } = f;
179
+ u = typeof u == "object" && u || {};
180
+ for (const S in g)
181
+ g[S] = String(g[S]);
182
+ const p = [g, u, !yt(u)];
183
+ l.push(p);
184
+ }
185
+ return [i, r, s, l, c, a];
186
+ }, zn = (e, t, n) => {
187
+ const [r, o, i, s] = Hn(t.composers), l = typeof t.type == "function" || t.type.$$typeof ? ((d) => {
188
+ function f() {
189
+ for (let u = 0; u < f[Pe].length; u++) {
190
+ const [g, p] = f[Pe][u];
191
+ d.rules[g].apply(p);
192
+ }
193
+ return f[Pe] = [], null;
194
+ }
195
+ return f[Pe] = [], f.rules = {}, Ae.forEach((u) => f.rules[u] = { apply: (g) => f[Pe].push([u, g]) }), f;
196
+ })(n) : null, c = (l || n).rules, a = `.${r}${o.length > 1 ? `:where(.${o.slice(1).join(".")})` : ""}`, m = (d) => {
197
+ d = typeof d == "object" && d || Vn;
198
+ const { css: f, ...u } = d, g = {};
199
+ for (const h in i)
200
+ if (delete u[h], h in d) {
201
+ let x = d[h];
202
+ typeof x == "object" && x ? g[h] = { "@initial": i[h], ...x } : (x = String(x), g[h] = x !== "undefined" || s.has(h) ? x : i[h]);
203
+ } else
204
+ g[h] = i[h];
205
+ const p = /* @__PURE__ */ new Set([...o]);
206
+ for (const [h, x, P, E] of t.composers) {
207
+ n.rules.styled.cache.has(h) || (n.rules.styled.cache.add(h), $e(x, [`.${h}`], [], e, (A) => {
208
+ c.styled.apply(A);
209
+ }));
210
+ const C = Et(P, g, e.media), I = Et(E, g, e.media, !0);
211
+ for (const A of C)
212
+ if (A !== void 0)
213
+ for (const [k, O, D] of A) {
214
+ const L = `${h}-${ue(O)}-${k}`;
215
+ p.add(L);
216
+ const M = (D ? n.rules.resonevar : n.rules.onevar).cache, B = D ? c.resonevar : c.onevar;
217
+ M.has(L) || (M.add(L), $e(O, [`.${L}`], [], e, (b) => {
218
+ B.apply(b);
219
+ }));
220
+ }
221
+ for (const A of I)
222
+ if (A !== void 0)
223
+ for (const [k, O] of A) {
224
+ const D = `${h}-${ue(O)}-${k}`;
225
+ p.add(D), n.rules.allvar.cache.has(D) || (n.rules.allvar.cache.add(D), $e(O, [`.${D}`], [], e, (L) => {
226
+ c.allvar.apply(L);
227
+ }));
228
+ }
229
+ }
230
+ if (typeof f == "object" && f) {
231
+ const h = `${r}-i${ue(f)}-css`;
232
+ p.add(h), n.rules.inline.cache.has(h) || (n.rules.inline.cache.add(h), $e(f, [`.${h}`], [], e, (x) => {
233
+ c.inline.apply(x);
234
+ }));
235
+ }
236
+ for (const h of String(d.className || "").trim().split(/\s+/))
237
+ h && p.add(h);
238
+ const S = u.className = [...p].join(" ");
239
+ return { type: t.type, className: S, selector: a, props: u, toString: () => S, deferredInjector: l };
240
+ };
241
+ return ut(m, { className: r, selector: a, [ae]: t, toString: () => (n.rules.styled.cache.has(r) || m(), r) });
242
+ }, Hn = (e) => {
243
+ let t = "";
244
+ const n = [], r = {}, o = [];
245
+ for (const [i, , , , s, l] of e) {
246
+ t === "" && (t = i), n.push(i), o.push(...l);
247
+ for (const c in s) {
248
+ const a = s[c];
249
+ (r[c] === void 0 || a !== "undefined" || l.includes(a)) && (r[c] = a);
250
+ }
251
+ }
252
+ return [t, n, r, new Set(o)];
253
+ }, Et = (e, t, n, r) => {
254
+ const o = [];
255
+ e:
256
+ for (let [i, s, l] of e) {
257
+ if (l)
258
+ continue;
259
+ let c, a = 0, m = !1;
260
+ for (c in i) {
261
+ const d = i[c];
262
+ let f = t[c];
263
+ if (f !== d) {
264
+ if (typeof f != "object" || !f)
265
+ continue e;
266
+ {
267
+ let u, g, p = 0;
268
+ for (const S in f) {
269
+ if (d === String(f[S])) {
270
+ if (S !== "@initial") {
271
+ const h = S.slice(1);
272
+ (g = g || []).push(h in n ? n[h] : S.replace(/^@media ?/, "")), m = !0;
273
+ }
274
+ a += p, u = !0;
275
+ }
276
+ ++p;
277
+ }
278
+ if (g && g.length && (s = { ["@media " + g.join(", ")]: s }), !u)
279
+ continue e;
280
+ }
281
+ }
282
+ }
283
+ (o[a] = o[a] || []).push([r ? "cv" : `${c}-${i[c]}`, s, m]);
284
+ }
285
+ return o;
286
+ }, Vn = {}, _n = Te(), Yn = (e, t) => _n(e, () => (...n) => {
287
+ const r = () => {
288
+ for (let o of n) {
289
+ o = typeof o == "object" && o || {};
290
+ let i = ue(o);
291
+ if (!t.rules.global.cache.has(i)) {
292
+ if (t.rules.global.cache.add(i), "@import" in o) {
293
+ let s = [].indexOf.call(t.sheet.cssRules, t.rules.themed.group) - 1;
294
+ for (let l of [].concat(o["@import"]))
295
+ l = l.includes('"') || l.includes("'") ? l : `"${l}"`, t.sheet.insertRule(`@import ${l};`, s++);
296
+ delete o["@import"];
297
+ }
298
+ $e(o, [], [], e, (s) => {
299
+ t.rules.global.apply(s);
300
+ });
301
+ }
302
+ }
303
+ return "";
304
+ };
305
+ return ut(r, { toString: r });
306
+ }), Kn = Te(), Xn = (e, t) => Kn(e, () => (n) => {
307
+ const r = `${J(e.prefix)}k-${ue(n)}`, o = () => {
308
+ if (!t.rules.global.cache.has(r)) {
309
+ t.rules.global.cache.add(r);
310
+ const i = [];
311
+ $e(n, [], [], e, (l) => i.push(l));
312
+ const s = `@keyframes ${r}{${i.join("")}}`;
313
+ t.rules.global.apply(s);
314
+ }
315
+ return r;
316
+ };
317
+ return ut(o, { get name() {
318
+ return o();
319
+ }, toString: o });
320
+ }), Un = class {
321
+ constructor(e, t, n, r) {
322
+ this.token = e == null ? "" : String(e), this.value = t == null ? "" : String(t), this.scale = n == null ? "" : String(n), this.prefix = r == null ? "" : String(r);
323
+ }
324
+ get computedValue() {
325
+ return "var(" + this.variable + ")";
326
+ }
327
+ get variable() {
328
+ return "--" + J(this.prefix) + J(this.scale) + this.token;
329
+ }
330
+ toString() {
331
+ return this.computedValue;
332
+ }
333
+ }, qn = Te(), Gn = (e, t) => qn(e, () => (n, r) => {
334
+ r = typeof n == "object" && n || Object(r);
335
+ const o = `.${n = (n = typeof n == "string" ? n : "") || `${J(e.prefix)}t-${ue(r)}`}`, i = {}, s = [];
336
+ for (const c in r) {
337
+ i[c] = {};
338
+ for (const a in r[c]) {
339
+ const m = `--${J(e.prefix)}${c}-${a}`, d = Ut(String(r[c][a]), e.prefix, c);
340
+ i[c][a] = new Un(a, d, c, e.prefix), s.push(`${m}:${d}`);
341
+ }
342
+ }
343
+ const l = () => {
344
+ if (s.length && !t.rules.themed.cache.has(n)) {
345
+ t.rules.themed.cache.add(n);
346
+ const c = `${r === e.theme ? ":root," : ""}.${n}{${s.join(";")}}`;
347
+ t.rules.themed.apply(c);
348
+ }
349
+ return n;
350
+ };
351
+ return { ...i, get className() {
352
+ return l();
353
+ }, selector: o, toString: l };
354
+ }), Zn = Te(), Jn = Te(), Qn = (e) => {
355
+ const t = ((n) => {
356
+ let r = !1;
357
+ const o = Zn(n, (i) => {
358
+ r = !0;
359
+ const s = "prefix" in (i = typeof i == "object" && i || {}) ? String(i.prefix) : "", l = typeof i.media == "object" && i.media || {}, c = typeof i.root == "object" ? i.root || null : globalThis.document || null, a = typeof i.theme == "object" && i.theme || {}, m = { prefix: s, media: l, theme: a, themeMap: typeof i.themeMap == "object" && i.themeMap || { ...Cn }, utils: typeof i.utils == "object" && i.utils || {} }, d = Fn(c), f = { css: St(m, d), globalCss: Yn(m, d), keyframes: Xn(m, d), createTheme: Gn(m, d), reset() {
360
+ d.reset(), f.theme.toString();
361
+ }, theme: {}, sheet: d, config: m, prefix: s, getCssText: d.toString, toString: d.toString };
362
+ return String(f.theme = f.createTheme(a)), f;
363
+ });
364
+ return r || o.reset(), o;
365
+ })(e);
366
+ return t.styled = (({ config: n, sheet: r }) => Jn(n, () => {
367
+ const o = St(n, r);
368
+ return (...i) => {
369
+ const s = o(...i), l = s[ae].type, c = ve.forwardRef((a, m) => {
370
+ const d = a && a.as || l, { props: f, deferredInjector: u } = s(a);
371
+ return delete f.as, f.ref = m, u ? ve.createElement(ve.Fragment, null, ve.createElement(d, f), ve.createElement(u, null)) : ve.createElement(d, f);
372
+ });
373
+ return c.className = s.className, c.displayName = `Styled.${l.displayName || l.name || l}`, c.selector = s.selector, c.toString = () => s.selector, c[ae] = s[ae], c;
374
+ };
375
+ }))(t), t;
376
+ };
377
+ let $t = 9999;
378
+ const Ze = () => ($t--, $t), { styled: he, css: qt, keyframes: Ie, globalCss: ni } = Qn({
379
+ theme: {
380
+ colors: {
381
+ gray50: "#F9FAFA",
382
+ gray100: "#EBEEEE",
383
+ gray200: "#CFD6D7",
384
+ gray300: "#B3BEC0",
385
+ gray400: "#97A6A8",
386
+ gray500: "#7C8E91",
387
+ gray600: "#627578",
388
+ gray700: "#4F5F61",
389
+ gray800: "#414D4F",
390
+ gray900: "#2C3435",
391
+ blue50: "#F7FBFB",
392
+ blue100: "#E3F0F2",
393
+ blue200: "#BADADF",
394
+ blue300: "#92C5CC",
395
+ blue400: "#67AEB8",
396
+ blue500: "#3C97A3",
397
+ blue600: "#1F7D8A",
398
+ blue700: "#19656F",
399
+ blue800: "#14525B",
400
+ blue900: "#0E383E",
401
+ yellow50: "#FDFAEF",
402
+ yellow100: "#F9EDCA",
403
+ yellow200: "#EFD27A",
404
+ yellow300: "#E5B626",
405
+ yellow400: "#C89E1C",
406
+ yellow500: "#AA8618",
407
+ yellow600: "#8C6E14",
408
+ yellow700: "#715910",
409
+ yellow800: "#5C490D",
410
+ yellow900: "#3E3109",
411
+ orange500: "#D1721C",
412
+ red50: "#FDF9F9",
413
+ red100: "#F7EBEB",
414
+ red200: "#EBCECD",
415
+ red300: "#DFB1B0",
416
+ red400: "#D39392",
417
+ red500: "#C67473",
418
+ red600: "#B85250",
419
+ red700: "#A92F2D",
420
+ red800: "#901F1E",
421
+ red900: "#631614",
422
+ green50: "#F8FAF9",
423
+ green100: "#E7F0EA",
424
+ green200: "#C5D9CB",
425
+ green300: "#A4C4AD",
426
+ green400: "#82AD8D",
427
+ green500: "#60976F",
428
+ green600: "#3C7F4E",
429
+ green700: "#296839",
430
+ green800: "#21552F",
431
+ green900: "#163920",
432
+ // Primary
433
+ primaryTextOnLightBg: "#194b58",
434
+ primaryBg: "$blue600",
435
+ primaryBgHover: "$blue700",
436
+ primaryTextOnWhite: "$blue600",
437
+ bodyGray: "$gray100",
438
+ hoverDarker: "hsla(214deg, 25%, 21%, 0.06)",
439
+ borderDarker: "hsla(214deg, 25%, 21%, 0.1)",
440
+ selectedDarker: "hsla(214deg, 25%, 21%, 0.06)",
441
+ selectedOnBodyGray: "hsl(214deg, 35%, 80%)",
442
+ darkGrayBg: "#1f2937",
443
+ border: "hsl(214deg, 25%, 80%)",
444
+ text: "#1f2937",
445
+ secondaryText: "$gray500",
446
+ focusRing: "hsla(214deg, 15%, 10%, 0.6)"
447
+ },
448
+ fontSizes: {
449
+ xs: "0.75rem",
450
+ // 12px
451
+ sm: "0.875rem",
452
+ // 14px
453
+ md: "1rem",
454
+ // 16px
455
+ lg: "1.125rem",
456
+ // 18px
457
+ xl: "1.25rem",
458
+ // 20px
459
+ "2xl": "1.5rem",
460
+ // 24px
461
+ "3xl": "1.875rem"
462
+ // 30px
463
+ },
464
+ fontWeights: {
465
+ normal: "var(--ui-font-weight-normal)",
466
+ medium: "var(--ui-font-weight-semibold)",
467
+ bold: "var(--ui-font-weight-bold)"
468
+ },
469
+ space: {
470
+ 1: "0.25rem",
471
+ 2: "0.5rem",
472
+ 3: "0.75rem",
473
+ 4: "1rem",
474
+ 6: "1.5rem",
475
+ 8: "2rem"
476
+ },
477
+ shadows: {
478
+ xs: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
479
+ sm: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
480
+ md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
481
+ lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
482
+ overlayCard: "0 5px 50px 0px rgb(0 0 0 / 0.15), 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"
483
+ },
484
+ radii: {
485
+ xs: "0.125rem",
486
+ sm: "0.25rem",
487
+ md: "0.5rem",
488
+ mdmd: "calc(0.5rem - 0.125rem)",
489
+ full: "9999px"
490
+ },
491
+ zIndices: {
492
+ /**
493
+ * By using createLayerBelow() we can order the list of layers.
494
+ * Layers higher up will be on top of layers lower down.
495
+ */
496
+ toast: Ze(),
497
+ overlayCard: Ze(),
498
+ modal: Ze()
499
+ }
500
+ },
501
+ media: {
502
+ lg: "(min-width: 1200px)",
503
+ print: "print"
504
+ }
505
+ }), er = Ie({
506
+ "0%": {
507
+ transform: "rotate(0)"
508
+ },
509
+ "100%": {
510
+ transform: "rotate(360deg)"
511
+ }
512
+ }), tr = Ie({
513
+ "0%": {
514
+ strokeDashoffset: 600
515
+ },
516
+ "100%": {
517
+ strokeDashoffset: 0
518
+ }
519
+ }), nr = he("svg", {
520
+ animation: `${er} 2s linear infinite`
521
+ }), rr = he("circle", {
522
+ animation: `${tr} 1.6s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite`,
523
+ fill: "transparent",
524
+ stroke: "currentColor",
525
+ strokeDasharray: 300,
526
+ strokeDashoffset: 600,
527
+ strokeLinecap: "round",
528
+ strokeMiterlimit: 10,
529
+ strokeWidth: 12
530
+ }), or = he("div", {
531
+ lineHeight: 0,
532
+ flexShrink: 0,
533
+ variants: {
534
+ size: {
535
+ xs: {
536
+ width: "1rem",
537
+ height: "1rem"
538
+ },
539
+ sm: {
540
+ width: "1.25rem",
541
+ height: "1.25rem"
542
+ },
543
+ md: {
544
+ width: "1.75rem",
545
+ height: "1.75rem"
546
+ },
547
+ lg: {
548
+ width: "2.25rem",
549
+ height: "2.25rem"
550
+ }
551
+ },
552
+ color: {
553
+ light: {
554
+ color: "$gray200"
555
+ },
556
+ dark: {
557
+ color: "$gray800"
558
+ },
559
+ inherit: {
560
+ color: "inherit"
561
+ }
562
+ }
563
+ },
564
+ defaultVariants: {
565
+ size: "sm",
566
+ color: "dark"
567
+ }
568
+ }), ir = at(
569
+ (e, t) => /* @__PURE__ */ G.jsx(
570
+ or,
571
+ {
572
+ ref: t,
573
+ ...e,
574
+ children: /* @__PURE__ */ G.jsx(
575
+ nr,
576
+ {
577
+ x: "0px",
578
+ y: "0px",
579
+ viewBox: "0 0 150 150",
580
+ children: /* @__PURE__ */ G.jsx(
581
+ rr,
582
+ {
583
+ cx: "75",
584
+ cy: "75",
585
+ r: "60"
586
+ }
587
+ )
588
+ }
589
+ )
590
+ }
591
+ )
592
+ ), sr = he("button", {
593
+ appearance: "none",
594
+ margin: 0,
595
+ padding: 0,
596
+ border: "none",
597
+ background: "none",
598
+ cursor: "pointer",
599
+ fontFamily: "inherit",
600
+ textAlign: "left",
601
+ textDecoration: "none",
602
+ textIndent: 0,
603
+ lineHeight: 1.25,
604
+ display: "inline-flex",
605
+ justifyContent: "center",
606
+ alignItems: "center",
607
+ gap: "$2",
608
+ position: "relative",
609
+ fontWeight: "$medium",
610
+ borderRadius: "$sm",
611
+ whiteSpace: "nowrap",
612
+ transition: "background 0.2s ease-in-out",
613
+ "&:focus, &:focus-visible": {
614
+ outline: "none"
615
+ },
616
+ "&:focus-visible": {
617
+ boxShadow: "0 0 0 2px white, 0 0 0 4px $colors$focusRing"
618
+ },
619
+ "&:disabled": {
620
+ cursor: "not-allowed"
621
+ },
622
+ variants: {
623
+ color: {
624
+ primary: {
625
+ $$solid: "$colors$blue600",
626
+ $$solidHover: "$colors$blue700",
627
+ $$outline: "$colors$blue600",
628
+ $$outlineHover: "$colors$blue100",
629
+ $$outlineText: "$colors$blue600",
630
+ $$disabled: "$colors$blue200"
631
+ },
632
+ secondary: {
633
+ $$solid: "$colors$gray600",
634
+ $$solidHover: "$colors$gray700",
635
+ $$outline: "$colors$gray400",
636
+ $$outlineHover: "$colors$gray100",
637
+ $$outlineText: "$colors$gray600",
638
+ $$disabled: "$colors$gray200"
639
+ },
640
+ success: {
641
+ $$solid: "$colors$green600",
642
+ $$solidHover: "$colors$green700",
643
+ $$outline: "$colors$green600",
644
+ $$outlineHover: "$colors$green100",
645
+ $$outlineText: "$colors$green600",
646
+ $$disabled: "$colors$green200"
647
+ },
648
+ danger: {
649
+ $$solid: "$colors$red600",
650
+ $$solidHover: "$colors$red700",
651
+ $$outline: "$colors$red600",
652
+ $$outlineHover: "$colors$red100",
653
+ $$outlineText: "$colors$red600",
654
+ $$disabled: "$colors$red200"
655
+ },
656
+ warning: {
657
+ $$solid: "$colors$yellow600",
658
+ $$solidHover: "$colors$yellow700",
659
+ $$outline: "$colors$yellow400",
660
+ $$outlineHover: "$colors$yellow50",
661
+ $$outlineText: "$colors$yellow600",
662
+ $$disabled: "$colors$yellow100"
663
+ }
664
+ },
665
+ size: {
666
+ md: {
667
+ fontSize: "$sm",
668
+ padding: "$2 $4",
669
+ height: "2.25rem"
670
+ },
671
+ lg: {
672
+ fontSize: "$md",
673
+ padding: "$3 $6",
674
+ height: "2.75rem"
675
+ }
676
+ },
677
+ variant: {
678
+ primary: {
679
+ background: "$$solid",
680
+ color: "white",
681
+ "&:hover:enabled": {
682
+ backgroundColor: "$$solidHover"
683
+ },
684
+ "&:disabled": {
685
+ backgroundColor: "$$disabled"
686
+ }
687
+ },
688
+ outline: {
689
+ boxShadow: "inset 0 0 0 1px $$outline",
690
+ color: "$$outlineText",
691
+ "&:hover:enabled": {
692
+ backgroundColor: "$$outlineHover"
693
+ },
694
+ "&:disabled": {
695
+ boxShadow: "inset 0 0 0 1px $$disabled",
696
+ color: "$$disabled"
697
+ }
698
+ },
699
+ transparent: {
700
+ backgroundColor: "transparent",
701
+ color: "$$outlineText",
702
+ "&:hover:enabled": {
703
+ backgroundColor: "$$outlineHover"
704
+ },
705
+ "&:disabled": {
706
+ color: "$$disabled"
707
+ }
708
+ }
709
+ },
710
+ icon: {
711
+ true: {}
712
+ }
713
+ },
714
+ compoundVariants: [
715
+ {
716
+ icon: !0,
717
+ size: "md",
718
+ css: {
719
+ padding: "$2",
720
+ width: "2.25rem"
721
+ }
722
+ },
723
+ {
724
+ icon: !0,
725
+ size: "lg",
726
+ css: {
727
+ padding: "$2",
728
+ width: "2.75rem"
729
+ }
730
+ }
731
+ ],
732
+ defaultVariants: {
733
+ variant: "outline",
734
+ color: "secondary",
735
+ size: "md"
736
+ }
737
+ }), ri = at(
738
+ ({ children: e, disabled: t, isLoading: n, variant: r, color: o, ...i }, s) => (!o && r === "primary" && (o = "primary"), /* @__PURE__ */ G.jsxs(
739
+ sr,
740
+ {
741
+ ref: s,
742
+ type: "button",
743
+ disabled: t || n,
744
+ variant: r,
745
+ color: o,
746
+ ...i,
747
+ children: [
748
+ e,
749
+ n && /* @__PURE__ */ G.jsx(ir, { color: "inherit" })
750
+ ]
751
+ }
752
+ ))
753
+ ), lr = he("div", {
754
+ padding: "$3",
755
+ borderRadius: "$md",
756
+ variants: {
757
+ color: {
758
+ warning: {
759
+ background: "$yellow200",
760
+ border: "1px solid $yellow400",
761
+ color: "$yellow900"
762
+ },
763
+ danger: {
764
+ background: "$red200",
765
+ border: "1px solid $red400",
766
+ color: "$red900"
767
+ },
768
+ info: {
769
+ background: "$blue200",
770
+ border: "1px solid $blue400",
771
+ color: "$blue900"
772
+ },
773
+ success: {
774
+ background: "$green200",
775
+ border: "1px solid $green400",
776
+ color: "$green900"
777
+ }
778
+ },
779
+ size: {
780
+ sm: {
781
+ fontSize: "$sm"
782
+ },
783
+ md: {
784
+ fontSize: "$md"
785
+ }
786
+ }
787
+ },
788
+ defaultVariants: {
789
+ color: "info",
790
+ size: "md"
791
+ }
792
+ }), oi = at(
793
+ ({ children: e, ...t }, n) => /* @__PURE__ */ G.jsx(
794
+ lr,
795
+ {
796
+ ref: n,
797
+ role: "alert",
798
+ ...t,
799
+ children: e
800
+ }
801
+ )
802
+ ), cr = Ie({
803
+ "0%": { opacity: 0, transform: "translateY(0.5rem)" },
804
+ "100%": { opacity: 1, transform: "translateY(0)" }
805
+ }), ar = Ie({
806
+ "0%": { opacity: 0, transform: "translateX(-0.5rem)" },
807
+ "100%": { opacity: 1, transform: "translateX(0)" }
808
+ }), ur = Ie({
809
+ "0%": { opacity: 0, transform: "translateY(-0.5rem)" },
810
+ "100%": { opacity: 1, transform: "translateY(0)" }
811
+ }), dr = Ie({
812
+ "0%": { opacity: 0, transform: "translateX(0.5rem)" },
813
+ "100%": { opacity: 1, transform: "translateX(0)" }
814
+ }), fr = qt({
815
+ backgroundColor: "white",
816
+ boxShadow: "$overlayCard",
817
+ borderRadius: "$sm",
818
+ overflow: "hidden",
819
+ zIndex: "$overlayCard"
820
+ }), mr = qt({
821
+ animationDuration: "400ms",
822
+ animationTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
823
+ willChange: "transform, opacity",
824
+ '&[data-state="open"]': {
825
+ '&[data-side="top"]': { animationName: ur },
826
+ '&[data-side="right"]': { animationName: dr },
827
+ '&[data-side="bottom"]': { animationName: cr },
828
+ '&[data-side="left"]': { animationName: ar }
829
+ }
830
+ }), gr = he(
831
+ "div",
832
+ fr,
833
+ mr
834
+ );
835
+ function te(e) {
836
+ return Gt(e) ? (e.nodeName || "").toLowerCase() : "#document";
837
+ }
838
+ function X(e) {
839
+ var t;
840
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
841
+ }
842
+ function Q(e) {
843
+ var t;
844
+ return (t = (Gt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
845
+ }
846
+ function Gt(e) {
847
+ return e instanceof Node || e instanceof X(e).Node;
848
+ }
849
+ function W(e) {
850
+ return e instanceof Element || e instanceof X(e).Element;
851
+ }
852
+ function U(e) {
853
+ return e instanceof HTMLElement || e instanceof X(e).HTMLElement;
854
+ }
855
+ function ot(e) {
856
+ return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof X(e).ShadowRoot;
857
+ }
858
+ function Oe(e) {
859
+ const {
860
+ overflow: t,
861
+ overflowX: n,
862
+ overflowY: r,
863
+ display: o
864
+ } = q(e);
865
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
866
+ }
867
+ function pr(e) {
868
+ return ["table", "td", "th"].includes(te(e));
869
+ }
870
+ function dt(e) {
871
+ const t = ft(), n = q(e);
872
+ return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
873
+ }
874
+ function hr(e) {
875
+ let t = me(e);
876
+ for (; U(t) && !ke(t); ) {
877
+ if (dt(t))
878
+ return t;
879
+ t = me(t);
880
+ }
881
+ return null;
882
+ }
883
+ function ft() {
884
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
885
+ }
886
+ function ke(e) {
887
+ return ["html", "body", "#document"].includes(te(e));
888
+ }
889
+ function q(e) {
890
+ return X(e).getComputedStyle(e);
891
+ }
892
+ function Ye(e) {
893
+ return W(e) ? {
894
+ scrollLeft: e.scrollLeft,
895
+ scrollTop: e.scrollTop
896
+ } : {
897
+ scrollLeft: e.pageXOffset,
898
+ scrollTop: e.pageYOffset
899
+ };
900
+ }
901
+ function me(e) {
902
+ if (te(e) === "html")
903
+ return e;
904
+ const t = (
905
+ // Step into the shadow DOM of the parent of a slotted node.
906
+ e.assignedSlot || // DOM Element detected.
907
+ e.parentNode || // ShadowRoot detected.
908
+ ot(e) && e.host || // Fallback.
909
+ Q(e)
910
+ );
911
+ return ot(t) ? t.host : t;
912
+ }
913
+ function Zt(e) {
914
+ const t = me(e);
915
+ return ke(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && Oe(t) ? t : Zt(t);
916
+ }
917
+ function ee(e, t, n) {
918
+ var r;
919
+ t === void 0 && (t = []), n === void 0 && (n = !0);
920
+ const o = Zt(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = X(o);
921
+ return i ? t.concat(s, s.visualViewport || [], Oe(o) ? o : [], s.frameElement && n ? ee(s.frameElement) : []) : t.concat(o, ee(o, [], n));
922
+ }
923
+ function br(e) {
924
+ let t = e.activeElement;
925
+ for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) {
926
+ var n;
927
+ t = t.shadowRoot.activeElement;
928
+ }
929
+ return t;
930
+ }
931
+ function de(e, t) {
932
+ if (!e || !t)
933
+ return !1;
934
+ const n = t.getRootNode == null ? void 0 : t.getRootNode();
935
+ if (e.contains(t))
936
+ return !0;
937
+ if (n && ot(n)) {
938
+ let r = t;
939
+ for (; r; ) {
940
+ if (e === r)
941
+ return !0;
942
+ r = r.parentNode || r.host;
943
+ }
944
+ }
945
+ return !1;
946
+ }
947
+ function yr() {
948
+ return /apple/i.test(navigator.vendor);
949
+ }
950
+ function Fe(e, t) {
951
+ const n = ["mouse", "pen"];
952
+ return t || n.push("", void 0), n.includes(e);
953
+ }
954
+ function vr(e) {
955
+ return "nativeEvent" in e;
956
+ }
957
+ function xr(e) {
958
+ return e.matches("html,body");
959
+ }
960
+ function ce(e) {
961
+ return (e == null ? void 0 : e.ownerDocument) || document;
962
+ }
963
+ function Je(e, t) {
964
+ if (t == null)
965
+ return !1;
966
+ if ("composedPath" in e)
967
+ return e.composedPath().includes(t);
968
+ const n = e;
969
+ return n.target != null && t.contains(n.target);
970
+ }
971
+ function Se(e) {
972
+ return "composedPath" in e ? e.composedPath()[0] : e.target;
973
+ }
974
+ const wr = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
975
+ function Sr(e) {
976
+ return U(e) && e.matches(wr);
977
+ }
978
+ const Ne = Math.min, fe = Math.max, We = Math.round, De = Math.floor, ne = (e) => ({
979
+ x: e,
980
+ y: e
981
+ }), Er = {
982
+ left: "right",
983
+ right: "left",
984
+ bottom: "top",
985
+ top: "bottom"
986
+ }, $r = {
987
+ start: "end",
988
+ end: "start"
989
+ };
990
+ function Rt(e, t, n) {
991
+ return fe(e, Ne(t, n));
992
+ }
993
+ function Ke(e, t) {
994
+ return typeof e == "function" ? e(t) : e;
995
+ }
996
+ function ge(e) {
997
+ return e.split("-")[0];
998
+ }
999
+ function Xe(e) {
1000
+ return e.split("-")[1];
1001
+ }
1002
+ function Jt(e) {
1003
+ return e === "x" ? "y" : "x";
1004
+ }
1005
+ function Qt(e) {
1006
+ return e === "y" ? "height" : "width";
1007
+ }
1008
+ function Ue(e) {
1009
+ return ["top", "bottom"].includes(ge(e)) ? "y" : "x";
1010
+ }
1011
+ function en(e) {
1012
+ return Jt(Ue(e));
1013
+ }
1014
+ function Rr(e, t, n) {
1015
+ n === void 0 && (n = !1);
1016
+ const r = Xe(e), o = en(e), i = Qt(o);
1017
+ let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
1018
+ return t.reference[i] > t.floating[i] && (s = je(s)), [s, je(s)];
1019
+ }
1020
+ function Cr(e) {
1021
+ const t = je(e);
1022
+ return [it(e), t, it(t)];
1023
+ }
1024
+ function it(e) {
1025
+ return e.replace(/start|end/g, (t) => $r[t]);
1026
+ }
1027
+ function kr(e, t, n) {
1028
+ const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
1029
+ switch (e) {
1030
+ case "top":
1031
+ case "bottom":
1032
+ return n ? t ? o : r : t ? r : o;
1033
+ case "left":
1034
+ case "right":
1035
+ return t ? i : s;
1036
+ default:
1037
+ return [];
1038
+ }
1039
+ }
1040
+ function Tr(e, t, n, r) {
1041
+ const o = Xe(e);
1042
+ let i = kr(ge(e), n === "start", r);
1043
+ return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(it)))), i;
1044
+ }
1045
+ function je(e) {
1046
+ return e.replace(/left|right|bottom|top/g, (t) => Er[t]);
1047
+ }
1048
+ function Ir(e) {
1049
+ return {
1050
+ top: 0,
1051
+ right: 0,
1052
+ bottom: 0,
1053
+ left: 0,
1054
+ ...e
1055
+ };
1056
+ }
1057
+ function Pr(e) {
1058
+ return typeof e != "number" ? Ir(e) : {
1059
+ top: e,
1060
+ right: e,
1061
+ bottom: e,
1062
+ left: e
1063
+ };
1064
+ }
1065
+ function ze(e) {
1066
+ return {
1067
+ ...e,
1068
+ top: e.y,
1069
+ left: e.x,
1070
+ right: e.x + e.width,
1071
+ bottom: e.y + e.height
1072
+ };
1073
+ }
1074
+ function Ct(e, t, n) {
1075
+ let {
1076
+ reference: r,
1077
+ floating: o
1078
+ } = e;
1079
+ const i = Ue(t), s = en(t), l = Qt(s), c = ge(t), a = i === "y", m = r.x + r.width / 2 - o.width / 2, d = r.y + r.height / 2 - o.height / 2, f = r[l] / 2 - o[l] / 2;
1080
+ let u;
1081
+ switch (c) {
1082
+ case "top":
1083
+ u = {
1084
+ x: m,
1085
+ y: r.y - o.height
1086
+ };
1087
+ break;
1088
+ case "bottom":
1089
+ u = {
1090
+ x: m,
1091
+ y: r.y + r.height
1092
+ };
1093
+ break;
1094
+ case "right":
1095
+ u = {
1096
+ x: r.x + r.width,
1097
+ y: d
1098
+ };
1099
+ break;
1100
+ case "left":
1101
+ u = {
1102
+ x: r.x - o.width,
1103
+ y: d
1104
+ };
1105
+ break;
1106
+ default:
1107
+ u = {
1108
+ x: r.x,
1109
+ y: r.y
1110
+ };
1111
+ }
1112
+ switch (Xe(t)) {
1113
+ case "start":
1114
+ u[s] -= f * (n && a ? -1 : 1);
1115
+ break;
1116
+ case "end":
1117
+ u[s] += f * (n && a ? -1 : 1);
1118
+ break;
1119
+ }
1120
+ return u;
1121
+ }
1122
+ const Ar = async (e, t, n) => {
1123
+ const {
1124
+ placement: r = "bottom",
1125
+ strategy: o = "absolute",
1126
+ middleware: i = [],
1127
+ platform: s
1128
+ } = n, l = i.filter(Boolean), c = await (s.isRTL == null ? void 0 : s.isRTL(t));
1129
+ let a = await s.getElementRects({
1130
+ reference: e,
1131
+ floating: t,
1132
+ strategy: o
1133
+ }), {
1134
+ x: m,
1135
+ y: d
1136
+ } = Ct(a, r, c), f = r, u = {}, g = 0;
1137
+ for (let p = 0; p < l.length; p++) {
1138
+ const {
1139
+ name: S,
1140
+ fn: h
1141
+ } = l[p], {
1142
+ x,
1143
+ y: P,
1144
+ data: E,
1145
+ reset: C
1146
+ } = await h({
1147
+ x: m,
1148
+ y: d,
1149
+ initialPlacement: r,
1150
+ placement: f,
1151
+ strategy: o,
1152
+ middlewareData: u,
1153
+ rects: a,
1154
+ platform: s,
1155
+ elements: {
1156
+ reference: e,
1157
+ floating: t
1158
+ }
1159
+ });
1160
+ m = x ?? m, d = P ?? d, u = {
1161
+ ...u,
1162
+ [S]: {
1163
+ ...u[S],
1164
+ ...E
1165
+ }
1166
+ }, C && g <= 50 && (g++, typeof C == "object" && (C.placement && (f = C.placement), C.rects && (a = C.rects === !0 ? await s.getElementRects({
1167
+ reference: e,
1168
+ floating: t,
1169
+ strategy: o
1170
+ }) : C.rects), {
1171
+ x: m,
1172
+ y: d
1173
+ } = Ct(a, f, c)), p = -1);
1174
+ }
1175
+ return {
1176
+ x: m,
1177
+ y: d,
1178
+ placement: f,
1179
+ strategy: o,
1180
+ middlewareData: u
1181
+ };
1182
+ };
1183
+ async function tn(e, t) {
1184
+ var n;
1185
+ t === void 0 && (t = {});
1186
+ const {
1187
+ x: r,
1188
+ y: o,
1189
+ platform: i,
1190
+ rects: s,
1191
+ elements: l,
1192
+ strategy: c
1193
+ } = e, {
1194
+ boundary: a = "clippingAncestors",
1195
+ rootBoundary: m = "viewport",
1196
+ elementContext: d = "floating",
1197
+ altBoundary: f = !1,
1198
+ padding: u = 0
1199
+ } = Ke(t, e), g = Pr(u), S = l[f ? d === "floating" ? "reference" : "floating" : d], h = ze(await i.getClippingRect({
1200
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(S))) == null || n ? S : S.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
1201
+ boundary: a,
1202
+ rootBoundary: m,
1203
+ strategy: c
1204
+ })), x = d === "floating" ? {
1205
+ ...s.floating,
1206
+ x: r,
1207
+ y: o
1208
+ } : s.reference, P = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating)), E = await (i.isElement == null ? void 0 : i.isElement(P)) ? await (i.getScale == null ? void 0 : i.getScale(P)) || {
1209
+ x: 1,
1210
+ y: 1
1211
+ } : {
1212
+ x: 1,
1213
+ y: 1
1214
+ }, C = ze(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
1215
+ elements: l,
1216
+ rect: x,
1217
+ offsetParent: P,
1218
+ strategy: c
1219
+ }) : x);
1220
+ return {
1221
+ top: (h.top - C.top + g.top) / E.y,
1222
+ bottom: (C.bottom - h.bottom + g.bottom) / E.y,
1223
+ left: (h.left - C.left + g.left) / E.x,
1224
+ right: (C.right - h.right + g.right) / E.x
1225
+ };
1226
+ }
1227
+ const Br = function(e) {
1228
+ return e === void 0 && (e = {}), {
1229
+ name: "flip",
1230
+ options: e,
1231
+ async fn(t) {
1232
+ var n, r;
1233
+ const {
1234
+ placement: o,
1235
+ middlewareData: i,
1236
+ rects: s,
1237
+ initialPlacement: l,
1238
+ platform: c,
1239
+ elements: a
1240
+ } = t, {
1241
+ mainAxis: m = !0,
1242
+ crossAxis: d = !0,
1243
+ fallbackPlacements: f,
1244
+ fallbackStrategy: u = "bestFit",
1245
+ fallbackAxisSideDirection: g = "none",
1246
+ flipAlignment: p = !0,
1247
+ ...S
1248
+ } = Ke(e, t);
1249
+ if ((n = i.arrow) != null && n.alignmentOffset)
1250
+ return {};
1251
+ const h = ge(o), x = ge(l) === l, P = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), E = f || (x || !p ? [je(l)] : Cr(l));
1252
+ !f && g !== "none" && E.push(...Tr(l, p, g, P));
1253
+ const C = [l, ...E], I = await tn(t, S), A = [];
1254
+ let k = ((r = i.flip) == null ? void 0 : r.overflows) || [];
1255
+ if (m && A.push(I[h]), d) {
1256
+ const M = Rr(o, s, P);
1257
+ A.push(I[M[0]], I[M[1]]);
1258
+ }
1259
+ if (k = [...k, {
1260
+ placement: o,
1261
+ overflows: A
1262
+ }], !A.every((M) => M <= 0)) {
1263
+ var O, D;
1264
+ const M = (((O = i.flip) == null ? void 0 : O.index) || 0) + 1, B = C[M];
1265
+ if (B)
1266
+ return {
1267
+ data: {
1268
+ index: M,
1269
+ overflows: k
1270
+ },
1271
+ reset: {
1272
+ placement: B
1273
+ }
1274
+ };
1275
+ let b = (D = k.filter((v) => v.overflows[0] <= 0).sort((v, T) => v.overflows[1] - T.overflows[1])[0]) == null ? void 0 : D.placement;
1276
+ if (!b)
1277
+ switch (u) {
1278
+ case "bestFit": {
1279
+ var L;
1280
+ const v = (L = k.map((T) => [T.placement, T.overflows.filter(($) => $ > 0).reduce(($, w) => $ + w, 0)]).sort((T, $) => T[1] - $[1])[0]) == null ? void 0 : L[0];
1281
+ v && (b = v);
1282
+ break;
1283
+ }
1284
+ case "initialPlacement":
1285
+ b = l;
1286
+ break;
1287
+ }
1288
+ if (o !== b)
1289
+ return {
1290
+ reset: {
1291
+ placement: b
1292
+ }
1293
+ };
1294
+ }
1295
+ return {};
1296
+ }
1297
+ };
1298
+ };
1299
+ async function Or(e, t) {
1300
+ const {
1301
+ placement: n,
1302
+ platform: r,
1303
+ elements: o
1304
+ } = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = ge(n), l = Xe(n), c = Ue(n) === "y", a = ["left", "top"].includes(s) ? -1 : 1, m = i && c ? -1 : 1, d = Ke(t, e);
1305
+ let {
1306
+ mainAxis: f,
1307
+ crossAxis: u,
1308
+ alignmentAxis: g
1309
+ } = typeof d == "number" ? {
1310
+ mainAxis: d,
1311
+ crossAxis: 0,
1312
+ alignmentAxis: null
1313
+ } : {
1314
+ mainAxis: 0,
1315
+ crossAxis: 0,
1316
+ alignmentAxis: null,
1317
+ ...d
1318
+ };
1319
+ return l && typeof g == "number" && (u = l === "end" ? g * -1 : g), c ? {
1320
+ x: u * m,
1321
+ y: f * a
1322
+ } : {
1323
+ x: f * a,
1324
+ y: u * m
1325
+ };
1326
+ }
1327
+ const Dr = function(e) {
1328
+ return e === void 0 && (e = 0), {
1329
+ name: "offset",
1330
+ options: e,
1331
+ async fn(t) {
1332
+ var n, r;
1333
+ const {
1334
+ x: o,
1335
+ y: i,
1336
+ placement: s,
1337
+ middlewareData: l
1338
+ } = t, c = await Or(t, e);
1339
+ return s === ((n = l.offset) == null ? void 0 : n.placement) && (r = l.arrow) != null && r.alignmentOffset ? {} : {
1340
+ x: o + c.x,
1341
+ y: i + c.y,
1342
+ data: {
1343
+ ...c,
1344
+ placement: s
1345
+ }
1346
+ };
1347
+ }
1348
+ };
1349
+ }, Mr = function(e) {
1350
+ return e === void 0 && (e = {}), {
1351
+ name: "shift",
1352
+ options: e,
1353
+ async fn(t) {
1354
+ const {
1355
+ x: n,
1356
+ y: r,
1357
+ placement: o
1358
+ } = t, {
1359
+ mainAxis: i = !0,
1360
+ crossAxis: s = !1,
1361
+ limiter: l = {
1362
+ fn: (S) => {
1363
+ let {
1364
+ x: h,
1365
+ y: x
1366
+ } = S;
1367
+ return {
1368
+ x: h,
1369
+ y: x
1370
+ };
1371
+ }
1372
+ },
1373
+ ...c
1374
+ } = Ke(e, t), a = {
1375
+ x: n,
1376
+ y: r
1377
+ }, m = await tn(t, c), d = Ue(ge(o)), f = Jt(d);
1378
+ let u = a[f], g = a[d];
1379
+ if (i) {
1380
+ const S = f === "y" ? "top" : "left", h = f === "y" ? "bottom" : "right", x = u + m[S], P = u - m[h];
1381
+ u = Rt(x, u, P);
1382
+ }
1383
+ if (s) {
1384
+ const S = d === "y" ? "top" : "left", h = d === "y" ? "bottom" : "right", x = g + m[S], P = g - m[h];
1385
+ g = Rt(x, g, P);
1386
+ }
1387
+ const p = l.fn({
1388
+ ...t,
1389
+ [f]: u,
1390
+ [d]: g
1391
+ });
1392
+ return {
1393
+ ...p,
1394
+ data: {
1395
+ x: p.x - n,
1396
+ y: p.y - r
1397
+ }
1398
+ };
1399
+ }
1400
+ };
1401
+ };
1402
+ function nn(e) {
1403
+ const t = q(e);
1404
+ let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
1405
+ const o = U(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, l = We(n) !== i || We(r) !== s;
1406
+ return l && (n = i, r = s), {
1407
+ width: n,
1408
+ height: r,
1409
+ $: l
1410
+ };
1411
+ }
1412
+ function mt(e) {
1413
+ return W(e) ? e : e.contextElement;
1414
+ }
1415
+ function Ce(e) {
1416
+ const t = mt(e);
1417
+ if (!U(t))
1418
+ return ne(1);
1419
+ const n = t.getBoundingClientRect(), {
1420
+ width: r,
1421
+ height: o,
1422
+ $: i
1423
+ } = nn(t);
1424
+ let s = (i ? We(n.width) : n.width) / r, l = (i ? We(n.height) : n.height) / o;
1425
+ return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
1426
+ x: s,
1427
+ y: l
1428
+ };
1429
+ }
1430
+ const Lr = /* @__PURE__ */ ne(0);
1431
+ function rn(e) {
1432
+ const t = X(e);
1433
+ return !ft() || !t.visualViewport ? Lr : {
1434
+ x: t.visualViewport.offsetLeft,
1435
+ y: t.visualViewport.offsetTop
1436
+ };
1437
+ }
1438
+ function Fr(e, t, n) {
1439
+ return t === void 0 && (t = !1), !n || t && n !== X(e) ? !1 : t;
1440
+ }
1441
+ function pe(e, t, n, r) {
1442
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
1443
+ const o = e.getBoundingClientRect(), i = mt(e);
1444
+ let s = ne(1);
1445
+ t && (r ? W(r) && (s = Ce(r)) : s = Ce(e));
1446
+ const l = Fr(i, n, r) ? rn(i) : ne(0);
1447
+ let c = (o.left + l.x) / s.x, a = (o.top + l.y) / s.y, m = o.width / s.x, d = o.height / s.y;
1448
+ if (i) {
1449
+ const f = X(i), u = r && W(r) ? X(r) : r;
1450
+ let g = f, p = g.frameElement;
1451
+ for (; p && r && u !== g; ) {
1452
+ const S = Ce(p), h = p.getBoundingClientRect(), x = q(p), P = h.left + (p.clientLeft + parseFloat(x.paddingLeft)) * S.x, E = h.top + (p.clientTop + parseFloat(x.paddingTop)) * S.y;
1453
+ c *= S.x, a *= S.y, m *= S.x, d *= S.y, c += P, a += E, g = X(p), p = g.frameElement;
1454
+ }
1455
+ }
1456
+ return ze({
1457
+ width: m,
1458
+ height: d,
1459
+ x: c,
1460
+ y: a
1461
+ });
1462
+ }
1463
+ const Nr = [":popover-open", ":modal"];
1464
+ function on(e) {
1465
+ return Nr.some((t) => {
1466
+ try {
1467
+ return e.matches(t);
1468
+ } catch {
1469
+ return !1;
1470
+ }
1471
+ });
1472
+ }
1473
+ function Wr(e) {
1474
+ let {
1475
+ elements: t,
1476
+ rect: n,
1477
+ offsetParent: r,
1478
+ strategy: o
1479
+ } = e;
1480
+ const i = o === "fixed", s = Q(r), l = t ? on(t.floating) : !1;
1481
+ if (r === s || l && i)
1482
+ return n;
1483
+ let c = {
1484
+ scrollLeft: 0,
1485
+ scrollTop: 0
1486
+ }, a = ne(1);
1487
+ const m = ne(0), d = U(r);
1488
+ if ((d || !d && !i) && ((te(r) !== "body" || Oe(s)) && (c = Ye(r)), U(r))) {
1489
+ const f = pe(r);
1490
+ a = Ce(r), m.x = f.x + r.clientLeft, m.y = f.y + r.clientTop;
1491
+ }
1492
+ return {
1493
+ width: n.width * a.x,
1494
+ height: n.height * a.y,
1495
+ x: n.x * a.x - c.scrollLeft * a.x + m.x,
1496
+ y: n.y * a.y - c.scrollTop * a.y + m.y
1497
+ };
1498
+ }
1499
+ function jr(e) {
1500
+ return Array.from(e.getClientRects());
1501
+ }
1502
+ function sn(e) {
1503
+ return pe(Q(e)).left + Ye(e).scrollLeft;
1504
+ }
1505
+ function zr(e) {
1506
+ const t = Q(e), n = Ye(e), r = e.ownerDocument.body, o = fe(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = fe(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
1507
+ let s = -n.scrollLeft + sn(e);
1508
+ const l = -n.scrollTop;
1509
+ return q(r).direction === "rtl" && (s += fe(t.clientWidth, r.clientWidth) - o), {
1510
+ width: o,
1511
+ height: i,
1512
+ x: s,
1513
+ y: l
1514
+ };
1515
+ }
1516
+ function Hr(e, t) {
1517
+ const n = X(e), r = Q(e), o = n.visualViewport;
1518
+ let i = r.clientWidth, s = r.clientHeight, l = 0, c = 0;
1519
+ if (o) {
1520
+ i = o.width, s = o.height;
1521
+ const a = ft();
1522
+ (!a || a && t === "fixed") && (l = o.offsetLeft, c = o.offsetTop);
1523
+ }
1524
+ return {
1525
+ width: i,
1526
+ height: s,
1527
+ x: l,
1528
+ y: c
1529
+ };
1530
+ }
1531
+ function Vr(e, t) {
1532
+ const n = pe(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = U(e) ? Ce(e) : ne(1), s = e.clientWidth * i.x, l = e.clientHeight * i.y, c = o * i.x, a = r * i.y;
1533
+ return {
1534
+ width: s,
1535
+ height: l,
1536
+ x: c,
1537
+ y: a
1538
+ };
1539
+ }
1540
+ function kt(e, t, n) {
1541
+ let r;
1542
+ if (t === "viewport")
1543
+ r = Hr(e, n);
1544
+ else if (t === "document")
1545
+ r = zr(Q(e));
1546
+ else if (W(t))
1547
+ r = Vr(t, n);
1548
+ else {
1549
+ const o = rn(e);
1550
+ r = {
1551
+ ...t,
1552
+ x: t.x - o.x,
1553
+ y: t.y - o.y
1554
+ };
1555
+ }
1556
+ return ze(r);
1557
+ }
1558
+ function ln(e, t) {
1559
+ const n = me(e);
1560
+ return n === t || !W(n) || ke(n) ? !1 : q(n).position === "fixed" || ln(n, t);
1561
+ }
1562
+ function _r(e, t) {
1563
+ const n = t.get(e);
1564
+ if (n)
1565
+ return n;
1566
+ let r = ee(e, [], !1).filter((l) => W(l) && te(l) !== "body"), o = null;
1567
+ const i = q(e).position === "fixed";
1568
+ let s = i ? me(e) : e;
1569
+ for (; W(s) && !ke(s); ) {
1570
+ const l = q(s), c = dt(s);
1571
+ !c && l.position === "fixed" && (o = null), (i ? !c && !o : !c && l.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || Oe(s) && !c && ln(e, s)) ? r = r.filter((m) => m !== s) : o = l, s = me(s);
1572
+ }
1573
+ return t.set(e, r), r;
1574
+ }
1575
+ function Yr(e) {
1576
+ let {
1577
+ element: t,
1578
+ boundary: n,
1579
+ rootBoundary: r,
1580
+ strategy: o
1581
+ } = e;
1582
+ const s = [...n === "clippingAncestors" ? _r(t, this._c) : [].concat(n), r], l = s[0], c = s.reduce((a, m) => {
1583
+ const d = kt(t, m, o);
1584
+ return a.top = fe(d.top, a.top), a.right = Ne(d.right, a.right), a.bottom = Ne(d.bottom, a.bottom), a.left = fe(d.left, a.left), a;
1585
+ }, kt(t, l, o));
1586
+ return {
1587
+ width: c.right - c.left,
1588
+ height: c.bottom - c.top,
1589
+ x: c.left,
1590
+ y: c.top
1591
+ };
1592
+ }
1593
+ function Kr(e) {
1594
+ const {
1595
+ width: t,
1596
+ height: n
1597
+ } = nn(e);
1598
+ return {
1599
+ width: t,
1600
+ height: n
1601
+ };
1602
+ }
1603
+ function Xr(e, t, n) {
1604
+ const r = U(t), o = Q(t), i = n === "fixed", s = pe(e, !0, i, t);
1605
+ let l = {
1606
+ scrollLeft: 0,
1607
+ scrollTop: 0
1608
+ };
1609
+ const c = ne(0);
1610
+ if (r || !r && !i)
1611
+ if ((te(t) !== "body" || Oe(o)) && (l = Ye(t)), r) {
1612
+ const d = pe(t, !0, i, t);
1613
+ c.x = d.x + t.clientLeft, c.y = d.y + t.clientTop;
1614
+ } else
1615
+ o && (c.x = sn(o));
1616
+ const a = s.left + l.scrollLeft - c.x, m = s.top + l.scrollTop - c.y;
1617
+ return {
1618
+ x: a,
1619
+ y: m,
1620
+ width: s.width,
1621
+ height: s.height
1622
+ };
1623
+ }
1624
+ function Tt(e, t) {
1625
+ return !U(e) || q(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
1626
+ }
1627
+ function cn(e, t) {
1628
+ const n = X(e);
1629
+ if (!U(e) || on(e))
1630
+ return n;
1631
+ let r = Tt(e, t);
1632
+ for (; r && pr(r) && q(r).position === "static"; )
1633
+ r = Tt(r, t);
1634
+ return r && (te(r) === "html" || te(r) === "body" && q(r).position === "static" && !dt(r)) ? n : r || hr(e) || n;
1635
+ }
1636
+ const Ur = async function(e) {
1637
+ const t = this.getOffsetParent || cn, n = this.getDimensions;
1638
+ return {
1639
+ reference: Xr(e.reference, await t(e.floating), e.strategy),
1640
+ floating: {
1641
+ x: 0,
1642
+ y: 0,
1643
+ ...await n(e.floating)
1644
+ }
1645
+ };
1646
+ };
1647
+ function qr(e) {
1648
+ return q(e).direction === "rtl";
1649
+ }
1650
+ const Gr = {
1651
+ convertOffsetParentRelativeRectToViewportRelativeRect: Wr,
1652
+ getDocumentElement: Q,
1653
+ getClippingRect: Yr,
1654
+ getOffsetParent: cn,
1655
+ getElementRects: Ur,
1656
+ getClientRects: jr,
1657
+ getDimensions: Kr,
1658
+ getScale: Ce,
1659
+ isElement: W,
1660
+ isRTL: qr
1661
+ };
1662
+ function Zr(e, t) {
1663
+ let n = null, r;
1664
+ const o = Q(e);
1665
+ function i() {
1666
+ var l;
1667
+ clearTimeout(r), (l = n) == null || l.disconnect(), n = null;
1668
+ }
1669
+ function s(l, c) {
1670
+ l === void 0 && (l = !1), c === void 0 && (c = 1), i();
1671
+ const {
1672
+ left: a,
1673
+ top: m,
1674
+ width: d,
1675
+ height: f
1676
+ } = e.getBoundingClientRect();
1677
+ if (l || t(), !d || !f)
1678
+ return;
1679
+ const u = De(m), g = De(o.clientWidth - (a + d)), p = De(o.clientHeight - (m + f)), S = De(a), x = {
1680
+ rootMargin: -u + "px " + -g + "px " + -p + "px " + -S + "px",
1681
+ threshold: fe(0, Ne(1, c)) || 1
1682
+ };
1683
+ let P = !0;
1684
+ function E(C) {
1685
+ const I = C[0].intersectionRatio;
1686
+ if (I !== c) {
1687
+ if (!P)
1688
+ return s();
1689
+ I ? s(!1, I) : r = setTimeout(() => {
1690
+ s(!1, 1e-7);
1691
+ }, 100);
1692
+ }
1693
+ P = !1;
1694
+ }
1695
+ try {
1696
+ n = new IntersectionObserver(E, {
1697
+ ...x,
1698
+ // Handle <iframe>s
1699
+ root: o.ownerDocument
1700
+ });
1701
+ } catch {
1702
+ n = new IntersectionObserver(E, x);
1703
+ }
1704
+ n.observe(e);
1705
+ }
1706
+ return s(!0), i;
1707
+ }
1708
+ function Jr(e, t, n, r) {
1709
+ r === void 0 && (r = {});
1710
+ const {
1711
+ ancestorScroll: o = !0,
1712
+ ancestorResize: i = !0,
1713
+ elementResize: s = typeof ResizeObserver == "function",
1714
+ layoutShift: l = typeof IntersectionObserver == "function",
1715
+ animationFrame: c = !1
1716
+ } = r, a = mt(e), m = o || i ? [...a ? ee(a) : [], ...ee(t)] : [];
1717
+ m.forEach((h) => {
1718
+ o && h.addEventListener("scroll", n, {
1719
+ passive: !0
1720
+ }), i && h.addEventListener("resize", n);
1721
+ });
1722
+ const d = a && l ? Zr(a, n) : null;
1723
+ let f = -1, u = null;
1724
+ s && (u = new ResizeObserver((h) => {
1725
+ let [x] = h;
1726
+ x && x.target === a && u && (u.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
1727
+ var P;
1728
+ (P = u) == null || P.observe(t);
1729
+ })), n();
1730
+ }), a && !c && u.observe(a), u.observe(t));
1731
+ let g, p = c ? pe(e) : null;
1732
+ c && S();
1733
+ function S() {
1734
+ const h = pe(e);
1735
+ p && (h.x !== p.x || h.y !== p.y || h.width !== p.width || h.height !== p.height) && n(), p = h, g = requestAnimationFrame(S);
1736
+ }
1737
+ return n(), () => {
1738
+ var h;
1739
+ m.forEach((x) => {
1740
+ o && x.removeEventListener("scroll", n), i && x.removeEventListener("resize", n);
1741
+ }), d == null || d(), (h = u) == null || h.disconnect(), u = null, c && cancelAnimationFrame(g);
1742
+ };
1743
+ }
1744
+ const Qr = Mr, eo = Br, to = (e, t, n) => {
1745
+ const r = /* @__PURE__ */ new Map(), o = {
1746
+ platform: Gr,
1747
+ ...n
1748
+ }, i = {
1749
+ ...o.platform,
1750
+ _c: r
1751
+ };
1752
+ return Ar(e, t, {
1753
+ ...o,
1754
+ platform: i
1755
+ });
1756
+ };
1757
+ var Me = typeof document < "u" ? Yt : Kt;
1758
+ function He(e, t) {
1759
+ if (e === t)
1760
+ return !0;
1761
+ if (typeof e != typeof t)
1762
+ return !1;
1763
+ if (typeof e == "function" && e.toString() === t.toString())
1764
+ return !0;
1765
+ let n, r, o;
1766
+ if (e && t && typeof e == "object") {
1767
+ if (Array.isArray(e)) {
1768
+ if (n = e.length, n !== t.length)
1769
+ return !1;
1770
+ for (r = n; r-- !== 0; )
1771
+ if (!He(e[r], t[r]))
1772
+ return !1;
1773
+ return !0;
1774
+ }
1775
+ if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
1776
+ return !1;
1777
+ for (r = n; r-- !== 0; )
1778
+ if (!{}.hasOwnProperty.call(t, o[r]))
1779
+ return !1;
1780
+ for (r = n; r-- !== 0; ) {
1781
+ const i = o[r];
1782
+ if (!(i === "_owner" && e.$$typeof) && !He(e[i], t[i]))
1783
+ return !1;
1784
+ }
1785
+ return !0;
1786
+ }
1787
+ return e !== e && t !== t;
1788
+ }
1789
+ function an(e) {
1790
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1791
+ }
1792
+ function It(e, t) {
1793
+ const n = an(e);
1794
+ return Math.round(t * n) / n;
1795
+ }
1796
+ function Pt(e) {
1797
+ const t = y.useRef(e);
1798
+ return Me(() => {
1799
+ t.current = e;
1800
+ }), t;
1801
+ }
1802
+ function no(e) {
1803
+ e === void 0 && (e = {});
1804
+ const {
1805
+ placement: t = "bottom",
1806
+ strategy: n = "absolute",
1807
+ middleware: r = [],
1808
+ platform: o,
1809
+ elements: {
1810
+ reference: i,
1811
+ floating: s
1812
+ } = {},
1813
+ transform: l = !0,
1814
+ whileElementsMounted: c,
1815
+ open: a
1816
+ } = e, [m, d] = y.useState({
1817
+ x: 0,
1818
+ y: 0,
1819
+ strategy: n,
1820
+ placement: t,
1821
+ middlewareData: {},
1822
+ isPositioned: !1
1823
+ }), [f, u] = y.useState(r);
1824
+ He(f, r) || u(r);
1825
+ const [g, p] = y.useState(null), [S, h] = y.useState(null), x = y.useCallback(($) => {
1826
+ $ !== I.current && (I.current = $, p($));
1827
+ }, []), P = y.useCallback(($) => {
1828
+ $ !== A.current && (A.current = $, h($));
1829
+ }, []), E = i || g, C = s || S, I = y.useRef(null), A = y.useRef(null), k = y.useRef(m), O = c != null, D = Pt(c), L = Pt(o), M = y.useCallback(() => {
1830
+ if (!I.current || !A.current)
1831
+ return;
1832
+ const $ = {
1833
+ placement: t,
1834
+ strategy: n,
1835
+ middleware: f
1836
+ };
1837
+ L.current && ($.platform = L.current), to(I.current, A.current, $).then((w) => {
1838
+ const F = {
1839
+ ...w,
1840
+ isPositioned: !0
1841
+ };
1842
+ B.current && !He(k.current, F) && (k.current = F, $n.flushSync(() => {
1843
+ d(F);
1844
+ }));
1845
+ });
1846
+ }, [f, t, n, L]);
1847
+ Me(() => {
1848
+ a === !1 && k.current.isPositioned && (k.current.isPositioned = !1, d(($) => ({
1849
+ ...$,
1850
+ isPositioned: !1
1851
+ })));
1852
+ }, [a]);
1853
+ const B = y.useRef(!1);
1854
+ Me(() => (B.current = !0, () => {
1855
+ B.current = !1;
1856
+ }), []), Me(() => {
1857
+ if (E && (I.current = E), C && (A.current = C), E && C) {
1858
+ if (D.current)
1859
+ return D.current(E, C, M);
1860
+ M();
1861
+ }
1862
+ }, [E, C, M, D, O]);
1863
+ const b = y.useMemo(() => ({
1864
+ reference: I,
1865
+ floating: A,
1866
+ setReference: x,
1867
+ setFloating: P
1868
+ }), [x, P]), v = y.useMemo(() => ({
1869
+ reference: E,
1870
+ floating: C
1871
+ }), [E, C]), T = y.useMemo(() => {
1872
+ const $ = {
1873
+ position: n,
1874
+ left: 0,
1875
+ top: 0
1876
+ };
1877
+ if (!v.floating)
1878
+ return $;
1879
+ const w = It(v.floating, m.x), F = It(v.floating, m.y);
1880
+ return l ? {
1881
+ ...$,
1882
+ transform: "translate(" + w + "px, " + F + "px)",
1883
+ ...an(v.floating) >= 1.5 && {
1884
+ willChange: "transform"
1885
+ }
1886
+ } : {
1887
+ position: n,
1888
+ left: w,
1889
+ top: F
1890
+ };
1891
+ }, [n, l, v.floating, m.x, m.y]);
1892
+ return y.useMemo(() => ({
1893
+ ...m,
1894
+ update: M,
1895
+ refs: b,
1896
+ elements: v,
1897
+ floatingStyles: T
1898
+ }), [m, M, b, v, T]);
1899
+ }
1900
+ /*!
1901
+ * tabbable 6.2.0
1902
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
1903
+ */
1904
+ var ro = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], st = /* @__PURE__ */ ro.join(","), un = typeof Element > "u", Be = un ? function() {
1905
+ } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Ve = !un && Element.prototype.getRootNode ? function(e) {
1906
+ var t;
1907
+ return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e);
1908
+ } : function(e) {
1909
+ return e == null ? void 0 : e.ownerDocument;
1910
+ }, _e = function e(t, n) {
1911
+ var r;
1912
+ n === void 0 && (n = !0);
1913
+ var o = t == null || (r = t.getAttribute) === null || r === void 0 ? void 0 : r.call(t, "inert"), i = o === "" || o === "true", s = i || n && t && e(t.parentNode);
1914
+ return s;
1915
+ }, oo = function(t) {
1916
+ var n, r = t == null || (n = t.getAttribute) === null || n === void 0 ? void 0 : n.call(t, "contenteditable");
1917
+ return r === "" || r === "true";
1918
+ }, io = function(t, n, r) {
1919
+ if (_e(t))
1920
+ return [];
1921
+ var o = Array.prototype.slice.apply(t.querySelectorAll(st));
1922
+ return n && Be.call(t, st) && o.unshift(t), o = o.filter(r), o;
1923
+ }, so = function e(t, n, r) {
1924
+ for (var o = [], i = Array.from(t); i.length; ) {
1925
+ var s = i.shift();
1926
+ if (!_e(s, !1))
1927
+ if (s.tagName === "SLOT") {
1928
+ var l = s.assignedElements(), c = l.length ? l : s.children, a = e(c, !0, r);
1929
+ r.flatten ? o.push.apply(o, a) : o.push({
1930
+ scopeParent: s,
1931
+ candidates: a
1932
+ });
1933
+ } else {
1934
+ var m = Be.call(s, st);
1935
+ m && r.filter(s) && (n || !t.includes(s)) && o.push(s);
1936
+ var d = s.shadowRoot || // check for an undisclosed shadow
1937
+ typeof r.getShadowRoot == "function" && r.getShadowRoot(s), f = !_e(d, !1) && (!r.shadowRootFilter || r.shadowRootFilter(s));
1938
+ if (d && f) {
1939
+ var u = e(d === !0 ? s.children : d.children, !0, r);
1940
+ r.flatten ? o.push.apply(o, u) : o.push({
1941
+ scopeParent: s,
1942
+ candidates: u
1943
+ });
1944
+ } else
1945
+ i.unshift.apply(i, s.children);
1946
+ }
1947
+ }
1948
+ return o;
1949
+ }, dn = function(t) {
1950
+ return !isNaN(parseInt(t.getAttribute("tabindex"), 10));
1951
+ }, fn = function(t) {
1952
+ if (!t)
1953
+ throw new Error("No node provided");
1954
+ return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || oo(t)) && !dn(t) ? 0 : t.tabIndex;
1955
+ }, lo = function(t, n) {
1956
+ var r = fn(t);
1957
+ return r < 0 && n && !dn(t) ? 0 : r;
1958
+ }, co = function(t, n) {
1959
+ return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex;
1960
+ }, mn = function(t) {
1961
+ return t.tagName === "INPUT";
1962
+ }, ao = function(t) {
1963
+ return mn(t) && t.type === "hidden";
1964
+ }, uo = function(t) {
1965
+ var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
1966
+ return r.tagName === "SUMMARY";
1967
+ });
1968
+ return n;
1969
+ }, fo = function(t, n) {
1970
+ for (var r = 0; r < t.length; r++)
1971
+ if (t[r].checked && t[r].form === n)
1972
+ return t[r];
1973
+ }, mo = function(t) {
1974
+ if (!t.name)
1975
+ return !0;
1976
+ var n = t.form || Ve(t), r = function(l) {
1977
+ return n.querySelectorAll('input[type="radio"][name="' + l + '"]');
1978
+ }, o;
1979
+ if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
1980
+ o = r(window.CSS.escape(t.name));
1981
+ else
1982
+ try {
1983
+ o = r(t.name);
1984
+ } catch (s) {
1985
+ return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", s.message), !1;
1986
+ }
1987
+ var i = fo(o, t.form);
1988
+ return !i || i === t;
1989
+ }, go = function(t) {
1990
+ return mn(t) && t.type === "radio";
1991
+ }, po = function(t) {
1992
+ return go(t) && !mo(t);
1993
+ }, ho = function(t) {
1994
+ var n, r = t && Ve(t), o = (n = r) === null || n === void 0 ? void 0 : n.host, i = !1;
1995
+ if (r && r !== t) {
1996
+ var s, l, c;
1997
+ for (i = !!((s = o) !== null && s !== void 0 && (l = s.ownerDocument) !== null && l !== void 0 && l.contains(o) || t != null && (c = t.ownerDocument) !== null && c !== void 0 && c.contains(t)); !i && o; ) {
1998
+ var a, m, d;
1999
+ r = Ve(o), o = (a = r) === null || a === void 0 ? void 0 : a.host, i = !!((m = o) !== null && m !== void 0 && (d = m.ownerDocument) !== null && d !== void 0 && d.contains(o));
2000
+ }
2001
+ }
2002
+ return i;
2003
+ }, At = function(t) {
2004
+ var n = t.getBoundingClientRect(), r = n.width, o = n.height;
2005
+ return r === 0 && o === 0;
2006
+ }, bo = function(t, n) {
2007
+ var r = n.displayCheck, o = n.getShadowRoot;
2008
+ if (getComputedStyle(t).visibility === "hidden")
2009
+ return !0;
2010
+ var i = Be.call(t, "details>summary:first-of-type"), s = i ? t.parentElement : t;
2011
+ if (Be.call(s, "details:not([open]) *"))
2012
+ return !0;
2013
+ if (!r || r === "full" || r === "legacy-full") {
2014
+ if (typeof o == "function") {
2015
+ for (var l = t; t; ) {
2016
+ var c = t.parentElement, a = Ve(t);
2017
+ if (c && !c.shadowRoot && o(c) === !0)
2018
+ return At(t);
2019
+ t.assignedSlot ? t = t.assignedSlot : !c && a !== t.ownerDocument ? t = a.host : t = c;
2020
+ }
2021
+ t = l;
2022
+ }
2023
+ if (ho(t))
2024
+ return !t.getClientRects().length;
2025
+ if (r !== "legacy-full")
2026
+ return !0;
2027
+ } else if (r === "non-zero-area")
2028
+ return At(t);
2029
+ return !1;
2030
+ }, yo = function(t) {
2031
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))
2032
+ for (var n = t.parentElement; n; ) {
2033
+ if (n.tagName === "FIELDSET" && n.disabled) {
2034
+ for (var r = 0; r < n.children.length; r++) {
2035
+ var o = n.children.item(r);
2036
+ if (o.tagName === "LEGEND")
2037
+ return Be.call(n, "fieldset[disabled] *") ? !0 : !o.contains(t);
2038
+ }
2039
+ return !0;
2040
+ }
2041
+ n = n.parentElement;
2042
+ }
2043
+ return !1;
2044
+ }, vo = function(t, n) {
2045
+ return !(n.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
2046
+ // because we're limited in the type of selectors we can use in JSDom (see related
2047
+ // note related to `candidateSelectors`)
2048
+ _e(n) || ao(n) || bo(n, t) || // For a details element with a summary, the summary element gets the focus
2049
+ uo(n) || yo(n));
2050
+ }, Bt = function(t, n) {
2051
+ return !(po(n) || fn(n) < 0 || !vo(t, n));
2052
+ }, xo = function(t) {
2053
+ var n = parseInt(t.getAttribute("tabindex"), 10);
2054
+ return !!(isNaN(n) || n >= 0);
2055
+ }, wo = function e(t) {
2056
+ var n = [], r = [];
2057
+ return t.forEach(function(o, i) {
2058
+ var s = !!o.scopeParent, l = s ? o.scopeParent : o, c = lo(l, s), a = s ? e(o.candidates) : l;
2059
+ c === 0 ? s ? n.push.apply(n, a) : n.push(l) : r.push({
2060
+ documentOrder: i,
2061
+ tabIndex: c,
2062
+ item: o,
2063
+ isScope: s,
2064
+ content: a
2065
+ });
2066
+ }), r.sort(co).reduce(function(o, i) {
2067
+ return i.isScope ? o.push.apply(o, i.content) : o.push(i.content), o;
2068
+ }, []).concat(n);
2069
+ }, gn = function(t, n) {
2070
+ n = n || {};
2071
+ var r;
2072
+ return n.getShadowRoot ? r = so([t], n.includeContainer, {
2073
+ filter: Bt.bind(null, n),
2074
+ flatten: !1,
2075
+ getShadowRoot: n.getShadowRoot,
2076
+ shadowRootFilter: xo
2077
+ }) : r = io(t, n.includeContainer, Bt.bind(null, n)), wo(r);
2078
+ };
2079
+ function ii(e) {
2080
+ return y.useMemo(() => e.every((t) => t == null) ? null : (t) => {
2081
+ e.forEach((n) => {
2082
+ typeof n == "function" ? n(t) : n != null && (n.current = t);
2083
+ });
2084
+ }, e);
2085
+ }
2086
+ const So = y[/* @__PURE__ */ "useInsertionEffect".toString()], Eo = So || ((e) => e());
2087
+ function Ee(e) {
2088
+ const t = y.useRef(() => {
2089
+ if (process.env.NODE_ENV !== "production")
2090
+ throw new Error("Cannot call an event handler while rendering.");
2091
+ });
2092
+ return Eo(() => {
2093
+ t.current = e;
2094
+ }), y.useCallback(function() {
2095
+ for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
2096
+ r[o] = arguments[o];
2097
+ return t.current == null ? void 0 : t.current(...r);
2098
+ }, []);
2099
+ }
2100
+ var Z = typeof document < "u" ? Yt : Kt;
2101
+ function lt() {
2102
+ return lt = Object.assign ? Object.assign.bind() : function(e) {
2103
+ for (var t = 1; t < arguments.length; t++) {
2104
+ var n = arguments[t];
2105
+ for (var r in n)
2106
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
2107
+ }
2108
+ return e;
2109
+ }, lt.apply(this, arguments);
2110
+ }
2111
+ let Qe = !1, $o = 0;
2112
+ const Ot = () => "floating-ui-" + $o++;
2113
+ function Ro() {
2114
+ const [e, t] = y.useState(() => Qe ? Ot() : void 0);
2115
+ return Z(() => {
2116
+ e == null && t(Ot());
2117
+ }, []), y.useEffect(() => {
2118
+ Qe || (Qe = !0);
2119
+ }, []), e;
2120
+ }
2121
+ const Co = y[/* @__PURE__ */ "useId".toString()], gt = Co || Ro;
2122
+ function ko() {
2123
+ const e = /* @__PURE__ */ new Map();
2124
+ return {
2125
+ emit(t, n) {
2126
+ var r;
2127
+ (r = e.get(t)) == null || r.forEach((o) => o(n));
2128
+ },
2129
+ on(t, n) {
2130
+ e.set(t, [...e.get(t) || [], n]);
2131
+ },
2132
+ off(t, n) {
2133
+ var r;
2134
+ e.set(t, ((r = e.get(t)) == null ? void 0 : r.filter((o) => o !== n)) || []);
2135
+ }
2136
+ };
2137
+ }
2138
+ const To = /* @__PURE__ */ y.createContext(null), Io = /* @__PURE__ */ y.createContext(null), pt = () => {
2139
+ var e;
2140
+ return ((e = y.useContext(To)) == null ? void 0 : e.id) || null;
2141
+ }, ht = () => y.useContext(Io);
2142
+ function qe(e) {
2143
+ return "data-floating-ui-" + e;
2144
+ }
2145
+ function Re(e) {
2146
+ const t = vn(e);
2147
+ return Z(() => {
2148
+ t.current = e;
2149
+ }), t;
2150
+ }
2151
+ const Dt = /* @__PURE__ */ qe("safe-polygon");
2152
+ function et(e, t, n) {
2153
+ return n && !Fe(n) ? 0 : typeof e == "number" ? e : e == null ? void 0 : e[t];
2154
+ }
2155
+ function Po(e, t) {
2156
+ t === void 0 && (t = {});
2157
+ const {
2158
+ open: n,
2159
+ onOpenChange: r,
2160
+ dataRef: o,
2161
+ events: i,
2162
+ elements: {
2163
+ domReference: s,
2164
+ floating: l
2165
+ },
2166
+ refs: c
2167
+ } = e, {
2168
+ enabled: a = !0,
2169
+ delay: m = 0,
2170
+ handleClose: d = null,
2171
+ mouseOnly: f = !1,
2172
+ restMs: u = 0,
2173
+ move: g = !0
2174
+ } = t, p = ht(), S = pt(), h = Re(d), x = Re(m), P = y.useRef(), E = y.useRef(), C = y.useRef(), I = y.useRef(), A = y.useRef(!0), k = y.useRef(!1), O = y.useRef(() => {
2175
+ }), D = y.useCallback(() => {
2176
+ var b;
2177
+ const v = (b = o.current.openEvent) == null ? void 0 : b.type;
2178
+ return (v == null ? void 0 : v.includes("mouse")) && v !== "mousedown";
2179
+ }, [o]);
2180
+ y.useEffect(() => {
2181
+ if (!a)
2182
+ return;
2183
+ function b(v) {
2184
+ let {
2185
+ open: T
2186
+ } = v;
2187
+ T || (clearTimeout(E.current), clearTimeout(I.current), A.current = !0);
2188
+ }
2189
+ return i.on("openchange", b), () => {
2190
+ i.off("openchange", b);
2191
+ };
2192
+ }, [a, i]), y.useEffect(() => {
2193
+ if (!a || !h.current || !n)
2194
+ return;
2195
+ function b(T) {
2196
+ D() && r(!1, T, "hover");
2197
+ }
2198
+ const v = ce(l).documentElement;
2199
+ return v.addEventListener("mouseleave", b), () => {
2200
+ v.removeEventListener("mouseleave", b);
2201
+ };
2202
+ }, [l, n, r, a, h, D]);
2203
+ const L = y.useCallback(function(b, v, T) {
2204
+ v === void 0 && (v = !0), T === void 0 && (T = "hover");
2205
+ const $ = et(x.current, "close", P.current);
2206
+ $ && !C.current ? (clearTimeout(E.current), E.current = setTimeout(() => r(!1, b, T), $)) : v && (clearTimeout(E.current), r(!1, b, T));
2207
+ }, [x, r]), M = y.useCallback(() => {
2208
+ O.current(), C.current = void 0;
2209
+ }, []), B = y.useCallback(() => {
2210
+ if (k.current) {
2211
+ const b = ce(c.floating.current).body;
2212
+ b.style.pointerEvents = "", b.removeAttribute(Dt), k.current = !1;
2213
+ }
2214
+ }, [c]);
2215
+ return y.useEffect(() => {
2216
+ if (!a)
2217
+ return;
2218
+ function b() {
2219
+ return o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1;
2220
+ }
2221
+ function v(w) {
2222
+ if (clearTimeout(E.current), A.current = !1, f && !Fe(P.current) || u > 0 && et(x.current, "open") === 0)
2223
+ return;
2224
+ const F = et(x.current, "open", P.current);
2225
+ F ? E.current = setTimeout(() => {
2226
+ r(!0, w, "hover");
2227
+ }, F) : r(!0, w, "hover");
2228
+ }
2229
+ function T(w) {
2230
+ if (b())
2231
+ return;
2232
+ O.current();
2233
+ const F = ce(l);
2234
+ if (clearTimeout(I.current), h.current) {
2235
+ n || clearTimeout(E.current), C.current = h.current({
2236
+ ...e,
2237
+ tree: p,
2238
+ x: w.clientX,
2239
+ y: w.clientY,
2240
+ onClose() {
2241
+ B(), M(), L(w, !0, "safe-polygon");
2242
+ }
2243
+ });
2244
+ const K = C.current;
2245
+ F.addEventListener("mousemove", K), O.current = () => {
2246
+ F.removeEventListener("mousemove", K);
2247
+ };
2248
+ return;
2249
+ }
2250
+ (P.current === "touch" ? !de(l, w.relatedTarget) : !0) && L(w);
2251
+ }
2252
+ function $(w) {
2253
+ b() || h.current == null || h.current({
2254
+ ...e,
2255
+ tree: p,
2256
+ x: w.clientX,
2257
+ y: w.clientY,
2258
+ onClose() {
2259
+ B(), M(), L(w);
2260
+ }
2261
+ })(w);
2262
+ }
2263
+ if (W(s)) {
2264
+ const w = s;
2265
+ return n && w.addEventListener("mouseleave", $), l == null || l.addEventListener("mouseleave", $), g && w.addEventListener("mousemove", v, {
2266
+ once: !0
2267
+ }), w.addEventListener("mouseenter", v), w.addEventListener("mouseleave", T), () => {
2268
+ n && w.removeEventListener("mouseleave", $), l == null || l.removeEventListener("mouseleave", $), g && w.removeEventListener("mousemove", v), w.removeEventListener("mouseenter", v), w.removeEventListener("mouseleave", T);
2269
+ };
2270
+ }
2271
+ }, [s, l, a, e, f, u, g, L, M, B, r, n, p, x, h, o]), Z(() => {
2272
+ var b;
2273
+ if (a && n && (b = h.current) != null && b.__options.blockPointerEvents && D()) {
2274
+ const T = ce(l).body;
2275
+ if (T.setAttribute(Dt, ""), T.style.pointerEvents = "none", k.current = !0, W(s) && l) {
2276
+ var v;
2277
+ const $ = s, w = p == null || (v = p.nodesRef.current.find((F) => F.id === S)) == null || (v = v.context) == null ? void 0 : v.elements.floating;
2278
+ return w && (w.style.pointerEvents = ""), $.style.pointerEvents = "auto", l.style.pointerEvents = "auto", () => {
2279
+ $.style.pointerEvents = "", l.style.pointerEvents = "";
2280
+ };
2281
+ }
2282
+ }
2283
+ }, [a, n, S, l, s, p, h, D]), Z(() => {
2284
+ n || (P.current = void 0, M(), B());
2285
+ }, [n, M, B]), y.useEffect(() => () => {
2286
+ M(), clearTimeout(E.current), clearTimeout(I.current), B();
2287
+ }, [a, s, M, B]), y.useMemo(() => {
2288
+ if (!a)
2289
+ return {};
2290
+ function b(v) {
2291
+ P.current = v.pointerType;
2292
+ }
2293
+ return {
2294
+ reference: {
2295
+ onPointerDown: b,
2296
+ onPointerEnter: b,
2297
+ onMouseMove(v) {
2298
+ n || u === 0 || (clearTimeout(I.current), I.current = setTimeout(() => {
2299
+ A.current || r(!0, v.nativeEvent, "hover");
2300
+ }, u));
2301
+ }
2302
+ },
2303
+ floating: {
2304
+ onMouseEnter() {
2305
+ clearTimeout(E.current);
2306
+ },
2307
+ onMouseLeave(v) {
2308
+ L(v.nativeEvent, !1);
2309
+ }
2310
+ }
2311
+ };
2312
+ }, [a, u, n, r, L]);
2313
+ }
2314
+ function Le(e, t) {
2315
+ let n = e.filter((o) => {
2316
+ var i;
2317
+ return o.parentId === t && ((i = o.context) == null ? void 0 : i.open);
2318
+ }), r = n;
2319
+ for (; r.length; )
2320
+ r = e.filter((o) => {
2321
+ var i;
2322
+ return (i = r) == null ? void 0 : i.some((s) => {
2323
+ var l;
2324
+ return o.parentId === s.id && ((l = o.context) == null ? void 0 : l.open);
2325
+ });
2326
+ }), n = n.concat(r);
2327
+ return n;
2328
+ }
2329
+ const pn = () => ({
2330
+ getShadowRoot: !0,
2331
+ displayCheck: (
2332
+ // JSDOM does not support the `tabbable` library. To solve this we can
2333
+ // check if `ResizeObserver` is a real function (not polyfilled), which
2334
+ // determines if the current environment is JSDOM-like.
2335
+ typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
2336
+ )
2337
+ });
2338
+ function hn(e, t) {
2339
+ const n = gn(e, pn());
2340
+ t === "prev" && n.reverse();
2341
+ const r = n.indexOf(br(ce(e)));
2342
+ return n.slice(r + 1)[0];
2343
+ }
2344
+ function Ao() {
2345
+ return hn(document.body, "next");
2346
+ }
2347
+ function Bo() {
2348
+ return hn(document.body, "prev");
2349
+ }
2350
+ function tt(e, t) {
2351
+ const n = t || e.currentTarget, r = e.relatedTarget;
2352
+ return !r || !de(n, r);
2353
+ }
2354
+ function Oo(e) {
2355
+ gn(e, pn()).forEach((n) => {
2356
+ n.dataset.tabindex = n.getAttribute("tabindex") || "", n.setAttribute("tabindex", "-1");
2357
+ });
2358
+ }
2359
+ function Do(e) {
2360
+ e.querySelectorAll("[data-tabindex]").forEach((n) => {
2361
+ const r = n.dataset.tabindex;
2362
+ delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
2363
+ });
2364
+ }
2365
+ const bn = {
2366
+ border: 0,
2367
+ clip: "rect(0 0 0 0)",
2368
+ height: "1px",
2369
+ margin: "-1px",
2370
+ overflow: "hidden",
2371
+ padding: 0,
2372
+ position: "fixed",
2373
+ whiteSpace: "nowrap",
2374
+ width: "1px",
2375
+ top: 0,
2376
+ left: 0
2377
+ };
2378
+ let Mo;
2379
+ function Mt(e) {
2380
+ e.key === "Tab" && (e.target, clearTimeout(Mo));
2381
+ }
2382
+ const Lt = /* @__PURE__ */ y.forwardRef(function(t, n) {
2383
+ const [r, o] = y.useState();
2384
+ Z(() => (yr() && o("button"), document.addEventListener("keydown", Mt), () => {
2385
+ document.removeEventListener("keydown", Mt);
2386
+ }), []);
2387
+ const i = {
2388
+ ref: n,
2389
+ tabIndex: 0,
2390
+ // Role is only for VoiceOver
2391
+ role: r,
2392
+ "aria-hidden": r ? void 0 : !0,
2393
+ [qe("focus-guard")]: "",
2394
+ style: bn
2395
+ };
2396
+ return /* @__PURE__ */ y.createElement("span", lt({}, t, i));
2397
+ }), yn = /* @__PURE__ */ y.createContext(null), Ft = /* @__PURE__ */ qe("portal");
2398
+ function Lo(e) {
2399
+ let {
2400
+ id: t,
2401
+ root: n
2402
+ } = e === void 0 ? {} : e;
2403
+ const [r, o] = y.useState(null), i = gt(), s = No(), l = y.useRef(null);
2404
+ return Z(() => () => {
2405
+ r == null || r.remove(), queueMicrotask(() => {
2406
+ l.current = null;
2407
+ });
2408
+ }, [r]), Z(() => {
2409
+ if (l.current)
2410
+ return;
2411
+ const c = t ? document.getElementById(t) : null;
2412
+ if (!c)
2413
+ return;
2414
+ const a = document.createElement("div");
2415
+ a.id = i, a.setAttribute(Ft, ""), c.appendChild(a), l.current = a, o(a);
2416
+ }, [t, i]), Z(() => {
2417
+ if (l.current)
2418
+ return;
2419
+ let c = n || (s == null ? void 0 : s.portalNode);
2420
+ c && !W(c) && (c = c.current), c = c || document.body;
2421
+ let a = null;
2422
+ t && (a = document.createElement("div"), a.id = t, c.appendChild(a));
2423
+ const m = document.createElement("div");
2424
+ m.id = i, m.setAttribute(Ft, ""), c = a || c, c.appendChild(m), l.current = m, o(m);
2425
+ }, [t, n, i, s]), r;
2426
+ }
2427
+ function Fo(e) {
2428
+ let {
2429
+ children: t,
2430
+ id: n,
2431
+ root: r = null,
2432
+ preserveTabOrder: o = !0
2433
+ } = e;
2434
+ const i = Lo({
2435
+ id: n,
2436
+ root: r
2437
+ }), [s, l] = y.useState(null), c = y.useRef(null), a = y.useRef(null), m = y.useRef(null), d = y.useRef(null), f = (
2438
+ // The FocusManager and therefore floating element are currently open/
2439
+ // rendered.
2440
+ !!s && // Guards are only for non-modal focus management.
2441
+ !s.modal && // Don't render if unmount is transitioning.
2442
+ s.open && o && !!(r || i)
2443
+ );
2444
+ return y.useEffect(() => {
2445
+ if (!i || !o || s != null && s.modal)
2446
+ return;
2447
+ function u(g) {
2448
+ i && tt(g) && (g.type === "focusin" ? Do : Oo)(i);
2449
+ }
2450
+ return i.addEventListener("focusin", u, !0), i.addEventListener("focusout", u, !0), () => {
2451
+ i.removeEventListener("focusin", u, !0), i.removeEventListener("focusout", u, !0);
2452
+ };
2453
+ }, [i, o, s == null ? void 0 : s.modal]), /* @__PURE__ */ y.createElement(yn.Provider, {
2454
+ value: y.useMemo(() => ({
2455
+ preserveTabOrder: o,
2456
+ beforeOutsideRef: c,
2457
+ afterOutsideRef: a,
2458
+ beforeInsideRef: m,
2459
+ afterInsideRef: d,
2460
+ portalNode: i,
2461
+ setFocusManagerState: l
2462
+ }), [o, i])
2463
+ }, f && i && /* @__PURE__ */ y.createElement(Lt, {
2464
+ "data-type": "outside",
2465
+ ref: c,
2466
+ onFocus: (u) => {
2467
+ if (tt(u, i)) {
2468
+ var g;
2469
+ (g = m.current) == null || g.focus();
2470
+ } else {
2471
+ const p = Bo() || (s == null ? void 0 : s.refs.domReference.current);
2472
+ p == null || p.focus();
2473
+ }
2474
+ }
2475
+ }), f && i && /* @__PURE__ */ y.createElement("span", {
2476
+ "aria-owns": i.id,
2477
+ style: bn
2478
+ }), i && /* @__PURE__ */ Rn(t, i), f && i && /* @__PURE__ */ y.createElement(Lt, {
2479
+ "data-type": "outside",
2480
+ ref: a,
2481
+ onFocus: (u) => {
2482
+ if (tt(u, i)) {
2483
+ var g;
2484
+ (g = d.current) == null || g.focus();
2485
+ } else {
2486
+ const p = Ao() || (s == null ? void 0 : s.refs.domReference.current);
2487
+ p == null || p.focus(), s != null && s.closeOnFocusOut && (s == null || s.onOpenChange(!1, u.nativeEvent));
2488
+ }
2489
+ }
2490
+ }));
2491
+ }
2492
+ const No = () => y.useContext(yn);
2493
+ function Nt(e) {
2494
+ return U(e.target) && e.target.tagName === "BUTTON";
2495
+ }
2496
+ function Wt(e) {
2497
+ return Sr(e);
2498
+ }
2499
+ function Wo(e, t) {
2500
+ t === void 0 && (t = {});
2501
+ const {
2502
+ open: n,
2503
+ onOpenChange: r,
2504
+ dataRef: o,
2505
+ elements: {
2506
+ domReference: i
2507
+ }
2508
+ } = e, {
2509
+ enabled: s = !0,
2510
+ event: l = "click",
2511
+ toggle: c = !0,
2512
+ ignoreMouse: a = !1,
2513
+ keyboardHandlers: m = !0
2514
+ } = t, d = y.useRef(), f = y.useRef(!1);
2515
+ return y.useMemo(() => s ? {
2516
+ reference: {
2517
+ onPointerDown(u) {
2518
+ d.current = u.pointerType;
2519
+ },
2520
+ onMouseDown(u) {
2521
+ u.button === 0 && (Fe(d.current, !0) && a || l !== "click" && (n && c && (!o.current.openEvent || o.current.openEvent.type === "mousedown") ? r(!1, u.nativeEvent, "click") : (u.preventDefault(), r(!0, u.nativeEvent, "click"))));
2522
+ },
2523
+ onClick(u) {
2524
+ if (l === "mousedown" && d.current) {
2525
+ d.current = void 0;
2526
+ return;
2527
+ }
2528
+ Fe(d.current, !0) && a || (n && c && (!o.current.openEvent || o.current.openEvent.type === "click") ? r(!1, u.nativeEvent, "click") : r(!0, u.nativeEvent, "click"));
2529
+ },
2530
+ onKeyDown(u) {
2531
+ d.current = void 0, !(u.defaultPrevented || !m || Nt(u)) && (u.key === " " && !Wt(i) && (u.preventDefault(), f.current = !0), u.key === "Enter" && r(!(n && c), u.nativeEvent, "click"));
2532
+ },
2533
+ onKeyUp(u) {
2534
+ u.defaultPrevented || !m || Nt(u) || Wt(i) || u.key === " " && f.current && (f.current = !1, r(!(n && c), u.nativeEvent, "click"));
2535
+ }
2536
+ }
2537
+ } : {}, [s, o, l, a, m, i, c, n, r]);
2538
+ }
2539
+ const jo = {
2540
+ pointerdown: "onPointerDown",
2541
+ mousedown: "onMouseDown",
2542
+ click: "onClick"
2543
+ }, zo = {
2544
+ pointerdown: "onPointerDownCapture",
2545
+ mousedown: "onMouseDownCapture",
2546
+ click: "onClickCapture"
2547
+ }, jt = (e) => {
2548
+ var t, n;
2549
+ return {
2550
+ escapeKey: typeof e == "boolean" ? e : (t = e == null ? void 0 : e.escapeKey) != null ? t : !1,
2551
+ outsidePress: typeof e == "boolean" ? e : (n = e == null ? void 0 : e.outsidePress) != null ? n : !0
2552
+ };
2553
+ };
2554
+ function Ho(e, t) {
2555
+ t === void 0 && (t = {});
2556
+ const {
2557
+ open: n,
2558
+ onOpenChange: r,
2559
+ nodeId: o,
2560
+ elements: {
2561
+ reference: i,
2562
+ domReference: s,
2563
+ floating: l
2564
+ },
2565
+ dataRef: c
2566
+ } = e, {
2567
+ enabled: a = !0,
2568
+ escapeKey: m = !0,
2569
+ outsidePress: d = !0,
2570
+ outsidePressEvent: f = "pointerdown",
2571
+ referencePress: u = !1,
2572
+ referencePressEvent: g = "pointerdown",
2573
+ ancestorScroll: p = !1,
2574
+ bubbles: S,
2575
+ capture: h
2576
+ } = t, x = ht(), P = Ee(typeof d == "function" ? d : () => !1), E = typeof d == "function" ? P : d, C = y.useRef(!1), I = y.useRef(!1), {
2577
+ escapeKey: A,
2578
+ outsidePress: k
2579
+ } = jt(S), {
2580
+ escapeKey: O,
2581
+ outsidePress: D
2582
+ } = jt(h), L = Ee((v) => {
2583
+ if (!n || !a || !m || v.key !== "Escape")
2584
+ return;
2585
+ const T = x ? Le(x.nodesRef.current, o) : [];
2586
+ if (!A && (v.stopPropagation(), T.length > 0)) {
2587
+ let $ = !0;
2588
+ if (T.forEach((w) => {
2589
+ var F;
2590
+ if ((F = w.context) != null && F.open && !w.context.dataRef.current.__escapeKeyBubbles) {
2591
+ $ = !1;
2592
+ return;
2593
+ }
2594
+ }), !$)
2595
+ return;
2596
+ }
2597
+ r(!1, vr(v) ? v.nativeEvent : v, "escape-key");
2598
+ }), M = Ee((v) => {
2599
+ var T;
2600
+ const $ = () => {
2601
+ var w;
2602
+ L(v), (w = Se(v)) == null || w.removeEventListener("keydown", $);
2603
+ };
2604
+ (T = Se(v)) == null || T.addEventListener("keydown", $);
2605
+ }), B = Ee((v) => {
2606
+ const T = C.current;
2607
+ C.current = !1;
2608
+ const $ = I.current;
2609
+ if (I.current = !1, f === "click" && $ || T || typeof E == "function" && !E(v))
2610
+ return;
2611
+ const w = Se(v), F = "[" + qe("inert") + "]", _ = ce(l).querySelectorAll(F);
2612
+ let K = W(w) ? w : null;
2613
+ for (; K && !ke(K); ) {
2614
+ const z = me(K);
2615
+ if (ke(z) || !W(z))
2616
+ break;
2617
+ K = z;
2618
+ }
2619
+ if (_.length && W(w) && !xr(w) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
2620
+ !de(w, l) && // If the target root element contains none of the markers, then the
2621
+ // element was injected after the floating element rendered.
2622
+ Array.from(_).every((z) => !de(K, z)))
2623
+ return;
2624
+ if (U(w) && l) {
2625
+ const z = w.clientWidth > 0 && w.scrollWidth > w.clientWidth, Y = w.clientHeight > 0 && w.scrollHeight > w.clientHeight;
2626
+ let oe = Y && v.offsetX > w.clientWidth;
2627
+ if (Y && q(w).direction === "rtl" && (oe = v.offsetX <= w.offsetWidth - w.clientWidth), oe || z && v.offsetY > w.clientHeight)
2628
+ return;
2629
+ }
2630
+ const be = x && Le(x.nodesRef.current, o).some((z) => {
2631
+ var Y;
2632
+ return Je(v, (Y = z.context) == null ? void 0 : Y.elements.floating);
2633
+ });
2634
+ if (Je(v, l) || Je(v, s) || be)
2635
+ return;
2636
+ const re = x ? Le(x.nodesRef.current, o) : [];
2637
+ if (re.length > 0) {
2638
+ let z = !0;
2639
+ if (re.forEach((Y) => {
2640
+ var oe;
2641
+ if ((oe = Y.context) != null && oe.open && !Y.context.dataRef.current.__outsidePressBubbles) {
2642
+ z = !1;
2643
+ return;
2644
+ }
2645
+ }), !z)
2646
+ return;
2647
+ }
2648
+ r(!1, v, "outside-press");
2649
+ }), b = Ee((v) => {
2650
+ var T;
2651
+ const $ = () => {
2652
+ var w;
2653
+ B(v), (w = Se(v)) == null || w.removeEventListener(f, $);
2654
+ };
2655
+ (T = Se(v)) == null || T.addEventListener(f, $);
2656
+ });
2657
+ return y.useEffect(() => {
2658
+ if (!n || !a)
2659
+ return;
2660
+ c.current.__escapeKeyBubbles = A, c.current.__outsidePressBubbles = k;
2661
+ function v(w) {
2662
+ r(!1, w, "ancestor-scroll");
2663
+ }
2664
+ const T = ce(l);
2665
+ m && T.addEventListener("keydown", O ? M : L, O), E && T.addEventListener(f, D ? b : B, D);
2666
+ let $ = [];
2667
+ return p && (W(s) && ($ = ee(s)), W(l) && ($ = $.concat(ee(l))), !W(i) && i && i.contextElement && ($ = $.concat(ee(i.contextElement)))), $ = $.filter((w) => {
2668
+ var F;
2669
+ return w !== ((F = T.defaultView) == null ? void 0 : F.visualViewport);
2670
+ }), $.forEach((w) => {
2671
+ w.addEventListener("scroll", v, {
2672
+ passive: !0
2673
+ });
2674
+ }), () => {
2675
+ m && T.removeEventListener("keydown", O ? M : L, O), E && T.removeEventListener(f, D ? b : B, D), $.forEach((w) => {
2676
+ w.removeEventListener("scroll", v);
2677
+ });
2678
+ };
2679
+ }, [c, l, s, i, m, E, f, n, r, p, a, A, k, L, O, M, B, D, b]), y.useEffect(() => {
2680
+ C.current = !1;
2681
+ }, [E, f]), y.useMemo(() => a ? {
2682
+ reference: {
2683
+ onKeyDown: L,
2684
+ [jo[g]]: (v) => {
2685
+ u && r(!1, v.nativeEvent, "reference-press");
2686
+ }
2687
+ },
2688
+ floating: {
2689
+ onKeyDown: L,
2690
+ onMouseDown() {
2691
+ I.current = !0;
2692
+ },
2693
+ onMouseUp() {
2694
+ I.current = !0;
2695
+ },
2696
+ [zo[f]]: () => {
2697
+ C.current = !0;
2698
+ }
2699
+ }
2700
+ } : {}, [a, u, f, g, r, L]);
2701
+ }
2702
+ let ct;
2703
+ process.env.NODE_ENV !== "production" && (ct = /* @__PURE__ */ new Set());
2704
+ function Vo(e) {
2705
+ var t;
2706
+ e === void 0 && (e = {});
2707
+ const {
2708
+ open: n = !1,
2709
+ onOpenChange: r,
2710
+ nodeId: o
2711
+ } = e;
2712
+ if (process.env.NODE_ENV !== "production") {
2713
+ var i;
2714
+ const k = "Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";
2715
+ if ((i = e.elements) != null && i.reference && !W(e.elements.reference)) {
2716
+ var s;
2717
+ if (!((s = ct) != null && s.has(k))) {
2718
+ var l;
2719
+ (l = ct) == null || l.add(k), console.error(k);
2720
+ }
2721
+ }
2722
+ }
2723
+ const [c, a] = y.useState(null), m = ((t = e.elements) == null ? void 0 : t.reference) || c, d = no(e), f = ht(), u = pt() != null, g = Ee((k, O, D) => {
2724
+ k && (S.current.openEvent = O), h.emit("openchange", {
2725
+ open: k,
2726
+ event: O,
2727
+ reason: D,
2728
+ nested: u
2729
+ }), r == null || r(k, O, D);
2730
+ }), p = y.useRef(null), S = y.useRef({}), h = y.useState(() => ko())[0], x = gt(), P = y.useCallback((k) => {
2731
+ const O = W(k) ? {
2732
+ getBoundingClientRect: () => k.getBoundingClientRect(),
2733
+ contextElement: k
2734
+ } : k;
2735
+ d.refs.setReference(O);
2736
+ }, [d.refs]), E = y.useCallback((k) => {
2737
+ (W(k) || k === null) && (p.current = k, a(k)), (W(d.refs.reference.current) || d.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2738
+ // `null` to support `positionReference` + an unstable `reference`
2739
+ // callback ref.
2740
+ k !== null && !W(k)) && d.refs.setReference(k);
2741
+ }, [d.refs]), C = y.useMemo(() => ({
2742
+ ...d.refs,
2743
+ setReference: E,
2744
+ setPositionReference: P,
2745
+ domReference: p
2746
+ }), [d.refs, E, P]), I = y.useMemo(() => ({
2747
+ ...d.elements,
2748
+ domReference: m
2749
+ }), [d.elements, m]), A = y.useMemo(() => ({
2750
+ ...d,
2751
+ refs: C,
2752
+ elements: I,
2753
+ dataRef: S,
2754
+ nodeId: o,
2755
+ floatingId: x,
2756
+ events: h,
2757
+ open: n,
2758
+ onOpenChange: g
2759
+ }), [d, o, x, h, n, g, C, I]);
2760
+ return Z(() => {
2761
+ const k = f == null ? void 0 : f.nodesRef.current.find((O) => O.id === o);
2762
+ k && (k.context = A);
2763
+ }), y.useMemo(() => ({
2764
+ ...d,
2765
+ context: A,
2766
+ refs: C,
2767
+ elements: I
2768
+ }), [d, C, I, A]);
2769
+ }
2770
+ const zt = "active", Ht = "selected";
2771
+ function nt(e, t, n) {
2772
+ const r = /* @__PURE__ */ new Map(), o = n === "item";
2773
+ let i = e;
2774
+ if (o && e) {
2775
+ const {
2776
+ [zt]: s,
2777
+ [Ht]: l,
2778
+ ...c
2779
+ } = e;
2780
+ i = c;
2781
+ }
2782
+ return {
2783
+ ...n === "floating" && {
2784
+ tabIndex: -1
2785
+ },
2786
+ ...i,
2787
+ ...t.map((s) => {
2788
+ const l = s ? s[n] : null;
2789
+ return typeof l == "function" ? e ? l(e) : null : l;
2790
+ }).concat(e).reduce((s, l) => (l && Object.entries(l).forEach((c) => {
2791
+ let [a, m] = c;
2792
+ if (!(o && [zt, Ht].includes(a)))
2793
+ if (a.indexOf("on") === 0) {
2794
+ if (r.has(a) || r.set(a, []), typeof m == "function") {
2795
+ var d;
2796
+ (d = r.get(a)) == null || d.push(m), s[a] = function() {
2797
+ for (var f, u = arguments.length, g = new Array(u), p = 0; p < u; p++)
2798
+ g[p] = arguments[p];
2799
+ return (f = r.get(a)) == null ? void 0 : f.map((S) => S(...g)).find((S) => S !== void 0);
2800
+ };
2801
+ }
2802
+ } else
2803
+ s[a] = m;
2804
+ }), s), {})
2805
+ };
2806
+ }
2807
+ function _o(e) {
2808
+ e === void 0 && (e = []);
2809
+ const t = e, n = y.useCallback((i) => nt(i, e, "reference"), t), r = y.useCallback((i) => nt(i, e, "floating"), t), o = y.useCallback(
2810
+ (i) => nt(i, e, "item"),
2811
+ // Granularly check for `item` changes, because the `getItemProps` getter
2812
+ // should be as referentially stable as possible since it may be passed as
2813
+ // a prop to many components. All `item` key values must therefore be
2814
+ // memoized.
2815
+ e.map((i) => i == null ? void 0 : i.item)
2816
+ );
2817
+ return y.useMemo(() => ({
2818
+ getReferenceProps: n,
2819
+ getFloatingProps: r,
2820
+ getItemProps: o
2821
+ }), [n, r, o]);
2822
+ }
2823
+ const Yo = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
2824
+ function Ko(e, t) {
2825
+ var n;
2826
+ t === void 0 && (t = {});
2827
+ const {
2828
+ open: r,
2829
+ floatingId: o
2830
+ } = e, {
2831
+ enabled: i = !0,
2832
+ role: s = "dialog"
2833
+ } = t, l = (n = Yo.get(s)) != null ? n : s, c = gt(), m = pt() != null;
2834
+ return y.useMemo(() => {
2835
+ if (!i)
2836
+ return {};
2837
+ const d = {
2838
+ id: o,
2839
+ ...l && {
2840
+ role: l
2841
+ }
2842
+ };
2843
+ return l === "tooltip" || s === "label" ? {
2844
+ reference: {
2845
+ ["aria-" + (s === "label" ? "labelledby" : "describedby")]: r ? o : void 0
2846
+ },
2847
+ floating: d
2848
+ } : {
2849
+ reference: {
2850
+ "aria-expanded": r ? "true" : "false",
2851
+ "aria-haspopup": l === "alertdialog" ? "dialog" : l,
2852
+ "aria-controls": r ? o : void 0,
2853
+ ...l === "listbox" && {
2854
+ role: "combobox"
2855
+ },
2856
+ ...l === "menu" && {
2857
+ id: c
2858
+ },
2859
+ ...l === "menu" && m && {
2860
+ role: "menuitem"
2861
+ },
2862
+ ...s === "select" && {
2863
+ "aria-autocomplete": "none"
2864
+ },
2865
+ ...s === "combobox" && {
2866
+ "aria-autocomplete": "list"
2867
+ }
2868
+ },
2869
+ floating: {
2870
+ ...d,
2871
+ ...l === "menu" && {
2872
+ "aria-labelledby": c
2873
+ }
2874
+ },
2875
+ item(f) {
2876
+ let {
2877
+ active: u,
2878
+ selected: g
2879
+ } = f;
2880
+ const p = {
2881
+ role: "option",
2882
+ ...u && {
2883
+ id: o + "-option"
2884
+ }
2885
+ };
2886
+ switch (s) {
2887
+ case "select":
2888
+ return {
2889
+ ...p,
2890
+ "aria-selected": u && g
2891
+ };
2892
+ case "combobox":
2893
+ return {
2894
+ ...p,
2895
+ ...u && {
2896
+ "aria-selected": !0
2897
+ }
2898
+ };
2899
+ }
2900
+ return {};
2901
+ }
2902
+ };
2903
+ }, [i, s, l, r, o, c, m]);
2904
+ }
2905
+ const Vt = (e) => e.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (t, n) => (n ? "-" : "") + t.toLowerCase());
2906
+ function we(e, t) {
2907
+ return typeof e == "function" ? e(t) : e;
2908
+ }
2909
+ function Xo(e, t) {
2910
+ const [n, r] = y.useState(e);
2911
+ return e && !n && r(!0), y.useEffect(() => {
2912
+ if (!e) {
2913
+ const o = setTimeout(() => r(!1), t);
2914
+ return () => clearTimeout(o);
2915
+ }
2916
+ }, [e, t]), n;
2917
+ }
2918
+ function Uo(e, t) {
2919
+ t === void 0 && (t = {});
2920
+ const {
2921
+ open: n,
2922
+ elements: {
2923
+ floating: r
2924
+ }
2925
+ } = e, {
2926
+ duration: o = 250
2927
+ } = t, s = (typeof o == "number" ? o : o.close) || 0, [l, c] = y.useState(!1), [a, m] = y.useState("unmounted"), d = Xo(n, s);
2928
+ return Z(() => {
2929
+ l && !d && m("unmounted");
2930
+ }, [l, d]), Z(() => {
2931
+ if (r) {
2932
+ if (n) {
2933
+ m("initial");
2934
+ const f = requestAnimationFrame(() => {
2935
+ m("open");
2936
+ });
2937
+ return () => {
2938
+ cancelAnimationFrame(f);
2939
+ };
2940
+ }
2941
+ c(!0), m("close");
2942
+ }
2943
+ }, [n, r]), {
2944
+ isMounted: d,
2945
+ status: a
2946
+ };
2947
+ }
2948
+ function qo(e, t) {
2949
+ t === void 0 && (t = {});
2950
+ const {
2951
+ initial: n = {
2952
+ opacity: 0
2953
+ },
2954
+ open: r,
2955
+ close: o,
2956
+ common: i,
2957
+ duration: s = 250
2958
+ } = t, l = e.placement, c = l.split("-")[0], a = y.useMemo(() => ({
2959
+ side: c,
2960
+ placement: l
2961
+ }), [c, l]), m = typeof s == "number", d = (m ? s : s.open) || 0, f = (m ? s : s.close) || 0, [u, g] = y.useState(() => ({
2962
+ ...we(i, a),
2963
+ ...we(n, a)
2964
+ })), {
2965
+ isMounted: p,
2966
+ status: S
2967
+ } = Uo(e, {
2968
+ duration: s
2969
+ }), h = Re(n), x = Re(r), P = Re(o), E = Re(i);
2970
+ return Z(() => {
2971
+ const C = we(h.current, a), I = we(P.current, a), A = we(E.current, a), k = we(x.current, a) || Object.keys(C).reduce((O, D) => (O[D] = "", O), {});
2972
+ if (S === "initial" && g((O) => ({
2973
+ transitionProperty: O.transitionProperty,
2974
+ ...A,
2975
+ ...C
2976
+ })), S === "open" && g({
2977
+ transitionProperty: Object.keys(k).map(Vt).join(","),
2978
+ transitionDuration: d + "ms",
2979
+ ...A,
2980
+ ...k
2981
+ }), S === "close") {
2982
+ const O = I || C;
2983
+ g({
2984
+ transitionProperty: Object.keys(O).map(Vt).join(","),
2985
+ transitionDuration: f + "ms",
2986
+ ...A,
2987
+ ...O
2988
+ });
2989
+ }
2990
+ }, [f, P, h, x, E, d, S, a]), {
2991
+ isMounted: p,
2992
+ styles: u
2993
+ };
2994
+ }
2995
+ function _t(e, t) {
2996
+ const [n, r] = e;
2997
+ let o = !1;
2998
+ const i = t.length;
2999
+ for (let s = 0, l = i - 1; s < i; l = s++) {
3000
+ const [c, a] = t[s] || [0, 0], [m, d] = t[l] || [0, 0];
3001
+ a >= r != d >= r && n <= (m - c) * (r - a) / (d - a) + c && (o = !o);
3002
+ }
3003
+ return o;
3004
+ }
3005
+ function Go(e, t) {
3006
+ return e[0] >= t.x && e[0] <= t.x + t.width && e[1] >= t.y && e[1] <= t.y + t.height;
3007
+ }
3008
+ function Zo(e) {
3009
+ e === void 0 && (e = {});
3010
+ const {
3011
+ buffer: t = 0.5,
3012
+ blockPointerEvents: n = !1,
3013
+ requireIntent: r = !0
3014
+ } = e;
3015
+ let o, i = !1, s = null, l = null, c = performance.now();
3016
+ function a(d, f) {
3017
+ const u = performance.now(), g = u - c;
3018
+ if (s === null || l === null || g === 0)
3019
+ return s = d, l = f, c = u, null;
3020
+ const p = d - s, S = f - l, x = Math.sqrt(p * p + S * S) / g;
3021
+ return s = d, l = f, c = u, x;
3022
+ }
3023
+ const m = (d) => {
3024
+ let {
3025
+ x: f,
3026
+ y: u,
3027
+ placement: g,
3028
+ elements: p,
3029
+ onClose: S,
3030
+ nodeId: h,
3031
+ tree: x
3032
+ } = d;
3033
+ return function(E) {
3034
+ function C() {
3035
+ clearTimeout(o), S();
3036
+ }
3037
+ if (clearTimeout(o), !p.domReference || !p.floating || g == null || f == null || u == null)
3038
+ return;
3039
+ const {
3040
+ clientX: I,
3041
+ clientY: A
3042
+ } = E, k = [I, A], O = Se(E), D = E.type === "mouseleave", L = de(p.floating, O), M = de(p.domReference, O), B = p.domReference.getBoundingClientRect(), b = p.floating.getBoundingClientRect(), v = g.split("-")[0], T = f > b.right - b.width / 2, $ = u > b.bottom - b.height / 2, w = Go(k, B), F = b.width > B.width, _ = b.height > B.height, K = (F ? B : b).left, be = (F ? B : b).right, re = (_ ? B : b).top, z = (_ ? B : b).bottom;
3043
+ if (L && (i = !0, !D))
3044
+ return;
3045
+ if (M && (i = !1), M && !D) {
3046
+ i = !0;
3047
+ return;
3048
+ }
3049
+ if (D && W(E.relatedTarget) && de(p.floating, E.relatedTarget) || x && Le(x.nodesRef.current, h).some((ie) => {
3050
+ let {
3051
+ context: j
3052
+ } = ie;
3053
+ return j == null ? void 0 : j.open;
3054
+ }))
3055
+ return;
3056
+ if (v === "top" && u >= B.bottom - 1 || v === "bottom" && u <= B.top + 1 || v === "left" && f >= B.right - 1 || v === "right" && f <= B.left + 1)
3057
+ return C();
3058
+ let Y = [];
3059
+ switch (v) {
3060
+ case "top":
3061
+ Y = [[K, B.top + 1], [K, b.bottom - 1], [be, b.bottom - 1], [be, B.top + 1]];
3062
+ break;
3063
+ case "bottom":
3064
+ Y = [[K, b.top + 1], [K, B.bottom - 1], [be, B.bottom - 1], [be, b.top + 1]];
3065
+ break;
3066
+ case "left":
3067
+ Y = [[b.right - 1, z], [b.right - 1, re], [B.left + 1, re], [B.left + 1, z]];
3068
+ break;
3069
+ case "right":
3070
+ Y = [[B.right - 1, z], [B.right - 1, re], [b.left + 1, re], [b.left + 1, z]];
3071
+ break;
3072
+ }
3073
+ function oe(ie) {
3074
+ let [j, H] = ie;
3075
+ switch (v) {
3076
+ case "top": {
3077
+ const se = [F ? j + t / 2 : T ? j + t * 4 : j - t * 4, H + t + 1], le = [F ? j - t / 2 : T ? j + t * 4 : j - t * 4, H + t + 1], ye = [[b.left, T || F ? b.bottom - t : b.top], [b.right, T ? F ? b.bottom - t : b.top : b.bottom - t]];
3078
+ return [se, le, ...ye];
3079
+ }
3080
+ case "bottom": {
3081
+ const se = [F ? j + t / 2 : T ? j + t * 4 : j - t * 4, H - t], le = [F ? j - t / 2 : T ? j + t * 4 : j - t * 4, H - t], ye = [[b.left, T || F ? b.top + t : b.bottom], [b.right, T ? F ? b.top + t : b.bottom : b.top + t]];
3082
+ return [se, le, ...ye];
3083
+ }
3084
+ case "left": {
3085
+ const se = [j + t + 1, _ ? H + t / 2 : $ ? H + t * 4 : H - t * 4], le = [j + t + 1, _ ? H - t / 2 : $ ? H + t * 4 : H - t * 4];
3086
+ return [...[[$ || _ ? b.right - t : b.left, b.top], [$ ? _ ? b.right - t : b.left : b.right - t, b.bottom]], se, le];
3087
+ }
3088
+ case "right": {
3089
+ const se = [j - t, _ ? H + t / 2 : $ ? H + t * 4 : H - t * 4], le = [j - t, _ ? H - t / 2 : $ ? H + t * 4 : H - t * 4], ye = [[$ || _ ? b.left + t : b.right, b.top], [$ ? _ ? b.left + t : b.right : b.left + t, b.bottom]];
3090
+ return [se, le, ...ye];
3091
+ }
3092
+ }
3093
+ }
3094
+ if (!_t([I, A], Y)) {
3095
+ if (i && !w)
3096
+ return C();
3097
+ if (!D && r) {
3098
+ const ie = a(E.clientX, E.clientY);
3099
+ if (ie !== null && ie < 0.1)
3100
+ return C();
3101
+ }
3102
+ _t([I, A], oe([f, u])) ? !i && r && (o = window.setTimeout(C, 40)) : C();
3103
+ }
3104
+ };
3105
+ };
3106
+ return m.__options = {
3107
+ blockPointerEvents: n
3108
+ }, m;
3109
+ }
3110
+ const Jo = he("div"), bt = xn(
3111
+ {}
3112
+ ), si = ({
3113
+ children: e,
3114
+ offset: t,
3115
+ open: n,
3116
+ onOpenChange: r,
3117
+ trigger: o = "click",
3118
+ hoverDelay: i,
3119
+ placement: s = "bottom",
3120
+ role: l = "dialog"
3121
+ }) => {
3122
+ const { refs: c, floatingStyles: a, context: m } = Vo({
3123
+ open: n,
3124
+ onOpenChange: r,
3125
+ placement: s,
3126
+ whileElementsMounted: Jr,
3127
+ middleware: [Dr(t), eo(), Qr()]
3128
+ }), { isMounted: d, styles: f } = qo(m, {
3129
+ initial: ({ side: E }) => ({
3130
+ opacity: 0,
3131
+ transform: {
3132
+ top: "translateY(-0.5rem)",
3133
+ right: "translateX(0.5rem)",
3134
+ bottom: "translateY(0.5rem)",
3135
+ left: "translateX(-0.5rem)"
3136
+ }[E]
3137
+ })
3138
+ }), u = Wo(m, { enabled: o === "click" }), g = Po(m, {
3139
+ enabled: o === "hover",
3140
+ delay: i,
3141
+ handleClose: Zo()
3142
+ }), p = Ho(m), S = Ko(m, { role: l }), { getFloatingProps: h, getReferenceProps: x } = _o([
3143
+ u,
3144
+ g,
3145
+ p,
3146
+ S
3147
+ ]), P = wn(
3148
+ () => ({
3149
+ getFloatingProps: h,
3150
+ getReferenceProps: x,
3151
+ floatingStyles: a,
3152
+ refs: c,
3153
+ isMounted: d,
3154
+ transitionStyles: f
3155
+ }),
3156
+ [
3157
+ h,
3158
+ x,
3159
+ d,
3160
+ c,
3161
+ a,
3162
+ f
3163
+ ]
3164
+ );
3165
+ return /* @__PURE__ */ G.jsx(bt.Provider, { value: P, children: e });
3166
+ }, li = ({ children: e }) => {
3167
+ const { getReferenceProps: t, refs: n } = Xt(bt);
3168
+ return /* @__PURE__ */ G.jsx(G.Fragment, { children: Sn(e) && En(e, {
3169
+ ref: n.setReference,
3170
+ ...t()
3171
+ }) });
3172
+ }, ci = ({ children: e, overlayCardProps: t }) => {
3173
+ const {
3174
+ getFloatingProps: n,
3175
+ isMounted: r,
3176
+ refs: o,
3177
+ floatingStyles: i,
3178
+ transitionStyles: s
3179
+ } = Xt(bt);
3180
+ return r ? /* @__PURE__ */ G.jsx(Fo, { children: /* @__PURE__ */ G.jsx(
3181
+ Jo,
3182
+ {
3183
+ ref: o.setFloating,
3184
+ style: i,
3185
+ ...n(),
3186
+ css: {
3187
+ zIndex: "$overlayCard"
3188
+ },
3189
+ children: /* @__PURE__ */ G.jsx(gr, { ...t, style: s, children: e })
3190
+ }
3191
+ ) }) : null;
3192
+ };
3193
+ export {
3194
+ oi as A,
3195
+ Jo as B,
3196
+ gr as O,
3197
+ si as P,
3198
+ ir as S,
3199
+ li as a,
3200
+ ci as b,
3201
+ qt as c,
3202
+ ri as d,
3203
+ ni as g,
3204
+ Ie as k,
3205
+ he as s,
3206
+ ii as u
3207
+ };