fansunited-widgets-cdn 0.0.84 → 0.0.86-RC1

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 (75) hide show
  1. package/chunks/Alert-CuOsmojH.js +149 -0
  2. package/chunks/AspectRatio-D3Sgxj7p.js +125 -0
  3. package/chunks/Avatar-BTsEKfhc.js +186 -0
  4. package/chunks/Button-BV7YIFkS.js +858 -0
  5. package/chunks/Card-DRIT0wtY.js +129 -0
  6. package/chunks/CardContent-CD-WZh1l.js +60 -0
  7. package/chunks/ChevronRight-BrCKlr3T.js +11 -0
  8. package/chunks/Chip-6HLNTHMI.js +281 -0
  9. package/chunks/ClassicQuizWrapper-t04e9_6c.js +4883 -0
  10. package/chunks/CollectLeadForm-DtmR2Vuf-B_3JkHJC.js +1560 -0
  11. package/chunks/CollectLeadWrapper-CVAVswua.js +1294 -0
  12. package/chunks/DialogActions-C5kAgHal.js +45 -0
  13. package/chunks/DialogContent-MIXff4nd.js +60 -0
  14. package/chunks/EitherOrById-CAo8gPjm.js +1496 -0
  15. package/chunks/EitherOrPreviewWrapper-DFi2bviS.js +47 -0
  16. package/chunks/Error-DhQL89pn-BwTV1meb.js +418 -0
  17. package/chunks/EventGameWrapper-BxyLL3eA.js +7633 -0
  18. package/chunks/Grid-Dpv_ZL23.js +279 -0
  19. package/chunks/IconButton-Lt9Xks7c.js +207 -0
  20. package/chunks/Link-DLuj1USf.js +228 -0
  21. package/chunks/List-DLPlZGTP.js +397 -0
  22. package/chunks/ListItemDecorator-CE2eQLip.js +1882 -0
  23. package/chunks/MatchPredictionContainer-Ct6gXvLw.js +751 -0
  24. package/chunks/MatchQuizWrapper-Fu6RfWVn.js +11046 -0
  25. package/chunks/ModalDialog-Ci3hulZA.js +619 -0
  26. package/chunks/NotFoundSkeleton-BYJTzYJR-Be3R34nS.js +2764 -0
  27. package/chunks/OverlayLeadAfterCollection-DnqztPJ5-CpELr0AC.js +896 -0
  28. package/chunks/OverlayScoreStateSkeleton-C9FUhcnd-DMFELrvA.js +146 -0
  29. package/chunks/PersonalityQuizWrapper-MpUK4n3Y.js +34374 -0
  30. package/chunks/PlayerOfTheMatch-D4vuR7pz.js +1406 -0
  31. package/chunks/PollWrapper-CzKj8xxE.js +4198 -0
  32. package/chunks/Portal-BWqqFvVm-TuHZWjxn.js +12717 -0
  33. package/chunks/Portal-DA1mxzSo.js +41 -0
  34. package/chunks/PreviewQuizById-WWS_LyJR.js +4864 -0
  35. package/chunks/Select-p_cHpLhi.js +3418 -0
  36. package/chunks/Sheet-BaCzogZK.js +167 -0
  37. package/chunks/Snackbar-DHxnbCA3.js +358 -0
  38. package/chunks/Stack-Dgf2LXN0.js +117 -0
  39. package/chunks/Tabs-CSu_cWNi.js +784 -0
  40. package/chunks/TeamNextMatchPrediction-C7HilNqW.js +6 -0
  41. package/chunks/Tutorial-DFNZxmAx.js +427 -0
  42. package/chunks/createLucideIcon-B6NxpYkb.js +79 -0
  43. package/chunks/createSvgIcon-7h7XC877.js +119 -0
  44. package/chunks/createSvgIcon-DVA0KIUd.js +2490 -0
  45. package/chunks/dataAttributeParser-CF9vxaVN.js +28 -0
  46. package/chunks/default-quiz-bg-CTzaADn7.js +4 -0
  47. package/chunks/getReactElementRef-BD-S8A24.js +25 -0
  48. package/chunks/index-24AwmTVJ.js +85 -0
  49. package/chunks/index-3vJS8JzK.js +63 -0
  50. package/chunks/index-BSD7mvEU.js +57 -0
  51. package/chunks/index-BU6iona7.js +57 -0
  52. package/chunks/index-BqCHiyI6.js +59 -0
  53. package/chunks/index-C5qRf4TV.js +20 -0
  54. package/chunks/index-C9MpfjqV.js +35 -0
  55. package/chunks/index-CMmQs5A5.js +56 -0
  56. package/chunks/index-CicEY2Jv.js +5 -0
  57. package/chunks/index-DNeawo0R.js +17 -0
  58. package/chunks/index-DePIySlY.js +29 -0
  59. package/chunks/index-DoRYU_1L.js +41 -0
  60. package/chunks/index-DvgG9XJj.js +20 -0
  61. package/chunks/index-QpZE-92Y.js +33 -0
  62. package/chunks/index-rgFj976B.js +17 -0
  63. package/chunks/index-tzsdMoo-.js +16 -0
  64. package/chunks/index.es-CHqz6mjo.js +6162 -0
  65. package/chunks/init-BEkECL0v.js +32 -0
  66. package/chunks/main-XP7dqk6g.js +39843 -0
  67. package/chunks/resolveProps-BfYZubfk.js +37 -0
  68. package/chunks/users-D_xgC4iQ.js +16 -0
  69. package/chunks/variantColorInheritance-DI3wUohX.js +28 -0
  70. package/fu-widgets-loader.es.js +76 -0
  71. package/fu-widgets-loader.js +1 -0
  72. package/fu-widgets.es.js +4 -0
  73. package/fu-widgets.iife.js +621 -682
  74. package/manifest.json +84 -0
  75. package/package.json +9 -2
@@ -0,0 +1,3418 @@
1
+ import { r as u, _ as ke, aa as Cr, ab as Sr, w as v, Z as xe, ac as Pr, P as Rr, ad as wr, ae as Or, af as Lr, a5 as Se, ag as kr, $ as lt, a0 as Ft, j as _, D as et, G as Ue, F as tt, v as dt, x as ue, y as J, E as Ut, z as me } from "./main-XP7dqk6g.js";
2
+ import { u as qt, r as Jt, I as Dr } from "./Button-BV7YIFkS.js";
3
+ import { u as $r, V as Er } from "./variantColorInheritance-DI3wUohX.js";
4
+ import { c as zr } from "./createSvgIcon-7h7XC877.js";
5
+ import { o as Dt } from "./getReactElementRef-BD-S8A24.js";
6
+ import { P as Br } from "./Portal-DA1mxzSo.js";
7
+ function Ha({
8
+ controlled: t,
9
+ default: e,
10
+ name: r,
11
+ state: n = "value"
12
+ }) {
13
+ const {
14
+ current: o
15
+ } = u.useRef(t !== void 0), [a, s] = u.useState(e), i = o ? t : a, l = u.useCallback((d) => {
16
+ o || s(d);
17
+ }, []);
18
+ return [i, l];
19
+ }
20
+ const Hr = {
21
+ border: 0,
22
+ clip: "rect(0 0 0 0)",
23
+ height: "1px",
24
+ margin: "-1px",
25
+ overflow: "hidden",
26
+ padding: 0,
27
+ position: "absolute",
28
+ whiteSpace: "nowrap",
29
+ width: "1px"
30
+ }, Vr = ["elementType", "externalSlotProps", "ownerState", "skipResolvingSlotProps"];
31
+ function Ar(t) {
32
+ var e;
33
+ const {
34
+ elementType: r,
35
+ externalSlotProps: n,
36
+ ownerState: o,
37
+ skipResolvingSlotProps: a = !1
38
+ } = t, s = ke(t, Vr), i = a ? {} : Cr(n, o), {
39
+ props: l,
40
+ internalRef: d
41
+ } = Sr(v({}, s, {
42
+ externalSlotProps: i
43
+ })), c = xe(d, i == null ? void 0 : i.ref, (e = t.additionalProps) == null ? void 0 : e.ref);
44
+ return Pr(r, v({}, l, {
45
+ ref: c
46
+ }), o);
47
+ }
48
+ const Va = () => {
49
+ const t = Rr(wr);
50
+ return t[Or] || t;
51
+ };
52
+ function $t(t, e, r = (n, o) => n === o) {
53
+ return t.length === e.length && t.every((n, o) => r(n, e[o]));
54
+ }
55
+ const Tr = {
56
+ disableDefaultClasses: !1
57
+ }, Mr = /* @__PURE__ */ u.createContext(Tr);
58
+ function Wr(t) {
59
+ const {
60
+ disableDefaultClasses: e
61
+ } = u.useContext(Mr);
62
+ return (r) => e ? "" : t(r);
63
+ }
64
+ const Xt = "base";
65
+ function _r(t) {
66
+ return `${Xt}--${t}`;
67
+ }
68
+ function jr(t, e) {
69
+ return `${Xt}-${t}-${e}`;
70
+ }
71
+ function Nr(t, e) {
72
+ const r = Lr[e];
73
+ return r ? _r(r) : jr(t, e);
74
+ }
75
+ function Fr(t, e) {
76
+ return t === e;
77
+ }
78
+ const gt = {}, Et = () => {
79
+ };
80
+ function ht(t, e) {
81
+ const r = v({}, t);
82
+ return Object.keys(e).forEach((n) => {
83
+ e[n] !== void 0 && (r[n] = e[n]);
84
+ }), r;
85
+ }
86
+ function Ur(t) {
87
+ const {
88
+ nextState: e,
89
+ initialState: r,
90
+ stateComparers: n,
91
+ onStateChange: o,
92
+ controlledProps: a,
93
+ lastActionRef: s
94
+ } = t, i = u.useRef(r);
95
+ u.useEffect(() => {
96
+ if (s.current === null)
97
+ return;
98
+ const l = ht(i.current, a);
99
+ Object.keys(e).forEach((d) => {
100
+ var c;
101
+ const f = (c = n[d]) != null ? c : Fr, g = e[d], p = l[d];
102
+ if (p == null && g != null || p != null && g == null || p != null && g != null && !f(g, p)) {
103
+ var m, h;
104
+ o == null || o((m = s.current.event) != null ? m : null, d, g, (h = s.current.type) != null ? h : "", e);
105
+ }
106
+ }), i.current = e, s.current = null;
107
+ }, [i, e, s, o, n, a]);
108
+ }
109
+ function qr(t) {
110
+ const e = u.useRef(null), {
111
+ reducer: r,
112
+ initialState: n,
113
+ controlledProps: o = gt,
114
+ stateComparers: a = gt,
115
+ onStateChange: s = Et,
116
+ actionContext: i
117
+ } = t;
118
+ u.useRef(o);
119
+ const l = u.useCallback((g, p) => {
120
+ e.current = p;
121
+ const m = ht(g, o);
122
+ return r(m, p);
123
+ }, [o, r]), [d, c] = u.useReducer(l, n), f = u.useCallback((g) => {
124
+ c(v({}, g, {
125
+ context: i
126
+ }));
127
+ }, [i]);
128
+ return Ur({
129
+ nextState: d,
130
+ initialState: n,
131
+ stateComparers: a ?? gt,
132
+ onStateChange: s ?? Et,
133
+ controlledProps: o,
134
+ lastActionRef: e
135
+ }), [ht(d, o), f];
136
+ }
137
+ const Jr = /* @__PURE__ */ u.createContext(void 0);
138
+ function Xr() {
139
+ return u.useContext(Jr);
140
+ }
141
+ function Kr(t = {}) {
142
+ const {
143
+ defaultValue: e,
144
+ disabled: r = !1,
145
+ error: n = !1,
146
+ onBlur: o,
147
+ onChange: a,
148
+ onFocus: s,
149
+ required: i = !1,
150
+ value: l,
151
+ inputRef: d
152
+ } = t, c = Xr();
153
+ let f, g, p, m, h;
154
+ if (c) {
155
+ var b, S, P;
156
+ f = void 0, g = (b = c.disabled) != null ? b : !1, p = (S = c.error) != null ? S : !1, m = (P = c.required) != null ? P : !1, h = c.value;
157
+ } else
158
+ f = e, g = r, p = n, m = i, h = l;
159
+ const {
160
+ current: w
161
+ } = u.useRef(h != null), y = u.useCallback((H) => {
162
+ }, []), C = u.useRef(null), R = xe(C, d, y), [L, D] = u.useState(!1);
163
+ u.useEffect(() => {
164
+ !c && g && L && (D(!1), o == null || o());
165
+ }, [c, g, L, o]);
166
+ const $ = (H) => (k) => {
167
+ var O;
168
+ if (c != null && c.disabled) {
169
+ k.stopPropagation();
170
+ return;
171
+ }
172
+ if ((O = H.onFocus) == null || O.call(H, k), c && c.onFocus) {
173
+ var V;
174
+ c == null || (V = c.onFocus) == null || V.call(c);
175
+ } else
176
+ D(!0);
177
+ }, E = (H) => (k) => {
178
+ var O;
179
+ (O = H.onBlur) == null || O.call(H, k), c && c.onBlur ? c.onBlur() : D(!1);
180
+ }, M = (H) => (k, ...O) => {
181
+ var V, j;
182
+ if (!w && (k.target || C.current) == null)
183
+ throw new Error(kr(17));
184
+ c == null || (V = c.onChange) == null || V.call(c, k), (j = H.onChange) == null || j.call(H, k, ...O);
185
+ }, T = (H) => (k) => {
186
+ var O;
187
+ C.current && k.currentTarget === k.target && C.current.focus(), (O = H.onClick) == null || O.call(H, k);
188
+ };
189
+ return {
190
+ disabled: g,
191
+ error: p,
192
+ focused: L,
193
+ formControlContext: c,
194
+ getInputProps: (H = {}) => {
195
+ const O = v({}, {
196
+ onBlur: o,
197
+ onChange: a,
198
+ onFocus: s
199
+ }, Se(H)), V = v({}, O, {
200
+ onBlur: E(O),
201
+ onChange: M(O),
202
+ onFocus: $(O)
203
+ });
204
+ return v({}, V, {
205
+ "aria-invalid": p || void 0,
206
+ defaultValue: f,
207
+ value: h,
208
+ required: m,
209
+ disabled: g
210
+ }, H, {
211
+ ref: R
212
+ }, V);
213
+ },
214
+ getRootProps: (H = {}) => {
215
+ const k = Se(t, ["onBlur", "onChange", "onFocus"]), O = v({}, k, Se(H));
216
+ return v({}, H, O, {
217
+ onClick: T(O)
218
+ });
219
+ },
220
+ inputRef: R,
221
+ required: m,
222
+ value: h
223
+ };
224
+ }
225
+ const q = {
226
+ blur: "list:blur",
227
+ itemClick: "list:itemClick",
228
+ itemHover: "list:itemHover",
229
+ itemsChange: "list:itemsChange",
230
+ keyDown: "list:keyDown",
231
+ resetHighlight: "list:resetHighlight",
232
+ highlightLast: "list:highlightLast",
233
+ textNavigation: "list:textNavigation",
234
+ clearSelection: "list:clearSelection"
235
+ };
236
+ function Yr(t, e, r, n, o, a) {
237
+ if (r.length === 0 || !n && r.every((i, l) => o(i, l)))
238
+ return -1;
239
+ let s = t;
240
+ for (; ; ) {
241
+ if (!a && e === "next" && s === r.length || !a && e === "previous" && s === -1)
242
+ return -1;
243
+ if (n ? !1 : o(r[s], s))
244
+ s += e === "next" ? 1 : -1, a && (s = (s + r.length) % r.length);
245
+ else
246
+ return s;
247
+ }
248
+ }
249
+ function Y(t, e, r) {
250
+ var n;
251
+ const {
252
+ items: o,
253
+ isItemDisabled: a,
254
+ disableListWrap: s,
255
+ disabledItemsFocusable: i,
256
+ itemComparer: l,
257
+ focusManagement: d
258
+ } = r, c = d === "DOM" ? 0 : -1, f = o.length - 1, g = t == null ? -1 : o.findIndex((S) => l(S, t));
259
+ let p, m, h = !s;
260
+ switch (e) {
261
+ case "reset":
262
+ if (c === -1)
263
+ return null;
264
+ p = 0, m = "next", h = !1;
265
+ break;
266
+ case "start":
267
+ p = 0, m = "next", h = !1;
268
+ break;
269
+ case "end":
270
+ p = f, m = "previous", h = !1;
271
+ break;
272
+ default: {
273
+ const S = g + e;
274
+ S < 0 ? !h && g !== -1 || Math.abs(e) > 1 ? (p = 0, m = "next") : (p = f, m = "previous") : S > f ? !h || Math.abs(e) > 1 ? (p = f, m = "previous") : (p = 0, m = "next") : (p = S, m = e >= 0 ? "next" : "previous");
275
+ }
276
+ }
277
+ const b = Yr(p, m, o, i, a, h);
278
+ return b === -1 && t !== null && !a(t, g) ? t : (n = o[b]) != null ? n : null;
279
+ }
280
+ function Gr(t, e, r, n) {
281
+ return r === "none" ? [] : r === "single" ? n(e[0], t) ? e : [t] : e.some((o) => n(o, t)) ? e.filter((o) => !n(o, t)) : [...e, t];
282
+ }
283
+ function yt(t, e, r) {
284
+ const {
285
+ itemComparer: n,
286
+ isItemDisabled: o,
287
+ selectionMode: a,
288
+ items: s
289
+ } = r, {
290
+ selectedValues: i
291
+ } = e, l = s.findIndex((c) => n(t, c));
292
+ if (o(t, l))
293
+ return e;
294
+ const d = Gr(t, i, a, n);
295
+ return v({}, e, {
296
+ selectedValues: d,
297
+ highlightedValue: t
298
+ });
299
+ }
300
+ function Zr(t, e, r) {
301
+ const n = e.highlightedValue, {
302
+ orientation: o,
303
+ pageSize: a
304
+ } = r;
305
+ switch (t) {
306
+ case "Home":
307
+ return v({}, e, {
308
+ highlightedValue: Y(n, "start", r)
309
+ });
310
+ case "End":
311
+ return v({}, e, {
312
+ highlightedValue: Y(n, "end", r)
313
+ });
314
+ case "PageUp":
315
+ return v({}, e, {
316
+ highlightedValue: Y(n, -a, r)
317
+ });
318
+ case "PageDown":
319
+ return v({}, e, {
320
+ highlightedValue: Y(n, a, r)
321
+ });
322
+ case "ArrowUp":
323
+ if (o !== "vertical")
324
+ break;
325
+ return v({}, e, {
326
+ highlightedValue: Y(n, -1, r)
327
+ });
328
+ case "ArrowDown":
329
+ if (o !== "vertical")
330
+ break;
331
+ return v({}, e, {
332
+ highlightedValue: Y(n, 1, r)
333
+ });
334
+ case "ArrowLeft": {
335
+ if (o === "vertical")
336
+ break;
337
+ return v({}, e, {
338
+ highlightedValue: Y(n, o === "horizontal-ltr" ? -1 : 1, r)
339
+ });
340
+ }
341
+ case "ArrowRight": {
342
+ if (o === "vertical")
343
+ break;
344
+ return v({}, e, {
345
+ highlightedValue: Y(n, o === "horizontal-ltr" ? 1 : -1, r)
346
+ });
347
+ }
348
+ case "Enter":
349
+ case " ":
350
+ return e.highlightedValue === null ? e : yt(e.highlightedValue, e, r);
351
+ }
352
+ return e;
353
+ }
354
+ function Qr(t, e) {
355
+ return e.focusManagement === "DOM" ? t : v({}, t, {
356
+ highlightedValue: null
357
+ });
358
+ }
359
+ function en(t, e, r) {
360
+ var n;
361
+ const o = (n = r(t)) == null ? void 0 : n.trim().toLowerCase();
362
+ return !o || o.length === 0 ? !1 : o.indexOf(e) === 0;
363
+ }
364
+ function tn(t, e, r) {
365
+ const {
366
+ items: n,
367
+ isItemDisabled: o,
368
+ disabledItemsFocusable: a,
369
+ getItemAsString: s
370
+ } = r, i = e.length > 1;
371
+ let l = i ? t.highlightedValue : Y(t.highlightedValue, 1, r);
372
+ for (let d = 0; d < n.length; d += 1) {
373
+ if (!l || !i && t.highlightedValue === l)
374
+ return t;
375
+ if (en(l, e, s) && (!o(l, n.indexOf(l)) || a))
376
+ return v({}, t, {
377
+ highlightedValue: l
378
+ });
379
+ l = Y(l, 1, r);
380
+ }
381
+ return t;
382
+ }
383
+ function rn(t, e, r, n) {
384
+ var o;
385
+ const {
386
+ itemComparer: a,
387
+ focusManagement: s
388
+ } = n;
389
+ let i = null;
390
+ if (r.highlightedValue != null) {
391
+ var l;
392
+ i = (l = t.find((f) => a(f, r.highlightedValue))) != null ? l : null;
393
+ } else s === "DOM" && e.length === 0 && (i = Y(null, "reset", n));
394
+ const c = ((o = r.selectedValues) != null ? o : []).filter((f) => t.some((g) => a(g, f)));
395
+ return v({}, r, {
396
+ highlightedValue: i,
397
+ selectedValues: c
398
+ });
399
+ }
400
+ function nn(t, e) {
401
+ return v({}, t, {
402
+ highlightedValue: Y(null, "reset", e)
403
+ });
404
+ }
405
+ function on(t, e) {
406
+ return v({}, t, {
407
+ highlightedValue: Y(null, "end", e)
408
+ });
409
+ }
410
+ function an(t, e) {
411
+ return v({}, t, {
412
+ selectedValues: [],
413
+ highlightedValue: Y(null, "reset", e)
414
+ });
415
+ }
416
+ function Kt(t, e) {
417
+ const {
418
+ type: r,
419
+ context: n
420
+ } = e;
421
+ switch (r) {
422
+ case q.keyDown:
423
+ return Zr(e.key, t, n);
424
+ case q.itemClick:
425
+ return yt(e.item, t, n);
426
+ case q.blur:
427
+ return Qr(t, n);
428
+ case q.textNavigation:
429
+ return tn(t, e.searchString, n);
430
+ case q.itemsChange:
431
+ return rn(e.items, e.previousItems, t, n);
432
+ case q.resetHighlight:
433
+ return nn(t, n);
434
+ case q.highlightLast:
435
+ return on(t, n);
436
+ case q.clearSelection:
437
+ return an(t, n);
438
+ default:
439
+ return t;
440
+ }
441
+ }
442
+ const ln = 500;
443
+ function sn(t) {
444
+ const e = u.useRef({
445
+ searchString: "",
446
+ lastTime: null
447
+ });
448
+ return u.useCallback((r) => {
449
+ if (r.key.length === 1 && r.key !== " ") {
450
+ const n = e.current, o = r.key.toLowerCase(), a = performance.now();
451
+ n.searchString.length > 0 && n.lastTime && a - n.lastTime > ln ? n.searchString = o : (n.searchString.length !== 1 || o !== n.searchString) && (n.searchString += o), n.lastTime = a, t(n.searchString, r);
452
+ }
453
+ }, [t]);
454
+ }
455
+ const zt = {}, cn = () => {
456
+ }, un = (t, e) => t === e, dn = () => !1, pn = (t) => typeof t == "string" ? t : String(t), fn = () => ({
457
+ highlightedValue: null,
458
+ selectedValues: []
459
+ });
460
+ function vn(t) {
461
+ const {
462
+ controlledProps: e = zt,
463
+ disabledItemsFocusable: r = !1,
464
+ disableListWrap: n = !1,
465
+ focusManagement: o = "activeDescendant",
466
+ getInitialState: a = fn,
467
+ getItemDomElement: s,
468
+ getItemId: i,
469
+ isItemDisabled: l = dn,
470
+ rootRef: d,
471
+ onStateChange: c = cn,
472
+ items: f,
473
+ itemComparer: g = un,
474
+ getItemAsString: p = pn,
475
+ onChange: m,
476
+ onHighlightChange: h,
477
+ onItemsChange: b,
478
+ orientation: S = "vertical",
479
+ pageSize: P = 5,
480
+ reducerActionContext: w = zt,
481
+ selectionMode: y = "single",
482
+ stateReducer: C,
483
+ componentName: R = "useList"
484
+ } = t, L = u.useRef(null), D = xe(d, L), $ = u.useCallback((z, B, N) => {
485
+ if (h == null || h(z, B, N), o === "DOM" && B != null && (N === q.itemClick || N === q.keyDown || N === q.textNavigation)) {
486
+ var U;
487
+ s == null || (U = s(B)) == null || U.focus();
488
+ }
489
+ }, [s, h, o]), E = u.useMemo(() => ({
490
+ highlightedValue: g,
491
+ selectedValues: (z, B) => $t(z, B, g)
492
+ }), [g]), M = u.useCallback((z, B, N, U, ne) => {
493
+ switch (c == null || c(z, B, N, U, ne), B) {
494
+ case "highlightedValue":
495
+ $(z, N, U);
496
+ break;
497
+ case "selectedValues":
498
+ m == null || m(z, N, U);
499
+ break;
500
+ }
501
+ }, [$, m, c]), T = u.useMemo(() => ({
502
+ disabledItemsFocusable: r,
503
+ disableListWrap: n,
504
+ focusManagement: o,
505
+ isItemDisabled: l,
506
+ itemComparer: g,
507
+ items: f,
508
+ getItemAsString: p,
509
+ onHighlightChange: $,
510
+ orientation: S,
511
+ pageSize: P,
512
+ selectionMode: y,
513
+ stateComparers: E
514
+ }), [r, n, o, l, g, f, p, $, S, P, y, E]), W = a(), F = C ?? Kt, H = u.useMemo(() => v({}, w, T), [w, T]), [k, O] = qr({
515
+ reducer: F,
516
+ actionContext: H,
517
+ initialState: W,
518
+ controlledProps: e,
519
+ stateComparers: E,
520
+ onStateChange: M
521
+ }), {
522
+ highlightedValue: V,
523
+ selectedValues: j
524
+ } = k, Z = sn((z, B) => O({
525
+ type: q.textNavigation,
526
+ event: B,
527
+ searchString: z
528
+ })), Q = u.useRef([]);
529
+ u.useEffect(() => {
530
+ $t(Q.current, f, g) || (O({
531
+ type: q.itemsChange,
532
+ event: null,
533
+ items: f,
534
+ previousItems: Q.current
535
+ }), Q.current = f, b == null || b(f));
536
+ }, [f, g, O, b]);
537
+ const ee = (z) => (B) => {
538
+ var N;
539
+ if ((N = z.onKeyDown) == null || N.call(z, B), B.defaultMuiPrevented)
540
+ return;
541
+ const U = ["Home", "End", "PageUp", "PageDown"];
542
+ S === "vertical" ? U.push("ArrowUp", "ArrowDown") : U.push("ArrowLeft", "ArrowRight"), o === "activeDescendant" && U.push(" ", "Enter"), U.includes(B.key) && B.preventDefault(), O({
543
+ type: q.keyDown,
544
+ key: B.key,
545
+ event: B
546
+ }), Z(B);
547
+ }, te = (z) => (B) => {
548
+ var N, U;
549
+ (N = z.onBlur) == null || N.call(z, B), !B.defaultMuiPrevented && ((U = L.current) != null && U.contains(B.relatedTarget) || O({
550
+ type: q.blur,
551
+ event: B
552
+ }));
553
+ }, re = (z = {}) => {
554
+ const B = Se(z);
555
+ return v({}, z, {
556
+ "aria-activedescendant": o === "activeDescendant" && V != null ? i(V) : void 0,
557
+ tabIndex: o === "DOM" ? -1 : 0,
558
+ ref: D
559
+ }, B, {
560
+ onBlur: te(B),
561
+ onKeyDown: ee(B)
562
+ });
563
+ }, X = u.useCallback((z) => {
564
+ const B = (j ?? []).some((ne) => ne != null && g(z, ne)), N = V != null && g(z, V);
565
+ return {
566
+ focusable: o === "DOM",
567
+ highlighted: N,
568
+ selected: B
569
+ };
570
+ }, [g, j, V, o]), le = u.useMemo(() => ({
571
+ dispatch: O,
572
+ getItemState: X
573
+ }), [O, X]);
574
+ return u.useDebugValue({
575
+ state: k
576
+ }), {
577
+ contextValue: le,
578
+ dispatch: O,
579
+ getRootProps: re,
580
+ rootRef: D,
581
+ state: k
582
+ };
583
+ }
584
+ const pt = /* @__PURE__ */ u.createContext(null);
585
+ function gn(t) {
586
+ const {
587
+ handlePointerOverEvents: e = !1,
588
+ item: r
589
+ } = t, n = u.useContext(pt);
590
+ if (!n)
591
+ throw new Error("useListItem must be used within a ListProvider");
592
+ const {
593
+ dispatch: o,
594
+ getItemState: a
595
+ } = n, {
596
+ highlighted: s,
597
+ selected: i,
598
+ focusable: l
599
+ } = a(r), d = u.useCallback((p) => (m) => {
600
+ var h;
601
+ (h = p.onClick) == null || h.call(p, m), !m.defaultPrevented && o({
602
+ type: q.itemClick,
603
+ item: r,
604
+ event: m
605
+ });
606
+ }, [o, r]), c = u.useCallback((p) => (m) => {
607
+ var h;
608
+ (h = p.onMouseOver) == null || h.call(p, m), !m.defaultPrevented && o({
609
+ type: q.itemHover,
610
+ item: r,
611
+ event: m
612
+ });
613
+ }, [o, r]);
614
+ let f;
615
+ return l && (f = s ? 0 : -1), {
616
+ getRootProps: (p = {}) => {
617
+ const m = Se(p);
618
+ return v({}, p, {
619
+ onClick: d(m),
620
+ onPointerOver: e ? c(m) : void 0,
621
+ tabIndex: f
622
+ });
623
+ },
624
+ highlighted: s,
625
+ selected: i
626
+ };
627
+ }
628
+ const Yt = /* @__PURE__ */ u.createContext(null);
629
+ function hn(t) {
630
+ const e = Array.from(t.keys()).map((r) => {
631
+ const n = t.get(r);
632
+ return {
633
+ key: r,
634
+ subitem: n
635
+ };
636
+ });
637
+ return e.sort((r, n) => {
638
+ const o = r.subitem.ref.current, a = n.subitem.ref.current;
639
+ return o === null || a === null || o === a ? 0 : o.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING ? 1 : -1;
640
+ }), new Map(e.map((r) => [r.key, r.subitem]));
641
+ }
642
+ function mn() {
643
+ const [t, e] = u.useState(/* @__PURE__ */ new Map()), r = u.useRef(/* @__PURE__ */ new Set()), n = u.useCallback(function(d) {
644
+ r.current.delete(d), e((c) => {
645
+ const f = new Map(c);
646
+ return f.delete(d), f;
647
+ });
648
+ }, []), o = u.useCallback(function(d, c) {
649
+ let f;
650
+ return typeof d == "function" ? f = d(r.current) : f = d, r.current.add(f), e((g) => {
651
+ const p = new Map(g);
652
+ return p.set(f, c), p;
653
+ }), {
654
+ id: f,
655
+ deregister: () => n(f)
656
+ };
657
+ }, [n]), a = u.useMemo(() => hn(t), [t]), s = u.useCallback(function(d) {
658
+ return Array.from(a.keys()).indexOf(d);
659
+ }, [a]);
660
+ return {
661
+ contextValue: u.useMemo(() => ({
662
+ getItemIndex: s,
663
+ registerItem: o,
664
+ totalSubitemCount: t.size
665
+ }), [s, o, t.size]),
666
+ subitems: a
667
+ };
668
+ }
669
+ function bn(t, e) {
670
+ const r = u.useContext(Yt);
671
+ if (r === null)
672
+ throw new Error("useCompoundItem must be used within a useCompoundParent");
673
+ const {
674
+ registerItem: n
675
+ } = r, [o, a] = u.useState(typeof t == "function" ? void 0 : t);
676
+ return lt(() => {
677
+ const {
678
+ id: s,
679
+ deregister: i
680
+ } = n(t, e);
681
+ return a(s), i;
682
+ }, [n, e, t]), {
683
+ id: o,
684
+ index: o !== void 0 ? r.getItemIndex(o) : -1,
685
+ totalItemCount: r.totalSubitemCount
686
+ };
687
+ }
688
+ function st(t, e) {
689
+ return function(n = {}) {
690
+ const o = v({}, n, t(n));
691
+ return v({}, o, e(o));
692
+ };
693
+ }
694
+ function xn(t) {
695
+ const {
696
+ value: e,
697
+ label: r,
698
+ disabled: n,
699
+ rootRef: o,
700
+ id: a
701
+ } = t, {
702
+ getRootProps: s,
703
+ highlighted: i,
704
+ selected: l
705
+ } = gn({
706
+ item: e
707
+ }), {
708
+ getRootProps: d,
709
+ rootRef: c
710
+ } = qt({
711
+ disabled: n,
712
+ focusableWhenDisabled: !0
713
+ }), f = Ft(a), g = u.useRef(null), p = u.useMemo(() => ({
714
+ disabled: n,
715
+ label: r,
716
+ value: e,
717
+ ref: g,
718
+ id: f
719
+ }), [n, r, e, f]), {
720
+ index: m
721
+ } = bn(e, p), h = xe(o, g, c), b = (P) => (w) => {
722
+ var y;
723
+ (y = P.onKeyDown) == null || y.call(P, w), !w.defaultMuiPrevented && [" ", "Enter"].includes(w.key) && (w.defaultMuiPrevented = !0);
724
+ }, S = (P = {}) => ({
725
+ onKeyDown: b(P)
726
+ });
727
+ return {
728
+ getRootProps: (P = {}) => {
729
+ const w = Se(P), y = st(s, st(d, S));
730
+ return v({}, P, w, y(w), {
731
+ id: f,
732
+ ref: h,
733
+ role: "option",
734
+ "aria-selected": l
735
+ });
736
+ },
737
+ highlighted: i,
738
+ index: m,
739
+ selected: l,
740
+ rootRef: h
741
+ };
742
+ }
743
+ function yn(t) {
744
+ const e = u.useContext(pt);
745
+ if (!e)
746
+ throw new Error("Option: ListContext was not found.");
747
+ const {
748
+ getItemState: r,
749
+ dispatch: n
750
+ } = e, {
751
+ highlighted: o,
752
+ selected: a,
753
+ focusable: s
754
+ } = r(t), i = u.useCallback((d) => {
755
+ if (d !== t)
756
+ throw new Error(["Base UI Option: Tried to access the state of another Option.", "This is unsupported when the Option uses the OptionContextStabilizer as a performance optimization."].join("/n"));
757
+ return {
758
+ highlighted: o,
759
+ selected: a,
760
+ focusable: s
761
+ };
762
+ }, [o, a, s, t]);
763
+ return {
764
+ contextValue: u.useMemo(() => ({
765
+ dispatch: n,
766
+ getItemState: i
767
+ }), [n, i])
768
+ };
769
+ }
770
+ var ae = "top", pe = "bottom", fe = "right", ie = "left", It = "auto", rt = [ae, pe, fe, ie], _e = "start", Ze = "end", In = "clippingParents", Gt = "viewport", Ke = "popper", Cn = "reference", Bt = /* @__PURE__ */ rt.reduce(function(t, e) {
771
+ return t.concat([e + "-" + _e, e + "-" + Ze]);
772
+ }, []), Zt = /* @__PURE__ */ [].concat(rt, [It]).reduce(function(t, e) {
773
+ return t.concat([e, e + "-" + _e, e + "-" + Ze]);
774
+ }, []), Sn = "beforeRead", Pn = "read", Rn = "afterRead", wn = "beforeMain", On = "main", Ln = "afterMain", kn = "beforeWrite", Dn = "write", $n = "afterWrite", En = [Sn, Pn, Rn, wn, On, Ln, kn, Dn, $n];
775
+ function ye(t) {
776
+ return t ? (t.nodeName || "").toLowerCase() : null;
777
+ }
778
+ function ce(t) {
779
+ if (t == null)
780
+ return window;
781
+ if (t.toString() !== "[object Window]") {
782
+ var e = t.ownerDocument;
783
+ return e && e.defaultView || window;
784
+ }
785
+ return t;
786
+ }
787
+ function He(t) {
788
+ var e = ce(t).Element;
789
+ return t instanceof e || t instanceof Element;
790
+ }
791
+ function de(t) {
792
+ var e = ce(t).HTMLElement;
793
+ return t instanceof e || t instanceof HTMLElement;
794
+ }
795
+ function Ct(t) {
796
+ if (typeof ShadowRoot > "u")
797
+ return !1;
798
+ var e = ce(t).ShadowRoot;
799
+ return t instanceof e || t instanceof ShadowRoot;
800
+ }
801
+ function zn(t) {
802
+ var e = t.state;
803
+ Object.keys(e.elements).forEach(function(r) {
804
+ var n = e.styles[r] || {}, o = e.attributes[r] || {}, a = e.elements[r];
805
+ !de(a) || !ye(a) || (Object.assign(a.style, n), Object.keys(o).forEach(function(s) {
806
+ var i = o[s];
807
+ i === !1 ? a.removeAttribute(s) : a.setAttribute(s, i === !0 ? "" : i);
808
+ }));
809
+ });
810
+ }
811
+ function Bn(t) {
812
+ var e = t.state, r = {
813
+ popper: {
814
+ position: e.options.strategy,
815
+ left: "0",
816
+ top: "0",
817
+ margin: "0"
818
+ },
819
+ arrow: {
820
+ position: "absolute"
821
+ },
822
+ reference: {}
823
+ };
824
+ return Object.assign(e.elements.popper.style, r.popper), e.styles = r, e.elements.arrow && Object.assign(e.elements.arrow.style, r.arrow), function() {
825
+ Object.keys(e.elements).forEach(function(n) {
826
+ var o = e.elements[n], a = e.attributes[n] || {}, s = Object.keys(e.styles.hasOwnProperty(n) ? e.styles[n] : r[n]), i = s.reduce(function(l, d) {
827
+ return l[d] = "", l;
828
+ }, {});
829
+ !de(o) || !ye(o) || (Object.assign(o.style, i), Object.keys(a).forEach(function(l) {
830
+ o.removeAttribute(l);
831
+ }));
832
+ });
833
+ };
834
+ }
835
+ const Hn = {
836
+ name: "applyStyles",
837
+ enabled: !0,
838
+ phase: "write",
839
+ fn: zn,
840
+ effect: Bn,
841
+ requires: ["computeStyles"]
842
+ };
843
+ function be(t) {
844
+ return t.split("-")[0];
845
+ }
846
+ var Be = Math.max, ct = Math.min, je = Math.round;
847
+ function mt() {
848
+ var t = navigator.userAgentData;
849
+ return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
850
+ return e.brand + "/" + e.version;
851
+ }).join(" ") : navigator.userAgent;
852
+ }
853
+ function Qt() {
854
+ return !/^((?!chrome|android).)*safari/i.test(mt());
855
+ }
856
+ function Ne(t, e, r) {
857
+ e === void 0 && (e = !1), r === void 0 && (r = !1);
858
+ var n = t.getBoundingClientRect(), o = 1, a = 1;
859
+ e && de(t) && (o = t.offsetWidth > 0 && je(n.width) / t.offsetWidth || 1, a = t.offsetHeight > 0 && je(n.height) / t.offsetHeight || 1);
860
+ var s = He(t) ? ce(t) : window, i = s.visualViewport, l = !Qt() && r, d = (n.left + (l && i ? i.offsetLeft : 0)) / o, c = (n.top + (l && i ? i.offsetTop : 0)) / a, f = n.width / o, g = n.height / a;
861
+ return {
862
+ width: f,
863
+ height: g,
864
+ top: c,
865
+ right: d + f,
866
+ bottom: c + g,
867
+ left: d,
868
+ x: d,
869
+ y: c
870
+ };
871
+ }
872
+ function St(t) {
873
+ var e = Ne(t), r = t.offsetWidth, n = t.offsetHeight;
874
+ return Math.abs(e.width - r) <= 1 && (r = e.width), Math.abs(e.height - n) <= 1 && (n = e.height), {
875
+ x: t.offsetLeft,
876
+ y: t.offsetTop,
877
+ width: r,
878
+ height: n
879
+ };
880
+ }
881
+ function er(t, e) {
882
+ var r = e.getRootNode && e.getRootNode();
883
+ if (t.contains(e))
884
+ return !0;
885
+ if (r && Ct(r)) {
886
+ var n = e;
887
+ do {
888
+ if (n && t.isSameNode(n))
889
+ return !0;
890
+ n = n.parentNode || n.host;
891
+ } while (n);
892
+ }
893
+ return !1;
894
+ }
895
+ function Pe(t) {
896
+ return ce(t).getComputedStyle(t);
897
+ }
898
+ function Vn(t) {
899
+ return ["table", "td", "th"].indexOf(ye(t)) >= 0;
900
+ }
901
+ function De(t) {
902
+ return ((He(t) ? t.ownerDocument : (
903
+ // $FlowFixMe[prop-missing]
904
+ t.document
905
+ )) || window.document).documentElement;
906
+ }
907
+ function ft(t) {
908
+ return ye(t) === "html" ? t : (
909
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
910
+ // $FlowFixMe[incompatible-return]
911
+ // $FlowFixMe[prop-missing]
912
+ t.assignedSlot || // step into the shadow DOM of the parent of a slotted node
913
+ t.parentNode || // DOM Element detected
914
+ (Ct(t) ? t.host : null) || // ShadowRoot detected
915
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
916
+ De(t)
917
+ );
918
+ }
919
+ function Ht(t) {
920
+ return !de(t) || // https://github.com/popperjs/popper-core/issues/837
921
+ Pe(t).position === "fixed" ? null : t.offsetParent;
922
+ }
923
+ function An(t) {
924
+ var e = /firefox/i.test(mt()), r = /Trident/i.test(mt());
925
+ if (r && de(t)) {
926
+ var n = Pe(t);
927
+ if (n.position === "fixed")
928
+ return null;
929
+ }
930
+ var o = ft(t);
931
+ for (Ct(o) && (o = o.host); de(o) && ["html", "body"].indexOf(ye(o)) < 0; ) {
932
+ var a = Pe(o);
933
+ if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || e && a.willChange === "filter" || e && a.filter && a.filter !== "none")
934
+ return o;
935
+ o = o.parentNode;
936
+ }
937
+ return null;
938
+ }
939
+ function nt(t) {
940
+ for (var e = ce(t), r = Ht(t); r && Vn(r) && Pe(r).position === "static"; )
941
+ r = Ht(r);
942
+ return r && (ye(r) === "html" || ye(r) === "body" && Pe(r).position === "static") ? e : r || An(t) || e;
943
+ }
944
+ function Pt(t) {
945
+ return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
946
+ }
947
+ function Ye(t, e, r) {
948
+ return Be(t, ct(e, r));
949
+ }
950
+ function Tn(t, e, r) {
951
+ var n = Ye(t, e, r);
952
+ return n > r ? r : n;
953
+ }
954
+ function tr() {
955
+ return {
956
+ top: 0,
957
+ right: 0,
958
+ bottom: 0,
959
+ left: 0
960
+ };
961
+ }
962
+ function rr(t) {
963
+ return Object.assign({}, tr(), t);
964
+ }
965
+ function nr(t, e) {
966
+ return e.reduce(function(r, n) {
967
+ return r[n] = t, r;
968
+ }, {});
969
+ }
970
+ var Mn = function(e, r) {
971
+ return e = typeof e == "function" ? e(Object.assign({}, r.rects, {
972
+ placement: r.placement
973
+ })) : e, rr(typeof e != "number" ? e : nr(e, rt));
974
+ };
975
+ function Wn(t) {
976
+ var e, r = t.state, n = t.name, o = t.options, a = r.elements.arrow, s = r.modifiersData.popperOffsets, i = be(r.placement), l = Pt(i), d = [ie, fe].indexOf(i) >= 0, c = d ? "height" : "width";
977
+ if (!(!a || !s)) {
978
+ var f = Mn(o.padding, r), g = St(a), p = l === "y" ? ae : ie, m = l === "y" ? pe : fe, h = r.rects.reference[c] + r.rects.reference[l] - s[l] - r.rects.popper[c], b = s[l] - r.rects.reference[l], S = nt(a), P = S ? l === "y" ? S.clientHeight || 0 : S.clientWidth || 0 : 0, w = h / 2 - b / 2, y = f[p], C = P - g[c] - f[m], R = P / 2 - g[c] / 2 + w, L = Ye(y, R, C), D = l;
979
+ r.modifiersData[n] = (e = {}, e[D] = L, e.centerOffset = L - R, e);
980
+ }
981
+ }
982
+ function _n(t) {
983
+ var e = t.state, r = t.options, n = r.element, o = n === void 0 ? "[data-popper-arrow]" : n;
984
+ o != null && (typeof o == "string" && (o = e.elements.popper.querySelector(o), !o) || er(e.elements.popper, o) && (e.elements.arrow = o));
985
+ }
986
+ const jn = {
987
+ name: "arrow",
988
+ enabled: !0,
989
+ phase: "main",
990
+ fn: Wn,
991
+ effect: _n,
992
+ requires: ["popperOffsets"],
993
+ requiresIfExists: ["preventOverflow"]
994
+ };
995
+ function Fe(t) {
996
+ return t.split("-")[1];
997
+ }
998
+ var Nn = {
999
+ top: "auto",
1000
+ right: "auto",
1001
+ bottom: "auto",
1002
+ left: "auto"
1003
+ };
1004
+ function Fn(t, e) {
1005
+ var r = t.x, n = t.y, o = e.devicePixelRatio || 1;
1006
+ return {
1007
+ x: je(r * o) / o || 0,
1008
+ y: je(n * o) / o || 0
1009
+ };
1010
+ }
1011
+ function Vt(t) {
1012
+ var e, r = t.popper, n = t.popperRect, o = t.placement, a = t.variation, s = t.offsets, i = t.position, l = t.gpuAcceleration, d = t.adaptive, c = t.roundOffsets, f = t.isFixed, g = s.x, p = g === void 0 ? 0 : g, m = s.y, h = m === void 0 ? 0 : m, b = typeof c == "function" ? c({
1013
+ x: p,
1014
+ y: h
1015
+ }) : {
1016
+ x: p,
1017
+ y: h
1018
+ };
1019
+ p = b.x, h = b.y;
1020
+ var S = s.hasOwnProperty("x"), P = s.hasOwnProperty("y"), w = ie, y = ae, C = window;
1021
+ if (d) {
1022
+ var R = nt(r), L = "clientHeight", D = "clientWidth";
1023
+ if (R === ce(r) && (R = De(r), Pe(R).position !== "static" && i === "absolute" && (L = "scrollHeight", D = "scrollWidth")), R = R, o === ae || (o === ie || o === fe) && a === Ze) {
1024
+ y = pe;
1025
+ var $ = f && R === C && C.visualViewport ? C.visualViewport.height : (
1026
+ // $FlowFixMe[prop-missing]
1027
+ R[L]
1028
+ );
1029
+ h -= $ - n.height, h *= l ? 1 : -1;
1030
+ }
1031
+ if (o === ie || (o === ae || o === pe) && a === Ze) {
1032
+ w = fe;
1033
+ var E = f && R === C && C.visualViewport ? C.visualViewport.width : (
1034
+ // $FlowFixMe[prop-missing]
1035
+ R[D]
1036
+ );
1037
+ p -= E - n.width, p *= l ? 1 : -1;
1038
+ }
1039
+ }
1040
+ var M = Object.assign({
1041
+ position: i
1042
+ }, d && Nn), T = c === !0 ? Fn({
1043
+ x: p,
1044
+ y: h
1045
+ }, ce(r)) : {
1046
+ x: p,
1047
+ y: h
1048
+ };
1049
+ if (p = T.x, h = T.y, l) {
1050
+ var W;
1051
+ return Object.assign({}, M, (W = {}, W[y] = P ? "0" : "", W[w] = S ? "0" : "", W.transform = (C.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + h + "px)" : "translate3d(" + p + "px, " + h + "px, 0)", W));
1052
+ }
1053
+ return Object.assign({}, M, (e = {}, e[y] = P ? h + "px" : "", e[w] = S ? p + "px" : "", e.transform = "", e));
1054
+ }
1055
+ function Un(t) {
1056
+ var e = t.state, r = t.options, n = r.gpuAcceleration, o = n === void 0 ? !0 : n, a = r.adaptive, s = a === void 0 ? !0 : a, i = r.roundOffsets, l = i === void 0 ? !0 : i, d = {
1057
+ placement: be(e.placement),
1058
+ variation: Fe(e.placement),
1059
+ popper: e.elements.popper,
1060
+ popperRect: e.rects.popper,
1061
+ gpuAcceleration: o,
1062
+ isFixed: e.options.strategy === "fixed"
1063
+ };
1064
+ e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, Vt(Object.assign({}, d, {
1065
+ offsets: e.modifiersData.popperOffsets,
1066
+ position: e.options.strategy,
1067
+ adaptive: s,
1068
+ roundOffsets: l
1069
+ })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, Vt(Object.assign({}, d, {
1070
+ offsets: e.modifiersData.arrow,
1071
+ position: "absolute",
1072
+ adaptive: !1,
1073
+ roundOffsets: l
1074
+ })))), e.attributes.popper = Object.assign({}, e.attributes.popper, {
1075
+ "data-popper-placement": e.placement
1076
+ });
1077
+ }
1078
+ const qn = {
1079
+ name: "computeStyles",
1080
+ enabled: !0,
1081
+ phase: "beforeWrite",
1082
+ fn: Un,
1083
+ data: {}
1084
+ };
1085
+ var ot = {
1086
+ passive: !0
1087
+ };
1088
+ function Jn(t) {
1089
+ var e = t.state, r = t.instance, n = t.options, o = n.scroll, a = o === void 0 ? !0 : o, s = n.resize, i = s === void 0 ? !0 : s, l = ce(e.elements.popper), d = [].concat(e.scrollParents.reference, e.scrollParents.popper);
1090
+ return a && d.forEach(function(c) {
1091
+ c.addEventListener("scroll", r.update, ot);
1092
+ }), i && l.addEventListener("resize", r.update, ot), function() {
1093
+ a && d.forEach(function(c) {
1094
+ c.removeEventListener("scroll", r.update, ot);
1095
+ }), i && l.removeEventListener("resize", r.update, ot);
1096
+ };
1097
+ }
1098
+ const Xn = {
1099
+ name: "eventListeners",
1100
+ enabled: !0,
1101
+ phase: "write",
1102
+ fn: function() {
1103
+ },
1104
+ effect: Jn,
1105
+ data: {}
1106
+ };
1107
+ var Kn = {
1108
+ left: "right",
1109
+ right: "left",
1110
+ bottom: "top",
1111
+ top: "bottom"
1112
+ };
1113
+ function at(t) {
1114
+ return t.replace(/left|right|bottom|top/g, function(e) {
1115
+ return Kn[e];
1116
+ });
1117
+ }
1118
+ var Yn = {
1119
+ start: "end",
1120
+ end: "start"
1121
+ };
1122
+ function At(t) {
1123
+ return t.replace(/start|end/g, function(e) {
1124
+ return Yn[e];
1125
+ });
1126
+ }
1127
+ function Rt(t) {
1128
+ var e = ce(t), r = e.pageXOffset, n = e.pageYOffset;
1129
+ return {
1130
+ scrollLeft: r,
1131
+ scrollTop: n
1132
+ };
1133
+ }
1134
+ function wt(t) {
1135
+ return Ne(De(t)).left + Rt(t).scrollLeft;
1136
+ }
1137
+ function Gn(t, e) {
1138
+ var r = ce(t), n = De(t), o = r.visualViewport, a = n.clientWidth, s = n.clientHeight, i = 0, l = 0;
1139
+ if (o) {
1140
+ a = o.width, s = o.height;
1141
+ var d = Qt();
1142
+ (d || !d && e === "fixed") && (i = o.offsetLeft, l = o.offsetTop);
1143
+ }
1144
+ return {
1145
+ width: a,
1146
+ height: s,
1147
+ x: i + wt(t),
1148
+ y: l
1149
+ };
1150
+ }
1151
+ function Zn(t) {
1152
+ var e, r = De(t), n = Rt(t), o = (e = t.ownerDocument) == null ? void 0 : e.body, a = Be(r.scrollWidth, r.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), s = Be(r.scrollHeight, r.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), i = -n.scrollLeft + wt(t), l = -n.scrollTop;
1153
+ return Pe(o || r).direction === "rtl" && (i += Be(r.clientWidth, o ? o.clientWidth : 0) - a), {
1154
+ width: a,
1155
+ height: s,
1156
+ x: i,
1157
+ y: l
1158
+ };
1159
+ }
1160
+ function Ot(t) {
1161
+ var e = Pe(t), r = e.overflow, n = e.overflowX, o = e.overflowY;
1162
+ return /auto|scroll|overlay|hidden/.test(r + o + n);
1163
+ }
1164
+ function or(t) {
1165
+ return ["html", "body", "#document"].indexOf(ye(t)) >= 0 ? t.ownerDocument.body : de(t) && Ot(t) ? t : or(ft(t));
1166
+ }
1167
+ function Ge(t, e) {
1168
+ var r;
1169
+ e === void 0 && (e = []);
1170
+ var n = or(t), o = n === ((r = t.ownerDocument) == null ? void 0 : r.body), a = ce(n), s = o ? [a].concat(a.visualViewport || [], Ot(n) ? n : []) : n, i = e.concat(s);
1171
+ return o ? i : (
1172
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
1173
+ i.concat(Ge(ft(s)))
1174
+ );
1175
+ }
1176
+ function bt(t) {
1177
+ return Object.assign({}, t, {
1178
+ left: t.x,
1179
+ top: t.y,
1180
+ right: t.x + t.width,
1181
+ bottom: t.y + t.height
1182
+ });
1183
+ }
1184
+ function Qn(t, e) {
1185
+ var r = Ne(t, !1, e === "fixed");
1186
+ return r.top = r.top + t.clientTop, r.left = r.left + t.clientLeft, r.bottom = r.top + t.clientHeight, r.right = r.left + t.clientWidth, r.width = t.clientWidth, r.height = t.clientHeight, r.x = r.left, r.y = r.top, r;
1187
+ }
1188
+ function Tt(t, e, r) {
1189
+ return e === Gt ? bt(Gn(t, r)) : He(e) ? Qn(e, r) : bt(Zn(De(t)));
1190
+ }
1191
+ function eo(t) {
1192
+ var e = Ge(ft(t)), r = ["absolute", "fixed"].indexOf(Pe(t).position) >= 0, n = r && de(t) ? nt(t) : t;
1193
+ return He(n) ? e.filter(function(o) {
1194
+ return He(o) && er(o, n) && ye(o) !== "body";
1195
+ }) : [];
1196
+ }
1197
+ function to(t, e, r, n) {
1198
+ var o = e === "clippingParents" ? eo(t) : [].concat(e), a = [].concat(o, [r]), s = a[0], i = a.reduce(function(l, d) {
1199
+ var c = Tt(t, d, n);
1200
+ return l.top = Be(c.top, l.top), l.right = ct(c.right, l.right), l.bottom = ct(c.bottom, l.bottom), l.left = Be(c.left, l.left), l;
1201
+ }, Tt(t, s, n));
1202
+ return i.width = i.right - i.left, i.height = i.bottom - i.top, i.x = i.left, i.y = i.top, i;
1203
+ }
1204
+ function ar(t) {
1205
+ var e = t.reference, r = t.element, n = t.placement, o = n ? be(n) : null, a = n ? Fe(n) : null, s = e.x + e.width / 2 - r.width / 2, i = e.y + e.height / 2 - r.height / 2, l;
1206
+ switch (o) {
1207
+ case ae:
1208
+ l = {
1209
+ x: s,
1210
+ y: e.y - r.height
1211
+ };
1212
+ break;
1213
+ case pe:
1214
+ l = {
1215
+ x: s,
1216
+ y: e.y + e.height
1217
+ };
1218
+ break;
1219
+ case fe:
1220
+ l = {
1221
+ x: e.x + e.width,
1222
+ y: i
1223
+ };
1224
+ break;
1225
+ case ie:
1226
+ l = {
1227
+ x: e.x - r.width,
1228
+ y: i
1229
+ };
1230
+ break;
1231
+ default:
1232
+ l = {
1233
+ x: e.x,
1234
+ y: e.y
1235
+ };
1236
+ }
1237
+ var d = o ? Pt(o) : null;
1238
+ if (d != null) {
1239
+ var c = d === "y" ? "height" : "width";
1240
+ switch (a) {
1241
+ case _e:
1242
+ l[d] = l[d] - (e[c] / 2 - r[c] / 2);
1243
+ break;
1244
+ case Ze:
1245
+ l[d] = l[d] + (e[c] / 2 - r[c] / 2);
1246
+ break;
1247
+ }
1248
+ }
1249
+ return l;
1250
+ }
1251
+ function Qe(t, e) {
1252
+ e === void 0 && (e = {});
1253
+ var r = e, n = r.placement, o = n === void 0 ? t.placement : n, a = r.strategy, s = a === void 0 ? t.strategy : a, i = r.boundary, l = i === void 0 ? In : i, d = r.rootBoundary, c = d === void 0 ? Gt : d, f = r.elementContext, g = f === void 0 ? Ke : f, p = r.altBoundary, m = p === void 0 ? !1 : p, h = r.padding, b = h === void 0 ? 0 : h, S = rr(typeof b != "number" ? b : nr(b, rt)), P = g === Ke ? Cn : Ke, w = t.rects.popper, y = t.elements[m ? P : g], C = to(He(y) ? y : y.contextElement || De(t.elements.popper), l, c, s), R = Ne(t.elements.reference), L = ar({
1254
+ reference: R,
1255
+ element: w,
1256
+ placement: o
1257
+ }), D = bt(Object.assign({}, w, L)), $ = g === Ke ? D : R, E = {
1258
+ top: C.top - $.top + S.top,
1259
+ bottom: $.bottom - C.bottom + S.bottom,
1260
+ left: C.left - $.left + S.left,
1261
+ right: $.right - C.right + S.right
1262
+ }, M = t.modifiersData.offset;
1263
+ if (g === Ke && M) {
1264
+ var T = M[o];
1265
+ Object.keys(E).forEach(function(W) {
1266
+ var F = [fe, pe].indexOf(W) >= 0 ? 1 : -1, H = [ae, pe].indexOf(W) >= 0 ? "y" : "x";
1267
+ E[W] += T[H] * F;
1268
+ });
1269
+ }
1270
+ return E;
1271
+ }
1272
+ function ro(t, e) {
1273
+ e === void 0 && (e = {});
1274
+ var r = e, n = r.placement, o = r.boundary, a = r.rootBoundary, s = r.padding, i = r.flipVariations, l = r.allowedAutoPlacements, d = l === void 0 ? Zt : l, c = Fe(n), f = c ? i ? Bt : Bt.filter(function(m) {
1275
+ return Fe(m) === c;
1276
+ }) : rt, g = f.filter(function(m) {
1277
+ return d.indexOf(m) >= 0;
1278
+ });
1279
+ g.length === 0 && (g = f);
1280
+ var p = g.reduce(function(m, h) {
1281
+ return m[h] = Qe(t, {
1282
+ placement: h,
1283
+ boundary: o,
1284
+ rootBoundary: a,
1285
+ padding: s
1286
+ })[be(h)], m;
1287
+ }, {});
1288
+ return Object.keys(p).sort(function(m, h) {
1289
+ return p[m] - p[h];
1290
+ });
1291
+ }
1292
+ function no(t) {
1293
+ if (be(t) === It)
1294
+ return [];
1295
+ var e = at(t);
1296
+ return [At(t), e, At(e)];
1297
+ }
1298
+ function oo(t) {
1299
+ var e = t.state, r = t.options, n = t.name;
1300
+ if (!e.modifiersData[n]._skip) {
1301
+ for (var o = r.mainAxis, a = o === void 0 ? !0 : o, s = r.altAxis, i = s === void 0 ? !0 : s, l = r.fallbackPlacements, d = r.padding, c = r.boundary, f = r.rootBoundary, g = r.altBoundary, p = r.flipVariations, m = p === void 0 ? !0 : p, h = r.allowedAutoPlacements, b = e.options.placement, S = be(b), P = S === b, w = l || (P || !m ? [at(b)] : no(b)), y = [b].concat(w).reduce(function(re, X) {
1302
+ return re.concat(be(X) === It ? ro(e, {
1303
+ placement: X,
1304
+ boundary: c,
1305
+ rootBoundary: f,
1306
+ padding: d,
1307
+ flipVariations: m,
1308
+ allowedAutoPlacements: h
1309
+ }) : X);
1310
+ }, []), C = e.rects.reference, R = e.rects.popper, L = /* @__PURE__ */ new Map(), D = !0, $ = y[0], E = 0; E < y.length; E++) {
1311
+ var M = y[E], T = be(M), W = Fe(M) === _e, F = [ae, pe].indexOf(T) >= 0, H = F ? "width" : "height", k = Qe(e, {
1312
+ placement: M,
1313
+ boundary: c,
1314
+ rootBoundary: f,
1315
+ altBoundary: g,
1316
+ padding: d
1317
+ }), O = F ? W ? fe : ie : W ? pe : ae;
1318
+ C[H] > R[H] && (O = at(O));
1319
+ var V = at(O), j = [];
1320
+ if (a && j.push(k[T] <= 0), i && j.push(k[O] <= 0, k[V] <= 0), j.every(function(re) {
1321
+ return re;
1322
+ })) {
1323
+ $ = M, D = !1;
1324
+ break;
1325
+ }
1326
+ L.set(M, j);
1327
+ }
1328
+ if (D)
1329
+ for (var Z = m ? 3 : 1, Q = function(X) {
1330
+ var le = y.find(function(z) {
1331
+ var B = L.get(z);
1332
+ if (B)
1333
+ return B.slice(0, X).every(function(N) {
1334
+ return N;
1335
+ });
1336
+ });
1337
+ if (le)
1338
+ return $ = le, "break";
1339
+ }, ee = Z; ee > 0; ee--) {
1340
+ var te = Q(ee);
1341
+ if (te === "break") break;
1342
+ }
1343
+ e.placement !== $ && (e.modifiersData[n]._skip = !0, e.placement = $, e.reset = !0);
1344
+ }
1345
+ }
1346
+ const ao = {
1347
+ name: "flip",
1348
+ enabled: !0,
1349
+ phase: "main",
1350
+ fn: oo,
1351
+ requiresIfExists: ["offset"],
1352
+ data: {
1353
+ _skip: !1
1354
+ }
1355
+ };
1356
+ function Mt(t, e, r) {
1357
+ return r === void 0 && (r = {
1358
+ x: 0,
1359
+ y: 0
1360
+ }), {
1361
+ top: t.top - e.height - r.y,
1362
+ right: t.right - e.width + r.x,
1363
+ bottom: t.bottom - e.height + r.y,
1364
+ left: t.left - e.width - r.x
1365
+ };
1366
+ }
1367
+ function Wt(t) {
1368
+ return [ae, fe, pe, ie].some(function(e) {
1369
+ return t[e] >= 0;
1370
+ });
1371
+ }
1372
+ function io(t) {
1373
+ var e = t.state, r = t.name, n = e.rects.reference, o = e.rects.popper, a = e.modifiersData.preventOverflow, s = Qe(e, {
1374
+ elementContext: "reference"
1375
+ }), i = Qe(e, {
1376
+ altBoundary: !0
1377
+ }), l = Mt(s, n), d = Mt(i, o, a), c = Wt(l), f = Wt(d);
1378
+ e.modifiersData[r] = {
1379
+ referenceClippingOffsets: l,
1380
+ popperEscapeOffsets: d,
1381
+ isReferenceHidden: c,
1382
+ hasPopperEscaped: f
1383
+ }, e.attributes.popper = Object.assign({}, e.attributes.popper, {
1384
+ "data-popper-reference-hidden": c,
1385
+ "data-popper-escaped": f
1386
+ });
1387
+ }
1388
+ const lo = {
1389
+ name: "hide",
1390
+ enabled: !0,
1391
+ phase: "main",
1392
+ requiresIfExists: ["preventOverflow"],
1393
+ fn: io
1394
+ };
1395
+ function so(t, e, r) {
1396
+ var n = be(t), o = [ie, ae].indexOf(n) >= 0 ? -1 : 1, a = typeof r == "function" ? r(Object.assign({}, e, {
1397
+ placement: t
1398
+ })) : r, s = a[0], i = a[1];
1399
+ return s = s || 0, i = (i || 0) * o, [ie, fe].indexOf(n) >= 0 ? {
1400
+ x: i,
1401
+ y: s
1402
+ } : {
1403
+ x: s,
1404
+ y: i
1405
+ };
1406
+ }
1407
+ function co(t) {
1408
+ var e = t.state, r = t.options, n = t.name, o = r.offset, a = o === void 0 ? [0, 0] : o, s = Zt.reduce(function(c, f) {
1409
+ return c[f] = so(f, e.rects, a), c;
1410
+ }, {}), i = s[e.placement], l = i.x, d = i.y;
1411
+ e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l, e.modifiersData.popperOffsets.y += d), e.modifiersData[n] = s;
1412
+ }
1413
+ const uo = {
1414
+ name: "offset",
1415
+ enabled: !0,
1416
+ phase: "main",
1417
+ requires: ["popperOffsets"],
1418
+ fn: co
1419
+ };
1420
+ function po(t) {
1421
+ var e = t.state, r = t.name;
1422
+ e.modifiersData[r] = ar({
1423
+ reference: e.rects.reference,
1424
+ element: e.rects.popper,
1425
+ placement: e.placement
1426
+ });
1427
+ }
1428
+ const fo = {
1429
+ name: "popperOffsets",
1430
+ enabled: !0,
1431
+ phase: "read",
1432
+ fn: po,
1433
+ data: {}
1434
+ };
1435
+ function vo(t) {
1436
+ return t === "x" ? "y" : "x";
1437
+ }
1438
+ function go(t) {
1439
+ var e = t.state, r = t.options, n = t.name, o = r.mainAxis, a = o === void 0 ? !0 : o, s = r.altAxis, i = s === void 0 ? !1 : s, l = r.boundary, d = r.rootBoundary, c = r.altBoundary, f = r.padding, g = r.tether, p = g === void 0 ? !0 : g, m = r.tetherOffset, h = m === void 0 ? 0 : m, b = Qe(e, {
1440
+ boundary: l,
1441
+ rootBoundary: d,
1442
+ padding: f,
1443
+ altBoundary: c
1444
+ }), S = be(e.placement), P = Fe(e.placement), w = !P, y = Pt(S), C = vo(y), R = e.modifiersData.popperOffsets, L = e.rects.reference, D = e.rects.popper, $ = typeof h == "function" ? h(Object.assign({}, e.rects, {
1445
+ placement: e.placement
1446
+ })) : h, E = typeof $ == "number" ? {
1447
+ mainAxis: $,
1448
+ altAxis: $
1449
+ } : Object.assign({
1450
+ mainAxis: 0,
1451
+ altAxis: 0
1452
+ }, $), M = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, T = {
1453
+ x: 0,
1454
+ y: 0
1455
+ };
1456
+ if (R) {
1457
+ if (a) {
1458
+ var W, F = y === "y" ? ae : ie, H = y === "y" ? pe : fe, k = y === "y" ? "height" : "width", O = R[y], V = O + b[F], j = O - b[H], Z = p ? -D[k] / 2 : 0, Q = P === _e ? L[k] : D[k], ee = P === _e ? -D[k] : -L[k], te = e.elements.arrow, re = p && te ? St(te) : {
1459
+ width: 0,
1460
+ height: 0
1461
+ }, X = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : tr(), le = X[F], z = X[H], B = Ye(0, L[k], re[k]), N = w ? L[k] / 2 - Z - B - le - E.mainAxis : Q - B - le - E.mainAxis, U = w ? -L[k] / 2 + Z + B + z + E.mainAxis : ee + B + z + E.mainAxis, ne = e.elements.arrow && nt(e.elements.arrow), ve = ne ? y === "y" ? ne.clientTop || 0 : ne.clientLeft || 0 : 0, he = (W = M == null ? void 0 : M[y]) != null ? W : 0, Ie = O + N - he - ve, $e = O + U - he, Ve = Ye(p ? ct(V, Ie) : V, O, p ? Be(j, $e) : j);
1462
+ R[y] = Ve, T[y] = Ve - O;
1463
+ }
1464
+ if (i) {
1465
+ var Re, qe = y === "x" ? ae : ie, Je = y === "x" ? pe : fe, ge = R[C], we = C === "y" ? "height" : "width", Ae = ge + b[qe], Te = ge - b[Je], Ee = [ae, ie].indexOf(S) !== -1, Oe = (Re = M == null ? void 0 : M[C]) != null ? Re : 0, ze = Ee ? Ae : ge - L[we] - D[we] - Oe + E.altAxis, se = Ee ? ge + L[we] + D[we] - Oe - E.altAxis : Te, oe = p && Ee ? Tn(ze, ge, se) : Ye(p ? ze : Ae, ge, p ? se : Te);
1466
+ R[C] = oe, T[C] = oe - ge;
1467
+ }
1468
+ e.modifiersData[n] = T;
1469
+ }
1470
+ }
1471
+ const ho = {
1472
+ name: "preventOverflow",
1473
+ enabled: !0,
1474
+ phase: "main",
1475
+ fn: go,
1476
+ requiresIfExists: ["offset"]
1477
+ };
1478
+ function mo(t) {
1479
+ return {
1480
+ scrollLeft: t.scrollLeft,
1481
+ scrollTop: t.scrollTop
1482
+ };
1483
+ }
1484
+ function bo(t) {
1485
+ return t === ce(t) || !de(t) ? Rt(t) : mo(t);
1486
+ }
1487
+ function xo(t) {
1488
+ var e = t.getBoundingClientRect(), r = je(e.width) / t.offsetWidth || 1, n = je(e.height) / t.offsetHeight || 1;
1489
+ return r !== 1 || n !== 1;
1490
+ }
1491
+ function yo(t, e, r) {
1492
+ r === void 0 && (r = !1);
1493
+ var n = de(e), o = de(e) && xo(e), a = De(e), s = Ne(t, o, r), i = {
1494
+ scrollLeft: 0,
1495
+ scrollTop: 0
1496
+ }, l = {
1497
+ x: 0,
1498
+ y: 0
1499
+ };
1500
+ return (n || !n && !r) && ((ye(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
1501
+ Ot(a)) && (i = bo(e)), de(e) ? (l = Ne(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : a && (l.x = wt(a))), {
1502
+ x: s.left + i.scrollLeft - l.x,
1503
+ y: s.top + i.scrollTop - l.y,
1504
+ width: s.width,
1505
+ height: s.height
1506
+ };
1507
+ }
1508
+ function Io(t) {
1509
+ var e = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
1510
+ t.forEach(function(a) {
1511
+ e.set(a.name, a);
1512
+ });
1513
+ function o(a) {
1514
+ r.add(a.name);
1515
+ var s = [].concat(a.requires || [], a.requiresIfExists || []);
1516
+ s.forEach(function(i) {
1517
+ if (!r.has(i)) {
1518
+ var l = e.get(i);
1519
+ l && o(l);
1520
+ }
1521
+ }), n.push(a);
1522
+ }
1523
+ return t.forEach(function(a) {
1524
+ r.has(a.name) || o(a);
1525
+ }), n;
1526
+ }
1527
+ function Co(t) {
1528
+ var e = Io(t);
1529
+ return En.reduce(function(r, n) {
1530
+ return r.concat(e.filter(function(o) {
1531
+ return o.phase === n;
1532
+ }));
1533
+ }, []);
1534
+ }
1535
+ function So(t) {
1536
+ var e;
1537
+ return function() {
1538
+ return e || (e = new Promise(function(r) {
1539
+ Promise.resolve().then(function() {
1540
+ e = void 0, r(t());
1541
+ });
1542
+ })), e;
1543
+ };
1544
+ }
1545
+ function Po(t) {
1546
+ var e = t.reduce(function(r, n) {
1547
+ var o = r[n.name];
1548
+ return r[n.name] = o ? Object.assign({}, o, n, {
1549
+ options: Object.assign({}, o.options, n.options),
1550
+ data: Object.assign({}, o.data, n.data)
1551
+ }) : n, r;
1552
+ }, {});
1553
+ return Object.keys(e).map(function(r) {
1554
+ return e[r];
1555
+ });
1556
+ }
1557
+ var _t = {
1558
+ placement: "bottom",
1559
+ modifiers: [],
1560
+ strategy: "absolute"
1561
+ };
1562
+ function jt() {
1563
+ for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
1564
+ e[r] = arguments[r];
1565
+ return !e.some(function(n) {
1566
+ return !(n && typeof n.getBoundingClientRect == "function");
1567
+ });
1568
+ }
1569
+ function Ro(t) {
1570
+ t === void 0 && (t = {});
1571
+ var e = t, r = e.defaultModifiers, n = r === void 0 ? [] : r, o = e.defaultOptions, a = o === void 0 ? _t : o;
1572
+ return function(i, l, d) {
1573
+ d === void 0 && (d = a);
1574
+ var c = {
1575
+ placement: "bottom",
1576
+ orderedModifiers: [],
1577
+ options: Object.assign({}, _t, a),
1578
+ modifiersData: {},
1579
+ elements: {
1580
+ reference: i,
1581
+ popper: l
1582
+ },
1583
+ attributes: {},
1584
+ styles: {}
1585
+ }, f = [], g = !1, p = {
1586
+ state: c,
1587
+ setOptions: function(S) {
1588
+ var P = typeof S == "function" ? S(c.options) : S;
1589
+ h(), c.options = Object.assign({}, a, c.options, P), c.scrollParents = {
1590
+ reference: He(i) ? Ge(i) : i.contextElement ? Ge(i.contextElement) : [],
1591
+ popper: Ge(l)
1592
+ };
1593
+ var w = Co(Po([].concat(n, c.options.modifiers)));
1594
+ return c.orderedModifiers = w.filter(function(y) {
1595
+ return y.enabled;
1596
+ }), m(), p.update();
1597
+ },
1598
+ // Sync update – it will always be executed, even if not necessary. This
1599
+ // is useful for low frequency updates where sync behavior simplifies the
1600
+ // logic.
1601
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
1602
+ // prefer the async Popper#update method
1603
+ forceUpdate: function() {
1604
+ if (!g) {
1605
+ var S = c.elements, P = S.reference, w = S.popper;
1606
+ if (jt(P, w)) {
1607
+ c.rects = {
1608
+ reference: yo(P, nt(w), c.options.strategy === "fixed"),
1609
+ popper: St(w)
1610
+ }, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(E) {
1611
+ return c.modifiersData[E.name] = Object.assign({}, E.data);
1612
+ });
1613
+ for (var y = 0; y < c.orderedModifiers.length; y++) {
1614
+ if (c.reset === !0) {
1615
+ c.reset = !1, y = -1;
1616
+ continue;
1617
+ }
1618
+ var C = c.orderedModifiers[y], R = C.fn, L = C.options, D = L === void 0 ? {} : L, $ = C.name;
1619
+ typeof R == "function" && (c = R({
1620
+ state: c,
1621
+ options: D,
1622
+ name: $,
1623
+ instance: p
1624
+ }) || c);
1625
+ }
1626
+ }
1627
+ }
1628
+ },
1629
+ // Async and optimistically optimized update – it will not be executed if
1630
+ // not necessary (debounced to run at most once-per-tick)
1631
+ update: So(function() {
1632
+ return new Promise(function(b) {
1633
+ p.forceUpdate(), b(c);
1634
+ });
1635
+ }),
1636
+ destroy: function() {
1637
+ h(), g = !0;
1638
+ }
1639
+ };
1640
+ if (!jt(i, l))
1641
+ return p;
1642
+ p.setOptions(d).then(function(b) {
1643
+ !g && d.onFirstUpdate && d.onFirstUpdate(b);
1644
+ });
1645
+ function m() {
1646
+ c.orderedModifiers.forEach(function(b) {
1647
+ var S = b.name, P = b.options, w = P === void 0 ? {} : P, y = b.effect;
1648
+ if (typeof y == "function") {
1649
+ var C = y({
1650
+ state: c,
1651
+ name: S,
1652
+ instance: p,
1653
+ options: w
1654
+ }), R = function() {
1655
+ };
1656
+ f.push(C || R);
1657
+ }
1658
+ });
1659
+ }
1660
+ function h() {
1661
+ f.forEach(function(b) {
1662
+ return b();
1663
+ }), f = [];
1664
+ }
1665
+ return p;
1666
+ };
1667
+ }
1668
+ var wo = [Xn, fo, qn, Hn, uo, ao, ho, jn, lo], Oo = /* @__PURE__ */ Ro({
1669
+ defaultModifiers: wo
1670
+ });
1671
+ const Lo = "Popper";
1672
+ function ko(t) {
1673
+ return Nr(Lo, t);
1674
+ }
1675
+ const Do = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"], $o = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"];
1676
+ function Eo(t, e) {
1677
+ if (e === "ltr")
1678
+ return t;
1679
+ switch (t) {
1680
+ case "bottom-end":
1681
+ return "bottom-start";
1682
+ case "bottom-start":
1683
+ return "bottom-end";
1684
+ case "top-end":
1685
+ return "top-start";
1686
+ case "top-start":
1687
+ return "top-end";
1688
+ default:
1689
+ return t;
1690
+ }
1691
+ }
1692
+ function xt(t) {
1693
+ return typeof t == "function" ? t() : t;
1694
+ }
1695
+ function zo(t) {
1696
+ return t.nodeType !== void 0;
1697
+ }
1698
+ const Bo = () => et({
1699
+ root: ["root"]
1700
+ }, Wr(ko)), Ho = {}, Vo = /* @__PURE__ */ u.forwardRef(function(e, r) {
1701
+ var n;
1702
+ const {
1703
+ anchorEl: o,
1704
+ children: a,
1705
+ direction: s,
1706
+ disablePortal: i,
1707
+ modifiers: l,
1708
+ open: d,
1709
+ placement: c,
1710
+ popperOptions: f,
1711
+ popperRef: g,
1712
+ slotProps: p = {},
1713
+ slots: m = {},
1714
+ TransitionProps: h
1715
+ // @ts-ignore internal logic
1716
+ // prevent from spreading to DOM, it can come from the parent component e.g. Select.
1717
+ } = e, b = ke(e, Do), S = u.useRef(null), P = xe(S, r), w = u.useRef(null), y = xe(w, g), C = u.useRef(y);
1718
+ lt(() => {
1719
+ C.current = y;
1720
+ }, [y]), u.useImperativeHandle(g, () => w.current, []);
1721
+ const R = Eo(c, s), [L, D] = u.useState(R), [$, E] = u.useState(xt(o));
1722
+ u.useEffect(() => {
1723
+ w.current && w.current.forceUpdate();
1724
+ }), u.useEffect(() => {
1725
+ o && E(xt(o));
1726
+ }, [o]), lt(() => {
1727
+ if (!$ || !d)
1728
+ return;
1729
+ const H = (V) => {
1730
+ D(V.placement);
1731
+ };
1732
+ let k = [{
1733
+ name: "preventOverflow",
1734
+ options: {
1735
+ altBoundary: i
1736
+ }
1737
+ }, {
1738
+ name: "flip",
1739
+ options: {
1740
+ altBoundary: i
1741
+ }
1742
+ }, {
1743
+ name: "onUpdate",
1744
+ enabled: !0,
1745
+ phase: "afterWrite",
1746
+ fn: ({
1747
+ state: V
1748
+ }) => {
1749
+ H(V);
1750
+ }
1751
+ }];
1752
+ l != null && (k = k.concat(l)), f && f.modifiers != null && (k = k.concat(f.modifiers));
1753
+ const O = Oo($, S.current, v({
1754
+ placement: R
1755
+ }, f, {
1756
+ modifiers: k
1757
+ }));
1758
+ return C.current(O), () => {
1759
+ O.destroy(), C.current(null);
1760
+ };
1761
+ }, [$, i, l, d, f, R]);
1762
+ const M = {
1763
+ placement: L
1764
+ };
1765
+ h !== null && (M.TransitionProps = h);
1766
+ const T = Bo(), W = (n = m.root) != null ? n : "div", F = Ar({
1767
+ elementType: W,
1768
+ externalSlotProps: p.root,
1769
+ externalForwardedProps: b,
1770
+ additionalProps: {
1771
+ role: "tooltip",
1772
+ ref: P
1773
+ },
1774
+ ownerState: e,
1775
+ className: T.root
1776
+ });
1777
+ return /* @__PURE__ */ _.jsx(W, v({}, F, {
1778
+ children: typeof a == "function" ? a(M) : a
1779
+ }));
1780
+ }), Ao = /* @__PURE__ */ u.forwardRef(function(e, r) {
1781
+ const {
1782
+ anchorEl: n,
1783
+ children: o,
1784
+ container: a,
1785
+ direction: s = "ltr",
1786
+ disablePortal: i = !1,
1787
+ keepMounted: l = !1,
1788
+ modifiers: d,
1789
+ open: c,
1790
+ placement: f = "bottom",
1791
+ popperOptions: g = Ho,
1792
+ popperRef: p,
1793
+ style: m,
1794
+ transition: h = !1,
1795
+ slotProps: b = {},
1796
+ slots: S = {}
1797
+ } = e, P = ke(e, $o), [w, y] = u.useState(!0), C = () => {
1798
+ y(!1);
1799
+ }, R = () => {
1800
+ y(!0);
1801
+ };
1802
+ if (!l && !c && (!h || w))
1803
+ return null;
1804
+ let L;
1805
+ if (a)
1806
+ L = a;
1807
+ else if (n) {
1808
+ const E = xt(n);
1809
+ L = E && zo(E) ? Dt(E).body : Dt(null).body;
1810
+ }
1811
+ const D = !c && l && (!h || w) ? "none" : void 0, $ = h ? {
1812
+ in: c,
1813
+ onEnter: C,
1814
+ onExited: R
1815
+ } : void 0;
1816
+ return /* @__PURE__ */ _.jsx(Br, {
1817
+ disablePortal: i,
1818
+ container: L,
1819
+ children: /* @__PURE__ */ _.jsx(Vo, v({
1820
+ anchorEl: n,
1821
+ direction: s,
1822
+ disablePortal: i,
1823
+ modifiers: d,
1824
+ ref: r,
1825
+ open: h ? !w : c,
1826
+ placement: f,
1827
+ popperOptions: g,
1828
+ popperRef: p,
1829
+ slotProps: b,
1830
+ slots: S
1831
+ }, P, {
1832
+ style: v({
1833
+ // Prevents scroll issue, waiting for Popper.js to add this style once initiated.
1834
+ position: "fixed",
1835
+ // Fix Popper.js display issue
1836
+ top: 0,
1837
+ left: 0,
1838
+ display: D
1839
+ }, m),
1840
+ TransitionProps: $,
1841
+ children: o
1842
+ }))
1843
+ });
1844
+ }), ut = {
1845
+ buttonClick: "buttonClick",
1846
+ browserAutoFill: "browserAutoFill"
1847
+ }, To = (t) => {
1848
+ const {
1849
+ label: e,
1850
+ value: r
1851
+ } = t;
1852
+ return typeof e == "string" ? e : typeof r == "string" ? r : String(t);
1853
+ };
1854
+ function Mo(t, e) {
1855
+ const {
1856
+ open: r
1857
+ } = t, {
1858
+ context: {
1859
+ selectionMode: n
1860
+ }
1861
+ } = e;
1862
+ if (e.type === ut.buttonClick) {
1863
+ var o;
1864
+ const l = (o = t.selectedValues[0]) != null ? o : Y(null, "start", e.context);
1865
+ return v({}, t, {
1866
+ open: !r,
1867
+ highlightedValue: r ? null : l
1868
+ });
1869
+ }
1870
+ if (e.type === ut.browserAutoFill)
1871
+ return yt(e.item, t, e.context);
1872
+ const a = Kt(t, e);
1873
+ switch (e.type) {
1874
+ case q.keyDown:
1875
+ if (t.open) {
1876
+ if (e.event.key === "Escape")
1877
+ return v({}, a, {
1878
+ open: !1
1879
+ });
1880
+ } else {
1881
+ if (e.event.key === "ArrowDown") {
1882
+ var s;
1883
+ return v({}, t, {
1884
+ open: !0,
1885
+ highlightedValue: (s = t.selectedValues[0]) != null ? s : Y(null, "start", e.context)
1886
+ });
1887
+ }
1888
+ if (e.event.key === "ArrowUp") {
1889
+ var i;
1890
+ return v({}, t, {
1891
+ open: !0,
1892
+ highlightedValue: (i = t.selectedValues[0]) != null ? i : Y(null, "end", e.context)
1893
+ });
1894
+ }
1895
+ }
1896
+ break;
1897
+ case q.itemClick:
1898
+ if (n === "single")
1899
+ return v({}, a, {
1900
+ open: !1
1901
+ });
1902
+ break;
1903
+ case q.blur:
1904
+ return v({}, a, {
1905
+ open: !1
1906
+ });
1907
+ default:
1908
+ return a;
1909
+ }
1910
+ return a;
1911
+ }
1912
+ function Wo(t) {
1913
+ return Array.isArray(t) ? t.length === 0 ? "" : JSON.stringify(t.map((e) => e.value)) : (t == null ? void 0 : t.value) == null ? "" : typeof t.value == "string" || typeof t.value == "number" ? t.value : JSON.stringify(t.value);
1914
+ }
1915
+ function _o(t) {
1916
+ const {
1917
+ areOptionsEqual: e,
1918
+ buttonRef: r,
1919
+ defaultOpen: n = !1,
1920
+ defaultValue: o,
1921
+ disabled: a = !1,
1922
+ listboxId: s,
1923
+ listboxRef: i,
1924
+ multiple: l = !1,
1925
+ name: d,
1926
+ required: c,
1927
+ onChange: f,
1928
+ onHighlightChange: g,
1929
+ onOpenChange: p,
1930
+ open: m,
1931
+ options: h,
1932
+ getOptionAsString: b = To,
1933
+ getSerializedValue: S = Wo,
1934
+ value: P,
1935
+ componentName: w = "useSelect"
1936
+ } = t, y = u.useRef(null), C = xe(r, y), R = u.useRef(null), L = Ft(s);
1937
+ let D;
1938
+ P === void 0 && o === void 0 ? D = [] : o !== void 0 && (l ? D = o : D = o == null ? [] : [o]);
1939
+ const $ = u.useMemo(() => {
1940
+ if (P !== void 0)
1941
+ return l ? P : P == null ? [] : [P];
1942
+ }, [P, l]), {
1943
+ subitems: E,
1944
+ contextValue: M
1945
+ } = mn(), T = u.useMemo(() => h != null ? new Map(h.map((x, I) => [x.value, {
1946
+ value: x.value,
1947
+ label: x.label,
1948
+ disabled: x.disabled,
1949
+ ref: /* @__PURE__ */ u.createRef(),
1950
+ id: `${L}_${I}`
1951
+ }])) : E, [h, E, L]), W = xe(i, R), {
1952
+ getRootProps: F,
1953
+ active: H,
1954
+ focusVisible: k,
1955
+ rootRef: O
1956
+ } = qt({
1957
+ disabled: a,
1958
+ rootRef: C
1959
+ }), V = u.useMemo(() => Array.from(T.keys()), [T]), j = u.useCallback((x) => {
1960
+ if (e !== void 0) {
1961
+ const I = V.find((A) => e(A, x));
1962
+ return T.get(I);
1963
+ }
1964
+ return T.get(x);
1965
+ }, [T, e, V]), Z = u.useCallback((x) => {
1966
+ var I;
1967
+ const A = j(x);
1968
+ return (I = A == null ? void 0 : A.disabled) != null ? I : !1;
1969
+ }, [j]), Q = u.useCallback((x) => {
1970
+ const I = j(x);
1971
+ return I ? b(I) : "";
1972
+ }, [j, b]), ee = u.useMemo(() => ({
1973
+ selectedValues: $,
1974
+ open: m
1975
+ }), [$, m]), te = u.useCallback((x) => {
1976
+ var I;
1977
+ return (I = T.get(x)) == null ? void 0 : I.id;
1978
+ }, [T]), re = u.useCallback((x, I) => {
1979
+ if (l)
1980
+ f == null || f(x, I);
1981
+ else {
1982
+ var A;
1983
+ f == null || f(x, (A = I[0]) != null ? A : null);
1984
+ }
1985
+ }, [l, f]), X = u.useCallback((x, I) => {
1986
+ g == null || g(x, I ?? null);
1987
+ }, [g]), le = u.useCallback((x, I, A) => {
1988
+ if (I === "open" && (p == null || p(A), A === !1 && (x == null ? void 0 : x.type) !== "blur")) {
1989
+ var K;
1990
+ (K = y.current) == null || K.focus();
1991
+ }
1992
+ }, [p]), z = u.useCallback((x) => {
1993
+ var I, A;
1994
+ return x == null ? null : (I = (A = E.get(x)) == null ? void 0 : A.ref.current) != null ? I : null;
1995
+ }, [E]), B = {
1996
+ getInitialState: () => {
1997
+ var x;
1998
+ return {
1999
+ highlightedValue: null,
2000
+ selectedValues: (x = D) != null ? x : [],
2001
+ open: n
2002
+ };
2003
+ },
2004
+ getItemId: te,
2005
+ controlledProps: ee,
2006
+ focusManagement: "DOM",
2007
+ getItemDomElement: z,
2008
+ itemComparer: e,
2009
+ isItemDisabled: Z,
2010
+ rootRef: W,
2011
+ onChange: re,
2012
+ onHighlightChange: X,
2013
+ onStateChange: le,
2014
+ reducerActionContext: u.useMemo(() => ({
2015
+ multiple: l
2016
+ }), [l]),
2017
+ items: V,
2018
+ getItemAsString: Q,
2019
+ selectionMode: l ? "multiple" : "single",
2020
+ stateReducer: Mo,
2021
+ componentName: w
2022
+ }, {
2023
+ dispatch: N,
2024
+ getRootProps: U,
2025
+ contextValue: ne,
2026
+ state: {
2027
+ open: ve,
2028
+ highlightedValue: he,
2029
+ selectedValues: Ie
2030
+ },
2031
+ rootRef: $e
2032
+ } = vn(B), Ve = u.useRef(ve);
2033
+ lt(() => {
2034
+ if (ve && he !== null) {
2035
+ var x;
2036
+ const I = (x = j(he)) == null ? void 0 : x.ref;
2037
+ if (!R.current || !(I != null && I.current))
2038
+ return;
2039
+ Ve.current || I.current.focus({
2040
+ preventScroll: !0
2041
+ });
2042
+ const A = R.current.getBoundingClientRect(), K = I.current.getBoundingClientRect();
2043
+ K.top < A.top ? R.current.scrollTop -= A.top - K.top : K.bottom > A.bottom && (R.current.scrollTop += K.bottom - A.bottom);
2044
+ }
2045
+ }, [ve, he, j]);
2046
+ const Re = u.useCallback((x) => j(x), [j]), qe = (x) => (I) => {
2047
+ var A;
2048
+ if (x == null || (A = x.onClick) == null || A.call(x, I), !I.defaultMuiPrevented) {
2049
+ const K = {
2050
+ type: ut.buttonClick,
2051
+ event: I
2052
+ };
2053
+ N(K);
2054
+ }
2055
+ }, Je = (x) => (I) => {
2056
+ var A;
2057
+ (A = x.onKeyDown) == null || A.call(x, I), !I.defaultMuiPrevented && (I.key === "ArrowDown" || I.key === "ArrowUp") && (I.preventDefault(), N({
2058
+ type: q.keyDown,
2059
+ key: I.key,
2060
+ event: I
2061
+ }));
2062
+ }, ge = (x = {}) => ({
2063
+ onClick: qe(x),
2064
+ onKeyDown: Je(x)
2065
+ }), we = (x = {}) => v({}, x, ge(x), {
2066
+ role: "combobox",
2067
+ "aria-expanded": ve,
2068
+ "aria-controls": L
2069
+ }), Ae = (x = {}) => {
2070
+ const I = Se(x), A = st(we, F);
2071
+ return v({}, x, A(I));
2072
+ }, Te = (x) => (I) => {
2073
+ var A, K;
2074
+ (A = x.onBlur) == null || A.call(x, I), !I.defaultMuiPrevented && ((K = R.current) != null && K.contains(I.relatedTarget) || I.relatedTarget === y.current) && (I.defaultMuiPrevented = !0);
2075
+ }, Ee = (x = {}) => ({
2076
+ onBlur: Te(x)
2077
+ }), Oe = (x = {}) => {
2078
+ const I = Se(x), A = st(Ee, U);
2079
+ return v({
2080
+ id: L,
2081
+ role: "listbox",
2082
+ "aria-multiselectable": l ? "true" : void 0
2083
+ }, x, A(I));
2084
+ };
2085
+ u.useDebugValue({
2086
+ selectedOptions: Ie,
2087
+ highlightedOption: he,
2088
+ open: ve
2089
+ });
2090
+ const ze = u.useMemo(() => v({}, ne, M), [ne, M]);
2091
+ let se;
2092
+ t.multiple ? se = Ie : se = Ie.length > 0 ? Ie[0] : null;
2093
+ let oe;
2094
+ if (l)
2095
+ oe = se.map((x) => Re(x)).filter((x) => x !== void 0);
2096
+ else {
2097
+ var Ce;
2098
+ oe = (Ce = Re(se)) != null ? Ce : null;
2099
+ }
2100
+ const Le = (x) => (I) => {
2101
+ var A;
2102
+ if (x == null || (A = x.onChange) == null || A.call(x, I), I.defaultMuiPrevented)
2103
+ return;
2104
+ const K = T.get(I.target.value);
2105
+ I.target.value === "" ? N({
2106
+ type: q.clearSelection
2107
+ }) : K !== void 0 && N({
2108
+ type: ut.browserAutoFill,
2109
+ item: K.value,
2110
+ event: I
2111
+ });
2112
+ };
2113
+ return {
2114
+ buttonActive: H,
2115
+ buttonFocusVisible: k,
2116
+ buttonRef: O,
2117
+ contextValue: ze,
2118
+ disabled: a,
2119
+ dispatch: N,
2120
+ getButtonProps: Ae,
2121
+ getHiddenInputProps: (x = {}) => {
2122
+ const I = Se(x);
2123
+ return v({
2124
+ name: d,
2125
+ tabIndex: -1,
2126
+ "aria-hidden": !0,
2127
+ required: c ? !0 : void 0,
2128
+ value: S(oe),
2129
+ style: Hr
2130
+ }, x, {
2131
+ onChange: Le(I)
2132
+ });
2133
+ },
2134
+ getListboxProps: Oe,
2135
+ getOptionMetadata: Re,
2136
+ listboxRef: $e,
2137
+ open: ve,
2138
+ options: V,
2139
+ value: se,
2140
+ highlightedOption: he
2141
+ };
2142
+ }
2143
+ function jo(t) {
2144
+ const {
2145
+ value: e,
2146
+ children: r
2147
+ } = t, {
2148
+ dispatch: n,
2149
+ getItemIndex: o,
2150
+ getItemState: a,
2151
+ registerItem: s,
2152
+ totalSubitemCount: i
2153
+ } = e, l = u.useMemo(() => ({
2154
+ dispatch: n,
2155
+ getItemState: a,
2156
+ getItemIndex: o
2157
+ }), [n, o, a]), d = u.useMemo(() => ({
2158
+ getItemIndex: o,
2159
+ registerItem: s,
2160
+ totalSubitemCount: i
2161
+ }), [s, o, i]);
2162
+ return /* @__PURE__ */ _.jsx(Yt.Provider, {
2163
+ value: d,
2164
+ children: /* @__PURE__ */ _.jsx(pt.Provider, {
2165
+ value: l,
2166
+ children: r
2167
+ })
2168
+ });
2169
+ }
2170
+ function Aa(t) {
2171
+ return tt("MuiListItem", t);
2172
+ }
2173
+ const No = Ue("MuiListItem", ["root", "startAction", "endAction", "nested", "nesting", "sticky", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantSoft", "variantOutlined", "variantSolid"]), ir = /* @__PURE__ */ u.createContext(!1), lr = /* @__PURE__ */ u.createContext(!1), Fo = /* @__PURE__ */ u.createContext(!1), Uo = /* @__PURE__ */ u.createContext(void 0), sr = /* @__PURE__ */ u.createContext(void 0), qo = {
2174
+ "--NestedList-marginRight": "0px",
2175
+ "--NestedList-marginLeft": "0px",
2176
+ "--NestedListItem-paddingLeft": "var(--ListItem-paddingX)",
2177
+ // reset ListItem, ListItemButton negative margin (caused by NestedListItem)
2178
+ "--ListItemButton-marginBlock": "0px",
2179
+ "--ListItemButton-marginInline": "0px",
2180
+ "--ListItem-marginBlock": "0px",
2181
+ "--ListItem-marginInline": "0px"
2182
+ };
2183
+ function cr(t) {
2184
+ const {
2185
+ children: e,
2186
+ nested: r,
2187
+ row: n = !1,
2188
+ wrap: o = !1
2189
+ } = t, a = /* @__PURE__ */ _.jsx(lr.Provider, {
2190
+ value: n,
2191
+ children: /* @__PURE__ */ _.jsx(Fo.Provider, {
2192
+ value: o,
2193
+ children: u.Children.map(e, (s, i) => /* @__PURE__ */ u.isValidElement(s) ? /* @__PURE__ */ u.cloneElement(s, v({}, i === 0 && {
2194
+ "data-first-child": ""
2195
+ }, i === u.Children.count(e) - 1 && {
2196
+ "data-last-child": ""
2197
+ })) : s)
2198
+ })
2199
+ });
2200
+ return r === void 0 ? a : /* @__PURE__ */ _.jsx(ir.Provider, {
2201
+ value: r,
2202
+ children: a
2203
+ });
2204
+ }
2205
+ function Jo(t) {
2206
+ return tt("MuiList", t);
2207
+ }
2208
+ const Ta = Ue("MuiList", ["root", "nesting", "scoped", "sizeSm", "sizeMd", "sizeLg", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "horizontal", "vertical"]), Xo = /* @__PURE__ */ u.createContext(void 0), Ko = ["component", "className", "children", "size", "orientation", "wrap", "variant", "color", "role", "slots", "slotProps"], Yo = (t) => {
2209
+ const {
2210
+ variant: e,
2211
+ color: r,
2212
+ size: n,
2213
+ nesting: o,
2214
+ orientation: a,
2215
+ instanceSize: s
2216
+ } = t, i = {
2217
+ root: ["root", a, e && `variant${me(e)}`, r && `color${me(r)}`, !s && !o && n && `size${me(n)}`, s && `size${me(s)}`, o && "nesting"]
2218
+ };
2219
+ return et(i, Jo, {});
2220
+ }, ur = J("ul")(({
2221
+ theme: t,
2222
+ ownerState: e
2223
+ }) => {
2224
+ var r;
2225
+ const {
2226
+ p: n,
2227
+ padding: o,
2228
+ borderRadius: a
2229
+ } = Jt({
2230
+ theme: t,
2231
+ ownerState: e
2232
+ }, ["p", "padding", "borderRadius"]);
2233
+ function s(i) {
2234
+ return i === "sm" ? {
2235
+ "--ListDivider-gap": "0.25rem",
2236
+ "--ListItem-minHeight": "2rem",
2237
+ "--ListItem-paddingY": "3px",
2238
+ "--ListItem-paddingX": e.marker ? "3px" : "0.5rem",
2239
+ "--ListItem-gap": "0.5rem",
2240
+ "--ListItemDecorator-size": e.orientation === "horizontal" ? "1.5rem" : "2rem",
2241
+ "--Icon-fontSize": t.vars.fontSize.lg
2242
+ } : i === "md" ? {
2243
+ "--ListDivider-gap": "0.375rem",
2244
+ "--ListItem-minHeight": "2.25rem",
2245
+ "--ListItem-paddingY": "0.25rem",
2246
+ "--ListItem-paddingX": e.marker ? "0.25rem" : "0.75rem",
2247
+ "--ListItem-gap": "0.625rem",
2248
+ "--ListItemDecorator-size": e.orientation === "horizontal" ? "1.75rem" : "2.5rem",
2249
+ "--Icon-fontSize": t.vars.fontSize.xl
2250
+ } : i === "lg" ? {
2251
+ "--ListDivider-gap": "0.5rem",
2252
+ "--ListItem-minHeight": "2.75rem",
2253
+ "--ListItem-paddingY": "0.375rem",
2254
+ "--ListItem-paddingX": e.marker ? "0.5rem" : "1rem",
2255
+ "--ListItem-gap": "0.75rem",
2256
+ "--ListItemDecorator-size": e.orientation === "horizontal" ? "2.25rem" : "3rem",
2257
+ "--Icon-fontSize": t.vars.fontSize.xl2
2258
+ } : {};
2259
+ }
2260
+ return [e.nesting && v({}, s(e.instanceSize), {
2261
+ "--ListItem-paddingRight": "var(--ListItem-paddingX)",
2262
+ "--ListItem-paddingLeft": "var(--NestedListItem-paddingLeft)",
2263
+ // reset ListItem, ListItemButton negative margin (caused by NestedListItem)
2264
+ "--ListItemButton-marginBlock": "0px",
2265
+ "--ListItemButton-marginInline": "0px",
2266
+ "--ListItem-marginBlock": "0px",
2267
+ "--ListItem-marginInline": "0px",
2268
+ padding: 0
2269
+ }, e.marker && {
2270
+ paddingInlineStart: "calc(3ch - var(--_List-markerDeduct, 0px))"
2271
+ // the width of the marker
2272
+ }, {
2273
+ marginInlineStart: "var(--NestedList-marginLeft)",
2274
+ marginInlineEnd: "var(--NestedList-marginRight)",
2275
+ marginBlockStart: "var(--List-gap)",
2276
+ marginBlockEnd: "initial"
2277
+ // reset user agent stylesheet.
2278
+ }), !e.nesting && v({}, s(e.size), {
2279
+ "--List-gap": "0px",
2280
+ "--List-nestedInsetStart": "0px",
2281
+ "--ListItem-paddingLeft": "var(--ListItem-paddingX)",
2282
+ "--ListItem-paddingRight": "var(--ListItem-paddingX)"
2283
+ }, e.marker && {
2284
+ "--_List-markerDeduct": "1ch"
2285
+ }, {
2286
+ // Automatic radius adjustment kicks in only if '--List-padding' and '--List-radius' are provided.
2287
+ "--unstable_List-childRadius": "calc(max(var(--List-radius) - var(--List-padding), min(var(--List-padding) / 2, var(--List-radius) / 2)) - var(--variant-borderWidth, 0px))",
2288
+ "--ListItem-radius": "var(--unstable_List-childRadius)",
2289
+ // by default, The ListItem & ListItemButton use automatic radius adjustment based on the parent List.
2290
+ "--ListItem-startActionTranslateX": "calc(0.5 * var(--ListItem-paddingLeft))",
2291
+ "--ListItem-endActionTranslateX": "calc(-0.5 * var(--ListItem-paddingRight))",
2292
+ margin: "initial"
2293
+ }, t.typography[`body-${e.size}`], e.orientation === "horizontal" ? v({}, e.wrap ? {
2294
+ padding: "var(--List-padding)",
2295
+ // Fallback is not needed for row-wrap List
2296
+ marginInlineStart: "calc(-1 * var(--List-gap))",
2297
+ marginBlockStart: "calc(-1 * var(--List-gap))"
2298
+ } : {
2299
+ paddingInline: "var(--List-padding, var(--ListDivider-gap))",
2300
+ paddingBlock: "var(--List-padding)"
2301
+ }) : {
2302
+ paddingBlock: "var(--List-padding, var(--ListDivider-gap))",
2303
+ paddingInline: "var(--List-padding)"
2304
+ }, e.marker && {
2305
+ paddingInlineStart: "3ch"
2306
+ // the width of the marker
2307
+ }), v({
2308
+ boxSizing: "border-box",
2309
+ borderRadius: "var(--List-radius)",
2310
+ listStyle: "none",
2311
+ display: "flex",
2312
+ flexDirection: e.orientation === "horizontal" ? "row" : "column"
2313
+ }, e.wrap && {
2314
+ flexWrap: "wrap"
2315
+ }, e.marker && {
2316
+ "--_List-markerDisplay": "list-item",
2317
+ "--_List-markerType": e.marker,
2318
+ lineHeight: "calc(var(--ListItem-minHeight) - 2 * var(--ListItem-paddingY))"
2319
+ }, {
2320
+ flexGrow: 1,
2321
+ position: "relative"
2322
+ }, (r = t.variants[e.variant]) == null ? void 0 : r[e.color], {
2323
+ "--unstable_List-borderWidth": "var(--variant-borderWidth, 0px)"
2324
+ }, a !== void 0 && {
2325
+ "--List-radius": a
2326
+ }, n !== void 0 && {
2327
+ "--List-padding": n
2328
+ }, o !== void 0 && {
2329
+ "--List-padding": o
2330
+ })];
2331
+ }), Go = J(ur, {
2332
+ name: "JoyList",
2333
+ slot: "Root",
2334
+ overridesResolver: (t, e) => e.root
2335
+ })({}), Ma = /* @__PURE__ */ u.forwardRef(function(e, r) {
2336
+ var n;
2337
+ const o = u.useContext(ir), a = u.useContext(sr), s = u.useContext(Xo), i = dt({
2338
+ props: e,
2339
+ name: "JoyList"
2340
+ }), {
2341
+ component: l,
2342
+ className: d,
2343
+ children: c,
2344
+ size: f,
2345
+ orientation: g = "vertical",
2346
+ wrap: p = !1,
2347
+ variant: m = "plain",
2348
+ color: h = "neutral",
2349
+ role: b,
2350
+ slots: S = {},
2351
+ slotProps: P = {}
2352
+ } = i, w = ke(i, Ko), y = f || ((n = e.size) != null ? n : "md");
2353
+ let C;
2354
+ a && (C = "group"), s && (C = "presentation"), b && (C = b);
2355
+ const R = v({}, i, {
2356
+ instanceSize: e.size,
2357
+ size: y,
2358
+ nesting: o,
2359
+ orientation: g,
2360
+ wrap: p,
2361
+ variant: m,
2362
+ color: h,
2363
+ role: C
2364
+ }), L = Yo(R), D = v({}, w, {
2365
+ component: l,
2366
+ slots: S,
2367
+ slotProps: P
2368
+ }), [$, E] = ue("root", {
2369
+ ref: r,
2370
+ className: Ut(L.root, d),
2371
+ elementType: Go,
2372
+ externalForwardedProps: D,
2373
+ ownerState: R,
2374
+ additionalProps: {
2375
+ as: l,
2376
+ role: C,
2377
+ "aria-labelledby": typeof o == "string" ? o : void 0
2378
+ }
2379
+ });
2380
+ return /* @__PURE__ */ _.jsx($, v({}, E, {
2381
+ children: /* @__PURE__ */ _.jsx(Uo.Provider, {
2382
+ value: `${typeof l == "string" ? l : ""}:${C || ""}`,
2383
+ children: /* @__PURE__ */ _.jsx(cr, {
2384
+ row: g === "horizontal",
2385
+ wrap: p,
2386
+ children: c
2387
+ })
2388
+ })
2389
+ }));
2390
+ }), it = Ue("MuiListItemButton", ["root", "horizontal", "vertical", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "focusVisible", "disabled", "selected", "variantPlain", "variantSoft", "variantOutlined", "variantSolid"]), Wa = /* @__PURE__ */ u.createContext("horizontal"), dr = J("div")(({
2391
+ theme: t,
2392
+ ownerState: e
2393
+ }) => {
2394
+ var r, n, o, a, s, i;
2395
+ return v({
2396
+ "--Icon-margin": "initial",
2397
+ // reset the icon's margin.
2398
+ "--Icon-color": e.color !== "neutral" || e.variant === "solid" ? "currentColor" : t.vars.palette.text.icon,
2399
+ WebkitTapHighlightColor: "transparent",
2400
+ boxSizing: "border-box",
2401
+ position: "relative",
2402
+ font: "inherit",
2403
+ display: "flex",
2404
+ flexDirection: "row",
2405
+ alignItems: "center",
2406
+ alignSelf: "stretch",
2407
+ // always stretch itself to fill the parent (List|ListItem)
2408
+ gap: "var(--ListItem-gap)"
2409
+ }, e.orientation === "vertical" && {
2410
+ flexDirection: "column",
2411
+ justifyContent: "center"
2412
+ }, {
2413
+ textAlign: "initial",
2414
+ textDecoration: "initial",
2415
+ // reset native anchor tag
2416
+ backgroundColor: "initial",
2417
+ // reset button background
2418
+ cursor: "pointer",
2419
+ // In some cases, ListItemButton is a child of ListItem so the margin needs to be controlled by the ListItem. The value is negative to account for the ListItem's padding
2420
+ marginInline: "var(--ListItemButton-marginInline)",
2421
+ marginBlock: "var(--ListItemButton-marginBlock)"
2422
+ }, e["data-first-child"] === void 0 && {
2423
+ marginInlineStart: e.row ? "var(--List-gap)" : void 0,
2424
+ marginBlockStart: e.row ? void 0 : "var(--List-gap)"
2425
+ }, {
2426
+ // account for the border width, so that all of the ListItemButtons content aligned horizontally
2427
+ paddingBlock: "calc(var(--ListItem-paddingY) - var(--variant-borderWidth, 0px))",
2428
+ // account for the border width, so that all of the ListItemButtons content aligned vertically
2429
+ paddingInlineStart: "calc(var(--ListItem-paddingLeft) + var(--ListItem-startActionWidth, var(--unstable_startActionWidth, 0px)))",
2430
+ // --internal variable makes it possible to customize the actionWidth from the top List
2431
+ paddingInlineEnd: "calc(var(--ListItem-paddingRight) + var(--ListItem-endActionWidth, var(--unstable_endActionWidth, 0px)))",
2432
+ // --internal variable makes it possible to customize the actionWidth from the top List
2433
+ minBlockSize: "var(--ListItem-minHeight)",
2434
+ border: "1px solid transparent",
2435
+ // use `transparent` as a placeholder to prevent the button from jumping when switching to `outlined` variant
2436
+ borderRadius: "var(--ListItem-radius)",
2437
+ flex: "var(--unstable_ListItem-flex, none)",
2438
+ // prevent children from shrinking when the List's height is limited.
2439
+ fontSize: "inherit",
2440
+ // prevent user agent style when component="button"
2441
+ lineHeight: "inherit",
2442
+ // prevent user agent style when component="button"
2443
+ minInlineSize: 0,
2444
+ [t.focus.selector]: v({}, t.focus.default, {
2445
+ zIndex: 1
2446
+ // to be above of the next element. For example, the first Tab item should be above the second so that the outline is above the second Tab.
2447
+ })
2448
+ }, (r = t.variants[e.variant]) == null ? void 0 : r[e.color], {
2449
+ "&:active": (n = t.variants[`${e.variant}Active`]) == null ? void 0 : n[e.color],
2450
+ [`.${No.root} > &`]: {
2451
+ "--unstable_ListItem-flex": "1 0 0%"
2452
+ // grow to fill the available space of ListItem
2453
+ },
2454
+ [`&.${it.selected}`]: v({}, (o = t.variants[`${e.variant}Active`]) == null ? void 0 : o[e.color], {
2455
+ "--Icon-color": "currentColor"
2456
+ }),
2457
+ [`&:not(.${it.selected}, [aria-selected="true"])`]: {
2458
+ "&:hover": (a = t.variants[`${e.variant}Hover`]) == null ? void 0 : a[e.color],
2459
+ "&:active": (s = t.variants[`${e.variant}Active`]) == null ? void 0 : s[e.color]
2460
+ },
2461
+ [`&.${it.disabled}`]: v({}, (i = t.variants[`${e.variant}Disabled`]) == null ? void 0 : i[e.color])
2462
+ });
2463
+ });
2464
+ J(dr, {
2465
+ name: "JoyListItemButton",
2466
+ slot: "Root",
2467
+ overridesResolver: (t, e) => e.root
2468
+ })(({
2469
+ ownerState: t,
2470
+ theme: e
2471
+ }) => v({}, !t.row && {
2472
+ [`&.${it.selected}`]: {
2473
+ fontWeight: e.vars.fontWeight.md
2474
+ }
2475
+ }));
2476
+ function Zo(t) {
2477
+ return tt("MuiInput", t);
2478
+ }
2479
+ const pr = Ue("MuiInput", ["root", "input", "formControl", "focused", "disabled", "error", "adornedStart", "adornedEnd", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "sizeSm", "sizeMd", "sizeLg", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "fullWidth", "startDecorator", "endDecorator"]), fr = /* @__PURE__ */ u.createContext(void 0), Qo = ["aria-describedby", "aria-label", "aria-labelledby", "autoComplete", "autoFocus", "className", "defaultValue", "disabled", "disabledInProp", "error", "id", "name", "onClick", "onChange", "onKeyDown", "onKeyUp", "onFocus", "onBlur", "placeholder", "readOnly", "required", "type", "value"];
2480
+ function ea(t, e) {
2481
+ var r;
2482
+ const n = u.useContext(fr), {
2483
+ "aria-describedby": o,
2484
+ "aria-label": a,
2485
+ "aria-labelledby": s,
2486
+ autoComplete: i,
2487
+ autoFocus: l,
2488
+ className: d,
2489
+ defaultValue: c,
2490
+ disabled: f,
2491
+ disabledInProp: g,
2492
+ error: p,
2493
+ id: m,
2494
+ name: h,
2495
+ onClick: b,
2496
+ onChange: S,
2497
+ onKeyDown: P,
2498
+ onKeyUp: w,
2499
+ onFocus: y,
2500
+ onBlur: C,
2501
+ placeholder: R,
2502
+ readOnly: L,
2503
+ required: D,
2504
+ type: $,
2505
+ value: E
2506
+ } = t, M = ke(t, Qo), {
2507
+ getRootProps: T,
2508
+ getInputProps: W,
2509
+ focused: F,
2510
+ error: H,
2511
+ disabled: k
2512
+ } = Kr({
2513
+ disabled: (r = g ?? (n == null ? void 0 : n.disabled)) != null ? r : f,
2514
+ defaultValue: c,
2515
+ error: p,
2516
+ onBlur: C,
2517
+ onClick: b,
2518
+ onChange: S,
2519
+ onFocus: y,
2520
+ required: D ?? (n == null ? void 0 : n.required),
2521
+ value: E
2522
+ }), O = {
2523
+ [e.disabled]: k,
2524
+ [e.error]: H,
2525
+ [e.focused]: F,
2526
+ [e.formControl]: !!n,
2527
+ [d]: d
2528
+ }, V = {
2529
+ [e.disabled]: k
2530
+ };
2531
+ return v({
2532
+ formControl: n,
2533
+ propsToForward: {
2534
+ "aria-describedby": o,
2535
+ "aria-label": a,
2536
+ "aria-labelledby": s,
2537
+ autoComplete: i,
2538
+ autoFocus: l,
2539
+ disabled: k,
2540
+ id: m,
2541
+ onKeyDown: P,
2542
+ onKeyUp: w,
2543
+ name: h,
2544
+ placeholder: R,
2545
+ readOnly: L,
2546
+ type: $
2547
+ },
2548
+ rootStateClasses: O,
2549
+ inputStateClasses: V,
2550
+ getRootProps: T,
2551
+ getInputProps: W,
2552
+ focused: F,
2553
+ error: H,
2554
+ disabled: k
2555
+ }, M);
2556
+ }
2557
+ const ta = ["propsToForward", "rootStateClasses", "inputStateClasses", "getRootProps", "getInputProps", "formControl", "focused", "error", "disabled", "fullWidth", "size", "color", "variant", "startDecorator", "endDecorator", "component", "slots", "slotProps"], ra = (t) => {
2558
+ const {
2559
+ disabled: e,
2560
+ fullWidth: r,
2561
+ variant: n,
2562
+ color: o,
2563
+ size: a
2564
+ } = t, s = {
2565
+ root: ["root", e && "disabled", r && "fullWidth", n && `variant${me(n)}`, o && `color${me(o)}`, a && `size${me(a)}`],
2566
+ input: ["input"],
2567
+ startDecorator: ["startDecorator"],
2568
+ endDecorator: ["endDecorator"]
2569
+ };
2570
+ return et(s, Zo, {});
2571
+ }, na = J("div")(({
2572
+ theme: t,
2573
+ ownerState: e
2574
+ }) => {
2575
+ var r, n, o, a, s, i;
2576
+ const l = (r = t.variants[`${e.variant}`]) == null ? void 0 : r[e.color];
2577
+ return [v({
2578
+ "--Input-radius": t.vars.radius.sm,
2579
+ "--Input-gap": "0.5rem",
2580
+ "--Input-placeholderColor": "inherit",
2581
+ "--Input-placeholderOpacity": 0.64,
2582
+ "--Input-decoratorColor": t.vars.palette.text.icon,
2583
+ "--Input-focused": "0",
2584
+ "--Input-focusedThickness": t.vars.focus.thickness,
2585
+ "--Input-focusedHighlight": (n = t.vars.palette[e.color === "neutral" ? "primary" : e.color]) == null ? void 0 : n[500],
2586
+ [`&:not([${Dr}])`]: v({}, e.instanceColor && {
2587
+ "--_Input-focusedHighlight": (o = t.vars.palette[e.instanceColor === "neutral" ? "primary" : e.instanceColor]) == null ? void 0 : o[500]
2588
+ }, {
2589
+ "--Input-focusedHighlight": `var(--_Input-focusedHighlight, ${t.vars.palette.focusVisible})`
2590
+ })
2591
+ }, e.size === "sm" && {
2592
+ "--Input-minHeight": "2rem",
2593
+ "--Input-paddingInline": "0.5rem",
2594
+ "--Input-decoratorChildHeight": "min(1.5rem, var(--Input-minHeight))",
2595
+ "--Icon-fontSize": t.vars.fontSize.xl
2596
+ }, e.size === "md" && {
2597
+ "--Input-minHeight": "2.25rem",
2598
+ "--Input-paddingInline": "0.75rem",
2599
+ "--Input-decoratorChildHeight": "min(1.75rem, var(--Input-minHeight))",
2600
+ "--Icon-fontSize": t.vars.fontSize.xl2
2601
+ }, e.size === "lg" && {
2602
+ "--Input-minHeight": "2.75rem",
2603
+ "--Input-paddingInline": "1rem",
2604
+ "--Input-gap": "0.75rem",
2605
+ "--Input-decoratorChildHeight": "min(2.25rem, var(--Input-minHeight))",
2606
+ "--Icon-fontSize": t.vars.fontSize.xl2
2607
+ }, {
2608
+ // variables for controlling child components
2609
+ "--Input-decoratorChildOffset": "min(calc(var(--Input-paddingInline) - (var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2), var(--Input-paddingInline))",
2610
+ "--_Input-paddingBlock": "max((var(--Input-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Input-decoratorChildHeight)) / 2, 0px)",
2611
+ "--Input-decoratorChildRadius": "max(var(--Input-radius) - var(--variant-borderWidth, 0px) - var(--_Input-paddingBlock), min(var(--_Input-paddingBlock) + var(--variant-borderWidth, 0px), var(--Input-radius) / 2))",
2612
+ "--Button-minHeight": "var(--Input-decoratorChildHeight)",
2613
+ "--Button-paddingBlock": "0px",
2614
+ // to ensure that the height of the button is equal to --Button-minHeight
2615
+ "--IconButton-size": "var(--Input-decoratorChildHeight)",
2616
+ "--Button-radius": "var(--Input-decoratorChildRadius)",
2617
+ "--IconButton-radius": "var(--Input-decoratorChildRadius)",
2618
+ boxSizing: "border-box"
2619
+ }, e.variant !== "plain" && {
2620
+ boxShadow: t.shadow.xs
2621
+ }, {
2622
+ minWidth: 0,
2623
+ minHeight: "var(--Input-minHeight)"
2624
+ }, e.fullWidth && {
2625
+ width: "100%"
2626
+ }, {
2627
+ cursor: "text",
2628
+ position: "relative",
2629
+ display: "flex",
2630
+ paddingInline: "var(--Input-paddingInline)",
2631
+ borderRadius: "var(--Input-radius)"
2632
+ }, t.typography[`body-${e.size}`], l, {
2633
+ backgroundColor: (a = l == null ? void 0 : l.backgroundColor) != null ? a : t.vars.palette.background.surface,
2634
+ "&::before": {
2635
+ boxSizing: "border-box",
2636
+ content: '""',
2637
+ display: "block",
2638
+ position: "absolute",
2639
+ pointerEvents: "none",
2640
+ top: 0,
2641
+ left: 0,
2642
+ right: 0,
2643
+ bottom: 0,
2644
+ zIndex: 1,
2645
+ borderRadius: "inherit",
2646
+ margin: "calc(var(--variant-borderWidth, 0px) * -1)",
2647
+ // for outlined variant
2648
+ boxShadow: "var(--Input-focusedInset, inset) 0 0 0 calc(var(--Input-focused) * var(--Input-focusedThickness)) var(--Input-focusedHighlight)"
2649
+ }
2650
+ }), {
2651
+ "&:hover": v({}, (s = t.variants[`${e.variant}Hover`]) == null ? void 0 : s[e.color], {
2652
+ backgroundColor: null
2653
+ // it is not common to change background on hover for Input
2654
+ }),
2655
+ [`&.${pr.disabled}`]: (i = t.variants[`${e.variant}Disabled`]) == null ? void 0 : i[e.color],
2656
+ "&:focus-within::before": {
2657
+ "--Input-focused": "1"
2658
+ }
2659
+ }];
2660
+ }), oa = J("input")(({
2661
+ ownerState: t
2662
+ }) => ({
2663
+ border: "none",
2664
+ // remove the native input width
2665
+ minWidth: 0,
2666
+ // remove the native input width
2667
+ outline: 0,
2668
+ // remove the native input outline
2669
+ padding: 0,
2670
+ // remove the native input padding
2671
+ flex: 1,
2672
+ color: "inherit",
2673
+ backgroundColor: "transparent",
2674
+ fontFamily: "inherit",
2675
+ fontSize: "inherit",
2676
+ fontStyle: "inherit",
2677
+ fontWeight: "inherit",
2678
+ lineHeight: "inherit",
2679
+ textOverflow: "ellipsis",
2680
+ "&:-webkit-autofill": v({
2681
+ paddingInline: "var(--Input-paddingInline)"
2682
+ }, !t.startDecorator && {
2683
+ marginInlineStart: "calc(-1 * var(--Input-paddingInline))",
2684
+ paddingInlineStart: "var(--Input-paddingInline)",
2685
+ borderTopLeftRadius: "calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",
2686
+ borderBottomLeftRadius: "calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"
2687
+ }, !t.endDecorator && {
2688
+ marginInlineEnd: "calc(-1 * var(--Input-paddingInline))",
2689
+ paddingInlineEnd: "var(--Input-paddingInline)",
2690
+ borderTopRightRadius: "calc(var(--Input-radius) - var(--variant-borderWidth, 0px))",
2691
+ borderBottomRightRadius: "calc(var(--Input-radius) - var(--variant-borderWidth, 0px))"
2692
+ }),
2693
+ "&::-webkit-input-placeholder": {
2694
+ color: "var(--Input-placeholderColor)",
2695
+ opacity: "var(--Input-placeholderOpacity)"
2696
+ },
2697
+ "&::-moz-placeholder": {
2698
+ // Firefox 19+
2699
+ color: "var(--Input-placeholderColor)",
2700
+ opacity: "var(--Input-placeholderOpacity)"
2701
+ },
2702
+ "&:-ms-input-placeholder": {
2703
+ // IE11
2704
+ color: "var(--Input-placeholderColor)",
2705
+ opacity: "var(--Input-placeholderOpacity)"
2706
+ },
2707
+ "&::-ms-input-placeholder": {
2708
+ // Edge
2709
+ color: "var(--Input-placeholderColor)",
2710
+ opacity: "var(--Input-placeholderOpacity)"
2711
+ }
2712
+ })), aa = J("div")({
2713
+ "--Button-margin": "0 0 0 calc(var(--Input-decoratorChildOffset) * -1)",
2714
+ "--IconButton-margin": "0 0 0 calc(var(--Input-decoratorChildOffset) * -1)",
2715
+ "--Icon-margin": "0 0 0 calc(var(--Input-paddingInline) / -4)",
2716
+ display: "inherit",
2717
+ alignItems: "center",
2718
+ paddingBlock: "var(--unstable_InputPaddingBlock)",
2719
+ // for wrapping Autocomplete's tags
2720
+ flexWrap: "wrap",
2721
+ // for wrapping Autocomplete's tags
2722
+ marginInlineEnd: "var(--Input-gap)",
2723
+ color: "var(--Input-decoratorColor)",
2724
+ cursor: "initial"
2725
+ }), ia = J("div")({
2726
+ "--Button-margin": "0 calc(var(--Input-decoratorChildOffset) * -1) 0 0",
2727
+ "--IconButton-margin": "0 calc(var(--Input-decoratorChildOffset) * -1) 0 0",
2728
+ "--Icon-margin": "0 calc(var(--Input-paddingInline) / -4) 0 0",
2729
+ display: "inherit",
2730
+ alignItems: "center",
2731
+ marginInlineStart: "var(--Input-gap)",
2732
+ color: "var(--Input-decoratorColor)",
2733
+ cursor: "initial"
2734
+ }), la = J(na, {
2735
+ name: "JoyInput",
2736
+ slot: "Root",
2737
+ overridesResolver: (t, e) => e.root
2738
+ })({}), sa = J(oa, {
2739
+ name: "JoyInput",
2740
+ slot: "Input",
2741
+ overridesResolver: (t, e) => e.input
2742
+ })({}), ca = J(aa, {
2743
+ name: "JoyInput",
2744
+ slot: "StartDecorator",
2745
+ overridesResolver: (t, e) => e.startDecorator
2746
+ })({}), ua = J(ia, {
2747
+ name: "JoyInput",
2748
+ slot: "EndDecorator",
2749
+ overridesResolver: (t, e) => e.endDecorator
2750
+ })({}), _a = /* @__PURE__ */ u.forwardRef(function(e, r) {
2751
+ var n, o, a, s, i, l;
2752
+ const d = dt({
2753
+ props: e,
2754
+ name: "JoyInput"
2755
+ }), c = ea(v({}, d, {
2756
+ disabledInProp: e.disabled
2757
+ }), pr), {
2758
+ propsToForward: f,
2759
+ rootStateClasses: g,
2760
+ inputStateClasses: p,
2761
+ getRootProps: m,
2762
+ getInputProps: h,
2763
+ formControl: b,
2764
+ focused: S,
2765
+ error: P = !1,
2766
+ disabled: w,
2767
+ fullWidth: y = !1,
2768
+ size: C = "md",
2769
+ color: R = "neutral",
2770
+ variant: L = "outlined",
2771
+ startDecorator: D,
2772
+ endDecorator: $,
2773
+ component: E,
2774
+ slots: M = {},
2775
+ slotProps: T = {}
2776
+ } = c, W = ke(c, ta), F = (n = (o = e.error) != null ? o : b == null ? void 0 : b.error) != null ? n : P, H = (a = (s = e.size) != null ? s : b == null ? void 0 : b.size) != null ? a : C, k = (i = e.color) != null ? i : F ? "danger" : (l = b == null ? void 0 : b.color) != null ? l : R, O = v({
2777
+ instanceColor: F ? "danger" : e.color
2778
+ }, d, {
2779
+ fullWidth: y,
2780
+ color: k,
2781
+ disabled: w,
2782
+ error: F,
2783
+ focused: S,
2784
+ size: H,
2785
+ variant: L
2786
+ }), V = ra(O), j = v({}, W, {
2787
+ component: E,
2788
+ slots: M,
2789
+ slotProps: T
2790
+ }), [Z, Q] = ue("root", {
2791
+ ref: r,
2792
+ className: [V.root, g],
2793
+ elementType: la,
2794
+ getSlotProps: m,
2795
+ externalForwardedProps: j,
2796
+ ownerState: O
2797
+ }), [ee, te] = ue("input", v({}, b && {
2798
+ additionalProps: {
2799
+ id: b.htmlFor,
2800
+ "aria-describedby": b["aria-describedby"]
2801
+ }
2802
+ }, {
2803
+ className: [V.input, p],
2804
+ elementType: sa,
2805
+ getSlotProps: h,
2806
+ internalForwardedProps: f,
2807
+ externalForwardedProps: j,
2808
+ ownerState: O
2809
+ })), [re, X] = ue("startDecorator", {
2810
+ className: V.startDecorator,
2811
+ elementType: ca,
2812
+ externalForwardedProps: j,
2813
+ ownerState: O
2814
+ }), [le, z] = ue("endDecorator", {
2815
+ className: V.endDecorator,
2816
+ elementType: ua,
2817
+ externalForwardedProps: j,
2818
+ ownerState: O
2819
+ });
2820
+ return /* @__PURE__ */ _.jsxs(Z, v({}, Q, {
2821
+ children: [D && /* @__PURE__ */ _.jsx(re, v({}, X, {
2822
+ children: D
2823
+ })), /* @__PURE__ */ _.jsx(ee, v({}, te)), $ && /* @__PURE__ */ _.jsx(le, v({}, z, {
2824
+ children: $
2825
+ }))]
2826
+ }));
2827
+ });
2828
+ function da(t) {
2829
+ return tt("MuiOption", t);
2830
+ }
2831
+ const pa = Ue("MuiOption", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "focusVisible", "disabled", "selected", "highlighted", "variantPlain", "variantSoft", "variantOutlined", "variantSolid"]), fa = ["component", "children", "disabled", "value", "label", "variant", "color", "slots", "slotProps"], va = (t) => {
2832
+ const {
2833
+ disabled: e,
2834
+ highlighted: r,
2835
+ selected: n
2836
+ } = t;
2837
+ return et({
2838
+ root: ["root", e && "disabled", r && "highlighted", n && "selected"]
2839
+ }, da, {});
2840
+ }, ga = J(dr, {
2841
+ name: "JoyOption",
2842
+ slot: "Root",
2843
+ overridesResolver: (t, e) => e.root
2844
+ })(({
2845
+ theme: t,
2846
+ ownerState: e
2847
+ }) => {
2848
+ var r;
2849
+ const n = (r = t.variants[`${e.variant}Hover`]) == null ? void 0 : r[e.color];
2850
+ return {
2851
+ [`&.${pa.highlighted}:not([aria-selected="true"])`]: {
2852
+ backgroundColor: n == null ? void 0 : n.backgroundColor
2853
+ }
2854
+ };
2855
+ }), ha = /* @__PURE__ */ u.memo(/* @__PURE__ */ u.forwardRef(function(e, r) {
2856
+ var n;
2857
+ const o = dt({
2858
+ props: e,
2859
+ name: "JoyOption"
2860
+ }), {
2861
+ component: a = "li",
2862
+ children: s,
2863
+ disabled: i = !1,
2864
+ value: l,
2865
+ label: d,
2866
+ variant: c = "plain",
2867
+ color: f = "neutral",
2868
+ slots: g = {},
2869
+ slotProps: p = {}
2870
+ } = o, m = ke(o, fa), h = u.useContext(lr), {
2871
+ variant: b = c,
2872
+ color: S = f
2873
+ } = $r(e.variant, e.color), P = u.useRef(null), w = xe(P, r), y = d ?? (typeof s == "string" ? s : (n = P.current) == null ? void 0 : n.innerText), {
2874
+ getRootProps: C,
2875
+ selected: R,
2876
+ highlighted: L,
2877
+ index: D
2878
+ } = xn({
2879
+ disabled: i,
2880
+ label: y,
2881
+ value: l,
2882
+ rootRef: w
2883
+ }), $ = v({}, o, {
2884
+ disabled: i,
2885
+ selected: R,
2886
+ highlighted: L,
2887
+ index: D,
2888
+ component: a,
2889
+ variant: b,
2890
+ color: S,
2891
+ row: h
2892
+ }), E = va($), M = v({}, m, {
2893
+ component: a,
2894
+ slots: g,
2895
+ slotProps: p
2896
+ }), [T, W] = ue("root", {
2897
+ ref: r,
2898
+ getSlotProps: C,
2899
+ elementType: ga,
2900
+ externalForwardedProps: M,
2901
+ className: E.root,
2902
+ ownerState: $
2903
+ });
2904
+ return /* @__PURE__ */ _.jsx(T, v({}, W, {
2905
+ children: s
2906
+ }));
2907
+ })), ja = /* @__PURE__ */ u.forwardRef(function(e, r) {
2908
+ const {
2909
+ contextValue: n
2910
+ } = yn(e.value);
2911
+ return /* @__PURE__ */ _.jsx(pt.Provider, {
2912
+ value: n,
2913
+ children: /* @__PURE__ */ _.jsx(ha, v({}, e, {
2914
+ ref: r
2915
+ }))
2916
+ });
2917
+ }), ma = zr(/* @__PURE__ */ _.jsx("path", {
2918
+ d: "m12 5.83 2.46 2.46c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 3.7a.9959.9959 0 0 0-1.41 0L8.12 6.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 5.83zm0 12.34-2.46-2.46a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l3.17 3.18c.39.39 1.02.39 1.41 0l3.17-3.17c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L12 18.17z"
2919
+ }), "Unfold");
2920
+ function ba(t) {
2921
+ return tt("MuiSelect", t);
2922
+ }
2923
+ const We = Ue("MuiSelect", ["root", "button", "indicator", "startDecorator", "endDecorator", "popper", "listbox", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "sizeSm", "sizeMd", "sizeLg", "focusVisible", "disabled", "expanded", "multiple"]);
2924
+ var Nt;
2925
+ const xa = ["action", "autoFocus", "children", "defaultValue", "defaultListboxOpen", "disabled", "getSerializedValue", "placeholder", "listboxId", "listboxOpen", "onChange", "onListboxOpenChange", "onClose", "renderValue", "required", "value", "size", "variant", "color", "startDecorator", "endDecorator", "indicator", "aria-describedby", "aria-label", "aria-labelledby", "id", "name", "multiple", "slots", "slotProps"];
2926
+ function ya(t) {
2927
+ var e;
2928
+ return Array.isArray(t) ? /* @__PURE__ */ _.jsx(u.Fragment, {
2929
+ children: t.map((r) => r.label).join(", ")
2930
+ }) : (e = t == null ? void 0 : t.label) != null ? e : "";
2931
+ }
2932
+ const Ia = [{
2933
+ name: "offset",
2934
+ options: {
2935
+ offset: [0, 4]
2936
+ }
2937
+ }, {
2938
+ // popper will have the same width as root element when open
2939
+ name: "equalWidth",
2940
+ enabled: !0,
2941
+ phase: "beforeWrite",
2942
+ requires: ["computeStyles"],
2943
+ fn: ({
2944
+ state: t
2945
+ }) => {
2946
+ t.styles.popper.width = `${t.rects.reference.width}px`;
2947
+ }
2948
+ }], Ca = (t) => {
2949
+ const {
2950
+ color: e,
2951
+ disabled: r,
2952
+ focusVisible: n,
2953
+ size: o,
2954
+ variant: a,
2955
+ open: s,
2956
+ multiple: i
2957
+ } = t, l = {
2958
+ root: ["root", r && "disabled", n && "focusVisible", s && "expanded", a && `variant${me(a)}`, e && `color${me(e)}`, o && `size${me(o)}`, i && "multiple"],
2959
+ button: ["button"],
2960
+ startDecorator: ["startDecorator"],
2961
+ endDecorator: ["endDecorator"],
2962
+ indicator: ["indicator", s && "expanded"],
2963
+ listbox: ["listbox", s && "expanded", r && "disabled"]
2964
+ };
2965
+ return et(l, ba, {});
2966
+ }, Sa = J("div", {
2967
+ name: "JoySelect",
2968
+ slot: "Root",
2969
+ overridesResolver: (t, e) => e.root
2970
+ })(({
2971
+ theme: t,
2972
+ ownerState: e
2973
+ }) => {
2974
+ var r, n, o, a, s;
2975
+ const i = (r = t.variants[`${e.variant}`]) == null ? void 0 : r[e.color], {
2976
+ borderRadius: l
2977
+ } = Jt({
2978
+ theme: t,
2979
+ ownerState: e
2980
+ }, ["borderRadius"]);
2981
+ return [v({
2982
+ "--Select-radius": t.vars.radius.sm,
2983
+ "--Select-gap": "0.5rem",
2984
+ "--Select-placeholderOpacity": 0.64,
2985
+ "--Select-decoratorColor": t.vars.palette.text.icon,
2986
+ "--Select-focusedThickness": t.vars.focus.thickness,
2987
+ "--Select-focusedHighlight": (n = t.vars.palette[e.color === "neutral" ? "primary" : e.color]) == null ? void 0 : n[500],
2988
+ '&:not([data-inverted-colors="false"])': v({}, e.instanceColor && {
2989
+ "--_Select-focusedHighlight": (o = t.vars.palette[e.instanceColor === "neutral" ? "primary" : e.instanceColor]) == null ? void 0 : o[500]
2990
+ }, {
2991
+ "--Select-focusedHighlight": t.vars.palette.focusVisible
2992
+ }),
2993
+ "--Select-indicatorColor": i != null && i.backgroundColor ? i == null ? void 0 : i.color : t.vars.palette.text.tertiary
2994
+ }, e.size === "sm" && {
2995
+ "--Select-minHeight": "2rem",
2996
+ "--Select-paddingInline": "0.5rem",
2997
+ "--Select-decoratorChildHeight": "min(1.5rem, var(--Select-minHeight))",
2998
+ "--Icon-fontSize": t.vars.fontSize.xl
2999
+ }, e.size === "md" && {
3000
+ "--Select-minHeight": "2.25rem",
3001
+ "--Select-paddingInline": "0.75rem",
3002
+ "--Select-decoratorChildHeight": "min(1.75rem, var(--Select-minHeight))",
3003
+ "--Icon-fontSize": t.vars.fontSize.xl2
3004
+ }, e.size === "lg" && {
3005
+ "--Select-minHeight": "2.75rem",
3006
+ "--Select-paddingInline": "1rem",
3007
+ "--Select-decoratorChildHeight": "min(2.375rem, var(--Select-minHeight))",
3008
+ "--Icon-fontSize": t.vars.fontSize.xl2
3009
+ }, {
3010
+ // variables for controlling child components
3011
+ "--Select-decoratorChildOffset": "min(calc(var(--Select-paddingInline) - (var(--Select-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Select-decoratorChildHeight)) / 2), var(--Select-paddingInline))",
3012
+ "--_Select-paddingBlock": "max((var(--Select-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Select-decoratorChildHeight)) / 2, 0px)",
3013
+ "--Select-decoratorChildRadius": "max(var(--Select-radius) - var(--variant-borderWidth, 0px) - var(--_Select-paddingBlock), min(var(--_Select-paddingBlock) + var(--variant-borderWidth, 0px), var(--Select-radius) / 2))",
3014
+ "--Button-minHeight": "var(--Select-decoratorChildHeight)",
3015
+ "--Button-paddingBlock": "0px",
3016
+ // to ensure that the height of the button is equal to --Button-minHeight
3017
+ "--IconButton-size": "var(--Select-decoratorChildHeight)",
3018
+ "--Button-radius": "var(--Select-decoratorChildRadius)",
3019
+ "--IconButton-radius": "var(--Select-decoratorChildRadius)",
3020
+ boxSizing: "border-box"
3021
+ }, e.variant !== "plain" && {
3022
+ boxShadow: t.shadow.xs
3023
+ }, {
3024
+ minWidth: 0,
3025
+ minHeight: "var(--Select-minHeight)",
3026
+ position: "relative",
3027
+ display: "flex",
3028
+ alignItems: "center",
3029
+ borderRadius: "var(--Select-radius)",
3030
+ cursor: "pointer"
3031
+ }, !(i != null && i.backgroundColor) && {
3032
+ backgroundColor: t.vars.palette.background.surface
3033
+ }, e.size && {
3034
+ paddingBlock: {
3035
+ sm: 2,
3036
+ md: 3,
3037
+ lg: 4
3038
+ }[e.size]
3039
+ // the padding-block act as a minimum spacing between content and root element
3040
+ }, {
3041
+ paddingInline: "var(--Select-paddingInline)"
3042
+ }, t.typography[`body-${e.size}`], i, {
3043
+ "&::before": {
3044
+ boxSizing: "border-box",
3045
+ content: '""',
3046
+ display: "block",
3047
+ position: "absolute",
3048
+ pointerEvents: "none",
3049
+ top: 0,
3050
+ left: 0,
3051
+ right: 0,
3052
+ bottom: 0,
3053
+ zIndex: 1,
3054
+ borderRadius: "inherit",
3055
+ margin: "calc(var(--variant-borderWidth, 0px) * -1)"
3056
+ // for outlined variant
3057
+ },
3058
+ [`&.${We.focusVisible}`]: {
3059
+ "--Select-indicatorColor": i == null ? void 0 : i.color,
3060
+ "&::before": {
3061
+ boxShadow: "inset 0 0 0 var(--Select-focusedThickness) var(--Select-focusedHighlight)"
3062
+ }
3063
+ },
3064
+ [`&.${We.disabled}`]: {
3065
+ "--Select-indicatorColor": "inherit"
3066
+ }
3067
+ }), {
3068
+ "&:hover": (a = t.variants[`${e.variant}Hover`]) == null ? void 0 : a[e.color],
3069
+ [`&.${We.disabled}`]: (s = t.variants[`${e.variant}Disabled`]) == null ? void 0 : s[e.color]
3070
+ }, l !== void 0 && {
3071
+ "--Select-radius": l
3072
+ }];
3073
+ }), Pa = J("button", {
3074
+ name: "JoySelect",
3075
+ slot: "Button",
3076
+ overridesResolver: (t, e) => e.button
3077
+ })(({
3078
+ ownerState: t
3079
+ }) => v({
3080
+ // reset user-agent button style
3081
+ border: 0,
3082
+ outline: 0,
3083
+ background: "none",
3084
+ padding: 0,
3085
+ fontSize: "inherit",
3086
+ color: "inherit",
3087
+ alignSelf: "stretch",
3088
+ // make children horizontally aligned
3089
+ display: "flex",
3090
+ alignItems: "center",
3091
+ flex: 1,
3092
+ fontFamily: "inherit",
3093
+ cursor: "pointer",
3094
+ whiteSpace: "nowrap",
3095
+ overflow: "hidden"
3096
+ }, (t.value === null || t.value === void 0) && {
3097
+ opacity: "var(--Select-placeholderOpacity)"
3098
+ }, {
3099
+ "&::before": {
3100
+ content: '""',
3101
+ display: "block",
3102
+ position: "absolute",
3103
+ // TODO: use https://caniuse.com/?search=inset when ~94%
3104
+ top: "calc(-1 * var(--variant-borderWidth, 0px))",
3105
+ left: "calc(-1 * var(--variant-borderWidth, 0px))",
3106
+ right: "calc(-1 * var(--variant-borderWidth, 0px))",
3107
+ bottom: "calc(-1 * var(--variant-borderWidth, 0px))",
3108
+ borderRadius: "var(--Select-radius)"
3109
+ }
3110
+ })), Ra = J(ur, {
3111
+ name: "JoySelect",
3112
+ slot: "Listbox",
3113
+ overridesResolver: (t, e) => e.listbox
3114
+ })(({
3115
+ theme: t,
3116
+ ownerState: e
3117
+ }) => {
3118
+ var r;
3119
+ const n = (r = t.variants[e.variant]) == null ? void 0 : r[e.color];
3120
+ return v({
3121
+ "--focus-outline-offset": `calc(${t.vars.focus.thickness} * -1)`,
3122
+ // to prevent the focus outline from being cut by overflow
3123
+ "--ListItem-stickyBackground": (n == null ? void 0 : n.backgroundColor) || (n == null ? void 0 : n.background) || t.vars.palette.background.popup,
3124
+ "--ListItem-stickyTop": "calc(var(--List-padding, var(--ListDivider-gap)) * -1)"
3125
+ }, qo, {
3126
+ minWidth: "max-content",
3127
+ // prevent options from shrinking if some of them is wider than the Select's root.
3128
+ maxHeight: "44vh",
3129
+ // the best value from what I tried so far which does not cause screen flicker when listbox is open.
3130
+ overflow: "auto",
3131
+ outline: 0,
3132
+ boxShadow: t.shadow.md,
3133
+ borderRadius: `var(--List-radius, ${t.vars.radius.sm})`,
3134
+ // `unstable_popup-zIndex` is a private variable that lets other component, for example Modal, to override the z-index so that the listbox can be displayed above the Modal.
3135
+ zIndex: `var(--unstable_popup-zIndex, ${t.vars.zIndex.popup})`
3136
+ }, !(n != null && n.backgroundColor) && {
3137
+ backgroundColor: t.vars.palette.background.popup
3138
+ });
3139
+ }), wa = J("span", {
3140
+ name: "JoySelect",
3141
+ slot: "StartDecorator",
3142
+ overridesResolver: (t, e) => e.startDecorator
3143
+ })({
3144
+ "--Button-margin": "0 0 0 calc(var(--Select-decoratorChildOffset) * -1)",
3145
+ "--IconButton-margin": "0 0 0 calc(var(--Select-decoratorChildOffset) * -1)",
3146
+ "--Icon-margin": "0 0 0 calc(var(--Select-paddingInline) / -4)",
3147
+ display: "inherit",
3148
+ alignItems: "center",
3149
+ color: "var(--Select-decoratorColor)",
3150
+ marginInlineEnd: "var(--Select-gap)"
3151
+ }), Oa = J("span", {
3152
+ name: "JoySelect",
3153
+ slot: "EndDecorator",
3154
+ overridesResolver: (t, e) => e.endDecorator
3155
+ })({
3156
+ "--Button-margin": "0 calc(var(--Select-decoratorChildOffset) * -1) 0 0",
3157
+ "--IconButton-margin": "0 calc(var(--Select-decoratorChildOffset) * -1) 0 0",
3158
+ "--Icon-margin": "0 calc(var(--Select-paddingInline) / -4) 0 0",
3159
+ display: "inherit",
3160
+ alignItems: "center",
3161
+ color: "var(--Select-decoratorColor)",
3162
+ marginInlineStart: "var(--Select-gap)"
3163
+ }), La = J("span", {
3164
+ name: "JoySelect",
3165
+ slot: "Indicator"
3166
+ })(({
3167
+ ownerState: t,
3168
+ theme: e
3169
+ }) => v({}, t.size === "sm" && {
3170
+ "--Icon-fontSize": e.vars.fontSize.lg
3171
+ }, t.size === "md" && {
3172
+ "--Icon-fontSize": e.vars.fontSize.xl
3173
+ }, t.size === "lg" && {
3174
+ "--Icon-fontSize": e.vars.fontSize.xl2
3175
+ }, {
3176
+ "--Icon-color": t.color !== "neutral" || t.variant === "solid" ? "currentColor" : e.vars.palette.text.icon,
3177
+ display: "inherit",
3178
+ alignItems: "center",
3179
+ marginInlineStart: "var(--Select-gap)",
3180
+ marginInlineEnd: "calc(var(--Select-paddingInline) / -4)",
3181
+ [`.${We.endDecorator} + &`]: {
3182
+ marginInlineStart: "calc(var(--Select-gap) / 2)"
3183
+ },
3184
+ [`&.${We.expanded}, .${We.disabled} > &`]: {
3185
+ "--Icon-color": "currentColor"
3186
+ }
3187
+ })), Na = /* @__PURE__ */ u.forwardRef(function(e, r) {
3188
+ var n, o, a, s, i, l, d;
3189
+ const c = dt({
3190
+ props: e,
3191
+ name: "JoySelect"
3192
+ }), f = c, {
3193
+ action: g,
3194
+ autoFocus: p,
3195
+ children: m,
3196
+ defaultValue: h,
3197
+ defaultListboxOpen: b = !1,
3198
+ disabled: S,
3199
+ getSerializedValue: P,
3200
+ placeholder: w,
3201
+ listboxId: y,
3202
+ listboxOpen: C,
3203
+ onChange: R,
3204
+ onListboxOpenChange: L,
3205
+ onClose: D,
3206
+ renderValue: $,
3207
+ required: E = !1,
3208
+ value: M,
3209
+ size: T = "md",
3210
+ variant: W = "outlined",
3211
+ color: F = "neutral",
3212
+ startDecorator: H,
3213
+ endDecorator: k,
3214
+ indicator: O = Nt || (Nt = /* @__PURE__ */ _.jsx(ma, {})),
3215
+ // props to forward to the button (all handlers should go through slotProps.button)
3216
+ "aria-describedby": V,
3217
+ "aria-label": j,
3218
+ "aria-labelledby": Z,
3219
+ id: Q,
3220
+ name: ee,
3221
+ multiple: te = !1,
3222
+ slots: re = {},
3223
+ slotProps: X = {}
3224
+ } = f, le = ke(f, xa), z = u.useContext(fr), B = (n = (o = e.disabled) != null ? o : z == null ? void 0 : z.disabled) != null ? n : S, N = (a = (s = e.size) != null ? s : z == null ? void 0 : z.size) != null ? a : T, U = (i = e.color) != null ? i : z != null && z.error ? "danger" : (l = z == null ? void 0 : z.color) != null ? l : F, ne = $ ?? ya, [ve, he] = u.useState(null), Ie = u.useRef(null), $e = u.useRef(null), Ve = xe(r, Ie);
3225
+ u.useImperativeHandle(g, () => ({
3226
+ focusVisible: () => {
3227
+ var G;
3228
+ (G = $e.current) == null || G.focus();
3229
+ }
3230
+ }), []), u.useEffect(() => {
3231
+ he(Ie.current);
3232
+ }, []), u.useEffect(() => {
3233
+ p && $e.current.focus();
3234
+ }, [p]);
3235
+ const Re = u.useCallback((G) => {
3236
+ L == null || L(G), G || D == null || D();
3237
+ }, [D, L]), {
3238
+ buttonActive: qe,
3239
+ buttonFocusVisible: Je,
3240
+ contextValue: ge,
3241
+ disabled: we,
3242
+ getButtonProps: Ae,
3243
+ getListboxProps: Te,
3244
+ getHiddenInputProps: Ee,
3245
+ getOptionMetadata: Oe,
3246
+ open: ze,
3247
+ value: se
3248
+ } = _o({
3249
+ buttonRef: $e,
3250
+ defaultOpen: b,
3251
+ defaultValue: h,
3252
+ disabled: B,
3253
+ getSerializedValue: P,
3254
+ listboxId: y,
3255
+ multiple: te,
3256
+ name: ee,
3257
+ required: E,
3258
+ onChange: R,
3259
+ onOpenChange: Re,
3260
+ open: C,
3261
+ value: M
3262
+ }), oe = v({}, c, {
3263
+ active: qe,
3264
+ defaultListboxOpen: b,
3265
+ disabled: we,
3266
+ focusVisible: Je,
3267
+ open: ze,
3268
+ renderValue: ne,
3269
+ value: se,
3270
+ size: N,
3271
+ variant: W,
3272
+ color: U
3273
+ }), Ce = Ca(oe), Le = v({}, le, {
3274
+ slots: re,
3275
+ slotProps: X
3276
+ }), Me = u.useMemo(() => {
3277
+ let G;
3278
+ if (te)
3279
+ G = se.map((vt) => Oe(vt)).filter((vt) => vt !== void 0);
3280
+ else {
3281
+ var kt;
3282
+ G = (kt = Oe(se)) != null ? kt : null;
3283
+ }
3284
+ return G;
3285
+ }, [Oe, se, te]), [x, I] = ue("root", {
3286
+ ref: Ve,
3287
+ className: Ce.root,
3288
+ elementType: Sa,
3289
+ externalForwardedProps: Le,
3290
+ ownerState: oe
3291
+ }), [A, K] = ue("button", {
3292
+ additionalProps: {
3293
+ "aria-describedby": V ?? (z == null ? void 0 : z["aria-describedby"]),
3294
+ "aria-label": j,
3295
+ "aria-labelledby": Z ?? (z == null ? void 0 : z.labelId),
3296
+ "aria-required": E ? "true" : void 0,
3297
+ id: Q ?? (z == null ? void 0 : z.htmlFor),
3298
+ name: ee
3299
+ },
3300
+ className: Ce.button,
3301
+ elementType: Pa,
3302
+ externalForwardedProps: Le,
3303
+ getSlotProps: Ae,
3304
+ ownerState: oe
3305
+ }), [vr, Xe] = ue("listbox", {
3306
+ additionalProps: {
3307
+ anchorEl: ve,
3308
+ open: ze,
3309
+ placement: "bottom",
3310
+ keepMounted: !0
3311
+ },
3312
+ className: Ce.listbox,
3313
+ elementType: Ra,
3314
+ externalForwardedProps: Le,
3315
+ getSlotProps: Te,
3316
+ ownerState: v({}, oe, {
3317
+ nesting: !1,
3318
+ row: !1,
3319
+ wrap: !1
3320
+ }),
3321
+ getSlotOwnerState: (G) => ({
3322
+ size: G.size || N,
3323
+ variant: G.variant || W,
3324
+ color: G.color || (G.disablePortal ? U : F),
3325
+ disableColorInversion: !G.disablePortal
3326
+ })
3327
+ }), [gr, hr] = ue("startDecorator", {
3328
+ className: Ce.startDecorator,
3329
+ elementType: wa,
3330
+ externalForwardedProps: Le,
3331
+ ownerState: oe
3332
+ }), [mr, br] = ue("endDecorator", {
3333
+ className: Ce.endDecorator,
3334
+ elementType: Oa,
3335
+ externalForwardedProps: Le,
3336
+ ownerState: oe
3337
+ }), [xr, yr] = ue("indicator", {
3338
+ className: Ce.indicator,
3339
+ elementType: La,
3340
+ externalForwardedProps: Le,
3341
+ ownerState: oe
3342
+ }), Ir = u.useMemo(() => [...Ia, ...Xe.modifiers || []], [Xe.modifiers]);
3343
+ let Lt = w;
3344
+ return (Array.isArray(Me) && Me.length > 0 || !Array.isArray(Me) && Me) && (Lt = ne(Me)), /* @__PURE__ */ _.jsxs(u.Fragment, {
3345
+ children: [/* @__PURE__ */ _.jsxs(x, v({}, I, {
3346
+ children: [H && /* @__PURE__ */ _.jsx(gr, v({}, hr, {
3347
+ children: H
3348
+ })), /* @__PURE__ */ _.jsx(A, v({}, K, {
3349
+ children: Lt
3350
+ })), k && /* @__PURE__ */ _.jsx(mr, v({}, br, {
3351
+ children: k
3352
+ })), O && /* @__PURE__ */ _.jsx(xr, v({}, yr, {
3353
+ children: O
3354
+ })), /* @__PURE__ */ _.jsx("input", v({}, Ee()))]
3355
+ })), ve && /* @__PURE__ */ _.jsx(vr, v({}, Xe, {
3356
+ className: Ut(Xe.className),
3357
+ modifiers: Ir
3358
+ }, !((d = c.slots) != null && d.listbox) && {
3359
+ as: Ao,
3360
+ slots: {
3361
+ root: Xe.as || "ul"
3362
+ }
3363
+ }, {
3364
+ children: /* @__PURE__ */ _.jsx(jo, {
3365
+ value: ge,
3366
+ children: /* @__PURE__ */ _.jsx(Er, {
3367
+ variant: W,
3368
+ color: F,
3369
+ children: /* @__PURE__ */ _.jsx(sr.Provider, {
3370
+ value: "select",
3371
+ children: /* @__PURE__ */ _.jsx(cr, {
3372
+ nested: !0,
3373
+ children: m
3374
+ })
3375
+ })
3376
+ })
3377
+ })
3378
+ }))]
3379
+ });
3380
+ });
3381
+ export {
3382
+ Uo as C,
3383
+ fr as F,
3384
+ sr as G,
3385
+ _a as I,
3386
+ Ma as L,
3387
+ ir as N,
3388
+ Ao as P,
3389
+ lr as R,
3390
+ Na as S,
3391
+ Fo as W,
3392
+ ja as a,
3393
+ Ha as b,
3394
+ ea as c,
3395
+ ur as d,
3396
+ Ta as e,
3397
+ dr as f,
3398
+ Aa as g,
3399
+ cr as h,
3400
+ na as i,
3401
+ oa as j,
3402
+ aa as k,
3403
+ No as l,
3404
+ ia as m,
3405
+ Wa as n,
3406
+ mn as o,
3407
+ Yt as p,
3408
+ bn as q,
3409
+ Kt as r,
3410
+ qo as s,
3411
+ q as t,
3412
+ Va as u,
3413
+ Y as v,
3414
+ vn as w,
3415
+ pt as x,
3416
+ gn as y,
3417
+ st as z
3418
+ };