@strapi/ui-primitives 2.0.2 → 2.1.1

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.
Files changed (3) hide show
  1. package/dist/index.js +64 -1
  2. package/dist/index.mjs +2191 -1102
  3. package/package.json +4 -3
package/dist/index.mjs CHANGED
@@ -1,124 +1,125 @@
1
- import { jsx as d, jsxs as ye, Fragment as Se } from "react/jsx-runtime";
2
- import * as s from "react";
3
- import { useComposedRefs as A } from "@radix-ui/react-compose-refs";
4
- import { createContextScope as st, createContext as it } from "@radix-ui/react-context";
5
- import { Slot as Ee } from "@radix-ui/react-slot";
6
- import { composeEventHandlers as P } from "@radix-ui/primitive";
7
- import { DismissableLayer as ct } from "@radix-ui/react-dismissable-layer";
8
- import { useFocusGuards as at } from "@radix-ui/react-focus-guards";
9
- import { FocusScope as ut } from "@radix-ui/react-focus-scope";
10
- import { useId as se } from "@radix-ui/react-id";
11
- import * as ie from "@radix-ui/react-popper";
12
- import { createPopperScope as dt } from "@radix-ui/react-popper";
13
- import { Portal as pt } from "@radix-ui/react-portal";
14
- import { Primitive as N } from "@radix-ui/react-primitive";
15
- import { useControllableState as de } from "@radix-ui/react-use-controllable-state";
16
- import { useLayoutEffect as $ } from "@radix-ui/react-use-layout-effect";
17
- import { hideOthers as ft } from "aria-hidden";
18
- import * as we from "react-dom";
19
- import { RemoveScroll as mt } from "react-remove-scroll";
20
- import { useVirtualizer as jt } from "@tanstack/react-virtual";
21
- import { clamp as rt } from "@radix-ui/number";
22
- import { createCollection as Yt } from "@radix-ui/react-collection";
23
- import { useDirection as qt } from "@radix-ui/react-direction";
24
- import { usePrevious as Xt } from "@radix-ui/react-use-previous";
25
- import { VisuallyHidden as Zt } from "@radix-ui/react-visually-hidden";
26
- function Jt(o) {
27
- const i = `${o}CollectionProvider`, [e, t] = st(i), [n, r] = e(i, {
1
+ import { jsx as b, jsxs as it, Fragment as at } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import Ue, { useDebugValue as ho, createElement as Gn, useRef as Yn, useContext as qn } from "react";
4
+ import { useComposedRefs as z } from "@radix-ui/react-compose-refs";
5
+ import { createContextScope as Oo, createContext as Mo } from "@radix-ui/react-context";
6
+ import { Slot as Ct } from "@radix-ui/react-slot";
7
+ import { composeEventHandlers as M } from "@radix-ui/primitive";
8
+ import { DismissableLayer as Do } from "@radix-ui/react-dismissable-layer";
9
+ import { useFocusGuards as Fo } from "@radix-ui/react-focus-guards";
10
+ import { FocusScope as Lo } from "@radix-ui/react-focus-scope";
11
+ import { useId as Ee } from "@radix-ui/react-id";
12
+ import * as Pe from "@radix-ui/react-popper";
13
+ import { createPopperScope as $o } from "@radix-ui/react-popper";
14
+ import { Portal as Bo } from "@radix-ui/react-portal";
15
+ import { Primitive as F } from "@radix-ui/react-primitive";
16
+ import { useControllableState as Re } from "@radix-ui/react-use-controllable-state";
17
+ import { useLayoutEffect as te } from "@radix-ui/react-use-layout-effect";
18
+ import { hideOthers as zo } from "aria-hidden";
19
+ import * as ct from "react-dom";
20
+ import { RemoveScroll as jo } from "react-remove-scroll";
21
+ import { useVirtualizer as Xn } from "@tanstack/react-virtual";
22
+ import { clamp as mo } from "@radix-ui/number";
23
+ import { createCollection as Zn } from "@radix-ui/react-collection";
24
+ import { useDirection as Jn } from "@radix-ui/react-direction";
25
+ import { usePrevious as Qn } from "@radix-ui/react-use-previous";
26
+ import { VisuallyHidden as er } from "@radix-ui/react-visually-hidden";
27
+ function tr(e) {
28
+ const o = `${e}CollectionProvider`, [t, n] = Oo(o), [r, s] = t(o, {
28
29
  collectionRef: { current: null },
29
30
  itemMap: /* @__PURE__ */ new Map(),
30
31
  listeners: /* @__PURE__ */ new Set()
31
- }), c = (u) => {
32
- const { scope: f, children: h } = u, b = s.useRef(null), x = s.useRef(/* @__PURE__ */ new Map()).current, p = s.useRef(/* @__PURE__ */ new Set()).current;
33
- return /* @__PURE__ */ d(n, { scope: f, itemMap: x, collectionRef: b, listeners: p, children: h });
32
+ }), i = (u) => {
33
+ const { scope: f, children: m } = u, S = l.useRef(null), v = l.useRef(/* @__PURE__ */ new Map()).current, p = l.useRef(/* @__PURE__ */ new Set()).current;
34
+ return /* @__PURE__ */ b(r, { scope: f, itemMap: v, collectionRef: S, listeners: p, children: m });
34
35
  };
35
- c.displayName = i;
36
- const l = `${o}CollectionSlot`, a = s.forwardRef((u, f) => {
37
- const { scope: h, children: b } = u, x = r(l, h), p = A(f, x.collectionRef);
38
- return /* @__PURE__ */ d(Ee, { ref: p, children: b });
36
+ i.displayName = o;
37
+ const a = `${e}CollectionSlot`, c = l.forwardRef((u, f) => {
38
+ const { scope: m, children: S } = u, v = s(a, m), p = z(f, v.collectionRef);
39
+ return /* @__PURE__ */ b(Ct, { ref: p, children: S });
39
40
  });
40
- a.displayName = l;
41
- const m = `${o}CollectionItemSlot`, C = "data-radix-collection-item", v = s.forwardRef((u, f) => {
42
- const { scope: h, children: b, ...x } = u, p = s.useRef(null), y = A(f, p), E = r(m, h);
43
- return s.useEffect(() => {
44
- const O = Array.from(E.itemMap.values());
45
- return E.itemMap.set(p, { ref: p, ...x }), E.listeners.forEach((F) => F(Array.from(E.itemMap.values()), O)), () => {
46
- const F = Array.from(E.itemMap.values());
47
- E.itemMap.delete(p), E.listeners.forEach((_) => _(Array.from(E.itemMap.values()), F));
41
+ c.displayName = a;
42
+ const d = `${e}CollectionItemSlot`, y = "data-radix-collection-item", g = l.forwardRef((u, f) => {
43
+ const { scope: m, children: S, ...v } = u, p = l.useRef(null), w = z(f, p), C = s(d, m);
44
+ return l.useEffect(() => {
45
+ const E = Array.from(C.itemMap.values());
46
+ return C.itemMap.set(p, { ref: p, ...v }), C.listeners.forEach((T) => T(Array.from(C.itemMap.values()), E)), () => {
47
+ const T = Array.from(C.itemMap.values());
48
+ C.itemMap.delete(p), C.listeners.forEach((x) => x(Array.from(C.itemMap.values()), T));
48
49
  };
49
- }), /* @__PURE__ */ d(Ee, { [C]: "", ref: y, children: b });
50
+ }), /* @__PURE__ */ b(Ct, { [y]: "", ref: w, children: S });
50
51
  });
51
- v.displayName = m;
52
- function g(u) {
53
- const f = r(`${o}CollectionConsumer`, u), h = s.useCallback(() => {
54
- const x = f.collectionRef.current;
55
- if (!x) return [];
56
- const p = Array.from(x.querySelectorAll(`[${C}]`));
52
+ g.displayName = d;
53
+ function h(u) {
54
+ const f = s(`${e}CollectionConsumer`, u), m = l.useCallback(() => {
55
+ const v = f.collectionRef.current;
56
+ if (!v) return [];
57
+ const p = Array.from(v.querySelectorAll(`[${y}]`));
57
58
  return Array.from(f.itemMap.values()).sort(
58
- (O, F) => p.indexOf(O.ref.current) - p.indexOf(F.ref.current)
59
+ (E, T) => p.indexOf(E.ref.current) - p.indexOf(T.ref.current)
59
60
  );
60
- }, [f.collectionRef, f.itemMap]), b = s.useCallback(
61
- (x) => (f.listeners.add(x), () => f.listeners.delete(x)),
61
+ }, [f.collectionRef, f.itemMap]), S = l.useCallback(
62
+ (v) => (f.listeners.add(v), () => f.listeners.delete(v)),
62
63
  [f.listeners]
63
64
  );
64
- return { getItems: h, subscribe: b };
65
+ return { getItems: m, subscribe: S };
65
66
  }
66
67
  return [
67
- { Provider: c, Slot: a, ItemSlot: v },
68
- g,
69
- t
68
+ { Provider: i, Slot: c, ItemSlot: g },
69
+ h,
70
+ n
70
71
  ];
71
72
  }
72
- const Pe = /* @__PURE__ */ new Map();
73
- function Qt(o, i) {
74
- const e = o + (i ? Object.entries(i).sort((n, r) => n[0] < r[0] ? -1 : 1).join() : "");
75
- if (Pe.has(e))
76
- return Pe.get(e);
77
- const t = new Intl.Collator(o, i);
78
- return Pe.set(e, t), t;
73
+ const vt = /* @__PURE__ */ new Map();
74
+ function or(e, o) {
75
+ const t = e + (o ? Object.entries(o).sort((r, s) => r[0] < s[0] ? -1 : 1).join() : "");
76
+ if (vt.has(t))
77
+ return vt.get(t);
78
+ const n = new Intl.Collator(e, o);
79
+ return vt.set(t, n), n;
79
80
  }
80
- function De(o, i) {
81
- const e = Qt(o, {
81
+ function Lt(e, o) {
82
+ const t = or(e, {
82
83
  usage: "search",
83
- ...i
84
+ ...o
84
85
  });
85
86
  return {
86
- startsWith(t, n) {
87
- return n.length === 0 ? !0 : (t = t.normalize("NFC"), n = n.normalize("NFC"), e.compare(t.slice(0, n.length), n) === 0);
87
+ startsWith(n, r) {
88
+ return r.length === 0 ? !0 : (n = n.normalize("NFC"), r = r.normalize("NFC"), t.compare(n.slice(0, r.length), r) === 0);
88
89
  },
89
- endsWith(t, n) {
90
- return n.length === 0 ? !0 : (t = t.normalize("NFC"), n = n.normalize("NFC"), e.compare(t.slice(-n.length), n) === 0);
90
+ endsWith(n, r) {
91
+ return r.length === 0 ? !0 : (n = n.normalize("NFC"), r = r.normalize("NFC"), t.compare(n.slice(-r.length), r) === 0);
91
92
  },
92
- contains(t, n) {
93
- if (n.length === 0)
93
+ contains(n, r) {
94
+ if (r.length === 0)
94
95
  return !0;
95
- t = t.normalize("NFC"), n = n.normalize("NFC");
96
- let r = 0;
97
- const c = n.length;
98
- for (; r + c <= t.length; r++) {
99
- const l = t.slice(r, r + c);
100
- if (e.compare(n, l) === 0)
96
+ n = n.normalize("NFC"), r = r.normalize("NFC");
97
+ let s = 0;
98
+ const i = r.length;
99
+ for (; s + i <= n.length; s++) {
100
+ const a = n.slice(s, s + i);
101
+ if (t.compare(r, a) === 0)
101
102
  return !0;
102
103
  }
103
104
  return !1;
104
105
  }
105
106
  };
106
107
  }
107
- const eo = (o) => {
108
- const i = s.useRef();
109
- return s.useEffect(() => {
110
- i.current = o;
111
- }), i.current;
112
- }, ht = s.forwardRef(
113
- ({ children: o, estimatedItemSize: i = 40, overscan: e = 5, getItemCount: t, onViewportChange: n, ...r }, c) => {
114
- const l = s.useRef(null), a = A(c, l, n), m = s.useMemo(() => s.Children.toArray(o), [o]), C = jt({
115
- count: t(),
116
- getScrollElement: () => l.current,
117
- estimateSize: () => i,
118
- overscan: e
119
- }), v = C.getVirtualItems();
120
- return /* @__PURE__ */ ye(Se, { children: [
121
- /* @__PURE__ */ d(
108
+ const nr = (e) => {
109
+ const o = l.useRef();
110
+ return l.useEffect(() => {
111
+ o.current = e;
112
+ }), o.current;
113
+ }, Ho = l.forwardRef(
114
+ ({ children: e, estimatedItemSize: o = 40, overscan: t = 5, getItemCount: n, onViewportChange: r, ...s }, i) => {
115
+ const a = l.useRef(null), c = z(i, a, r), d = l.useMemo(() => l.Children.toArray(e), [e]), y = Xn({
116
+ count: n(),
117
+ getScrollElement: () => a.current,
118
+ estimateSize: () => o,
119
+ overscan: t
120
+ }), g = y.getVirtualItems();
121
+ return /* @__PURE__ */ it(at, { children: [
122
+ /* @__PURE__ */ b(
122
123
  "style",
123
124
  {
124
125
  dangerouslySetInnerHTML: {
@@ -126,44 +127,44 @@ const eo = (o) => {
126
127
  }
127
128
  }
128
129
  ),
129
- /* @__PURE__ */ d(
130
- N.div,
130
+ /* @__PURE__ */ b(
131
+ F.div,
131
132
  {
132
133
  "data-radix-combobox-viewport": "",
133
134
  role: "presentation",
134
- ...r,
135
- ref: a,
135
+ ...s,
136
+ ref: c,
136
137
  style: {
137
138
  position: "relative",
138
139
  flex: 1,
139
140
  overflow: "auto",
140
- ...r.style
141
+ ...s.style
141
142
  },
142
- children: /* @__PURE__ */ d(
143
+ children: /* @__PURE__ */ b(
143
144
  "div",
144
145
  {
145
146
  style: {
146
- height: `${C.getTotalSize()}px`,
147
+ height: `${y.getTotalSize()}px`,
147
148
  width: "100%",
148
149
  position: "relative"
149
150
  },
150
- children: v.map((g) => {
151
- const u = m[g.index];
152
- return /* @__PURE__ */ d(
151
+ children: g.map((h) => {
152
+ const u = d[h.index];
153
+ return /* @__PURE__ */ b(
153
154
  "div",
154
155
  {
155
- "data-index": g.index,
156
- ref: C.measureElement,
156
+ "data-index": h.index,
157
+ ref: y.measureElement,
157
158
  style: {
158
159
  position: "absolute",
159
160
  top: 0,
160
161
  left: 0,
161
162
  width: "100%",
162
- transform: `translateY(${g.start}px)`
163
+ transform: `translateY(${h.start}px)`
163
164
  },
164
165
  children: u
165
166
  },
166
- g.key
167
+ h.key
167
168
  );
168
169
  })
169
170
  }
@@ -173,352 +174,352 @@ const eo = (o) => {
173
174
  ] });
174
175
  }
175
176
  );
176
- ht.displayName = "VirtualizedViewport";
177
- const to = [" ", "Enter", "ArrowUp", "ArrowDown"], oo = ["Enter"], no = (o) => !!(o.length === 1 && o.match(/\S| /)), gt = "Combobox", [re, xe] = Jt(gt), [ro, Y] = it(gt), lo = ({ children: o }) => /* @__PURE__ */ d(ie.Root, { children: /* @__PURE__ */ d(re.Provider, { scope: void 0, children: o }) }), so = (o) => typeof o == "string" ? o === "none" ? {
178
- type: o,
177
+ Ho.displayName = "VirtualizedViewport";
178
+ const rr = [" ", "Enter", "ArrowUp", "ArrowDown"], sr = ["Enter"], ir = (e) => !!(e.length === 1 && e.match(/\S| /)), Uo = "Combobox", [Ce, We] = tr(Uo), [ar, pe] = Mo(Uo), cr = ({ children: e }) => /* @__PURE__ */ b(Pe.Root, { children: /* @__PURE__ */ b(Ce.Provider, { scope: void 0, children: e }) }), lr = (e) => typeof e == "string" ? e === "none" ? {
179
+ type: e,
179
180
  filter: void 0
180
181
  } : {
181
- type: o,
182
+ type: e,
182
183
  filter: "startsWith"
183
- } : o, io = (o) => {
184
+ } : e, ur = (e) => {
184
185
  const {
185
- allowCustomValue: i = !1,
186
- autocomplete: e = "none",
187
- children: t,
188
- open: n,
189
- defaultOpen: r,
190
- onOpenChange: c,
191
- value: l,
192
- defaultValue: a,
193
- onValueChange: m,
194
- disabled: C,
195
- required: v = !1,
196
- locale: g = "en-EN",
186
+ allowCustomValue: o = !1,
187
+ autocomplete: t = "none",
188
+ children: n,
189
+ open: r,
190
+ defaultOpen: s,
191
+ onOpenChange: i,
192
+ value: a,
193
+ defaultValue: c,
194
+ onValueChange: d,
195
+ disabled: y,
196
+ required: g = !1,
197
+ locale: h = "en-EN",
197
198
  onTextValueChange: u,
198
199
  textValue: f,
199
- defaultTextValue: h,
200
- filterValue: b,
201
- defaultFilterValue: x,
200
+ defaultTextValue: m,
201
+ filterValue: S,
202
+ defaultFilterValue: v,
202
203
  onFilterValueChange: p,
203
- isPrintableCharacter: y = no,
204
- visible: E = !1,
205
- virtualized: O = "auto",
206
- estimatedItemSize: F = 40,
207
- overscan: _ = 5
208
- } = o, [k, Z] = s.useState(null), [U, z] = s.useState(null), [R, H] = s.useState(null), [L, W] = s.useState(null), [J = !1, Q] = de({
209
- prop: n,
210
- defaultProp: r,
211
- onChange: c
212
- }), [K, G] = de({
213
- prop: l,
214
- defaultProp: a,
215
- onChange: m
216
- }), [ce, ee] = de({
204
+ isPrintableCharacter: w = ir,
205
+ visible: C = !1,
206
+ virtualized: E = "auto",
207
+ estimatedItemSize: T = 40,
208
+ overscan: x = 5
209
+ } = e, [D, W] = l.useState(null), [G, oe] = l.useState(null), [L, Y] = l.useState(null), [K, Z] = l.useState(null), [le = !1, ne] = Re({
210
+ prop: r,
211
+ defaultProp: s,
212
+ onChange: i
213
+ }), [J, $] = Re({
214
+ prop: a,
215
+ defaultProp: c,
216
+ onChange: d
217
+ }), [re, q] = Re({
217
218
  prop: f,
218
- defaultProp: i && !h ? l : h,
219
+ defaultProp: o && !m ? a : m,
219
220
  onChange: u
220
- }), [fe, me] = de({
221
- prop: b,
222
- defaultProp: x,
221
+ }), [j, fe] = Re({
222
+ prop: S,
223
+ defaultProp: v,
223
224
  onChange: p
224
- }), te = se(), ae = s.useCallback(
225
- (S, I) => {
226
- var j;
227
- const M = I.map((D) => D.ref.current), [V, ...T] = M, [w] = T.slice(-1), B = L ?? ((j = I.find((D) => D.value === K)) == null ? void 0 : j.ref.current);
228
- for (const D of S) {
229
- if (D === B) return;
230
- if (D == null || D.scrollIntoView({ block: "nearest" }), D === V && U && (U.scrollTop = 0), D === w && U && (U.scrollTop = U.scrollHeight), W(D), e === "both") {
231
- const ue = I.find((he) => he.ref.current === D);
232
- ue && ee(ue.textValue);
225
+ }), se = Ee(), ae = l.useCallback(
226
+ (I, N) => {
227
+ var ue;
228
+ const k = N.map((U) => U.ref.current), [_, ...R] = k, [A] = R.slice(-1), ee = K ?? ((ue = N.find((U) => U.value === J)) == null ? void 0 : ue.ref.current);
229
+ for (const U of I) {
230
+ if (U === ee) return;
231
+ if (U == null || U.scrollIntoView({ block: "nearest" }), U === _ && G && (G.scrollTop = 0), U === A && G && (G.scrollTop = G.scrollHeight), Z(U), t === "both") {
232
+ const Ae = N.find((Be) => Be.ref.current === U);
233
+ Ae && q(Ae.textValue);
233
234
  }
234
- if (D !== B) return;
235
+ if (U !== ee) return;
235
236
  }
236
237
  },
237
- [e, ee, U, L, K]
238
- ), ne = so(e);
239
- return s.useEffect(() => {
240
- e !== "both" && W(null);
241
- }, [ce, e]), s.useEffect(() => {
242
- if (R && k) return ft([R, k]);
243
- }, [R, k]), /* @__PURE__ */ d(lo, { children: /* @__PURE__ */ d(
244
- ro,
238
+ [t, q, G, K, J]
239
+ ), Q = lr(t);
240
+ return l.useEffect(() => {
241
+ t !== "both" && Z(null);
242
+ }, [re, t]), l.useEffect(() => {
243
+ if (L && D) return zo([L, D]);
244
+ }, [L, D]), /* @__PURE__ */ b(cr, { children: /* @__PURE__ */ b(
245
+ ar,
245
246
  {
246
- allowCustomValue: i,
247
- autocomplete: ne,
248
- required: v,
249
- trigger: k,
250
- onTriggerChange: Z,
251
- contentId: te,
252
- value: K,
253
- onValueChange: G,
254
- open: J,
255
- onOpenChange: Q,
256
- disabled: C,
257
- locale: g,
247
+ allowCustomValue: o,
248
+ autocomplete: Q,
249
+ required: g,
250
+ trigger: D,
251
+ onTriggerChange: W,
252
+ contentId: se,
253
+ value: J,
254
+ onValueChange: $,
255
+ open: le,
256
+ onOpenChange: ne,
257
+ disabled: y,
258
+ locale: h,
258
259
  focusFirst: ae,
259
- textValue: ce,
260
- onTextValueChange: ee,
261
- onViewportChange: z,
262
- onContentChange: H,
263
- visuallyFocussedItem: L,
264
- filterValue: fe,
265
- onFilterValueChange: me,
266
- onVisuallyFocussedItemChange: W,
267
- isPrintableCharacter: y,
268
- visible: E,
269
- virtualized: O,
270
- estimatedItemSize: F,
271
- overscan: _,
272
- children: t
260
+ textValue: re,
261
+ onTextValueChange: q,
262
+ onViewportChange: oe,
263
+ onContentChange: Y,
264
+ visuallyFocussedItem: K,
265
+ filterValue: j,
266
+ onFilterValueChange: fe,
267
+ onVisuallyFocussedItemChange: Z,
268
+ isPrintableCharacter: w,
269
+ visible: C,
270
+ virtualized: E,
271
+ estimatedItemSize: T,
272
+ overscan: x,
273
+ children: n
273
274
  }
274
275
  ) });
275
- }, xt = "ComboboxTrigger", Ct = s.forwardRef((o, i) => {
276
- const { ...e } = o, t = Y(xt), n = () => {
277
- t.disabled || t.onOpenChange(!0);
276
+ }, Wo = "ComboboxTrigger", Ko = l.forwardRef((e, o) => {
277
+ const { ...t } = e, n = pe(Wo), r = () => {
278
+ n.disabled || n.onOpenChange(!0);
278
279
  };
279
- return /* @__PURE__ */ d(ie.Anchor, { asChild: !0, children: /* @__PURE__ */ d(
280
- ut,
280
+ return /* @__PURE__ */ b(Pe.Anchor, { asChild: !0, children: /* @__PURE__ */ b(
281
+ Lo,
281
282
  {
282
283
  asChild: !0,
283
- trapped: t.open,
284
- onMountAutoFocus: (r) => {
285
- r.preventDefault();
284
+ trapped: n.open,
285
+ onMountAutoFocus: (s) => {
286
+ s.preventDefault();
286
287
  },
287
- onUnmountAutoFocus: (r) => {
288
- var c, l;
289
- (c = t.trigger) == null || c.focus({ preventScroll: !0 }), (l = document.getSelection()) == null || l.empty(), r.preventDefault();
288
+ onUnmountAutoFocus: (s) => {
289
+ var i, a;
290
+ (i = n.trigger) == null || i.focus({ preventScroll: !0 }), (a = document.getSelection()) == null || a.empty(), s.preventDefault();
290
291
  },
291
- children: /* @__PURE__ */ d(
292
+ children: /* @__PURE__ */ b(
292
293
  "div",
293
294
  {
294
- ref: i,
295
- "data-disabled": t.disabled ? "" : void 0,
296
- ...e,
297
- onClick: P(e.onClick, (r) => {
298
- var c;
299
- if (t.disabled) {
300
- r.preventDefault();
295
+ ref: o,
296
+ "data-disabled": n.disabled ? "" : void 0,
297
+ ...t,
298
+ onClick: M(t.onClick, (s) => {
299
+ var i;
300
+ if (n.disabled) {
301
+ s.preventDefault();
301
302
  return;
302
303
  }
303
- (c = t.trigger) == null || c.focus();
304
+ (i = n.trigger) == null || i.focus();
304
305
  }),
305
- onPointerDown: P(e.onPointerDown, (r) => {
306
- var a;
307
- if (t.disabled) {
308
- r.preventDefault();
306
+ onPointerDown: M(t.onPointerDown, (s) => {
307
+ var c;
308
+ if (n.disabled) {
309
+ s.preventDefault();
309
310
  return;
310
311
  }
311
- const c = r.target;
312
- c.hasPointerCapture(r.pointerId) && c.releasePointerCapture(r.pointerId), (c.closest("button") ?? c.closest("div")) === r.currentTarget && r.button === 0 && r.ctrlKey === !1 && (n(), (a = t.trigger) == null || a.focus());
312
+ const i = s.target;
313
+ i.hasPointerCapture(s.pointerId) && i.releasePointerCapture(s.pointerId), (i.closest("button") ?? i.closest("div")) === s.currentTarget && s.button === 0 && s.ctrlKey === !1 && (r(), (c = n.trigger) == null || c.focus());
313
314
  })
314
315
  }
315
316
  )
316
317
  }
317
318
  ) });
318
319
  });
319
- Ct.displayName = xt;
320
- const vt = "ComboboxInput", bt = s.forwardRef((o, i) => {
321
- var C;
322
- const e = Y(vt), t = s.useRef(null), { getItems: n } = xe(void 0), { startsWith: r } = De(e.locale, { sensitivity: "base" }), c = e.disabled, l = A(t, i, e.onTriggerChange), a = () => {
323
- c || e.onOpenChange(!0);
324
- }, m = eo(e.filterValue);
325
- return $(() => {
326
- const v = setTimeout(() => {
320
+ Ko.displayName = Wo;
321
+ const Go = "ComboboxInput", Yo = l.forwardRef((e, o) => {
322
+ var y;
323
+ const t = pe(Go), n = l.useRef(null), { getItems: r } = We(void 0), { startsWith: s } = Lt(t.locale, { sensitivity: "base" }), i = t.disabled, a = z(n, o, t.onTriggerChange), c = () => {
324
+ i || t.onOpenChange(!0);
325
+ }, d = nr(t.filterValue);
326
+ return te(() => {
327
+ const g = setTimeout(() => {
327
328
  var f;
328
- if (e.textValue === "" || e.textValue === void 0 || e.filterValue === "" || e.filterValue === void 0)
329
+ if (t.textValue === "" || t.textValue === void 0 || t.filterValue === "" || t.filterValue === void 0)
329
330
  return;
330
- const g = n().find(
331
- (h) => h.type === "option" && r(h.textValue, e.textValue)
332
- ), u = wo(m ?? "", e.filterValue);
333
- g && !e.visuallyFocussedItem && u === e.filterValue.length && ((f = t.current) == null || f.setSelectionRange(e.filterValue.length, e.textValue.length));
331
+ const h = r().find(
332
+ (m) => m.type === "option" && s(m.textValue, t.textValue)
333
+ ), u = Tr(d ?? "", t.filterValue);
334
+ h && !t.visuallyFocussedItem && u === t.filterValue.length && ((f = n.current) == null || f.setSelectionRange(t.filterValue.length, t.textValue.length));
334
335
  });
335
- return () => clearTimeout(v);
336
- }, [e.textValue, e.filterValue, r, e.visuallyFocussedItem, n, m]), /* @__PURE__ */ d(
336
+ return () => clearTimeout(g);
337
+ }, [t.textValue, t.filterValue, s, t.visuallyFocussedItem, r, d]), /* @__PURE__ */ b(
337
338
  "input",
338
339
  {
339
340
  type: "text",
340
341
  role: "combobox",
341
- "aria-controls": e.contentId,
342
- "aria-expanded": e.open,
343
- "aria-required": e.required,
344
- "aria-autocomplete": e.autocomplete.type,
345
- "data-state": e.open ? "open" : "closed",
346
- "aria-disabled": c,
347
- "aria-activedescendant": (C = e.visuallyFocussedItem) == null ? void 0 : C.id,
348
- disabled: c,
349
- "data-disabled": c ? "" : void 0,
350
- "data-placeholder": e.textValue === void 0 ? "" : void 0,
351
- value: e.textValue ?? "",
352
- ...o,
353
- ref: l,
354
- onKeyDown: P(o.onKeyDown, (v) => {
355
- var g, u;
356
- if (["ArrowUp", "ArrowDown", "Home", "End"].includes(v.key))
357
- e.open || a(), setTimeout(() => {
358
- var b;
359
- let h = n().filter((x) => !x.disabled && x.isVisible).map((x) => x.ref.current);
360
- if (["ArrowUp", "End"].includes(v.key) && (h = h.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(v.key)) {
361
- const x = e.visuallyFocussedItem ?? ((b = n().find((p) => p.value === e.value)) == null ? void 0 : b.ref.current);
362
- if (x) {
363
- let p = h.indexOf(x);
364
- p === h.length - 1 && (p = -1), h = h.slice(p + 1);
342
+ "aria-controls": t.contentId,
343
+ "aria-expanded": t.open,
344
+ "aria-required": t.required,
345
+ "aria-autocomplete": t.autocomplete.type,
346
+ "data-state": t.open ? "open" : "closed",
347
+ "aria-disabled": i,
348
+ "aria-activedescendant": (y = t.visuallyFocussedItem) == null ? void 0 : y.id,
349
+ disabled: i,
350
+ "data-disabled": i ? "" : void 0,
351
+ "data-placeholder": t.textValue === void 0 ? "" : void 0,
352
+ value: t.textValue ?? "",
353
+ ...e,
354
+ ref: a,
355
+ onKeyDown: M(e.onKeyDown, (g) => {
356
+ var h, u;
357
+ if (["ArrowUp", "ArrowDown", "Home", "End"].includes(g.key))
358
+ t.open || c(), setTimeout(() => {
359
+ var S;
360
+ let m = r().filter((v) => !v.disabled && v.isVisible).map((v) => v.ref.current);
361
+ if (["ArrowUp", "End"].includes(g.key) && (m = m.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(g.key)) {
362
+ const v = t.visuallyFocussedItem ?? ((S = r().find((p) => p.value === t.value)) == null ? void 0 : S.ref.current);
363
+ if (v) {
364
+ let p = m.indexOf(v);
365
+ p === m.length - 1 && (p = -1), m = m.slice(p + 1);
365
366
  }
366
367
  }
367
- if (["ArrowDown"].includes(v.key) && e.autocomplete.type === "both" && h.length > 1) {
368
- const [x, ...p] = h, y = n().find((E) => E.ref.current === x).textValue;
369
- e.textValue === y && (h = p);
368
+ if (["ArrowDown"].includes(g.key) && t.autocomplete.type === "both" && m.length > 1) {
369
+ const [v, ...p] = m, w = r().find((C) => C.ref.current === v).textValue;
370
+ t.textValue === w && (m = p);
370
371
  }
371
- e.focusFirst(h, n());
372
- }), v.preventDefault();
373
- else if (["Tab"].includes(v.key) && e.open)
374
- v.preventDefault();
375
- else if (["Escape"].includes(v.key))
376
- e.open ? e.onOpenChange(!1) : (e.onValueChange(void 0), e.onTextValueChange("")), v.preventDefault();
377
- else if (oo.includes(v.key)) {
378
- if (e.visuallyFocussedItem) {
379
- const f = n().find((h) => h.ref.current === e.visuallyFocussedItem);
380
- f && (e.onValueChange(f.value), e.onTextValueChange(f.textValue), e.autocomplete.type === "both" && e.onFilterValueChange(f.textValue), (g = f.ref.current) == null || g.click());
372
+ t.focusFirst(m, r());
373
+ }), g.preventDefault();
374
+ else if (["Tab"].includes(g.key) && t.open)
375
+ g.preventDefault();
376
+ else if (["Escape"].includes(g.key))
377
+ t.open ? t.onOpenChange(!1) : (t.onValueChange(void 0), t.onTextValueChange("")), g.preventDefault();
378
+ else if (sr.includes(g.key)) {
379
+ if (t.visuallyFocussedItem) {
380
+ const f = r().find((m) => m.ref.current === t.visuallyFocussedItem);
381
+ f && (t.onValueChange(f.value), t.onTextValueChange(f.textValue), t.autocomplete.type === "both" && t.onFilterValueChange(f.textValue), (h = f.ref.current) == null || h.click());
381
382
  } else {
382
- const f = n().find(
383
- (h) => h.type === "option" && !h.disabled && h.textValue === e.textValue
383
+ const f = r().find(
384
+ (m) => m.type === "option" && !m.disabled && m.textValue === t.textValue
384
385
  );
385
- f && (e.onValueChange(f.value), e.onTextValueChange(f.textValue), e.autocomplete.type === "both" && e.onFilterValueChange(f.textValue), (u = f.ref.current) == null || u.click());
386
+ f && (t.onValueChange(f.value), t.onTextValueChange(f.textValue), t.autocomplete.type === "both" && t.onFilterValueChange(f.textValue), (u = f.ref.current) == null || u.click());
386
387
  }
387
- e.onOpenChange(!1), v.preventDefault();
388
+ t.onOpenChange(!1), g.preventDefault();
388
389
  } else
389
- e.onVisuallyFocussedItemChange(null);
390
+ t.onVisuallyFocussedItemChange(null);
390
391
  }),
391
- onChange: P(o.onChange, (v) => {
392
- e.onTextValueChange(v.currentTarget.value), e.autocomplete.type === "both" && e.onFilterValueChange(v.currentTarget.value);
392
+ onChange: M(e.onChange, (g) => {
393
+ t.onTextValueChange(g.currentTarget.value), t.autocomplete.type === "both" && t.onFilterValueChange(g.currentTarget.value);
393
394
  }),
394
- onKeyUp: P(o.onKeyUp, (v) => {
395
- var g;
396
- if (!e.open && (e.isPrintableCharacter(v.key) || ["Backspace"].includes(v.key)) && a(), setTimeout(() => {
397
- if (e.autocomplete.type === "both" && e.isPrintableCharacter(v.key) && e.filterValue !== void 0) {
398
- const u = e.filterValue, f = n().find((h) => r(h.textValue, u));
399
- f && e.onTextValueChange(f.textValue);
395
+ onKeyUp: M(e.onKeyUp, (g) => {
396
+ var h;
397
+ if (!t.open && (t.isPrintableCharacter(g.key) || ["Backspace"].includes(g.key)) && c(), setTimeout(() => {
398
+ if (t.autocomplete.type === "both" && t.isPrintableCharacter(g.key) && t.filterValue !== void 0) {
399
+ const u = t.filterValue, f = r().find((m) => s(m.textValue, u));
400
+ f && t.onTextValueChange(f.textValue);
400
401
  }
401
- }), e.autocomplete.type === "none" && e.isPrintableCharacter(v.key)) {
402
- const u = e.textValue ?? "", f = n().find((h) => r(h.textValue, u));
403
- f && (e.onVisuallyFocussedItemChange(f.ref.current), (g = f.ref.current) == null || g.scrollIntoView());
402
+ }), t.autocomplete.type === "none" && t.isPrintableCharacter(g.key)) {
403
+ const u = t.textValue ?? "", f = r().find((m) => s(m.textValue, u));
404
+ f && (t.onVisuallyFocussedItemChange(f.ref.current), (h = f.ref.current) == null || h.scrollIntoView());
404
405
  }
405
406
  }),
406
- onBlur: P(o.onBlur, () => {
407
- if (e.open)
407
+ onBlur: M(e.onBlur, () => {
408
+ if (t.open)
408
409
  return;
409
- e.onVisuallyFocussedItemChange(null);
410
- const [v] = n().filter(
411
- (u) => u.textValue === e.textValue && u.type === "option"
410
+ t.onVisuallyFocussedItemChange(null);
411
+ const [g] = r().filter(
412
+ (u) => u.textValue === t.textValue && u.type === "option"
412
413
  );
413
- if (v) {
414
- e.onValueChange(v.value), e.autocomplete.type === "both" && e.onFilterValueChange(v.textValue);
414
+ if (g) {
415
+ t.onValueChange(g.value), t.autocomplete.type === "both" && t.onFilterValueChange(g.textValue);
415
416
  return;
416
417
  }
417
- if (e.allowCustomValue) {
418
- e.onValueChange(e.textValue), e.autocomplete.type === "both" && e.onFilterValueChange(e.textValue);
418
+ if (t.allowCustomValue) {
419
+ t.onValueChange(t.textValue), t.autocomplete.type === "both" && t.onFilterValueChange(t.textValue);
419
420
  return;
420
421
  }
421
- const [g] = n().filter((u) => u.value === e.value && u.type === "option");
422
- g && e.textValue !== "" ? (e.onTextValueChange(g.textValue), e.autocomplete.type === "both" && e.onFilterValueChange(g.textValue)) : (e.onValueChange(void 0), e.onTextValueChange(""));
422
+ const [h] = r().filter((u) => u.value === t.value && u.type === "option");
423
+ h && t.textValue !== "" ? (t.onTextValueChange(h.textValue), t.autocomplete.type === "both" && t.onFilterValueChange(h.textValue)) : (t.onValueChange(void 0), t.onTextValueChange(""));
423
424
  })
424
425
  }
425
426
  );
426
427
  });
427
- bt.displayName = "ComboboxTextInput";
428
- const yt = s.forwardRef((o, i) => {
429
- const { children: e, ...t } = o, n = Y(vt), r = n.disabled, c = () => {
430
- var l;
431
- r || (n.onOpenChange(!0), (l = n.trigger) == null || l.focus());
428
+ Yo.displayName = "ComboboxTextInput";
429
+ const qo = l.forwardRef((e, o) => {
430
+ const { children: t, ...n } = e, r = pe(Go), s = r.disabled, i = () => {
431
+ var a;
432
+ s || (r.onOpenChange(!0), (a = r.trigger) == null || a.focus());
432
433
  };
433
- return /* @__PURE__ */ d(
434
- N.button,
434
+ return /* @__PURE__ */ b(
435
+ F.button,
435
436
  {
436
437
  "aria-hidden": !0,
437
438
  type: "button",
438
- "aria-disabled": r,
439
- "aria-controls": n.contentId,
440
- "aria-expanded": n.open,
441
- disabled: r,
442
- "data-disabled": r ? "" : void 0,
443
- ...t,
439
+ "aria-disabled": s,
440
+ "aria-controls": r.contentId,
441
+ "aria-expanded": r.open,
442
+ disabled: s,
443
+ "data-disabled": s ? "" : void 0,
444
+ ...n,
444
445
  tabIndex: -1,
445
- ref: i,
446
- onClick: P(t.onClick, () => {
447
- var l;
448
- (l = n.trigger) == null || l.focus();
446
+ ref: o,
447
+ onClick: M(n.onClick, () => {
448
+ var a;
449
+ (a = r.trigger) == null || a.focus();
449
450
  }),
450
- onPointerDown: P(t.onPointerDown, (l) => {
451
- l.button === 0 && l.ctrlKey === !1 && (c(), l.preventDefault());
451
+ onPointerDown: M(n.onPointerDown, (a) => {
452
+ a.button === 0 && a.ctrlKey === !1 && (i(), a.preventDefault());
452
453
  }),
453
- onKeyDown: P(t.onKeyDown, (l) => {
454
- to.includes(l.key) && (c(), l.preventDefault());
454
+ onKeyDown: M(n.onKeyDown, (a) => {
455
+ rr.includes(a.key) && (i(), a.preventDefault());
455
456
  }),
456
- children: e || "▼"
457
+ children: t || "▼"
457
458
  }
458
459
  );
459
460
  });
460
- yt.displayName = "ComboboxIcon";
461
- const co = "ComboboxPortal", St = (o) => /* @__PURE__ */ d(pt, { asChild: !0, ...o });
462
- St.displayName = co;
463
- const ke = "ComboboxContent", wt = s.forwardRef((o, i) => {
464
- const e = Y(ke), { getItems: t } = xe(void 0), [n, r] = s.useState();
465
- if ($(() => {
466
- r(new DocumentFragment());
467
- }, []), $(() => {
468
- e.open && e.autocomplete.type === "none" && setTimeout(() => {
469
- var l;
470
- const c = t().find((a) => a.value === e.value);
471
- (l = c == null ? void 0 : c.ref.current) == null || l.scrollIntoView({ block: "nearest" });
461
+ qo.displayName = "ComboboxIcon";
462
+ const dr = "ComboboxPortal", Xo = (e) => /* @__PURE__ */ b(Bo, { asChild: !0, ...e });
463
+ Xo.displayName = dr;
464
+ const $t = "ComboboxContent", Zo = l.forwardRef((e, o) => {
465
+ const t = pe($t), { getItems: n } = We(void 0), [r, s] = l.useState();
466
+ if (te(() => {
467
+ s(new DocumentFragment());
468
+ }, []), te(() => {
469
+ t.open && t.autocomplete.type === "none" && setTimeout(() => {
470
+ var a;
471
+ const i = n().find((c) => c.value === t.value);
472
+ (a = i == null ? void 0 : i.ref.current) == null || a.scrollIntoView({ block: "nearest" });
472
473
  });
473
- }, [t, e.autocomplete, e.value, e.open]), !e.open) {
474
- const c = n;
475
- return c ? we.createPortal(
476
- /* @__PURE__ */ d(re.Slot, { scope: void 0, children: /* @__PURE__ */ d("div", { children: o.children }) }),
477
- c
474
+ }, [n, t.autocomplete, t.value, t.open]), !t.open) {
475
+ const i = r;
476
+ return i ? ct.createPortal(
477
+ /* @__PURE__ */ b(Ce.Slot, { scope: void 0, children: /* @__PURE__ */ b("div", { children: e.children }) }),
478
+ i
478
479
  ) : null;
479
480
  }
480
- return /* @__PURE__ */ d(It, { ...o, ref: i });
481
+ return /* @__PURE__ */ b(Jo, { ...e, ref: o });
481
482
  });
482
- wt.displayName = ke;
483
- const ao = 10, It = s.forwardRef(
484
- (o, i) => {
485
- const { onEscapeKeyDown: e, onPointerDownOutside: t, ...n } = o, r = Y(ke), c = A(i, (a) => r.onContentChange(a)), { onOpenChange: l } = r;
486
- return at(), s.useEffect(() => {
487
- const a = () => {
488
- l(!1);
483
+ Zo.displayName = $t;
484
+ const pr = 10, Jo = l.forwardRef(
485
+ (e, o) => {
486
+ const { onEscapeKeyDown: t, onPointerDownOutside: n, ...r } = e, s = pe($t), i = z(o, (c) => s.onContentChange(c)), { onOpenChange: a } = s;
487
+ return Fo(), l.useEffect(() => {
488
+ const c = () => {
489
+ a(!1);
489
490
  };
490
- return window.addEventListener("blur", a), window.addEventListener("resize", a), () => {
491
- window.removeEventListener("blur", a), window.removeEventListener("resize", a);
491
+ return window.addEventListener("blur", c), window.addEventListener("resize", c), () => {
492
+ window.removeEventListener("blur", c), window.removeEventListener("resize", c);
492
493
  };
493
- }, [l]), /* @__PURE__ */ d(mt, { allowPinchZoom: !0, children: /* @__PURE__ */ d(
494
- ct,
494
+ }, [a]), /* @__PURE__ */ b(jo, { allowPinchZoom: !0, children: /* @__PURE__ */ b(
495
+ Do,
495
496
  {
496
497
  asChild: !0,
497
- onEscapeKeyDown: e,
498
- onPointerDownOutside: t,
499
- onFocusOutside: (a) => {
500
- a.preventDefault();
498
+ onEscapeKeyDown: t,
499
+ onPointerDownOutside: n,
500
+ onFocusOutside: (c) => {
501
+ c.preventDefault();
501
502
  },
502
503
  onDismiss: () => {
503
- var a;
504
- r.onOpenChange(!1), (a = r.trigger) == null || a.focus({ preventScroll: !0 });
504
+ var c;
505
+ s.onOpenChange(!1), (c = s.trigger) == null || c.focus({ preventScroll: !0 });
505
506
  },
506
- children: /* @__PURE__ */ d(
507
- Tt,
507
+ children: /* @__PURE__ */ b(
508
+ Qo,
508
509
  {
509
510
  role: "listbox",
510
- id: r.contentId,
511
- "data-state": r.open ? "open" : "closed",
512
- onContextMenu: (a) => a.preventDefault(),
513
- ...n,
514
- ref: c,
511
+ id: s.contentId,
512
+ "data-state": s.open ? "open" : "closed",
513
+ onContextMenu: (c) => c.preventDefault(),
514
+ ...r,
515
+ ref: i,
515
516
  style: {
516
517
  // flex layout so we can place the scroll buttons properly
517
518
  display: "flex",
518
519
  flexDirection: "column",
519
520
  // reset the outline by default as the content MAY get focused
520
521
  outline: "none",
521
- ...n.style
522
+ ...r.style
522
523
  }
523
524
  }
524
525
  )
@@ -526,21 +527,21 @@ const ao = 10, It = s.forwardRef(
526
527
  ) });
527
528
  }
528
529
  );
529
- It.displayName = "ComboboxContentImpl";
530
- const Tt = s.forwardRef(
531
- (o, i) => {
532
- const { align: e = "start", collisionPadding: t = ao, ...n } = o;
533
- return /* @__PURE__ */ d(
534
- ie.Content,
530
+ Jo.displayName = "ComboboxContentImpl";
531
+ const Qo = l.forwardRef(
532
+ (e, o) => {
533
+ const { align: t = "start", collisionPadding: n = pr, ...r } = e;
534
+ return /* @__PURE__ */ b(
535
+ Pe.Content,
535
536
  {
536
- ...n,
537
- ref: i,
538
- align: e,
539
- collisionPadding: t,
537
+ ...r,
538
+ ref: o,
539
+ align: t,
540
+ collisionPadding: n,
540
541
  style: {
541
542
  // Ensure border-box for floating-ui calculations
542
543
  boxSizing: "border-box",
543
- ...n.style,
544
+ ...r.style,
544
545
  "--radix-combobox-content-transform-origin": "var(--radix-popper-transform-origin)",
545
546
  "--radix-combobox-content-available-width": "var(--radix-popper-available-width)",
546
547
  "--radix-combobox-content-available-height": "var(--radix-popper-available-height)",
@@ -551,21 +552,21 @@ const Tt = s.forwardRef(
551
552
  );
552
553
  }
553
554
  );
554
- Tt.displayName = "ComboboxPopperPosition";
555
- const Vt = "ComboboxViewport", Pt = s.forwardRef((o, i) => {
556
- const e = Y(Vt), t = A(i, e.onViewportChange), r = s.useMemo(() => s.Children.toArray(o.children), [o.children]).length;
557
- return e.virtualized === !0 || e.virtualized === "auto" && r > 100 ? /* @__PURE__ */ d(re.Slot, { scope: void 0, children: /* @__PURE__ */ d(
558
- ht,
555
+ Qo.displayName = "ComboboxPopperPosition";
556
+ const en = "ComboboxViewport", tn = l.forwardRef((e, o) => {
557
+ const t = pe(en), n = z(o, t.onViewportChange), s = l.useMemo(() => l.Children.toArray(e.children), [e.children]).length;
558
+ return t.virtualized === !0 || t.virtualized === "auto" && s > 100 ? /* @__PURE__ */ b(Ce.Slot, { scope: void 0, children: /* @__PURE__ */ b(
559
+ Ho,
559
560
  {
560
- ...o,
561
- ref: t,
562
- getItemCount: () => r,
563
- estimatedItemSize: e.estimatedItemSize,
564
- overscan: e.overscan,
565
- onViewportChange: e.onViewportChange
561
+ ...e,
562
+ ref: n,
563
+ getItemCount: () => s,
564
+ estimatedItemSize: t.estimatedItemSize,
565
+ overscan: t.overscan,
566
+ onViewportChange: t.onViewportChange
566
567
  }
567
- ) }) : /* @__PURE__ */ ye(Se, { children: [
568
- /* @__PURE__ */ d(
568
+ ) }) : /* @__PURE__ */ it(at, { children: [
569
+ /* @__PURE__ */ b(
569
570
  "style",
570
571
  {
571
572
  dangerouslySetInnerHTML: {
@@ -573,13 +574,13 @@ const Vt = "ComboboxViewport", Pt = s.forwardRef((o, i) => {
573
574
  }
574
575
  }
575
576
  ),
576
- /* @__PURE__ */ d(re.Slot, { scope: void 0, children: /* @__PURE__ */ d(
577
- N.div,
577
+ /* @__PURE__ */ b(Ce.Slot, { scope: void 0, children: /* @__PURE__ */ b(
578
+ F.div,
578
579
  {
579
580
  "data-radix-combobox-viewport": "",
580
581
  role: "presentation",
581
- ...o,
582
- ref: t,
582
+ ...e,
583
+ ref: n,
583
584
  style: {
584
585
  // we use position: 'relative' here on the `viewport` so that when we call
585
586
  // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
@@ -587,513 +588,1595 @@ const Vt = "ComboboxViewport", Pt = s.forwardRef((o, i) => {
587
588
  position: "relative",
588
589
  flex: 1,
589
590
  overflow: "auto",
590
- ...o.style
591
+ ...e.style
591
592
  }
592
593
  }
593
594
  ) })
594
595
  ] });
595
596
  });
596
- Pt.displayName = Vt;
597
- const Ie = "ComboboxItem", [lt, Fe] = it(Ie), Le = s.forwardRef((o, i) => {
598
- const { value: e, disabled: t = !1, textValue: n, ...r } = o, [c, l] = s.useState();
599
- $(() => {
600
- l(new DocumentFragment());
597
+ tn.displayName = en;
598
+ const lt = "ComboboxItem", [go, Bt] = Mo(lt), zt = l.forwardRef((e, o) => {
599
+ const { value: t, disabled: n = !1, textValue: r, ...s } = e, [i, a] = l.useState();
600
+ te(() => {
601
+ a(new DocumentFragment());
601
602
  }, []);
602
- const { onTextValueChange: a, textValue: m, ...C } = Y(Ie), v = se(), [g, u] = s.useState(n ?? ""), f = C.value === e, { startsWith: h, contains: b } = De(C.locale, { sensitivity: "base" }), x = s.useCallback((p) => {
603
- u((y) => y || ((p == null ? void 0 : p.textContent) ?? "").trim());
603
+ const { onTextValueChange: c, textValue: d, ...y } = pe(lt), g = Ee(), [h, u] = l.useState(r ?? ""), f = y.value === t, { startsWith: m, contains: S } = Lt(y.locale, { sensitivity: "base" }), v = l.useCallback((p) => {
604
+ u((w) => w || ((p == null ? void 0 : p.textContent) ?? "").trim());
604
605
  }, []);
605
- return s.useEffect(() => {
606
- f && m === void 0 && g !== "" && a(g);
607
- }, [g, f, m, a]), C.autocomplete.type === "both" && g && C.filterValue && !h(g, C.filterValue) || C.autocomplete.type === "list" && C.autocomplete.filter === "startsWith" && g && m && !h(g, m) || C.autocomplete.type === "list" && C.autocomplete.filter === "contains" && g && m && !b(g, m) ? c ? we.createPortal(
608
- /* @__PURE__ */ d(
609
- lt,
606
+ return l.useEffect(() => {
607
+ f && d === void 0 && h !== "" && c(h);
608
+ }, [h, f, d, c]), y.autocomplete.type === "both" && h && y.filterValue && !m(h, y.filterValue) || y.autocomplete.type === "list" && y.autocomplete.filter === "startsWith" && h && d && !m(h, d) || y.autocomplete.type === "list" && y.autocomplete.filter === "contains" && h && d && !S(h, d) ? i ? ct.createPortal(
609
+ /* @__PURE__ */ b(
610
+ go,
610
611
  {
611
- textId: v,
612
- onTextValueChange: x,
612
+ textId: g,
613
+ onTextValueChange: v,
613
614
  isSelected: f,
614
- textValue: g,
615
- children: /* @__PURE__ */ d(
616
- re.ItemSlot,
615
+ textValue: h,
616
+ children: /* @__PURE__ */ b(
617
+ Ce.ItemSlot,
617
618
  {
618
619
  scope: void 0,
619
- value: e,
620
- textValue: g,
621
- disabled: t,
620
+ value: t,
621
+ textValue: h,
622
+ disabled: n,
622
623
  type: "option",
623
624
  isVisible: !1,
624
- children: /* @__PURE__ */ d(Ne, { ref: i, value: e, disabled: t, ...r })
625
+ children: /* @__PURE__ */ b(It, { ref: o, value: t, disabled: n, ...s })
625
626
  }
626
627
  )
627
628
  }
628
629
  ),
629
- c
630
- ) : null : /* @__PURE__ */ d(
631
- lt,
630
+ i
631
+ ) : null : /* @__PURE__ */ b(
632
+ go,
632
633
  {
633
- textId: v,
634
- onTextValueChange: x,
634
+ textId: g,
635
+ onTextValueChange: v,
635
636
  isSelected: f,
636
- textValue: g,
637
- children: /* @__PURE__ */ d(
638
- re.ItemSlot,
637
+ textValue: h,
638
+ children: /* @__PURE__ */ b(
639
+ Ce.ItemSlot,
639
640
  {
640
641
  scope: void 0,
641
- value: e,
642
- textValue: g,
643
- disabled: t,
642
+ value: t,
643
+ textValue: h,
644
+ disabled: n,
644
645
  type: "option",
645
646
  isVisible: !0,
646
- children: /* @__PURE__ */ d(Ne, { ref: i, value: e, disabled: t, ...r })
647
+ children: /* @__PURE__ */ b(It, { ref: o, value: t, disabled: n, ...s })
647
648
  }
648
649
  )
649
650
  }
650
651
  );
651
652
  });
652
- Le.displayName = Ie;
653
- const Et = "ComboboxItemImpl", Ne = s.forwardRef((o, i) => {
654
- const { value: e, disabled: t = !1, ...n } = o, r = s.useRef(null), c = A(i, r), { getItems: l } = xe(void 0), { onTextValueChange: a, visuallyFocussedItem: m, ...C } = Y(Ie), { isSelected: v, textValue: g, textId: u } = Fe(Et), f = () => {
655
- var x;
656
- t || (C.onValueChange(e), a(g), C.onOpenChange(!1), C.autocomplete.type === "both" && C.onFilterValueChange(g), (x = C.trigger) == null || x.focus({ preventScroll: !0 }));
657
- }, h = s.useMemo(() => {
658
- var x;
659
- return m === ((x = l().find((p) => p.ref.current === r.current)) == null ? void 0 : x.ref.current);
660
- }, [l, m]), b = se();
661
- return /* @__PURE__ */ d(
662
- N.div,
653
+ zt.displayName = lt;
654
+ const on = "ComboboxItemImpl", It = l.forwardRef((e, o) => {
655
+ const { value: t, disabled: n = !1, ...r } = e, s = l.useRef(null), i = z(o, s), { getItems: a } = We(void 0), { onTextValueChange: c, visuallyFocussedItem: d, ...y } = pe(lt), { isSelected: g, textValue: h, textId: u } = Bt(on), f = () => {
656
+ var v;
657
+ n || (y.onValueChange(t), c(h), y.onOpenChange(!1), y.autocomplete.type === "both" && y.onFilterValueChange(h), (v = y.trigger) == null || v.focus({ preventScroll: !0 }));
658
+ }, m = l.useMemo(() => {
659
+ var v;
660
+ return d === ((v = a().find((p) => p.ref.current === s.current)) == null ? void 0 : v.ref.current);
661
+ }, [a, d]), S = Ee();
662
+ return /* @__PURE__ */ b(
663
+ F.div,
663
664
  {
664
665
  role: "option",
665
666
  "aria-labelledby": u,
666
- "data-highlighted": h ? "" : void 0,
667
- "aria-selected": v && h,
668
- "data-state": v ? "checked" : "unchecked",
669
- "aria-disabled": t || void 0,
670
- "data-disabled": t ? "" : void 0,
671
- tabIndex: t ? void 0 : -1,
672
- ...n,
673
- id: b,
674
- ref: c,
675
- onPointerUp: P(n.onPointerUp, f)
667
+ "data-highlighted": m ? "" : void 0,
668
+ "aria-selected": g && m,
669
+ "data-state": g ? "checked" : "unchecked",
670
+ "aria-disabled": n || void 0,
671
+ "data-disabled": n ? "" : void 0,
672
+ tabIndex: n ? void 0 : -1,
673
+ ...r,
674
+ id: S,
675
+ ref: i,
676
+ onPointerUp: M(r.onPointerUp, f)
676
677
  }
677
678
  );
678
679
  });
679
- Ne.displayName = Et;
680
- const Nt = "ComboboxItemText", Rt = s.forwardRef((o, i) => {
681
- const { className: e, style: t, ...n } = o, r = Fe(Nt), c = A(i, r.onTextValueChange);
682
- return /* @__PURE__ */ d(N.span, { id: r.textId, ...n, ref: c });
680
+ It.displayName = on;
681
+ const nn = "ComboboxItemText", rn = l.forwardRef((e, o) => {
682
+ const { className: t, style: n, ...r } = e, s = Bt(nn), i = z(o, s.onTextValueChange);
683
+ return /* @__PURE__ */ b(F.span, { id: s.textId, ...r, ref: i });
683
684
  });
684
- Rt.displayName = Nt;
685
- const At = "ComboboxItemIndicator", _t = s.forwardRef((o, i) => {
686
- const { isSelected: e } = Fe(At);
687
- return e ? /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...o, ref: i }) : null;
685
+ rn.displayName = nn;
686
+ const sn = "ComboboxItemIndicator", an = l.forwardRef((e, o) => {
687
+ const { isSelected: t } = Bt(sn);
688
+ return t ? /* @__PURE__ */ b(F.span, { "aria-hidden": !0, ...e, ref: o }) : null;
688
689
  });
689
- _t.displayName = At;
690
- const Be = "ComboboxNoValueFound", Mt = s.forwardRef((o, i) => {
690
+ an.displayName = sn;
691
+ const jt = "ComboboxNoValueFound", cn = l.forwardRef((e, o) => {
691
692
  const {
692
- textValue: e = "",
693
- filterValue: t = "",
694
- visible: n = !1,
695
- locale: r,
696
- autocomplete: c
697
- } = Y(Be), [l, a] = s.useState([]), { subscribe: m } = xe(void 0), { startsWith: C, contains: v } = De(r, { sensitivity: "base" });
698
- return s.useEffect(() => {
699
- const g = m((u) => {
700
- if (n) {
701
- const f = u.filter((h) => h.type !== "create");
702
- a(f);
693
+ textValue: t = "",
694
+ filterValue: n = "",
695
+ visible: r = !1,
696
+ locale: s,
697
+ autocomplete: i
698
+ } = pe(jt), [a, c] = l.useState([]), { subscribe: d } = We(void 0), { startsWith: y, contains: g } = Lt(s, { sensitivity: "base" });
699
+ return l.useEffect(() => {
700
+ const h = d((u) => {
701
+ if (r) {
702
+ const f = u.filter((m) => m.type !== "create");
703
+ c(f);
703
704
  } else
704
- a(u);
705
+ c(u);
705
706
  });
706
707
  return () => {
707
- g();
708
+ h();
708
709
  };
709
- }, [n, m]), c.type === "none" && l.length > 0 || c.type === "list" && c.filter === "startsWith" && l.some((g) => C(g.textValue, e)) || c.type === "both" && l.some((g) => C(g.textValue, t)) || c.type === "list" && c.filter === "contains" && l.some((g) => v(g.textValue, e)) ? null : /* @__PURE__ */ d(N.div, { ...o, ref: i });
710
+ }, [r, d]), i.type === "none" && a.length > 0 || i.type === "list" && i.filter === "startsWith" && a.some((h) => y(h.textValue, t)) || i.type === "both" && a.some((h) => y(h.textValue, n)) || i.type === "list" && i.filter === "contains" && a.some((h) => g(h.textValue, t)) ? null : /* @__PURE__ */ b(F.div, { ...e, ref: o });
710
711
  });
711
- Mt.displayName = Be;
712
- const Ot = s.forwardRef((o, i) => {
713
- const { disabled: e = !1, ...t } = o, n = Y(Be), { textValue: r, visuallyFocussedItem: c } = n, { getItems: l, subscribe: a } = xe(void 0), m = s.useRef(null), [C, v] = s.useState(!1), g = A(i, m), u = s.useMemo(() => {
714
- var b;
715
- return c === ((b = l().find((x) => x.ref.current === m.current)) == null ? void 0 : b.ref.current);
716
- }, [l, c]), f = se(), h = () => {
717
- var b;
718
- !e && r && (n.onValueChange(r), n.onTextValueChange(r), n.onOpenChange(!1), n.autocomplete.type === "both" && n.onFilterValueChange(r), (b = n.trigger) == null || b.focus({ preventScroll: !0 }));
712
+ cn.displayName = jt;
713
+ const ln = l.forwardRef((e, o) => {
714
+ const { disabled: t = !1, ...n } = e, r = pe(jt), { textValue: s, visuallyFocussedItem: i } = r, { getItems: a, subscribe: c } = We(void 0), d = l.useRef(null), [y, g] = l.useState(!1), h = z(o, d), u = l.useMemo(() => {
715
+ var S;
716
+ return i === ((S = a().find((v) => v.ref.current === d.current)) == null ? void 0 : S.ref.current);
717
+ }, [a, i]), f = Ee(), m = () => {
718
+ var S;
719
+ !t && s && (r.onValueChange(s), r.onTextValueChange(s), r.onOpenChange(!1), r.autocomplete.type === "both" && r.onFilterValueChange(s), (S = r.trigger) == null || S.focus({ preventScroll: !0 }));
719
720
  };
720
- return $(() => {
721
- const b = a((x) => {
722
- v(!x.some((p) => p.textValue === r && p.type !== "create"));
721
+ return te(() => {
722
+ const S = c((v) => {
723
+ g(!v.some((p) => p.textValue === s && p.type !== "create"));
723
724
  });
724
- return l().length === 0 && v(!0), () => {
725
- b();
725
+ return a().length === 0 && g(!0), () => {
726
+ S();
726
727
  };
727
- }, [r, a, l]), (!r || !C) && !n.visible ? null : /* @__PURE__ */ d(
728
- re.ItemSlot,
728
+ }, [s, c, a]), (!s || !y) && !r.visible ? null : /* @__PURE__ */ b(
729
+ Ce.ItemSlot,
729
730
  {
730
731
  scope: void 0,
731
- value: r ?? "",
732
- textValue: r ?? "",
733
- disabled: e,
732
+ value: s ?? "",
733
+ textValue: s ?? "",
734
+ disabled: t,
734
735
  isVisible: !0,
735
736
  type: "create",
736
- children: /* @__PURE__ */ d(
737
- N.div,
737
+ children: /* @__PURE__ */ b(
738
+ F.div,
738
739
  {
739
740
  role: "option",
740
- tabIndex: e ? void 0 : -1,
741
- "aria-disabled": e || void 0,
742
- "data-disabled": e ? "" : void 0,
741
+ tabIndex: t ? void 0 : -1,
742
+ "aria-disabled": t || void 0,
743
+ "data-disabled": t ? "" : void 0,
743
744
  "data-highlighted": u ? "" : void 0,
744
- ...t,
745
+ ...n,
745
746
  id: f,
746
- ref: g,
747
- onPointerUp: P(t.onPointerUp, h)
747
+ ref: h,
748
+ onPointerUp: M(n.onPointerUp, m)
748
749
  }
749
750
  )
750
751
  }
751
752
  );
752
753
  });
753
- Ot.displayName = "ComboboxCreateItem";
754
- const uo = io, po = Ct, fo = bt, mo = yt, ho = St, go = wt, xo = Pt, Co = Le, vo = Rt, bo = _t, yo = Mt, So = Ot;
755
- function wo(o, i) {
756
- const e = Math.min(o.length, i.length);
757
- for (let t = 0; t < e; t++)
758
- if (o[t] !== i[t])
759
- return t;
760
- return e;
754
+ ln.displayName = "ComboboxCreateItem";
755
+ const fr = ur, hr = Ko, mr = Yo, gr = qo, yr = Xo, vr = Zo, br = tn, wr = zt, Sr = rn, xr = an, Cr = cn, Ir = ln;
756
+ function Tr(e, o) {
757
+ const t = Math.min(e.length, o.length);
758
+ for (let n = 0; n < t; n++)
759
+ if (e[n] !== o[n])
760
+ return n;
761
+ return t;
761
762
  }
762
- const Rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
763
+ const Bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
763
764
  __proto__: null,
764
- ComboboxItem: Le,
765
- Content: go,
766
- CreateItem: So,
767
- Icon: mo,
768
- Item: Co,
769
- ItemIndicator: bo,
770
- ItemText: vo,
771
- NoValueFound: yo,
772
- Portal: ho,
773
- Root: uo,
774
- TextInput: fo,
775
- Trigger: po,
776
- Viewport: xo
765
+ ComboboxItem: zt,
766
+ Content: vr,
767
+ CreateItem: Ir,
768
+ Icon: gr,
769
+ Item: wr,
770
+ ItemIndicator: xr,
771
+ ItemText: Sr,
772
+ NoValueFound: Cr,
773
+ Portal: yr,
774
+ Root: fr,
775
+ TextInput: mr,
776
+ Trigger: hr,
777
+ Viewport: br
777
778
  }, Symbol.toStringTag, { value: "Module" }));
778
- function Io(o) {
779
- const i = s.useRef(o);
780
- return s.useEffect(() => {
781
- i.current = o;
782
- }), s.useMemo(() => (...e) => {
783
- var t;
784
- return (t = i.current) == null ? void 0 : t.call(i, ...e);
779
+ var X = function() {
780
+ return X = Object.assign || function(o) {
781
+ for (var t, n = 1, r = arguments.length; n < r; n++) {
782
+ t = arguments[n];
783
+ for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (o[s] = t[s]);
784
+ }
785
+ return o;
786
+ }, X.apply(this, arguments);
787
+ };
788
+ function Ve(e, o, t) {
789
+ if (t || arguments.length === 2) for (var n = 0, r = o.length, s; n < r; n++)
790
+ (s || !(n in o)) && (s || (s = Array.prototype.slice.call(o, 0, n)), s[n] = o[n]);
791
+ return e.concat(s || Array.prototype.slice.call(o));
792
+ }
793
+ function Er(e) {
794
+ var o = /* @__PURE__ */ Object.create(null);
795
+ return function(t) {
796
+ return o[t] === void 0 && (o[t] = e(t)), o[t];
797
+ };
798
+ }
799
+ var Pr = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, Ar = /* @__PURE__ */ Er(
800
+ function(e) {
801
+ return Pr.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
802
+ }
803
+ /* Z+1 */
804
+ ), O = "-ms-", He = "-moz-", V = "-webkit-", un = "comm", ut = "rule", Ht = "decl", Nr = "@import", dn = "@keyframes", Rr = "@layer", pn = Math.abs, Ut = String.fromCharCode, Tt = Object.assign;
805
+ function Vr(e, o) {
806
+ return H(e, 0) ^ 45 ? (((o << 2 ^ H(e, 0)) << 2 ^ H(e, 1)) << 2 ^ H(e, 2)) << 2 ^ H(e, 3) : 0;
807
+ }
808
+ function fn(e) {
809
+ return e.trim();
810
+ }
811
+ function he(e, o) {
812
+ return (e = o.exec(e)) ? e[0] : e;
813
+ }
814
+ function P(e, o, t) {
815
+ return e.replace(o, t);
816
+ }
817
+ function Je(e, o, t) {
818
+ return e.indexOf(o, t);
819
+ }
820
+ function H(e, o) {
821
+ return e.charCodeAt(o) | 0;
822
+ }
823
+ function _e(e, o, t) {
824
+ return e.slice(o, t);
825
+ }
826
+ function de(e) {
827
+ return e.length;
828
+ }
829
+ function hn(e) {
830
+ return e.length;
831
+ }
832
+ function ze(e, o) {
833
+ return o.push(e), e;
834
+ }
835
+ function _r(e, o) {
836
+ return e.map(o).join("");
837
+ }
838
+ function yo(e, o) {
839
+ return e.filter(function(t) {
840
+ return !he(t, o);
841
+ });
842
+ }
843
+ var dt = 1, ke = 1, mn = 0, ie = 0, B = 0, Fe = "";
844
+ function pt(e, o, t, n, r, s, i, a) {
845
+ return { value: e, root: o, parent: t, type: n, props: r, children: s, line: dt, column: ke, length: i, return: "", siblings: a };
846
+ }
847
+ function ye(e, o) {
848
+ return Tt(pt("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, o);
849
+ }
850
+ function Ne(e) {
851
+ for (; e.root; )
852
+ e = ye(e.root, { children: [e] });
853
+ ze(e, e.siblings);
854
+ }
855
+ function kr() {
856
+ return B;
857
+ }
858
+ function Or() {
859
+ return B = ie > 0 ? H(Fe, --ie) : 0, ke--, B === 10 && (ke = 1, dt--), B;
860
+ }
861
+ function ce() {
862
+ return B = ie < mn ? H(Fe, ie++) : 0, ke++, B === 10 && (ke = 1, dt++), B;
863
+ }
864
+ function Se() {
865
+ return H(Fe, ie);
866
+ }
867
+ function Qe() {
868
+ return ie;
869
+ }
870
+ function ft(e, o) {
871
+ return _e(Fe, e, o);
872
+ }
873
+ function Et(e) {
874
+ switch (e) {
875
+ case 0:
876
+ case 9:
877
+ case 10:
878
+ case 13:
879
+ case 32:
880
+ return 5;
881
+ case 33:
882
+ case 43:
883
+ case 44:
884
+ case 47:
885
+ case 62:
886
+ case 64:
887
+ case 126:
888
+ case 59:
889
+ case 123:
890
+ case 125:
891
+ return 4;
892
+ case 58:
893
+ return 3;
894
+ case 34:
895
+ case 39:
896
+ case 40:
897
+ case 91:
898
+ return 2;
899
+ case 41:
900
+ case 93:
901
+ return 1;
902
+ }
903
+ return 0;
904
+ }
905
+ function Mr(e) {
906
+ return dt = ke = 1, mn = de(Fe = e), ie = 0, [];
907
+ }
908
+ function Dr(e) {
909
+ return Fe = "", e;
910
+ }
911
+ function bt(e) {
912
+ return fn(ft(ie - 1, Pt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
913
+ }
914
+ function Fr(e) {
915
+ for (; (B = Se()) && B < 33; )
916
+ ce();
917
+ return Et(e) > 2 || Et(B) > 3 ? "" : " ";
918
+ }
919
+ function Lr(e, o) {
920
+ for (; --o && ce() && !(B < 48 || B > 102 || B > 57 && B < 65 || B > 70 && B < 97); )
921
+ ;
922
+ return ft(e, Qe() + (o < 6 && Se() == 32 && ce() == 32));
923
+ }
924
+ function Pt(e) {
925
+ for (; ce(); )
926
+ switch (B) {
927
+ case e:
928
+ return ie;
929
+ case 34:
930
+ case 39:
931
+ e !== 34 && e !== 39 && Pt(B);
932
+ break;
933
+ case 40:
934
+ e === 41 && Pt(e);
935
+ break;
936
+ case 92:
937
+ ce();
938
+ break;
939
+ }
940
+ return ie;
941
+ }
942
+ function $r(e, o) {
943
+ for (; ce() && e + B !== 57; )
944
+ if (e + B === 84 && Se() === 47)
945
+ break;
946
+ return "/*" + ft(o, ie - 1) + "*" + Ut(e === 47 ? e : ce());
947
+ }
948
+ function Br(e) {
949
+ for (; !Et(Se()); )
950
+ ce();
951
+ return ft(e, ie);
952
+ }
953
+ function zr(e) {
954
+ return Dr(et("", null, null, null, [""], e = Mr(e), 0, [0], e));
955
+ }
956
+ function et(e, o, t, n, r, s, i, a, c) {
957
+ for (var d = 0, y = 0, g = i, h = 0, u = 0, f = 0, m = 1, S = 1, v = 1, p = 0, w = "", C = r, E = s, T = n, x = w; S; )
958
+ switch (f = p, p = ce()) {
959
+ case 40:
960
+ if (f != 108 && H(x, g - 1) == 58) {
961
+ Je(x += P(bt(p), "&", "&\f"), "&\f", pn(d ? a[d - 1] : 0)) != -1 && (v = -1);
962
+ break;
963
+ }
964
+ case 34:
965
+ case 39:
966
+ case 91:
967
+ x += bt(p);
968
+ break;
969
+ case 9:
970
+ case 10:
971
+ case 13:
972
+ case 32:
973
+ x += Fr(f);
974
+ break;
975
+ case 92:
976
+ x += Lr(Qe() - 1, 7);
977
+ continue;
978
+ case 47:
979
+ switch (Se()) {
980
+ case 42:
981
+ case 47:
982
+ ze(jr($r(ce(), Qe()), o, t, c), c);
983
+ break;
984
+ default:
985
+ x += "/";
986
+ }
987
+ break;
988
+ case 123 * m:
989
+ a[d++] = de(x) * v;
990
+ case 125 * m:
991
+ case 59:
992
+ case 0:
993
+ switch (p) {
994
+ case 0:
995
+ case 125:
996
+ S = 0;
997
+ case 59 + y:
998
+ v == -1 && (x = P(x, /\f/g, "")), u > 0 && de(x) - g && ze(u > 32 ? bo(x + ";", n, t, g - 1, c) : bo(P(x, " ", "") + ";", n, t, g - 2, c), c);
999
+ break;
1000
+ case 59:
1001
+ x += ";";
1002
+ default:
1003
+ if (ze(T = vo(x, o, t, d, y, r, a, w, C = [], E = [], g, s), s), p === 123)
1004
+ if (y === 0)
1005
+ et(x, o, T, T, C, s, g, a, E);
1006
+ else
1007
+ switch (h === 99 && H(x, 3) === 110 ? 100 : h) {
1008
+ case 100:
1009
+ case 108:
1010
+ case 109:
1011
+ case 115:
1012
+ et(e, T, T, n && ze(vo(e, T, T, 0, 0, r, a, w, r, C = [], g, E), E), r, E, g, a, n ? C : E);
1013
+ break;
1014
+ default:
1015
+ et(x, T, T, T, [""], E, 0, a, E);
1016
+ }
1017
+ }
1018
+ d = y = u = 0, m = v = 1, w = x = "", g = i;
1019
+ break;
1020
+ case 58:
1021
+ g = 1 + de(x), u = f;
1022
+ default:
1023
+ if (m < 1) {
1024
+ if (p == 123)
1025
+ --m;
1026
+ else if (p == 125 && m++ == 0 && Or() == 125)
1027
+ continue;
1028
+ }
1029
+ switch (x += Ut(p), p * m) {
1030
+ case 38:
1031
+ v = y > 0 ? 1 : (x += "\f", -1);
1032
+ break;
1033
+ case 44:
1034
+ a[d++] = (de(x) - 1) * v, v = 1;
1035
+ break;
1036
+ case 64:
1037
+ Se() === 45 && (x += bt(ce())), h = Se(), y = g = de(w = x += Br(Qe())), p++;
1038
+ break;
1039
+ case 45:
1040
+ f === 45 && de(x) == 2 && (m = 0);
1041
+ }
1042
+ }
1043
+ return s;
1044
+ }
1045
+ function vo(e, o, t, n, r, s, i, a, c, d, y, g) {
1046
+ for (var h = r - 1, u = r === 0 ? s : [""], f = hn(u), m = 0, S = 0, v = 0; m < n; ++m)
1047
+ for (var p = 0, w = _e(e, h + 1, h = pn(S = i[m])), C = e; p < f; ++p)
1048
+ (C = fn(S > 0 ? u[p] + " " + w : P(w, /&\f/g, u[p]))) && (c[v++] = C);
1049
+ return pt(e, o, t, r === 0 ? ut : a, c, d, y, g);
1050
+ }
1051
+ function jr(e, o, t, n) {
1052
+ return pt(e, o, t, un, Ut(kr()), _e(e, 2, -2), 0, n);
1053
+ }
1054
+ function bo(e, o, t, n, r) {
1055
+ return pt(e, o, t, Ht, _e(e, 0, n), _e(e, n + 1, -1), n, r);
1056
+ }
1057
+ function gn(e, o, t) {
1058
+ switch (Vr(e, o)) {
1059
+ case 5103:
1060
+ return V + "print-" + e + e;
1061
+ case 5737:
1062
+ case 4201:
1063
+ case 3177:
1064
+ case 3433:
1065
+ case 1641:
1066
+ case 4457:
1067
+ case 2921:
1068
+ case 5572:
1069
+ case 6356:
1070
+ case 5844:
1071
+ case 3191:
1072
+ case 6645:
1073
+ case 3005:
1074
+ case 6391:
1075
+ case 5879:
1076
+ case 5623:
1077
+ case 6135:
1078
+ case 4599:
1079
+ case 4855:
1080
+ case 4215:
1081
+ case 6389:
1082
+ case 5109:
1083
+ case 5365:
1084
+ case 5621:
1085
+ case 3829:
1086
+ return V + e + e;
1087
+ case 4789:
1088
+ return He + e + e;
1089
+ case 5349:
1090
+ case 4246:
1091
+ case 4810:
1092
+ case 6968:
1093
+ case 2756:
1094
+ return V + e + He + e + O + e + e;
1095
+ case 5936:
1096
+ switch (H(e, o + 11)) {
1097
+ case 114:
1098
+ return V + e + O + P(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
1099
+ case 108:
1100
+ return V + e + O + P(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
1101
+ case 45:
1102
+ return V + e + O + P(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
1103
+ }
1104
+ case 6828:
1105
+ case 4268:
1106
+ case 2903:
1107
+ return V + e + O + e + e;
1108
+ case 6165:
1109
+ return V + e + O + "flex-" + e + e;
1110
+ case 5187:
1111
+ return V + e + P(e, /(\w+).+(:[^]+)/, V + "box-$1$2" + O + "flex-$1$2") + e;
1112
+ case 5443:
1113
+ return V + e + O + "flex-item-" + P(e, /flex-|-self/g, "") + (he(e, /flex-|baseline/) ? "" : O + "grid-row-" + P(e, /flex-|-self/g, "")) + e;
1114
+ case 4675:
1115
+ return V + e + O + "flex-line-pack" + P(e, /align-content|flex-|-self/g, "") + e;
1116
+ case 5548:
1117
+ return V + e + O + P(e, "shrink", "negative") + e;
1118
+ case 5292:
1119
+ return V + e + O + P(e, "basis", "preferred-size") + e;
1120
+ case 6060:
1121
+ return V + "box-" + P(e, "-grow", "") + V + e + O + P(e, "grow", "positive") + e;
1122
+ case 4554:
1123
+ return V + P(e, /([^-])(transform)/g, "$1" + V + "$2") + e;
1124
+ case 6187:
1125
+ return P(P(P(e, /(zoom-|grab)/, V + "$1"), /(image-set)/, V + "$1"), e, "") + e;
1126
+ case 5495:
1127
+ case 3959:
1128
+ return P(e, /(image-set\([^]*)/, V + "$1$`$1");
1129
+ case 4968:
1130
+ return P(P(e, /(.+:)(flex-)?(.*)/, V + "box-pack:$3" + O + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + V + e + e;
1131
+ case 4200:
1132
+ if (!he(e, /flex-|baseline/)) return O + "grid-column-align" + _e(e, o) + e;
1133
+ break;
1134
+ case 2592:
1135
+ case 3360:
1136
+ return O + P(e, "template-", "") + e;
1137
+ case 4384:
1138
+ case 3616:
1139
+ return t && t.some(function(n, r) {
1140
+ return o = r, he(n.props, /grid-\w+-end/);
1141
+ }) ? ~Je(e + (t = t[o].value), "span", 0) ? e : O + P(e, "-start", "") + e + O + "grid-row-span:" + (~Je(t, "span", 0) ? he(t, /\d+/) : +he(t, /\d+/) - +he(e, /\d+/)) + ";" : O + P(e, "-start", "") + e;
1142
+ case 4896:
1143
+ case 4128:
1144
+ return t && t.some(function(n) {
1145
+ return he(n.props, /grid-\w+-start/);
1146
+ }) ? e : O + P(P(e, "-end", "-span"), "span ", "") + e;
1147
+ case 4095:
1148
+ case 3583:
1149
+ case 4068:
1150
+ case 2532:
1151
+ return P(e, /(.+)-inline(.+)/, V + "$1$2") + e;
1152
+ case 8116:
1153
+ case 7059:
1154
+ case 5753:
1155
+ case 5535:
1156
+ case 5445:
1157
+ case 5701:
1158
+ case 4933:
1159
+ case 4677:
1160
+ case 5533:
1161
+ case 5789:
1162
+ case 5021:
1163
+ case 4765:
1164
+ if (de(e) - 1 - o > 6)
1165
+ switch (H(e, o + 1)) {
1166
+ case 109:
1167
+ if (H(e, o + 4) !== 45)
1168
+ break;
1169
+ case 102:
1170
+ return P(e, /(.+:)(.+)-([^]+)/, "$1" + V + "$2-$3$1" + He + (H(e, o + 3) == 108 ? "$3" : "$2-$3")) + e;
1171
+ case 115:
1172
+ return ~Je(e, "stretch", 0) ? gn(P(e, "stretch", "fill-available"), o, t) + e : e;
1173
+ }
1174
+ break;
1175
+ case 5152:
1176
+ case 5920:
1177
+ return P(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(n, r, s, i, a, c, d) {
1178
+ return O + r + ":" + s + d + (i ? O + r + "-span:" + (a ? c : +c - +s) + d : "") + e;
1179
+ });
1180
+ case 4949:
1181
+ if (H(e, o + 6) === 121)
1182
+ return P(e, ":", ":" + V) + e;
1183
+ break;
1184
+ case 6444:
1185
+ switch (H(e, H(e, 14) === 45 ? 18 : 11)) {
1186
+ case 120:
1187
+ return P(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + V + (H(e, 14) === 45 ? "inline-" : "") + "box$3$1" + V + "$2$3$1" + O + "$2box$3") + e;
1188
+ case 100:
1189
+ return P(e, ":", ":" + O) + e;
1190
+ }
1191
+ break;
1192
+ case 5719:
1193
+ case 2647:
1194
+ case 2135:
1195
+ case 3927:
1196
+ case 2391:
1197
+ return P(e, "scroll-", "scroll-snap-") + e;
1198
+ }
1199
+ return e;
1200
+ }
1201
+ function nt(e, o) {
1202
+ for (var t = "", n = 0; n < e.length; n++)
1203
+ t += o(e[n], n, e, o) || "";
1204
+ return t;
1205
+ }
1206
+ function Hr(e, o, t, n) {
1207
+ switch (e.type) {
1208
+ case Rr:
1209
+ if (e.children.length) break;
1210
+ case Nr:
1211
+ case Ht:
1212
+ return e.return = e.return || e.value;
1213
+ case un:
1214
+ return "";
1215
+ case dn:
1216
+ return e.return = e.value + "{" + nt(e.children, n) + "}";
1217
+ case ut:
1218
+ if (!de(e.value = e.props.join(","))) return "";
1219
+ }
1220
+ return de(t = nt(e.children, n)) ? e.return = e.value + "{" + t + "}" : "";
1221
+ }
1222
+ function Ur(e) {
1223
+ var o = hn(e);
1224
+ return function(t, n, r, s) {
1225
+ for (var i = "", a = 0; a < o; a++)
1226
+ i += e[a](t, n, r, s) || "";
1227
+ return i;
1228
+ };
1229
+ }
1230
+ function Wr(e) {
1231
+ return function(o) {
1232
+ o.root || (o = o.return) && e(o);
1233
+ };
1234
+ }
1235
+ function Kr(e, o, t, n) {
1236
+ if (e.length > -1 && !e.return)
1237
+ switch (e.type) {
1238
+ case Ht:
1239
+ e.return = gn(e.value, e.length, t);
1240
+ return;
1241
+ case dn:
1242
+ return nt([ye(e, { value: P(e.value, "@", "@" + V) })], n);
1243
+ case ut:
1244
+ if (e.length)
1245
+ return _r(t = e.props, function(r) {
1246
+ switch (he(r, n = /(::plac\w+|:read-\w+)/)) {
1247
+ case ":read-only":
1248
+ case ":read-write":
1249
+ Ne(ye(e, { props: [P(r, /:(read-\w+)/, ":" + He + "$1")] })), Ne(ye(e, { props: [r] })), Tt(e, { props: yo(t, n) });
1250
+ break;
1251
+ case "::placeholder":
1252
+ Ne(ye(e, { props: [P(r, /:(plac\w+)/, ":" + V + "input-$1")] })), Ne(ye(e, { props: [P(r, /:(plac\w+)/, ":" + He + "$1")] })), Ne(ye(e, { props: [P(r, /:(plac\w+)/, O + "input-$1")] })), Ne(ye(e, { props: [r] })), Tt(e, { props: yo(t, n) });
1253
+ break;
1254
+ }
1255
+ return "";
1256
+ });
1257
+ }
1258
+ }
1259
+ var Gr = {
1260
+ animationIterationCount: 1,
1261
+ aspectRatio: 1,
1262
+ borderImageOutset: 1,
1263
+ borderImageSlice: 1,
1264
+ borderImageWidth: 1,
1265
+ boxFlex: 1,
1266
+ boxFlexGroup: 1,
1267
+ boxOrdinalGroup: 1,
1268
+ columnCount: 1,
1269
+ columns: 1,
1270
+ flex: 1,
1271
+ flexGrow: 1,
1272
+ flexPositive: 1,
1273
+ flexShrink: 1,
1274
+ flexNegative: 1,
1275
+ flexOrder: 1,
1276
+ gridRow: 1,
1277
+ gridRowEnd: 1,
1278
+ gridRowSpan: 1,
1279
+ gridRowStart: 1,
1280
+ gridColumn: 1,
1281
+ gridColumnEnd: 1,
1282
+ gridColumnSpan: 1,
1283
+ gridColumnStart: 1,
1284
+ msGridRow: 1,
1285
+ msGridRowSpan: 1,
1286
+ msGridColumn: 1,
1287
+ msGridColumnSpan: 1,
1288
+ fontWeight: 1,
1289
+ lineHeight: 1,
1290
+ opacity: 1,
1291
+ order: 1,
1292
+ orphans: 1,
1293
+ tabSize: 1,
1294
+ widows: 1,
1295
+ zIndex: 1,
1296
+ zoom: 1,
1297
+ WebkitLineClamp: 1,
1298
+ // SVG-related properties
1299
+ fillOpacity: 1,
1300
+ floodOpacity: 1,
1301
+ stopOpacity: 1,
1302
+ strokeDasharray: 1,
1303
+ strokeDashoffset: 1,
1304
+ strokeMiterlimit: 1,
1305
+ strokeOpacity: 1,
1306
+ strokeWidth: 1
1307
+ }, Ie = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", yn = "active", vn = "data-styled-version", ht = "6.1.11", Wt = `/*!sc*/
1308
+ `, Kt = typeof window < "u" && "HTMLElement" in window, Yr = !!(typeof SC_DISABLE_SPEEDY == "boolean" ? SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== void 0 && process.env.REACT_APP_SC_DISABLE_SPEEDY !== "" ? process.env.REACT_APP_SC_DISABLE_SPEEDY !== "false" && process.env.REACT_APP_SC_DISABLE_SPEEDY : typeof process < "u" && process.env !== void 0 && process.env.SC_DISABLE_SPEEDY !== void 0 && process.env.SC_DISABLE_SPEEDY !== "" ? process.env.SC_DISABLE_SPEEDY !== "false" && process.env.SC_DISABLE_SPEEDY : process.env.NODE_ENV !== "production"), wo = /invalid hook call/i, Ye = /* @__PURE__ */ new Set(), qr = function(e, o) {
1309
+ if (process.env.NODE_ENV !== "production") {
1310
+ var t = o ? ' with the id of "'.concat(o, '"') : "", n = "The component ".concat(e).concat(t, ` has been created dynamically.
1311
+ `) + `You may see this warning because you've called styled inside another component.
1312
+ To resolve this only create new StyledComponents outside of any render method and function component.`, r = console.error;
1313
+ try {
1314
+ var s = !0;
1315
+ console.error = function(i) {
1316
+ for (var a = [], c = 1; c < arguments.length; c++) a[c - 1] = arguments[c];
1317
+ wo.test(i) ? (s = !1, Ye.delete(n)) : r.apply(void 0, Ve([i], a, !1));
1318
+ }, Yn(), s && !Ye.has(n) && (console.warn(n), Ye.add(n));
1319
+ } catch (i) {
1320
+ wo.test(i.message) && Ye.delete(n);
1321
+ } finally {
1322
+ console.error = r;
1323
+ }
1324
+ }
1325
+ }, mt = Object.freeze([]), Oe = Object.freeze({});
1326
+ function Xr(e, o, t) {
1327
+ return t === void 0 && (t = Oe), e.theme !== t.theme && e.theme || o || t.theme;
1328
+ }
1329
+ var At = /* @__PURE__ */ new Set(["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"]), Zr = /[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g, Jr = /(^-|-$)/g;
1330
+ function So(e) {
1331
+ return e.replace(Zr, "-").replace(Jr, "");
1332
+ }
1333
+ var Qr = /(a)(d)/gi, qe = 52, xo = function(e) {
1334
+ return String.fromCharCode(e + (e > 25 ? 39 : 97));
1335
+ };
1336
+ function Nt(e) {
1337
+ var o, t = "";
1338
+ for (o = Math.abs(e); o > qe; o = o / qe | 0) t = xo(o % qe) + t;
1339
+ return (xo(o % qe) + t).replace(Qr, "$1-$2");
1340
+ }
1341
+ var wt, bn = 5381, be = function(e, o) {
1342
+ for (var t = o.length; t; ) e = 33 * e ^ o.charCodeAt(--t);
1343
+ return e;
1344
+ }, wn = function(e) {
1345
+ return be(bn, e);
1346
+ };
1347
+ function es(e) {
1348
+ return Nt(wn(e) >>> 0);
1349
+ }
1350
+ function Sn(e) {
1351
+ return process.env.NODE_ENV !== "production" && typeof e == "string" && e || e.displayName || e.name || "Component";
1352
+ }
1353
+ function St(e) {
1354
+ return typeof e == "string" && (process.env.NODE_ENV === "production" || e.charAt(0) === e.charAt(0).toLowerCase());
1355
+ }
1356
+ var xn = typeof Symbol == "function" && Symbol.for, Cn = xn ? Symbol.for("react.memo") : 60115, ts = xn ? Symbol.for("react.forward_ref") : 60112, os = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, ns = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, In = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, rs = ((wt = {})[ts] = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, wt[Cn] = In, wt);
1357
+ function Co(e) {
1358
+ return ("type" in (o = e) && o.type.$$typeof) === Cn ? In : "$$typeof" in e ? rs[e.$$typeof] : os;
1359
+ var o;
1360
+ }
1361
+ var ss = Object.defineProperty, is = Object.getOwnPropertyNames, Io = Object.getOwnPropertySymbols, as = Object.getOwnPropertyDescriptor, cs = Object.getPrototypeOf, To = Object.prototype;
1362
+ function Tn(e, o, t) {
1363
+ if (typeof o != "string") {
1364
+ if (To) {
1365
+ var n = cs(o);
1366
+ n && n !== To && Tn(e, n, t);
1367
+ }
1368
+ var r = is(o);
1369
+ Io && (r = r.concat(Io(o)));
1370
+ for (var s = Co(e), i = Co(o), a = 0; a < r.length; ++a) {
1371
+ var c = r[a];
1372
+ if (!(c in ns || t && t[c] || i && c in i || s && c in s)) {
1373
+ var d = as(o, c);
1374
+ try {
1375
+ ss(e, c, d);
1376
+ } catch {
1377
+ }
1378
+ }
1379
+ }
1380
+ }
1381
+ return e;
1382
+ }
1383
+ function Me(e) {
1384
+ return typeof e == "function";
1385
+ }
1386
+ function Gt(e) {
1387
+ return typeof e == "object" && "styledComponentId" in e;
1388
+ }
1389
+ function we(e, o) {
1390
+ return e && o ? "".concat(e, " ").concat(o) : e || o || "";
1391
+ }
1392
+ function Eo(e, o) {
1393
+ if (e.length === 0) return "";
1394
+ for (var t = e[0], n = 1; n < e.length; n++) t += e[n];
1395
+ return t;
1396
+ }
1397
+ function De(e) {
1398
+ return e !== null && typeof e == "object" && e.constructor.name === Object.name && !("props" in e && e.$$typeof);
1399
+ }
1400
+ function Rt(e, o, t) {
1401
+ if (t === void 0 && (t = !1), !t && !De(e) && !Array.isArray(e)) return o;
1402
+ if (Array.isArray(o)) for (var n = 0; n < o.length; n++) e[n] = Rt(e[n], o[n]);
1403
+ else if (De(o)) for (var n in o) e[n] = Rt(e[n], o[n]);
1404
+ return e;
1405
+ }
1406
+ function Yt(e, o) {
1407
+ Object.defineProperty(e, "toString", { value: o });
1408
+ }
1409
+ var ls = process.env.NODE_ENV !== "production" ? { 1: `Cannot create styled-component for component: %s.
1410
+
1411
+ `, 2: `Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
1412
+
1413
+ - Are you trying to reuse it across renders?
1414
+ - Are you accidentally calling collectStyles twice?
1415
+
1416
+ `, 3: `Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
1417
+
1418
+ `, 4: `The \`StyleSheetManager\` expects a valid target or sheet prop!
1419
+
1420
+ - Does this error occur on the client and is your target falsy?
1421
+ - Does this error occur on the server and is the sheet falsy?
1422
+
1423
+ `, 5: `The clone method cannot be used on the client!
1424
+
1425
+ - Are you running in a client-like environment on the server?
1426
+ - Are you trying to run SSR on the client?
1427
+
1428
+ `, 6: `Trying to insert a new style tag, but the given Node is unmounted!
1429
+
1430
+ - Are you using a custom target that isn't mounted?
1431
+ - Does your document not have a valid head element?
1432
+ - Have you accidentally removed a style tag manually?
1433
+
1434
+ `, 7: 'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n', 8: `ThemeProvider: Please make your "theme" prop an object.
1435
+
1436
+ `, 9: "Missing document `<head>`\n\n", 10: `Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021
1437
+
1438
+ `, 11: `_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.
1439
+
1440
+ `, 12: "It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n", 13: `%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.
1441
+
1442
+ `, 14: `ThemeProvider: "theme" prop is required.
1443
+
1444
+ `, 15: "A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n", 16: `Reached the limit of how many styled components may be created at group %s.
1445
+ You may only create up to 1,073,741,824 components. If you're creating components dynamically,
1446
+ as for instance in your render method then you may be running into this limitation.
1447
+
1448
+ `, 17: `CSSStyleSheet could not be found on HTMLStyleElement.
1449
+ Has styled-components' style tag been unmounted or altered by another script?
1450
+ `, 18: "ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`" } : {};
1451
+ function us() {
1452
+ for (var e = [], o = 0; o < arguments.length; o++) e[o] = arguments[o];
1453
+ for (var t = e[0], n = [], r = 1, s = e.length; r < s; r += 1) n.push(e[r]);
1454
+ return n.forEach(function(i) {
1455
+ t = t.replace(/%[a-z]/, i);
1456
+ }), t;
1457
+ }
1458
+ function Le(e) {
1459
+ for (var o = [], t = 1; t < arguments.length; t++) o[t - 1] = arguments[t];
1460
+ return process.env.NODE_ENV === "production" ? new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e, " for more information.").concat(o.length > 0 ? " Args: ".concat(o.join(", ")) : "")) : new Error(us.apply(void 0, Ve([ls[e]], o, !1)).trim());
1461
+ }
1462
+ var ds = function() {
1463
+ function e(o) {
1464
+ this.groupSizes = new Uint32Array(512), this.length = 512, this.tag = o;
1465
+ }
1466
+ return e.prototype.indexOfGroup = function(o) {
1467
+ for (var t = 0, n = 0; n < o; n++) t += this.groupSizes[n];
1468
+ return t;
1469
+ }, e.prototype.insertRules = function(o, t) {
1470
+ if (o >= this.groupSizes.length) {
1471
+ for (var n = this.groupSizes, r = n.length, s = r; o >= s; ) if ((s <<= 1) < 0) throw Le(16, "".concat(o));
1472
+ this.groupSizes = new Uint32Array(s), this.groupSizes.set(n), this.length = s;
1473
+ for (var i = r; i < s; i++) this.groupSizes[i] = 0;
1474
+ }
1475
+ for (var a = this.indexOfGroup(o + 1), c = (i = 0, t.length); i < c; i++) this.tag.insertRule(a, t[i]) && (this.groupSizes[o]++, a++);
1476
+ }, e.prototype.clearGroup = function(o) {
1477
+ if (o < this.length) {
1478
+ var t = this.groupSizes[o], n = this.indexOfGroup(o), r = n + t;
1479
+ this.groupSizes[o] = 0;
1480
+ for (var s = n; s < r; s++) this.tag.deleteRule(n);
1481
+ }
1482
+ }, e.prototype.getGroup = function(o) {
1483
+ var t = "";
1484
+ if (o >= this.length || this.groupSizes[o] === 0) return t;
1485
+ for (var n = this.groupSizes[o], r = this.indexOfGroup(o), s = r + n, i = r; i < s; i++) t += "".concat(this.tag.getRule(i)).concat(Wt);
1486
+ return t;
1487
+ }, e;
1488
+ }(), ps = 1 << 30, tt = /* @__PURE__ */ new Map(), rt = /* @__PURE__ */ new Map(), ot = 1, Xe = function(e) {
1489
+ if (tt.has(e)) return tt.get(e);
1490
+ for (; rt.has(ot); ) ot++;
1491
+ var o = ot++;
1492
+ if (process.env.NODE_ENV !== "production" && ((0 | o) < 0 || o > ps)) throw Le(16, "".concat(o));
1493
+ return tt.set(e, o), rt.set(o, e), o;
1494
+ }, fs = function(e, o) {
1495
+ ot = o + 1, tt.set(e, o), rt.set(o, e);
1496
+ }, hs = "style[".concat(Ie, "][").concat(vn, '="').concat(ht, '"]'), ms = new RegExp("^".concat(Ie, '\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')), gs = function(e, o, t) {
1497
+ for (var n, r = t.split(","), s = 0, i = r.length; s < i; s++) (n = r[s]) && e.registerName(o, n);
1498
+ }, ys = function(e, o) {
1499
+ for (var t, n = ((t = o.textContent) !== null && t !== void 0 ? t : "").split(Wt), r = [], s = 0, i = n.length; s < i; s++) {
1500
+ var a = n[s].trim();
1501
+ if (a) {
1502
+ var c = a.match(ms);
1503
+ if (c) {
1504
+ var d = 0 | parseInt(c[1], 10), y = c[2];
1505
+ d !== 0 && (fs(y, d), gs(e, y, c[3]), e.getTag().insertRules(d, r)), r.length = 0;
1506
+ } else r.push(a);
1507
+ }
1508
+ }
1509
+ };
1510
+ function vs() {
1511
+ return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : null;
1512
+ }
1513
+ var En = function(e) {
1514
+ var o = document.head, t = e || o, n = document.createElement("style"), r = function(a) {
1515
+ var c = Array.from(a.querySelectorAll("style[".concat(Ie, "]")));
1516
+ return c[c.length - 1];
1517
+ }(t), s = r !== void 0 ? r.nextSibling : null;
1518
+ n.setAttribute(Ie, yn), n.setAttribute(vn, ht);
1519
+ var i = vs();
1520
+ return i && n.setAttribute("nonce", i), t.insertBefore(n, s), n;
1521
+ }, bs = function() {
1522
+ function e(o) {
1523
+ this.element = En(o), this.element.appendChild(document.createTextNode("")), this.sheet = function(t) {
1524
+ if (t.sheet) return t.sheet;
1525
+ for (var n = document.styleSheets, r = 0, s = n.length; r < s; r++) {
1526
+ var i = n[r];
1527
+ if (i.ownerNode === t) return i;
1528
+ }
1529
+ throw Le(17);
1530
+ }(this.element), this.length = 0;
1531
+ }
1532
+ return e.prototype.insertRule = function(o, t) {
1533
+ try {
1534
+ return this.sheet.insertRule(t, o), this.length++, !0;
1535
+ } catch {
1536
+ return !1;
1537
+ }
1538
+ }, e.prototype.deleteRule = function(o) {
1539
+ this.sheet.deleteRule(o), this.length--;
1540
+ }, e.prototype.getRule = function(o) {
1541
+ var t = this.sheet.cssRules[o];
1542
+ return t && t.cssText ? t.cssText : "";
1543
+ }, e;
1544
+ }(), ws = function() {
1545
+ function e(o) {
1546
+ this.element = En(o), this.nodes = this.element.childNodes, this.length = 0;
1547
+ }
1548
+ return e.prototype.insertRule = function(o, t) {
1549
+ if (o <= this.length && o >= 0) {
1550
+ var n = document.createTextNode(t);
1551
+ return this.element.insertBefore(n, this.nodes[o] || null), this.length++, !0;
1552
+ }
1553
+ return !1;
1554
+ }, e.prototype.deleteRule = function(o) {
1555
+ this.element.removeChild(this.nodes[o]), this.length--;
1556
+ }, e.prototype.getRule = function(o) {
1557
+ return o < this.length ? this.nodes[o].textContent : "";
1558
+ }, e;
1559
+ }(), Ss = function() {
1560
+ function e(o) {
1561
+ this.rules = [], this.length = 0;
1562
+ }
1563
+ return e.prototype.insertRule = function(o, t) {
1564
+ return o <= this.length && (this.rules.splice(o, 0, t), this.length++, !0);
1565
+ }, e.prototype.deleteRule = function(o) {
1566
+ this.rules.splice(o, 1), this.length--;
1567
+ }, e.prototype.getRule = function(o) {
1568
+ return o < this.length ? this.rules[o] : "";
1569
+ }, e;
1570
+ }(), Po = Kt, xs = { isServer: !Kt, useCSSOMInjection: !Yr }, Pn = function() {
1571
+ function e(o, t, n) {
1572
+ o === void 0 && (o = Oe), t === void 0 && (t = {});
1573
+ var r = this;
1574
+ this.options = X(X({}, xs), o), this.gs = t, this.names = new Map(n), this.server = !!o.isServer, !this.server && Kt && Po && (Po = !1, function(s) {
1575
+ for (var i = document.querySelectorAll(hs), a = 0, c = i.length; a < c; a++) {
1576
+ var d = i[a];
1577
+ d && d.getAttribute(Ie) !== yn && (ys(s, d), d.parentNode && d.parentNode.removeChild(d));
1578
+ }
1579
+ }(this)), Yt(this, function() {
1580
+ return function(s) {
1581
+ for (var i = s.getTag(), a = i.length, c = "", d = function(g) {
1582
+ var h = function(v) {
1583
+ return rt.get(v);
1584
+ }(g);
1585
+ if (h === void 0) return "continue";
1586
+ var u = s.names.get(h), f = i.getGroup(g);
1587
+ if (u === void 0 || f.length === 0) return "continue";
1588
+ var m = "".concat(Ie, ".g").concat(g, '[id="').concat(h, '"]'), S = "";
1589
+ u !== void 0 && u.forEach(function(v) {
1590
+ v.length > 0 && (S += "".concat(v, ","));
1591
+ }), c += "".concat(f).concat(m, '{content:"').concat(S, '"}').concat(Wt);
1592
+ }, y = 0; y < a; y++) d(y);
1593
+ return c;
1594
+ }(r);
1595
+ });
1596
+ }
1597
+ return e.registerId = function(o) {
1598
+ return Xe(o);
1599
+ }, e.prototype.reconstructWithOptions = function(o, t) {
1600
+ return t === void 0 && (t = !0), new e(X(X({}, this.options), o), this.gs, t && this.names || void 0);
1601
+ }, e.prototype.allocateGSInstance = function(o) {
1602
+ return this.gs[o] = (this.gs[o] || 0) + 1;
1603
+ }, e.prototype.getTag = function() {
1604
+ return this.tag || (this.tag = (o = function(t) {
1605
+ var n = t.useCSSOMInjection, r = t.target;
1606
+ return t.isServer ? new Ss(r) : n ? new bs(r) : new ws(r);
1607
+ }(this.options), new ds(o)));
1608
+ var o;
1609
+ }, e.prototype.hasNameForId = function(o, t) {
1610
+ return this.names.has(o) && this.names.get(o).has(t);
1611
+ }, e.prototype.registerName = function(o, t) {
1612
+ if (Xe(o), this.names.has(o)) this.names.get(o).add(t);
1613
+ else {
1614
+ var n = /* @__PURE__ */ new Set();
1615
+ n.add(t), this.names.set(o, n);
1616
+ }
1617
+ }, e.prototype.insertRules = function(o, t, n) {
1618
+ this.registerName(o, t), this.getTag().insertRules(Xe(o), n);
1619
+ }, e.prototype.clearNames = function(o) {
1620
+ this.names.has(o) && this.names.get(o).clear();
1621
+ }, e.prototype.clearRules = function(o) {
1622
+ this.getTag().clearGroup(Xe(o)), this.clearNames(o);
1623
+ }, e.prototype.clearTag = function() {
1624
+ this.tag = void 0;
1625
+ }, e;
1626
+ }(), Cs = /&/g, Is = /^\s*\/\/.*$/gm;
1627
+ function An(e, o) {
1628
+ return e.map(function(t) {
1629
+ return t.type === "rule" && (t.value = "".concat(o, " ").concat(t.value), t.value = t.value.replaceAll(",", ",".concat(o, " ")), t.props = t.props.map(function(n) {
1630
+ return "".concat(o, " ").concat(n);
1631
+ })), Array.isArray(t.children) && t.type !== "@keyframes" && (t.children = An(t.children, o)), t;
1632
+ });
1633
+ }
1634
+ function Ts(e) {
1635
+ var o, t, n, r = Oe, s = r.options, i = s === void 0 ? Oe : s, a = r.plugins, c = a === void 0 ? mt : a, d = function(h, u, f) {
1636
+ return f.startsWith(t) && f.endsWith(t) && f.replaceAll(t, "").length > 0 ? ".".concat(o) : h;
1637
+ }, y = c.slice();
1638
+ y.push(function(h) {
1639
+ h.type === ut && h.value.includes("&") && (h.props[0] = h.props[0].replace(Cs, t).replace(n, d));
1640
+ }), i.prefix && y.push(Kr), y.push(Hr);
1641
+ var g = function(h, u, f, m) {
1642
+ u === void 0 && (u = ""), f === void 0 && (f = ""), m === void 0 && (m = "&"), o = m, t = u, n = new RegExp("\\".concat(t, "\\b"), "g");
1643
+ var S = h.replace(Is, ""), v = zr(f || u ? "".concat(f, " ").concat(u, " { ").concat(S, " }") : S);
1644
+ i.namespace && (v = An(v, i.namespace));
1645
+ var p = [];
1646
+ return nt(v, Ur(y.concat(Wr(function(w) {
1647
+ return p.push(w);
1648
+ })))), p;
1649
+ };
1650
+ return g.hash = c.length ? c.reduce(function(h, u) {
1651
+ return u.name || Le(15), be(h, u.name);
1652
+ }, bn).toString() : "", g;
1653
+ }
1654
+ var Es = new Pn(), Vt = Ts(), Nn = Ue.createContext({ shouldForwardProp: void 0, styleSheet: Es, stylis: Vt });
1655
+ Nn.Consumer;
1656
+ Ue.createContext(void 0);
1657
+ function Ao() {
1658
+ return qn(Nn);
1659
+ }
1660
+ var No = function() {
1661
+ function e(o, t) {
1662
+ var n = this;
1663
+ this.inject = function(r, s) {
1664
+ s === void 0 && (s = Vt);
1665
+ var i = n.name + s.hash;
1666
+ r.hasNameForId(n.id, i) || r.insertRules(n.id, i, s(n.rules, i, "@keyframes"));
1667
+ }, this.name = o, this.id = "sc-keyframes-".concat(o), this.rules = t, Yt(this, function() {
1668
+ throw Le(12, String(n.name));
1669
+ });
1670
+ }
1671
+ return e.prototype.getName = function(o) {
1672
+ return o === void 0 && (o = Vt), this.name + o.hash;
1673
+ }, e;
1674
+ }(), Ps = function(e) {
1675
+ return e >= "A" && e <= "Z";
1676
+ };
1677
+ function Ro(e) {
1678
+ for (var o = "", t = 0; t < e.length; t++) {
1679
+ var n = e[t];
1680
+ if (t === 1 && n === "-" && e[0] === "-") return e;
1681
+ Ps(n) ? o += "-" + n.toLowerCase() : o += n;
1682
+ }
1683
+ return o.startsWith("ms-") ? "-" + o : o;
1684
+ }
1685
+ var Rn = function(e) {
1686
+ return e == null || e === !1 || e === "";
1687
+ }, Vn = function(e) {
1688
+ var o, t, n = [];
1689
+ for (var r in e) {
1690
+ var s = e[r];
1691
+ e.hasOwnProperty(r) && !Rn(s) && (Array.isArray(s) && s.isCss || Me(s) ? n.push("".concat(Ro(r), ":"), s, ";") : De(s) ? n.push.apply(n, Ve(Ve(["".concat(r, " {")], Vn(s), !1), ["}"], !1)) : n.push("".concat(Ro(r), ": ").concat((o = r, (t = s) == null || typeof t == "boolean" || t === "" ? "" : typeof t != "number" || t === 0 || o in Gr || o.startsWith("--") ? String(t).trim() : "".concat(t, "px")), ";")));
1692
+ }
1693
+ return n;
1694
+ };
1695
+ function xe(e, o, t, n) {
1696
+ if (Rn(e)) return [];
1697
+ if (Gt(e)) return [".".concat(e.styledComponentId)];
1698
+ if (Me(e)) {
1699
+ if (!Me(s = e) || s.prototype && s.prototype.isReactComponent || !o) return [e];
1700
+ var r = e(o);
1701
+ return process.env.NODE_ENV === "production" || typeof r != "object" || Array.isArray(r) || r instanceof No || De(r) || r === null || console.error("".concat(Sn(e), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")), xe(r, o, t, n);
1702
+ }
1703
+ var s;
1704
+ return e instanceof No ? t ? (e.inject(t, n), [e.getName(n)]) : [e] : De(e) ? Vn(e) : Array.isArray(e) ? Array.prototype.concat.apply(mt, e.map(function(i) {
1705
+ return xe(i, o, t, n);
1706
+ })) : [e.toString()];
1707
+ }
1708
+ function As(e) {
1709
+ for (var o = 0; o < e.length; o += 1) {
1710
+ var t = e[o];
1711
+ if (Me(t) && !Gt(t)) return !1;
1712
+ }
1713
+ return !0;
1714
+ }
1715
+ var Ns = wn(ht), Rs = function() {
1716
+ function e(o, t, n) {
1717
+ this.rules = o, this.staticRulesId = "", this.isStatic = process.env.NODE_ENV === "production" && (n === void 0 || n.isStatic) && As(o), this.componentId = t, this.baseHash = be(Ns, t), this.baseStyle = n, Pn.registerId(t);
1718
+ }
1719
+ return e.prototype.generateAndInjectStyles = function(o, t, n) {
1720
+ var r = this.baseStyle ? this.baseStyle.generateAndInjectStyles(o, t, n) : "";
1721
+ if (this.isStatic && !n.hash) if (this.staticRulesId && t.hasNameForId(this.componentId, this.staticRulesId)) r = we(r, this.staticRulesId);
1722
+ else {
1723
+ var s = Eo(xe(this.rules, o, t, n)), i = Nt(be(this.baseHash, s) >>> 0);
1724
+ if (!t.hasNameForId(this.componentId, i)) {
1725
+ var a = n(s, ".".concat(i), void 0, this.componentId);
1726
+ t.insertRules(this.componentId, i, a);
1727
+ }
1728
+ r = we(r, i), this.staticRulesId = i;
1729
+ }
1730
+ else {
1731
+ for (var c = be(this.baseHash, n.hash), d = "", y = 0; y < this.rules.length; y++) {
1732
+ var g = this.rules[y];
1733
+ if (typeof g == "string") d += g, process.env.NODE_ENV !== "production" && (c = be(c, g));
1734
+ else if (g) {
1735
+ var h = Eo(xe(g, o, t, n));
1736
+ c = be(c, h + y), d += h;
1737
+ }
1738
+ }
1739
+ if (d) {
1740
+ var u = Nt(c >>> 0);
1741
+ t.hasNameForId(this.componentId, u) || t.insertRules(this.componentId, u, n(d, ".".concat(u), void 0, this.componentId)), r = we(r, u);
1742
+ }
1743
+ }
1744
+ return r;
1745
+ }, e;
1746
+ }(), _n = Ue.createContext(void 0);
1747
+ _n.Consumer;
1748
+ var xt = {}, Vo = /* @__PURE__ */ new Set();
1749
+ function Vs(e, o, t) {
1750
+ var n = Gt(e), r = e, s = !St(e), i = o.attrs, a = i === void 0 ? mt : i, c = o.componentId, d = c === void 0 ? function(C, E) {
1751
+ var T = typeof C != "string" ? "sc" : So(C);
1752
+ xt[T] = (xt[T] || 0) + 1;
1753
+ var x = "".concat(T, "-").concat(es(ht + T + xt[T]));
1754
+ return E ? "".concat(E, "-").concat(x) : x;
1755
+ }(o.displayName, o.parentComponentId) : c, y = o.displayName, g = y === void 0 ? function(C) {
1756
+ return St(C) ? "styled.".concat(C) : "Styled(".concat(Sn(C), ")");
1757
+ }(e) : y, h = o.displayName && o.componentId ? "".concat(So(o.displayName), "-").concat(o.componentId) : o.componentId || d, u = n && r.attrs ? r.attrs.concat(a).filter(Boolean) : a, f = o.shouldForwardProp;
1758
+ if (n && r.shouldForwardProp) {
1759
+ var m = r.shouldForwardProp;
1760
+ if (o.shouldForwardProp) {
1761
+ var S = o.shouldForwardProp;
1762
+ f = function(C, E) {
1763
+ return m(C, E) && S(C, E);
1764
+ };
1765
+ } else f = m;
1766
+ }
1767
+ var v = new Rs(t, h, n ? r.componentStyle : void 0);
1768
+ function p(C, E) {
1769
+ return function(T, x, D) {
1770
+ var W = T.attrs, G = T.componentStyle, oe = T.defaultProps, L = T.foldedComponentIds, Y = T.styledComponentId, K = T.target, Z = Ue.useContext(_n), le = Ao(), ne = T.shouldForwardProp || le.shouldForwardProp;
1771
+ process.env.NODE_ENV !== "production" && ho(Y);
1772
+ var J = Xr(x, Z, oe) || Oe, $ = function(ae, Q, I) {
1773
+ for (var N, k = X(X({}, Q), { className: void 0, theme: I }), _ = 0; _ < ae.length; _ += 1) {
1774
+ var R = Me(N = ae[_]) ? N(k) : N;
1775
+ for (var A in R) k[A] = A === "className" ? we(k[A], R[A]) : A === "style" ? X(X({}, k[A]), R[A]) : R[A];
1776
+ }
1777
+ return Q.className && (k.className = we(k.className, Q.className)), k;
1778
+ }(W, x, J), re = $.as || K, q = {};
1779
+ for (var j in $) $[j] === void 0 || j[0] === "$" || j === "as" || j === "theme" && $.theme === J || (j === "forwardedAs" ? q.as = $.forwardedAs : ne && !ne(j, re) || (q[j] = $[j], ne || process.env.NODE_ENV !== "development" || Ar(j) || Vo.has(j) || !At.has(re) || (Vo.add(j), console.warn('styled-components: it looks like an unknown prop "'.concat(j, '" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));
1780
+ var fe = function(ae, Q) {
1781
+ var I = Ao(), N = ae.generateAndInjectStyles(Q, I.styleSheet, I.stylis);
1782
+ return process.env.NODE_ENV !== "production" && ho(N), N;
1783
+ }(G, $);
1784
+ process.env.NODE_ENV !== "production" && T.warnTooManyClasses && T.warnTooManyClasses(fe);
1785
+ var se = we(L, Y);
1786
+ return fe && (se += " " + fe), $.className && (se += " " + $.className), q[St(re) && !At.has(re) ? "class" : "className"] = se, q.ref = D, Gn(re, q);
1787
+ }(w, C, E);
1788
+ }
1789
+ p.displayName = g;
1790
+ var w = Ue.forwardRef(p);
1791
+ return w.attrs = u, w.componentStyle = v, w.displayName = g, w.shouldForwardProp = f, w.foldedComponentIds = n ? we(r.foldedComponentIds, r.styledComponentId) : "", w.styledComponentId = h, w.target = n ? r.target : e, Object.defineProperty(w, "defaultProps", { get: function() {
1792
+ return this._foldedDefaultProps;
1793
+ }, set: function(C) {
1794
+ this._foldedDefaultProps = n ? function(E) {
1795
+ for (var T = [], x = 1; x < arguments.length; x++) T[x - 1] = arguments[x];
1796
+ for (var D = 0, W = T; D < W.length; D++) Rt(E, W[D], !0);
1797
+ return E;
1798
+ }({}, r.defaultProps, C) : C;
1799
+ } }), process.env.NODE_ENV !== "production" && (qr(g, h), w.warnTooManyClasses = /* @__PURE__ */ function(C, E) {
1800
+ var T = {}, x = !1;
1801
+ return function(D) {
1802
+ if (!x && (T[D] = !0, Object.keys(T).length >= 200)) {
1803
+ var W = E ? ' with the id of "'.concat(E, '"') : "";
1804
+ console.warn("Over ".concat(200, " classes were generated for component ").concat(C).concat(W, `.
1805
+ `) + `Consider using the attrs method, together with a style object for frequently changed styles.
1806
+ Example:
1807
+ const Component = styled.div.attrs(props => ({
1808
+ style: {
1809
+ background: props.background,
1810
+ },
1811
+ }))\`width: 100%;\`
1812
+
1813
+ <Component />`), x = !0, T = {};
1814
+ }
1815
+ };
1816
+ }(g, h)), Yt(w, function() {
1817
+ return ".".concat(w.styledComponentId);
1818
+ }), s && Tn(w, e, { attrs: !0, componentStyle: !0, displayName: !0, foldedComponentIds: !0, shouldForwardProp: !0, styledComponentId: !0, target: !0 }), w;
1819
+ }
1820
+ function _o(e, o) {
1821
+ for (var t = [e[0]], n = 0, r = o.length; n < r; n += 1) t.push(o[n], e[n + 1]);
1822
+ return t;
1823
+ }
1824
+ var ko = function(e) {
1825
+ return Object.assign(e, { isCss: !0 });
1826
+ };
1827
+ function _s(e) {
1828
+ for (var o = [], t = 1; t < arguments.length; t++) o[t - 1] = arguments[t];
1829
+ if (Me(e) || De(e)) return ko(xe(_o(mt, Ve([e], o, !0))));
1830
+ var n = e;
1831
+ return o.length === 0 && n.length === 1 && typeof n[0] == "string" ? xe(n) : ko(xe(_o(n, o)));
1832
+ }
1833
+ function _t(e, o, t) {
1834
+ if (t === void 0 && (t = Oe), !o) throw Le(1, o);
1835
+ var n = function(r) {
1836
+ for (var s = [], i = 1; i < arguments.length; i++) s[i - 1] = arguments[i];
1837
+ return e(o, t, _s.apply(void 0, Ve([r], s, !1)));
1838
+ };
1839
+ return n.attrs = function(r) {
1840
+ return _t(e, o, X(X({}, t), { attrs: Array.prototype.concat(t.attrs, r).filter(Boolean) }));
1841
+ }, n.withConfig = function(r) {
1842
+ return _t(e, o, X(X({}, t), r));
1843
+ }, n;
1844
+ }
1845
+ var kn = function(e) {
1846
+ return _t(Vs, e);
1847
+ }, On = kn;
1848
+ At.forEach(function(e) {
1849
+ On[e] = kn(e);
1850
+ });
1851
+ process.env.NODE_ENV !== "production" && typeof navigator < "u" && navigator.product === "ReactNative" && console.warn(`It looks like you've imported 'styled-components' on React Native.
1852
+ Perhaps you're looking to import 'styled-components/native'?
1853
+ Read more about this at https://www.styled-components.com/docs/basics#react-native`);
1854
+ var Ze = "__sc-".concat(Ie, "__");
1855
+ process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof window < "u" && (window[Ze] || (window[Ze] = 0), window[Ze] === 1 && console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
1856
+
1857
+ See https://s-c.sh/2BAXzed for more info.`), window[Ze] += 1);
1858
+ function ks(e) {
1859
+ const o = l.useRef(e);
1860
+ return l.useEffect(() => {
1861
+ o.current = e;
1862
+ }), l.useMemo(() => (...t) => {
1863
+ var n;
1864
+ return (n = o.current) == null ? void 0 : n.call(o, ...t);
785
1865
  }, []);
786
1866
  }
787
- const To = [" ", "Enter", "ArrowUp", "ArrowDown"], Vo = [" ", "Enter"], Ce = "Select", [Te, ve, Po] = Yt(Ce), [pe, Eo] = st(Ce, [
788
- Po,
789
- dt
790
- ]), Ve = dt(), [No, X] = pe(Ce), [Ro, Ao] = pe(Ce), $e = (o) => {
1867
+ const Os = [" ", "Enter", "ArrowUp", "ArrowDown"], Ms = [" ", "Enter"], Ke = "Select", [gt, Ge, Ds] = Zn(Ke), [$e, Fs] = Oo(Ke, [
1868
+ Ds,
1869
+ $o
1870
+ ]), yt = $o(), [Ls, ge] = $e(Ke), [$s, Bs] = $e(Ke), qt = (e) => {
791
1871
  const {
792
- __scopeSelect: i,
793
- children: e,
794
- open: t,
795
- defaultOpen: n,
796
- onOpenChange: r,
797
- value: c,
798
- defaultValue: l,
799
- onValueChange: a,
800
- dir: m,
1872
+ __scopeSelect: o,
1873
+ children: t,
1874
+ open: n,
1875
+ defaultOpen: r,
1876
+ onOpenChange: s,
1877
+ value: i,
1878
+ defaultValue: a,
1879
+ onValueChange: c,
1880
+ dir: d,
801
1881
  // name,
802
1882
  // autoComplete,
803
- disabled: C,
804
- required: v,
805
- multi: g = !1
806
- } = o, u = Ve(i), [f, h] = s.useState(null), [b, x] = s.useState(null), [p, y] = s.useState(!1), E = qt(m), [O = !1, F] = de({
807
- prop: t,
808
- defaultProp: n,
809
- onChange: r
810
- }), [_, k] = de({
811
- prop: c,
812
- defaultProp: l,
813
- onChange(R) {
814
- a && (Array.isArray(R), a(R));
1883
+ disabled: y,
1884
+ required: g,
1885
+ multi: h = !1
1886
+ } = e, u = yt(o), [f, m] = l.useState(null), [S, v] = l.useState(null), [p, w] = l.useState(!1), C = Jn(d), [E = !1, T] = Re({
1887
+ prop: n,
1888
+ defaultProp: r,
1889
+ onChange: s
1890
+ }), [x, D] = Re({
1891
+ prop: i,
1892
+ defaultProp: a,
1893
+ onChange(L) {
1894
+ c && (Array.isArray(L), c(L));
815
1895
  }
816
- }), Z = s.useRef(null), [U, z] = s.useState(/* @__PURE__ */ new Set());
817
- return /* @__PURE__ */ d(ie.Root, { ...u, children: /* @__PURE__ */ d(
818
- No,
1896
+ }), W = l.useRef(null), [G, oe] = l.useState(/* @__PURE__ */ new Set());
1897
+ return /* @__PURE__ */ b(Pe.Root, { ...u, children: /* @__PURE__ */ b(
1898
+ Ls,
819
1899
  {
820
- required: v,
821
- scope: i,
1900
+ required: g,
1901
+ scope: o,
822
1902
  trigger: f,
823
- onTriggerChange: h,
824
- valueNode: b,
825
- onValueNodeChange: x,
1903
+ onTriggerChange: m,
1904
+ valueNode: S,
1905
+ onValueNodeChange: v,
826
1906
  valueNodeHasChildren: p,
827
- onValueNodeHasChildrenChange: y,
828
- contentId: se(),
829
- value: _,
830
- onValueChange: k,
831
- open: O,
832
- onOpenChange: F,
833
- dir: E,
834
- triggerPointerDownPosRef: Z,
835
- disabled: C,
836
- multi: g,
837
- children: /* @__PURE__ */ d(Te.Provider, { scope: i, children: /* @__PURE__ */ d(
838
- Ro,
1907
+ onValueNodeHasChildrenChange: w,
1908
+ contentId: Ee(),
1909
+ value: x,
1910
+ onValueChange: D,
1911
+ open: E,
1912
+ onOpenChange: T,
1913
+ dir: C,
1914
+ triggerPointerDownPosRef: W,
1915
+ disabled: y,
1916
+ multi: h,
1917
+ children: /* @__PURE__ */ b(gt.Provider, { scope: o, children: /* @__PURE__ */ b(
1918
+ $s,
839
1919
  {
840
- scope: o.__scopeSelect,
841
- onNativeOptionAdd: s.useCallback((R) => {
842
- z((H) => new Set(H).add(R));
1920
+ scope: e.__scopeSelect,
1921
+ onNativeOptionAdd: l.useCallback((L) => {
1922
+ oe((Y) => new Set(Y).add(L));
843
1923
  }, []),
844
- onNativeOptionRemove: s.useCallback((R) => {
845
- z((H) => {
846
- const L = new Set(H);
847
- return L.delete(R), L;
1924
+ onNativeOptionRemove: l.useCallback((L) => {
1925
+ oe((Y) => {
1926
+ const K = new Set(Y);
1927
+ return K.delete(L), K;
848
1928
  });
849
1929
  }, []),
850
- children: e
1930
+ children: t
851
1931
  }
852
1932
  ) })
853
1933
  }
854
1934
  ) });
855
1935
  };
856
- $e.displayName = Ce;
857
- const Dt = "SelectTrigger", Ue = s.forwardRef(
858
- (o, i) => {
859
- const { __scopeSelect: e, ...t } = o, n = Ve(e), r = X(Dt, e), c = r.disabled, l = A(i, r.onTriggerChange), a = ve(e), [m, C, v] = zt((u) => {
860
- const f = a().filter((x) => !x.disabled), h = f.find((x) => x.value === r.value), b = Kt(f, u, h);
861
- if (b !== void 0 && !Array.isArray(b.value)) {
862
- const x = r.multi ? [b.value] : b.value;
863
- r.onValueChange(x);
1936
+ qt.displayName = Ke;
1937
+ const Mn = "SelectTrigger", Xt = l.forwardRef(
1938
+ (e, o) => {
1939
+ const { __scopeSelect: t, ...n } = e, r = yt(t), s = ge(Mn, t), i = s.disabled, a = z(o, s.onTriggerChange), c = Ge(t), [d, y, g] = Un((u) => {
1940
+ const f = c().filter((v) => !v.disabled), m = f.find((v) => v.value === s.value), S = Wn(f, u, m);
1941
+ if (S !== void 0 && !Array.isArray(S.value)) {
1942
+ const v = s.multi ? [S.value] : S.value;
1943
+ s.onValueChange(v);
864
1944
  }
865
- }), g = () => {
866
- c || (r.onOpenChange(!0), v());
1945
+ }), h = () => {
1946
+ i || (s.onOpenChange(!0), g());
867
1947
  };
868
- return /* @__PURE__ */ d(ie.Anchor, { asChild: !0, ...n, children: /* @__PURE__ */ d(
869
- N.div,
1948
+ return /* @__PURE__ */ b(Pe.Anchor, { asChild: !0, ...r, children: /* @__PURE__ */ b(
1949
+ F.div,
870
1950
  {
871
1951
  role: "combobox",
872
- "aria-controls": r.contentId,
873
- "aria-expanded": r.open,
874
- "aria-required": r.required,
1952
+ "aria-controls": s.contentId,
1953
+ "aria-expanded": s.open,
1954
+ "aria-required": s.required,
875
1955
  "aria-autocomplete": "none",
876
- dir: r.dir,
877
- "data-state": r.open ? "open" : "closed",
878
- "data-disabled": c ? "" : void 0,
879
- "data-placeholder": r.value === void 0 ? "" : void 0,
880
- tabIndex: c ? void 0 : 0,
881
- ...t,
882
- ref: l,
883
- onClick: P(t.onClick, (u) => {
1956
+ dir: s.dir,
1957
+ "data-state": s.open ? "open" : "closed",
1958
+ "data-disabled": i ? "" : void 0,
1959
+ "data-placeholder": s.value === void 0 ? "" : void 0,
1960
+ tabIndex: i ? void 0 : 0,
1961
+ ...n,
1962
+ ref: a,
1963
+ onClick: M(n.onClick, (u) => {
884
1964
  u.currentTarget.focus();
885
1965
  }),
886
- onPointerDown: P(t.onPointerDown, (u) => {
1966
+ onPointerDown: M(n.onPointerDown, (u) => {
887
1967
  const f = u.target;
888
- f.hasPointerCapture(u.pointerId) && f.releasePointerCapture(u.pointerId), (f.closest("button") ?? f.closest("div")) === u.currentTarget && u.button === 0 && u.ctrlKey === !1 && (g(), r.triggerPointerDownPosRef.current = {
1968
+ f.hasPointerCapture(u.pointerId) && f.releasePointerCapture(u.pointerId), (f.closest("button") ?? f.closest("div")) === u.currentTarget && u.button === 0 && u.ctrlKey === !1 && (h(), s.triggerPointerDownPosRef.current = {
889
1969
  x: Math.round(u.pageX),
890
1970
  y: Math.round(u.pageY)
891
1971
  }, u.preventDefault());
892
1972
  }),
893
- onKeyDown: P(t.onKeyDown, (u) => {
894
- const f = m.current !== "", h = u.ctrlKey || u.altKey || u.metaKey, b = u.target;
895
- (b.closest("button") ?? b.closest("div")) === u.currentTarget && (!h && u.key.length === 1 && C(u.key), !(f && u.key === " ") && To.includes(u.key) && (g(), u.preventDefault()));
1973
+ onKeyDown: M(n.onKeyDown, (u) => {
1974
+ const f = d.current !== "", m = u.ctrlKey || u.altKey || u.metaKey, S = u.target;
1975
+ (S.closest("button") ?? S.closest("div")) === u.currentTarget && (!m && u.key.length === 1 && y(u.key), !(f && u.key === " ") && Os.includes(u.key) && (h(), u.preventDefault()));
896
1976
  })
897
1977
  }
898
1978
  ) });
899
1979
  }
900
1980
  );
901
- Ue.displayName = Dt;
902
- const kt = "SelectValue", He = s.forwardRef(
903
- (o, i) => {
904
- const { __scopeSelect: e, children: t, placeholder: n, ...r } = o, c = X(kt, e), { onValueNodeHasChildrenChange: l } = c, a = t !== void 0, m = A(i, c.onValueNodeChange), [C, v] = s.useState([]), g = ve(e);
905
- $(() => {
906
- l(a);
907
- }, [l, a]), s.useLayoutEffect(() => {
908
- if (Array.isArray(c.value) && C.length !== c.value.length) {
909
- const f = setTimeout(() => {
910
- const h = g().filter(
911
- (b) => {
912
- var x;
913
- return Array.isArray(b.value) ? !1 : (x = c.value) == null ? void 0 : x.includes(b.value);
914
- }
915
- );
916
- v(h);
917
- });
918
- return () => {
919
- clearTimeout(f);
920
- };
1981
+ Xt.displayName = Mn;
1982
+ const Dn = "SelectValue", Zt = l.forwardRef(
1983
+ (e, o) => {
1984
+ const { __scopeSelect: t, children: n, placeholder: r, ...s } = e, i = ge(Dn, t), { onValueNodeHasChildrenChange: a } = i, c = n !== void 0, d = z(o, i.onValueNodeChange), [y, g] = l.useState([]), h = Ge(t);
1985
+ te(() => {
1986
+ a(c);
1987
+ }, [a, c]), l.useLayoutEffect(() => {
1988
+ if (Array.isArray(i.value)) {
1989
+ const f = new Set(y.map((v) => v.value)), m = new Set(i.value);
1990
+ if (!(f.size === m.size && Array.from(m).every((v) => f.has(v)))) {
1991
+ const v = setTimeout(() => {
1992
+ const p = h().filter(
1993
+ (w) => {
1994
+ var C;
1995
+ return Array.isArray(w.value) ? !1 : (C = i.value) == null ? void 0 : C.includes(w.value);
1996
+ }
1997
+ );
1998
+ g(p);
1999
+ });
2000
+ return () => {
2001
+ clearTimeout(v);
2002
+ };
2003
+ }
921
2004
  }
922
- }, [c.value, g, C]);
2005
+ }, [i.value, h, y]);
923
2006
  let u;
924
- if ((c.value === void 0 || c.value.length === 0) && n !== void 0)
925
- u = /* @__PURE__ */ d("span", { children: n });
926
- else if (typeof t == "function")
927
- if (Array.isArray(c.value)) {
928
- const f = c.value.map((h) => {
929
- const b = C.find((x) => x.value === h);
930
- return b ? t({ value: h, textValue: b == null ? void 0 : b.textValue }) : null;
2007
+ if ((i.value === void 0 || i.value.length === 0) && r !== void 0)
2008
+ u = /* @__PURE__ */ b("span", { children: r });
2009
+ else if (typeof n == "function")
2010
+ if (Array.isArray(i.value)) {
2011
+ const f = i.value.map((m) => {
2012
+ const S = y.find((v) => v.value === m);
2013
+ return S ? n({ value: m, textValue: S == null ? void 0 : S.textValue }) : null;
931
2014
  });
932
- u = f.every((h) => h === null) ? n : f;
2015
+ u = f.every((m) => m === null) ? r : f;
933
2016
  } else
934
- u = t(c.value);
2017
+ u = n(i.value);
935
2018
  else
936
- u = t;
937
- return /* @__PURE__ */ d(N.span, { ...r, ref: m, children: u || null });
2019
+ u = n;
2020
+ return /* @__PURE__ */ b(F.span, { ...s, ref: d, children: u || null });
938
2021
  }
939
2022
  );
940
- He.displayName = kt;
941
- const _o = "SelectIcon", We = s.forwardRef(
942
- (o, i) => {
943
- const { __scopeSelect: e, children: t, ...n } = o;
944
- return /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...n, ref: i, children: t || "▼" });
2023
+ Zt.displayName = Dn;
2024
+ const zs = "SelectIcon", Jt = l.forwardRef(
2025
+ (e, o) => {
2026
+ const { __scopeSelect: t, children: n, ...r } = e;
2027
+ return /* @__PURE__ */ b(F.span, { "aria-hidden": !0, ...r, ref: o, children: n || "▼" });
945
2028
  }
946
2029
  );
947
- We.displayName = _o;
948
- const Mo = "SelectPortal", ze = (o) => /* @__PURE__ */ d(pt, { asChild: !0, ...o });
949
- ze.displayName = Mo;
950
- const le = "SelectContent", Ke = s.forwardRef(
951
- (o, i) => {
952
- const e = X(le, o.__scopeSelect), [t, n] = s.useState();
953
- if ($(() => {
954
- n(new DocumentFragment());
955
- }, []), !e.open) {
956
- const r = t;
957
- return r ? we.createPortal(
958
- /* @__PURE__ */ d(Ft, { scope: o.__scopeSelect, children: /* @__PURE__ */ d(Te.Slot, { scope: o.__scopeSelect, children: /* @__PURE__ */ d("div", { children: o.children }) }) }),
959
- r
2030
+ Jt.displayName = zs;
2031
+ const js = "SelectPortal", Qt = (e) => /* @__PURE__ */ b(Bo, { asChild: !0, ...e });
2032
+ Qt.displayName = js;
2033
+ const Te = "SelectContent", eo = l.forwardRef(
2034
+ (e, o) => {
2035
+ const t = ge(Te, e.__scopeSelect), [n, r] = l.useState();
2036
+ if (te(() => {
2037
+ r(new DocumentFragment());
2038
+ }, []), !t.open) {
2039
+ const s = n;
2040
+ return s ? ct.createPortal(
2041
+ /* @__PURE__ */ b(Fn, { scope: e.__scopeSelect, children: /* @__PURE__ */ b(gt.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ b("div", { children: e.children }) }) }),
2042
+ s
960
2043
  ) : null;
961
2044
  }
962
- return /* @__PURE__ */ d(Lt, { ...o, ref: i });
2045
+ return /* @__PURE__ */ b(Ln, { ...e, ref: o });
963
2046
  }
964
2047
  );
965
- Ke.displayName = le;
966
- const q = 10, [Ft, oe] = pe(le), Oo = "SelectContentImpl", Lt = s.forwardRef(
967
- (o, i) => {
2048
+ eo.displayName = Te;
2049
+ const me = 10, [Fn, ve] = $e(Te), Hs = "SelectContentImpl", Ln = l.forwardRef(
2050
+ (e, o) => {
968
2051
  const {
969
- __scopeSelect: e,
970
- position: t = "item-aligned",
971
- onCloseAutoFocus: n,
972
- onEscapeKeyDown: r,
973
- onPointerDownOutside: c,
2052
+ __scopeSelect: t,
2053
+ position: n = "item-aligned",
2054
+ onCloseAutoFocus: r,
2055
+ onEscapeKeyDown: s,
2056
+ onPointerDownOutside: i,
974
2057
  //
975
2058
  // PopperContent props
976
- side: l,
977
- sideOffset: a,
978
- align: m,
979
- alignOffset: C,
980
- arrowPadding: v,
981
- collisionBoundary: g,
2059
+ side: a,
2060
+ sideOffset: c,
2061
+ align: d,
2062
+ alignOffset: y,
2063
+ arrowPadding: g,
2064
+ collisionBoundary: h,
982
2065
  collisionPadding: u,
983
2066
  sticky: f,
984
- hideWhenDetached: h,
985
- avoidCollisions: b,
2067
+ hideWhenDetached: m,
2068
+ avoidCollisions: S,
986
2069
  //
987
- ...x
988
- } = o, p = X(le, e), [y, E] = s.useState(null), [O, F] = s.useState(null), _ = A(i, (S) => E(S)), [k, Z] = s.useState(null), [U, z] = s.useState(null), R = ve(e), [H, L] = s.useState(!1), W = s.useRef(!1);
989
- s.useEffect(() => {
990
- if (y) return ft(y);
991
- }, [y]), at();
992
- const J = s.useCallback(
993
- (S) => {
994
- const [I, ...M] = R().map((w) => w.ref.current), [V] = M.slice(-1), T = document.activeElement;
995
- for (const w of S)
996
- if (w === T || (w == null || w.scrollIntoView({ block: "nearest" }), w === I && O && (O.scrollTop = 0), w === V && O && (O.scrollTop = O.scrollHeight), w == null || w.focus(), document.activeElement !== T)) return;
2070
+ ...v
2071
+ } = e, p = ge(Te, t), [w, C] = l.useState(null), [E, T] = l.useState(null), x = z(o, (I) => C(I)), [D, W] = l.useState(null), [G, oe] = l.useState(null), L = Ge(t), [Y, K] = l.useState(!1), Z = l.useRef(!1);
2072
+ l.useEffect(() => {
2073
+ if (w) return zo(w);
2074
+ }, [w]), Fo();
2075
+ const le = l.useCallback(
2076
+ (I) => {
2077
+ const [N, ...k] = L().map((A) => A.ref.current), [_] = k.slice(-1), R = document.activeElement;
2078
+ for (const A of I)
2079
+ if (A === R || (A == null || A.scrollIntoView({ block: "nearest" }), A === N && E && (E.scrollTop = 0), A === _ && E && (E.scrollTop = E.scrollHeight), A == null || A.focus(), document.activeElement !== R)) return;
997
2080
  },
998
- [R, O]
999
- ), Q = s.useCallback(
1000
- () => J([k, y]),
1001
- [J, k, y]
2081
+ [L, E]
2082
+ ), ne = l.useCallback(
2083
+ () => le([D, w]),
2084
+ [le, D, w]
1002
2085
  );
1003
- s.useEffect(() => {
1004
- H && Q();
1005
- }, [H, Q]);
1006
- const { onOpenChange: K, triggerPointerDownPosRef: G } = p;
1007
- s.useEffect(() => {
1008
- if (y) {
1009
- let S = { x: 0, y: 0 };
1010
- const I = (V) => {
1011
- var T, w;
1012
- S = {
1013
- x: Math.abs(Math.round(V.pageX) - (((T = G.current) == null ? void 0 : T.x) ?? 0)),
1014
- y: Math.abs(Math.round(V.pageY) - (((w = G.current) == null ? void 0 : w.y) ?? 0))
2086
+ l.useEffect(() => {
2087
+ Y && ne();
2088
+ }, [Y, ne]);
2089
+ const { onOpenChange: J, triggerPointerDownPosRef: $ } = p;
2090
+ l.useEffect(() => {
2091
+ if (w) {
2092
+ let I = { x: 0, y: 0 };
2093
+ const N = (_) => {
2094
+ var R, A;
2095
+ I = {
2096
+ x: Math.abs(Math.round(_.pageX) - (((R = $.current) == null ? void 0 : R.x) ?? 0)),
2097
+ y: Math.abs(Math.round(_.pageY) - (((A = $.current) == null ? void 0 : A.y) ?? 0))
1015
2098
  };
1016
- }, M = (V) => {
1017
- S.x <= 10 && S.y <= 10 ? V.preventDefault() : y.contains(V.target) || K(!1), document.removeEventListener("pointermove", I), G.current = null;
2099
+ }, k = (_) => {
2100
+ I.x <= 10 && I.y <= 10 ? _.preventDefault() : w.contains(_.target) || J(!1), document.removeEventListener("pointermove", N), $.current = null;
1018
2101
  };
1019
- return G.current !== null && (document.addEventListener("pointermove", I), document.addEventListener("pointerup", M, { capture: !0, once: !0 })), () => {
1020
- document.removeEventListener("pointermove", I), document.removeEventListener("pointerup", M, { capture: !0 });
2102
+ return $.current !== null && (document.addEventListener("pointermove", N), document.addEventListener("pointerup", k, { capture: !0, once: !0 })), () => {
2103
+ document.removeEventListener("pointermove", N), document.removeEventListener("pointerup", k, { capture: !0 });
1021
2104
  };
1022
2105
  }
1023
- }, [y, K, G]), s.useEffect(() => {
1024
- const S = () => K(!1);
1025
- return window.addEventListener("blur", S), window.addEventListener("resize", S), () => {
1026
- window.removeEventListener("blur", S), window.removeEventListener("resize", S);
2106
+ }, [w, J, $]), l.useEffect(() => {
2107
+ const I = () => J(!1);
2108
+ return window.addEventListener("blur", I), window.addEventListener("resize", I), () => {
2109
+ window.removeEventListener("blur", I), window.removeEventListener("resize", I);
1027
2110
  };
1028
- }, [K]);
1029
- const [ce, ee] = zt((S) => {
1030
- const I = R().filter((T) => !T.disabled), M = I.find((T) => T.ref.current === document.activeElement), V = Kt(I, S, M);
1031
- V && setTimeout(() => V.ref.current.focus());
1032
- }), fe = s.useCallback(
1033
- (S, I, M) => {
1034
- const V = !W.current && !M;
1035
- (p.value !== void 0 && p.value === I || V) && (Z(S), V && (W.current = !0));
2111
+ }, [J]);
2112
+ const [re, q] = Un((I) => {
2113
+ const N = L().filter((R) => !R.disabled), k = N.find((R) => R.ref.current === document.activeElement), _ = Wn(N, I, k);
2114
+ _ && setTimeout(() => _.ref.current.focus());
2115
+ }), j = l.useCallback(
2116
+ (I, N, k) => {
2117
+ const _ = !Z.current && !k;
2118
+ (p.value !== void 0 && p.value === N || _) && (W(I), _ && (Z.current = !0));
1036
2119
  },
1037
2120
  [p.value]
1038
- ), me = s.useCallback(() => y == null ? void 0 : y.focus(), [y]), te = s.useCallback(
1039
- (S, I, M) => {
1040
- const V = !W.current && !M;
1041
- (p.value !== void 0 && (Array.isArray(I) ? I.every((w) => {
1042
- var B;
1043
- return (B = p.value) == null ? void 0 : B.includes(w);
1044
- }) : p.value === I) || V) && z(S);
2121
+ ), fe = l.useCallback(() => w == null ? void 0 : w.focus(), [w]), se = l.useCallback(
2122
+ (I, N, k) => {
2123
+ const _ = !Z.current && !k;
2124
+ (p.value !== void 0 && (Array.isArray(N) ? N.every((A) => {
2125
+ var ee;
2126
+ return (ee = p.value) == null ? void 0 : ee.includes(A);
2127
+ }) : p.value === N) || _) && oe(I);
1045
2128
  },
1046
2129
  [p.value]
1047
- ), ae = t === "popper" ? Re : Bt, ne = ae === Re ? {
1048
- side: l,
1049
- sideOffset: a,
1050
- align: m,
1051
- alignOffset: C,
1052
- arrowPadding: v,
1053
- collisionBoundary: g,
2130
+ ), ae = n === "popper" ? kt : $n, Q = ae === kt ? {
2131
+ side: a,
2132
+ sideOffset: c,
2133
+ align: d,
2134
+ alignOffset: y,
2135
+ arrowPadding: g,
2136
+ collisionBoundary: h,
1054
2137
  collisionPadding: u,
1055
2138
  sticky: f,
1056
- hideWhenDetached: h,
1057
- avoidCollisions: b
2139
+ hideWhenDetached: m,
2140
+ avoidCollisions: S
1058
2141
  } : {};
1059
- return /* @__PURE__ */ d(
1060
- Ft,
2142
+ return /* @__PURE__ */ b(
2143
+ Fn,
1061
2144
  {
1062
- scope: e,
1063
- content: y,
1064
- viewport: O,
1065
- onViewportChange: F,
1066
- itemRefCallback: fe,
1067
- selectedItem: k,
1068
- onItemLeave: me,
1069
- itemTextRefCallback: te,
1070
- focusSelectedItem: Q,
1071
- selectedItemText: U,
1072
- position: t,
1073
- isPositioned: H,
1074
- searchRef: ce,
1075
- children: /* @__PURE__ */ d(mt, { as: Ee, allowPinchZoom: !0, children: /* @__PURE__ */ d(
1076
- ut,
2145
+ scope: t,
2146
+ content: w,
2147
+ viewport: E,
2148
+ onViewportChange: T,
2149
+ itemRefCallback: j,
2150
+ selectedItem: D,
2151
+ onItemLeave: fe,
2152
+ itemTextRefCallback: se,
2153
+ focusSelectedItem: ne,
2154
+ selectedItemText: G,
2155
+ position: n,
2156
+ isPositioned: Y,
2157
+ searchRef: re,
2158
+ children: /* @__PURE__ */ b(jo, { as: Ct, allowPinchZoom: !0, children: /* @__PURE__ */ b(
2159
+ Lo,
1077
2160
  {
1078
2161
  asChild: !0,
1079
2162
  trapped: p.open,
1080
- onMountAutoFocus: (S) => {
1081
- S.preventDefault();
2163
+ onMountAutoFocus: (I) => {
2164
+ I.preventDefault();
1082
2165
  },
1083
- onUnmountAutoFocus: P(n, (S) => {
1084
- var I, M;
1085
- (I = p.trigger) == null || I.focus({ preventScroll: !0 }), (M = document.getSelection()) == null || M.empty(), S.preventDefault();
2166
+ onUnmountAutoFocus: M(r, (I) => {
2167
+ var N, k;
2168
+ (N = p.trigger) == null || N.focus({ preventScroll: !0 }), (k = document.getSelection()) == null || k.empty(), I.preventDefault();
1086
2169
  }),
1087
- children: /* @__PURE__ */ d(
1088
- ct,
2170
+ children: /* @__PURE__ */ b(
2171
+ Do,
1089
2172
  {
1090
2173
  asChild: !0,
1091
2174
  disableOutsidePointerEvents: !0,
1092
- onEscapeKeyDown: r,
1093
- onPointerDownOutside: c,
1094
- onFocusOutside: (S) => S.preventDefault(),
2175
+ onEscapeKeyDown: s,
2176
+ onPointerDownOutside: i,
2177
+ onFocusOutside: (I) => I.preventDefault(),
1095
2178
  onDismiss: () => p.onOpenChange(!1),
1096
- children: /* @__PURE__ */ d(
2179
+ children: /* @__PURE__ */ b(
1097
2180
  ae,
1098
2181
  {
1099
2182
  role: "listbox",
@@ -1101,28 +2184,28 @@ const q = 10, [Ft, oe] = pe(le), Oo = "SelectContentImpl", Lt = s.forwardRef(
1101
2184
  "data-state": p.open ? "open" : "closed",
1102
2185
  "aria-multiselectable": p.multi ? "true" : void 0,
1103
2186
  dir: p.dir,
1104
- onContextMenu: (S) => S.preventDefault(),
1105
- ...x,
1106
- ...ne,
1107
- onPlaced: () => L(!0),
1108
- ref: _,
2187
+ onContextMenu: (I) => I.preventDefault(),
2188
+ ...v,
2189
+ ...Q,
2190
+ onPlaced: () => K(!0),
2191
+ ref: x,
1109
2192
  style: {
1110
2193
  // flex layout so we can place the scroll buttons properly
1111
2194
  display: "flex",
1112
2195
  flexDirection: "column",
1113
2196
  // reset the outline by default as the content MAY get focused
1114
2197
  outline: "none",
1115
- ...x.style
2198
+ ...v.style
1116
2199
  },
1117
- onKeyDown: P(x.onKeyDown, (S) => {
1118
- const I = S.ctrlKey || S.altKey || S.metaKey;
1119
- if (S.key === "Tab" && S.preventDefault(), !I && S.key.length === 1 && ee(S.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(S.key)) {
1120
- let V = R().filter((T) => !T.disabled).map((T) => T.ref.current);
1121
- if (["ArrowUp", "End"].includes(S.key) && (V = V.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(S.key)) {
1122
- const T = S.target, w = V.indexOf(T);
1123
- V = V.slice(w + 1);
2200
+ onKeyDown: M(v.onKeyDown, (I) => {
2201
+ const N = I.ctrlKey || I.altKey || I.metaKey;
2202
+ if (I.key === "Tab" && I.preventDefault(), !N && I.key.length === 1 && q(I.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(I.key)) {
2203
+ let _ = L().filter((R) => !R.disabled).map((R) => R.ref.current);
2204
+ if (["ArrowUp", "End"].includes(I.key) && (_ = _.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(I.key)) {
2205
+ const R = I.target, A = _.indexOf(R);
2206
+ _ = _.slice(A + 1);
1124
2207
  }
1125
- setTimeout(() => J(V)), S.preventDefault();
2208
+ setTimeout(() => le(_)), I.preventDefault();
1126
2209
  }
1127
2210
  })
1128
2211
  }
@@ -1135,93 +2218,93 @@ const q = 10, [Ft, oe] = pe(le), Oo = "SelectContentImpl", Lt = s.forwardRef(
1135
2218
  );
1136
2219
  }
1137
2220
  );
1138
- Lt.displayName = Oo;
1139
- const Do = "SelectItemAlignedPosition", Bt = s.forwardRef(
1140
- (o, i) => {
1141
- const { __scopeSelect: e, onPlaced: t, ...n } = o, r = X(le, e), c = oe(le, e), [l, a] = s.useState(null), [m, C] = s.useState(null), v = A(i, (_) => C(_)), g = ve(e), u = s.useRef(!1), f = s.useRef(!0), { viewport: h, selectedItem: b, selectedItemText: x, focusSelectedItem: p } = c, y = s.useCallback(() => {
1142
- if (r.trigger && r.valueNode && l && m && h && b && x) {
1143
- const _ = r.trigger.getBoundingClientRect(), k = m.getBoundingClientRect(), Z = r.valueNode.getBoundingClientRect(), U = x.getBoundingClientRect();
1144
- if (r.dir !== "rtl") {
1145
- const T = U.left - k.left, w = Z.left - T, B = _.left - w, j = _.width + B, D = Math.max(j, k.width), ue = window.innerWidth - q, he = rt(w, [q, ue - D]);
1146
- l.style.minWidth = `${j}px`, l.style.left = `${he}px`;
2221
+ Ln.displayName = Hs;
2222
+ const Us = "SelectItemAlignedPosition", $n = l.forwardRef(
2223
+ (e, o) => {
2224
+ const { __scopeSelect: t, onPlaced: n, ...r } = e, s = ge(Te, t), i = ve(Te, t), [a, c] = l.useState(null), [d, y] = l.useState(null), g = z(o, (x) => y(x)), h = Ge(t), u = l.useRef(!1), f = l.useRef(!0), { viewport: m, selectedItem: S, selectedItemText: v, focusSelectedItem: p } = i, w = l.useCallback(() => {
2225
+ if (s.trigger && s.valueNode && a && d && m && S && v) {
2226
+ const x = s.trigger.getBoundingClientRect(), D = d.getBoundingClientRect(), W = s.valueNode.getBoundingClientRect(), G = v.getBoundingClientRect();
2227
+ if (s.dir !== "rtl") {
2228
+ const R = G.left - D.left, A = W.left - R, ee = x.left - A, ue = x.width + ee, U = Math.max(ue, D.width), Ae = window.innerWidth - me, Be = mo(A, [me, Ae - U]);
2229
+ a.style.minWidth = `${ue}px`, a.style.left = `${Be}px`;
1147
2230
  } else {
1148
- const T = k.right - U.right, w = window.innerWidth - Z.right - T, B = window.innerWidth - _.right - w, j = _.width + B, D = Math.max(j, k.width), ue = window.innerWidth - q, he = rt(w, [q, ue - D]);
1149
- l.style.minWidth = `${j}px`, l.style.right = `${he}px`;
2231
+ const R = D.right - G.right, A = window.innerWidth - W.right - R, ee = window.innerWidth - x.right - A, ue = x.width + ee, U = Math.max(ue, D.width), Ae = window.innerWidth - me, Be = mo(A, [me, Ae - U]);
2232
+ a.style.minWidth = `${ue}px`, a.style.right = `${Be}px`;
1150
2233
  }
1151
- const z = g(), R = window.innerHeight - q * 2, H = h.scrollHeight, L = window.getComputedStyle(m), W = parseInt(L.borderTopWidth, 10), J = parseInt(L.paddingTop, 10), Q = parseInt(L.borderBottomWidth, 10), K = parseInt(L.paddingBottom, 10), G = W + J + H + K + Q, ce = Math.min(b.offsetHeight * 5, G), ee = window.getComputedStyle(h), fe = parseInt(ee.paddingTop, 10), me = parseInt(ee.paddingBottom, 10), te = _.top + _.height / 2 - q, ae = R - te, ne = b.offsetHeight / 2, S = b.offsetTop + ne, I = W + J + S, M = G - I;
1152
- if (I <= te) {
1153
- const T = b === z[z.length - 1].ref.current;
1154
- l.style.bottom = "0px";
1155
- const w = m.clientHeight - h.offsetTop - h.offsetHeight, B = Math.max(
2234
+ const oe = h(), L = window.innerHeight - me * 2, Y = m.scrollHeight, K = window.getComputedStyle(d), Z = parseInt(K.borderTopWidth, 10), le = parseInt(K.paddingTop, 10), ne = parseInt(K.borderBottomWidth, 10), J = parseInt(K.paddingBottom, 10), $ = Z + le + Y + J + ne, re = Math.min(S.offsetHeight * 5, $), q = window.getComputedStyle(m), j = parseInt(q.paddingTop, 10), fe = parseInt(q.paddingBottom, 10), se = x.top + x.height / 2 - me, ae = L - se, Q = S.offsetHeight / 2, I = S.offsetTop + Q, N = Z + le + I, k = $ - N;
2235
+ if (N <= se) {
2236
+ const R = S === oe[oe.length - 1].ref.current;
2237
+ a.style.bottom = "0px";
2238
+ const A = d.clientHeight - m.offsetTop - m.offsetHeight, ee = Math.max(
1156
2239
  ae,
1157
- ne + // viewport might have padding bottom, include it to avoid a scrollable viewport
1158
- (T ? me : 0) + w + Q
1159
- ), j = I + B;
1160
- l.style.height = `${j}px`;
2240
+ Q + // viewport might have padding bottom, include it to avoid a scrollable viewport
2241
+ (R ? fe : 0) + A + ne
2242
+ ), ue = N + ee;
2243
+ a.style.height = `${ue}px`;
1161
2244
  } else {
1162
- const T = b === z[0].ref.current;
1163
- l.style.top = "0px";
1164
- const B = Math.max(
1165
- te,
1166
- W + h.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
1167
- (T ? fe : 0) + ne
1168
- ) + M;
1169
- l.style.height = `${B}px`, h.scrollTop = I - te + h.offsetTop;
2245
+ const R = S === oe[0].ref.current;
2246
+ a.style.top = "0px";
2247
+ const ee = Math.max(
2248
+ se,
2249
+ Z + m.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
2250
+ (R ? j : 0) + Q
2251
+ ) + k;
2252
+ a.style.height = `${ee}px`, m.scrollTop = N - se + m.offsetTop;
1170
2253
  }
1171
- l.style.margin = `${q}px 0`, l.style.minHeight = `${ce}px`, l.style.maxHeight = `${R}px`, t == null || t(), requestAnimationFrame(() => u.current = !0);
2254
+ a.style.margin = `${me}px 0`, a.style.minHeight = `${re}px`, a.style.maxHeight = `${L}px`, n == null || n(), requestAnimationFrame(() => u.current = !0);
1172
2255
  }
1173
2256
  }, [
1174
- g,
1175
- r.trigger,
1176
- r.valueNode,
1177
- l,
1178
- m,
1179
2257
  h,
1180
- b,
1181
- x,
1182
- r.dir,
1183
- t
2258
+ s.trigger,
2259
+ s.valueNode,
2260
+ a,
2261
+ d,
2262
+ m,
2263
+ S,
2264
+ v,
2265
+ s.dir,
2266
+ n
1184
2267
  ]);
1185
- $(() => y(), [y]);
1186
- const [E, O] = s.useState();
1187
- $(() => {
1188
- m && O(window.getComputedStyle(m).zIndex);
1189
- }, [m]);
1190
- const F = s.useCallback(
1191
- (_) => {
1192
- _ && f.current === !0 && (y(), p == null || p(), f.current = !1);
2268
+ te(() => w(), [w]);
2269
+ const [C, E] = l.useState();
2270
+ te(() => {
2271
+ d && E(window.getComputedStyle(d).zIndex);
2272
+ }, [d]);
2273
+ const T = l.useCallback(
2274
+ (x) => {
2275
+ x && f.current === !0 && (w(), p == null || p(), f.current = !1);
1193
2276
  },
1194
- [y, p]
2277
+ [w, p]
1195
2278
  );
1196
- return /* @__PURE__ */ d(
1197
- Fo,
2279
+ return /* @__PURE__ */ b(
2280
+ Ks,
1198
2281
  {
1199
- scope: e,
1200
- contentWrapper: l,
2282
+ scope: t,
2283
+ contentWrapper: a,
1201
2284
  shouldExpandOnScrollRef: u,
1202
- onScrollButtonChange: F,
1203
- children: /* @__PURE__ */ d(
2285
+ onScrollButtonChange: T,
2286
+ children: /* @__PURE__ */ b(
1204
2287
  "div",
1205
2288
  {
1206
- ref: a,
2289
+ ref: c,
1207
2290
  style: {
1208
2291
  display: "flex",
1209
2292
  flexDirection: "column",
1210
2293
  position: "fixed",
1211
- zIndex: E
2294
+ zIndex: C
1212
2295
  },
1213
- children: /* @__PURE__ */ d(
1214
- N.div,
2296
+ children: /* @__PURE__ */ b(
2297
+ F.div,
1215
2298
  {
1216
- ...n,
1217
- ref: v,
2299
+ ...r,
2300
+ ref: g,
1218
2301
  style: {
1219
2302
  // When we get the height of the content, it includes borders. If we were to set
1220
2303
  // the height without having `boxSizing: 'border-box'` it would be too big.
1221
2304
  boxSizing: "border-box",
1222
2305
  // We need to ensure the content doesn't get taller than the wrapper
1223
2306
  maxHeight: "100%",
1224
- ...n.style
2307
+ ...r.style
1225
2308
  }
1226
2309
  }
1227
2310
  )
@@ -1231,22 +2314,22 @@ const Do = "SelectItemAlignedPosition", Bt = s.forwardRef(
1231
2314
  );
1232
2315
  }
1233
2316
  );
1234
- Bt.displayName = Do;
1235
- const ko = "SelectPopperPosition", Re = s.forwardRef(
1236
- (o, i) => {
1237
- const { __scopeSelect: e, align: t = "start", collisionPadding: n = q, ...r } = o, c = Ve(e);
1238
- return /* @__PURE__ */ d(
1239
- ie.Content,
2317
+ $n.displayName = Us;
2318
+ const Ws = "SelectPopperPosition", kt = l.forwardRef(
2319
+ (e, o) => {
2320
+ const { __scopeSelect: t, align: n = "start", collisionPadding: r = me, ...s } = e, i = yt(t);
2321
+ return /* @__PURE__ */ b(
2322
+ Pe.Content,
1240
2323
  {
1241
- ...c,
1242
- ...r,
1243
- ref: i,
1244
- align: t,
1245
- collisionPadding: n,
2324
+ ...i,
2325
+ ...s,
2326
+ ref: o,
2327
+ align: n,
2328
+ collisionPadding: r,
1246
2329
  style: {
1247
2330
  // Ensure border-box for floating-ui calculations
1248
2331
  boxSizing: "border-box",
1249
- ...r.style,
2332
+ ...s.style,
1250
2333
  "--radix-select-content-transform-origin": "var(--radix-popper-transform-origin)",
1251
2334
  "--radix-select-content-available-width": "var(--radix-popper-available-width)",
1252
2335
  "--radix-select-content-available-height": "var(--radix-popper-available-height)",
@@ -1257,15 +2340,15 @@ const ko = "SelectPopperPosition", Re = s.forwardRef(
1257
2340
  );
1258
2341
  }
1259
2342
  );
1260
- Re.displayName = ko;
1261
- const [Fo, Ge] = pe(
1262
- le,
2343
+ kt.displayName = Ws;
2344
+ const [Ks, to] = $e(
2345
+ Te,
1263
2346
  {}
1264
- ), Ae = "SelectViewport", je = s.forwardRef(
1265
- (o, i) => {
1266
- const { __scopeSelect: e, ...t } = o, n = oe(Ae, e), r = Ge(Ae, e), c = A(i, n.onViewportChange), l = s.useRef(0);
1267
- return /* @__PURE__ */ ye(Se, { children: [
1268
- /* @__PURE__ */ d(
2347
+ ), Ot = "SelectViewport", oo = l.forwardRef(
2348
+ (e, o) => {
2349
+ const { __scopeSelect: t, ...n } = e, r = ve(Ot, t), s = to(Ot, t), i = z(o, r.onViewportChange), a = l.useRef(0);
2350
+ return /* @__PURE__ */ it(at, { children: [
2351
+ /* @__PURE__ */ b(
1269
2352
  "style",
1270
2353
  {
1271
2354
  dangerouslySetInnerHTML: {
@@ -1273,13 +2356,13 @@ const [Fo, Ge] = pe(
1273
2356
  }
1274
2357
  }
1275
2358
  ),
1276
- /* @__PURE__ */ d(Te.Slot, { scope: e, children: /* @__PURE__ */ d(
1277
- N.div,
2359
+ /* @__PURE__ */ b(gt.Slot, { scope: t, children: /* @__PURE__ */ b(
2360
+ F.div,
1278
2361
  {
1279
2362
  "data-radix-select-viewport": "",
1280
2363
  role: "presentation",
1281
- ...t,
1282
- ref: c,
2364
+ ...n,
2365
+ ref: i,
1283
2366
  style: {
1284
2367
  // we use position: 'relative' here on the `viewport` so that when we call
1285
2368
  // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport
@@ -1287,104 +2370,104 @@ const [Fo, Ge] = pe(
1287
2370
  position: "relative",
1288
2371
  flex: 1,
1289
2372
  overflow: "auto",
1290
- ...t.style
2373
+ ...n.style
1291
2374
  },
1292
- onScroll: P(t.onScroll, (a) => {
1293
- const m = a.currentTarget, { contentWrapper: C, shouldExpandOnScrollRef: v } = r;
1294
- if (v != null && v.current && C) {
1295
- const g = Math.abs(l.current - m.scrollTop);
1296
- if (g > 0) {
1297
- const u = window.innerHeight - q * 2, f = parseFloat(C.style.minHeight), h = parseFloat(C.style.height), b = Math.max(f, h);
1298
- if (b < u) {
1299
- const x = b + g, p = Math.min(u, x), y = x - p;
1300
- C.style.height = `${p}px`, C.style.bottom === "0px" && (m.scrollTop = y > 0 ? y : 0, C.style.justifyContent = "flex-end");
2375
+ onScroll: M(n.onScroll, (c) => {
2376
+ const d = c.currentTarget, { contentWrapper: y, shouldExpandOnScrollRef: g } = s;
2377
+ if (g != null && g.current && y) {
2378
+ const h = Math.abs(a.current - d.scrollTop);
2379
+ if (h > 0) {
2380
+ const u = window.innerHeight - me * 2, f = parseFloat(y.style.minHeight), m = parseFloat(y.style.height), S = Math.max(f, m);
2381
+ if (S < u) {
2382
+ const v = S + h, p = Math.min(u, v), w = v - p;
2383
+ y.style.height = `${p}px`, y.style.bottom === "0px" && (d.scrollTop = w > 0 ? w : 0, y.style.justifyContent = "flex-end");
1301
2384
  }
1302
2385
  }
1303
2386
  }
1304
- l.current = m.scrollTop;
2387
+ a.current = d.scrollTop;
1305
2388
  })
1306
2389
  }
1307
2390
  ) })
1308
2391
  ] });
1309
2392
  }
1310
2393
  );
1311
- je.displayName = Ae;
1312
- const $t = "SelectGroup", [Lo, Bo] = pe($t), Ye = s.forwardRef(
1313
- (o, i) => {
1314
- const { __scopeSelect: e, ...t } = o, n = se();
1315
- return /* @__PURE__ */ d(Lo, { scope: e, id: n, children: /* @__PURE__ */ d(N.div, { role: "group", "aria-labelledby": n, ...t, ref: i }) });
2394
+ oo.displayName = Ot;
2395
+ const Bn = "SelectGroup", [Gs, Ys] = $e(Bn), no = l.forwardRef(
2396
+ (e, o) => {
2397
+ const { __scopeSelect: t, ...n } = e, r = Ee();
2398
+ return /* @__PURE__ */ b(Gs, { scope: t, id: r, children: /* @__PURE__ */ b(F.div, { role: "group", "aria-labelledby": r, ...n, ref: o }) });
1316
2399
  }
1317
2400
  );
1318
- Ye.displayName = $t;
1319
- const Ut = "SelectLabel", qe = s.forwardRef(
1320
- (o, i) => {
1321
- const { __scopeSelect: e, ...t } = o, n = Bo(Ut, e);
1322
- return /* @__PURE__ */ d(N.div, { id: n.id, ...t, ref: i });
2401
+ no.displayName = Bn;
2402
+ const zn = "SelectLabel", ro = l.forwardRef(
2403
+ (e, o) => {
2404
+ const { __scopeSelect: t, ...n } = e, r = Ys(zn, t);
2405
+ return /* @__PURE__ */ b(F.div, { id: r.id, ...n, ref: o });
1323
2406
  }
1324
2407
  );
1325
- qe.displayName = Ut;
1326
- const be = "SelectItem", [$o, Ht] = pe(be), Xe = s.forwardRef(
1327
- (o, i) => {
1328
- const { __scopeSelect: e, value: t, disabled: n = !1, textValue: r, ...c } = o, l = X(be, e), a = oe(be, e), m = typeof t == "string" ? Array.isArray(l.value) ? l.value.includes(t) : l.value === t : t.every((p) => {
1329
- var y;
1330
- return (y = l.value) == null ? void 0 : y.includes(p);
1331
- }), C = Array.isArray(l.value) && Array.isArray(t) && t.some((p) => {
1332
- var y;
1333
- return (y = l.value) == null ? void 0 : y.includes(p);
1334
- }), [v, g] = s.useState(r ?? ""), [u, f] = s.useState(!1), h = A(
1335
- i,
2408
+ ro.displayName = zn;
2409
+ const st = "SelectItem", [qs, jn] = $e(st), so = l.forwardRef(
2410
+ (e, o) => {
2411
+ const { __scopeSelect: t, value: n, disabled: r = !1, textValue: s, ...i } = e, a = ge(st, t), c = ve(st, t), d = typeof n == "string" ? Array.isArray(a.value) ? a.value.includes(n) : a.value === n : n.every((p) => {
2412
+ var w;
2413
+ return (w = a.value) == null ? void 0 : w.includes(p);
2414
+ }), y = Array.isArray(a.value) && Array.isArray(n) && n.some((p) => {
2415
+ var w;
2416
+ return (w = a.value) == null ? void 0 : w.includes(p);
2417
+ }), [g, h] = l.useState(s ?? ""), [u, f] = l.useState(!1), m = z(
2418
+ o,
1336
2419
  (p) => {
1337
- var y;
1338
- return (y = a.itemRefCallback) == null ? void 0 : y.call(a, p, t, n);
2420
+ var w;
2421
+ return (w = c.itemRefCallback) == null ? void 0 : w.call(c, p, n, r);
1339
2422
  }
1340
- ), b = se(), x = () => {
1341
- if (!n) {
1342
- let p = l.multi && typeof t == "string" ? [t] : t;
1343
- C && !m ? l.onValueChange(p) : Array.isArray(l.value) && (p = Gt(t, l.value)), l.onValueChange(p), l.multi || l.onOpenChange(!1);
2423
+ ), S = Ee(), v = () => {
2424
+ if (!r) {
2425
+ let p = a.multi && typeof n == "string" ? [n] : n;
2426
+ y && !d ? a.onValueChange(p) : Array.isArray(a.value) && (p = Kn(n, a.value)), a.onValueChange(p), a.multi || a.onOpenChange(!1);
1344
2427
  }
1345
2428
  };
1346
- if (!l.multi && Array.isArray(t))
2429
+ if (!a.multi && Array.isArray(n))
1347
2430
  throw new Error("You can only pass an array of values in multi selects");
1348
- return /* @__PURE__ */ d(
1349
- $o,
2431
+ return /* @__PURE__ */ b(
2432
+ qs,
1350
2433
  {
1351
- scope: e,
1352
- value: t,
1353
- disabled: n,
1354
- textId: b,
1355
- isSelected: m,
1356
- isIntermediate: C,
1357
- onItemTextChange: s.useCallback((p) => {
1358
- g((y) => y || ((p == null ? void 0 : p.textContent) ?? "").trim());
2434
+ scope: t,
2435
+ value: n,
2436
+ disabled: r,
2437
+ textId: S,
2438
+ isSelected: d,
2439
+ isIntermediate: y,
2440
+ onItemTextChange: l.useCallback((p) => {
2441
+ h((w) => w || ((p == null ? void 0 : p.textContent) ?? "").trim());
1359
2442
  }, []),
1360
- children: /* @__PURE__ */ d(Te.ItemSlot, { scope: e, value: t, disabled: n, textValue: v, children: /* @__PURE__ */ d(
1361
- N.div,
2443
+ children: /* @__PURE__ */ b(gt.ItemSlot, { scope: t, value: n, disabled: r, textValue: g, children: /* @__PURE__ */ b(
2444
+ F.div,
1362
2445
  {
1363
2446
  role: "option",
1364
- "aria-labelledby": b,
2447
+ "aria-labelledby": S,
1365
2448
  "data-highlighted": u ? "" : void 0,
1366
- "aria-selected": l.multi ? void 0 : m && u,
1367
- "aria-checked": l.multi ? m : void 0,
1368
- "data-state": m ? "checked" : "unchecked",
1369
- "aria-disabled": n || void 0,
1370
- "data-disabled": n ? "" : void 0,
1371
- tabIndex: n ? void 0 : -1,
1372
- ...c,
1373
- ref: h,
1374
- onFocus: P(c.onFocus, () => f(!0)),
1375
- onBlur: P(c.onBlur, () => f(!1)),
1376
- onPointerUp: P(c.onPointerUp, x),
1377
- onPointerMove: P(c.onPointerMove, (p) => {
1378
- var y;
1379
- n ? (y = a.onItemLeave) == null || y.call(a) : p.currentTarget.focus({ preventScroll: !0 });
2449
+ "aria-selected": a.multi ? void 0 : d && u,
2450
+ "aria-checked": a.multi ? d : void 0,
2451
+ "data-state": d ? "checked" : "unchecked",
2452
+ "aria-disabled": r || void 0,
2453
+ "data-disabled": r ? "" : void 0,
2454
+ tabIndex: r ? void 0 : -1,
2455
+ ...i,
2456
+ ref: m,
2457
+ onFocus: M(i.onFocus, () => f(!0)),
2458
+ onBlur: M(i.onBlur, () => f(!1)),
2459
+ onPointerUp: M(i.onPointerUp, v),
2460
+ onPointerMove: M(i.onPointerMove, (p) => {
2461
+ var w;
2462
+ r ? (w = c.onItemLeave) == null || w.call(c) : p.currentTarget.focus({ preventScroll: !0 });
1380
2463
  }),
1381
- onPointerLeave: P(c.onPointerLeave, (p) => {
1382
- var y;
1383
- p.currentTarget === document.activeElement && ((y = a.onItemLeave) == null || y.call(a));
2464
+ onPointerLeave: M(i.onPointerLeave, (p) => {
2465
+ var w;
2466
+ p.currentTarget === document.activeElement && ((w = c.onItemLeave) == null || w.call(c));
1384
2467
  }),
1385
- onKeyDown: P(c.onKeyDown, (p) => {
1386
- var E;
1387
- ((E = a.searchRef) == null ? void 0 : E.current) !== "" && p.key === " " || (Vo.includes(p.key) && x(), p.key === " " && p.preventDefault());
2468
+ onKeyDown: M(i.onKeyDown, (p) => {
2469
+ var C;
2470
+ ((C = c.searchRef) == null ? void 0 : C.current) !== "" && p.key === " " || (Ms.includes(p.key) && v(), p.key === " " && p.preventDefault());
1388
2471
  })
1389
2472
  }
1390
2473
  ) })
@@ -1392,239 +2475,245 @@ const be = "SelectItem", [$o, Ht] = pe(be), Xe = s.forwardRef(
1392
2475
  );
1393
2476
  }
1394
2477
  );
1395
- Xe.displayName = be;
1396
- const ge = "SelectItemText", Ze = s.forwardRef(
1397
- (o, i) => {
1398
- const { __scopeSelect: e, className: t, style: n, ...r } = o, c = X(ge, e), l = oe(ge, e), a = Ht(ge, e), m = Ao(ge, e), [C, v] = s.useState(null), g = A(
1399
- i,
1400
- (x) => v(x),
1401
- a.onItemTextChange,
1402
- (x) => {
2478
+ so.displayName = st;
2479
+ const je = "SelectItemText", Xs = On(F.span)`
2480
+ &:not(:last-child) {
2481
+ &::after {
2482
+ content: ', ';
2483
+ }
2484
+ }
2485
+ `, io = l.forwardRef(
2486
+ (e, o) => {
2487
+ const { __scopeSelect: t, className: n, style: r, ...s } = e, i = ge(je, t), a = ve(je, t), c = jn(je, t), d = Bs(je, t), [y, g] = l.useState(null), h = z(
2488
+ o,
2489
+ (v) => g(v),
2490
+ c.onItemTextChange,
2491
+ (v) => {
1403
2492
  var p;
1404
- return (p = l.itemTextRefCallback) == null ? void 0 : p.call(l, x, a.value, a.disabled);
2493
+ return (p = a.itemTextRefCallback) == null ? void 0 : p.call(a, v, c.value, c.disabled);
1405
2494
  }
1406
- ), u = C == null ? void 0 : C.textContent, f = s.useMemo(
1407
- () => /* @__PURE__ */ d(
2495
+ ), u = y == null ? void 0 : y.textContent, f = l.useMemo(
2496
+ () => /* @__PURE__ */ b(
1408
2497
  "option",
1409
2498
  {
1410
- value: a.value,
1411
- disabled: a.disabled,
2499
+ value: c.value,
2500
+ disabled: c.disabled,
1412
2501
  children: u
1413
2502
  },
1414
- Array.isArray(a.value) ? a.value.join(";") : a.value
2503
+ Array.isArray(c.value) ? c.value.join(";") : c.value
1415
2504
  ),
1416
- [a.disabled, a.value, u]
1417
- ), { onNativeOptionAdd: h, onNativeOptionRemove: b } = m;
1418
- return $(() => (h(f), () => b(f)), [h, b, f]), /* @__PURE__ */ ye(Se, { children: [
1419
- /* @__PURE__ */ d(N.span, { id: a.textId, ...r, ref: g }),
1420
- a.isSelected && c.valueNode && !c.valueNodeHasChildren ? we.createPortal(r.children, c.valueNode) : null
2505
+ [c.disabled, c.value, u]
2506
+ ), { onNativeOptionAdd: m, onNativeOptionRemove: S } = d;
2507
+ return te(() => (m(f), () => S(f)), [m, S, f]), /* @__PURE__ */ it(at, { children: [
2508
+ /* @__PURE__ */ b(F.span, { id: c.textId, ...s, ref: h }),
2509
+ c.isSelected && i.valueNode && !i.valueNodeHasChildren ? ct.createPortal(/* @__PURE__ */ b(Xs, { children: s.children }), i.valueNode) : null
1421
2510
  ] });
1422
2511
  }
1423
2512
  );
1424
- Ze.displayName = ge;
1425
- const Wt = "SelectItemIndicator", Je = s.forwardRef(
1426
- (o, i) => {
1427
- const { __scopeSelect: e, children: t, ...n } = o, r = Ht(Wt, e);
1428
- return typeof t == "function" ? /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...n, ref: i, children: t({
1429
- isSelected: r.isSelected,
1430
- isIntermediate: r.isIntermediate
1431
- }) }) : r.isSelected ? /* @__PURE__ */ d(N.span, { "aria-hidden": !0, ...n, ref: i, children: t }) : null;
2513
+ io.displayName = je;
2514
+ const Hn = "SelectItemIndicator", ao = l.forwardRef(
2515
+ (e, o) => {
2516
+ const { __scopeSelect: t, children: n, ...r } = e, s = jn(Hn, t);
2517
+ return typeof n == "function" ? /* @__PURE__ */ b(F.span, { "aria-hidden": !0, ...r, ref: o, children: n({
2518
+ isSelected: s.isSelected,
2519
+ isIntermediate: s.isIntermediate
2520
+ }) }) : s.isSelected ? /* @__PURE__ */ b(F.span, { "aria-hidden": !0, ...r, ref: o, children: n }) : null;
1432
2521
  }
1433
2522
  );
1434
- Je.displayName = Wt;
1435
- const _e = "SelectScrollUpButton", Qe = s.forwardRef(
1436
- (o, i) => {
1437
- const e = oe(_e, o.__scopeSelect), t = Ge(_e, o.__scopeSelect), [n, r] = s.useState(!1), c = A(i, t.onScrollButtonChange);
1438
- return $(() => {
1439
- if (e.viewport && e.isPositioned) {
1440
- const l = e.viewport, a = () => {
1441
- const m = l.scrollTop > 0;
1442
- r(m);
2523
+ ao.displayName = Hn;
2524
+ const Mt = "SelectScrollUpButton", co = l.forwardRef(
2525
+ (e, o) => {
2526
+ const t = ve(Mt, e.__scopeSelect), n = to(Mt, e.__scopeSelect), [r, s] = l.useState(!1), i = z(o, n.onScrollButtonChange);
2527
+ return te(() => {
2528
+ if (t.viewport && t.isPositioned) {
2529
+ const a = t.viewport, c = () => {
2530
+ const d = a.scrollTop > 0;
2531
+ s(d);
1443
2532
  };
1444
- return a(), l.addEventListener("scroll", a), () => l.removeEventListener("scroll", a);
2533
+ return c(), a.addEventListener("scroll", c), () => a.removeEventListener("scroll", c);
1445
2534
  }
1446
- }, [e.viewport, e.isPositioned]), n ? /* @__PURE__ */ d(
1447
- tt,
2535
+ }, [t.viewport, t.isPositioned]), r ? /* @__PURE__ */ b(
2536
+ uo,
1448
2537
  {
1449
- ...o,
1450
- ref: c,
2538
+ ...e,
2539
+ ref: i,
1451
2540
  onAutoScroll: () => {
1452
- const { viewport: l, selectedItem: a } = e;
1453
- l && a && (l.scrollTop -= a.offsetHeight);
2541
+ const { viewport: a, selectedItem: c } = t;
2542
+ a && c && (a.scrollTop -= c.offsetHeight);
1454
2543
  }
1455
2544
  }
1456
2545
  ) : null;
1457
2546
  }
1458
2547
  );
1459
- Qe.displayName = _e;
1460
- const Me = "SelectScrollDownButton", et = s.forwardRef(
1461
- (o, i) => {
1462
- const e = oe(Me, o.__scopeSelect), t = Ge(Me, o.__scopeSelect), [n, r] = s.useState(!1), c = A(i, t.onScrollButtonChange);
1463
- return $(() => {
1464
- if (e.viewport && e.isPositioned) {
1465
- const l = e.viewport, a = () => {
1466
- const m = l.scrollHeight - l.clientHeight, C = Math.ceil(l.scrollTop) < m;
1467
- r(C);
2548
+ co.displayName = Mt;
2549
+ const Dt = "SelectScrollDownButton", lo = l.forwardRef(
2550
+ (e, o) => {
2551
+ const t = ve(Dt, e.__scopeSelect), n = to(Dt, e.__scopeSelect), [r, s] = l.useState(!1), i = z(o, n.onScrollButtonChange);
2552
+ return te(() => {
2553
+ if (t.viewport && t.isPositioned) {
2554
+ const a = t.viewport, c = () => {
2555
+ const d = a.scrollHeight - a.clientHeight, y = Math.ceil(a.scrollTop) < d;
2556
+ s(y);
1468
2557
  };
1469
- return a(), l.addEventListener("scroll", a), () => l.removeEventListener("scroll", a);
2558
+ return c(), a.addEventListener("scroll", c), () => a.removeEventListener("scroll", c);
1470
2559
  }
1471
- }, [e.viewport, e.isPositioned]), n ? /* @__PURE__ */ d(
1472
- tt,
2560
+ }, [t.viewport, t.isPositioned]), r ? /* @__PURE__ */ b(
2561
+ uo,
1473
2562
  {
1474
- ...o,
1475
- ref: c,
2563
+ ...e,
2564
+ ref: i,
1476
2565
  onAutoScroll: () => {
1477
- const { viewport: l, selectedItem: a } = e;
1478
- l && a && (l.scrollTop += a.offsetHeight);
2566
+ const { viewport: a, selectedItem: c } = t;
2567
+ a && c && (a.scrollTop += c.offsetHeight);
1479
2568
  }
1480
2569
  }
1481
2570
  ) : null;
1482
2571
  }
1483
2572
  );
1484
- et.displayName = Me;
1485
- const tt = s.forwardRef(
1486
- (o, i) => {
1487
- const { __scopeSelect: e, onAutoScroll: t, ...n } = o, r = oe("SelectScrollButton", e), c = s.useRef(null), l = ve(e), a = s.useCallback(() => {
1488
- c.current !== null && (window.clearInterval(c.current), c.current = null);
2573
+ lo.displayName = Dt;
2574
+ const uo = l.forwardRef(
2575
+ (e, o) => {
2576
+ const { __scopeSelect: t, onAutoScroll: n, ...r } = e, s = ve("SelectScrollButton", t), i = l.useRef(null), a = Ge(t), c = l.useCallback(() => {
2577
+ i.current !== null && (window.clearInterval(i.current), i.current = null);
1489
2578
  }, []);
1490
- return s.useEffect(() => () => a(), [a]), $(() => {
1491
- var C;
1492
- const m = l().find((v) => v.ref.current === document.activeElement);
1493
- (C = m == null ? void 0 : m.ref.current) == null || C.scrollIntoView({ block: "nearest" });
1494
- }, [l]), /* @__PURE__ */ d(
1495
- N.div,
2579
+ return l.useEffect(() => () => c(), [c]), te(() => {
2580
+ var y;
2581
+ const d = a().find((g) => g.ref.current === document.activeElement);
2582
+ (y = d == null ? void 0 : d.ref.current) == null || y.scrollIntoView({ block: "nearest" });
2583
+ }, [a]), /* @__PURE__ */ b(
2584
+ F.div,
1496
2585
  {
1497
2586
  "aria-hidden": !0,
1498
- ...n,
1499
- ref: i,
1500
- style: { flexShrink: 0, ...n.style },
1501
- onPointerMove: P(n.onPointerMove, () => {
1502
- var m;
1503
- (m = r.onItemLeave) == null || m.call(r), c.current === null && (c.current = window.setInterval(t, 50));
2587
+ ...r,
2588
+ ref: o,
2589
+ style: { flexShrink: 0, ...r.style },
2590
+ onPointerMove: M(r.onPointerMove, () => {
2591
+ var d;
2592
+ (d = s.onItemLeave) == null || d.call(s), i.current === null && (i.current = window.setInterval(n, 50));
1504
2593
  }),
1505
- onPointerLeave: P(n.onPointerLeave, () => {
1506
- a();
2594
+ onPointerLeave: M(r.onPointerLeave, () => {
2595
+ c();
1507
2596
  })
1508
2597
  }
1509
2598
  );
1510
2599
  }
1511
2600
  );
1512
- tt.displayName = "SelectScrollButtonImpl";
1513
- const Uo = "SelectSeparator", ot = s.forwardRef(
1514
- (o, i) => {
1515
- const { __scopeSelect: e, ...t } = o;
1516
- return /* @__PURE__ */ d(N.div, { "aria-hidden": !0, ...t, ref: i });
2601
+ uo.displayName = "SelectScrollButtonImpl";
2602
+ const Zs = "SelectSeparator", po = l.forwardRef(
2603
+ (e, o) => {
2604
+ const { __scopeSelect: t, ...n } = e;
2605
+ return /* @__PURE__ */ b(F.div, { "aria-hidden": !0, ...n, ref: o });
1517
2606
  }
1518
2607
  );
1519
- ot.displayName = Uo;
1520
- const Oe = "SelectArrow", nt = s.forwardRef(
1521
- (o, i) => {
1522
- const { __scopeSelect: e, ...t } = o, n = Ve(e), r = X(Oe, e), c = oe(Oe, e);
1523
- return r.open && c.position === "popper" ? /* @__PURE__ */ d(ie.Arrow, { ...n, ...t, ref: i }) : null;
2608
+ po.displayName = Zs;
2609
+ const Ft = "SelectArrow", fo = l.forwardRef(
2610
+ (e, o) => {
2611
+ const { __scopeSelect: t, ...n } = e, r = yt(t), s = ge(Ft, t), i = ve(Ft, t);
2612
+ return s.open && i.position === "popper" ? /* @__PURE__ */ b(Pe.Arrow, { ...r, ...n, ref: o }) : null;
1524
2613
  }
1525
2614
  );
1526
- nt.displayName = Oe;
1527
- const Ho = "BubbleSelect", Wo = s.forwardRef(
1528
- (o, i) => {
1529
- const { value: e, ...t } = o, n = s.useRef(null), r = A(i, n), c = Xt(e), l = X(Ho, void 0);
1530
- s.useEffect(() => {
1531
- const m = n.current, C = window.HTMLSelectElement.prototype, g = Object.getOwnPropertyDescriptor(C, "value").set;
1532
- if (c !== e && g) {
2615
+ fo.displayName = Ft;
2616
+ const Js = "BubbleSelect", Qs = l.forwardRef(
2617
+ (e, o) => {
2618
+ const { value: t, ...n } = e, r = l.useRef(null), s = z(o, r), i = Qn(t), a = ge(Js, void 0);
2619
+ l.useEffect(() => {
2620
+ const d = r.current, y = window.HTMLSelectElement.prototype, h = Object.getOwnPropertyDescriptor(y, "value").set;
2621
+ if (i !== t && h) {
1533
2622
  const u = new Event("change", { bubbles: !0 });
1534
- g.call(m, e), m.dispatchEvent(u);
2623
+ h.call(d, t), d.dispatchEvent(u);
1535
2624
  }
1536
- }, [c, e]);
1537
- let a = e;
1538
- return l.multi && !Array.isArray(e) && (a = []), /* @__PURE__ */ d(Zt, { asChild: !0, children: /* @__PURE__ */ d(
2625
+ }, [i, t]);
2626
+ let c = t;
2627
+ return a.multi && !Array.isArray(t) && (c = []), /* @__PURE__ */ b(er, { asChild: !0, children: /* @__PURE__ */ b(
1539
2628
  "select",
1540
2629
  {
1541
- ...t,
1542
- multiple: l.multi ? !0 : void 0,
1543
- ref: r,
1544
- defaultValue: a
2630
+ ...n,
2631
+ multiple: a.multi ? !0 : void 0,
2632
+ ref: s,
2633
+ defaultValue: c
1545
2634
  }
1546
2635
  ) });
1547
2636
  }
1548
2637
  );
1549
- Wo.displayName = "BubbleSelect";
1550
- function zt(o) {
1551
- const i = Io(o), e = s.useRef(""), t = s.useRef(0), n = s.useCallback(
1552
- (c) => {
1553
- const l = e.current + c;
1554
- i(l), function a(m) {
1555
- e.current = m, window.clearTimeout(t.current), m !== "" && (t.current = window.setTimeout(() => a(""), 1e3));
1556
- }(l);
2638
+ Qs.displayName = "BubbleSelect";
2639
+ function Un(e) {
2640
+ const o = ks(e), t = l.useRef(""), n = l.useRef(0), r = l.useCallback(
2641
+ (i) => {
2642
+ const a = t.current + i;
2643
+ o(a), function c(d) {
2644
+ t.current = d, window.clearTimeout(n.current), d !== "" && (n.current = window.setTimeout(() => c(""), 1e3));
2645
+ }(a);
1557
2646
  },
1558
- [i]
1559
- ), r = s.useCallback(() => {
1560
- e.current = "", window.clearTimeout(t.current);
2647
+ [o]
2648
+ ), s = l.useCallback(() => {
2649
+ t.current = "", window.clearTimeout(n.current);
1561
2650
  }, []);
1562
- return s.useEffect(() => () => window.clearTimeout(t.current), []), [e, n, r];
1563
- }
1564
- function Kt(o, i, e) {
1565
- const n = i.length > 1 && Array.from(i).every((m) => m === i[0]) ? i[0] : i, r = e ? o.indexOf(e) : -1;
1566
- let c = zo(o, Math.max(r, 0));
1567
- n.length === 1 && (c = c.filter((m) => m !== e));
1568
- const a = c.find((m) => m.textValue.toLowerCase().startsWith(n.toLowerCase()));
1569
- return a !== e ? a : void 0;
1570
- }
1571
- function zo(o, i) {
1572
- return o.map((e, t) => o[(i + t) % o.length]);
1573
- }
1574
- const Gt = (o, i = []) => {
1575
- if (Array.isArray(o))
1576
- return o.reduce((t, n) => Gt(n, t), i);
1577
- const e = i.indexOf(o);
1578
- return e === -1 ? [...i, o] : [...i.slice(0, e), ...i.slice(e + 1)];
1579
- }, Ko = $e, Go = Ue, jo = He, Yo = We, qo = ze, Xo = Ke, Zo = je, Jo = Ye, Qo = qe, en = Xe, tn = Ze, on = Je, nn = Qe, rn = et, ln = ot, sn = nt, An = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2651
+ return l.useEffect(() => () => window.clearTimeout(n.current), []), [t, r, s];
2652
+ }
2653
+ function Wn(e, o, t) {
2654
+ const r = o.length > 1 && Array.from(o).every((d) => d === o[0]) ? o[0] : o, s = t ? e.indexOf(t) : -1;
2655
+ let i = ei(e, Math.max(s, 0));
2656
+ r.length === 1 && (i = i.filter((d) => d !== t));
2657
+ const c = i.find((d) => d.textValue.toLowerCase().startsWith(r.toLowerCase()));
2658
+ return c !== t ? c : void 0;
2659
+ }
2660
+ function ei(e, o) {
2661
+ return e.map((t, n) => e[(o + n) % e.length]);
2662
+ }
2663
+ const Kn = (e, o = []) => {
2664
+ if (Array.isArray(e))
2665
+ return e.reduce((n, r) => Kn(r, n), o);
2666
+ const t = o.indexOf(e);
2667
+ return t === -1 ? [...o, e] : [...o.slice(0, t), ...o.slice(t + 1)];
2668
+ }, ti = qt, oi = Xt, ni = Zt, ri = Jt, si = Qt, ii = eo, ai = oo, ci = no, li = ro, ui = so, di = io, pi = ao, fi = co, hi = lo, mi = po, gi = fo, zi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1580
2669
  __proto__: null,
1581
- Arrow: sn,
1582
- Content: Xo,
1583
- Group: Jo,
1584
- Icon: Yo,
1585
- Item: en,
1586
- ItemIndicator: on,
1587
- ItemText: tn,
1588
- Label: Qo,
1589
- Portal: qo,
1590
- Root: Ko,
1591
- ScrollDownButton: rn,
1592
- ScrollUpButton: nn,
1593
- Select: $e,
1594
- SelectArrow: nt,
1595
- SelectContent: Ke,
1596
- SelectGroup: Ye,
1597
- SelectIcon: We,
1598
- SelectItem: Xe,
1599
- SelectItemIndicator: Je,
1600
- SelectItemText: Ze,
1601
- SelectLabel: qe,
1602
- SelectPortal: ze,
1603
- SelectScrollDownButton: et,
1604
- SelectScrollUpButton: Qe,
1605
- SelectSeparator: ot,
1606
- SelectTrigger: Ue,
1607
- SelectValue: He,
1608
- SelectViewport: je,
1609
- Separator: ln,
1610
- Trigger: Go,
1611
- Value: jo,
1612
- Viewport: Zo,
1613
- createSelectScope: Eo
2670
+ Arrow: gi,
2671
+ Content: ii,
2672
+ Group: ci,
2673
+ Icon: ri,
2674
+ Item: ui,
2675
+ ItemIndicator: pi,
2676
+ ItemText: di,
2677
+ Label: li,
2678
+ Portal: si,
2679
+ Root: ti,
2680
+ ScrollDownButton: hi,
2681
+ ScrollUpButton: fi,
2682
+ Select: qt,
2683
+ SelectArrow: fo,
2684
+ SelectContent: eo,
2685
+ SelectGroup: no,
2686
+ SelectIcon: Jt,
2687
+ SelectItem: so,
2688
+ SelectItemIndicator: ao,
2689
+ SelectItemText: io,
2690
+ SelectLabel: ro,
2691
+ SelectPortal: Qt,
2692
+ SelectScrollDownButton: lo,
2693
+ SelectScrollUpButton: co,
2694
+ SelectSeparator: po,
2695
+ SelectTrigger: Xt,
2696
+ SelectValue: Zt,
2697
+ SelectViewport: oo,
2698
+ Separator: mi,
2699
+ Trigger: oi,
2700
+ Value: ni,
2701
+ Viewport: ai,
2702
+ createSelectScope: Fs
1614
2703
  }, Symbol.toStringTag, { value: "Module" }));
1615
- function _n(o, i, { checkForDefaultPrevented: e = !0 } = {}) {
1616
- return function(n) {
1617
- if (o == null || o(n), e === !1 || !n.defaultPrevented)
1618
- return i == null ? void 0 : i(n);
2704
+ function ji(e, o, { checkForDefaultPrevented: t = !0 } = {}) {
2705
+ return function(r) {
2706
+ if (e == null || e(r), t === !1 || !r.defaultPrevented)
2707
+ return o == null ? void 0 : o(r);
1619
2708
  };
1620
2709
  }
1621
2710
  export {
1622
- Rn as Combobox,
1623
- An as Select,
1624
- _n as composeEventHandlers,
1625
- Jt as createCollection,
1626
- Io as useCallbackRef,
1627
- Qt as useCollator,
1628
- De as useFilter,
1629
- eo as usePrev
2711
+ Bi as Combobox,
2712
+ zi as Select,
2713
+ ji as composeEventHandlers,
2714
+ tr as createCollection,
2715
+ ks as useCallbackRef,
2716
+ or as useCollator,
2717
+ Lt as useFilter,
2718
+ nr as usePrev
1630
2719
  };