@cfx-dev/ui-components 4.2.3 → 4.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,120 +1,43 @@
1
- import { jsx as v, Fragment as Ye, jsxs as ct } from "react/jsx-runtime";
1
+ import { jsx as d, Fragment as He, jsxs as it } from "react/jsx-runtime";
2
2
  import * as a from "react";
3
- import { useState as Pt, useRef as jn, useEffect as Xn } from "react";
4
- import { c as j, a as Hn, b as be, u as Mt } from "../../index-Cf5Yu9oD.js";
5
- import { r as Zn } from "../../index-2hJuj4UN.js";
6
- import { c as xt } from "../../index-CjTSD6zB.js";
7
- import { u as Nt } from "../../index-ByaXH_ih.js";
8
- import { u as Qn, a as qn, b as Jn, o as er, s as tr, l as nr, f as rr, c as or, d as ar, h as ir, i as $e, g as cr, e as sr } from "../../index-DBus3GoO.js";
9
- import { _ as Y, f as It, c as ur } from "../../tslib.es6-CBKHJX9H.js";
10
- import { Icon as lr } from "../Icon/Icon.js";
11
- import { Flex as dr } from "../Layout/Flex/Flex.js";
12
- import { ui as st } from "../ui.js";
13
- import { clsx as ut } from "../../utils/clsx.js";
14
- function Se(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
15
- return function(o) {
16
- if (e == null || e(o), n === !1 || !o.defaultPrevented)
17
- return t == null ? void 0 : t(o);
18
- };
19
- }
20
- function lt(e, t) {
21
- if (typeof e == "function")
22
- return e(t);
23
- e != null && (e.current = t);
24
- }
25
- function At(...e) {
26
- return (t) => {
27
- let n = !1;
28
- const r = e.map((o) => {
29
- const i = lt(o, t);
30
- return !n && typeof i == "function" && (n = !0), i;
31
- });
32
- if (n)
33
- return () => {
34
- for (let o = 0; o < r.length; o++) {
35
- const i = r[o];
36
- typeof i == "function" ? i() : lt(e[o], null);
37
- }
38
- };
39
- };
40
- }
41
- function fr(e, t = []) {
42
- let n = [];
43
- function r(i, s) {
44
- const c = a.createContext(s), d = n.length;
45
- n = [...n, s];
46
- const u = (f) => {
47
- var w;
48
- const { scope: m, children: g, ...h } = f, l = ((w = m == null ? void 0 : m[e]) == null ? void 0 : w[d]) || c, C = a.useMemo(() => h, Object.values(h));
49
- return /* @__PURE__ */ v(l.Provider, { value: C, children: g });
50
- };
51
- u.displayName = i + "Provider";
52
- function p(f, m) {
53
- var l;
54
- const g = ((l = m == null ? void 0 : m[e]) == null ? void 0 : l[d]) || c, h = a.useContext(g);
55
- if (h) return h;
56
- if (s !== void 0) return s;
57
- throw new Error(`\`${f}\` must be used within \`${i}\``);
58
- }
59
- return [u, p];
60
- }
61
- const o = () => {
62
- const i = n.map((s) => a.createContext(s));
63
- return function(c) {
64
- const d = (c == null ? void 0 : c[e]) || i;
65
- return a.useMemo(
66
- () => ({ [`__scope${e}`]: { ...c, [e]: d } }),
67
- [c, d]
68
- );
69
- };
70
- };
71
- return o.scopeName = e, [r, pr(o, ...t)];
72
- }
73
- function pr(...e) {
74
- const t = e[0];
75
- if (e.length === 1) return t;
76
- const n = () => {
77
- const r = e.map((o) => ({
78
- useScope: o(),
79
- scopeName: o.scopeName
80
- }));
81
- return function(i) {
82
- const s = r.reduce((c, { useScope: d, scopeName: u }) => {
83
- const f = d(i)[`__scope${u}`];
84
- return { ...c, ...f };
85
- }, {});
86
- return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
87
- };
88
- };
89
- return n.scopeName = t.scopeName, n;
90
- }
91
- var Dt = a.forwardRef((e, t) => {
92
- const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(vr);
3
+ import { useState as _t, useRef as $n, useEffect as Bn } from "react";
4
+ import { c as fe, u as k, d as S, b as Re, a as bt } from "../../index-AweK2ufS.js";
5
+ import { c as Y, a as Kn, b as _e, u as St } from "../../index-Cf5Yu9oD.js";
6
+ import { r as Gn } from "../../index-2hJuj4UN.js";
7
+ import { u as Rt } from "../../index-ByaXH_ih.js";
8
+ import { u as zn, a as Vn, b as Hn, o as Yn, s as Xn, l as jn, f as Zn, c as Qn, d as qn, h as Jn, e as We, g as er, i as tr } from "../../index-Bz27DCHt.js";
9
+ import { _ as H, f as Mt, c as nr } from "../../tslib.es6-CBKHJX9H.js";
10
+ import { Icon as rr } from "../Icon/Icon.js";
11
+ import { Flex as or } from "../Layout/Flex/Flex.js";
12
+ import { ui as ct } from "../ui.js";
13
+ import { clsx as st } from "../../utils/clsx.js";
14
+ var Pt = a.forwardRef((e, t) => {
15
+ const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(ir);
93
16
  if (i) {
94
- const s = i.props.children, c = o.map((d) => d === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : d);
95
- return /* @__PURE__ */ v(We, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
17
+ const s = i.props.children, c = o.map((p) => p === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : p);
18
+ return /* @__PURE__ */ d(Ue, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
96
19
  }
97
- return /* @__PURE__ */ v(We, { ...r, ref: t, children: n });
20
+ return /* @__PURE__ */ d(Ue, { ...r, ref: t, children: n });
98
21
  });
99
- Dt.displayName = "Slot";
100
- var We = a.forwardRef((e, t) => {
22
+ Pt.displayName = "Slot";
23
+ var Ue = a.forwardRef((e, t) => {
101
24
  const { children: n, ...r } = e;
102
25
  if (a.isValidElement(n)) {
103
- const o = gr(n);
26
+ const o = sr(n);
104
27
  return a.cloneElement(n, {
105
- ...hr(r, n.props),
28
+ ...cr(r, n.props),
106
29
  // @ts-ignore
107
- ref: t ? At(t, o) : o
30
+ ref: t ? fe(t, o) : o
108
31
  });
109
32
  }
110
33
  return a.Children.count(n) > 1 ? a.Children.only(null) : null;
111
34
  });
112
- We.displayName = "SlotClone";
113
- var mr = ({ children: e }) => /* @__PURE__ */ v(Ye, { children: e });
114
- function vr(e) {
115
- return a.isValidElement(e) && e.type === mr;
35
+ Ue.displayName = "SlotClone";
36
+ var ar = ({ children: e }) => /* @__PURE__ */ d(He, { children: e });
37
+ function ir(e) {
38
+ return a.isValidElement(e) && e.type === ar;
116
39
  }
117
- function hr(e, t) {
40
+ function cr(e, t) {
118
41
  const n = { ...t };
119
42
  for (const r in t) {
120
43
  const o = e[r], i = t[r];
@@ -124,12 +47,12 @@ function hr(e, t) {
124
47
  }
125
48
  return { ...e, ...n };
126
49
  }
127
- function gr(e) {
50
+ function sr(e) {
128
51
  var r, o;
129
52
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
130
53
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
131
54
  }
132
- var wr = [
55
+ var ur = [
133
56
  "a",
134
57
  "button",
135
58
  "div",
@@ -146,120 +69,39 @@ var wr = [
146
69
  "span",
147
70
  "svg",
148
71
  "ul"
149
- ], Cr = wr.reduce((e, t) => {
72
+ ], lr = ur.reduce((e, t) => {
150
73
  const n = a.forwardRef((r, o) => {
151
- const { asChild: i, ...s } = r, c = i ? Dt : t;
152
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(c, { ...s, ref: o });
74
+ const { asChild: i, ...s } = r, c = i ? Pt : t;
75
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...s, ref: o });
153
76
  });
154
77
  return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
155
- }, {});
156
- function M(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
157
- return function(o) {
158
- if (e == null || e(o), n === !1 || !o.defaultPrevented)
159
- return t == null ? void 0 : t(o);
160
- };
161
- }
162
- function dt(e, t) {
163
- if (typeof e == "function")
164
- return e(t);
165
- e != null && (e.current = t);
166
- }
167
- function je(...e) {
168
- return (t) => {
169
- let n = !1;
170
- const r = e.map((o) => {
171
- const i = dt(o, t);
172
- return !n && typeof i == "function" && (n = !0), i;
173
- });
174
- if (n)
175
- return () => {
176
- for (let o = 0; o < r.length; o++) {
177
- const i = r[o];
178
- typeof i == "function" ? i() : dt(e[o], null);
179
- }
180
- };
181
- };
182
- }
183
- function $(...e) {
184
- return a.useCallback(je(...e), e);
185
- }
186
- function Tt(e, t = []) {
187
- let n = [];
188
- function r(i, s) {
189
- const c = a.createContext(s), d = n.length;
190
- n = [...n, s];
191
- const u = (f) => {
192
- var w;
193
- const { scope: m, children: g, ...h } = f, l = ((w = m == null ? void 0 : m[e]) == null ? void 0 : w[d]) || c, C = a.useMemo(() => h, Object.values(h));
194
- return /* @__PURE__ */ v(l.Provider, { value: C, children: g });
195
- };
196
- u.displayName = i + "Provider";
197
- function p(f, m) {
198
- var l;
199
- const g = ((l = m == null ? void 0 : m[e]) == null ? void 0 : l[d]) || c, h = a.useContext(g);
200
- if (h) return h;
201
- if (s !== void 0) return s;
202
- throw new Error(`\`${f}\` must be used within \`${i}\``);
203
- }
204
- return [u, p];
205
- }
206
- const o = () => {
207
- const i = n.map((s) => a.createContext(s));
208
- return function(c) {
209
- const d = (c == null ? void 0 : c[e]) || i;
210
- return a.useMemo(
211
- () => ({ [`__scope${e}`]: { ...c, [e]: d } }),
212
- [c, d]
213
- );
214
- };
215
- };
216
- return o.scopeName = e, [r, yr(o, ...t)];
217
- }
218
- function yr(...e) {
219
- const t = e[0];
220
- if (e.length === 1) return t;
221
- const n = () => {
222
- const r = e.map((o) => ({
223
- useScope: o(),
224
- scopeName: o.scopeName
225
- }));
226
- return function(i) {
227
- const s = r.reduce((c, { useScope: d, scopeName: u }) => {
228
- const f = d(i)[`__scope${u}`];
229
- return { ...c, ...f };
230
- }, {});
231
- return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
232
- };
233
- };
234
- return n.scopeName = t.scopeName, n;
235
- }
236
- var Xe = a.forwardRef((e, t) => {
237
- const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(br);
78
+ }, {}), Ye = a.forwardRef((e, t) => {
79
+ const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(fr);
238
80
  if (i) {
239
- const s = i.props.children, c = o.map((d) => d === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : d);
240
- return /* @__PURE__ */ v(Be, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
81
+ const s = i.props.children, c = o.map((p) => p === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : p);
82
+ return /* @__PURE__ */ d($e, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
241
83
  }
242
- return /* @__PURE__ */ v(Be, { ...r, ref: t, children: n });
84
+ return /* @__PURE__ */ d($e, { ...r, ref: t, children: n });
243
85
  });
244
- Xe.displayName = "Slot";
245
- var Be = a.forwardRef((e, t) => {
86
+ Ye.displayName = "Slot";
87
+ var $e = a.forwardRef((e, t) => {
246
88
  const { children: n, ...r } = e;
247
89
  if (a.isValidElement(n)) {
248
- const o = Er(n);
90
+ const o = mr(n);
249
91
  return a.cloneElement(n, {
250
- ...Sr(r, n.props),
92
+ ...pr(r, n.props),
251
93
  // @ts-ignore
252
- ref: t ? je(t, o) : o
94
+ ref: t ? fe(t, o) : o
253
95
  });
254
96
  }
255
97
  return a.Children.count(n) > 1 ? a.Children.only(null) : null;
256
98
  });
257
- Be.displayName = "SlotClone";
258
- var _r = ({ children: e }) => /* @__PURE__ */ v(Ye, { children: e });
259
- function br(e) {
260
- return a.isValidElement(e) && e.type === _r;
99
+ $e.displayName = "SlotClone";
100
+ var dr = ({ children: e }) => /* @__PURE__ */ d(He, { children: e });
101
+ function fr(e) {
102
+ return a.isValidElement(e) && e.type === dr;
261
103
  }
262
- function Sr(e, t) {
104
+ function pr(e, t) {
263
105
  const n = { ...t };
264
106
  for (const r in t) {
265
107
  const o = e[r], i = t[r];
@@ -269,12 +111,12 @@ function Sr(e, t) {
269
111
  }
270
112
  return { ...e, ...n };
271
113
  }
272
- function Er(e) {
114
+ function mr(e) {
273
115
  var r, o;
274
116
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
275
117
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
276
118
  }
277
- var Rr = [
119
+ var vr = [
278
120
  "a",
279
121
  "button",
280
122
  "div",
@@ -291,21 +133,21 @@ var Rr = [
291
133
  "span",
292
134
  "svg",
293
135
  "ul"
294
- ], W = Rr.reduce((e, t) => {
136
+ ], U = vr.reduce((e, t) => {
295
137
  const n = a.forwardRef((r, o) => {
296
- const { asChild: i, ...s } = r, c = i ? Xe : t;
297
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(c, { ...s, ref: o });
138
+ const { asChild: i, ...s } = r, c = i ? Ye : t;
139
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...s, ref: o });
298
140
  });
299
141
  return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
300
142
  }, {});
301
- function Ot(e, t) {
302
- e && Zn.flushSync(() => e.dispatchEvent(t));
143
+ function xt(e, t) {
144
+ e && Gn.flushSync(() => e.dispatchEvent(t));
303
145
  }
304
- var Pr = "DismissableLayer", Ue = "dismissableLayer.update", Mr = "dismissableLayer.pointerDownOutside", xr = "dismissableLayer.focusOutside", ft, Ft = a.createContext({
146
+ var hr = "DismissableLayer", Be = "dismissableLayer.update", gr = "dismissableLayer.pointerDownOutside", wr = "dismissableLayer.focusOutside", ut, Nt = a.createContext({
305
147
  layers: /* @__PURE__ */ new Set(),
306
148
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
307
149
  branches: /* @__PURE__ */ new Set()
308
- }), Lt = a.forwardRef(
150
+ }), It = a.forwardRef(
309
151
  (e, t) => {
310
152
  const {
311
153
  disableOutsidePointerEvents: n = !1,
@@ -314,73 +156,73 @@ var Pr = "DismissableLayer", Ue = "dismissableLayer.update", Mr = "dismissableLa
314
156
  onFocusOutside: i,
315
157
  onInteractOutside: s,
316
158
  onDismiss: c,
317
- ...d
318
- } = e, u = a.useContext(Ft), [p, f] = a.useState(null), m = (p == null ? void 0 : p.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = a.useState({}), h = $(t, (S) => f(S)), l = Array.from(u.layers), [C] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), w = l.indexOf(C), _ = p ? l.indexOf(p) : -1, b = u.layersWithOutsidePointerEventsDisabled.size > 0, E = _ >= w, R = Ar((S) => {
319
- const P = S.target, I = [...u.branches].some((T) => T.contains(P));
320
- !E || I || (o == null || o(S), s == null || s(S), S.defaultPrevented || c == null || c());
321
- }, m), x = Dr((S) => {
322
- const P = S.target;
323
- [...u.branches].some((T) => T.contains(P)) || (i == null || i(S), s == null || s(S), S.defaultPrevented || c == null || c());
324
- }, m);
325
- return Qn((S) => {
326
- _ === u.layers.size - 1 && (r == null || r(S), !S.defaultPrevented && c && (S.preventDefault(), c()));
327
- }, m), a.useEffect(() => {
328
- if (p)
329
- return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (ft = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(p)), u.layers.add(p), pt(), () => {
330
- n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = ft);
159
+ ...p
160
+ } = e, u = a.useContext(Nt), [f, m] = a.useState(null), v = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = a.useState({}), h = k(t, (b) => m(b)), l = Array.from(u.layers), [w] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), E = l.indexOf(w), C = f ? l.indexOf(f) : -1, _ = u.layersWithOutsidePointerEventsDisabled.size > 0, R = C >= E, M = Cr((b) => {
161
+ const P = b.target, I = [...u.branches].some((T) => T.contains(P));
162
+ !R || I || (o == null || o(b), s == null || s(b), b.defaultPrevented || c == null || c());
163
+ }, v), x = _r((b) => {
164
+ const P = b.target;
165
+ [...u.branches].some((T) => T.contains(P)) || (i == null || i(b), s == null || s(b), b.defaultPrevented || c == null || c());
166
+ }, v);
167
+ return zn((b) => {
168
+ C === u.layers.size - 1 && (r == null || r(b), !b.defaultPrevented && c && (b.preventDefault(), c()));
169
+ }, v), a.useEffect(() => {
170
+ if (f)
171
+ return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (ut = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(f)), u.layers.add(f), lt(), () => {
172
+ n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = ut);
331
173
  };
332
- }, [p, m, n, u]), a.useEffect(() => () => {
333
- p && (u.layers.delete(p), u.layersWithOutsidePointerEventsDisabled.delete(p), pt());
334
- }, [p, u]), a.useEffect(() => {
335
- const S = () => g({});
336
- return document.addEventListener(Ue, S), () => document.removeEventListener(Ue, S);
337
- }, []), /* @__PURE__ */ v(
338
- W.div,
174
+ }, [f, v, n, u]), a.useEffect(() => () => {
175
+ f && (u.layers.delete(f), u.layersWithOutsidePointerEventsDisabled.delete(f), lt());
176
+ }, [f, u]), a.useEffect(() => {
177
+ const b = () => g({});
178
+ return document.addEventListener(Be, b), () => document.removeEventListener(Be, b);
179
+ }, []), /* @__PURE__ */ d(
180
+ U.div,
339
181
  {
340
- ...d,
182
+ ...p,
341
183
  ref: h,
342
184
  style: {
343
- pointerEvents: b ? E ? "auto" : "none" : void 0,
185
+ pointerEvents: _ ? R ? "auto" : "none" : void 0,
344
186
  ...e.style
345
187
  },
346
- onFocusCapture: M(e.onFocusCapture, x.onFocusCapture),
347
- onBlurCapture: M(e.onBlurCapture, x.onBlurCapture),
348
- onPointerDownCapture: M(
188
+ onFocusCapture: S(e.onFocusCapture, x.onFocusCapture),
189
+ onBlurCapture: S(e.onBlurCapture, x.onBlurCapture),
190
+ onPointerDownCapture: S(
349
191
  e.onPointerDownCapture,
350
- R.onPointerDownCapture
192
+ M.onPointerDownCapture
351
193
  )
352
194
  }
353
195
  );
354
196
  }
355
197
  );
356
- Lt.displayName = Pr;
357
- var Nr = "DismissableLayerBranch", Ir = a.forwardRef((e, t) => {
358
- const n = a.useContext(Ft), r = a.useRef(null), o = $(t, r);
198
+ It.displayName = hr;
199
+ var Er = "DismissableLayerBranch", yr = a.forwardRef((e, t) => {
200
+ const n = a.useContext(Nt), r = a.useRef(null), o = k(t, r);
359
201
  return a.useEffect(() => {
360
202
  const i = r.current;
361
203
  if (i)
362
204
  return n.branches.add(i), () => {
363
205
  n.branches.delete(i);
364
206
  };
365
- }, [n.branches]), /* @__PURE__ */ v(W.div, { ...e, ref: o });
207
+ }, [n.branches]), /* @__PURE__ */ d(U.div, { ...e, ref: o });
366
208
  });
367
- Ir.displayName = Nr;
368
- function Ar(e, t = globalThis == null ? void 0 : globalThis.document) {
369
- const n = j(e), r = a.useRef(!1), o = a.useRef(() => {
209
+ yr.displayName = Er;
210
+ function Cr(e, t = globalThis == null ? void 0 : globalThis.document) {
211
+ const n = Y(e), r = a.useRef(!1), o = a.useRef(() => {
370
212
  });
371
213
  return a.useEffect(() => {
372
214
  const i = (c) => {
373
215
  if (c.target && !r.current) {
374
- let d = function() {
375
- kt(
376
- Mr,
216
+ let p = function() {
217
+ At(
218
+ gr,
377
219
  n,
378
220
  u,
379
221
  { discrete: !0 }
380
222
  );
381
223
  };
382
224
  const u = { originalEvent: c };
383
- c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = d, t.addEventListener("click", o.current, { once: !0 })) : d();
225
+ c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = p, t.addEventListener("click", o.current, { once: !0 })) : p();
384
226
  } else
385
227
  t.removeEventListener("click", o.current);
386
228
  r.current = !1;
@@ -395,11 +237,11 @@ function Ar(e, t = globalThis == null ? void 0 : globalThis.document) {
395
237
  onPointerDownCapture: () => r.current = !0
396
238
  };
397
239
  }
398
- function Dr(e, t = globalThis == null ? void 0 : globalThis.document) {
399
- const n = j(e), r = a.useRef(!1);
240
+ function _r(e, t = globalThis == null ? void 0 : globalThis.document) {
241
+ const n = Y(e), r = a.useRef(!1);
400
242
  return a.useEffect(() => {
401
243
  const o = (i) => {
402
- i.target && !r.current && kt(xr, n, { originalEvent: i }, {
244
+ i.target && !r.current && At(wr, n, { originalEvent: i }, {
403
245
  discrete: !1
404
246
  });
405
247
  };
@@ -409,35 +251,35 @@ function Dr(e, t = globalThis == null ? void 0 : globalThis.document) {
409
251
  onBlurCapture: () => r.current = !1
410
252
  };
411
253
  }
412
- function pt() {
413
- const e = new CustomEvent(Ue);
254
+ function lt() {
255
+ const e = new CustomEvent(Be);
414
256
  document.dispatchEvent(e);
415
257
  }
416
- function kt(e, t, n, { discrete: r }) {
258
+ function At(e, t, n, { discrete: r }) {
417
259
  const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
418
- t && o.addEventListener(e, t, { once: !0 }), r ? Ot(o, i) : o.dispatchEvent(i);
260
+ t && o.addEventListener(e, t, { once: !0 }), r ? xt(o, i) : o.dispatchEvent(i);
419
261
  }
420
262
  var Ae = 0;
421
- function Tr() {
263
+ function br() {
422
264
  a.useEffect(() => {
423
265
  const e = document.querySelectorAll("[data-radix-focus-guard]");
424
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? mt()), document.body.insertAdjacentElement("beforeend", e[1] ?? mt()), Ae++, () => {
266
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? dt()), document.body.insertAdjacentElement("beforeend", e[1] ?? dt()), Ae++, () => {
425
267
  Ae === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Ae--;
426
268
  };
427
269
  }, []);
428
270
  }
429
- function mt() {
271
+ function dt() {
430
272
  const e = document.createElement("span");
431
273
  return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
432
274
  }
433
- var De = "focusScope.autoFocusOnMount", Te = "focusScope.autoFocusOnUnmount", vt = { bubbles: !1, cancelable: !0 }, Or = "FocusScope", $t = a.forwardRef((e, t) => {
275
+ var De = "focusScope.autoFocusOnMount", Te = "focusScope.autoFocusOnUnmount", ft = { bubbles: !1, cancelable: !0 }, Sr = "FocusScope", Dt = a.forwardRef((e, t) => {
434
276
  const {
435
277
  loop: n = !1,
436
278
  trapped: r = !1,
437
279
  onMountAutoFocus: o,
438
280
  onUnmountAutoFocus: i,
439
281
  ...s
440
- } = e, [c, d] = a.useState(null), u = j(o), p = j(i), f = a.useRef(null), m = $(t, (l) => d(l)), g = a.useRef({
282
+ } = e, [c, p] = a.useState(null), u = Y(o), f = Y(i), m = a.useRef(null), v = k(t, (l) => p(l)), g = a.useRef({
441
283
  paused: !1,
442
284
  pause() {
443
285
  this.paused = !0;
@@ -448,65 +290,65 @@ var De = "focusScope.autoFocusOnMount", Te = "focusScope.autoFocusOnUnmount", vt
448
290
  }).current;
449
291
  a.useEffect(() => {
450
292
  if (r) {
451
- let l = function(b) {
293
+ let l = function(_) {
452
294
  if (g.paused || !c) return;
453
- const E = b.target;
454
- c.contains(E) ? f.current = E : V(f.current, { select: !0 });
455
- }, C = function(b) {
295
+ const R = _.target;
296
+ c.contains(R) ? m.current = R : V(m.current, { select: !0 });
297
+ }, w = function(_) {
456
298
  if (g.paused || !c) return;
457
- const E = b.relatedTarget;
458
- E !== null && (c.contains(E) || V(f.current, { select: !0 }));
459
- }, w = function(b) {
299
+ const R = _.relatedTarget;
300
+ R !== null && (c.contains(R) || V(m.current, { select: !0 }));
301
+ }, E = function(_) {
460
302
  if (document.activeElement === document.body)
461
- for (const R of b)
462
- R.removedNodes.length > 0 && V(c);
303
+ for (const M of _)
304
+ M.removedNodes.length > 0 && V(c);
463
305
  };
464
- document.addEventListener("focusin", l), document.addEventListener("focusout", C);
465
- const _ = new MutationObserver(w);
466
- return c && _.observe(c, { childList: !0, subtree: !0 }), () => {
467
- document.removeEventListener("focusin", l), document.removeEventListener("focusout", C), _.disconnect();
306
+ document.addEventListener("focusin", l), document.addEventListener("focusout", w);
307
+ const C = new MutationObserver(E);
308
+ return c && C.observe(c, { childList: !0, subtree: !0 }), () => {
309
+ document.removeEventListener("focusin", l), document.removeEventListener("focusout", w), C.disconnect();
468
310
  };
469
311
  }
470
312
  }, [r, c, g.paused]), a.useEffect(() => {
471
313
  if (c) {
472
- gt.add(g);
314
+ mt.add(g);
473
315
  const l = document.activeElement;
474
316
  if (!c.contains(l)) {
475
- const w = new CustomEvent(De, vt);
476
- c.addEventListener(De, u), c.dispatchEvent(w), w.defaultPrevented || (Fr(Br(Wt(c)), { select: !0 }), document.activeElement === l && V(c));
317
+ const E = new CustomEvent(De, ft);
318
+ c.addEventListener(De, u), c.dispatchEvent(E), E.defaultPrevented || (Rr(Ir(Tt(c)), { select: !0 }), document.activeElement === l && V(c));
477
319
  }
478
320
  return () => {
479
321
  c.removeEventListener(De, u), setTimeout(() => {
480
- const w = new CustomEvent(Te, vt);
481
- c.addEventListener(Te, p), c.dispatchEvent(w), w.defaultPrevented || V(l ?? document.body, { select: !0 }), c.removeEventListener(Te, p), gt.remove(g);
322
+ const E = new CustomEvent(Te, ft);
323
+ c.addEventListener(Te, f), c.dispatchEvent(E), E.defaultPrevented || V(l ?? document.body, { select: !0 }), c.removeEventListener(Te, f), mt.remove(g);
482
324
  }, 0);
483
325
  };
484
326
  }
485
- }, [c, u, p, g]);
327
+ }, [c, u, f, g]);
486
328
  const h = a.useCallback(
487
329
  (l) => {
488
330
  if (!n && !r || g.paused) return;
489
- const C = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, w = document.activeElement;
490
- if (C && w) {
491
- const _ = l.currentTarget, [b, E] = Lr(_);
492
- b && E ? !l.shiftKey && w === E ? (l.preventDefault(), n && V(b, { select: !0 })) : l.shiftKey && w === b && (l.preventDefault(), n && V(E, { select: !0 })) : w === _ && l.preventDefault();
331
+ const w = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, E = document.activeElement;
332
+ if (w && E) {
333
+ const C = l.currentTarget, [_, R] = Mr(C);
334
+ _ && R ? !l.shiftKey && E === R ? (l.preventDefault(), n && V(_, { select: !0 })) : l.shiftKey && E === _ && (l.preventDefault(), n && V(R, { select: !0 })) : E === C && l.preventDefault();
493
335
  }
494
336
  },
495
337
  [n, r, g.paused]
496
338
  );
497
- return /* @__PURE__ */ v(W.div, { tabIndex: -1, ...s, ref: m, onKeyDown: h });
339
+ return /* @__PURE__ */ d(U.div, { tabIndex: -1, ...s, ref: v, onKeyDown: h });
498
340
  });
499
- $t.displayName = Or;
500
- function Fr(e, { select: t = !1 } = {}) {
341
+ Dt.displayName = Sr;
342
+ function Rr(e, { select: t = !1 } = {}) {
501
343
  const n = document.activeElement;
502
344
  for (const r of e)
503
345
  if (V(r, { select: t }), document.activeElement !== n) return;
504
346
  }
505
- function Lr(e) {
506
- const t = Wt(e), n = ht(t, e), r = ht(t.reverse(), e);
347
+ function Mr(e) {
348
+ const t = Tt(e), n = pt(t, e), r = pt(t.reverse(), e);
507
349
  return [n, r];
508
350
  }
509
- function Wt(e) {
351
+ function Tt(e) {
510
352
  const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
511
353
  acceptNode: (r) => {
512
354
  const o = r.tagName === "INPUT" && r.type === "hidden";
@@ -516,11 +358,11 @@ function Wt(e) {
516
358
  for (; n.nextNode(); ) t.push(n.currentNode);
517
359
  return t;
518
360
  }
519
- function ht(e, t) {
361
+ function pt(e, t) {
520
362
  for (const n of e)
521
- if (!kr(n, { upTo: t })) return n;
363
+ if (!Pr(n, { upTo: t })) return n;
522
364
  }
523
- function kr(e, { upTo: t }) {
365
+ function Pr(e, { upTo: t }) {
524
366
  if (getComputedStyle(e).visibility === "hidden") return !0;
525
367
  for (; e; ) {
526
368
  if (t !== void 0 && e === t) return !1;
@@ -529,40 +371,40 @@ function kr(e, { upTo: t }) {
529
371
  }
530
372
  return !1;
531
373
  }
532
- function $r(e) {
374
+ function xr(e) {
533
375
  return e instanceof HTMLInputElement && "select" in e;
534
376
  }
535
377
  function V(e, { select: t = !1 } = {}) {
536
378
  if (e && e.focus) {
537
379
  const n = document.activeElement;
538
- e.focus({ preventScroll: !0 }), e !== n && $r(e) && t && e.select();
380
+ e.focus({ preventScroll: !0 }), e !== n && xr(e) && t && e.select();
539
381
  }
540
382
  }
541
- var gt = Wr();
542
- function Wr() {
383
+ var mt = Nr();
384
+ function Nr() {
543
385
  let e = [];
544
386
  return {
545
387
  add(t) {
546
388
  const n = e[0];
547
- t !== n && (n == null || n.pause()), e = wt(e, t), e.unshift(t);
389
+ t !== n && (n == null || n.pause()), e = vt(e, t), e.unshift(t);
548
390
  },
549
391
  remove(t) {
550
392
  var n;
551
- e = wt(e, t), (n = e[0]) == null || n.resume();
393
+ e = vt(e, t), (n = e[0]) == null || n.resume();
552
394
  }
553
395
  };
554
396
  }
555
- function wt(e, t) {
397
+ function vt(e, t) {
556
398
  const n = [...e], r = n.indexOf(t);
557
399
  return r !== -1 && n.splice(r, 1), n;
558
400
  }
559
- function Br(e) {
401
+ function Ir(e) {
560
402
  return e.filter((t) => t.tagName !== "A");
561
403
  }
562
- var Ur = "Arrow", Bt = a.forwardRef((e, t) => {
404
+ var Ar = "Arrow", Ot = a.forwardRef((e, t) => {
563
405
  const { children: n, width: r = 10, height: o = 5, ...i } = e;
564
- return /* @__PURE__ */ v(
565
- W.svg,
406
+ return /* @__PURE__ */ d(
407
+ U.svg,
566
408
  {
567
409
  ...i,
568
410
  ref: t,
@@ -570,28 +412,28 @@ var Ur = "Arrow", Bt = a.forwardRef((e, t) => {
570
412
  height: o,
571
413
  viewBox: "0 0 30 10",
572
414
  preserveAspectRatio: "none",
573
- children: e.asChild ? n : /* @__PURE__ */ v("polygon", { points: "0,0 30,0 15,10" })
415
+ children: e.asChild ? n : /* @__PURE__ */ d("polygon", { points: "0,0 30,0 15,10" })
574
416
  }
575
417
  );
576
418
  });
577
- Bt.displayName = Ur;
578
- var Kr = Bt, He = "Popper", [Ut, Kt] = Tt(He), [Gr, Gt] = Ut(He), zt = (e) => {
419
+ Ot.displayName = Ar;
420
+ var Dr = Ot, Xe = "Popper", [Ft, Lt] = Re(Xe), [Tr, kt] = Ft(Xe), Wt = (e) => {
579
421
  const { __scopePopper: t, children: n } = e, [r, o] = a.useState(null);
580
- return /* @__PURE__ */ v(Gr, { scope: t, anchor: r, onAnchorChange: o, children: n });
422
+ return /* @__PURE__ */ d(Tr, { scope: t, anchor: r, onAnchorChange: o, children: n });
581
423
  };
582
- zt.displayName = He;
583
- var Vt = "PopperAnchor", Yt = a.forwardRef(
424
+ Wt.displayName = Xe;
425
+ var Ut = "PopperAnchor", $t = a.forwardRef(
584
426
  (e, t) => {
585
- const { __scopePopper: n, virtualRef: r, ...o } = e, i = Gt(Vt, n), s = a.useRef(null), c = $(t, s);
427
+ const { __scopePopper: n, virtualRef: r, ...o } = e, i = kt(Ut, n), s = a.useRef(null), c = k(t, s);
586
428
  return a.useEffect(() => {
587
429
  i.onAnchorChange((r == null ? void 0 : r.current) || s.current);
588
- }), r ? null : /* @__PURE__ */ v(W.div, { ...o, ref: c });
430
+ }), r ? null : /* @__PURE__ */ d(U.div, { ...o, ref: c });
589
431
  }
590
432
  );
591
- Yt.displayName = Vt;
592
- var Ze = "PopperContent", [zr, Vr] = Ut(Ze), jt = a.forwardRef(
433
+ $t.displayName = Ut;
434
+ var je = "PopperContent", [Or, Fr] = Ft(je), Bt = a.forwardRef(
593
435
  (e, t) => {
594
- var K, ce, F, se, ot, at;
436
+ var K, ie, F, ce, rt, ot;
595
437
  const {
596
438
  __scopePopper: n,
597
439
  side: r = "bottom",
@@ -599,57 +441,57 @@ var Ze = "PopperContent", [zr, Vr] = Ut(Ze), jt = a.forwardRef(
599
441
  align: i = "center",
600
442
  alignOffset: s = 0,
601
443
  arrowPadding: c = 0,
602
- avoidCollisions: d = !0,
444
+ avoidCollisions: p = !0,
603
445
  collisionBoundary: u = [],
604
- collisionPadding: p = 0,
605
- sticky: f = "partial",
606
- hideWhenDetached: m = !1,
446
+ collisionPadding: f = 0,
447
+ sticky: m = "partial",
448
+ hideWhenDetached: v = !1,
607
449
  updatePositionStrategy: g = "optimized",
608
450
  onPlaced: h,
609
451
  ...l
610
- } = e, C = Gt(Ze, n), [w, _] = a.useState(null), b = $(t, (ue) => _(ue)), [E, R] = a.useState(null), x = Hn(E), S = (x == null ? void 0 : x.width) ?? 0, P = (x == null ? void 0 : x.height) ?? 0, I = r + (i !== "center" ? "-" + i : ""), T = typeof p == "number" ? p : { top: 0, right: 0, bottom: 0, left: 0, ...p }, z = Array.isArray(u) ? u : [u], X = z.length > 0, U = {
452
+ } = e, w = kt(je, n), [E, C] = a.useState(null), _ = k(t, (se) => C(se)), [R, M] = a.useState(null), x = Kn(R), b = (x == null ? void 0 : x.width) ?? 0, P = (x == null ? void 0 : x.height) ?? 0, I = r + (i !== "center" ? "-" + i : ""), T = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, z = Array.isArray(u) ? u : [u], X = z.length > 0, B = {
611
453
  padding: T,
612
- boundary: z.filter(jr),
454
+ boundary: z.filter(kr),
613
455
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
614
456
  altBoundary: X
615
- }, { refs: Q, floatingStyles: q, placement: k, isPositioned: J, middlewareData: O } = qn({
457
+ }, { refs: Q, floatingStyles: q, placement: W, isPositioned: J, middlewareData: O } = Vn({
616
458
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
617
459
  strategy: "fixed",
618
460
  placement: I,
619
- whileElementsMounted: (...ue) => Jn(...ue, {
461
+ whileElementsMounted: (...se) => Hn(...se, {
620
462
  animationFrame: g === "always"
621
463
  }),
622
464
  elements: {
623
- reference: C.anchor
465
+ reference: w.anchor
624
466
  },
625
467
  middleware: [
626
- er({ mainAxis: o + P, alignmentAxis: s }),
627
- d && tr({
468
+ Yn({ mainAxis: o + P, alignmentAxis: s }),
469
+ p && Xn({
628
470
  mainAxis: !0,
629
471
  crossAxis: !1,
630
- limiter: f === "partial" ? nr() : void 0,
631
- ...U
472
+ limiter: m === "partial" ? jn() : void 0,
473
+ ...B
632
474
  }),
633
- d && rr({ ...U }),
634
- or({
635
- ...U,
636
- apply: ({ elements: ue, rects: it, availableWidth: Gn, availableHeight: zn }) => {
637
- const { width: Vn, height: Yn } = it.reference, he = ue.floating.style;
638
- he.setProperty("--radix-popper-available-width", `${Gn}px`), he.setProperty("--radix-popper-available-height", `${zn}px`), he.setProperty("--radix-popper-anchor-width", `${Vn}px`), he.setProperty("--radix-popper-anchor-height", `${Yn}px`);
475
+ p && Zn({ ...B }),
476
+ Qn({
477
+ ...B,
478
+ apply: ({ elements: se, rects: at, availableWidth: Ln, availableHeight: kn }) => {
479
+ const { width: Wn, height: Un } = at.reference, he = se.floating.style;
480
+ he.setProperty("--radix-popper-available-width", `${Ln}px`), he.setProperty("--radix-popper-available-height", `${kn}px`), he.setProperty("--radix-popper-anchor-width", `${Wn}px`), he.setProperty("--radix-popper-anchor-height", `${Un}px`);
639
481
  }
640
482
  }),
641
- E && ar({ element: E, padding: c }),
642
- Xr({ arrowWidth: S, arrowHeight: P }),
643
- m && ir({ strategy: "referenceHidden", ...U })
483
+ R && qn({ element: R, padding: c }),
484
+ Wr({ arrowWidth: b, arrowHeight: P }),
485
+ v && Jn({ strategy: "referenceHidden", ...B })
644
486
  ]
645
- }), [y, A] = Zt(k), N = j(h);
646
- be(() => {
487
+ }), [y, A] = zt(W), N = Y(h);
488
+ _e(() => {
647
489
  J && (N == null || N());
648
490
  }, [J, N]);
649
- const B = (K = O.arrow) == null ? void 0 : K.x, ae = (ce = O.arrow) == null ? void 0 : ce.y, ie = ((F = O.arrow) == null ? void 0 : F.centerOffset) !== 0, [ve, H] = a.useState();
650
- return be(() => {
651
- w && H(window.getComputedStyle(w).zIndex);
652
- }, [w]), /* @__PURE__ */ v(
491
+ const $ = (K = O.arrow) == null ? void 0 : K.x, oe = (ie = O.arrow) == null ? void 0 : ie.y, ae = ((F = O.arrow) == null ? void 0 : F.centerOffset) !== 0, [ve, j] = a.useState();
492
+ return _e(() => {
493
+ E && j(window.getComputedStyle(E).zIndex);
494
+ }, [E]), /* @__PURE__ */ d(
653
495
  "div",
654
496
  {
655
497
  ref: Q.setFloating,
@@ -661,34 +503,34 @@ var Ze = "PopperContent", [zr, Vr] = Ut(Ze), jt = a.forwardRef(
661
503
  minWidth: "max-content",
662
504
  zIndex: ve,
663
505
  "--radix-popper-transform-origin": [
664
- (se = O.transformOrigin) == null ? void 0 : se.x,
665
- (ot = O.transformOrigin) == null ? void 0 : ot.y
506
+ (ce = O.transformOrigin) == null ? void 0 : ce.x,
507
+ (rt = O.transformOrigin) == null ? void 0 : rt.y
666
508
  ].join(" "),
667
509
  // hide the content if using the hide middleware and should be hidden
668
510
  // set visibility to hidden and disable pointer events so the UI behaves
669
511
  // as if the PopperContent isn't there at all
670
- ...((at = O.hide) == null ? void 0 : at.referenceHidden) && {
512
+ ...((ot = O.hide) == null ? void 0 : ot.referenceHidden) && {
671
513
  visibility: "hidden",
672
514
  pointerEvents: "none"
673
515
  }
674
516
  },
675
517
  dir: e.dir,
676
- children: /* @__PURE__ */ v(
677
- zr,
518
+ children: /* @__PURE__ */ d(
519
+ Or,
678
520
  {
679
521
  scope: n,
680
522
  placedSide: y,
681
- onArrowChange: R,
682
- arrowX: B,
683
- arrowY: ae,
684
- shouldHideArrow: ie,
685
- children: /* @__PURE__ */ v(
686
- W.div,
523
+ onArrowChange: M,
524
+ arrowX: $,
525
+ arrowY: oe,
526
+ shouldHideArrow: ae,
527
+ children: /* @__PURE__ */ d(
528
+ U.div,
687
529
  {
688
530
  "data-side": y,
689
531
  "data-align": A,
690
532
  ...l,
691
- ref: b,
533
+ ref: _,
692
534
  style: {
693
535
  ...l.style,
694
536
  // if the PopperContent hasn't been placed yet (not all measurements done)
@@ -703,19 +545,19 @@ var Ze = "PopperContent", [zr, Vr] = Ut(Ze), jt = a.forwardRef(
703
545
  );
704
546
  }
705
547
  );
706
- jt.displayName = Ze;
707
- var Xt = "PopperArrow", Yr = {
548
+ Bt.displayName = je;
549
+ var Kt = "PopperArrow", Lr = {
708
550
  top: "bottom",
709
551
  right: "left",
710
552
  bottom: "top",
711
553
  left: "right"
712
- }, Ht = a.forwardRef(function(t, n) {
713
- const { __scopePopper: r, ...o } = t, i = Vr(Xt, r), s = Yr[i.placedSide];
554
+ }, Gt = a.forwardRef(function(t, n) {
555
+ const { __scopePopper: r, ...o } = t, i = Fr(Kt, r), s = Lr[i.placedSide];
714
556
  return (
715
557
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
716
558
  // doesn't report size as we'd expect on SVG elements.
717
559
  // it reports their bounding box which is effectively the largest path inside the SVG.
718
- /* @__PURE__ */ v(
560
+ /* @__PURE__ */ d(
719
561
  "span",
720
562
  {
721
563
  ref: i.onArrowChange,
@@ -738,8 +580,8 @@ var Xt = "PopperArrow", Yr = {
738
580
  }[i.placedSide],
739
581
  visibility: i.shouldHideArrow ? "hidden" : void 0
740
582
  },
741
- children: /* @__PURE__ */ v(
742
- Kr,
583
+ children: /* @__PURE__ */ d(
584
+ Dr,
743
585
  {
744
586
  ...o,
745
587
  ref: n,
@@ -754,35 +596,35 @@ var Xt = "PopperArrow", Yr = {
754
596
  )
755
597
  );
756
598
  });
757
- Ht.displayName = Xt;
758
- function jr(e) {
599
+ Gt.displayName = Kt;
600
+ function kr(e) {
759
601
  return e !== null;
760
602
  }
761
- var Xr = (e) => ({
603
+ var Wr = (e) => ({
762
604
  name: "transformOrigin",
763
605
  options: e,
764
606
  fn(t) {
765
- var C, w, _;
766
- const { placement: n, rects: r, middlewareData: o } = t, s = ((C = o.arrow) == null ? void 0 : C.centerOffset) !== 0, c = s ? 0 : e.arrowWidth, d = s ? 0 : e.arrowHeight, [u, p] = Zt(n), f = { start: "0%", center: "50%", end: "100%" }[p], m = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + c / 2, g = (((_ = o.arrow) == null ? void 0 : _.y) ?? 0) + d / 2;
607
+ var w, E, C;
608
+ const { placement: n, rects: r, middlewareData: o } = t, s = ((w = o.arrow) == null ? void 0 : w.centerOffset) !== 0, c = s ? 0 : e.arrowWidth, p = s ? 0 : e.arrowHeight, [u, f] = zt(n), m = { start: "0%", center: "50%", end: "100%" }[f], v = (((E = o.arrow) == null ? void 0 : E.x) ?? 0) + c / 2, g = (((C = o.arrow) == null ? void 0 : C.y) ?? 0) + p / 2;
767
609
  let h = "", l = "";
768
- return u === "bottom" ? (h = s ? f : `${m}px`, l = `${-d}px`) : u === "top" ? (h = s ? f : `${m}px`, l = `${r.floating.height + d}px`) : u === "right" ? (h = `${-d}px`, l = s ? f : `${g}px`) : u === "left" && (h = `${r.floating.width + d}px`, l = s ? f : `${g}px`), { data: { x: h, y: l } };
610
+ return u === "bottom" ? (h = s ? m : `${v}px`, l = `${-p}px`) : u === "top" ? (h = s ? m : `${v}px`, l = `${r.floating.height + p}px`) : u === "right" ? (h = `${-p}px`, l = s ? m : `${g}px`) : u === "left" && (h = `${r.floating.width + p}px`, l = s ? m : `${g}px`), { data: { x: h, y: l } };
769
611
  }
770
612
  });
771
- function Zt(e) {
613
+ function zt(e) {
772
614
  const [t, n = "center"] = e.split("-");
773
615
  return [t, n];
774
616
  }
775
- var Hr = zt, Zr = Yt, Qr = jt, qr = Ht;
776
- function Jr(e, t) {
617
+ var Ur = Wt, $r = $t, Br = Bt, Kr = Gt;
618
+ function Gr(e, t) {
777
619
  return a.useReducer((n, r) => t[n][r] ?? n, e);
778
620
  }
779
- var Pe = (e) => {
780
- const { present: t, children: n } = e, r = eo(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), i = $(r.ref, to(o));
621
+ var Me = (e) => {
622
+ const { present: t, children: n } = e, r = zr(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), i = k(r.ref, Vr(o));
781
623
  return typeof n == "function" || r.isPresent ? a.cloneElement(o, { ref: i }) : null;
782
624
  };
783
- Pe.displayName = "Presence";
784
- function eo(e) {
785
- const [t, n] = a.useState(), r = a.useRef({}), o = a.useRef(e), i = a.useRef("none"), s = e ? "mounted" : "unmounted", [c, d] = Jr(s, {
625
+ Me.displayName = "Presence";
626
+ function zr(e) {
627
+ const [t, n] = a.useState(), r = a.useRef({}), o = a.useRef(e), i = a.useRef("none"), s = e ? "mounted" : "unmounted", [c, p] = Gr(s, {
786
628
  mounted: {
787
629
  UNMOUNT: "unmounted",
788
630
  ANIMATION_OUT: "unmountSuspended"
@@ -798,32 +640,32 @@ function eo(e) {
798
640
  return a.useEffect(() => {
799
641
  const u = ge(r.current);
800
642
  i.current = c === "mounted" ? u : "none";
801
- }, [c]), be(() => {
802
- const u = r.current, p = o.current;
803
- if (p !== e) {
804
- const m = i.current, g = ge(u);
805
- e ? d("MOUNT") : g === "none" || (u == null ? void 0 : u.display) === "none" ? d("UNMOUNT") : d(p && m !== g ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
643
+ }, [c]), _e(() => {
644
+ const u = r.current, f = o.current;
645
+ if (f !== e) {
646
+ const v = i.current, g = ge(u);
647
+ e ? p("MOUNT") : g === "none" || (u == null ? void 0 : u.display) === "none" ? p("UNMOUNT") : p(f && v !== g ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
806
648
  }
807
- }, [e, d]), be(() => {
649
+ }, [e, p]), _e(() => {
808
650
  if (t) {
809
651
  let u;
810
- const p = t.ownerDocument.defaultView ?? window, f = (g) => {
652
+ const f = t.ownerDocument.defaultView ?? window, m = (g) => {
811
653
  const l = ge(r.current).includes(g.animationName);
812
- if (g.target === t && l && (d("ANIMATION_END"), !o.current)) {
813
- const C = t.style.animationFillMode;
814
- t.style.animationFillMode = "forwards", u = p.setTimeout(() => {
815
- t.style.animationFillMode === "forwards" && (t.style.animationFillMode = C);
654
+ if (g.target === t && l && (p("ANIMATION_END"), !o.current)) {
655
+ const w = t.style.animationFillMode;
656
+ t.style.animationFillMode = "forwards", u = f.setTimeout(() => {
657
+ t.style.animationFillMode === "forwards" && (t.style.animationFillMode = w);
816
658
  });
817
659
  }
818
- }, m = (g) => {
660
+ }, v = (g) => {
819
661
  g.target === t && (i.current = ge(r.current));
820
662
  };
821
- return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
822
- p.clearTimeout(u), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
663
+ return t.addEventListener("animationstart", v), t.addEventListener("animationcancel", m), t.addEventListener("animationend", m), () => {
664
+ f.clearTimeout(u), t.removeEventListener("animationstart", v), t.removeEventListener("animationcancel", m), t.removeEventListener("animationend", m);
823
665
  };
824
666
  } else
825
- d("ANIMATION_END");
826
- }, [t, d]), {
667
+ p("ANIMATION_END");
668
+ }, [t, p]), {
827
669
  isPresent: ["mounted", "unmountSuspended"].includes(c),
828
670
  ref: a.useCallback((u) => {
829
671
  u && (r.current = getComputedStyle(u)), n(u);
@@ -833,118 +675,38 @@ function eo(e) {
833
675
  function ge(e) {
834
676
  return (e == null ? void 0 : e.animationName) || "none";
835
677
  }
836
- function to(e) {
678
+ function Vr(e) {
837
679
  var r, o;
838
680
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
839
681
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
840
682
  }
841
- function ne(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
842
- return function(o) {
843
- if (e == null || e(o), n === !1 || !o.defaultPrevented)
844
- return t == null ? void 0 : t(o);
845
- };
846
- }
847
- function Ct(e, t) {
848
- if (typeof e == "function")
849
- return e(t);
850
- e != null && (e.current = t);
851
- }
852
- function Qt(...e) {
853
- return (t) => {
854
- let n = !1;
855
- const r = e.map((o) => {
856
- const i = Ct(o, t);
857
- return !n && typeof i == "function" && (n = !0), i;
858
- });
859
- if (n)
860
- return () => {
861
- for (let o = 0; o < r.length; o++) {
862
- const i = r[o];
863
- typeof i == "function" ? i() : Ct(e[o], null);
864
- }
865
- };
866
- };
867
- }
868
- function no(...e) {
869
- return a.useCallback(Qt(...e), e);
870
- }
871
- function ro(e, t = []) {
872
- let n = [];
873
- function r(i, s) {
874
- const c = a.createContext(s), d = n.length;
875
- n = [...n, s];
876
- const u = (f) => {
877
- var w;
878
- const { scope: m, children: g, ...h } = f, l = ((w = m == null ? void 0 : m[e]) == null ? void 0 : w[d]) || c, C = a.useMemo(() => h, Object.values(h));
879
- return /* @__PURE__ */ v(l.Provider, { value: C, children: g });
880
- };
881
- u.displayName = i + "Provider";
882
- function p(f, m) {
883
- var l;
884
- const g = ((l = m == null ? void 0 : m[e]) == null ? void 0 : l[d]) || c, h = a.useContext(g);
885
- if (h) return h;
886
- if (s !== void 0) return s;
887
- throw new Error(`\`${f}\` must be used within \`${i}\``);
888
- }
889
- return [u, p];
890
- }
891
- const o = () => {
892
- const i = n.map((s) => a.createContext(s));
893
- return function(c) {
894
- const d = (c == null ? void 0 : c[e]) || i;
895
- return a.useMemo(
896
- () => ({ [`__scope${e}`]: { ...c, [e]: d } }),
897
- [c, d]
898
- );
899
- };
900
- };
901
- return o.scopeName = e, [r, oo(o, ...t)];
902
- }
903
- function oo(...e) {
904
- const t = e[0];
905
- if (e.length === 1) return t;
906
- const n = () => {
907
- const r = e.map((o) => ({
908
- useScope: o(),
909
- scopeName: o.scopeName
910
- }));
911
- return function(i) {
912
- const s = r.reduce((c, { useScope: d, scopeName: u }) => {
913
- const f = d(i)[`__scope${u}`];
914
- return { ...c, ...f };
915
- }, {});
916
- return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
917
- };
918
- };
919
- return n.scopeName = t.scopeName, n;
920
- }
921
- var qt = a.forwardRef((e, t) => {
922
- const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(io);
683
+ var Vt = a.forwardRef((e, t) => {
684
+ const { children: n, ...r } = e, o = a.Children.toArray(n), i = o.find(Yr);
923
685
  if (i) {
924
- const s = i.props.children, c = o.map((d) => d === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : d);
925
- return /* @__PURE__ */ v(Ke, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
686
+ const s = i.props.children, c = o.map((p) => p === i ? a.Children.count(s) > 1 ? a.Children.only(null) : a.isValidElement(s) ? s.props.children : null : p);
687
+ return /* @__PURE__ */ d(Ke, { ...r, ref: t, children: a.isValidElement(s) ? a.cloneElement(s, void 0, c) : null });
926
688
  }
927
- return /* @__PURE__ */ v(Ke, { ...r, ref: t, children: n });
689
+ return /* @__PURE__ */ d(Ke, { ...r, ref: t, children: n });
928
690
  });
929
- qt.displayName = "Slot";
691
+ Vt.displayName = "Slot";
930
692
  var Ke = a.forwardRef((e, t) => {
931
693
  const { children: n, ...r } = e;
932
694
  if (a.isValidElement(n)) {
933
- const o = so(n);
695
+ const o = jr(n);
934
696
  return a.cloneElement(n, {
935
- ...co(r, n.props),
697
+ ...Xr(r, n.props),
936
698
  // @ts-ignore
937
- ref: t ? Qt(t, o) : o
699
+ ref: t ? fe(t, o) : o
938
700
  });
939
701
  }
940
702
  return a.Children.count(n) > 1 ? a.Children.only(null) : null;
941
703
  });
942
704
  Ke.displayName = "SlotClone";
943
- var ao = ({ children: e }) => /* @__PURE__ */ v(Ye, { children: e });
944
- function io(e) {
945
- return a.isValidElement(e) && e.type === ao;
705
+ var Hr = ({ children: e }) => /* @__PURE__ */ d(He, { children: e });
706
+ function Yr(e) {
707
+ return a.isValidElement(e) && e.type === Hr;
946
708
  }
947
- function co(e, t) {
709
+ function Xr(e, t) {
948
710
  const n = { ...t };
949
711
  for (const r in t) {
950
712
  const o = e[r], i = t[r];
@@ -954,12 +716,12 @@ function co(e, t) {
954
716
  }
955
717
  return { ...e, ...n };
956
718
  }
957
- function so(e) {
719
+ function jr(e) {
958
720
  var r, o;
959
721
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
960
722
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
961
723
  }
962
- var uo = [
724
+ var Zr = [
963
725
  "a",
964
726
  "button",
965
727
  "div",
@@ -976,20 +738,20 @@ var uo = [
976
738
  "span",
977
739
  "svg",
978
740
  "ul"
979
- ], Jt = uo.reduce((e, t) => {
741
+ ], Ht = Zr.reduce((e, t) => {
980
742
  const n = a.forwardRef((r, o) => {
981
- const { asChild: i, ...s } = r, c = i ? qt : t;
982
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(c, { ...s, ref: o });
743
+ const { asChild: i, ...s } = r, c = i ? Vt : t;
744
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...s, ref: o });
983
745
  });
984
746
  return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
985
- }, {}), Oe = "rovingFocusGroup.onEntryFocus", lo = { bubbles: !1, cancelable: !0 }, Me = "RovingFocusGroup", [Ge, en, fo] = xt(Me), [po, tn] = ro(
986
- Me,
987
- [fo]
988
- ), [mo, vo] = po(Me), nn = a.forwardRef(
989
- (e, t) => /* @__PURE__ */ v(Ge.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ v(Ge.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ v(ho, { ...e, ref: t }) }) })
747
+ }, {}), Oe = "rovingFocusGroup.onEntryFocus", Qr = { bubbles: !1, cancelable: !0 }, Pe = "RovingFocusGroup", [Ge, Yt, qr] = bt(Pe), [Jr, Xt] = Re(
748
+ Pe,
749
+ [qr]
750
+ ), [eo, to] = Jr(Pe), jt = a.forwardRef(
751
+ (e, t) => /* @__PURE__ */ d(Ge.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(Ge.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(no, { ...e, ref: t }) }) })
990
752
  );
991
- nn.displayName = Me;
992
- var ho = a.forwardRef((e, t) => {
753
+ jt.displayName = Pe;
754
+ var no = a.forwardRef((e, t) => {
993
755
  const {
994
756
  __scopeRovingFocusGroup: n,
995
757
  orientation: r,
@@ -997,21 +759,21 @@ var ho = a.forwardRef((e, t) => {
997
759
  dir: i,
998
760
  currentTabStopId: s,
999
761
  defaultCurrentTabStopId: c,
1000
- onCurrentTabStopIdChange: d,
762
+ onCurrentTabStopIdChange: p,
1001
763
  onEntryFocus: u,
1002
- preventScrollOnEntryFocus: p = !1,
1003
- ...f
1004
- } = e, m = a.useRef(null), g = no(t, m), h = Nt(i), [l = null, C] = Mt({
764
+ preventScrollOnEntryFocus: f = !1,
765
+ ...m
766
+ } = e, v = a.useRef(null), g = k(t, v), h = Rt(i), [l = null, w] = St({
1005
767
  prop: s,
1006
768
  defaultProp: c,
1007
- onChange: d
1008
- }), [w, _] = a.useState(!1), b = j(u), E = en(n), R = a.useRef(!1), [x, S] = a.useState(0);
769
+ onChange: p
770
+ }), [E, C] = a.useState(!1), _ = Y(u), R = Yt(n), M = a.useRef(!1), [x, b] = a.useState(0);
1009
771
  return a.useEffect(() => {
1010
- const P = m.current;
772
+ const P = v.current;
1011
773
  if (P)
1012
- return P.addEventListener(Oe, b), () => P.removeEventListener(Oe, b);
1013
- }, [b]), /* @__PURE__ */ v(
1014
- mo,
774
+ return P.addEventListener(Oe, _), () => P.removeEventListener(Oe, _);
775
+ }, [_]), /* @__PURE__ */ d(
776
+ eo,
1015
777
  {
1016
778
  scope: n,
1017
779
  orientation: r,
@@ -1019,48 +781,48 @@ var ho = a.forwardRef((e, t) => {
1019
781
  loop: o,
1020
782
  currentTabStopId: l,
1021
783
  onItemFocus: a.useCallback(
1022
- (P) => C(P),
1023
- [C]
784
+ (P) => w(P),
785
+ [w]
1024
786
  ),
1025
- onItemShiftTab: a.useCallback(() => _(!0), []),
787
+ onItemShiftTab: a.useCallback(() => C(!0), []),
1026
788
  onFocusableItemAdd: a.useCallback(
1027
- () => S((P) => P + 1),
789
+ () => b((P) => P + 1),
1028
790
  []
1029
791
  ),
1030
792
  onFocusableItemRemove: a.useCallback(
1031
- () => S((P) => P - 1),
793
+ () => b((P) => P - 1),
1032
794
  []
1033
795
  ),
1034
- children: /* @__PURE__ */ v(
1035
- Jt.div,
796
+ children: /* @__PURE__ */ d(
797
+ Ht.div,
1036
798
  {
1037
- tabIndex: w || x === 0 ? -1 : 0,
799
+ tabIndex: E || x === 0 ? -1 : 0,
1038
800
  "data-orientation": r,
1039
- ...f,
801
+ ...m,
1040
802
  ref: g,
1041
803
  style: { outline: "none", ...e.style },
1042
- onMouseDown: ne(e.onMouseDown, () => {
1043
- R.current = !0;
804
+ onMouseDown: S(e.onMouseDown, () => {
805
+ M.current = !0;
1044
806
  }),
1045
- onFocus: ne(e.onFocus, (P) => {
1046
- const I = !R.current;
1047
- if (P.target === P.currentTarget && I && !w) {
1048
- const T = new CustomEvent(Oe, lo);
807
+ onFocus: S(e.onFocus, (P) => {
808
+ const I = !M.current;
809
+ if (P.target === P.currentTarget && I && !E) {
810
+ const T = new CustomEvent(Oe, Qr);
1049
811
  if (P.currentTarget.dispatchEvent(T), !T.defaultPrevented) {
1050
- const z = E().filter((k) => k.focusable), X = z.find((k) => k.active), U = z.find((k) => k.id === l), q = [X, U, ...z].filter(
812
+ const z = R().filter((W) => W.focusable), X = z.find((W) => W.active), B = z.find((W) => W.id === l), q = [X, B, ...z].filter(
1051
813
  Boolean
1052
- ).map((k) => k.ref.current);
1053
- an(q, p);
814
+ ).map((W) => W.ref.current);
815
+ qt(q, f);
1054
816
  }
1055
817
  }
1056
- R.current = !1;
818
+ M.current = !1;
1057
819
  }),
1058
- onBlur: ne(e.onBlur, () => _(!1))
820
+ onBlur: S(e.onBlur, () => C(!1))
1059
821
  }
1060
822
  )
1061
823
  }
1062
824
  );
1063
- }), rn = "RovingFocusGroupItem", on = a.forwardRef(
825
+ }), Zt = "RovingFocusGroupItem", Qt = a.forwardRef(
1064
826
  (e, t) => {
1065
827
  const {
1066
828
  __scopeRovingFocusGroup: n,
@@ -1068,46 +830,46 @@ var ho = a.forwardRef((e, t) => {
1068
830
  active: o = !1,
1069
831
  tabStopId: i,
1070
832
  ...s
1071
- } = e, c = $e(), d = i || c, u = vo(rn, n), p = u.currentTabStopId === d, f = en(n), { onFocusableItemAdd: m, onFocusableItemRemove: g } = u;
833
+ } = e, c = We(), p = i || c, u = to(Zt, n), f = u.currentTabStopId === p, m = Yt(n), { onFocusableItemAdd: v, onFocusableItemRemove: g } = u;
1072
834
  return a.useEffect(() => {
1073
835
  if (r)
1074
- return m(), () => g();
1075
- }, [r, m, g]), /* @__PURE__ */ v(
836
+ return v(), () => g();
837
+ }, [r, v, g]), /* @__PURE__ */ d(
1076
838
  Ge.ItemSlot,
1077
839
  {
1078
840
  scope: n,
1079
- id: d,
841
+ id: p,
1080
842
  focusable: r,
1081
843
  active: o,
1082
- children: /* @__PURE__ */ v(
1083
- Jt.span,
844
+ children: /* @__PURE__ */ d(
845
+ Ht.span,
1084
846
  {
1085
- tabIndex: p ? 0 : -1,
847
+ tabIndex: f ? 0 : -1,
1086
848
  "data-orientation": u.orientation,
1087
849
  ...s,
1088
850
  ref: t,
1089
- onMouseDown: ne(e.onMouseDown, (h) => {
1090
- r ? u.onItemFocus(d) : h.preventDefault();
851
+ onMouseDown: S(e.onMouseDown, (h) => {
852
+ r ? u.onItemFocus(p) : h.preventDefault();
1091
853
  }),
1092
- onFocus: ne(e.onFocus, () => u.onItemFocus(d)),
1093
- onKeyDown: ne(e.onKeyDown, (h) => {
854
+ onFocus: S(e.onFocus, () => u.onItemFocus(p)),
855
+ onKeyDown: S(e.onKeyDown, (h) => {
1094
856
  if (h.key === "Tab" && h.shiftKey) {
1095
857
  u.onItemShiftTab();
1096
858
  return;
1097
859
  }
1098
860
  if (h.target !== h.currentTarget) return;
1099
- const l = Co(h, u.orientation, u.dir);
861
+ const l = ao(h, u.orientation, u.dir);
1100
862
  if (l !== void 0) {
1101
863
  if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey) return;
1102
864
  h.preventDefault();
1103
- let w = f().filter((_) => _.focusable).map((_) => _.ref.current);
1104
- if (l === "last") w.reverse();
865
+ let E = m().filter((C) => C.focusable).map((C) => C.ref.current);
866
+ if (l === "last") E.reverse();
1105
867
  else if (l === "prev" || l === "next") {
1106
- l === "prev" && w.reverse();
1107
- const _ = w.indexOf(h.currentTarget);
1108
- w = u.loop ? yo(w, _ + 1) : w.slice(_ + 1);
868
+ l === "prev" && E.reverse();
869
+ const C = E.indexOf(h.currentTarget);
870
+ E = u.loop ? io(E, C + 1) : E.slice(C + 1);
1109
871
  }
1110
- setTimeout(() => an(w));
872
+ setTimeout(() => qt(E));
1111
873
  }
1112
874
  })
1113
875
  }
@@ -1116,8 +878,8 @@ var ho = a.forwardRef((e, t) => {
1116
878
  );
1117
879
  }
1118
880
  );
1119
- on.displayName = rn;
1120
- var go = {
881
+ Qt.displayName = Zt;
882
+ var ro = {
1121
883
  ArrowLeft: "prev",
1122
884
  ArrowUp: "prev",
1123
885
  ArrowRight: "next",
@@ -1127,28 +889,28 @@ var go = {
1127
889
  PageDown: "last",
1128
890
  End: "last"
1129
891
  };
1130
- function wo(e, t) {
892
+ function oo(e, t) {
1131
893
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
1132
894
  }
1133
- function Co(e, t, n) {
1134
- const r = wo(e.key, n);
895
+ function ao(e, t, n) {
896
+ const r = oo(e.key, n);
1135
897
  if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
1136
- return go[r];
898
+ return ro[r];
1137
899
  }
1138
- function an(e, t = !1) {
900
+ function qt(e, t = !1) {
1139
901
  const n = document.activeElement;
1140
902
  for (const r of e)
1141
903
  if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
1142
904
  }
1143
- function yo(e, t) {
905
+ function io(e, t) {
1144
906
  return e.map((n, r) => e[(t + r) % e.length]);
1145
907
  }
1146
- var _o = nn, bo = on, ye = "right-scroll-bar-position", _e = "width-before-scroll-bar", So = "with-scroll-bars-hidden", Eo = "--removed-body-scroll-bar-size";
908
+ var co = jt, so = Qt, ye = "right-scroll-bar-position", Ce = "width-before-scroll-bar", uo = "with-scroll-bars-hidden", lo = "--removed-body-scroll-bar-size";
1147
909
  function Fe(e, t) {
1148
910
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
1149
911
  }
1150
- function Ro(e, t) {
1151
- var n = Pt(function() {
912
+ function fo(e, t) {
913
+ var n = _t(function() {
1152
914
  return {
1153
915
  // value
1154
916
  value: e,
@@ -1168,15 +930,15 @@ function Ro(e, t) {
1168
930
  })[0];
1169
931
  return n.callback = t, n.facade;
1170
932
  }
1171
- var Po = typeof window < "u" ? a.useLayoutEffect : a.useEffect, yt = /* @__PURE__ */ new WeakMap();
1172
- function Mo(e, t) {
1173
- var n = Ro(null, function(r) {
933
+ var po = typeof window < "u" ? a.useLayoutEffect : a.useEffect, ht = /* @__PURE__ */ new WeakMap();
934
+ function mo(e, t) {
935
+ var n = fo(null, function(r) {
1174
936
  return e.forEach(function(o) {
1175
937
  return Fe(o, r);
1176
938
  });
1177
939
  });
1178
- return Po(function() {
1179
- var r = yt.get(n);
940
+ return po(function() {
941
+ var r = ht.get(n);
1180
942
  if (r) {
1181
943
  var o = new Set(r), i = new Set(e), s = n.current;
1182
944
  o.forEach(function(c) {
@@ -1185,14 +947,14 @@ function Mo(e, t) {
1185
947
  o.has(c) || Fe(c, s);
1186
948
  });
1187
949
  }
1188
- yt.set(n, e);
950
+ ht.set(n, e);
1189
951
  }, [e]), n;
1190
952
  }
1191
- function xo(e) {
953
+ function vo(e) {
1192
954
  return e;
1193
955
  }
1194
- function No(e, t) {
1195
- t === void 0 && (t = xo);
956
+ function ho(e, t) {
957
+ t === void 0 && (t = vo);
1196
958
  var n = [], r = !1, o = {
1197
959
  read: function() {
1198
960
  if (r)
@@ -1228,54 +990,54 @@ function No(e, t) {
1228
990
  var c = n;
1229
991
  n = [], c.forEach(i), s = n;
1230
992
  }
1231
- var d = function() {
1232
- var p = s;
1233
- s = [], p.forEach(i);
993
+ var p = function() {
994
+ var f = s;
995
+ s = [], f.forEach(i);
1234
996
  }, u = function() {
1235
- return Promise.resolve().then(d);
997
+ return Promise.resolve().then(p);
1236
998
  };
1237
999
  u(), n = {
1238
- push: function(p) {
1239
- s.push(p), u();
1000
+ push: function(f) {
1001
+ s.push(f), u();
1240
1002
  },
1241
- filter: function(p) {
1242
- return s = s.filter(p), n;
1003
+ filter: function(f) {
1004
+ return s = s.filter(f), n;
1243
1005
  }
1244
1006
  };
1245
1007
  }
1246
1008
  };
1247
1009
  return o;
1248
1010
  }
1249
- function Io(e) {
1011
+ function go(e) {
1250
1012
  e === void 0 && (e = {});
1251
- var t = No(null);
1252
- return t.options = Y({ async: !0, ssr: !1 }, e), t;
1013
+ var t = ho(null);
1014
+ return t.options = H({ async: !0, ssr: !1 }, e), t;
1253
1015
  }
1254
- var cn = function(e) {
1255
- var t = e.sideCar, n = It(e, ["sideCar"]);
1016
+ var Jt = function(e) {
1017
+ var t = e.sideCar, n = Mt(e, ["sideCar"]);
1256
1018
  if (!t)
1257
1019
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1258
1020
  var r = t.read();
1259
1021
  if (!r)
1260
1022
  throw new Error("Sidecar medium not found");
1261
- return a.createElement(r, Y({}, n));
1023
+ return a.createElement(r, H({}, n));
1262
1024
  };
1263
- cn.isSideCarExport = !0;
1264
- function Ao(e, t) {
1265
- return e.useMedium(t), cn;
1025
+ Jt.isSideCarExport = !0;
1026
+ function wo(e, t) {
1027
+ return e.useMedium(t), Jt;
1266
1028
  }
1267
- var sn = Io(), Le = function() {
1029
+ var en = go(), Le = function() {
1268
1030
  }, xe = a.forwardRef(function(e, t) {
1269
1031
  var n = a.useRef(null), r = a.useState({
1270
1032
  onScrollCapture: Le,
1271
1033
  onWheelCapture: Le,
1272
1034
  onTouchMoveCapture: Le
1273
- }), o = r[0], i = r[1], s = e.forwardProps, c = e.children, d = e.className, u = e.removeScrollBar, p = e.enabled, f = e.shards, m = e.sideCar, g = e.noIsolation, h = e.inert, l = e.allowPinchZoom, C = e.as, w = C === void 0 ? "div" : C, _ = e.gapMode, b = It(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = m, R = Mo([n, t]), x = Y(Y({}, b), o);
1035
+ }), o = r[0], i = r[1], s = e.forwardProps, c = e.children, p = e.className, u = e.removeScrollBar, f = e.enabled, m = e.shards, v = e.sideCar, g = e.noIsolation, h = e.inert, l = e.allowPinchZoom, w = e.as, E = w === void 0 ? "div" : w, C = e.gapMode, _ = Mt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), R = v, M = mo([n, t]), x = H(H({}, _), o);
1274
1036
  return a.createElement(
1275
1037
  a.Fragment,
1276
1038
  null,
1277
- p && a.createElement(E, { sideCar: sn, removeScrollBar: u, shards: f, noIsolation: g, inert: h, setCallbacks: i, allowPinchZoom: !!l, lockRef: n, gapMode: _ }),
1278
- s ? a.cloneElement(a.Children.only(c), Y(Y({}, x), { ref: R })) : a.createElement(w, Y({}, x, { className: d, ref: R }), c)
1039
+ f && a.createElement(R, { sideCar: en, removeScrollBar: u, shards: m, noIsolation: g, inert: h, setCallbacks: i, allowPinchZoom: !!l, lockRef: n, gapMode: C }),
1040
+ s ? a.cloneElement(a.Children.only(c), H(H({}, x), { ref: M })) : a.createElement(E, H({}, x, { className: p, ref: M }), c)
1279
1041
  );
1280
1042
  });
1281
1043
  xe.defaultProps = {
@@ -1284,36 +1046,36 @@ xe.defaultProps = {
1284
1046
  inert: !1
1285
1047
  };
1286
1048
  xe.classNames = {
1287
- fullWidth: _e,
1049
+ fullWidth: Ce,
1288
1050
  zeroRight: ye
1289
1051
  };
1290
- function Do() {
1052
+ function Eo() {
1291
1053
  if (!document)
1292
1054
  return null;
1293
1055
  var e = document.createElement("style");
1294
1056
  e.type = "text/css";
1295
- var t = cr();
1057
+ var t = er();
1296
1058
  return t && e.setAttribute("nonce", t), e;
1297
1059
  }
1298
- function To(e, t) {
1060
+ function yo(e, t) {
1299
1061
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
1300
1062
  }
1301
- function Oo(e) {
1063
+ function Co(e) {
1302
1064
  var t = document.head || document.getElementsByTagName("head")[0];
1303
1065
  t.appendChild(e);
1304
1066
  }
1305
- var Fo = function() {
1067
+ var _o = function() {
1306
1068
  var e = 0, t = null;
1307
1069
  return {
1308
1070
  add: function(n) {
1309
- e == 0 && (t = Do()) && (To(t, n), Oo(t)), e++;
1071
+ e == 0 && (t = Eo()) && (yo(t, n), Co(t)), e++;
1310
1072
  },
1311
1073
  remove: function() {
1312
1074
  e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
1313
1075
  }
1314
1076
  };
1315
- }, Lo = function() {
1316
- var e = Fo();
1077
+ }, bo = function() {
1078
+ var e = _o();
1317
1079
  return function(t, n) {
1318
1080
  a.useEffect(function() {
1319
1081
  return e.add(t), function() {
@@ -1321,40 +1083,40 @@ var Fo = function() {
1321
1083
  };
1322
1084
  }, [t && n]);
1323
1085
  };
1324
- }, un = function() {
1325
- var e = Lo(), t = function(n) {
1086
+ }, tn = function() {
1087
+ var e = bo(), t = function(n) {
1326
1088
  var r = n.styles, o = n.dynamic;
1327
1089
  return e(r, o), null;
1328
1090
  };
1329
1091
  return t;
1330
- }, ko = {
1092
+ }, So = {
1331
1093
  left: 0,
1332
1094
  top: 0,
1333
1095
  right: 0,
1334
1096
  gap: 0
1335
1097
  }, ke = function(e) {
1336
1098
  return parseInt(e || "", 10) || 0;
1337
- }, $o = function(e) {
1099
+ }, Ro = function(e) {
1338
1100
  var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
1339
1101
  return [ke(n), ke(r), ke(o)];
1340
- }, Wo = function(e) {
1102
+ }, Mo = function(e) {
1341
1103
  if (e === void 0 && (e = "margin"), typeof window > "u")
1342
- return ko;
1343
- var t = $o(e), n = document.documentElement.clientWidth, r = window.innerWidth;
1104
+ return So;
1105
+ var t = Ro(e), n = document.documentElement.clientWidth, r = window.innerWidth;
1344
1106
  return {
1345
1107
  left: t[0],
1346
1108
  top: t[1],
1347
1109
  right: t[2],
1348
1110
  gap: Math.max(0, r - n + t[2] - t[0])
1349
1111
  };
1350
- }, Bo = un(), re = "data-scroll-locked", Uo = function(e, t, n, r) {
1112
+ }, Po = tn(), ne = "data-scroll-locked", xo = function(e, t, n, r) {
1351
1113
  var o = e.left, i = e.top, s = e.right, c = e.gap;
1352
1114
  return n === void 0 && (n = "margin"), `
1353
- .`.concat(So, ` {
1115
+ .`.concat(uo, ` {
1354
1116
  overflow: hidden `).concat(r, `;
1355
1117
  padding-right: `).concat(c, "px ").concat(r, `;
1356
1118
  }
1357
- body[`).concat(re, `] {
1119
+ body[`).concat(ne, `] {
1358
1120
  overflow: hidden `).concat(r, `;
1359
1121
  overscroll-behavior: contain;
1360
1122
  `).concat([
@@ -1375,7 +1137,7 @@ var Fo = function() {
1375
1137
  right: `).concat(c, "px ").concat(r, `;
1376
1138
  }
1377
1139
 
1378
- .`).concat(_e, ` {
1140
+ .`).concat(Ce, ` {
1379
1141
  margin-right: `).concat(c, "px ").concat(r, `;
1380
1142
  }
1381
1143
 
@@ -1383,31 +1145,31 @@ var Fo = function() {
1383
1145
  right: 0 `).concat(r, `;
1384
1146
  }
1385
1147
 
1386
- .`).concat(_e, " .").concat(_e, ` {
1148
+ .`).concat(Ce, " .").concat(Ce, ` {
1387
1149
  margin-right: 0 `).concat(r, `;
1388
1150
  }
1389
1151
 
1390
- body[`).concat(re, `] {
1391
- `).concat(Eo, ": ").concat(c, `px;
1152
+ body[`).concat(ne, `] {
1153
+ `).concat(lo, ": ").concat(c, `px;
1392
1154
  }
1393
1155
  `);
1394
- }, _t = function() {
1395
- var e = parseInt(document.body.getAttribute(re) || "0", 10);
1156
+ }, gt = function() {
1157
+ var e = parseInt(document.body.getAttribute(ne) || "0", 10);
1396
1158
  return isFinite(e) ? e : 0;
1397
- }, Ko = function() {
1159
+ }, No = function() {
1398
1160
  a.useEffect(function() {
1399
- return document.body.setAttribute(re, (_t() + 1).toString()), function() {
1400
- var e = _t() - 1;
1401
- e <= 0 ? document.body.removeAttribute(re) : document.body.setAttribute(re, e.toString());
1161
+ return document.body.setAttribute(ne, (gt() + 1).toString()), function() {
1162
+ var e = gt() - 1;
1163
+ e <= 0 ? document.body.removeAttribute(ne) : document.body.setAttribute(ne, e.toString());
1402
1164
  };
1403
1165
  }, []);
1404
- }, Go = function(e) {
1166
+ }, Io = function(e) {
1405
1167
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
1406
- Ko();
1168
+ No();
1407
1169
  var i = a.useMemo(function() {
1408
- return Wo(o);
1170
+ return Mo(o);
1409
1171
  }, [o]);
1410
- return a.createElement(Bo, { styles: Uo(i, !t, o, n ? "" : "!important") });
1172
+ return a.createElement(Po, { styles: xo(i, !t, o, n ? "" : "!important") });
1411
1173
  }, ze = !1;
1412
1174
  if (typeof window < "u")
1413
1175
  try {
@@ -1420,205 +1182,205 @@ if (typeof window < "u")
1420
1182
  } catch {
1421
1183
  ze = !1;
1422
1184
  }
1423
- var ee = ze ? { passive: !1 } : !1, zo = function(e) {
1185
+ var ee = ze ? { passive: !1 } : !1, Ao = function(e) {
1424
1186
  return e.tagName === "TEXTAREA";
1425
- }, ln = function(e, t) {
1187
+ }, nn = function(e, t) {
1426
1188
  if (!(e instanceof Element))
1427
1189
  return !1;
1428
1190
  var n = window.getComputedStyle(e);
1429
1191
  return (
1430
1192
  // not-not-scrollable
1431
1193
  n[t] !== "hidden" && // contains scroll inside self
1432
- !(n.overflowY === n.overflowX && !zo(e) && n[t] === "visible")
1194
+ !(n.overflowY === n.overflowX && !Ao(e) && n[t] === "visible")
1433
1195
  );
1434
- }, Vo = function(e) {
1435
- return ln(e, "overflowY");
1436
- }, Yo = function(e) {
1437
- return ln(e, "overflowX");
1438
- }, bt = function(e, t) {
1196
+ }, Do = function(e) {
1197
+ return nn(e, "overflowY");
1198
+ }, To = function(e) {
1199
+ return nn(e, "overflowX");
1200
+ }, wt = function(e, t) {
1439
1201
  var n = t.ownerDocument, r = t;
1440
1202
  do {
1441
1203
  typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
1442
- var o = dn(e, r);
1204
+ var o = rn(e, r);
1443
1205
  if (o) {
1444
- var i = fn(e, r), s = i[1], c = i[2];
1206
+ var i = on(e, r), s = i[1], c = i[2];
1445
1207
  if (s > c)
1446
1208
  return !0;
1447
1209
  }
1448
1210
  r = r.parentNode;
1449
1211
  } while (r && r !== n.body);
1450
1212
  return !1;
1451
- }, jo = function(e) {
1213
+ }, Oo = function(e) {
1452
1214
  var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
1453
1215
  return [
1454
1216
  t,
1455
1217
  n,
1456
1218
  r
1457
1219
  ];
1458
- }, Xo = function(e) {
1220
+ }, Fo = function(e) {
1459
1221
  var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
1460
1222
  return [
1461
1223
  t,
1462
1224
  n,
1463
1225
  r
1464
1226
  ];
1465
- }, dn = function(e, t) {
1466
- return e === "v" ? Vo(t) : Yo(t);
1467
- }, fn = function(e, t) {
1468
- return e === "v" ? jo(t) : Xo(t);
1469
- }, Ho = function(e, t) {
1227
+ }, rn = function(e, t) {
1228
+ return e === "v" ? Do(t) : To(t);
1229
+ }, on = function(e, t) {
1230
+ return e === "v" ? Oo(t) : Fo(t);
1231
+ }, Lo = function(e, t) {
1470
1232
  return e === "h" && t === "rtl" ? -1 : 1;
1471
- }, Zo = function(e, t, n, r, o) {
1472
- var i = Ho(e, window.getComputedStyle(t).direction), s = i * r, c = n.target, d = t.contains(c), u = !1, p = s > 0, f = 0, m = 0;
1233
+ }, ko = function(e, t, n, r, o) {
1234
+ var i = Lo(e, window.getComputedStyle(t).direction), s = i * r, c = n.target, p = t.contains(c), u = !1, f = s > 0, m = 0, v = 0;
1473
1235
  do {
1474
- var g = fn(e, c), h = g[0], l = g[1], C = g[2], w = l - C - i * h;
1475
- (h || w) && dn(e, c) && (f += w, m += h), c instanceof ShadowRoot ? c = c.host : c = c.parentNode;
1236
+ var g = on(e, c), h = g[0], l = g[1], w = g[2], E = l - w - i * h;
1237
+ (h || E) && rn(e, c) && (m += E, v += h), c instanceof ShadowRoot ? c = c.host : c = c.parentNode;
1476
1238
  } while (
1477
1239
  // portaled content
1478
- !d && c !== document.body || // self content
1479
- d && (t.contains(c) || t === c)
1240
+ !p && c !== document.body || // self content
1241
+ p && (t.contains(c) || t === c)
1480
1242
  );
1481
- return (p && (Math.abs(f) < 1 || !o) || !p && (Math.abs(m) < 1 || !o)) && (u = !0), u;
1482
- }, Ce = function(e) {
1243
+ return (f && (Math.abs(m) < 1 || !o) || !f && (Math.abs(v) < 1 || !o)) && (u = !0), u;
1244
+ }, Ee = function(e) {
1483
1245
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
1484
- }, St = function(e) {
1485
- return [e.deltaX, e.deltaY];
1486
1246
  }, Et = function(e) {
1247
+ return [e.deltaX, e.deltaY];
1248
+ }, yt = function(e) {
1487
1249
  return e && "current" in e ? e.current : e;
1488
- }, Qo = function(e, t) {
1250
+ }, Wo = function(e, t) {
1489
1251
  return e[0] === t[0] && e[1] === t[1];
1490
- }, qo = function(e) {
1252
+ }, Uo = function(e) {
1491
1253
  return `
1492
1254
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
1493
1255
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1494
1256
  `);
1495
- }, Jo = 0, te = [];
1496
- function ea(e) {
1497
- var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(Jo++)[0], i = a.useState(un)[0], s = a.useRef(e);
1257
+ }, $o = 0, te = [];
1258
+ function Bo(e) {
1259
+ var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState($o++)[0], i = a.useState(tn)[0], s = a.useRef(e);
1498
1260
  a.useEffect(function() {
1499
1261
  s.current = e;
1500
1262
  }, [e]), a.useEffect(function() {
1501
1263
  if (e.inert) {
1502
1264
  document.body.classList.add("block-interactivity-".concat(o));
1503
- var l = ur([e.lockRef.current], (e.shards || []).map(Et), !0).filter(Boolean);
1504
- return l.forEach(function(C) {
1505
- return C.classList.add("allow-interactivity-".concat(o));
1265
+ var l = nr([e.lockRef.current], (e.shards || []).map(yt), !0).filter(Boolean);
1266
+ return l.forEach(function(w) {
1267
+ return w.classList.add("allow-interactivity-".concat(o));
1506
1268
  }), function() {
1507
- document.body.classList.remove("block-interactivity-".concat(o)), l.forEach(function(C) {
1508
- return C.classList.remove("allow-interactivity-".concat(o));
1269
+ document.body.classList.remove("block-interactivity-".concat(o)), l.forEach(function(w) {
1270
+ return w.classList.remove("allow-interactivity-".concat(o));
1509
1271
  });
1510
1272
  };
1511
1273
  }
1512
1274
  }, [e.inert, e.lockRef.current, e.shards]);
1513
- var c = a.useCallback(function(l, C) {
1275
+ var c = a.useCallback(function(l, w) {
1514
1276
  if ("touches" in l && l.touches.length === 2 || l.type === "wheel" && l.ctrlKey)
1515
1277
  return !s.current.allowPinchZoom;
1516
- var w = Ce(l), _ = n.current, b = "deltaX" in l ? l.deltaX : _[0] - w[0], E = "deltaY" in l ? l.deltaY : _[1] - w[1], R, x = l.target, S = Math.abs(b) > Math.abs(E) ? "h" : "v";
1517
- if ("touches" in l && S === "h" && x.type === "range")
1278
+ var E = Ee(l), C = n.current, _ = "deltaX" in l ? l.deltaX : C[0] - E[0], R = "deltaY" in l ? l.deltaY : C[1] - E[1], M, x = l.target, b = Math.abs(_) > Math.abs(R) ? "h" : "v";
1279
+ if ("touches" in l && b === "h" && x.type === "range")
1518
1280
  return !1;
1519
- var P = bt(S, x);
1281
+ var P = wt(b, x);
1520
1282
  if (!P)
1521
1283
  return !0;
1522
- if (P ? R = S : (R = S === "v" ? "h" : "v", P = bt(S, x)), !P)
1284
+ if (P ? M = b : (M = b === "v" ? "h" : "v", P = wt(b, x)), !P)
1523
1285
  return !1;
1524
- if (!r.current && "changedTouches" in l && (b || E) && (r.current = R), !R)
1286
+ if (!r.current && "changedTouches" in l && (_ || R) && (r.current = M), !M)
1525
1287
  return !0;
1526
- var I = r.current || R;
1527
- return Zo(I, C, l, I === "h" ? b : E, !0);
1528
- }, []), d = a.useCallback(function(l) {
1529
- var C = l;
1288
+ var I = r.current || M;
1289
+ return ko(I, w, l, I === "h" ? _ : R, !0);
1290
+ }, []), p = a.useCallback(function(l) {
1291
+ var w = l;
1530
1292
  if (!(!te.length || te[te.length - 1] !== i)) {
1531
- var w = "deltaY" in C ? St(C) : Ce(C), _ = t.current.filter(function(R) {
1532
- return R.name === C.type && (R.target === C.target || C.target === R.shadowParent) && Qo(R.delta, w);
1293
+ var E = "deltaY" in w ? Et(w) : Ee(w), C = t.current.filter(function(M) {
1294
+ return M.name === w.type && (M.target === w.target || w.target === M.shadowParent) && Wo(M.delta, E);
1533
1295
  })[0];
1534
- if (_ && _.should) {
1535
- C.cancelable && C.preventDefault();
1296
+ if (C && C.should) {
1297
+ w.cancelable && w.preventDefault();
1536
1298
  return;
1537
1299
  }
1538
- if (!_) {
1539
- var b = (s.current.shards || []).map(Et).filter(Boolean).filter(function(R) {
1540
- return R.contains(C.target);
1541
- }), E = b.length > 0 ? c(C, b[0]) : !s.current.noIsolation;
1542
- E && C.cancelable && C.preventDefault();
1300
+ if (!C) {
1301
+ var _ = (s.current.shards || []).map(yt).filter(Boolean).filter(function(M) {
1302
+ return M.contains(w.target);
1303
+ }), R = _.length > 0 ? c(w, _[0]) : !s.current.noIsolation;
1304
+ R && w.cancelable && w.preventDefault();
1543
1305
  }
1544
1306
  }
1545
- }, []), u = a.useCallback(function(l, C, w, _) {
1546
- var b = { name: l, delta: C, target: w, should: _, shadowParent: ta(w) };
1547
- t.current.push(b), setTimeout(function() {
1548
- t.current = t.current.filter(function(E) {
1549
- return E !== b;
1307
+ }, []), u = a.useCallback(function(l, w, E, C) {
1308
+ var _ = { name: l, delta: w, target: E, should: C, shadowParent: Ko(E) };
1309
+ t.current.push(_), setTimeout(function() {
1310
+ t.current = t.current.filter(function(R) {
1311
+ return R !== _;
1550
1312
  });
1551
1313
  }, 1);
1552
- }, []), p = a.useCallback(function(l) {
1553
- n.current = Ce(l), r.current = void 0;
1554
1314
  }, []), f = a.useCallback(function(l) {
1555
- u(l.type, St(l), l.target, c(l, e.lockRef.current));
1315
+ n.current = Ee(l), r.current = void 0;
1556
1316
  }, []), m = a.useCallback(function(l) {
1557
- u(l.type, Ce(l), l.target, c(l, e.lockRef.current));
1317
+ u(l.type, Et(l), l.target, c(l, e.lockRef.current));
1318
+ }, []), v = a.useCallback(function(l) {
1319
+ u(l.type, Ee(l), l.target, c(l, e.lockRef.current));
1558
1320
  }, []);
1559
1321
  a.useEffect(function() {
1560
1322
  return te.push(i), e.setCallbacks({
1561
- onScrollCapture: f,
1562
- onWheelCapture: f,
1563
- onTouchMoveCapture: m
1564
- }), document.addEventListener("wheel", d, ee), document.addEventListener("touchmove", d, ee), document.addEventListener("touchstart", p, ee), function() {
1323
+ onScrollCapture: m,
1324
+ onWheelCapture: m,
1325
+ onTouchMoveCapture: v
1326
+ }), document.addEventListener("wheel", p, ee), document.addEventListener("touchmove", p, ee), document.addEventListener("touchstart", f, ee), function() {
1565
1327
  te = te.filter(function(l) {
1566
1328
  return l !== i;
1567
- }), document.removeEventListener("wheel", d, ee), document.removeEventListener("touchmove", d, ee), document.removeEventListener("touchstart", p, ee);
1329
+ }), document.removeEventListener("wheel", p, ee), document.removeEventListener("touchmove", p, ee), document.removeEventListener("touchstart", f, ee);
1568
1330
  };
1569
1331
  }, []);
1570
1332
  var g = e.removeScrollBar, h = e.inert;
1571
1333
  return a.createElement(
1572
1334
  a.Fragment,
1573
1335
  null,
1574
- h ? a.createElement(i, { styles: qo(o) }) : null,
1575
- g ? a.createElement(Go, { gapMode: e.gapMode }) : null
1336
+ h ? a.createElement(i, { styles: Uo(o) }) : null,
1337
+ g ? a.createElement(Io, { gapMode: e.gapMode }) : null
1576
1338
  );
1577
1339
  }
1578
- function ta(e) {
1340
+ function Ko(e) {
1579
1341
  for (var t = null; e !== null; )
1580
1342
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1581
1343
  return t;
1582
1344
  }
1583
- const na = Ao(sn, ea);
1584
- var pn = a.forwardRef(function(e, t) {
1585
- return a.createElement(xe, Y({}, e, { ref: t, sideCar: na }));
1345
+ const Go = wo(en, Bo);
1346
+ var an = a.forwardRef(function(e, t) {
1347
+ return a.createElement(xe, H({}, e, { ref: t, sideCar: Go }));
1586
1348
  });
1587
- pn.classNames = xe.classNames;
1588
- var Ve = ["Enter", " "], ra = ["ArrowDown", "PageUp", "Home"], mn = ["ArrowUp", "PageDown", "End"], oa = [...ra, ...mn], aa = {
1349
+ an.classNames = xe.classNames;
1350
+ var Ve = ["Enter", " "], zo = ["ArrowDown", "PageUp", "Home"], cn = ["ArrowUp", "PageDown", "End"], Vo = [...zo, ...cn], Ho = {
1589
1351
  ltr: [...Ve, "ArrowRight"],
1590
1352
  rtl: [...Ve, "ArrowLeft"]
1591
- }, ia = {
1353
+ }, Yo = {
1592
1354
  ltr: ["ArrowLeft"],
1593
1355
  rtl: ["ArrowRight"]
1594
- }, pe = "Menu", [de, ca, sa] = xt(pe), [Z, vn] = Tt(pe, [
1595
- sa,
1596
- Kt,
1597
- tn
1598
- ]), Ne = Kt(), hn = tn(), [ua, oe] = Z(pe), [la, me] = Z(pe), gn = (e) => {
1599
- const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: i, modal: s = !0 } = e, c = Ne(t), [d, u] = a.useState(null), p = a.useRef(!1), f = j(i), m = Nt(o);
1356
+ }, pe = "Menu", [le, Xo, jo] = bt(pe), [Z, sn] = Re(pe, [
1357
+ jo,
1358
+ Lt,
1359
+ Xt
1360
+ ]), Ne = Lt(), un = Xt(), [Zo, re] = Z(pe), [Qo, me] = Z(pe), ln = (e) => {
1361
+ const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: i, modal: s = !0 } = e, c = Ne(t), [p, u] = a.useState(null), f = a.useRef(!1), m = Y(i), v = Rt(o);
1600
1362
  return a.useEffect(() => {
1601
1363
  const g = () => {
1602
- p.current = !0, document.addEventListener("pointerdown", h, { capture: !0, once: !0 }), document.addEventListener("pointermove", h, { capture: !0, once: !0 });
1603
- }, h = () => p.current = !1;
1364
+ f.current = !0, document.addEventListener("pointerdown", h, { capture: !0, once: !0 }), document.addEventListener("pointermove", h, { capture: !0, once: !0 });
1365
+ }, h = () => f.current = !1;
1604
1366
  return document.addEventListener("keydown", g, { capture: !0 }), () => {
1605
1367
  document.removeEventListener("keydown", g, { capture: !0 }), document.removeEventListener("pointerdown", h, { capture: !0 }), document.removeEventListener("pointermove", h, { capture: !0 });
1606
1368
  };
1607
- }, []), /* @__PURE__ */ v(Hr, { ...c, children: /* @__PURE__ */ v(
1608
- ua,
1369
+ }, []), /* @__PURE__ */ d(Ur, { ...c, children: /* @__PURE__ */ d(
1370
+ Zo,
1609
1371
  {
1610
1372
  scope: t,
1611
1373
  open: n,
1612
- onOpenChange: f,
1613
- content: d,
1374
+ onOpenChange: m,
1375
+ content: p,
1614
1376
  onContentChange: u,
1615
- children: /* @__PURE__ */ v(
1616
- la,
1377
+ children: /* @__PURE__ */ d(
1378
+ Qo,
1617
1379
  {
1618
1380
  scope: t,
1619
- onClose: a.useCallback(() => f(!1), [f]),
1620
- isUsingKeyboardRef: p,
1621
- dir: m,
1381
+ onClose: a.useCallback(() => m(!1), [m]),
1382
+ isUsingKeyboardRef: f,
1383
+ dir: v,
1622
1384
  modal: s,
1623
1385
  children: r
1624
1386
  }
@@ -1626,36 +1388,36 @@ var Ve = ["Enter", " "], ra = ["ArrowDown", "PageUp", "Home"], mn = ["ArrowUp",
1626
1388
  }
1627
1389
  ) });
1628
1390
  };
1629
- gn.displayName = pe;
1630
- var da = "MenuAnchor", Qe = a.forwardRef(
1391
+ ln.displayName = pe;
1392
+ var qo = "MenuAnchor", Ze = a.forwardRef(
1631
1393
  (e, t) => {
1632
1394
  const { __scopeMenu: n, ...r } = e, o = Ne(n);
1633
- return /* @__PURE__ */ v(Zr, { ...o, ...r, ref: t });
1395
+ return /* @__PURE__ */ d($r, { ...o, ...r, ref: t });
1634
1396
  }
1635
1397
  );
1636
- Qe.displayName = da;
1637
- var fa = "MenuPortal", [Li, wn] = Z(fa, {
1398
+ Ze.displayName = qo;
1399
+ var Jo = "MenuPortal", [bi, dn] = Z(Jo, {
1638
1400
  forceMount: void 0
1639
- }), L = "MenuContent", [pa, qe] = Z(L), Cn = a.forwardRef(
1401
+ }), L = "MenuContent", [ea, Qe] = Z(L), fn = a.forwardRef(
1640
1402
  (e, t) => {
1641
- const n = wn(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = oe(L, e.__scopeMenu), s = me(L, e.__scopeMenu);
1642
- return /* @__PURE__ */ v(de.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ v(Pe, { present: r || i.open, children: /* @__PURE__ */ v(de.Slot, { scope: e.__scopeMenu, children: s.modal ? /* @__PURE__ */ v(ma, { ...o, ref: t }) : /* @__PURE__ */ v(va, { ...o, ref: t }) }) }) });
1403
+ const n = dn(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = re(L, e.__scopeMenu), s = me(L, e.__scopeMenu);
1404
+ return /* @__PURE__ */ d(le.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(Me, { present: r || i.open, children: /* @__PURE__ */ d(le.Slot, { scope: e.__scopeMenu, children: s.modal ? /* @__PURE__ */ d(ta, { ...o, ref: t }) : /* @__PURE__ */ d(na, { ...o, ref: t }) }) }) });
1643
1405
  }
1644
- ), ma = a.forwardRef(
1406
+ ), ta = a.forwardRef(
1645
1407
  (e, t) => {
1646
- const n = oe(L, e.__scopeMenu), r = a.useRef(null), o = $(t, r);
1408
+ const n = re(L, e.__scopeMenu), r = a.useRef(null), o = k(t, r);
1647
1409
  return a.useEffect(() => {
1648
1410
  const i = r.current;
1649
- if (i) return sr(i);
1650
- }, []), /* @__PURE__ */ v(
1651
- Je,
1411
+ if (i) return tr(i);
1412
+ }, []), /* @__PURE__ */ d(
1413
+ qe,
1652
1414
  {
1653
1415
  ...e,
1654
1416
  ref: o,
1655
1417
  trapFocus: n.open,
1656
1418
  disableOutsidePointerEvents: n.open,
1657
1419
  disableOutsideScroll: !0,
1658
- onFocusOutside: M(
1420
+ onFocusOutside: S(
1659
1421
  e.onFocusOutside,
1660
1422
  (i) => i.preventDefault(),
1661
1423
  { checkForDefaultPrevented: !1 }
@@ -1664,10 +1426,10 @@ var fa = "MenuPortal", [Li, wn] = Z(fa, {
1664
1426
  }
1665
1427
  );
1666
1428
  }
1667
- ), va = a.forwardRef((e, t) => {
1668
- const n = oe(L, e.__scopeMenu);
1669
- return /* @__PURE__ */ v(
1670
- Je,
1429
+ ), na = a.forwardRef((e, t) => {
1430
+ const n = re(L, e.__scopeMenu);
1431
+ return /* @__PURE__ */ d(
1432
+ qe,
1671
1433
  {
1672
1434
  ...e,
1673
1435
  ref: t,
@@ -1677,7 +1439,7 @@ var fa = "MenuPortal", [Li, wn] = Z(fa, {
1677
1439
  onDismiss: () => n.onOpenChange(!1)
1678
1440
  }
1679
1441
  );
1680
- }), Je = a.forwardRef(
1442
+ }), qe = a.forwardRef(
1681
1443
  (e, t) => {
1682
1444
  const {
1683
1445
  __scopeMenu: n,
@@ -1686,28 +1448,28 @@ var fa = "MenuPortal", [Li, wn] = Z(fa, {
1686
1448
  onOpenAutoFocus: i,
1687
1449
  onCloseAutoFocus: s,
1688
1450
  disableOutsidePointerEvents: c,
1689
- onEntryFocus: d,
1451
+ onEntryFocus: p,
1690
1452
  onEscapeKeyDown: u,
1691
- onPointerDownOutside: p,
1692
- onFocusOutside: f,
1693
- onInteractOutside: m,
1453
+ onPointerDownOutside: f,
1454
+ onFocusOutside: m,
1455
+ onInteractOutside: v,
1694
1456
  onDismiss: g,
1695
1457
  disableOutsideScroll: h,
1696
1458
  ...l
1697
- } = e, C = oe(L, n), w = me(L, n), _ = Ne(n), b = hn(n), E = ca(n), [R, x] = a.useState(null), S = a.useRef(null), P = $(t, S, C.onContentChange), I = a.useRef(0), T = a.useRef(""), z = a.useRef(0), X = a.useRef(null), U = a.useRef("right"), Q = a.useRef(0), q = h ? pn : a.Fragment, k = h ? { as: Xe, allowPinchZoom: !0 } : void 0, J = (y) => {
1698
- var K, ce;
1699
- const A = T.current + y, N = E().filter((F) => !F.disabled), B = document.activeElement, ae = (K = N.find((F) => F.ref.current === B)) == null ? void 0 : K.textValue, ie = N.map((F) => F.textValue), ve = Ma(ie, A, ae), H = (ce = N.find((F) => F.textValue === ve)) == null ? void 0 : ce.ref.current;
1700
- (function F(se) {
1701
- T.current = se, window.clearTimeout(I.current), se !== "" && (I.current = window.setTimeout(() => F(""), 1e3));
1702
- })(A), H && setTimeout(() => H.focus());
1459
+ } = e, w = re(L, n), E = me(L, n), C = Ne(n), _ = un(n), R = Xo(n), [M, x] = a.useState(null), b = a.useRef(null), P = k(t, b, w.onContentChange), I = a.useRef(0), T = a.useRef(""), z = a.useRef(0), X = a.useRef(null), B = a.useRef("right"), Q = a.useRef(0), q = h ? an : a.Fragment, W = h ? { as: Ye, allowPinchZoom: !0 } : void 0, J = (y) => {
1460
+ var K, ie;
1461
+ const A = T.current + y, N = R().filter((F) => !F.disabled), $ = document.activeElement, oe = (K = N.find((F) => F.ref.current === $)) == null ? void 0 : K.textValue, ae = N.map((F) => F.textValue), ve = ma(ae, A, oe), j = (ie = N.find((F) => F.textValue === ve)) == null ? void 0 : ie.ref.current;
1462
+ (function F(ce) {
1463
+ T.current = ce, window.clearTimeout(I.current), ce !== "" && (I.current = window.setTimeout(() => F(""), 1e3));
1464
+ })(A), j && setTimeout(() => j.focus());
1703
1465
  };
1704
- a.useEffect(() => () => window.clearTimeout(I.current), []), Tr();
1466
+ a.useEffect(() => () => window.clearTimeout(I.current), []), br();
1705
1467
  const O = a.useCallback((y) => {
1706
- var N, B;
1707
- return U.current === ((N = X.current) == null ? void 0 : N.side) && Na(y, (B = X.current) == null ? void 0 : B.area);
1468
+ var N, $;
1469
+ return B.current === ((N = X.current) == null ? void 0 : N.side) && ha(y, ($ = X.current) == null ? void 0 : $.area);
1708
1470
  }, []);
1709
- return /* @__PURE__ */ v(
1710
- pa,
1471
+ return /* @__PURE__ */ d(
1472
+ ea,
1711
1473
  {
1712
1474
  scope: n,
1713
1475
  searchRef: T,
@@ -1720,7 +1482,7 @@ var fa = "MenuPortal", [Li, wn] = Z(fa, {
1720
1482
  onItemLeave: a.useCallback(
1721
1483
  (y) => {
1722
1484
  var A;
1723
- O(y) || ((A = S.current) == null || A.focus(), x(null));
1485
+ O(y) || ((A = b.current) == null || A.focus(), x(null));
1724
1486
  },
1725
1487
  [O]
1726
1488
  ),
@@ -1734,71 +1496,71 @@ var fa = "MenuPortal", [Li, wn] = Z(fa, {
1734
1496
  onPointerGraceIntentChange: a.useCallback((y) => {
1735
1497
  X.current = y;
1736
1498
  }, []),
1737
- children: /* @__PURE__ */ v(q, { ...k, children: /* @__PURE__ */ v(
1738
- $t,
1499
+ children: /* @__PURE__ */ d(q, { ...W, children: /* @__PURE__ */ d(
1500
+ Dt,
1739
1501
  {
1740
1502
  asChild: !0,
1741
1503
  trapped: o,
1742
- onMountAutoFocus: M(i, (y) => {
1504
+ onMountAutoFocus: S(i, (y) => {
1743
1505
  var A;
1744
- y.preventDefault(), (A = S.current) == null || A.focus({ preventScroll: !0 });
1506
+ y.preventDefault(), (A = b.current) == null || A.focus({ preventScroll: !0 });
1745
1507
  }),
1746
1508
  onUnmountAutoFocus: s,
1747
- children: /* @__PURE__ */ v(
1748
- Lt,
1509
+ children: /* @__PURE__ */ d(
1510
+ It,
1749
1511
  {
1750
1512
  asChild: !0,
1751
1513
  disableOutsidePointerEvents: c,
1752
1514
  onEscapeKeyDown: u,
1753
- onPointerDownOutside: p,
1754
- onFocusOutside: f,
1755
- onInteractOutside: m,
1515
+ onPointerDownOutside: f,
1516
+ onFocusOutside: m,
1517
+ onInteractOutside: v,
1756
1518
  onDismiss: g,
1757
- children: /* @__PURE__ */ v(
1758
- _o,
1519
+ children: /* @__PURE__ */ d(
1520
+ co,
1759
1521
  {
1760
1522
  asChild: !0,
1761
- ...b,
1762
- dir: w.dir,
1523
+ ..._,
1524
+ dir: E.dir,
1763
1525
  orientation: "vertical",
1764
1526
  loop: r,
1765
- currentTabStopId: R,
1527
+ currentTabStopId: M,
1766
1528
  onCurrentTabStopIdChange: x,
1767
- onEntryFocus: M(d, (y) => {
1768
- w.isUsingKeyboardRef.current || y.preventDefault();
1529
+ onEntryFocus: S(p, (y) => {
1530
+ E.isUsingKeyboardRef.current || y.preventDefault();
1769
1531
  }),
1770
1532
  preventScrollOnEntryFocus: !0,
1771
- children: /* @__PURE__ */ v(
1772
- Qr,
1533
+ children: /* @__PURE__ */ d(
1534
+ Br,
1773
1535
  {
1774
1536
  role: "menu",
1775
1537
  "aria-orientation": "vertical",
1776
- "data-state": Fn(C.open),
1538
+ "data-state": xn(w.open),
1777
1539
  "data-radix-menu-content": "",
1778
- dir: w.dir,
1779
- ..._,
1540
+ dir: E.dir,
1541
+ ...C,
1780
1542
  ...l,
1781
1543
  ref: P,
1782
1544
  style: { outline: "none", ...l.style },
1783
- onKeyDown: M(l.onKeyDown, (y) => {
1784
- const N = y.target.closest("[data-radix-menu-content]") === y.currentTarget, B = y.ctrlKey || y.altKey || y.metaKey, ae = y.key.length === 1;
1785
- N && (y.key === "Tab" && y.preventDefault(), !B && ae && J(y.key));
1786
- const ie = S.current;
1787
- if (y.target !== ie || !oa.includes(y.key)) return;
1545
+ onKeyDown: S(l.onKeyDown, (y) => {
1546
+ const N = y.target.closest("[data-radix-menu-content]") === y.currentTarget, $ = y.ctrlKey || y.altKey || y.metaKey, oe = y.key.length === 1;
1547
+ N && (y.key === "Tab" && y.preventDefault(), !$ && oe && J(y.key));
1548
+ const ae = b.current;
1549
+ if (y.target !== ae || !Vo.includes(y.key)) return;
1788
1550
  y.preventDefault();
1789
- const H = E().filter((K) => !K.disabled).map((K) => K.ref.current);
1790
- mn.includes(y.key) && H.reverse(), Ra(H);
1551
+ const j = R().filter((K) => !K.disabled).map((K) => K.ref.current);
1552
+ cn.includes(y.key) && j.reverse(), fa(j);
1791
1553
  }),
1792
- onBlur: M(e.onBlur, (y) => {
1554
+ onBlur: S(e.onBlur, (y) => {
1793
1555
  y.currentTarget.contains(y.target) || (window.clearTimeout(I.current), T.current = "");
1794
1556
  }),
1795
- onPointerMove: M(
1557
+ onPointerMove: S(
1796
1558
  e.onPointerMove,
1797
- fe((y) => {
1559
+ de((y) => {
1798
1560
  const A = y.target, N = Q.current !== y.clientX;
1799
1561
  if (y.currentTarget.contains(A) && N) {
1800
- const B = y.clientX > Q.current ? "right" : "left";
1801
- U.current = B, Q.current = y.clientX;
1562
+ const $ = y.clientX > Q.current ? "right" : "left";
1563
+ B.current = $, Q.current = y.clientX;
1802
1564
  }
1803
1565
  })
1804
1566
  )
@@ -1814,136 +1576,136 @@ var fa = "MenuPortal", [Li, wn] = Z(fa, {
1814
1576
  );
1815
1577
  }
1816
1578
  );
1817
- Cn.displayName = L;
1818
- var ha = "MenuGroup", et = a.forwardRef(
1579
+ fn.displayName = L;
1580
+ var ra = "MenuGroup", Je = a.forwardRef(
1819
1581
  (e, t) => {
1820
1582
  const { __scopeMenu: n, ...r } = e;
1821
- return /* @__PURE__ */ v(W.div, { role: "group", ...r, ref: t });
1583
+ return /* @__PURE__ */ d(U.div, { role: "group", ...r, ref: t });
1822
1584
  }
1823
1585
  );
1824
- et.displayName = ha;
1825
- var ga = "MenuLabel", yn = a.forwardRef(
1586
+ Je.displayName = ra;
1587
+ var oa = "MenuLabel", pn = a.forwardRef(
1826
1588
  (e, t) => {
1827
1589
  const { __scopeMenu: n, ...r } = e;
1828
- return /* @__PURE__ */ v(W.div, { ...r, ref: t });
1590
+ return /* @__PURE__ */ d(U.div, { ...r, ref: t });
1829
1591
  }
1830
1592
  );
1831
- yn.displayName = ga;
1832
- var Ee = "MenuItem", Rt = "menu.itemSelect", Ie = a.forwardRef(
1593
+ pn.displayName = oa;
1594
+ var be = "MenuItem", Ct = "menu.itemSelect", Ie = a.forwardRef(
1833
1595
  (e, t) => {
1834
- const { disabled: n = !1, onSelect: r, ...o } = e, i = a.useRef(null), s = me(Ee, e.__scopeMenu), c = qe(Ee, e.__scopeMenu), d = $(t, i), u = a.useRef(!1), p = () => {
1835
- const f = i.current;
1836
- if (!n && f) {
1837
- const m = new CustomEvent(Rt, { bubbles: !0, cancelable: !0 });
1838
- f.addEventListener(Rt, (g) => r == null ? void 0 : r(g), { once: !0 }), Ot(f, m), m.defaultPrevented ? u.current = !1 : s.onClose();
1596
+ const { disabled: n = !1, onSelect: r, ...o } = e, i = a.useRef(null), s = me(be, e.__scopeMenu), c = Qe(be, e.__scopeMenu), p = k(t, i), u = a.useRef(!1), f = () => {
1597
+ const m = i.current;
1598
+ if (!n && m) {
1599
+ const v = new CustomEvent(Ct, { bubbles: !0, cancelable: !0 });
1600
+ m.addEventListener(Ct, (g) => r == null ? void 0 : r(g), { once: !0 }), xt(m, v), v.defaultPrevented ? u.current = !1 : s.onClose();
1839
1601
  }
1840
1602
  };
1841
- return /* @__PURE__ */ v(
1842
- _n,
1603
+ return /* @__PURE__ */ d(
1604
+ mn,
1843
1605
  {
1844
1606
  ...o,
1845
- ref: d,
1607
+ ref: p,
1846
1608
  disabled: n,
1847
- onClick: M(e.onClick, p),
1848
- onPointerDown: (f) => {
1849
- var m;
1850
- (m = e.onPointerDown) == null || m.call(e, f), u.current = !0;
1609
+ onClick: S(e.onClick, f),
1610
+ onPointerDown: (m) => {
1611
+ var v;
1612
+ (v = e.onPointerDown) == null || v.call(e, m), u.current = !0;
1851
1613
  },
1852
- onPointerUp: M(e.onPointerUp, (f) => {
1853
- var m;
1854
- u.current || (m = f.currentTarget) == null || m.click();
1614
+ onPointerUp: S(e.onPointerUp, (m) => {
1615
+ var v;
1616
+ u.current || (v = m.currentTarget) == null || v.click();
1855
1617
  }),
1856
- onKeyDown: M(e.onKeyDown, (f) => {
1857
- const m = c.searchRef.current !== "";
1858
- n || m && f.key === " " || Ve.includes(f.key) && (f.currentTarget.click(), f.preventDefault());
1618
+ onKeyDown: S(e.onKeyDown, (m) => {
1619
+ const v = c.searchRef.current !== "";
1620
+ n || v && m.key === " " || Ve.includes(m.key) && (m.currentTarget.click(), m.preventDefault());
1859
1621
  })
1860
1622
  }
1861
1623
  );
1862
1624
  }
1863
1625
  );
1864
- Ie.displayName = Ee;
1865
- var _n = a.forwardRef(
1626
+ Ie.displayName = be;
1627
+ var mn = a.forwardRef(
1866
1628
  (e, t) => {
1867
- const { __scopeMenu: n, disabled: r = !1, textValue: o, ...i } = e, s = qe(Ee, n), c = hn(n), d = a.useRef(null), u = $(t, d), [p, f] = a.useState(!1), [m, g] = a.useState("");
1629
+ const { __scopeMenu: n, disabled: r = !1, textValue: o, ...i } = e, s = Qe(be, n), c = un(n), p = a.useRef(null), u = k(t, p), [f, m] = a.useState(!1), [v, g] = a.useState("");
1868
1630
  return a.useEffect(() => {
1869
- const h = d.current;
1631
+ const h = p.current;
1870
1632
  h && g((h.textContent ?? "").trim());
1871
- }, [i.children]), /* @__PURE__ */ v(
1872
- de.ItemSlot,
1633
+ }, [i.children]), /* @__PURE__ */ d(
1634
+ le.ItemSlot,
1873
1635
  {
1874
1636
  scope: n,
1875
1637
  disabled: r,
1876
- textValue: o ?? m,
1877
- children: /* @__PURE__ */ v(bo, { asChild: !0, ...c, focusable: !r, children: /* @__PURE__ */ v(
1878
- W.div,
1638
+ textValue: o ?? v,
1639
+ children: /* @__PURE__ */ d(so, { asChild: !0, ...c, focusable: !r, children: /* @__PURE__ */ d(
1640
+ U.div,
1879
1641
  {
1880
1642
  role: "menuitem",
1881
- "data-highlighted": p ? "" : void 0,
1643
+ "data-highlighted": f ? "" : void 0,
1882
1644
  "aria-disabled": r || void 0,
1883
1645
  "data-disabled": r ? "" : void 0,
1884
1646
  ...i,
1885
1647
  ref: u,
1886
- onPointerMove: M(
1648
+ onPointerMove: S(
1887
1649
  e.onPointerMove,
1888
- fe((h) => {
1650
+ de((h) => {
1889
1651
  r ? s.onItemLeave(h) : (s.onItemEnter(h), h.defaultPrevented || h.currentTarget.focus({ preventScroll: !0 }));
1890
1652
  })
1891
1653
  ),
1892
- onPointerLeave: M(
1654
+ onPointerLeave: S(
1893
1655
  e.onPointerLeave,
1894
- fe((h) => s.onItemLeave(h))
1656
+ de((h) => s.onItemLeave(h))
1895
1657
  ),
1896
- onFocus: M(e.onFocus, () => f(!0)),
1897
- onBlur: M(e.onBlur, () => f(!1))
1658
+ onFocus: S(e.onFocus, () => m(!0)),
1659
+ onBlur: S(e.onBlur, () => m(!1))
1898
1660
  }
1899
1661
  ) })
1900
1662
  }
1901
1663
  );
1902
1664
  }
1903
- ), wa = "MenuCheckboxItem", bn = a.forwardRef(
1665
+ ), aa = "MenuCheckboxItem", vn = a.forwardRef(
1904
1666
  (e, t) => {
1905
1667
  const { checked: n = !1, onCheckedChange: r, ...o } = e;
1906
- return /* @__PURE__ */ v(Mn, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ v(
1668
+ return /* @__PURE__ */ d(yn, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ d(
1907
1669
  Ie,
1908
1670
  {
1909
1671
  role: "menuitemcheckbox",
1910
- "aria-checked": Re(n) ? "mixed" : n,
1672
+ "aria-checked": Se(n) ? "mixed" : n,
1911
1673
  ...o,
1912
1674
  ref: t,
1913
- "data-state": nt(n),
1914
- onSelect: M(
1675
+ "data-state": tt(n),
1676
+ onSelect: S(
1915
1677
  o.onSelect,
1916
- () => r == null ? void 0 : r(Re(n) ? !0 : !n),
1678
+ () => r == null ? void 0 : r(Se(n) ? !0 : !n),
1917
1679
  { checkForDefaultPrevented: !1 }
1918
1680
  )
1919
1681
  }
1920
1682
  ) });
1921
1683
  }
1922
1684
  );
1923
- bn.displayName = wa;
1924
- var Sn = "MenuRadioGroup", [Ca, ya] = Z(
1925
- Sn,
1685
+ vn.displayName = aa;
1686
+ var hn = "MenuRadioGroup", [ia, ca] = Z(
1687
+ hn,
1926
1688
  { value: void 0, onValueChange: () => {
1927
1689
  } }
1928
- ), En = a.forwardRef(
1690
+ ), gn = a.forwardRef(
1929
1691
  (e, t) => {
1930
- const { value: n, onValueChange: r, ...o } = e, i = j(r);
1931
- return /* @__PURE__ */ v(Ca, { scope: e.__scopeMenu, value: n, onValueChange: i, children: /* @__PURE__ */ v(et, { ...o, ref: t }) });
1692
+ const { value: n, onValueChange: r, ...o } = e, i = Y(r);
1693
+ return /* @__PURE__ */ d(ia, { scope: e.__scopeMenu, value: n, onValueChange: i, children: /* @__PURE__ */ d(Je, { ...o, ref: t }) });
1932
1694
  }
1933
1695
  );
1934
- En.displayName = Sn;
1935
- var Rn = "MenuRadioItem", Pn = a.forwardRef(
1696
+ gn.displayName = hn;
1697
+ var wn = "MenuRadioItem", En = a.forwardRef(
1936
1698
  (e, t) => {
1937
- const { value: n, ...r } = e, o = ya(Rn, e.__scopeMenu), i = n === o.value;
1938
- return /* @__PURE__ */ v(Mn, { scope: e.__scopeMenu, checked: i, children: /* @__PURE__ */ v(
1699
+ const { value: n, ...r } = e, o = ca(wn, e.__scopeMenu), i = n === o.value;
1700
+ return /* @__PURE__ */ d(yn, { scope: e.__scopeMenu, checked: i, children: /* @__PURE__ */ d(
1939
1701
  Ie,
1940
1702
  {
1941
1703
  role: "menuitemradio",
1942
1704
  "aria-checked": i,
1943
1705
  ...r,
1944
1706
  ref: t,
1945
- "data-state": nt(i),
1946
- onSelect: M(
1707
+ "data-state": tt(i),
1708
+ onSelect: S(
1947
1709
  r.onSelect,
1948
1710
  () => {
1949
1711
  var s;
@@ -1955,35 +1717,35 @@ var Rn = "MenuRadioItem", Pn = a.forwardRef(
1955
1717
  ) });
1956
1718
  }
1957
1719
  );
1958
- Pn.displayName = Rn;
1959
- var tt = "MenuItemIndicator", [Mn, _a] = Z(
1960
- tt,
1720
+ En.displayName = wn;
1721
+ var et = "MenuItemIndicator", [yn, sa] = Z(
1722
+ et,
1961
1723
  { checked: !1 }
1962
- ), xn = a.forwardRef(
1724
+ ), Cn = a.forwardRef(
1963
1725
  (e, t) => {
1964
- const { __scopeMenu: n, forceMount: r, ...o } = e, i = _a(tt, n);
1965
- return /* @__PURE__ */ v(
1966
- Pe,
1726
+ const { __scopeMenu: n, forceMount: r, ...o } = e, i = sa(et, n);
1727
+ return /* @__PURE__ */ d(
1728
+ Me,
1967
1729
  {
1968
- present: r || Re(i.checked) || i.checked === !0,
1969
- children: /* @__PURE__ */ v(
1970
- W.span,
1730
+ present: r || Se(i.checked) || i.checked === !0,
1731
+ children: /* @__PURE__ */ d(
1732
+ U.span,
1971
1733
  {
1972
1734
  ...o,
1973
1735
  ref: t,
1974
- "data-state": nt(i.checked)
1736
+ "data-state": tt(i.checked)
1975
1737
  }
1976
1738
  )
1977
1739
  }
1978
1740
  );
1979
1741
  }
1980
1742
  );
1981
- xn.displayName = tt;
1982
- var ba = "MenuSeparator", Nn = a.forwardRef(
1743
+ Cn.displayName = et;
1744
+ var ua = "MenuSeparator", _n = a.forwardRef(
1983
1745
  (e, t) => {
1984
1746
  const { __scopeMenu: n, ...r } = e;
1985
- return /* @__PURE__ */ v(
1986
- W.div,
1747
+ return /* @__PURE__ */ d(
1748
+ U.div,
1987
1749
  {
1988
1750
  role: "separator",
1989
1751
  "aria-orientation": "horizontal",
@@ -1993,63 +1755,63 @@ var ba = "MenuSeparator", Nn = a.forwardRef(
1993
1755
  );
1994
1756
  }
1995
1757
  );
1996
- Nn.displayName = ba;
1997
- var Sa = "MenuArrow", In = a.forwardRef(
1758
+ _n.displayName = ua;
1759
+ var la = "MenuArrow", bn = a.forwardRef(
1998
1760
  (e, t) => {
1999
1761
  const { __scopeMenu: n, ...r } = e, o = Ne(n);
2000
- return /* @__PURE__ */ v(qr, { ...o, ...r, ref: t });
1762
+ return /* @__PURE__ */ d(Kr, { ...o, ...r, ref: t });
2001
1763
  }
2002
1764
  );
2003
- In.displayName = Sa;
2004
- var Ea = "MenuSub", [ki, An] = Z(Ea), le = "MenuSubTrigger", Dn = a.forwardRef(
1765
+ bn.displayName = la;
1766
+ var da = "MenuSub", [Si, Sn] = Z(da), ue = "MenuSubTrigger", Rn = a.forwardRef(
2005
1767
  (e, t) => {
2006
- const n = oe(le, e.__scopeMenu), r = me(le, e.__scopeMenu), o = An(le, e.__scopeMenu), i = qe(le, e.__scopeMenu), s = a.useRef(null), { pointerGraceTimerRef: c, onPointerGraceIntentChange: d } = i, u = { __scopeMenu: e.__scopeMenu }, p = a.useCallback(() => {
1768
+ const n = re(ue, e.__scopeMenu), r = me(ue, e.__scopeMenu), o = Sn(ue, e.__scopeMenu), i = Qe(ue, e.__scopeMenu), s = a.useRef(null), { pointerGraceTimerRef: c, onPointerGraceIntentChange: p } = i, u = { __scopeMenu: e.__scopeMenu }, f = a.useCallback(() => {
2007
1769
  s.current && window.clearTimeout(s.current), s.current = null;
2008
1770
  }, []);
2009
- return a.useEffect(() => p, [p]), a.useEffect(() => {
2010
- const f = c.current;
1771
+ return a.useEffect(() => f, [f]), a.useEffect(() => {
1772
+ const m = c.current;
2011
1773
  return () => {
2012
- window.clearTimeout(f), d(null);
1774
+ window.clearTimeout(m), p(null);
2013
1775
  };
2014
- }, [c, d]), /* @__PURE__ */ v(Qe, { asChild: !0, ...u, children: /* @__PURE__ */ v(
2015
- _n,
1776
+ }, [c, p]), /* @__PURE__ */ d(Ze, { asChild: !0, ...u, children: /* @__PURE__ */ d(
1777
+ mn,
2016
1778
  {
2017
1779
  id: o.triggerId,
2018
1780
  "aria-haspopup": "menu",
2019
1781
  "aria-expanded": n.open,
2020
1782
  "aria-controls": o.contentId,
2021
- "data-state": Fn(n.open),
1783
+ "data-state": xn(n.open),
2022
1784
  ...e,
2023
- ref: je(t, o.onTriggerChange),
2024
- onClick: (f) => {
2025
- var m;
2026
- (m = e.onClick) == null || m.call(e, f), !(e.disabled || f.defaultPrevented) && (f.currentTarget.focus(), n.open || n.onOpenChange(!0));
1785
+ ref: fe(t, o.onTriggerChange),
1786
+ onClick: (m) => {
1787
+ var v;
1788
+ (v = e.onClick) == null || v.call(e, m), !(e.disabled || m.defaultPrevented) && (m.currentTarget.focus(), n.open || n.onOpenChange(!0));
2027
1789
  },
2028
- onPointerMove: M(
1790
+ onPointerMove: S(
2029
1791
  e.onPointerMove,
2030
- fe((f) => {
2031
- i.onItemEnter(f), !f.defaultPrevented && !e.disabled && !n.open && !s.current && (i.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
2032
- n.onOpenChange(!0), p();
1792
+ de((m) => {
1793
+ i.onItemEnter(m), !m.defaultPrevented && !e.disabled && !n.open && !s.current && (i.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
1794
+ n.onOpenChange(!0), f();
2033
1795
  }, 100));
2034
1796
  })
2035
1797
  ),
2036
- onPointerLeave: M(
1798
+ onPointerLeave: S(
2037
1799
  e.onPointerLeave,
2038
- fe((f) => {
1800
+ de((m) => {
2039
1801
  var g, h;
2040
- p();
2041
- const m = (g = n.content) == null ? void 0 : g.getBoundingClientRect();
2042
- if (m) {
2043
- const l = (h = n.content) == null ? void 0 : h.dataset.side, C = l === "right", w = C ? -5 : 5, _ = m[C ? "left" : "right"], b = m[C ? "right" : "left"];
1802
+ f();
1803
+ const v = (g = n.content) == null ? void 0 : g.getBoundingClientRect();
1804
+ if (v) {
1805
+ const l = (h = n.content) == null ? void 0 : h.dataset.side, w = l === "right", E = w ? -5 : 5, C = v[w ? "left" : "right"], _ = v[w ? "right" : "left"];
2044
1806
  i.onPointerGraceIntentChange({
2045
1807
  area: [
2046
1808
  // Apply a bleed on clientX to ensure that our exit point is
2047
1809
  // consistently within polygon bounds
2048
- { x: f.clientX + w, y: f.clientY },
2049
- { x: _, y: m.top },
2050
- { x: b, y: m.top },
2051
- { x: b, y: m.bottom },
2052
- { x: _, y: m.bottom }
1810
+ { x: m.clientX + E, y: m.clientY },
1811
+ { x: C, y: v.top },
1812
+ { x: _, y: v.top },
1813
+ { x: _, y: v.bottom },
1814
+ { x: C, y: v.bottom }
2053
1815
  ],
2054
1816
  side: l
2055
1817
  }), window.clearTimeout(c.current), c.current = window.setTimeout(
@@ -2057,26 +1819,26 @@ var Ea = "MenuSub", [ki, An] = Z(Ea), le = "MenuSubTrigger", Dn = a.forwardRef(
2057
1819
  300
2058
1820
  );
2059
1821
  } else {
2060
- if (i.onTriggerLeave(f), f.defaultPrevented) return;
1822
+ if (i.onTriggerLeave(m), m.defaultPrevented) return;
2061
1823
  i.onPointerGraceIntentChange(null);
2062
1824
  }
2063
1825
  })
2064
1826
  ),
2065
- onKeyDown: M(e.onKeyDown, (f) => {
1827
+ onKeyDown: S(e.onKeyDown, (m) => {
2066
1828
  var g;
2067
- const m = i.searchRef.current !== "";
2068
- e.disabled || m && f.key === " " || aa[r.dir].includes(f.key) && (n.onOpenChange(!0), (g = n.content) == null || g.focus(), f.preventDefault());
1829
+ const v = i.searchRef.current !== "";
1830
+ e.disabled || v && m.key === " " || Ho[r.dir].includes(m.key) && (n.onOpenChange(!0), (g = n.content) == null || g.focus(), m.preventDefault());
2069
1831
  })
2070
1832
  }
2071
1833
  ) });
2072
1834
  }
2073
1835
  );
2074
- Dn.displayName = le;
2075
- var Tn = "MenuSubContent", On = a.forwardRef(
1836
+ Rn.displayName = ue;
1837
+ var Mn = "MenuSubContent", Pn = a.forwardRef(
2076
1838
  (e, t) => {
2077
- const n = wn(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = oe(L, e.__scopeMenu), s = me(L, e.__scopeMenu), c = An(Tn, e.__scopeMenu), d = a.useRef(null), u = $(t, d);
2078
- return /* @__PURE__ */ v(de.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ v(Pe, { present: r || i.open, children: /* @__PURE__ */ v(de.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ v(
2079
- Je,
1839
+ const n = dn(L, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = re(L, e.__scopeMenu), s = me(L, e.__scopeMenu), c = Sn(Mn, e.__scopeMenu), p = a.useRef(null), u = k(t, p);
1840
+ return /* @__PURE__ */ d(le.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(Me, { present: r || i.open, children: /* @__PURE__ */ d(le.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(
1841
+ qe,
2080
1842
  {
2081
1843
  id: c.contentId,
2082
1844
  "aria-labelledby": c.triggerId,
@@ -2087,74 +1849,74 @@ var Tn = "MenuSubContent", On = a.forwardRef(
2087
1849
  disableOutsidePointerEvents: !1,
2088
1850
  disableOutsideScroll: !1,
2089
1851
  trapFocus: !1,
2090
- onOpenAutoFocus: (p) => {
2091
- var f;
2092
- s.isUsingKeyboardRef.current && ((f = d.current) == null || f.focus()), p.preventDefault();
1852
+ onOpenAutoFocus: (f) => {
1853
+ var m;
1854
+ s.isUsingKeyboardRef.current && ((m = p.current) == null || m.focus()), f.preventDefault();
2093
1855
  },
2094
- onCloseAutoFocus: (p) => p.preventDefault(),
2095
- onFocusOutside: M(e.onFocusOutside, (p) => {
2096
- p.target !== c.trigger && i.onOpenChange(!1);
1856
+ onCloseAutoFocus: (f) => f.preventDefault(),
1857
+ onFocusOutside: S(e.onFocusOutside, (f) => {
1858
+ f.target !== c.trigger && i.onOpenChange(!1);
2097
1859
  }),
2098
- onEscapeKeyDown: M(e.onEscapeKeyDown, (p) => {
2099
- s.onClose(), p.preventDefault();
1860
+ onEscapeKeyDown: S(e.onEscapeKeyDown, (f) => {
1861
+ s.onClose(), f.preventDefault();
2100
1862
  }),
2101
- onKeyDown: M(e.onKeyDown, (p) => {
1863
+ onKeyDown: S(e.onKeyDown, (f) => {
2102
1864
  var g;
2103
- const f = p.currentTarget.contains(p.target), m = ia[s.dir].includes(p.key);
2104
- f && m && (i.onOpenChange(!1), (g = c.trigger) == null || g.focus(), p.preventDefault());
1865
+ const m = f.currentTarget.contains(f.target), v = Yo[s.dir].includes(f.key);
1866
+ m && v && (i.onOpenChange(!1), (g = c.trigger) == null || g.focus(), f.preventDefault());
2105
1867
  })
2106
1868
  }
2107
1869
  ) }) }) });
2108
1870
  }
2109
1871
  );
2110
- On.displayName = Tn;
2111
- function Fn(e) {
1872
+ Pn.displayName = Mn;
1873
+ function xn(e) {
2112
1874
  return e ? "open" : "closed";
2113
1875
  }
2114
- function Re(e) {
1876
+ function Se(e) {
2115
1877
  return e === "indeterminate";
2116
1878
  }
2117
- function nt(e) {
2118
- return Re(e) ? "indeterminate" : e ? "checked" : "unchecked";
1879
+ function tt(e) {
1880
+ return Se(e) ? "indeterminate" : e ? "checked" : "unchecked";
2119
1881
  }
2120
- function Ra(e) {
1882
+ function fa(e) {
2121
1883
  const t = document.activeElement;
2122
1884
  for (const n of e)
2123
1885
  if (n === t || (n.focus(), document.activeElement !== t)) return;
2124
1886
  }
2125
- function Pa(e, t) {
1887
+ function pa(e, t) {
2126
1888
  return e.map((n, r) => e[(t + r) % e.length]);
2127
1889
  }
2128
- function Ma(e, t, n) {
1890
+ function ma(e, t, n) {
2129
1891
  const o = t.length > 1 && Array.from(t).every((u) => u === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1;
2130
- let s = Pa(e, Math.max(i, 0));
1892
+ let s = pa(e, Math.max(i, 0));
2131
1893
  o.length === 1 && (s = s.filter((u) => u !== n));
2132
- const d = s.find(
1894
+ const p = s.find(
2133
1895
  (u) => u.toLowerCase().startsWith(o.toLowerCase())
2134
1896
  );
2135
- return d !== n ? d : void 0;
1897
+ return p !== n ? p : void 0;
2136
1898
  }
2137
- function xa(e, t) {
1899
+ function va(e, t) {
2138
1900
  const { x: n, y: r } = e;
2139
1901
  let o = !1;
2140
1902
  for (let i = 0, s = t.length - 1; i < t.length; s = i++) {
2141
- const c = t[i].x, d = t[i].y, u = t[s].x, p = t[s].y;
2142
- d > r != p > r && n < (u - c) * (r - d) / (p - d) + c && (o = !o);
1903
+ const c = t[i].x, p = t[i].y, u = t[s].x, f = t[s].y;
1904
+ p > r != f > r && n < (u - c) * (r - p) / (f - p) + c && (o = !o);
2143
1905
  }
2144
1906
  return o;
2145
1907
  }
2146
- function Na(e, t) {
1908
+ function ha(e, t) {
2147
1909
  if (!t) return !1;
2148
1910
  const n = { x: e.clientX, y: e.clientY };
2149
- return xa(n, t);
1911
+ return va(n, t);
2150
1912
  }
2151
- function fe(e) {
1913
+ function de(e) {
2152
1914
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
2153
1915
  }
2154
- var Ia = gn, Aa = Qe, Da = Cn, Ta = et, Oa = yn, Fa = Ie, La = bn, ka = En, $a = Pn, Wa = xn, Ba = Nn, Ua = In, Ka = Dn, Ga = On, rt = "DropdownMenu", [za, $i] = fr(
2155
- rt,
2156
- [vn]
2157
- ), D = vn(), [Va, Ln] = za(rt), kn = (e) => {
1916
+ var ga = ln, wa = Ze, Ea = fn, ya = Je, Ca = pn, _a = Ie, ba = vn, Sa = gn, Ra = En, Ma = Cn, Pa = _n, xa = bn, Na = Rn, Ia = Pn, nt = "DropdownMenu", [Aa, Ri] = Re(
1917
+ nt,
1918
+ [sn]
1919
+ ), D = sn(), [Da, Nn] = Aa(nt), In = (e) => {
2158
1920
  const {
2159
1921
  __scopeDropdownMenu: t,
2160
1922
  children: n,
@@ -2163,32 +1925,32 @@ var Ia = gn, Aa = Qe, Da = Cn, Ta = et, Oa = yn, Fa = Ie, La = bn, ka = En, $a =
2163
1925
  defaultOpen: i,
2164
1926
  onOpenChange: s,
2165
1927
  modal: c = !0
2166
- } = e, d = D(t), u = a.useRef(null), [p = !1, f] = Mt({
1928
+ } = e, p = D(t), u = a.useRef(null), [f = !1, m] = St({
2167
1929
  prop: o,
2168
1930
  defaultProp: i,
2169
1931
  onChange: s
2170
1932
  });
2171
- return /* @__PURE__ */ v(
2172
- Va,
1933
+ return /* @__PURE__ */ d(
1934
+ Da,
2173
1935
  {
2174
1936
  scope: t,
2175
- triggerId: $e(),
1937
+ triggerId: We(),
2176
1938
  triggerRef: u,
2177
- contentId: $e(),
2178
- open: p,
2179
- onOpenChange: f,
2180
- onOpenToggle: a.useCallback(() => f((m) => !m), [f]),
1939
+ contentId: We(),
1940
+ open: f,
1941
+ onOpenChange: m,
1942
+ onOpenToggle: a.useCallback(() => m((v) => !v), [m]),
2181
1943
  modal: c,
2182
- children: /* @__PURE__ */ v(Ia, { ...d, open: p, onOpenChange: f, dir: r, modal: c, children: n })
1944
+ children: /* @__PURE__ */ d(ga, { ...p, open: f, onOpenChange: m, dir: r, modal: c, children: n })
2183
1945
  }
2184
1946
  );
2185
1947
  };
2186
- kn.displayName = rt;
2187
- var $n = "DropdownMenuTrigger", Wn = a.forwardRef(
1948
+ In.displayName = nt;
1949
+ var An = "DropdownMenuTrigger", Dn = a.forwardRef(
2188
1950
  (e, t) => {
2189
- const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, i = Ln($n, n), s = D(n);
2190
- return /* @__PURE__ */ v(Aa, { asChild: !0, ...s, children: /* @__PURE__ */ v(
2191
- Cr.button,
1951
+ const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, i = Nn(An, n), s = D(n);
1952
+ return /* @__PURE__ */ d(wa, { asChild: !0, ...s, children: /* @__PURE__ */ d(
1953
+ lr.button,
2192
1954
  {
2193
1955
  type: "button",
2194
1956
  id: i.triggerId,
@@ -2199,36 +1961,36 @@ var $n = "DropdownMenuTrigger", Wn = a.forwardRef(
2199
1961
  "data-disabled": r ? "" : void 0,
2200
1962
  disabled: r,
2201
1963
  ...o,
2202
- ref: At(t, i.triggerRef),
2203
- onPointerDown: Se(e.onPointerDown, (c) => {
1964
+ ref: fe(t, i.triggerRef),
1965
+ onPointerDown: S(e.onPointerDown, (c) => {
2204
1966
  !r && c.button === 0 && c.ctrlKey === !1 && (i.onOpenToggle(), i.open || c.preventDefault());
2205
1967
  }),
2206
- onKeyDown: Se(e.onKeyDown, (c) => {
1968
+ onKeyDown: S(e.onKeyDown, (c) => {
2207
1969
  r || (["Enter", " "].includes(c.key) && i.onOpenToggle(), c.key === "ArrowDown" && i.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(c.key) && c.preventDefault());
2208
1970
  })
2209
1971
  }
2210
1972
  ) });
2211
1973
  }
2212
1974
  );
2213
- Wn.displayName = $n;
2214
- var Bn = "DropdownMenuContent", Un = a.forwardRef(
1975
+ Dn.displayName = An;
1976
+ var Tn = "DropdownMenuContent", On = a.forwardRef(
2215
1977
  (e, t) => {
2216
- const { __scopeDropdownMenu: n, ...r } = e, o = Ln(Bn, n), i = D(n), s = a.useRef(!1);
2217
- return /* @__PURE__ */ v(
2218
- Da,
1978
+ const { __scopeDropdownMenu: n, ...r } = e, o = Nn(Tn, n), i = D(n), s = a.useRef(!1);
1979
+ return /* @__PURE__ */ d(
1980
+ Ea,
2219
1981
  {
2220
1982
  id: o.contentId,
2221
1983
  "aria-labelledby": o.triggerId,
2222
1984
  ...i,
2223
1985
  ...r,
2224
1986
  ref: t,
2225
- onCloseAutoFocus: Se(e.onCloseAutoFocus, (c) => {
2226
- var d;
2227
- s.current || (d = o.triggerRef.current) == null || d.focus(), s.current = !1, c.preventDefault();
1987
+ onCloseAutoFocus: S(e.onCloseAutoFocus, (c) => {
1988
+ var p;
1989
+ s.current || (p = o.triggerRef.current) == null || p.focus(), s.current = !1, c.preventDefault();
2228
1990
  }),
2229
- onInteractOutside: Se(e.onInteractOutside, (c) => {
2230
- const d = c.detail.originalEvent, u = d.button === 0 && d.ctrlKey === !0, p = d.button === 2 || u;
2231
- (!o.modal || p) && (s.current = !0);
1991
+ onInteractOutside: S(e.onInteractOutside, (c) => {
1992
+ const p = c.detail.originalEvent, u = p.button === 0 && p.ctrlKey === !0, f = p.button === 2 || u;
1993
+ (!o.modal || f) && (s.current = !0);
2232
1994
  }),
2233
1995
  style: {
2234
1996
  ...e.style,
@@ -2242,69 +2004,69 @@ var Bn = "DropdownMenuContent", Un = a.forwardRef(
2242
2004
  );
2243
2005
  }
2244
2006
  );
2245
- Un.displayName = Bn;
2246
- var Ya = "DropdownMenuGroup", ja = a.forwardRef(
2007
+ On.displayName = Tn;
2008
+ var Ta = "DropdownMenuGroup", Oa = a.forwardRef(
2247
2009
  (e, t) => {
2248
2010
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2249
- return /* @__PURE__ */ v(Ta, { ...o, ...r, ref: t });
2011
+ return /* @__PURE__ */ d(ya, { ...o, ...r, ref: t });
2250
2012
  }
2251
2013
  );
2252
- ja.displayName = Ya;
2253
- var Xa = "DropdownMenuLabel", Ha = a.forwardRef(
2014
+ Oa.displayName = Ta;
2015
+ var Fa = "DropdownMenuLabel", La = a.forwardRef(
2254
2016
  (e, t) => {
2255
2017
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2256
- return /* @__PURE__ */ v(Oa, { ...o, ...r, ref: t });
2018
+ return /* @__PURE__ */ d(Ca, { ...o, ...r, ref: t });
2257
2019
  }
2258
2020
  );
2259
- Ha.displayName = Xa;
2260
- var Za = "DropdownMenuItem", Kn = a.forwardRef(
2021
+ La.displayName = Fa;
2022
+ var ka = "DropdownMenuItem", Fn = a.forwardRef(
2261
2023
  (e, t) => {
2262
2024
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2263
- return /* @__PURE__ */ v(Fa, { ...o, ...r, ref: t });
2025
+ return /* @__PURE__ */ d(_a, { ...o, ...r, ref: t });
2264
2026
  }
2265
2027
  );
2266
- Kn.displayName = Za;
2267
- var Qa = "DropdownMenuCheckboxItem", qa = a.forwardRef((e, t) => {
2028
+ Fn.displayName = ka;
2029
+ var Wa = "DropdownMenuCheckboxItem", Ua = a.forwardRef((e, t) => {
2268
2030
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2269
- return /* @__PURE__ */ v(La, { ...o, ...r, ref: t });
2031
+ return /* @__PURE__ */ d(ba, { ...o, ...r, ref: t });
2270
2032
  });
2271
- qa.displayName = Qa;
2272
- var Ja = "DropdownMenuRadioGroup", ei = a.forwardRef((e, t) => {
2033
+ Ua.displayName = Wa;
2034
+ var $a = "DropdownMenuRadioGroup", Ba = a.forwardRef((e, t) => {
2273
2035
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2274
- return /* @__PURE__ */ v(ka, { ...o, ...r, ref: t });
2036
+ return /* @__PURE__ */ d(Sa, { ...o, ...r, ref: t });
2275
2037
  });
2276
- ei.displayName = Ja;
2277
- var ti = "DropdownMenuRadioItem", ni = a.forwardRef((e, t) => {
2038
+ Ba.displayName = $a;
2039
+ var Ka = "DropdownMenuRadioItem", Ga = a.forwardRef((e, t) => {
2278
2040
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2279
- return /* @__PURE__ */ v($a, { ...o, ...r, ref: t });
2041
+ return /* @__PURE__ */ d(Ra, { ...o, ...r, ref: t });
2280
2042
  });
2281
- ni.displayName = ti;
2282
- var ri = "DropdownMenuItemIndicator", oi = a.forwardRef((e, t) => {
2043
+ Ga.displayName = Ka;
2044
+ var za = "DropdownMenuItemIndicator", Va = a.forwardRef((e, t) => {
2283
2045
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2284
- return /* @__PURE__ */ v(Wa, { ...o, ...r, ref: t });
2046
+ return /* @__PURE__ */ d(Ma, { ...o, ...r, ref: t });
2285
2047
  });
2286
- oi.displayName = ri;
2287
- var ai = "DropdownMenuSeparator", ii = a.forwardRef((e, t) => {
2048
+ Va.displayName = za;
2049
+ var Ha = "DropdownMenuSeparator", Ya = a.forwardRef((e, t) => {
2288
2050
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2289
- return /* @__PURE__ */ v(Ba, { ...o, ...r, ref: t });
2051
+ return /* @__PURE__ */ d(Pa, { ...o, ...r, ref: t });
2290
2052
  });
2291
- ii.displayName = ai;
2292
- var ci = "DropdownMenuArrow", si = a.forwardRef(
2053
+ Ya.displayName = Ha;
2054
+ var Xa = "DropdownMenuArrow", ja = a.forwardRef(
2293
2055
  (e, t) => {
2294
2056
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2295
- return /* @__PURE__ */ v(Ua, { ...o, ...r, ref: t });
2057
+ return /* @__PURE__ */ d(xa, { ...o, ...r, ref: t });
2296
2058
  }
2297
2059
  );
2298
- si.displayName = ci;
2299
- var ui = "DropdownMenuSubTrigger", li = a.forwardRef((e, t) => {
2060
+ ja.displayName = Xa;
2061
+ var Za = "DropdownMenuSubTrigger", Qa = a.forwardRef((e, t) => {
2300
2062
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2301
- return /* @__PURE__ */ v(Ka, { ...o, ...r, ref: t });
2063
+ return /* @__PURE__ */ d(Na, { ...o, ...r, ref: t });
2302
2064
  });
2303
- li.displayName = ui;
2304
- var di = "DropdownMenuSubContent", fi = a.forwardRef((e, t) => {
2065
+ Qa.displayName = Za;
2066
+ var qa = "DropdownMenuSubContent", Ja = a.forwardRef((e, t) => {
2305
2067
  const { __scopeDropdownMenu: n, ...r } = e, o = D(n);
2306
- return /* @__PURE__ */ v(
2307
- Ga,
2068
+ return /* @__PURE__ */ d(
2069
+ Ia,
2308
2070
  {
2309
2071
  ...o,
2310
2072
  ...r,
@@ -2320,16 +2082,16 @@ var di = "DropdownMenuSubContent", fi = a.forwardRef((e, t) => {
2320
2082
  }
2321
2083
  );
2322
2084
  });
2323
- fi.displayName = di;
2324
- var pi = kn, mi = Wn, vi = Un, hi = Kn;
2325
- const gi = "cfxui__DropdownSelect__trigger__c03df", wi = "cfxui__DropdownSelect__onlight__f0191", Ci = "cfxui__DropdownSelect__fullWidth__dce56", yi = "cfxui__DropdownSelect__icon__d05b8", _i = "cfxui__DropdownSelect__placeholder__e0d89", bi = "cfxui__DropdownSelect__content__05ed8", Si = "cfxui__DropdownSelect__item__0e45f", G = {
2326
- trigger: gi,
2327
- onlight: wi,
2328
- fullWidth: Ci,
2329
- icon: yi,
2330
- placeholder: _i,
2331
- content: bi,
2332
- item: Si,
2085
+ Ja.displayName = qa;
2086
+ var ei = In, ti = Dn, ni = On, ri = Fn;
2087
+ const oi = "cfxui__DropdownSelect__trigger__c03df", ai = "cfxui__DropdownSelect__onlight__f0191", ii = "cfxui__DropdownSelect__fullWidth__dce56", ci = "cfxui__DropdownSelect__icon__d05b8", si = "cfxui__DropdownSelect__placeholder__e0d89", ui = "cfxui__DropdownSelect__content__05ed8", li = "cfxui__DropdownSelect__item__0e45f", G = {
2088
+ trigger: oi,
2089
+ onlight: ai,
2090
+ fullWidth: ii,
2091
+ icon: ci,
2092
+ placeholder: si,
2093
+ content: ui,
2094
+ item: li,
2333
2095
  "dropdownselect-size-initial-large": "cfxui__DropdownSelect__dropdownselect-size-initial-large__d6bf3",
2334
2096
  "dropdownselect-size-initial-small": "cfxui__DropdownSelect__dropdownselect-size-initial-small__56570",
2335
2097
  "dropdownselect-size-small-large": "cfxui__DropdownSelect__dropdownselect-size-small-large__7f027",
@@ -2344,11 +2106,11 @@ const gi = "cfxui__DropdownSelect__trigger__c03df", wi = "cfxui__DropdownSelect_
2344
2106
  "dropdownselect-size-large-small": "cfxui__DropdownSelect__dropdownselect-size-large-small__5bca7",
2345
2107
  "dropdownselect-size-xlarge-large": "cfxui__DropdownSelect__dropdownselect-size-xlarge-large__23eae",
2346
2108
  "dropdownselect-size-xlarge-small": "cfxui__DropdownSelect__dropdownselect-size-xlarge-small__d232d"
2347
- }, Wi = {
2109
+ }, Mi = {
2348
2110
  small: "xxsmall",
2349
2111
  normal: "xsmall",
2350
2112
  large: "normal"
2351
- }, Bi = function({
2113
+ }, Pi = function({
2352
2114
  options: t,
2353
2115
  value: n,
2354
2116
  onChange: r,
@@ -2356,56 +2118,56 @@ const gi = "cfxui__DropdownSelect__trigger__c03df", wi = "cfxui__DropdownSelect_
2356
2118
  fullWidth: i = !1,
2357
2119
  onlight: s = !1,
2358
2120
  disabled: c,
2359
- placeholder: d = "Select..."
2121
+ placeholder: p = "Select..."
2360
2122
  }) {
2361
- const u = jn(null), [p, f] = Pt(void 0);
2362
- Xn(() => {
2363
- i && u.current && f(u.current.offsetWidth);
2123
+ const u = $n(null), [f, m] = _t(void 0);
2124
+ Bn(() => {
2125
+ i && u.current && m(u.current.offsetWidth);
2364
2126
  }, [i]);
2365
- const m = st.getResponsiveFlatClassnames("dropdownselect-size", o).map((l) => G[l]), g = ut(
2127
+ const v = ct.getResponsiveFlatClassnames("dropdownselect-size", o).map((l) => G[l]), g = st(
2366
2128
  G.trigger,
2367
- m,
2129
+ v,
2368
2130
  {
2369
2131
  [G.placeholder]: !n,
2370
2132
  [G.fullWidth]: i,
2371
2133
  [G.onlight]: s
2372
2134
  }
2373
- ), h = ut(
2135
+ ), h = st(
2374
2136
  G.content,
2375
- m,
2137
+ v,
2376
2138
  {
2377
2139
  [G.fullWidth]: i
2378
2140
  }
2379
2141
  );
2380
- return /* @__PURE__ */ ct(pi, { children: [
2381
- /* @__PURE__ */ v(
2382
- mi,
2142
+ return /* @__PURE__ */ it(ei, { children: [
2143
+ /* @__PURE__ */ d(
2144
+ ti,
2383
2145
  {
2384
2146
  ref: u,
2385
2147
  className: g,
2386
2148
  disabled: c,
2387
- children: /* @__PURE__ */ ct(dr, { gap: "small", centered: !0, spaceBetween: !0, children: [
2388
- n || d,
2389
- /* @__PURE__ */ v(lr, { className: G.icon, name: "DownChevron" })
2149
+ children: /* @__PURE__ */ it(or, { gap: "small", centered: !0, spaceBetween: !0, children: [
2150
+ n || p,
2151
+ /* @__PURE__ */ d(rr, { className: G.icon, name: "DownChevron" })
2390
2152
  ] })
2391
2153
  }
2392
2154
  ),
2393
- /* @__PURE__ */ v(
2394
- vi,
2155
+ /* @__PURE__ */ d(
2156
+ ni,
2395
2157
  {
2396
2158
  align: "end",
2397
2159
  side: "bottom",
2398
2160
  className: h,
2399
2161
  style: {
2400
- width: p,
2401
- zIndex: st.zindex("max")
2162
+ width: f,
2163
+ zIndex: ct.zindex("max")
2402
2164
  },
2403
- children: t.map((l) => /* @__PURE__ */ v(
2404
- hi,
2165
+ children: t.map((l) => /* @__PURE__ */ d(
2166
+ ri,
2405
2167
  {
2406
2168
  className: G.item,
2407
2169
  onSelect: () => r(l.value),
2408
- style: { width: p },
2170
+ style: { width: f },
2409
2171
  children: l.label
2410
2172
  },
2411
2173
  l.value
@@ -2415,7 +2177,7 @@ const gi = "cfxui__DropdownSelect__trigger__c03df", wi = "cfxui__DropdownSelect_
2415
2177
  ] });
2416
2178
  };
2417
2179
  export {
2418
- Bi as DropdownSelect,
2419
- Wi as ICON_SIZE_MAP,
2420
- Bi as default
2180
+ Pi as DropdownSelect,
2181
+ Mi as ICON_SIZE_MAP,
2182
+ Pi as default
2421
2183
  };