@ufoui/core 0.0.5 → 0.0.12

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 (57) hide show
  1. package/assets/icons.d.ts +3 -0
  2. package/components/accordion/accordion.d.ts +31 -3
  3. package/components/accordion/accordionItem.d.ts +31 -3
  4. package/components/base/boxBase.d.ts +15 -37
  5. package/components/base/buttonBase.d.ts +1 -1
  6. package/components/base/dialogBase.d.ts +9 -7
  7. package/components/base/fieldBase.d.ts +2 -3
  8. package/components/base/textBase.d.ts +1 -2
  9. package/components/breadcrumbs/breadcrumbs.d.ts +48 -0
  10. package/components/calendar/calendar.d.ts +23 -0
  11. package/components/calendar/calendarUtils.d.ts +18 -0
  12. package/components/collapse/collapse.d.ts +15 -20
  13. package/components/dialogs/dialog.d.ts +1 -1
  14. package/components/dialogs/dialogTitle.d.ts +1 -1
  15. package/components/dialogs/drawer.d.ts +1 -1
  16. package/components/fieldset/fieldset.d.ts +1 -1
  17. package/components/link/link.d.ts +58 -0
  18. package/components/list/list.d.ts +1 -1
  19. package/components/rating/rating.d.ts +68 -0
  20. package/components/slider/slider.d.ts +11 -0
  21. package/components/switch/switch.d.ts +1 -9
  22. package/components/toast/toast.d.ts +18 -4
  23. package/components/toast/toastViewport.d.ts +4 -3
  24. package/components/toolbar/toolbar.d.ts +1 -1
  25. package/context/selectionContext.d.ts +18 -17
  26. package/hooks/index.d.ts +3 -1
  27. package/hooks/useAnimate.d.ts +36 -16
  28. package/hooks/useFocusTrap.d.ts +32 -0
  29. package/hooks/useFocusVisible.d.ts +16 -14
  30. package/hooks/useResizeObserver.d.ts +7 -3
  31. package/hooks/useRovingFocus.d.ts +30 -0
  32. package/hooks/useSelection.d.ts +10 -7
  33. package/hooks/useSelectionState.d.ts +29 -0
  34. package/hooks/useSliderKeys.d.ts +41 -0
  35. package/index.css +1 -1
  36. package/index.d.ts +4 -8
  37. package/index.js +4881 -0
  38. package/internal/controlGrid/controlGrid.d.ts +32 -0
  39. package/internal/controlLabel/controlLabel.d.ts +31 -0
  40. package/internal/description/description.d.ts +18 -0
  41. package/internal/index.d.ts +6 -0
  42. package/internal/inlineTooltip/index.d.ts +1 -0
  43. package/internal/inlineTooltip/inlineTooltipManager.d.ts +1 -1
  44. package/internal/slots/slot.d.ts +44 -0
  45. package/internal/stateLayer/stateLayer.d.ts +33 -0
  46. package/package.json +12 -3
  47. package/utils/color.d.ts +0 -102
  48. package/utils/getWrapperStyle.d.ts +53 -0
  49. package/utils/index.d.ts +1 -0
  50. package/utils/toasts/ensureViewport.d.ts +6 -1
  51. package/utils/toasts/toast.d.ts +66 -10
  52. package/utils/toasts/toastStore.d.ts +55 -1
  53. package/utils/utils.d.ts +65 -53
  54. package/hooks/useFocusState.d.ts +0 -16
  55. package/index.mjs +0 -4649
  56. package/internal/inlineTooltip/inlineTooltip.d.ts +0 -11
  57. package/internal/inlineTooltip/inlineTooltip2.d.ts +0 -10
package/index.js ADDED
@@ -0,0 +1,4881 @@
1
+ import { jsx as r, jsxs as $, Fragment as it } from "react/jsx-runtime";
2
+ import rt, { useState as q, useRef as W, useCallback as Qe, useEffect as ye, createContext as _t, useContext as Mt, forwardRef as I, useLayoutEffect as Bn, isValidElement as mt, cloneElement as Tt, useMemo as ft, Children as Dn, Fragment as bo } from "react";
3
+ import vo, { createPortal as en } from "react-dom";
4
+ import { argbFromHex as Et, themeFromSourceColor as Co, hexFromArgb as Ie, TonalPalette as xo } from "@material/material-color-utilities";
5
+ const $n = [
6
+ "primary",
7
+ "secondary",
8
+ "tertiary",
9
+ "warning",
10
+ "info",
11
+ "success",
12
+ "error"
13
+ ], En = [
14
+ ...$n,
15
+ "primaryContainer",
16
+ "primaryFixed",
17
+ "primaryFixedDim",
18
+ "secondaryContainer",
19
+ "secondaryFixed",
20
+ "secondaryFixedDim",
21
+ "tertiaryContainer",
22
+ "tertiaryFixed",
23
+ "tertiaryFixedDim",
24
+ "warningContainer",
25
+ "warningFixed",
26
+ "warningFixedDim",
27
+ "infoContainer",
28
+ "infoFixed",
29
+ "infoFixedDim",
30
+ "successContainer",
31
+ "successFixed",
32
+ "successFixedDim",
33
+ "errorContainer",
34
+ "errorFixed",
35
+ "errorFixedDim",
36
+ "black",
37
+ "white"
38
+ ], wo = [
39
+ ...En,
40
+ "outline",
41
+ "outlineVariant",
42
+ "surface",
43
+ "surfaceVariant",
44
+ "background",
45
+ "inverseSurface",
46
+ "inversePrimary",
47
+ "surfaceContainerHighest",
48
+ "surfaceContainerHigh",
49
+ "surfaceContainer",
50
+ "surfaceContainerLow",
51
+ "surfaceContainerLowest",
52
+ "surfaceBright",
53
+ "surfaceDim"
54
+ ], No = [
55
+ ...wo,
56
+ "onPrimary",
57
+ "onPrimaryContainer",
58
+ "onPrimaryFixed",
59
+ "onPrimaryFixedVariant",
60
+ "onSecondary",
61
+ "onSecondaryContainer",
62
+ "onSecondaryFixed",
63
+ "onSecondaryFixedVariant",
64
+ "onTertiary",
65
+ "onTertiaryContainer",
66
+ "onTertiaryFixed",
67
+ "onTertiaryFixedVariant",
68
+ "onWarning",
69
+ "onWarningContainer",
70
+ "onWarningFixed",
71
+ "onWarningFixedVariant",
72
+ "onInfo",
73
+ "onInfoContainer",
74
+ "onInfoFixed",
75
+ "onInfoFixedVariant",
76
+ "onSuccess",
77
+ "onSuccessContainer",
78
+ "onSuccessFixed",
79
+ "onSuccessFixedVariant",
80
+ "onError",
81
+ "onErrorContainer",
82
+ "onErrorFixed",
83
+ "onErrorFixedVariant",
84
+ "onSurface",
85
+ "onSurfaceVariant",
86
+ "onBackground",
87
+ "inverseOnSurface",
88
+ "inversePrimary",
89
+ "shadow",
90
+ "surfaceTint",
91
+ "scrim"
92
+ ], tn = {
93
+ fade: "uui-motion-fade",
94
+ fadeBlur: "uui-motion-fade-blur",
95
+ scale: "uui-motion-scale",
96
+ scaleBlur: "uui-motion-scale-blur",
97
+ popup: "uui-motion-popup",
98
+ slideUp: "uui-motion-slide-up",
99
+ slideDown: "uui-motion-slide-down",
100
+ slideLeft: "uui-motion-slide-left",
101
+ slideRight: "uui-motion-slide-right",
102
+ slideUpBlur: "uui-motion-slide-up-blur",
103
+ slideDownBlur: "uui-motion-slide-down-blur",
104
+ slideLeftBlur: "uui-motion-slide-left-blur",
105
+ slideRightBlur: "uui-motion-slide-right-blur",
106
+ rotate: "uui-motion-rotate",
107
+ rotateUpRight: "uui-motion-rotate-up-right",
108
+ rotateUpLeft: "uui-motion-rotate-up-left",
109
+ rollLeft: "uui-motion-roll-left",
110
+ rollRight: "uui-motion-roll-right",
111
+ flipX: "uui-motion-flip-x",
112
+ flipY: "uui-motion-flip-y",
113
+ bounce: "uui-motion-bounce",
114
+ squish: "uui-motion-squish",
115
+ rubber: "uui-motion-rubber",
116
+ popElastic: "uui-motion-pop-elastic",
117
+ jelly: "uui-motion-jelly"
118
+ };
119
+ function nn(e) {
120
+ return e ? tn[e] ?? "" : "";
121
+ }
122
+ function yi() {
123
+ return Object.keys(tn);
124
+ }
125
+ function on(e) {
126
+ return e === "expressive" ? "uui-motion-expressive" : "";
127
+ }
128
+ const bi = (e) => {
129
+ const t = $n.includes(e) ? e : "primary";
130
+ return {
131
+ textColor: `uui-text-${t}`,
132
+ borderColor: `uui-border-${t}`,
133
+ bgColor: `uui-bg-${t}`,
134
+ textOnColor: `uui-text-on-${t}`,
135
+ borderOnColor: `uui-border-on-${t}`,
136
+ bgOnColor: `uui-bg-on-${t}`,
137
+ textContainer: `uui-text-${t}-container`,
138
+ borderContainer: `uui-border-${t}-container`,
139
+ bgContainer: `uui-bg-${t}-container`,
140
+ textOnContainer: `uui-text-on-${t}-container`,
141
+ borderOnContainer: `uui-border-on-${t}-container`,
142
+ bgOnContainer: `uui-bg-on-${t}-container`,
143
+ textFixed: `uui-text-${t}-fixed`,
144
+ borderFixed: `uui-border-${t}-fixed`,
145
+ bgFixed: `uui-bg-${t}-fixed`,
146
+ textOnFixed: `uui-text-on-${t}-fixed`,
147
+ borderOnFixed: `uui-border-on-${t}-fixed`,
148
+ bgOnFixed: `uui-bg-on-${t}-fixed`,
149
+ textFixedDim: `uui-text-${t}-fixed-dim`,
150
+ borderFixedDim: `uui-border-${t}-fixed-dim`,
151
+ bgFixedDim: `uui-bg-${t}-fixed-dim`,
152
+ textOnFixedVariant: `uui-text-on-${t}-fixed-variant`,
153
+ borderOnFixedVariant: `uui-border-on-${t}-fixed-variant`,
154
+ bgOnFixedVariant: `uui-bg-on-${t}-fixed-variant`
155
+ };
156
+ }, Xt = {
157
+ // SURFACE
158
+ surface: "onSurface",
159
+ surfaceVariant: "onSurfaceVariant",
160
+ surfaceContainerLowest: "onSurface",
161
+ surfaceContainerLow: "onSurface",
162
+ surfaceContainer: "onSurface",
163
+ surfaceContainerHigh: "onSurface",
164
+ surfaceContainerHighest: "onSurface",
165
+ surfaceDim: "onSurface",
166
+ surfaceBright: "onSurface",
167
+ background: "onBackground",
168
+ inverseSurface: "inverseOnSurface",
169
+ // SEMANTIC
170
+ primary: "onPrimary",
171
+ secondary: "onSecondary",
172
+ tertiary: "onTertiary",
173
+ warning: "onWarning",
174
+ info: "onInfo",
175
+ success: "onSuccess",
176
+ error: "onError",
177
+ // EXTENDED
178
+ primaryContainer: "onPrimaryContainer",
179
+ primaryFixed: "onPrimaryFixed",
180
+ primaryFixedDim: "onPrimaryFixedVariant",
181
+ secondaryContainer: "onSecondaryContainer",
182
+ secondaryFixed: "onSecondaryFixed",
183
+ secondaryFixedDim: "onSecondaryFixedVariant",
184
+ tertiaryContainer: "onTertiaryContainer",
185
+ tertiaryFixed: "onTertiaryFixed",
186
+ tertiaryFixedDim: "onTertiaryFixedVariant",
187
+ warningContainer: "onWarningContainer",
188
+ warningFixed: "onWarningFixed",
189
+ warningFixedDim: "onWarningFixedVariant",
190
+ infoContainer: "onInfoContainer",
191
+ infoFixed: "onInfoFixed",
192
+ infoFixedDim: "onInfoFixedVariant",
193
+ successContainer: "onSuccessContainer",
194
+ successFixed: "onSuccessFixed",
195
+ successFixedDim: "onSuccessFixedVariant",
196
+ errorContainer: "onErrorContainer",
197
+ errorFixed: "onErrorFixed",
198
+ errorFixedDim: "onErrorFixedVariant",
199
+ // NEUTRAL / TECHNICAL (for TS completeness)
200
+ outline: "surface",
201
+ outlineVariant: "inverseSurface",
202
+ inversePrimary: "onPrimaryContainer",
203
+ black: "white",
204
+ white: "black",
205
+ onSurface: "surface",
206
+ onSurfaceVariant: "surfaceVariant",
207
+ onBackground: "background",
208
+ inverseOnSurface: "inverseSurface",
209
+ onPrimary: "primary",
210
+ onSecondary: "secondary",
211
+ onTertiary: "tertiary",
212
+ onWarning: "warning",
213
+ onInfo: "info",
214
+ onSuccess: "success",
215
+ onError: "error",
216
+ onPrimaryContainer: "primaryContainer",
217
+ onSecondaryContainer: "secondaryContainer",
218
+ onTertiaryContainer: "tertiaryContainer",
219
+ onWarningContainer: "warningContainer",
220
+ onInfoContainer: "infoContainer",
221
+ onSuccessContainer: "successContainer",
222
+ onErrorContainer: "errorContainer"
223
+ }, Tn = (e) => {
224
+ const t = e.toLowerCase(), n = `--uui-color-${t}`, o = `--uui-color-on-${t}`;
225
+ return {
226
+ color: `var(${n})`,
227
+ onColor: `var(${o})`
228
+ };
229
+ }, ko = (e) => [parseInt(e.slice(1, 3), 16), parseInt(e.slice(3, 5), 16), parseInt(e.slice(5, 7), 16)], vi = (e) => [
230
+ parseInt(e.slice(1, 3), 16),
231
+ parseInt(e.slice(3, 5), 16),
232
+ parseInt(e.slice(5, 7), 16)
233
+ ].join(",");
234
+ function Ci(e, t) {
235
+ const o = {
236
+ 0: "0",
237
+ 1: "0.05",
238
+ 2: "0.08",
239
+ 3: "0.11",
240
+ 4: "0.12",
241
+ 5: "0.14"
242
+ }[e] ?? 0, [i, l, a] = ko(t);
243
+ return `rgba(${String(i)}, ${String(l)}, ${String(a)}, ${o})`;
244
+ }
245
+ function So(e) {
246
+ return e.charAt(0).toUpperCase() + e.slice(1);
247
+ }
248
+ function Ht(e) {
249
+ return e ?? "outlineVariant";
250
+ }
251
+ function Rt(e) {
252
+ return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").toLowerCase();
253
+ }
254
+ function rn(e, t, n, o) {
255
+ const i = Number(n);
256
+ return Number.isFinite(i) ? Math.min(t, Math.max(e, Math.round(i))) : o;
257
+ }
258
+ const Lo = (e) => ({
259
+ topLeft: "uui-top-left",
260
+ topCenter: "uui-top-center",
261
+ topRight: "uui-top-right",
262
+ topRightOut: "uui-top-right-out",
263
+ topLeftOut: "uui-top-left-out",
264
+ centerLeft: "uui-center-left",
265
+ center: "uui-center",
266
+ centerRight: "uui-center-right",
267
+ bottomLeft: "uui-bottom-left",
268
+ bottomCenter: "uui-bottom-center",
269
+ bottomRight: "uui-bottom-right",
270
+ auto: "uui-top-right"
271
+ })[e], Ve = (e) => e ? `uui-${e}` : "", gt = (e) => `uui-${Rt(e)}`, et = (e) => {
272
+ const t = rn(0, 4, e);
273
+ return t === void 0 ? "" : `uui-border-${t}`;
274
+ }, at = (e) => {
275
+ const t = rn(0, 5, e);
276
+ return t === void 0 ? "" : `uui-elevation-${t}`;
277
+ }, ct = (e) => e ? `uui-${e}` : "", xe = (e) => `uui-font-${Rt(e)}`;
278
+ function ht(...e) {
279
+ return (t) => {
280
+ e.forEach((n) => {
281
+ if (typeof n == "function")
282
+ n(t);
283
+ else if (n) {
284
+ const o = n;
285
+ o.current = t;
286
+ }
287
+ });
288
+ };
289
+ }
290
+ const kt = (e, t, n) => {
291
+ const o = n ?? e, i = o.querySelector(".ripple-container");
292
+ i && i.remove();
293
+ const l = e.getBoundingClientRect(), a = o.getBoundingClientRect(), s = t.clientX - l.left, u = t.clientY - l.top, p = s >= 0 && s <= l.width && u >= 0 && u <= l.height, f = p ? s : l.width / 2, c = p ? u : l.height / 2, d = Math.sqrt(l.width * l.width + l.height * l.height), m = d / 2, g = document.createElement("div");
294
+ g.className = "ripple-container", g.style.position = "absolute", g.style.pointerEvents = "none", g.style.overflow = "hidden", g.style.width = `${l.width}px`, g.style.height = `${l.height}px`, g.style.left = `${l.left - a.left}px`, g.style.top = `${l.top - a.top}px`, requestAnimationFrame(() => {
295
+ g.style.borderRadius = getComputedStyle(e).borderRadius;
296
+ });
297
+ const C = document.createElement("span");
298
+ C.className = "ripple", C.style.position = "absolute", C.style.width = `${d}px`, C.style.height = `${d}px`, C.style.left = `${f - m}px`, C.style.top = `${c - m}px`, g.appendChild(C), o.appendChild(g), C.addEventListener("animationend", () => {
299
+ g.remove();
300
+ });
301
+ };
302
+ function Oe(...e) {
303
+ return e.flat().filter(Boolean).join(" ");
304
+ }
305
+ function Mn(e, t, n = {}) {
306
+ const { placement: o = "topCenter", offset: i = 8, mode: l = "tooltip" } = n, a = 12, s = {
307
+ tooltip: ["topCenter", "bottomCenter", "centerRight", "centerLeft"],
308
+ dropdown: ["bottomCenter", "topCenter", "centerRight", "centerLeft"],
309
+ menu: [
310
+ "bottomLeft",
311
+ "bottomRight",
312
+ "topLeft",
313
+ "topRight",
314
+ "centerRight",
315
+ "centerLeft"
316
+ ],
317
+ submenu: [
318
+ "topRightOut",
319
+ "topLeftOut",
320
+ "centerRight",
321
+ "centerLeft",
322
+ "bottomCenter",
323
+ "topCenter"
324
+ ]
325
+ }, u = o === "auto" ? s[l] : [o, ...s[l]], p = e.current, f = t.current;
326
+ if (!p || !f)
327
+ return null;
328
+ const c = p.getBoundingClientRect(), d = f.getBoundingClientRect(), m = window.innerWidth, g = window.innerHeight, C = (b) => {
329
+ let v = 0, N = 0;
330
+ switch (b) {
331
+ case "topCenter":
332
+ v = c.left + (c.width - d.width) / 2, N = c.top - d.height - i;
333
+ break;
334
+ case "topLeft":
335
+ v = c.left, N = c.top - d.height - i;
336
+ break;
337
+ case "topRight":
338
+ v = c.right - d.width, N = c.top - d.height - i;
339
+ break;
340
+ case "bottomCenter":
341
+ v = c.left + (c.width - d.width) / 2, N = c.bottom + i;
342
+ break;
343
+ case "bottomLeft":
344
+ v = c.left, N = c.bottom + i;
345
+ break;
346
+ case "bottomRight":
347
+ v = c.right - d.width, N = c.bottom + i;
348
+ break;
349
+ case "centerLeft":
350
+ v = c.left - d.width - i, N = c.top + (c.height - d.height) / 2;
351
+ break;
352
+ case "centerRight":
353
+ v = c.right + i, N = c.top + (c.height - d.height) / 2;
354
+ break;
355
+ case "center":
356
+ v = c.left + (c.width - d.width) / 2, N = c.top + (c.height - d.height) / 2;
357
+ break;
358
+ case "topRightOut":
359
+ v = c.right + i, N = c.top;
360
+ break;
361
+ case "topLeftOut":
362
+ v = c.left - d.width - i, N = c.top;
363
+ break;
364
+ }
365
+ return { x: v, y: N, placement: b };
366
+ };
367
+ for (const b of u) {
368
+ const v = C(b), N = v.x >= 0 && v.x + d.width <= m, w = v.y >= 0 && v.y + d.height <= g;
369
+ let L = !1;
370
+ if (b === "centerLeft" || b === "centerRight" ? L = N : b === "topCenter" || b === "bottomCenter" || b === "center" ? L = w : L = N && w, L)
371
+ return v.x = Math.max(
372
+ a,
373
+ Math.min(v.x, m - d.width - a)
374
+ ), v.y = Math.max(
375
+ a,
376
+ Math.min(v.y, g - d.height - a)
377
+ ), v;
378
+ }
379
+ const x = C(o);
380
+ return x.x = Math.max(
381
+ a,
382
+ Math.min(x.x, m - d.width - a)
383
+ ), x.y = Math.max(
384
+ a,
385
+ Math.min(x.y, g - d.height - a)
386
+ ), x;
387
+ }
388
+ let Nn = !1, Jt = "pointer";
389
+ function Fo() {
390
+ Nn || typeof window > "u" || (Nn = !0, window.addEventListener(
391
+ "keydown",
392
+ () => {
393
+ Jt = "keyboard";
394
+ },
395
+ !0
396
+ ), window.addEventListener(
397
+ "pointerdown",
398
+ () => {
399
+ Jt = "pointer";
400
+ },
401
+ !0
402
+ ));
403
+ }
404
+ function Io() {
405
+ return Jt;
406
+ }
407
+ function Bo(e = "#6750A4", t, n = {}) {
408
+ var f, c, d, m, g, C, x, b, v, N, w, L, F, B, T, _, D;
409
+ const o = { light: {}, dark: {} }, i = (f = n.light) != null && f.primary ? Et(n.light.primary) : Et(e), l = {
410
+ info: "#03a9f4",
411
+ warning: "#ffd600",
412
+ success: "#689f38",
413
+ ...t
414
+ }, a = [];
415
+ Object.keys(l).forEach((h) => {
416
+ var S;
417
+ const k = (S = n.light) == null ? void 0 : S[h];
418
+ k ? a.push({
419
+ value: Et(k),
420
+ name: h,
421
+ blend: !0
422
+ }) : a.push({
423
+ value: Et(l[h]),
424
+ name: h,
425
+ blend: !0
426
+ });
427
+ }), ["secondary", "tertiary", "error"].forEach((h) => {
428
+ var S;
429
+ const k = (S = n.light) == null ? void 0 : S[h];
430
+ k && a.push({
431
+ value: Et(k),
432
+ name: h,
433
+ blend: !0
434
+ });
435
+ });
436
+ const s = Co(i, a);
437
+ ["light", "dark"].forEach((h) => {
438
+ const k = h;
439
+ No.forEach((S) => {
440
+ var E;
441
+ (E = n[k]) != null && E[S] ? o[k][S] = n[k][S] : typeof s.schemes[k][S] == "number" && (o[k][S] = Ie(
442
+ s.schemes[k][S]
443
+ ));
444
+ });
445
+ }), o.light.scrim = "#00000052", o.dark.scrim = "#00000052", s.customColors.forEach((h) => {
446
+ const k = h.color.name[0].toUpperCase() + h.color.name.slice(1), S = {
447
+ color: h.color.name,
448
+ onColor: `on${k}`,
449
+ colorContainer: `${h.color.name}Container`,
450
+ onColorContainer: `on${k}Container`
451
+ };
452
+ ["light", "dark"].forEach((E) => {
453
+ const A = E;
454
+ Object.keys(S).forEach((U) => {
455
+ var j;
456
+ o[E][S[U]] = ((j = n[E]) == null ? void 0 : j[S[U]]) ?? Ie(h[A][U]);
457
+ });
458
+ });
459
+ }), ["primary", "secondary", "tertiary", "error"].forEach((h) => {
460
+ const k = h[0].toUpperCase() + h.slice(1);
461
+ ["light", "dark"].forEach((S) => {
462
+ var E, A, U, j;
463
+ o[S][`${h}Fixed`] = (E = n[S]) != null && E[`${h}Fixed`] ? n[S][`${h}Fixed`] : Ie(s.palettes[h].tone(90)), o[S][`${h}FixedDim`] = (A = n[S]) != null && A[`${h}FixedDim`] ? n[S][`${h}FixedDim`] : Ie(s.palettes[h].tone(80)), o[S][`on${k}Fixed`] = (U = n[S]) != null && U[`on${k}Fixed`] ? n[S][`on${k}Fixed`] : Ie(s.palettes[h].tone(10)), o[S][`on${k}FixedVariant`] = (j = n[S]) != null && j[`on${k}FixedVariant`] ? n[S][`on${k}FixedVariant`] : Ie(s.palettes[h].tone(30));
464
+ });
465
+ });
466
+ const u = (h, k) => {
467
+ const S = xo.fromInt(h);
468
+ return Ie(S.tone(k));
469
+ };
470
+ s.customColors.forEach((h) => {
471
+ const k = h.color.name, S = k[0].toUpperCase() + k.slice(1);
472
+ ["light", "dark"].forEach((E) => {
473
+ var U, j, re, ee;
474
+ const A = h[E].color;
475
+ o[E][`${k}Fixed`] = (U = n[E]) != null && U[`${k}Fixed`] ? n[E][`${k}Fixed`] : u(A, 90), o[E][`${k}FixedDim`] = (j = n[E]) != null && j[`${k}FixedDim`] ? n[E][`${k}FixedDim`] : u(A, 80), o[E][`on${S}Fixed`] = (re = n[E]) != null && re[`on${S}Fixed`] ? n[E][`on${S}Fixed`] : u(A, 10), o[E][`on${S}FixedVariant`] = (ee = n[E]) != null && ee[`on${S}FixedVariant`] ? n[E][`on${S}FixedVariant`] : u(A, 30);
476
+ });
477
+ });
478
+ const p = {
479
+ black: "#000000",
480
+ onBlack: "#ffffff",
481
+ white: "#ffffff",
482
+ onWhite: "#000000"
483
+ };
484
+ return Object.assign(o.light, p), Object.assign(o.dark, p), o.light.surface = ((c = n.light) == null ? void 0 : c.surface) ?? Ie(s.palettes.neutral.tone(99)), o.light.surfaceDim = ((d = n.light) == null ? void 0 : d.surfaceDim) ?? Ie(s.palettes.neutral.tone(87)), o.light.surfaceBright = ((m = n.light) == null ? void 0 : m.surfaceBright) ?? Ie(s.palettes.neutral.tone(99)), o.light.surfaceContainerLowest = ((g = n.light) == null ? void 0 : g.surfaceContainerLowest) ?? Ie(s.palettes.neutral.tone(100)), o.light.surfaceContainerLow = ((C = n.light) == null ? void 0 : C.surfaceContainerLow) ?? Ie(s.palettes.neutral.tone(96)), o.light.surfaceContainer = ((x = n.light) == null ? void 0 : x.surfaceContainer) ?? Ie(s.palettes.neutral.tone(94)), o.light.surfaceContainerHigh = ((b = n.light) == null ? void 0 : b.surfaceContainerHigh) ?? Ie(s.palettes.neutral.tone(92)), o.light.surfaceContainerHighest = ((v = n.light) == null ? void 0 : v.surfaceContainerHighest) ?? Ie(s.palettes.neutral.tone(90)), o.dark.surface = ((N = n.dark) == null ? void 0 : N.surface) ?? Ie(s.palettes.neutral.tone(6)), o.dark.surfaceDim = ((w = n.dark) == null ? void 0 : w.surfaceDim) ?? Ie(s.palettes.neutral.tone(6)), o.dark.surfaceBright = ((L = n.dark) == null ? void 0 : L.surfaceBright) ?? Ie(s.palettes.neutral.tone(24)), o.dark.surfaceContainerLowest = ((F = n.dark) == null ? void 0 : F.surfaceContainerLowest) ?? Ie(s.palettes.neutral.tone(4)), o.dark.surfaceContainerLow = ((B = n.dark) == null ? void 0 : B.surfaceContainerLow) ?? Ie(s.palettes.neutral.tone(10)), o.dark.surfaceContainer = ((T = n.dark) == null ? void 0 : T.surfaceContainer) ?? Ie(s.palettes.neutral.tone(12)), o.dark.surfaceContainerHigh = ((_ = n.dark) == null ? void 0 : _.surfaceContainerHigh) ?? Ie(s.palettes.neutral.tone(17)), o.dark.surfaceContainerHighest = ((D = n.dark) == null ? void 0 : D.surfaceContainerHighest) ?? Ie(s.palettes.neutral.tone(22)), o.light.surfaceTint = Ie(s.palettes.primary.tone(40)), o.dark.surfaceTint = Ie(s.palettes.primary.tone(80)), o;
485
+ }
486
+ function Do(e = "#6750A4", t, n = {}) {
487
+ const o = "ufo-ui-theme";
488
+ let i = document.getElementById(o);
489
+ i || (i = document.createElement("style"), i.id = o, document.head.appendChild(i));
490
+ const l = Bo(
491
+ e,
492
+ t,
493
+ n
494
+ ), a = [
495
+ ...Object.entries(l.light).map(
496
+ ([u, p]) => `--uui-color-${Rt(u)}: ${p};`
497
+ )
498
+ ].join(""), s = Object.entries(l.dark).map(([u, p]) => `--uui-color-${Rt(u)}: ${p};`).join("");
499
+ return i.textContent = `:root{${a}}.dark{${s}}`, l;
500
+ }
501
+ let Ze = [], Ot = [];
502
+ function Pt() {
503
+ const e = [...Ze];
504
+ [...Ot].forEach((t) => {
505
+ t(e);
506
+ });
507
+ }
508
+ const pt = {
509
+ /**
510
+ * Subscribes to toast state updates.
511
+ *
512
+ * @function
513
+ */
514
+ subscribe(e) {
515
+ return Ot.push(e), e([...Ze]), () => {
516
+ Ot = Ot.filter((t) => t !== e);
517
+ };
518
+ },
519
+ /**
520
+ * Adds a new toast to the store.
521
+ *
522
+ * Priority toasts are inserted at the beginning
523
+ * so they appear before normal queued toasts.
524
+ *
525
+ * @function
526
+ */
527
+ add(e) {
528
+ Ze.some((t) => t.id === e.id) || (Ze = [...Ze, e], Pt());
529
+ },
530
+ /**
531
+ * Updates an existing toast.
532
+ *
533
+ * @function
534
+ */
535
+ update(e, t) {
536
+ const n = Ze.findIndex((i) => i.id === e);
537
+ if (n === -1)
538
+ return;
539
+ const o = [...Ze];
540
+ o[n] = { ...o[n], ...t }, Ze = o, Pt();
541
+ },
542
+ /**
543
+ * Removes a toast from the store.
544
+ *
545
+ * @function
546
+ */
547
+ remove(e) {
548
+ const t = Ze.filter((n) => n.id !== e);
549
+ t.length !== Ze.length && (Ze = t, Pt());
550
+ },
551
+ /**
552
+ * Removes all toasts.
553
+ *
554
+ * @function
555
+ */
556
+ clear() {
557
+ Ze.length !== 0 && (Ze = [], Pt());
558
+ },
559
+ /**
560
+ * Returns current toast list snapshot.
561
+ *
562
+ * @function
563
+ */
564
+ getState() {
565
+ return [...Ze];
566
+ }
567
+ };
568
+ var xt = {}, kn;
569
+ function $o() {
570
+ if (kn) return xt;
571
+ kn = 1;
572
+ var e = vo;
573
+ if (process.env.NODE_ENV === "production")
574
+ xt.createRoot = e.createRoot, xt.hydrateRoot = e.hydrateRoot;
575
+ else {
576
+ var t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
577
+ xt.createRoot = function(n, o) {
578
+ t.usingClientEntryPoint = !0;
579
+ try {
580
+ return e.createRoot(n, o);
581
+ } finally {
582
+ t.usingClientEntryPoint = !1;
583
+ }
584
+ }, xt.hydrateRoot = function(n, o, i) {
585
+ t.usingClientEntryPoint = !0;
586
+ try {
587
+ return e.hydrateRoot(n, o, i);
588
+ } finally {
589
+ t.usingClientEntryPoint = !1;
590
+ }
591
+ };
592
+ }
593
+ return xt;
594
+ }
595
+ var Eo = $o();
596
+ function sn(e = {}) {
597
+ const { initial: t = "idle" } = e, [n, o] = q("idle"), [i, l] = q(!1), { t1: a = 0, t2: s, oneShot: u = !1 } = e, p = s ?? Math.round(a * 0.67), f = W(null), c = () => f.current !== null ? (clearTimeout(f.current), f.current = null, !0) : !1, d = Qe(
598
+ (x) => {
599
+ function b(N, w) {
600
+ f.current = window.setTimeout(() => {
601
+ o(N), c();
602
+ }, w);
603
+ }
604
+ if (c() && l(!0), u) {
605
+ a ? (b("open", a), o("opening")) : o((N) => N === "opening" ? "open" : "opening");
606
+ return;
607
+ }
608
+ if (a) {
609
+ o((N) => {
610
+ const w = x === "closed" ? !0 : x === "open" ? !1 : N === "open" || N === "opening", L = w ? "closing" : "opening", F = w ? "closed" : "open";
611
+ return b(F, F === "open" ? a : p), L;
612
+ });
613
+ return;
614
+ }
615
+ o((N) => {
616
+ switch (N) {
617
+ case "idle":
618
+ case "closed":
619
+ return "opening";
620
+ case "opening":
621
+ return "open";
622
+ case "open":
623
+ return "closing";
624
+ case "closing":
625
+ return "closed";
626
+ default:
627
+ return N;
628
+ }
629
+ });
630
+ },
631
+ [u, a, p]
632
+ );
633
+ ye(() => {
634
+ i && l(!1);
635
+ }, [i]), ye(() => {
636
+ t !== "idle" && d(t === "open" ? "open" : "closed");
637
+ }, []);
638
+ const m = n === "closing", g = n === "opening";
639
+ return {
640
+ opening: g,
641
+ closing: m,
642
+ animating: (g || m) && !i,
643
+ idle: n === "idle",
644
+ active: m || g,
645
+ animationVars: {
646
+ "--uui-duration": `${g ? a : p}ms`,
647
+ "--uui-reverse": m ? "reverse" : "normal"
648
+ },
649
+ animate: d
650
+ };
651
+ }
652
+ function To(e, t, n, o) {
653
+ ye(() => {
654
+ if (!e)
655
+ return;
656
+ const i = (l) => {
657
+ var p, f;
658
+ const a = l.target;
659
+ if (Array.isArray(t)) {
660
+ const c = t.some((m) => {
661
+ var g;
662
+ return (g = m.current) == null ? void 0 : g.contains(a);
663
+ }), d = ((p = o == null ? void 0 : o.current) == null ? void 0 : p.contains(a)) ?? !1;
664
+ !c && !d && n();
665
+ return;
666
+ }
667
+ const s = !!a.closest(t), u = ((f = o == null ? void 0 : o.current) == null ? void 0 : f.contains(a)) ?? !1;
668
+ !s && !u && n();
669
+ };
670
+ return document.addEventListener("mousedown", i), () => {
671
+ document.removeEventListener("mousedown", i);
672
+ };
673
+ }, [e, t, n, o]);
674
+ }
675
+ function Mo(e, t) {
676
+ ye(() => {
677
+ if (!e)
678
+ return;
679
+ const n = (o) => {
680
+ o.key === "Escape" && t();
681
+ };
682
+ return document.addEventListener("keydown", n), () => {
683
+ document.removeEventListener("keydown", n);
684
+ };
685
+ }, [e, t]);
686
+ }
687
+ function St(e, t) {
688
+ Fo();
689
+ const [n, o] = q(!1);
690
+ return {
691
+ focusVisible: Io() === "keyboard",
692
+ isFocused: n,
693
+ focusHandlers: {
694
+ onFocus: (s) => {
695
+ o(!0), e == null || e(s);
696
+ },
697
+ onBlur: (s) => {
698
+ o(!1), t == null || t(s);
699
+ }
700
+ }
701
+ };
702
+ }
703
+ function Qt(e, t, n = !0, o = !1) {
704
+ ye(() => {
705
+ if (!n)
706
+ return;
707
+ const i = e.current;
708
+ if (!i)
709
+ return;
710
+ const l = o ? "border-box" : "content-box", a = new ResizeObserver(([s]) => {
711
+ let u, p;
712
+ o ? s.borderBoxSize.length > 0 ? [{ inlineSize: u, blockSize: p }] = s.borderBoxSize : { width: u, height: p } = s.target.getBoundingClientRect() : s.contentBoxSize.length > 0 ? [{ inlineSize: u, blockSize: p }] = s.contentBoxSize : { width: u, height: p } = s.contentRect, t({ width: u, height: p });
713
+ });
714
+ return a.observe(i, { box: l }), () => {
715
+ a.disconnect();
716
+ };
717
+ }, [e, t, n, o]);
718
+ }
719
+ const Rn = _t(
720
+ null
721
+ ), ln = _t(null), Wt = _t(null), Sn = {
722
+ darkMode: !1,
723
+ schemes: { light: {}, dark: {} }
724
+ }, Vn = _t(null);
725
+ function An() {
726
+ const e = Mt(Wt);
727
+ if (!e)
728
+ throw new Error("useSelection must be used within SelectionContext provider");
729
+ return e;
730
+ }
731
+ function xi() {
732
+ const e = Mt(Vn);
733
+ if (!e)
734
+ throw new Error("useTheme must be used within a <ThemeProvider>");
735
+ return e;
736
+ }
737
+ function Ro({ value: e, min: t, max: n, step: o, disabled: i, readOnly: l, onChange: a }) {
738
+ return { onKeyDown: Qe(
739
+ (u) => {
740
+ if (i || l)
741
+ return;
742
+ let p;
743
+ switch (u.key) {
744
+ case "ArrowRight":
745
+ case "ArrowUp":
746
+ u.preventDefault(), p = Math.min(e + o, n);
747
+ break;
748
+ case "ArrowLeft":
749
+ case "ArrowDown":
750
+ u.preventDefault(), p = Math.max(e - o, t);
751
+ break;
752
+ case "Home":
753
+ u.preventDefault(), p = t;
754
+ break;
755
+ case "End":
756
+ u.preventDefault(), p = n;
757
+ break;
758
+ default:
759
+ return;
760
+ }
761
+ a(p);
762
+ },
763
+ [e, t, n, o, i, l, a]
764
+ ) };
765
+ }
766
+ function Vo(e = "vertical", t = !0) {
767
+ const n = W([]), o = Qe((a) => {
768
+ a && (n.current.includes(a) || n.current.push(a));
769
+ }, []), i = Qe((a) => {
770
+ a && (n.current = n.current.filter((s) => s !== a));
771
+ }, []), l = Qe(
772
+ (a) => {
773
+ const s = e === "vertical", u = s ? "ArrowDown" : "ArrowRight";
774
+ if (![u, s ? "ArrowUp" : "ArrowLeft", "Home", "End"].includes(a.key))
775
+ return;
776
+ a.preventDefault();
777
+ const c = [...n.current].sort((x, b) => {
778
+ if (x === b)
779
+ return 0;
780
+ const v = x.compareDocumentPosition(b);
781
+ return v & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : v & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
782
+ }).filter((x) => !("disabled" in x && x.disabled || x.getAttribute("aria-disabled") === "true"));
783
+ if (c.length === 0)
784
+ return;
785
+ const d = c.indexOf(a.currentTarget);
786
+ if (d === -1)
787
+ return;
788
+ if (a.key === "Home") {
789
+ c[0].focus();
790
+ return;
791
+ }
792
+ if (a.key === "End") {
793
+ c[c.length - 1].focus();
794
+ return;
795
+ }
796
+ const m = a.key === u ? 1 : -1, g = t ? (d + m + c.length) % c.length : d + m, C = c.at(g);
797
+ C && C.focus();
798
+ },
799
+ [e, t]
800
+ );
801
+ return { register: o, unregister: i, onKeyDown: l };
802
+ }
803
+ function Ao(e, t = "vertical") {
804
+ const [n, o] = q([]), i = Vo(t), l = Qe(
805
+ (u) => {
806
+ o((p) => {
807
+ const f = p.includes(u);
808
+ return e === "single" ? f ? [] : [u] : f ? p.filter((c) => c !== u) : [...p, u];
809
+ });
810
+ },
811
+ [e]
812
+ ), a = Qe((u) => {
813
+ o([u]);
814
+ }, []), s = Qe(() => {
815
+ o([]);
816
+ }, []);
817
+ return {
818
+ values: n,
819
+ toggle: l,
820
+ set: a,
821
+ clear: s,
822
+ roving: i,
823
+ type: e,
824
+ orientation: t
825
+ };
826
+ }
827
+ const jo = ({ ref: e, enabled: t, autoFocus: n = !0 }) => {
828
+ const o = W(null);
829
+ ye(() => {
830
+ if (!t || !e.current)
831
+ return;
832
+ const i = e.current;
833
+ o.current = document.activeElement;
834
+ const l = () => Array.from(
835
+ i.querySelectorAll(
836
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
837
+ )
838
+ ).filter((u) => !u.hasAttribute("disabled") && u.offsetParent !== null);
839
+ if (n && !i.contains(document.activeElement)) {
840
+ const u = l();
841
+ (u.find((f) => f.hasAttribute("data-autofocus")) ?? u[0] ?? i).focus();
842
+ }
843
+ const a = (u) => {
844
+ if (u.key !== "Tab")
845
+ return;
846
+ const p = l();
847
+ if (p.length === 0) {
848
+ u.preventDefault();
849
+ return;
850
+ }
851
+ const f = p[0], c = p[p.length - 1];
852
+ u.shiftKey && document.activeElement === f ? (u.preventDefault(), c.focus()) : !u.shiftKey && document.activeElement === c && (u.preventDefault(), f.focus());
853
+ }, s = (u) => {
854
+ const p = u.target;
855
+ if (!i.contains(p)) {
856
+ const c = l()[0] ?? i;
857
+ c !== p && c.focus();
858
+ }
859
+ };
860
+ return document.addEventListener("keydown", a), document.addEventListener("focusin", s), () => {
861
+ document.removeEventListener("keydown", a), document.removeEventListener("focusin", s);
862
+ const u = o.current;
863
+ u && document.contains(u) && setTimeout(() => {
864
+ u.focus();
865
+ }, 0);
866
+ };
867
+ }, [t, e, n]);
868
+ }, Ut = I((e, t) => {
869
+ const {
870
+ open: n,
871
+ animation: o = "fade",
872
+ duration: i = 220,
873
+ motionStyle: l = "regular",
874
+ className: a,
875
+ children: s,
876
+ style: u,
877
+ shape: p,
878
+ ...f
879
+ } = e, c = W(!0), d = W(null), [m, g] = q(void 0), { animationVars: C, animate: x, animating: b } = sn({
880
+ t1: i
881
+ });
882
+ Qt(d, ({ height: B }) => {
883
+ g(B), c.current = !1;
884
+ }, !b, !0), ye(() => {
885
+ c.current || x(n ? "open" : "closed");
886
+ }, [n]);
887
+ const N = ["uui-collapse", a, ...p ? [Ve(p)] : []].filter(Boolean).join(" "), w = R();
888
+ w.merge(C), n ? m !== void 0 && w.set("height", `${m}px`) : w.set("height", "0px");
889
+ const L = [b && nn(o), on(l)].filter(Boolean).join(" "), F = R(u);
890
+ return F.merge(C), /* @__PURE__ */ r(
891
+ "div",
892
+ {
893
+ "aria-hidden": !n,
894
+ className: N,
895
+ ...n ? {} : { inert: "" },
896
+ style: w.get(),
897
+ children: /* @__PURE__ */ r("div", { className: "uui-collapse-wrapper", ref: d, children: /* @__PURE__ */ r(Be, { ...f, className: L, ref: t, shape: p, style: F.get(), children: s }) })
898
+ }
899
+ );
900
+ });
901
+ Ut.displayName = "Collapse";
902
+ const jn = I(
903
+ ({
904
+ id: e,
905
+ title: t,
906
+ description: n,
907
+ color: o,
908
+ icon: i,
909
+ action: l,
910
+ content: a,
911
+ duration: s = 400,
912
+ animation: u = "flipY",
913
+ motionStyle: p,
914
+ timeout: f,
915
+ elevation: c = 3,
916
+ shape: d = "smooth",
917
+ status: m,
918
+ leaving: g,
919
+ onExitComplete: C,
920
+ className: x,
921
+ ...b
922
+ }, v) => {
923
+ const [N, w] = q(!1), L = W(null), F = W(!1), B = () => {
924
+ F.current || (F.current = !0, setTimeout(() => {
925
+ C == null || C(e);
926
+ }, s));
927
+ };
928
+ ye(() => {
929
+ if (!(!f || f === 0))
930
+ return L.current = setTimeout(() => {
931
+ pt.remove(e), w(!1), B();
932
+ }, f), () => {
933
+ L.current && clearTimeout(L.current);
934
+ };
935
+ }, [e, B, f]);
936
+ const T = R();
937
+ T.bg(o), T.text.on(o);
938
+ const _ = m ? `uui-toast-${m}` : void 0;
939
+ ye(() => {
940
+ w(!0);
941
+ }, []), ye(() => {
942
+ g && (L.current && clearTimeout(L.current), w(!1), B());
943
+ }, [g, B]);
944
+ const D = a ?? /* @__PURE__ */ $(it, { children: [
945
+ /* @__PURE__ */ $("div", { className: "uui-toast-text", children: [
946
+ i && /* @__PURE__ */ r("div", { className: "uui-icon", children: i }),
947
+ /* @__PURE__ */ $("div", { className: "uui-toast-content", children: [
948
+ t && /* @__PURE__ */ r("div", { className: "uui-toast-title uui-font-label-large", children: t }),
949
+ n && /* @__PURE__ */ r("div", { className: "uui-toast-description", children: n })
950
+ ] })
951
+ ] }),
952
+ /* @__PURE__ */ r("div", { className: "uui-toast-actions uui-slot", children: l })
953
+ ] });
954
+ return /* @__PURE__ */ r(
955
+ Be,
956
+ {
957
+ className: Oe("uui-toast", _, x),
958
+ elevation: c,
959
+ font: "bodyMedium",
960
+ ref: v,
961
+ shape: d,
962
+ style: T.get(),
963
+ ...b,
964
+ children: /* @__PURE__ */ r(Ut, { animation: u, duration: s, motionStyle: p, open: N, children: /* @__PURE__ */ r("div", { className: "uui-toast-region", id: `${e}-content`, role: "region", children: D }) })
965
+ }
966
+ );
967
+ }
968
+ );
969
+ jn.displayName = "Toast";
970
+ const Po = {
971
+ topLeft: { top: 16, left: 16, flexDirection: "column-reverse" },
972
+ topCenter: { top: 16, left: "50%", transform: "translateX(-50%)", flexDirection: "column-reverse" },
973
+ topRight: { top: 16, right: 16, flexDirection: "column-reverse" },
974
+ bottomLeft: { bottom: 16, left: 16 },
975
+ bottomCenter: { bottom: 16, left: "50%", transform: "translateX(-50%)" },
976
+ bottomRight: { bottom: 16, right: 16 }
977
+ }, Oo = ({ position: e = "bottomRight", timeout: t = 4e3, limit: n = 3 }) => {
978
+ const [o, i] = q([]);
979
+ ye(() => pt.subscribe((s) => {
980
+ i((u) => {
981
+ const p = new Map(s.map((m) => [m.id, m])), f = new Set(u.map((m) => m.id)), c = u.map((m) => {
982
+ const g = p.get(m.id);
983
+ return g ? { ...g, leaving: m.leaving } : m.leaving ? m : { ...m, leaving: !0 };
984
+ }), d = s.filter((m) => !f.has(m.id)).map((m) => ({ ...m, leaving: !1 }));
985
+ return [...c, ...d];
986
+ });
987
+ }), [n]);
988
+ const l = (s) => {
989
+ i((u) => u.filter((p) => p.id !== s));
990
+ }, a = n <= 0 ? o : o.slice(0, n);
991
+ return /* @__PURE__ */ r(
992
+ "div",
993
+ {
994
+ "aria-live": "polite",
995
+ "aria-relevant": "additions text",
996
+ className: "uui-toast-viewport uui-menu-scroll",
997
+ style: Po[e],
998
+ children: a.map((s) => {
999
+ const { priority: u, leaving: p, ...f } = s, c = typeof f.action == "function" ? f.action(f.id) : f.action;
1000
+ return /* @__PURE__ */ r(
1001
+ jn,
1002
+ {
1003
+ ...f,
1004
+ action: c,
1005
+ leaving: p,
1006
+ onExitComplete: l,
1007
+ timeout: f.timeout ?? t
1008
+ },
1009
+ f.id
1010
+ );
1011
+ })
1012
+ }
1013
+ );
1014
+ };
1015
+ let qt = !1;
1016
+ function _o() {
1017
+ if (qt)
1018
+ return;
1019
+ if (document.querySelector(".uui-toast-viewport")) {
1020
+ qt = !0;
1021
+ return;
1022
+ }
1023
+ const e = document.createElement("div");
1024
+ document.body.appendChild(e), Eo.createRoot(e).render(/* @__PURE__ */ r(Oo, {})), qt = !0;
1025
+ }
1026
+ function Zt(e, t) {
1027
+ const n = typeof e == "function" ? e(t) : e;
1028
+ return typeof n == "string" ? { description: n } : n;
1029
+ }
1030
+ function wt(e) {
1031
+ _o();
1032
+ const t = typeof e == "string" ? { description: e } : e, n = t.id ?? crypto.randomUUID();
1033
+ return pt.add({
1034
+ priority: !1,
1035
+ ...t,
1036
+ id: n
1037
+ }), n;
1038
+ }
1039
+ const wi = Object.assign(wt, {
1040
+ /** Updates an existing toast. */
1041
+ update: pt.update,
1042
+ /** Removes a toast by id. */
1043
+ dismiss: pt.remove,
1044
+ /** Removes all toasts. */
1045
+ clear: pt.clear,
1046
+ /** Creates a success toast. */
1047
+ success: (e, t) => wt({ ...t, description: e, status: "success" }),
1048
+ /** Creates an error toast. */
1049
+ error: (e, t) => wt({ ...t, description: e, status: "error" }),
1050
+ /** Creates an informational toast. */
1051
+ info: (e, t) => wt({ ...t, description: e, status: "info" }),
1052
+ /** Creates a warning toast. */
1053
+ warning: (e, t) => wt({ ...t, description: e, status: "warning" }),
1054
+ /**
1055
+ * Displays toast lifecycle bound to a promise.
1056
+ *
1057
+ * Promise toasts use priority so the user immediately
1058
+ * sees feedback for the triggered action.
1059
+ *
1060
+ * @category Toast
1061
+ * @function
1062
+ */
1063
+ async promise(e, t) {
1064
+ const n = wt({
1065
+ ...Zt(t.loading, void 0),
1066
+ timeout: 0,
1067
+ priority: !0
1068
+ });
1069
+ return e.then(
1070
+ (o) => {
1071
+ const i = Zt(t.success, o);
1072
+ return pt.update(n, {
1073
+ timeout: void 0,
1074
+ ...i
1075
+ }), o;
1076
+ },
1077
+ (o) => {
1078
+ const i = Zt(t.error, o);
1079
+ throw pt.update(n, {
1080
+ timeout: void 0,
1081
+ ...i
1082
+ }), o;
1083
+ }
1084
+ );
1085
+ }
1086
+ }), vt = (e) => (
1087
+ // eslint-disable-next-line sonarjs/pseudo-random
1088
+ `${e}_${Math.floor((1 + Math.random()) * 65536).toString(16).substring(1)}`
1089
+ );
1090
+ function R(e) {
1091
+ const t = { ...e || {} };
1092
+ function n(d, m) {
1093
+ t[d] = m;
1094
+ }
1095
+ const o = (d) => `var(--uui-color-${d.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase())})`, i = (d) => Object.assign(
1096
+ (m) => {
1097
+ m && d(o(m));
1098
+ },
1099
+ {
1100
+ on(m) {
1101
+ if (m) {
1102
+ const g = Xt[m];
1103
+ g !== void 0 && d(o(g));
1104
+ }
1105
+ },
1106
+ container(m) {
1107
+ m && d(o(`${m}Container`));
1108
+ },
1109
+ onContainer(m) {
1110
+ m && d(o(`on${So(m)}Container`));
1111
+ },
1112
+ fixed(m) {
1113
+ m && d(o(`${m}Fixed`));
1114
+ },
1115
+ fixedDim(m) {
1116
+ m && d(o(`${m}FixedDim`));
1117
+ }
1118
+ }
1119
+ ), l = i((d) => {
1120
+ n("backgroundColor", d);
1121
+ }), a = i((d) => {
1122
+ n("color", d);
1123
+ }), s = i((d) => {
1124
+ n("borderColor", d);
1125
+ }), u = i((d) => {
1126
+ n("outlineColor", d);
1127
+ }), p = i((d) => {
1128
+ n("--uui-current-color", d);
1129
+ }), f = i((d) => {
1130
+ n("stroke", d);
1131
+ }), c = i((d) => {
1132
+ n("fill", d);
1133
+ });
1134
+ return {
1135
+ bg: l,
1136
+ text: a,
1137
+ border: s,
1138
+ outline: u,
1139
+ current: p,
1140
+ stroke: f,
1141
+ fill: c,
1142
+ set: n,
1143
+ get() {
1144
+ return t;
1145
+ },
1146
+ merge(d) {
1147
+ if (!d)
1148
+ return;
1149
+ const m = Object.fromEntries(Object.entries(d).filter(([g, C]) => C != null));
1150
+ Object.assign(t, m);
1151
+ }
1152
+ };
1153
+ }
1154
+ function Ho(e) {
1155
+ const { m: t, mx: n, my: o, mt: i, mb: l, ml: a, mr: s, top: u, right: p, bottom: f, left: c, zIndex: d, position: m, ...g } = e;
1156
+ return {
1157
+ wrapperStyle: Object.fromEntries(Object.entries({
1158
+ top: u,
1159
+ right: p,
1160
+ bottom: f,
1161
+ left: c,
1162
+ zIndex: d,
1163
+ position: m,
1164
+ margin: t,
1165
+ marginTop: i ?? o,
1166
+ marginBottom: l ?? o,
1167
+ marginLeft: a ?? n,
1168
+ marginRight: s ?? n
1169
+ }).filter(([b, v]) => v != null)),
1170
+ otherProps: g
1171
+ };
1172
+ }
1173
+ const Be = I((e, t) => {
1174
+ const {
1175
+ type: n = "flex",
1176
+ inline: o = !1,
1177
+ color: i,
1178
+ elevation: l,
1179
+ shape: a,
1180
+ border: s,
1181
+ direction: u,
1182
+ flow: p,
1183
+ borderColor: f,
1184
+ elementClass: c,
1185
+ children: d,
1186
+ className: m,
1187
+ style: g,
1188
+ font: C,
1189
+ hf: x,
1190
+ wf: b,
1191
+ grow: v,
1192
+ p: N,
1193
+ px: w,
1194
+ py: L,
1195
+ pt: F,
1196
+ pb: B,
1197
+ pl: T,
1198
+ pr: _,
1199
+ gap: D,
1200
+ gapX: h,
1201
+ gapY: k,
1202
+ justifyContent: S,
1203
+ alignItems: E,
1204
+ placeItems: A,
1205
+ alignContent: U,
1206
+ wrap: j,
1207
+ cols: re,
1208
+ rows: ee,
1209
+ component: P,
1210
+ row: be,
1211
+ col: pe,
1212
+ w: De,
1213
+ h: ne,
1214
+ ...$e
1215
+ } = e, Z = P ?? "div", { wrapperStyle: G, otherProps: ie } = Ho($e), ae = R(G);
1216
+ ae.merge(g);
1217
+ const ke = {
1218
+ width: De ?? (b ? "100%" : void 0),
1219
+ height: ne ?? (x ? "100%" : void 0),
1220
+ padding: N,
1221
+ paddingTop: F ?? L,
1222
+ paddingBottom: B ?? L,
1223
+ paddingLeft: T ?? w,
1224
+ paddingRight: _ ?? w,
1225
+ gap: D,
1226
+ columnGap: h,
1227
+ rowGap: k,
1228
+ justifyContent: S,
1229
+ alignItems: E,
1230
+ placeItems: A,
1231
+ alignContent: U,
1232
+ flexWrap: j && n === "flex" ? "wrap" : void 0,
1233
+ gridTemplateColumns: n === "grid" ? typeof re == "number" ? `repeat(${re}, 1fr)` : re : void 0,
1234
+ gridTemplateRows: n === "grid" ? typeof ee == "number" ? `repeat(${ee}, 1fr)` : ee : void 0
1235
+ };
1236
+ ae.merge(ke), ae.border(f), ae.bg(i), ae.text.on(i);
1237
+ const se = be ? "row" : pe ? "col" : u, we = Oe(
1238
+ m,
1239
+ "uui-box",
1240
+ c,
1241
+ C && xe(C),
1242
+ a && Ve(a),
1243
+ l !== void 0 && at(l),
1244
+ s !== void 0 && et(s),
1245
+ v && "uui-grow",
1246
+ n === "flex" ? o ? "uui-flex-inline" : "uui-flex" : n === "grid" ? o ? "uui-grid-inline" : "uui-grid" : o ? "uui-inline-block" : "uui-block",
1247
+ se && n === "flex" && `uui-flex-${se}`,
1248
+ p && n === "grid" && `uui-grid-flow-${p === "col" ? "col" : "row"}`
1249
+ );
1250
+ return /* @__PURE__ */ r(Z, { className: we, ref: t, ...ie, style: ae.get(), children: d });
1251
+ });
1252
+ Be.displayName = "BoxBase";
1253
+ const Lt = ({ tooltip: e, align: t, triggerRef: n }) => {
1254
+ const [o, i] = q(!1), [l, a] = q(null), s = W(null);
1255
+ ye(() => {
1256
+ const f = n.current;
1257
+ if (!f)
1258
+ return;
1259
+ const c = () => {
1260
+ i(!0);
1261
+ }, d = () => {
1262
+ i(!1), a(null);
1263
+ }, m = (g) => {
1264
+ g.target.matches(":focus-visible") && i(!0);
1265
+ };
1266
+ return f.addEventListener("mouseenter", c), f.addEventListener("mouseleave", d), f.addEventListener("focus", m), f.addEventListener("blur", d), () => {
1267
+ f.removeEventListener("mouseenter", c), f.removeEventListener("mouseleave", d), f.removeEventListener("focus", m), f.removeEventListener("blur", d);
1268
+ };
1269
+ }, [n]), ye(() => {
1270
+ if (!o)
1271
+ return;
1272
+ const f = requestAnimationFrame(() => {
1273
+ if (!s.current || !n.current)
1274
+ return;
1275
+ const c = Mn(n, s, {
1276
+ placement: t,
1277
+ offset: 8
1278
+ });
1279
+ c && a({ x: c.x, y: c.y });
1280
+ });
1281
+ return () => {
1282
+ cancelAnimationFrame(f);
1283
+ };
1284
+ }, [t, o, n]);
1285
+ const u = R({
1286
+ top: (l == null ? void 0 : l.y) ?? -9999,
1287
+ left: (l == null ? void 0 : l.x) ?? -9999,
1288
+ opacity: l ? 1 : 0,
1289
+ visibility: l && o ? "visible" : "hidden"
1290
+ }), p = ["uui-tooltip", "uui-font-body-small", "uui-elevation-2", "uui-corner-small"].join(" ");
1291
+ return en(
1292
+ /* @__PURE__ */ r("div", { className: p, ref: s, role: "tooltip", style: u.get(), children: e }),
1293
+ document.body
1294
+ );
1295
+ };
1296
+ Lt.displayName = "InlineTooltipManager";
1297
+ function Wo({
1298
+ variant: e = "circular",
1299
+ inline: t,
1300
+ className: n
1301
+ }) {
1302
+ const o = [
1303
+ "uui-spinner",
1304
+ `uui-spinner-${e}`,
1305
+ t && "uui-spinner-inline",
1306
+ n
1307
+ ].filter(Boolean).join(" ");
1308
+ return e === "circular" ? /* @__PURE__ */ r("svg", { "aria-hidden": "true", className: o, viewBox: "22 22 44 44", children: /* @__PURE__ */ r(
1309
+ "circle",
1310
+ {
1311
+ className: "uui-spinner-circle",
1312
+ cx: "44",
1313
+ cy: "44",
1314
+ fill: "none",
1315
+ r: "19.8",
1316
+ strokeWidth: "4.6"
1317
+ }
1318
+ ) }) : e === "bars2" ? /* @__PURE__ */ $(
1319
+ "svg",
1320
+ {
1321
+ className: "uui-bars-spinner",
1322
+ viewBox: "0 0 48 48",
1323
+ xmlns: "http://www.w3.org/2000/svg",
1324
+ children: [
1325
+ /* @__PURE__ */ r("rect", { height: "12", rx: "2", width: "4", x: "22" }),
1326
+ /* @__PURE__ */ r(
1327
+ "rect",
1328
+ {
1329
+ height: "12",
1330
+ rx: "2",
1331
+ transform: "rotate(-135 33.9 16.9)",
1332
+ width: "4",
1333
+ x: "33.9",
1334
+ y: "16.9"
1335
+ }
1336
+ ),
1337
+ /* @__PURE__ */ r(
1338
+ "rect",
1339
+ {
1340
+ height: "12",
1341
+ rx: "2",
1342
+ transform: "rotate(-90 36 26)",
1343
+ width: "4",
1344
+ x: "36",
1345
+ y: "26"
1346
+ }
1347
+ ),
1348
+ /* @__PURE__ */ r(
1349
+ "rect",
1350
+ {
1351
+ height: "12",
1352
+ rx: "2",
1353
+ transform: "rotate(-45 31.1 33.9)",
1354
+ width: "4",
1355
+ x: "31.1",
1356
+ y: "33.9"
1357
+ }
1358
+ ),
1359
+ /* @__PURE__ */ r("rect", { height: "12", rx: "2", width: "4", x: "22", y: "36" }),
1360
+ /* @__PURE__ */ r(
1361
+ "rect",
1362
+ {
1363
+ height: "12",
1364
+ rx: "2",
1365
+ transform: "rotate(-135 8.4 42.4)",
1366
+ width: "4",
1367
+ x: "8.4",
1368
+ y: "42.4"
1369
+ }
1370
+ ),
1371
+ /* @__PURE__ */ r(
1372
+ "rect",
1373
+ {
1374
+ height: "12",
1375
+ rx: "2",
1376
+ transform: "rotate(-90 0 26)",
1377
+ width: "4",
1378
+ y: "26"
1379
+ }
1380
+ ),
1381
+ /* @__PURE__ */ r(
1382
+ "rect",
1383
+ {
1384
+ height: "12",
1385
+ rx: "2",
1386
+ transform: "rotate(-45 5.6 8.4)",
1387
+ width: "4",
1388
+ x: "5.6",
1389
+ y: "8.4"
1390
+ }
1391
+ )
1392
+ ]
1393
+ }
1394
+ ) : e === "orbit" ? /* @__PURE__ */ $(
1395
+ "svg",
1396
+ {
1397
+ className: "uui-orbit-spinner",
1398
+ viewBox: "0 0 48 48",
1399
+ xmlns: "http://www.w3.org/2000/svg",
1400
+ children: [
1401
+ /* @__PURE__ */ r("circle", { cx: "24", cy: "4", r: "4" }),
1402
+ /* @__PURE__ */ r("circle", { cx: "38.1421", cy: "9.8579", r: "4" }),
1403
+ /* @__PURE__ */ r("circle", { cx: "44", cy: "24", r: "4" }),
1404
+ /* @__PURE__ */ r("circle", { cx: "38.1421", cy: "38.1421", r: "4" }),
1405
+ /* @__PURE__ */ r("circle", { cx: "24", cy: "44", r: "4" }),
1406
+ /* @__PURE__ */ r("circle", { cx: "9.8579", cy: "38.1421", r: "4" }),
1407
+ /* @__PURE__ */ r("circle", { cx: "4", cy: "24", r: "4" }),
1408
+ /* @__PURE__ */ r("circle", { cx: "9.8579", cy: "9.8579", r: "4" })
1409
+ ]
1410
+ }
1411
+ ) : e === "arc" ? /* @__PURE__ */ $(
1412
+ "svg",
1413
+ {
1414
+ className: "uui-ring-spinner",
1415
+ viewBox: "0 0 56 56",
1416
+ xmlns: "http://www.w3.org/2000/svg",
1417
+ children: [
1418
+ /* @__PURE__ */ r(
1419
+ "circle",
1420
+ {
1421
+ cx: "28",
1422
+ cy: "28",
1423
+ fill: "none",
1424
+ opacity: "0.25",
1425
+ r: "22",
1426
+ stroke: "currentColor",
1427
+ strokeWidth: "8"
1428
+ }
1429
+ ),
1430
+ /* @__PURE__ */ r(
1431
+ "circle",
1432
+ {
1433
+ cx: "28",
1434
+ cy: "28",
1435
+ fill: "none",
1436
+ r: "22",
1437
+ stroke: "currentColor",
1438
+ strokeDasharray: "69 69",
1439
+ strokeDashoffset: "0",
1440
+ strokeLinecap: "butt",
1441
+ strokeWidth: "8"
1442
+ }
1443
+ )
1444
+ ]
1445
+ }
1446
+ ) : e === "stepBar" ? /* @__PURE__ */ $("svg", { className: "uui-bars-steps", viewBox: "0 0 48 48", children: [
1447
+ /* @__PURE__ */ r("rect", { height: "8", rx: "4", width: "8", x: "6", y: "20" }),
1448
+ /* @__PURE__ */ r("rect", { height: "8", rx: "4", width: "8", x: "20", y: "20" }),
1449
+ /* @__PURE__ */ r("rect", { height: "8", rx: "4", width: "8", x: "34", y: "20" })
1450
+ ] }) : /* @__PURE__ */ $(
1451
+ "svg",
1452
+ {
1453
+ className: "uui-dots2-spinner",
1454
+ viewBox: "0 0 48 48",
1455
+ xmlns: "http://www.w3.org/2000/svg",
1456
+ children: [
1457
+ /* @__PURE__ */ r("circle", { cx: "10", cy: "24", r: "4" }),
1458
+ /* @__PURE__ */ r("circle", { cx: "24", cy: "24", r: "4" }),
1459
+ /* @__PURE__ */ r("circle", { cx: "38", cy: "24", r: "4" })
1460
+ ]
1461
+ }
1462
+ );
1463
+ }
1464
+ const Ft = I((e, t) => {
1465
+ const {
1466
+ color: n,
1467
+ selectedColor: o,
1468
+ className: i,
1469
+ label: l,
1470
+ title: a,
1471
+ type: s = "button",
1472
+ size: u = "small",
1473
+ border: p,
1474
+ borderColor: f,
1475
+ hoverEffects: c = ["overlay", "elevate"],
1476
+ pressedEffects: d = ["overlay", "elevate"],
1477
+ touchEffects: m = ["ripple"],
1478
+ selectedEffects: g = ["morph", "color"],
1479
+ focusEffects: C = ["ring", "overlay"],
1480
+ children: x,
1481
+ outlined: b = !1,
1482
+ filled: v = !1,
1483
+ tonal: N = !1,
1484
+ elevated: w = !1,
1485
+ flat: L = !1,
1486
+ elevation: F,
1487
+ disabled: B,
1488
+ textColor: T,
1489
+ selectedTextColor: _,
1490
+ shape: D = "round",
1491
+ selectedShape: h = "rounded",
1492
+ icon: k,
1493
+ selectedIcon: S,
1494
+ leading: E,
1495
+ endIcon: A,
1496
+ trailing: U,
1497
+ onClick: j,
1498
+ elementClass: re,
1499
+ font: ee = "labelLarge",
1500
+ upload: P,
1501
+ uploadAccept: be,
1502
+ uploadMultiple: pe,
1503
+ onUploadChange: De,
1504
+ id: ne = "",
1505
+ name: $e = "",
1506
+ loading: Z,
1507
+ wf: G = !1,
1508
+ link: ie,
1509
+ selected: ae,
1510
+ defaultSelected: ke,
1511
+ toggle: se = !1,
1512
+ tooltipAlign: we = "auto",
1513
+ density: Ae,
1514
+ style: me,
1515
+ "aria-label": X,
1516
+ ...J
1517
+ } = e, Se = ae !== void 0, [oe, ue] = q(ke ?? !1), Le = Se ? ae : oe, Ce = W(null), Q = W(null), Re = W(null), je = W(vt("button")), Te = ne || $e || je.current, ge = ie ? rt.cloneElement(ie, { ref: Q, style: { display: "none" } }) : null, Y = [re, i, "uui-bb", ct(Ae), ...G ? ["uui-w-full"] : []].filter(Boolean).join(" "), Ne = [
1518
+ "uui-btn-control",
1519
+ xe(ee),
1520
+ ...v ? ["uui-filled"] : [],
1521
+ ...w ? ["uui-elevated"] : [],
1522
+ ...N ? ["uui-tonal"] : [],
1523
+ ...b ? ["uui-outlined"] : [],
1524
+ ...C.includes("ring") ? ["uui-focus-ring"] : [],
1525
+ ...C.includes("overlay") ? ["uui-focus-overlay"] : [],
1526
+ ...c.includes("overlay") ? ["uui-hover-overlay"] : [],
1527
+ ...d.includes("overlay") ? ["uui-pressed-overlay"] : [],
1528
+ ...g.includes("overlay") ? ["uui-selected-overlay"] : [],
1529
+ ...Z ? ["uui-loading"] : [],
1530
+ ...G ? ["uui-w-full"] : [],
1531
+ ...x ? [] : [gt(u)],
1532
+ ...Le ? ["uui-selected"] : []
1533
+ ], fe = ["uui-state"], Fe = se && Le && g.includes("morph") ? Ve(h) : Ve(D);
1534
+ Ne.push(Fe), fe.push(Fe);
1535
+ const ve = "uui-icon", le = se && Le ? S ?? E ?? k : E ?? k, he = Z ? /* @__PURE__ */ r("div", { className: ve, children: /* @__PURE__ */ r(Wo, {}) }) : le && /* @__PURE__ */ r("div", { className: ve, children: le }), He = (U ?? A) && /* @__PURE__ */ r("div", { className: ve, children: U ?? A });
1536
+ let Me;
1537
+ if (x) {
1538
+ const te = ["uui-btn-content uui-overflow-hidden", Fe, xe(ee)].filter(Boolean).join(" ");
1539
+ Me = /* @__PURE__ */ r("div", { className: te, children: x });
1540
+ } else
1541
+ Me = /* @__PURE__ */ $("div", { className: "uui-btn-content", children: [
1542
+ he,
1543
+ l && /* @__PURE__ */ r("span", { className: "uui-label " + xe(ee), children: l }),
1544
+ He
1545
+ ] });
1546
+ const M = R(me), O = R();
1547
+ if (b || p !== void 0) {
1548
+ M.border(Ht(f));
1549
+ const _e = et(p ?? (b ? 1 : 0));
1550
+ Ne.push(_e);
1551
+ }
1552
+ let Pe = F;
1553
+ F === void 0 && (N || v ? L || (Pe = w ? 1 : 0) : w && (Pe = 1));
1554
+ const z = [
1555
+ ...c.includes("elevate") && !L ? ["uui-hover-elevate"] : [],
1556
+ ...d.includes("elevate") && !L ? ["uui-pressed-elevate"] : []
1557
+ ];
1558
+ Ne.push(...z, at(Pe));
1559
+ const nt = () => {
1560
+ v ? (M.bg(n ?? "primary"), O.bg.on(n ?? "primary"), T ? M.text(T) : M.text.on(n ?? "primary")) : N ? (M.bg.container("secondary"), O.bg.onContainer("secondary"), T ? M.text(T) : M.text.onContainer("secondary")) : w ? (M.bg("surfaceContainerLow"), M.text(T ?? n ?? "primary"), O.bg(n ?? "primary")) : b && !T ? (M.text.on("surfaceVariant"), O.bg.on("surfaceVariant")) : (M.text(T ?? n), O.bg(T ?? n));
1561
+ }, Ue = () => {
1562
+ n ? (M.bg(n), O.bg.on(n), M.text.on(n)) : v ? (M.bg("surfaceContainer"), O.bg.on("surfaceContainer"), M.text.on("surfaceVariant")) : w ? (M.bg("surfaceContainerLow"), O.bg.on("surfaceContainerLow"), M.text("primary")) : N ? (M.bg.container("secondary"), O.bg("secondary"), M.text.onContainer("secondary")) : b && !T ? (M.text.on("surfaceVariant"), O.bg.on("surfaceVariant")) : (M.text(T ?? n ?? "primary"), O.bg(T ?? n ?? "primary")), T && M.text(T);
1563
+ }, We = () => {
1564
+ const te = o ?? n ?? "primary";
1565
+ N && !o ? (M.bg("secondary"), O.bg.on("secondary"), _ ? M.text(_) : M.text.on("secondary")) : b && !o ? (M.bg("inverseSurface"), O.bg.on("inverseSurface"), _ ? M.text(_) : M.text.on("inverseSurface")) : (M.bg(te), O.bg.on(te), _ ? M.text(_) : M.text.on(te));
1566
+ };
1567
+ se && g.includes("color") ? Le ? We() : Ue() : nt();
1568
+ const Ye = (te) => {
1569
+ var _e;
1570
+ if (!B) {
1571
+ if (se) {
1572
+ const Ge = !Le;
1573
+ Se || ue(Ge), (_e = e.onChange) == null || _e.call(e, {
1574
+ ...te,
1575
+ target: {
1576
+ ...te.target,
1577
+ name: $e,
1578
+ value: Ge
1579
+ }
1580
+ });
1581
+ }
1582
+ if (Q.current) {
1583
+ Q.current.click();
1584
+ return;
1585
+ }
1586
+ if (P && Ce.current) {
1587
+ Ce.current.click();
1588
+ return;
1589
+ }
1590
+ j && j(te), m.includes("ripple") && kt(te.currentTarget, te);
1591
+ }
1592
+ }, Xe = a ? /* @__PURE__ */ r("div", { id: `${Te}-tip`, children: a }) : null;
1593
+ let K;
1594
+ l && x && (K = l), !l && !x && (K = a);
1595
+ const de = X ?? K;
1596
+ return /* @__PURE__ */ $("div", { className: Y, children: [
1597
+ P && /* @__PURE__ */ r(
1598
+ "input",
1599
+ {
1600
+ accept: be,
1601
+ "aria-labelledby": Te,
1602
+ multiple: pe,
1603
+ onChange: De,
1604
+ ref: Ce,
1605
+ style: { display: "none" },
1606
+ type: "file"
1607
+ }
1608
+ ),
1609
+ /* @__PURE__ */ $(
1610
+ "button",
1611
+ {
1612
+ "aria-busy": Z,
1613
+ "aria-describedby": a ? `${Te}-tip` : void 0,
1614
+ "aria-haspopup": P ? "dialog" : void 0,
1615
+ "aria-label": de,
1616
+ "aria-pressed": se ? Le : void 0,
1617
+ className: Ne.join(" "),
1618
+ disabled: B,
1619
+ id: Te,
1620
+ name: $e || void 0,
1621
+ onClick: Ye,
1622
+ ref: ht(t, Re),
1623
+ style: M.get(),
1624
+ type: s,
1625
+ ...J,
1626
+ children: [
1627
+ /* @__PURE__ */ r("div", { className: fe.join(" "), style: O.get() }),
1628
+ Me
1629
+ ]
1630
+ }
1631
+ ),
1632
+ ge,
1633
+ Xe && /* @__PURE__ */ r(Lt, { align: we, tooltip: Xe, triggerRef: Re })
1634
+ ] });
1635
+ });
1636
+ Ft.displayName = "ButtonBase";
1637
+ const Pn = ({ start: e, end: t, content: n, className: o }) => /* @__PURE__ */ $("div", { className: `uui-slot ${o}`, children: [
1638
+ e,
1639
+ n,
1640
+ t
1641
+ ] }), On = (e) => /* @__PURE__ */ r(Pn, { ...e, className: "uui-leading" }), _n = (e) => /* @__PURE__ */ r(Pn, { ...e, className: "uui-trailing" }), an = I(
1642
+ ({ control: e, label: t, description: n, className: o, textPlacement: i, spanDesc: l }, a) => /* @__PURE__ */ $(
1643
+ "div",
1644
+ {
1645
+ className: Oe(o, `uui-control-grid uui-control-grid-${t && (i === "start" || i === "end") ? i : "col"}`, l && "uui-spanned"),
1646
+ ref: a,
1647
+ children: [
1648
+ (i === "start" || i === "top") && t,
1649
+ e,
1650
+ (i === "end" || i === "bottom") && t,
1651
+ n
1652
+ ]
1653
+ }
1654
+ )
1655
+ );
1656
+ an.displayName = "ControlGrid";
1657
+ const Hn = ({
1658
+ label: e,
1659
+ htmlFor: t,
1660
+ id: n,
1661
+ required: o,
1662
+ font: i,
1663
+ focusRef: l,
1664
+ tag: a = "label"
1665
+ }) => {
1666
+ if (!e)
1667
+ return null;
1668
+ const s = Oe("uui-control-label", xe(i ?? "bodyMedium"));
1669
+ return /* @__PURE__ */ $(
1670
+ a,
1671
+ {
1672
+ className: s,
1673
+ id: n,
1674
+ ...a === "label" ? { htmlFor: l ? void 0 : t } : {},
1675
+ onClick: l ? () => {
1676
+ var p;
1677
+ return (p = l.current) == null ? void 0 : p.focus();
1678
+ } : void 0,
1679
+ children: [
1680
+ e,
1681
+ o && /* @__PURE__ */ r("span", { "aria-hidden": "true", className: "uui-required", children: "*" })
1682
+ ]
1683
+ }
1684
+ );
1685
+ }, cn = ({ description: e, error: t, ...n }) => {
1686
+ const o = t ?? e;
1687
+ if (!o)
1688
+ return null;
1689
+ const i = Oe(
1690
+ "uui-support-text",
1691
+ xe("bodySmall"),
1692
+ !!t && "uui-error",
1693
+ !!e && !t && "uui-description"
1694
+ );
1695
+ return /* @__PURE__ */ r("div", { className: i, ...n, children: o });
1696
+ }, un = I((e, t) => {
1697
+ const {
1698
+ elementClass: n,
1699
+ density: o,
1700
+ icon: i,
1701
+ disabled: l,
1702
+ elevation: a,
1703
+ checked: s,
1704
+ children: u,
1705
+ color: p,
1706
+ uncheckedColor: f,
1707
+ defaultChecked: c,
1708
+ indeterminate: d,
1709
+ hoverEffects: m = ["overlay"],
1710
+ touchEffects: g = ["ripple"],
1711
+ focusEffects: C = ["ring"],
1712
+ selectedEffects: x = [],
1713
+ pressedEffects: b = ["overlay"],
1714
+ id: v,
1715
+ name: N,
1716
+ label: w,
1717
+ font: L,
1718
+ border: F,
1719
+ borderColor: B,
1720
+ uncheckedBorder: T,
1721
+ uncheckedBorderColor: _,
1722
+ onChange: D,
1723
+ onFocus: h,
1724
+ onBlur: k,
1725
+ onClick: S,
1726
+ type: E,
1727
+ required: A,
1728
+ shape: U = "smooth",
1729
+ title: j,
1730
+ filled: re,
1731
+ value: ee,
1732
+ size: P = "small",
1733
+ uncheckedIcon: be,
1734
+ indeterminateIcon: pe,
1735
+ description: De,
1736
+ descriptionColor: ne,
1737
+ descriptionFont: $e,
1738
+ className: Z,
1739
+ error: G,
1740
+ animation: ie,
1741
+ duration: ae = 150,
1742
+ motionStyle: ke = "regular",
1743
+ focusColor: se,
1744
+ labelColor: we,
1745
+ textColor: Ae,
1746
+ readOnly: me,
1747
+ tooltipAlign: X = "auto",
1748
+ textPlacement: J = "end",
1749
+ "aria-label": Se,
1750
+ ...oe
1751
+ } = e, { animationVars: ue, animate: Le, animating: Ce } = sn({
1752
+ t1: ae,
1753
+ oneShot: !0
1754
+ }), Q = Mt(Rn), Re = E === "radio" ? N ?? (Q == null ? void 0 : Q.name) : N, je = Mt(ln), Te = l ?? (je == null ? void 0 : je.disabled), { focusVisible: ge, isFocused: Y, focusHandlers: Ne } = St(h, k), fe = W(null), Fe = W(null), ve = W(null), le = W(vt("check")), he = v ?? le.current, He = s !== void 0, [Me, M] = q(c ?? !1);
1755
+ let O;
1756
+ He ? O = !!s : (Q == null ? void 0 : Q.value) !== void 0 ? O = Q.value === ee : O = Me;
1757
+ const Pe = d ? "indeterminate" : O ? "checked" : "unchecked", [z, nt] = q(Pe), Ue = Se ?? (w ? void 0 : j), We = G ? "error" : !O && !d && f ? f : p, Ye = j ? /* @__PURE__ */ r("div", { id: `${he}-tip`, children: j }) : null, Xe = (qe) => {
1758
+ if (me) {
1759
+ qe.preventDefault();
1760
+ return;
1761
+ }
1762
+ const At = qe.currentTarget;
1763
+ He || (E === "radio" && (Q != null && Q.setValue) && Q.setValue(At.value), M(At.checked)), D == null || D(qe);
1764
+ }, K = (qe) => {
1765
+ if (me) {
1766
+ qe.preventDefault();
1767
+ return;
1768
+ }
1769
+ g.includes("ripple") && ve.current && Fe.current && kt(ve.current, qe, Fe.current), S == null || S(qe);
1770
+ };
1771
+ ye(() => {
1772
+ Pe !== z && ie && Le();
1773
+ }, [Pe, z, ie, Le]), ye(() => {
1774
+ Ce || nt(Pe);
1775
+ }, [Ce, Pe]);
1776
+ const de = R(), te = [
1777
+ n,
1778
+ "uui-cb",
1779
+ ct(o),
1780
+ Z,
1781
+ Te && "uui-disabled",
1782
+ ...u ? [] : [gt(P)]
1783
+ ].filter(Boolean).join(" "), _e = [
1784
+ "uui-cb-control",
1785
+ O && "uui-checked",
1786
+ d && "uui-indeterminate",
1787
+ re && "uui-filled",
1788
+ ...m.includes("overlay") && !me ? ["uui-hover-overlay"] : [],
1789
+ ...C.includes("overlay") && ge && Y ? ["uui-focus-overlay"] : [],
1790
+ ...x.includes("overlay") ? ["uui-selected-overlay"] : [],
1791
+ ...b.includes("overlay") && !me ? ["uui-pressed-overlay"] : [],
1792
+ ...u ? [Ve(U)] : ["uui-round"]
1793
+ ].filter(Boolean).join(" "), Ge = R();
1794
+ se && ge && Y && Ge.set("--uui-focus-color", Tn(se).color);
1795
+ const It = [
1796
+ "uui-input",
1797
+ C.includes("ring") && ge && Y && "uui-focus-visible uui-focus-ring"
1798
+ ].filter(Boolean).join(" "), ze = ["uui-state"].filter(Boolean).join(" "), Bt = R();
1799
+ Bt.bg(We);
1800
+ const Ke = [
1801
+ "uui-cb-glyph",
1802
+ at(a),
1803
+ Ve(U),
1804
+ et(O ? F : T)
1805
+ ].filter(Boolean).join(" "), ce = R(), dt = nn(ie), Dt = ["uui-icon", Ce && dt, on(ke)].filter(Boolean).join(" "), Je = R();
1806
+ Je.merge(ue), O || d || f ? (ce.border(G ? "error" : B), re ? (!O && !be && !d || ce.bg(We), Je.text.on(We)) : Je.text(We)) : (re && be ? (Je.text(G ? "onError" : "surface"), ce.bg(G ? "error" : "onSurfaceVariant")) : be && Je.text(G ? "error" : "onSurfaceVariant"), ce.border(G ? "error" : _));
1807
+ let Ct;
1808
+ if (u) {
1809
+ const qe = ["uui-cb-content uui-overflow-hidden", Ve(U), et(F)].filter(Boolean).join(" ");
1810
+ Ct = /* @__PURE__ */ r("div", { className: qe, children: u });
1811
+ } else {
1812
+ const qe = z === "indeterminate" ? pe : z === "checked" ? i : be;
1813
+ Ct = /* @__PURE__ */ r("div", { className: Ke, style: ce.get(), children: /* @__PURE__ */ r("div", { className: Dt, style: Je.get(), children: qe }) });
1814
+ }
1815
+ const yt = R();
1816
+ yt.text((G ? "error" : void 0) ?? we ?? Ae ?? "onSurface");
1817
+ const Vt = [xe(L ?? "bodyMedium"), "uui-cb-label"].join(" "), st = w && /* @__PURE__ */ $("label", { className: Vt, htmlFor: he, style: yt.get(), children: [
1818
+ w,
1819
+ A && /* @__PURE__ */ r("span", { "aria-hidden": "true", className: "uui-required", children: "*" })
1820
+ ] }), ot = R(), bt = R();
1821
+ J === "end" ? (yt.set("gridColumn", 2), ot.set("gridColumn", 2), bt.set("gridColumn", 1)) : J === "start" ? (yt.set("gridColumn", 1), ot.set("gridColumn", 1), bt.set("gridColumn", 2), bt.set("gridRow", 1)) : (de.set("gridTemplateColumns", "1fr"), de.set("justifyItems", "start")), J === "top" && (bt.set("order", 1), ot.set("order", 2));
1822
+ const $t = /* @__PURE__ */ r(cn, { description: De, error: G, style: ot.get() }), Kt = (st ?? $t) && /* @__PURE__ */ $(it, { children: [
1823
+ st,
1824
+ $t
1825
+ ] });
1826
+ return /* @__PURE__ */ $("div", { className: te, style: de.get(), children: [
1827
+ /* @__PURE__ */ r("div", { className: "uui-cb-control-wrapper", style: bt.get(), children: /* @__PURE__ */ $("div", { className: _e, ref: Fe, style: Ge.get(), children: [
1828
+ /* @__PURE__ */ r(
1829
+ "input",
1830
+ {
1831
+ ...Ne,
1832
+ "aria-label": Ue,
1833
+ "aria-readonly": me === !0 ? !0 : void 0,
1834
+ checked: !!O,
1835
+ className: It,
1836
+ disabled: Te,
1837
+ id: he,
1838
+ name: Re,
1839
+ onChange: Xe,
1840
+ onClick: K,
1841
+ readOnly: me,
1842
+ ref: ht(fe, t),
1843
+ type: E,
1844
+ value: ee,
1845
+ ...oe
1846
+ }
1847
+ ),
1848
+ /* @__PURE__ */ r("div", { className: ze, ref: ve, style: Bt.get() }),
1849
+ Ct
1850
+ ] }) }),
1851
+ Kt,
1852
+ Ye && /* @__PURE__ */ r(Lt, { align: X, tooltip: Ye, triggerRef: fe })
1853
+ ] });
1854
+ });
1855
+ un.displayName = "CheckBoxBase";
1856
+ const Uo = {
1857
+ basic: "scale",
1858
+ fullscreen: "fade",
1859
+ dockBottom: "slideUp",
1860
+ dockTop: "slideDown",
1861
+ dockRight: "slideRight",
1862
+ dockLeft: "slideLeft"
1863
+ }, zo = (e, t) => t === "none" ? void 0 : t ?? Uo[e], Ln = typeof document < "u" ? document.getElementById("dialog-root") ?? document.body : null, zt = I(
1864
+ ({
1865
+ open: e,
1866
+ onClose: t,
1867
+ type: n = "basic",
1868
+ color: o,
1869
+ elevation: i,
1870
+ shape: l,
1871
+ // border,
1872
+ // borderColor,
1873
+ wf: a,
1874
+ hf: s,
1875
+ size: u,
1876
+ animation: p,
1877
+ fit: f,
1878
+ detached: c,
1879
+ duration: d = 500,
1880
+ disableBackdropClose: m,
1881
+ disableEscapeKey: g,
1882
+ children: C,
1883
+ className: x,
1884
+ motionStyle: b,
1885
+ modal: v = !1,
1886
+ autoFocus: N,
1887
+ flush: w,
1888
+ docked: L,
1889
+ anchored: F,
1890
+ ...B
1891
+ }, T) => {
1892
+ const _ = i ?? (n !== "fullscreen" ? 3 : void 0), D = W(null), h = W(null), [k, S] = q(!1), [E, A] = q(!1), [U, j] = q(!1), { animationVars: re, animate: ee, animating: P, idle: be, active: pe } = sn({
1893
+ t1: d
1894
+ }), De = (me) => {
1895
+ const X = h.current, J = D.current;
1896
+ if (!X || !J) {
1897
+ A(!1), j(!1);
1898
+ return;
1899
+ }
1900
+ const Se = X.getBoundingClientRect(), oe = J.getBoundingClientRect(), ue = 1;
1901
+ n === "dockLeft" || n === "dockRight" ? (A(oe.width >= Se.width - ue), j(!1)) : n === "dockTop" || n === "dockBottom" ? (j(oe.height >= Se.height - ue), A(!1)) : (A(!1), j(!1));
1902
+ }, ne = n !== "basic" && n !== "fullscreen" && !c;
1903
+ Qt(D, De, ne && !P, !0), Qt(h, De, ne && !P, !0);
1904
+ const [$e, Z] = q(!1);
1905
+ Mo(!g && k, () => t == null ? void 0 : t()), jo({
1906
+ ref: D,
1907
+ enabled: v && k,
1908
+ autoFocus: N && !pe
1909
+ }), ye(() => {
1910
+ e ? (ee("open"), S(!0), j(!1), A(!1)) : be || (ee("closed"), S(!1));
1911
+ }, [e]), ye(() => {
1912
+ Z(!!e);
1913
+ }, [e]);
1914
+ const G = (me) => {
1915
+ m || me.target === me.currentTarget && (t == null || t());
1916
+ };
1917
+ ye(() => {
1918
+ if (k && v && !F && !L) {
1919
+ const me = document.body.style.overflow;
1920
+ return document.body.style.overflow = "hidden", () => {
1921
+ document.body.style.overflow = me;
1922
+ };
1923
+ }
1924
+ }, [F, L, v, k]);
1925
+ const ie = nn(zo(n, p)), ae = R();
1926
+ ae.merge(re);
1927
+ const ke = u ?? (n === "dockLeft" || n === "dockRight" ? "small" : "medium"), se = Oe(
1928
+ "uui-dlg-backdrop",
1929
+ v && "uui-modal",
1930
+ $e && "uui-open",
1931
+ L && "uui-docked",
1932
+ F && "uui-anchored"
1933
+ ), we = Oe(
1934
+ "uui-dlg",
1935
+ `uui-dlg-${Rt(n)}`,
1936
+ a && "uui-w-full",
1937
+ s && "uui-h-full",
1938
+ (E || U) && "uui-maximized",
1939
+ f && "uui-fit",
1940
+ w && "uui-flush",
1941
+ c && "uui-detached",
1942
+ gt(ke),
1943
+ P && ie,
1944
+ on(b),
1945
+ x
1946
+ );
1947
+ if (!Ln || !(k || pe))
1948
+ return null;
1949
+ const Ae = /* @__PURE__ */ r("div", { className: se, onClick: G, ref: h, style: re, children: /* @__PURE__ */ r(
1950
+ Be,
1951
+ {
1952
+ ...B,
1953
+ "aria-modal": v ? !0 : void 0,
1954
+ className: we,
1955
+ color: o,
1956
+ elevation: _,
1957
+ ref: ht(T, D),
1958
+ role: "dialog",
1959
+ shape: l,
1960
+ style: ae.get(),
1961
+ children: C
1962
+ }
1963
+ ) });
1964
+ return L || F ? Ae : en(Ae, Ln);
1965
+ }
1966
+ );
1967
+ zt.displayName = "Dialog";
1968
+ const tt = I((e, t) => {
1969
+ const {
1970
+ elementClass: n,
1971
+ color: o,
1972
+ density: i,
1973
+ label: l,
1974
+ labelColor: a,
1975
+ labelFont: s,
1976
+ id: u,
1977
+ outlined: p,
1978
+ filled: f,
1979
+ classic: c,
1980
+ disabled: d,
1981
+ font: m,
1982
+ placeholderFont: g,
1983
+ placeholderColor: C,
1984
+ onFocus: x,
1985
+ onBlur: b,
1986
+ border: v,
1987
+ borderColor: N,
1988
+ shape: w,
1989
+ required: L,
1990
+ title: F,
1991
+ description: B,
1992
+ descriptionColor: T,
1993
+ descriptionFont: _,
1994
+ name: D,
1995
+ error: h,
1996
+ className: k,
1997
+ placeholder: S,
1998
+ type: E = "text",
1999
+ icon: A,
2000
+ leading: U,
2001
+ trailing: j,
2002
+ endIcon: re,
2003
+ variant: ee,
2004
+ value: P,
2005
+ textColor: be,
2006
+ defaultValue: pe,
2007
+ ...De
2008
+ } = e, [ne, $e] = q(pe ?? ""), Z = P !== void 0, ie = (Z ? P : ne).length === 0, ae = W(null), ke = W(null), se = u ?? vt("input"), [we, Ae] = q(0), me = U ?? A, X = ee ?? (f && "filled") ?? (p && "outlined") ?? (c && "classic") ?? "filled", { isFocused: J, focusHandlers: Se } = St(x, b), oe = (K) => {
2009
+ var de;
2010
+ Z || $e(K.target.value), (de = e.onChange) == null || de.call(e, K);
2011
+ }, ue = (K) => {
2012
+ var de;
2013
+ K.preventDefault(), (de = ae.current) == null || de.focus();
2014
+ };
2015
+ ye(() => {
2016
+ const K = ae.current;
2017
+ K && K.value && $e(K.value);
2018
+ }, []), Bn(() => {
2019
+ const K = ke.current, de = ae.current;
2020
+ if (!K || !de)
2021
+ return;
2022
+ const te = K.getBoundingClientRect().left - de.getBoundingClientRect().left + 16;
2023
+ Ae((_e) => _e === te ? _e : te);
2024
+ }, [me]);
2025
+ const Le = [
2026
+ n,
2027
+ k,
2028
+ "uui-field uui-field-wrapper",
2029
+ `uui-${X}`,
2030
+ ct(i)
2031
+ ], Ce = me && /* @__PURE__ */ r("div", { className: "uui-leading", children: rt.Children.map(
2032
+ me,
2033
+ (K) => K ? /* @__PURE__ */ r(
2034
+ "span",
2035
+ {
2036
+ className: "uui-slot",
2037
+ onClick: (de) => {
2038
+ de.stopPropagation();
2039
+ },
2040
+ children: K
2041
+ }
2042
+ ) : null
2043
+ ) }), Q = j ?? re, Re = Q && /* @__PURE__ */ r("div", { className: "uui-trailing", children: rt.Children.map(
2044
+ Q,
2045
+ (K) => K ? /* @__PURE__ */ r(
2046
+ "span",
2047
+ {
2048
+ className: "uui-slot",
2049
+ onClick: (de) => {
2050
+ de.stopPropagation();
2051
+ },
2052
+ children: K
2053
+ }
2054
+ ) : null
2055
+ ) }), je = l && /* @__PURE__ */ $(it, { children: [
2056
+ l,
2057
+ L && /* @__PURE__ */ r("span", { "aria-hidden": "true", className: "uui-required", children: "*" })
2058
+ ] }), Te = v ?? (X !== "filled" ? 1 : void 0), ge = [
2059
+ "uui-field-control",
2060
+ xe(m ?? "bodyLarge"),
2061
+ Ve(w ?? "rounded"),
2062
+ X !== "outlined" && et(Te),
2063
+ h && "uui-error",
2064
+ J && "uui-active",
2065
+ d && "uui-disabled",
2066
+ Ce && "uui-has-leading",
2067
+ Re && "uui-has-trailing"
2068
+ ];
2069
+ let Y, Ne, fe, Fe;
2070
+ const ve = R(), le = ["uui-fb-label"];
2071
+ if (je)
2072
+ if (X !== "classic")
2073
+ J || !ie ? (ve.text((h ? "error" : void 0) ?? o ?? "primary"), le.push(xe(s ?? "bodySmall")), ge.push("uui-fb-label-up")) : (ve.text((h ? "error" : void 0) ?? "onSurfaceVariant"), le.push(xe(m ?? "bodyLarge"))), le.push("uui-field-float-label"), X === "outlined" ? (fe = /* @__PURE__ */ r("legend", { className: xe(s ?? "bodySmall"), children: je }), Y = /* @__PURE__ */ r("span", { className: le.join(" "), children: je })) : (Ne = /* @__PURE__ */ r("span", { className: xe(s ?? "bodySmall"), children: " " }), Y = /* @__PURE__ */ r("span", { className: le.join(" "), children: je }));
2074
+ else {
2075
+ ve.text((h ? "error" : void 0) ?? "onSurface"), le.push(xe(s ?? "bodyMedium"));
2076
+ const K = le.filter(Boolean).join(" ");
2077
+ Fe = /* @__PURE__ */ r("label", { className: K, htmlFor: se, style: ve.get(), children: je });
2078
+ }
2079
+ let he;
2080
+ if (X === "outlined") {
2081
+ const K = ["uui-field-fieldset", Ve(w ?? "rounded")].filter(Boolean).join(" "), de = R(), te = rn(0, 4, v, 1);
2082
+ de.set("borderWidth", `${te}px`), de.border(N ?? "onSurfaceVariant"), he = /* @__PURE__ */ r("fieldset", { className: K, style: de.get(), children: fe });
2083
+ }
2084
+ const He = R();
2085
+ He.set("--uui-label-up-x", `${we}px`), X === "classic" && He.border(N ?? "outline"), X === "filled" && He.border(N ?? "onSurfaceVariant");
2086
+ const Me = ["uui-field-state"].filter(Boolean).join(" "), M = R(), O = R();
2087
+ h ? O.text("error") : T ? O.text(T) : O.text.on("surfaceVariant");
2088
+ const Pe = [
2089
+ xe(_ ?? "bodySmall"),
2090
+ h && "uui-error uui-support-text",
2091
+ B && !h && "uui-description uui-support-text"
2092
+ ].filter(Boolean).join(" "), z = (B ?? h) && /* @__PURE__ */ r("div", { className: Pe, style: O.get(), children: h ?? B }), nt = "uui-field-input", Ue = R();
2093
+ Ue.text("onSurface"), !J && Y && ie && Ue.set("opacity", 0);
2094
+ const We = ["uui-field-input-wrapper"].filter(Boolean).join(" "), Ye = Le.filter(Boolean).join(" "), Xe = ge.filter(Boolean).join(" ");
2095
+ return /* @__PURE__ */ $("div", { className: Ye, title: F, children: [
2096
+ Fe,
2097
+ /* @__PURE__ */ $("div", { className: Xe, onPointerDown: ue, ref: ke, style: He.get(), children: [
2098
+ Ce,
2099
+ /* @__PURE__ */ $("div", { className: We, children: [
2100
+ Ne,
2101
+ Y,
2102
+ /* @__PURE__ */ r(
2103
+ "input",
2104
+ {
2105
+ ...Se,
2106
+ ...De,
2107
+ ...Z ? { value: P } : { defaultValue: pe },
2108
+ "aria-invalid": !!h,
2109
+ autoComplete: "email",
2110
+ className: nt,
2111
+ disabled: d,
2112
+ id: se,
2113
+ name: D,
2114
+ onChange: oe,
2115
+ placeholder: S,
2116
+ ref: ht(t, ae),
2117
+ style: Ue.get(),
2118
+ type: E
2119
+ }
2120
+ )
2121
+ ] }),
2122
+ Re,
2123
+ X === "filled" && /* @__PURE__ */ r("div", { className: Me, style: M.get() }),
2124
+ he
2125
+ ] }),
2126
+ z
2127
+ ] });
2128
+ });
2129
+ tt.displayName = "FieldBase";
2130
+ const ut = I((e, t) => {
2131
+ const {
2132
+ component: n,
2133
+ font: o,
2134
+ color: i,
2135
+ elevation: l,
2136
+ shape: a,
2137
+ border: s,
2138
+ borderColor: u,
2139
+ elementClass: p,
2140
+ children: f,
2141
+ className: c,
2142
+ style: d,
2143
+ ...m
2144
+ } = e, g = n ?? "span", C = R(d);
2145
+ C.border(u), C.bg(i), C.text.on(i);
2146
+ const x = Oe(
2147
+ "uui-inline",
2148
+ p,
2149
+ ...o ? [xe(o)] : [],
2150
+ ...a ? [Ve(a)] : [],
2151
+ ...l !== void 0 ? [at(l)] : [],
2152
+ ...s !== void 0 ? [et(s)] : [],
2153
+ c
2154
+ );
2155
+ return /* @__PURE__ */ r(g, { className: x, ref: t, style: C.get(), ...m, children: f });
2156
+ });
2157
+ ut.displayName = "TextBase";
2158
+ const Wn = I(
2159
+ ({ font: e, size: t = "small", ...n }, o) => /* @__PURE__ */ r(Ft, { font: e ?? {
2160
+ extraSmall: "labelLarge",
2161
+ small: "labelLarge",
2162
+ medium: "titleMedium",
2163
+ large: "headlineSmall",
2164
+ extraLarge: "headlineLarge"
2165
+ }[t], ref: o, size: t, ...n, elementClass: "uui-button" })
2166
+ );
2167
+ Wn.displayName = "Button";
2168
+ const Ko = I(
2169
+ ({
2170
+ font: e,
2171
+ size: t = "small",
2172
+ shape: n = "smooth",
2173
+ selectedShape: o = "smooth",
2174
+ borderColor: i = "outlineVariant",
2175
+ ...l
2176
+ }, a) => /* @__PURE__ */ r(
2177
+ Ft,
2178
+ {
2179
+ borderColor: i,
2180
+ font: e ?? {
2181
+ extraSmall: "labelLarge",
2182
+ small: "labelLarge",
2183
+ medium: "titleMedium",
2184
+ large: "headlineSmall",
2185
+ extraLarge: "headlineLarge"
2186
+ }[t],
2187
+ ref: a,
2188
+ selectedShape: o,
2189
+ ...l,
2190
+ elementClass: "uui-chip",
2191
+ shape: n,
2192
+ size: t
2193
+ }
2194
+ )
2195
+ );
2196
+ Ko.displayName = "Chip";
2197
+ const dn = (e) => {
2198
+ const {
2199
+ children: t,
2200
+ className: n,
2201
+ border: o,
2202
+ borderColor: i,
2203
+ color: l = "error",
2204
+ align: a = "topRight",
2205
+ shape: s = "round",
2206
+ size: u = "medium",
2207
+ elevation: p,
2208
+ ariaLabel: f,
2209
+ value: c,
2210
+ font: d,
2211
+ offset: m,
2212
+ ...g
2213
+ } = e, C = "uui-badge", x = d ?? (u === "extraLarge" || u === "large" ? "labelMedium" : "labelSmall"), b = [
2214
+ "uui-badge-control",
2215
+ n,
2216
+ Ve(s),
2217
+ gt(u),
2218
+ xe(x)
2219
+ ], v = ["uui-badge-slot", Lo(a)].filter(Boolean).join(" "), N = R();
2220
+ N.bg(l), N.text.on(l), m !== void 0 && N.set("--uui-badge-offset", `${m}px`), p !== void 0 && b.push(at(p)), o !== void 0 && (b.push(et(o)), N.border(Ht(i)));
2221
+ const w = b.filter(Boolean).join(" "), L = /* @__PURE__ */ r("span", { "aria-label": f, className: w, style: N.get(), children: u !== "small" && u !== "extraSmall" && c });
2222
+ return t ? /* @__PURE__ */ $("span", { className: C, ...g, children: [
2223
+ t,
2224
+ /* @__PURE__ */ r("span", { className: v, children: L })
2225
+ ] }) : L;
2226
+ };
2227
+ dn.displayName = "Badge";
2228
+ const qo = I(
2229
+ ({
2230
+ children: e,
2231
+ className: t = "",
2232
+ color: n = "error",
2233
+ position: o = "topRight",
2234
+ shape: i = "round",
2235
+ size: l = "medium",
2236
+ value: a,
2237
+ ...s
2238
+ }, u) => /* @__PURE__ */ r("span", { className: ["uui-card-wrapper"].join(" "), ref: u, ...s, children: e })
2239
+ );
2240
+ qo.displayName = "Card";
2241
+ const Zo = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "3 3 18 18", children: /* @__PURE__ */ r("path", { d: "M10 16.4L6 12.4L7.4 11L10 13.6L16.6 7L18 8.4L10 16.4Z", fill: "currentColor" }) }), Go = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "3 3 18 18", children: /* @__PURE__ */ r("path", { d: "M6 13V11H18V13H6Z", fill: "currentColor" }) }), Yo = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "2 2 20 20", children: /* @__PURE__ */ r(
2242
+ "path",
2243
+ {
2244
+ d: "M12 17C13.3833 17 14.5625 16.5125 15.5375 15.5375C16.5125 14.5625 17 13.3833 17 12C17 10.6167 16.5125 9.4375 15.5375 8.4625C14.5625 7.4875 13.3833 7 12 7C10.6167 7 9.4375 7.4875 8.4625 8.4625C7.4875 9.4375 7 10.6167 7 12C7 13.3833 7.4875 14.5625 8.4625 15.5375C9.4375 16.5125 10.6167 17 12 17Z",
2245
+ fill: "currentColor"
2246
+ }
2247
+ ) }), Un = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "0 0 24 24", children: /* @__PURE__ */ r("path", { d: "M10 17V7L15 12L10 17Z", fill: "currentColor" }) }), Xo = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "0 0 24 24", children: /* @__PURE__ */ r(
2248
+ "path",
2249
+ {
2250
+ d: "M9.5501 18L3.8501 12.3L5.2751 10.875L9.5501 15.15L18.7251 5.97498L20.1501 7.39998L9.5501 18Z",
2251
+ fill: "currentColor"
2252
+ }
2253
+ ) }), zn = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "0 0 24 24", children: /* @__PURE__ */ r(
2254
+ "path",
2255
+ {
2256
+ d: "M12 17C13.3833 17 14.5625 16.5125 15.5375 15.5375C16.5125 14.5625 17 13.3833 17 12C17 10.6167 16.5125 9.4375 15.5375 8.4625C14.5625 7.4875 13.3833 7 12 7C10.6167 7 9.4375 7.4875 8.4625 8.4625C7.4875 9.4375 7 10.6167 7 12C7 13.3833 7.4875 14.5625 8.4625 15.5375C9.4375 16.5125 10.6167 17 12 17ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",
2257
+ fill: "currentColor"
2258
+ }
2259
+ ) }), Kn = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "0 0 24 24", children: /* @__PURE__ */ r(
2260
+ "path",
2261
+ {
2262
+ d: "M12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",
2263
+ fill: "currentColor"
2264
+ }
2265
+ ) }), Jo = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "0 0 24 24", children: /* @__PURE__ */ r(
2266
+ "path",
2267
+ {
2268
+ d: "M9.5501 18L3.8501 12.3L5.2751 10.875L9.5501 15.15L18.7251 5.97498L20.1501 7.39998L9.5501 18Z",
2269
+ fill: "currentColor"
2270
+ }
2271
+ ) }), Qo = /* @__PURE__ */ r("svg", { fill: "none", viewBox: "0 0 24 24", children: /* @__PURE__ */ r(
2272
+ "path",
2273
+ {
2274
+ d: "M12 15.0833L7 10.0833L8.16667 8.91663L12 12.7499L15.8333 8.91663L17 10.0833L12 15.0833Z",
2275
+ fill: "currentColor"
2276
+ }
2277
+ ) }), er = /* @__PURE__ */ r("svg", { viewBox: "0 0 24 24", children: /* @__PURE__ */ r(
2278
+ "path",
2279
+ {
2280
+ d: "M8.85 16.825L12 14.925L15.15 16.85L14.325 13.25L17.1 10.85L13.45 10.525L12 7.125L10.55 10.5L6.9 10.825L9.675 13.25L8.85 16.825ZM5.825 21L7.45 13.975L2 9.25L9.2 8.625L12 2L14.8 8.625L22 9.25L16.55 13.975L18.175 21L12 17.275L5.825 21Z",
2281
+ fill: "currentColor"
2282
+ }
2283
+ ) }), tr = /* @__PURE__ */ r("svg", { viewBox: "0 0 24 24", children: /* @__PURE__ */ r(
2284
+ "path",
2285
+ {
2286
+ d: "M5.825 21L7.45 13.975L2 9.25L9.2 8.625L12 2L14.8 8.625L22 9.25L16.55 13.975L18.175 21L12 17.275L5.825 21Z",
2287
+ fill: "currentColor"
2288
+ }
2289
+ ) }), nr = I(
2290
+ ({
2291
+ shape: e = "smooth",
2292
+ border: t,
2293
+ uncheckedBorder: n,
2294
+ color: o,
2295
+ borderColor: i,
2296
+ animation: l,
2297
+ uncheckedBorderColor: a,
2298
+ uncheckedIcon: s,
2299
+ indeterminateIcon: u,
2300
+ indeterminate: p,
2301
+ icon: f,
2302
+ size: c = "small",
2303
+ filled: d = !0,
2304
+ ...m
2305
+ }, g) => {
2306
+ const C = o ?? "primary", x = !f && t === void 0 ? void 0 : t;
2307
+ let b;
2308
+ return p ? b = t : b = !s && n === void 0 ? t ?? 2 : n, /* @__PURE__ */ r(
2309
+ un,
2310
+ {
2311
+ animation: l ?? "scale",
2312
+ border: x,
2313
+ borderColor: i ?? C,
2314
+ color: C,
2315
+ elementClass: "uui-checkbox",
2316
+ filled: d,
2317
+ icon: f ?? Zo,
2318
+ indeterminate: p,
2319
+ indeterminateIcon: u ?? Go,
2320
+ ref: g,
2321
+ shape: e,
2322
+ size: c,
2323
+ type: "checkbox",
2324
+ uncheckedBorder: b,
2325
+ uncheckedBorderColor: a ?? i ?? "onSurfaceVariant",
2326
+ uncheckedIcon: s,
2327
+ ...m
2328
+ }
2329
+ );
2330
+ }
2331
+ );
2332
+ nr.displayName = "Checkbox";
2333
+ const or = I(
2334
+ (e, t) => /* @__PURE__ */ r(tt, { ref: t, ...e, elementClass: "uui-text-field" })
2335
+ );
2336
+ or.displayName = "TextField";
2337
+ const rr = I(
2338
+ (e, t) => /* @__PURE__ */ r(
2339
+ tt,
2340
+ {
2341
+ ref: t,
2342
+ ...e,
2343
+ elementClass: "uui-number-field",
2344
+ type: "number"
2345
+ }
2346
+ )
2347
+ );
2348
+ rr.displayName = "NumberField";
2349
+ const ir = I(
2350
+ (e, t) => /* @__PURE__ */ r(
2351
+ tt,
2352
+ {
2353
+ ref: t,
2354
+ ...e,
2355
+ elementClass: "uui-email-field",
2356
+ type: "email"
2357
+ }
2358
+ )
2359
+ );
2360
+ ir.displayName = "EmailField";
2361
+ const sr = I(
2362
+ (e, t) => /* @__PURE__ */ r(
2363
+ tt,
2364
+ {
2365
+ ref: t,
2366
+ ...e,
2367
+ elementClass: "uui-phone-field",
2368
+ type: "tel"
2369
+ }
2370
+ )
2371
+ );
2372
+ sr.displayName = "PhoneField";
2373
+ const lr = I(
2374
+ (e, t) => /* @__PURE__ */ r(
2375
+ tt,
2376
+ {
2377
+ ref: t,
2378
+ ...e,
2379
+ type: "password",
2380
+ elementClass: "uui-password-field"
2381
+ }
2382
+ )
2383
+ );
2384
+ lr.displayName = "PasswordField";
2385
+ const ar = I(
2386
+ (e, t) => /* @__PURE__ */ r(
2387
+ tt,
2388
+ {
2389
+ ref: t,
2390
+ ...e,
2391
+ elementClass: "uui-date-field",
2392
+ type: "date"
2393
+ }
2394
+ )
2395
+ );
2396
+ ar.displayName = "DateField";
2397
+ const cr = I(
2398
+ (e, t) => /* @__PURE__ */ r(
2399
+ tt,
2400
+ {
2401
+ ref: t,
2402
+ ...e,
2403
+ elementClass: "uui-datetime-field",
2404
+ type: "datetime-local"
2405
+ }
2406
+ )
2407
+ );
2408
+ cr.displayName = "DateTimeField";
2409
+ const ur = I(
2410
+ (e, t) => /* @__PURE__ */ r(
2411
+ tt,
2412
+ {
2413
+ ref: t,
2414
+ ...e,
2415
+ elementClass: "uui-time-field",
2416
+ type: "time"
2417
+ }
2418
+ )
2419
+ );
2420
+ ur.displayName = "TimeField";
2421
+ const dr = I(
2422
+ (e, t) => /* @__PURE__ */ r(
2423
+ tt,
2424
+ {
2425
+ ref: t,
2426
+ ...e,
2427
+ type: "month",
2428
+ elementClass: "uui-month-field"
2429
+ }
2430
+ )
2431
+ );
2432
+ dr.displayName = "MonthField";
2433
+ const fr = I(
2434
+ (e, t) => /* @__PURE__ */ r(
2435
+ tt,
2436
+ {
2437
+ ref: t,
2438
+ ...e,
2439
+ type: "week",
2440
+ elementClass: "uui-week-field"
2441
+ }
2442
+ )
2443
+ );
2444
+ fr.displayName = "WeekField";
2445
+ const pr = I(
2446
+ (e, t) => /* @__PURE__ */ r(tt, { ref: t, ...e, elementClass: "uui-url-field", type: "url" })
2447
+ );
2448
+ pr.displayName = "UrlField";
2449
+ const mr = I(
2450
+ ({ elevation: e = 3, font: t, size: n = "medium", shape: o = "rounded", label: i, ...l }, a) => /* @__PURE__ */ r(
2451
+ Ft,
2452
+ {
2453
+ ref: a,
2454
+ ...l,
2455
+ elementClass: i ? "uui-fab uui-fab-extended" : "uui-fab",
2456
+ elevation: e,
2457
+ font: t ?? {
2458
+ extraSmall: "labelLarge",
2459
+ small: "titleMedium",
2460
+ medium: "titleMedium",
2461
+ large: "headlineSmall",
2462
+ extraLarge: "headlineLarge"
2463
+ }[n],
2464
+ label: i,
2465
+ shape: o,
2466
+ size: n
2467
+ }
2468
+ )
2469
+ );
2470
+ mr.displayName = "Fab";
2471
+ const qn = I(
2472
+ ({
2473
+ "aria-label": e,
2474
+ endIcon: t,
2475
+ trailing: n,
2476
+ loading: o,
2477
+ size: i = "small",
2478
+ shape: l = "round",
2479
+ label: a,
2480
+ title: s,
2481
+ children: u,
2482
+ ...p
2483
+ }, f) => /* @__PURE__ */ r(
2484
+ Ft,
2485
+ {
2486
+ ref: f,
2487
+ ...p,
2488
+ "aria-label": e ?? a,
2489
+ elementClass: "uui-icon-button",
2490
+ loading: o,
2491
+ shape: l,
2492
+ size: i,
2493
+ title: s,
2494
+ children: !o && u
2495
+ }
2496
+ )
2497
+ );
2498
+ qn.displayName = "IconButton";
2499
+ const gr = I(
2500
+ ({
2501
+ selected: e = !1,
2502
+ shape: t = "rounded",
2503
+ size: n = "medium",
2504
+ ...o
2505
+ }, i) => /* @__PURE__ */ r(
2506
+ Ft,
2507
+ {
2508
+ ref: i,
2509
+ ...o,
2510
+ "aria-pressed": e,
2511
+ elementClass: `uui-toggle-button${e ? " uui-selected" : ""}`,
2512
+ filled: e,
2513
+ shape: t,
2514
+ size: n
2515
+ }
2516
+ )
2517
+ );
2518
+ gr.displayName = "ToggleButton";
2519
+ const Zn = Symbol.for("uui.menu");
2520
+ function Nt(e) {
2521
+ return mt(e) && typeof e.type != "string" && !!e.type[Zn];
2522
+ }
2523
+ const fn = Symbol.for("uui.menuitem");
2524
+ function Gt(e) {
2525
+ return mt(e) && typeof e.type != "string" && !!e.type[fn];
2526
+ }
2527
+ const Gn = Symbol.for("uui.divider");
2528
+ function Yt(e) {
2529
+ return mt(e) && typeof e.type != "string" && !!e.type[Gn];
2530
+ }
2531
+ const hr = (e) => e === "none" ? "none" : e === "auto" ? "scale" : e, pn = I(
2532
+ ({
2533
+ anchorRef: e,
2534
+ open: t = !1,
2535
+ horizontal: n = !1,
2536
+ placement: o = "auto",
2537
+ floatingMode: i,
2538
+ offset: l = 4,
2539
+ color: a,
2540
+ elevation: s,
2541
+ dockedElevation: u,
2542
+ shape: p,
2543
+ border: f,
2544
+ borderColor: c,
2545
+ className: d,
2546
+ children: m,
2547
+ style: g,
2548
+ id: C,
2549
+ onClose: x,
2550
+ variant: b = "classic",
2551
+ animation: v = "scale",
2552
+ duration: N,
2553
+ motionStyle: w = "regular",
2554
+ fixedLeading: L,
2555
+ density: F,
2556
+ __level: B,
2557
+ __groupId: T,
2558
+ __closeRootMenu: _,
2559
+ __navigateHorizontal: D,
2560
+ __horizontalDepth: h,
2561
+ docked: k,
2562
+ textColor: S,
2563
+ descriptionColor: E,
2564
+ labelColor: A,
2565
+ shortcutColor: U,
2566
+ uncheckedIcon: j,
2567
+ checkedIcon: re,
2568
+ radioUncheckedIcon: ee,
2569
+ radioCheckedIcon: P,
2570
+ selectedColor: be,
2571
+ itemTouchEffects: pe,
2572
+ itemSelectedEffects: De,
2573
+ itemFocusEffects: ne,
2574
+ closeOnChange: $e = !1,
2575
+ openOnHover: Z = !0,
2576
+ labelFont: G,
2577
+ font: ie,
2578
+ descriptionFont: ae,
2579
+ shortcutFont: ke,
2580
+ onFocus: se,
2581
+ onBlur: we,
2582
+ ...Ae
2583
+ }, me) => {
2584
+ var xn;
2585
+ const X = W("closed"), [J, Se] = q(-1), [oe, ue] = q(-1), { focusVisible: Le, isFocused: Ce, focusHandlers: Q } = St(se, we), Re = B ?? 0, je = W(C ?? vt("menu")).current, Te = T ?? je, ge = W(vt("uui-menu-surface")).current, Y = W(null), Ne = W(null), [fe, Fe] = q(null), ve = J === -1, [le, he] = q(!1), [He, Me] = q(!1), [M, O] = q("normal"), [Pe, z] = q(!1), [nt, Ue] = q(-1), We = a ?? (b === "modern" ? "surfaceContainerLow" : "surfaceContainer"), Ye = (k ? u : void 0) ?? s ?? (b === "modern" ? 3 : 2), [Xe, K] = q(!1), de = v !== "none" ? N ?? 220 : 0, te = k ? 0 : de, _e = W(null), Ge = W(null), It = W(!1), ze = J !== -1;
2586
+ function Bt(y) {
2587
+ return Gt(y) || Yt(y);
2588
+ }
2589
+ const Ke = rt.Children.toArray(m).filter(Bt), ce = Ke.reduce((y, V, H) => (Gt(V) && (V.props.disabled || y.push(H)), y), []);
2590
+ function dt() {
2591
+ ze && (K(!0), Se(-1));
2592
+ }
2593
+ function Dt() {
2594
+ x == null || x(), !x && ze && (dt(), ue(-1)), Re === 0 && (e != null && e.current) && e.current.focus();
2595
+ }
2596
+ function Je() {
2597
+ _ ? _() : Dt();
2598
+ }
2599
+ function Ct(y) {
2600
+ return !Y.current || y === -1 ? null : Y.current.querySelector(`[data-menu-index="${String(y)}"]`);
2601
+ }
2602
+ function yt(y) {
2603
+ return `${ge}-i${y}`;
2604
+ }
2605
+ function Vt(y) {
2606
+ const H = rt.Children.toArray(Ke[y].props.children).find((lt) => Nt(lt));
2607
+ return mt(H) ? rt.Children.toArray(H.props.children).filter((lt) => Yt(lt) || Bt(lt)) : void 0;
2608
+ }
2609
+ function st(y) {
2610
+ if (y === -1 || ce.indexOf(y) === -1)
2611
+ return;
2612
+ if (ze) {
2613
+ Ue(y), dt();
2614
+ return;
2615
+ }
2616
+ const H = Vt(y);
2617
+ if (!H || H.length === 0)
2618
+ return;
2619
+ const Ee = Ct(y);
2620
+ Ee && (Ne.current = Ee, K(!0), Se(y), setTimeout(() => {
2621
+ K(!1);
2622
+ }, de));
2623
+ }
2624
+ function ot(y) {
2625
+ return y < 0 ? !1 : rt.Children.toArray(Ke[y].props.children).some((H) => Nt(H));
2626
+ }
2627
+ function bt(y) {
2628
+ if (oe === -1)
2629
+ return;
2630
+ const V = ce.indexOf(oe);
2631
+ if (V === -1)
2632
+ return;
2633
+ let H;
2634
+ y ? H = ce[V + 1 < ce.length ? V + 1 : 0] : H = V > 0 ? ce[V - 1] : ce[ce.length - 1], H !== oe && (ue(H), ot(H) ? st(H) : dt());
2635
+ }
2636
+ ye(() => {
2637
+ const y = It.current, V = ze;
2638
+ if (y && !V) {
2639
+ const H = window.setTimeout(() => {
2640
+ z(!0);
2641
+ }, de * 0.67);
2642
+ return It.current = V, () => {
2643
+ window.clearTimeout(H);
2644
+ };
2645
+ }
2646
+ It.current = V;
2647
+ }, [de, ze]), ye(() => {
2648
+ var y;
2649
+ !ze && Pe && (z(!1), Se(-1), nt !== -1 ? (Ue(-1), st(nt)) : (y = Y.current) == null || y.focus(), K(!1));
2650
+ }, [Pe, nt, ze]), ye(() => {
2651
+ t ? (X.current = "opening", K(!0), O("normal"), he(!0), Se(-1), Me(!1), ue(-1)) : (X.current = "closing", K(!0), Me(!1), O("reverse"));
2652
+ }, [t]), ye(() => {
2653
+ if (!t || !le || !Y.current)
2654
+ return;
2655
+ const y = () => {
2656
+ const V = i ?? (n ? "dropdown" : "menu");
2657
+ if (e != null && e.current) {
2658
+ const H = Mn(e, Y, {
2659
+ placement: o,
2660
+ mode: V,
2661
+ offset: l
2662
+ });
2663
+ H && Fe({ x: H.x, y: H.y });
2664
+ }
2665
+ };
2666
+ return k ? Fe({ x: 0, y: 0 }) : (window.addEventListener("resize", y), y()), Me(!0), () => {
2667
+ k || window.removeEventListener("resize", y);
2668
+ };
2669
+ }, [e, k, i, n, l, t, o, le]), ye(() => {
2670
+ t && le && fe && setTimeout(() => {
2671
+ var y;
2672
+ X.current === "opening" && (K(!1), X.current = "opened", k || (y = Y.current) == null || y.focus(), ue(Le ? ce[0] ?? -1 : -1));
2673
+ }, te);
2674
+ }, [t, fe, le]), ye(() => {
2675
+ M === "reverse" && X.current === "closing" && (Me(!0), ue(-1), setTimeout(() => {
2676
+ X.current === "closing" && (X.current = "closed", he(!1), Fe(null), K(!1));
2677
+ }, de * 0.67));
2678
+ }, [de, M]), ye(() => {
2679
+ if (oe < 0 || X.current !== "opened")
2680
+ return;
2681
+ const y = Ct(oe);
2682
+ y && y.scrollIntoView({
2683
+ block: "nearest",
2684
+ inline: "nearest"
2685
+ });
2686
+ }, [oe]), ye(() => {
2687
+ Ce && Le && oe === -1 && X.current === "opened" && ce.length > 0 && ue(ce[0]);
2688
+ }, [oe, Le, Ce]), To(
2689
+ t && Re === 0,
2690
+ `[data-menu-group="${Te}"]`,
2691
+ () => {
2692
+ Je();
2693
+ },
2694
+ e
2695
+ );
2696
+ function $t(y) {
2697
+ var H, Ee, lt, wn;
2698
+ const V = y;
2699
+ V !== -1 && (Ke[V].props.disabled || (ue(V), ot(V) ? ze && V === J ? dt() : st(V) : Ke[V].props.type === "radio" || Ke[V].props.type === "checkbox" || Ke[V].props.type === "option" ? ((Ee = (H = Ke[V].props).onChange) == null || Ee.call(H), $e && Je()) : ((wn = (lt = Ke[V].props).onClick) == null || wn.call(lt), Je())));
2700
+ }
2701
+ function Kt(y, V) {
2702
+ if (Xe) {
2703
+ y == null || y.preventDefault();
2704
+ return;
2705
+ }
2706
+ $t(V);
2707
+ }
2708
+ function qe(y, V) {
2709
+ if (!(!Z || Le && Ce)) {
2710
+ if (Ge.current && (clearTimeout(Ge.current), Ge.current = null), _e.current && (clearTimeout(_e.current), _e.current = null), !ot(V)) {
2711
+ ze && (Ge.current = window.setTimeout(() => {
2712
+ dt();
2713
+ }, 150));
2714
+ return;
2715
+ }
2716
+ ze && J === V || (_e.current = window.setTimeout(() => {
2717
+ ue(V), st(V);
2718
+ }, 150));
2719
+ }
2720
+ }
2721
+ function At() {
2722
+ Ge.current && (clearTimeout(Ge.current), Ge.current = null), _e.current && (clearTimeout(_e.current), _e.current = null);
2723
+ }
2724
+ const lo = Ke.some(
2725
+ (y) => y.props.icon !== void 0 || y.props.leading !== void 0 || y.props.type === "radio" || y.props.type === "checkbox"
2726
+ ), ao = Ke.map((y, V) => {
2727
+ if (Gt(y)) {
2728
+ const H = {
2729
+ "data-menu-index": V,
2730
+ __interactionsDisabled: Xe,
2731
+ __index: V,
2732
+ id: y.props.id ?? yt(V),
2733
+ disabled: y.props.disabled,
2734
+ active: V === oe && Ce,
2735
+ focusVisible: Le && Ce,
2736
+ horizontal: n,
2737
+ expanded: ze && J === V,
2738
+ fixedLeading: y.props.fixedLeading ?? (L && lo),
2739
+ variant: y.props.variant ?? b,
2740
+ shape: y.props.shape ?? p,
2741
+ color: y.props.color ?? a,
2742
+ density: y.props.density ?? F,
2743
+ shortcutColor: y.props.shortcutColor ?? U,
2744
+ textColor: y.props.textColor ?? S,
2745
+ labelColor: y.props.labelColor ?? A,
2746
+ descriptionColor: y.props.descriptionColor ?? E,
2747
+ checkedIcon: y.props.checkedIcon ?? (y.props.type === "checkbox" ? re : P),
2748
+ uncheckedIcon: y.props.uncheckedIcon ?? (y.props.type === "checkbox" ? j : ee),
2749
+ selectedColor: y.props.selectedColor ?? be,
2750
+ touchEffects: y.props.touchEffects ?? pe,
2751
+ selectedEffects: y.props.selectedEffects ?? De,
2752
+ focusEffects: y.props.focusEffects ?? ne,
2753
+ labelFont: y.props.labelFont ?? G,
2754
+ font: y.props.font ?? ie,
2755
+ descriptionFont: y.props.descriptionFont ?? ae,
2756
+ shortcutFont: y.props.shortcutFont ?? ke,
2757
+ onClick: (Ee) => {
2758
+ Kt(Ee, V);
2759
+ },
2760
+ onMouseEnter: (Ee) => {
2761
+ qe(Ee, V);
2762
+ },
2763
+ onMouseLeave: (Ee) => {
2764
+ At();
2765
+ }
2766
+ };
2767
+ return Tt(y, {
2768
+ ...y.props,
2769
+ ...H
2770
+ });
2771
+ } else if (Yt(y)) {
2772
+ const H = Xt[We] === "onSurface" ? "outlineVariant" : Xt[We], Ee = {
2773
+ borderColor: y.props.borderColor ?? y.props.color ?? H ?? "outlineVariant",
2774
+ vertical: n,
2775
+ insetSize: y.props.insetSize ?? 8,
2776
+ spacing: y.props.spacing ?? (b === "modern" ? 5 : 8),
2777
+ inset: y.props.inset ?? (b === "modern" ? "middle" : void 0)
2778
+ };
2779
+ return Tt(y, { ...y.props, ...Ee });
2780
+ }
2781
+ return Tt(y, {
2782
+ ...y.props
2783
+ });
2784
+ });
2785
+ function co(y) {
2786
+ y.target.closest("[data-menu-index]") || ze && dt();
2787
+ }
2788
+ const uo = (y) => {
2789
+ if (!t || Xe)
2790
+ return;
2791
+ let V = y.key;
2792
+ if (n) {
2793
+ const lt = {
2794
+ ArrowDown: "ArrowRight",
2795
+ ArrowUp: "ArrowLeft",
2796
+ ArrowRight: "ArrowDown",
2797
+ ArrowLeft: "ArrowUp"
2798
+ };
2799
+ V = lt[V] ? lt[V] : V;
2800
+ }
2801
+ if (ce.length === 0 && V !== "Tab")
2802
+ return;
2803
+ const H = ce.indexOf(oe);
2804
+ let Ee;
2805
+ switch (V) {
2806
+ case "ArrowUp":
2807
+ y.preventDefault(), oe === -1 || H === -1 ? Ee = ce[ce.length - 1] : Ee = H > 0 ? ce[H - 1] : ce[ce.length - 1], ue(Ee), n && ot(Ee) && st(Ee);
2808
+ break;
2809
+ case "ArrowDown":
2810
+ y.preventDefault(), oe === -1 || H === -1 ? Ee = ce[0] : Ee = ce[H + 1 < ce.length ? H + 1 : 0], ue(Ee), n && ot(Ee) && st(Ee);
2811
+ break;
2812
+ case "Home":
2813
+ ue(ce[0]);
2814
+ break;
2815
+ case "End":
2816
+ ue(ce[ce.length - 1]);
2817
+ break;
2818
+ case "Enter":
2819
+ case " ":
2820
+ y.stopPropagation(), y.preventDefault(), H >= 0 && $t(ce[H]);
2821
+ break;
2822
+ case "ArrowRight":
2823
+ y.preventDefault(), H >= 0 && ot(ce[H]) ? st(ce[H]) : D && D(!0);
2824
+ break;
2825
+ case "ArrowLeft":
2826
+ y.preventDefault(), D && h === 1 ? D(!1) : Dt();
2827
+ break;
2828
+ case "Escape":
2829
+ y.preventDefault(), Dt();
2830
+ break;
2831
+ case "Tab":
2832
+ k || (y.stopPropagation(), y.preventDefault()), Je();
2833
+ break;
2834
+ }
2835
+ };
2836
+ if (!t && !le || !e && !k)
2837
+ return null;
2838
+ const fo = {
2839
+ "--uui-reverse": M,
2840
+ "--uui-duration": M === "reverse" ? String(te * 0.67) + "ms" : String(te) + "ms"
2841
+ }, yn = hr(v), po = yn === "none" ? "" : tn[yn], mo = w === "expressive" ? "uui-motion-expressive" : "", jt = R({ ...g, ...fo });
2842
+ jt.bg(We), jt.text.on(We), f && +f > 0 && jt.border(Ht(c));
2843
+ const go = [
2844
+ "uui-menu",
2845
+ `uui-menu-level-${String(Re)}`,
2846
+ n && "uui-menu-horizontal",
2847
+ ve && "uui-menu-active",
2848
+ b === "modern" ? "uui-menu-modern" : "uui-menu-classic",
2849
+ He && po,
2850
+ mo,
2851
+ ct(F),
2852
+ Ve(p ?? (b === "modern" ? "rounded" : "smooth")),
2853
+ at(Ye),
2854
+ f !== void 0 ? et(f) : null,
2855
+ d
2856
+ ].filter(Boolean).join(" "), ho = Ce && oe >= 0 && t && le ? ((xn = Ke[oe]) == null ? void 0 : xn.props).id ?? yt(oe) : void 0, bn = /* @__PURE__ */ r(
2857
+ "div",
2858
+ {
2859
+ ...Q,
2860
+ "aria-orientation": n ? "horizontal" : "vertical",
2861
+ className: go,
2862
+ "data-menu-group": Te,
2863
+ id: C,
2864
+ onClick: co,
2865
+ onKeyDown: uo,
2866
+ ref: ht(me, Y),
2867
+ role: "menu",
2868
+ style: {
2869
+ position: k ? "relative" : "fixed",
2870
+ left: (fe == null ? void 0 : fe.x) ?? 0,
2871
+ top: (fe == null ? void 0 : fe.y) ?? 0,
2872
+ zIndex: 9999,
2873
+ visibility: fe ? "visible" : "hidden",
2874
+ ...jt.get()
2875
+ },
2876
+ tabIndex: 0,
2877
+ ...Ae,
2878
+ "aria-activedescendant": ho,
2879
+ children: /* @__PURE__ */ r("div", { className: "uui-menu-scroll", children: ao })
2880
+ }
2881
+ ), yo = document.getElementById("menu-root") ?? document.body;
2882
+ let vn = null;
2883
+ if (J !== -1) {
2884
+ const y = Vt(J);
2885
+ y && y.length > 0 && (vn = y);
2886
+ }
2887
+ const Cn = en(
2888
+ /* @__PURE__ */ $(it, { children: [
2889
+ !k && bn,
2890
+ Ne.current && J !== -1 && /* @__PURE__ */ r(
2891
+ pn,
2892
+ {
2893
+ __closeRootMenu: _ ?? Je,
2894
+ __groupId: Te,
2895
+ __horizontalDepth: n ? 1 : h && h + 1,
2896
+ __level: Re + 1,
2897
+ __navigateHorizontal: n ? bt : D,
2898
+ anchorRef: Ne,
2899
+ animation: v,
2900
+ "aria-orientation": "vertical",
2901
+ border: f,
2902
+ borderColor: c,
2903
+ checkedIcon: re,
2904
+ closeOnChange: $e,
2905
+ color: We,
2906
+ density: F,
2907
+ descriptionColor: E,
2908
+ descriptionFont: ae,
2909
+ duration: N,
2910
+ elevation: s,
2911
+ fixedLeading: L,
2912
+ floatingMode: n ? "menu" : "submenu",
2913
+ font: ie,
2914
+ itemFocusEffects: ne,
2915
+ itemSelectedEffects: De,
2916
+ itemTouchEffects: pe,
2917
+ labelColor: A,
2918
+ labelFont: G,
2919
+ motionStyle: w,
2920
+ offset: 0,
2921
+ onClose: dt,
2922
+ open: t && ze,
2923
+ openOnHover: Z,
2924
+ placement: "auto",
2925
+ radioCheckedIcon: P,
2926
+ radioUncheckedIcon: ee,
2927
+ role: "menu",
2928
+ selectedColor: be,
2929
+ shape: p,
2930
+ shortcutColor: U,
2931
+ shortcutFont: ke,
2932
+ textColor: S,
2933
+ uncheckedIcon: j,
2934
+ variant: b,
2935
+ children: vn
2936
+ }
2937
+ )
2938
+ ] }),
2939
+ yo
2940
+ );
2941
+ return k && Re === 0 ? /* @__PURE__ */ $(it, { children: [
2942
+ bn,
2943
+ Cn
2944
+ ] }) : Cn;
2945
+ }
2946
+ );
2947
+ pn[Zn] = !0;
2948
+ pn.displayName = "Menu";
2949
+ const Yn = I(
2950
+ ({
2951
+ shape: e,
2952
+ touchEffects: t = ["ripple"],
2953
+ focusEffects: n = ["ring", "overlay"],
2954
+ selectedEffects: o = ["color"],
2955
+ checkedIcon: i,
2956
+ uncheckedIcon: l,
2957
+ selectedColor: a,
2958
+ textColor: s,
2959
+ labelColor: u,
2960
+ descriptionColor: p,
2961
+ shortcutColor: f,
2962
+ fixedLeading: c,
2963
+ color: d,
2964
+ icon: m,
2965
+ endIcon: g,
2966
+ leading: C,
2967
+ trailing: x,
2968
+ label: b,
2969
+ disabled: v = !1,
2970
+ className: N,
2971
+ onClick: w,
2972
+ badge: L,
2973
+ expanded: F,
2974
+ active: B,
2975
+ children: T,
2976
+ focusVisible: _,
2977
+ type: D = "item",
2978
+ checked: h,
2979
+ description: k,
2980
+ shortcut: S,
2981
+ density: E,
2982
+ horizontal: A,
2983
+ labelFont: U,
2984
+ font: j,
2985
+ descriptionFont: re,
2986
+ shortcutFont: ee,
2987
+ selected: P,
2988
+ __index: be,
2989
+ __interactionsDisabled: pe,
2990
+ onChange: De,
2991
+ variant: ne = "classic",
2992
+ ...$e
2993
+ }, Z) => {
2994
+ const G = W(null), ie = rt.Children.toArray(T), ae = ie.find((z) => Nt(z)), ke = ie.filter((z) => !Nt(z)), se = !!ae;
2995
+ let we;
2996
+ D !== "item" && (D === "radio" ? we = h ? i ?? zn : l ?? Kn : D === "checkbox" && (we = h ? i ?? Jo : l));
2997
+ const Ae = we ?? C ?? m ?? (c && !A), me = Ae && /* @__PURE__ */ r("div", { className: "uui-icon uui-leading", children: Ae }), X = x ?? g;
2998
+ let J;
2999
+ L && (typeof L == "string" || typeof L == "number" ? J = /* @__PURE__ */ r(dn, { value: L }) : J = L);
3000
+ const Se = ne === "modern" ? "labelLarge" : "bodyLarge", oe = U ?? j ?? Se, ue = re ?? (ne === "modern" ? "bodySmall" : "bodyMedium"), Le = ee ?? Se, Ce = R();
3001
+ Ce.text(f);
3002
+ const Q = se && !A ? Un : X, Re = S && /* @__PURE__ */ r("div", { className: `uui-menu-item-shortcut ${xe(Le)}`, style: Ce.get(), children: S }), je = (S ?? L ?? Q) && /* @__PURE__ */ $(it, { children: [
3003
+ Re,
3004
+ J,
3005
+ Q && /* @__PURE__ */ r("div", { className: "uui-icon uui-trailing", children: Q })
3006
+ ] }), Te = R();
3007
+ Te.text(u);
3008
+ const ge = b && /* @__PURE__ */ r("div", { className: `uui-menu-item-label ${xe(oe)}`, style: Te.get(), children: b }), Y = R();
3009
+ (p || !s && ne === "classic" && (d != null && d.startsWith("surface"))) && (p ? Y.text(p) : Y.text.on("surfaceVariant"));
3010
+ const Ne = k && /* @__PURE__ */ r(
3011
+ "div",
3012
+ {
3013
+ className: `uui-menu-item-description ${xe(ue)}`,
3014
+ style: Y.get(),
3015
+ children: k
3016
+ }
3017
+ ), fe = (ge ?? Ne) && /* @__PURE__ */ $("div", { className: "uui-menu-item-text", children: [
3018
+ ge,
3019
+ Ne
3020
+ ] }), Fe = (z) => {
3021
+ if (pe || v) {
3022
+ z == null || z.preventDefault();
3023
+ return;
3024
+ }
3025
+ w == null || w(z), t.includes("ripple") && G.current && z && kt(G.current, z);
3026
+ };
3027
+ let ve = d ?? (ne === "modern" ? "surfaceContainerLow" : "surfaceContainer");
3028
+ D === "option" && P && o.includes("color") && (ve = a ?? (ne === "modern" ? "tertiaryContainer" : "secondaryContainer"));
3029
+ const le = R();
3030
+ le.bg.on(ve);
3031
+ const he = R();
3032
+ he.bg(ve), s ? he.text(s) : he.text.on(ve);
3033
+ const He = [
3034
+ "uui-menu-item",
3035
+ N,
3036
+ ct(E),
3037
+ v && "uui-disabled",
3038
+ ne === "modern" ? "uui-menu-item-modern" : "uui-menu-item-classic"
3039
+ ].filter(Boolean).join(" "), Me = Ve(e ?? (ne === "modern" ? "rounded" : "smooth")), M = [
3040
+ "uui-menu-item-content",
3041
+ Me,
3042
+ ...n.includes("ring") && B ? ["uui-focus-ring-in"] : [],
3043
+ ...n.includes("overlay") && B ? ["uui-focus-overlay"] : [],
3044
+ B && "uui-active",
3045
+ B && _ && "uui-focus-visible"
3046
+ ].filter(Boolean).join(" "), O = /* @__PURE__ */ $("div", { className: M, style: he.get(), children: [
3047
+ ke.length > 0 ? /* @__PURE__ */ r("div", { className: "uui-menu-item-children", children: ke }) : /* @__PURE__ */ $(it, { children: [
3048
+ me,
3049
+ fe,
3050
+ je
3051
+ ] }),
3052
+ /* @__PURE__ */ r("div", { className: ["uui-state", Me].join(" "), style: le.get() })
3053
+ ] });
3054
+ let Pe = "menuitem";
3055
+ return (D === "radio" || D === "checkbox") && (Pe = D === "radio" ? "menuitemradio" : "menuitemcheckbox"), // eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events
3056
+ /* @__PURE__ */ r(
3057
+ "div",
3058
+ {
3059
+ ...$e,
3060
+ "aria-checked": D === "radio" || D === "checkbox" ? h ?? !1 : void 0,
3061
+ "aria-disabled": v ? "true" : void 0,
3062
+ "aria-expanded": se ? F : void 0,
3063
+ "aria-haspopup": se ? "menu" : void 0,
3064
+ className: He,
3065
+ onClick: Fe,
3066
+ ref: ht(G, Z),
3067
+ role: Pe,
3068
+ tabIndex: -1,
3069
+ children: O
3070
+ }
3071
+ );
3072
+ }
3073
+ );
3074
+ Yn[fn] = !0;
3075
+ Yn.displayName = "MenuItem";
3076
+ const Xn = (e) => {
3077
+ const {
3078
+ className: t,
3079
+ borderColor: n,
3080
+ color: o,
3081
+ border: i = 1,
3082
+ inset: l = "none",
3083
+ insetSize: a = 16,
3084
+ spacing: s = 8,
3085
+ vertical: u,
3086
+ variant: p = "strong",
3087
+ elevation: f,
3088
+ shape: c,
3089
+ style: d,
3090
+ height: m,
3091
+ ...g
3092
+ } = e, C = W(null), [x, b] = q(!1);
3093
+ Bn(() => {
3094
+ const F = C.current;
3095
+ if (!(F != null && F.parentElement))
3096
+ return;
3097
+ const B = getComputedStyle(F.parentElement).display;
3098
+ b(B.includes("flex"));
3099
+ }, []);
3100
+ const v = Math.min(4, Math.max(0, i)), N = Oe(
3101
+ "uui-divider",
3102
+ et(v === 0 ? 0 : 1),
3103
+ t,
3104
+ at(f),
3105
+ c && Ve(c)
3106
+ ), w = R(d), L = Ht(n ?? o ?? "outlineVariant");
3107
+ if (w.border(L), w.bg(L), p !== "strong" && (p === "subtle" ? w.set("opacity", "var(--uui-subtle-opacity)") : w.set("opacity", "var(--uui-medium-opacity)")), x ? u ? w.merge({
3108
+ height: m,
3109
+ alignSelf: "stretch",
3110
+ width: `${v}px`,
3111
+ marginInline: `${s}px`
3112
+ }) : w.merge({
3113
+ flex: "1 1 auto",
3114
+ height: `${v}px`,
3115
+ marginBlock: `${s}px`
3116
+ }) : u ? w.merge({
3117
+ height: m,
3118
+ display: "inline-block",
3119
+ verticalAlign: "middle",
3120
+ width: `${v}px`,
3121
+ marginInline: `${s}px`
3122
+ }) : w.merge({
3123
+ height: `${v}px`,
3124
+ marginBlock: `${s}px`
3125
+ }), l !== "none") {
3126
+ const F = l === "left" || l === "top" || l === "middle", B = l === "right" || l === "bottom" || l === "middle";
3127
+ F && (u ? w.set("marginBlockStart", `${a}px`) : w.set("marginInlineStart", `${a}px`)), B && (u ? w.set("marginBlockEnd", `${a}px`) : w.set("marginInlineEnd", `${a}px`));
3128
+ }
3129
+ return /* @__PURE__ */ r(
3130
+ "div",
3131
+ {
3132
+ "aria-hidden": "true",
3133
+ className: N,
3134
+ ref: C,
3135
+ role: "separator",
3136
+ style: w.get(),
3137
+ ...g
3138
+ }
3139
+ );
3140
+ };
3141
+ Xn[Gn] = !0;
3142
+ Xn.displayName = "Divider";
3143
+ const yr = I(
3144
+ ({
3145
+ uncheckedBorder: e,
3146
+ border: t,
3147
+ color: n,
3148
+ borderColor: o,
3149
+ uncheckedBorderColor: i,
3150
+ shape: l = "round",
3151
+ size: a = "small",
3152
+ filled: s = !1,
3153
+ icon: u,
3154
+ uncheckedIcon: p,
3155
+ animation: f,
3156
+ ...c
3157
+ }, d) => {
3158
+ const m = n ?? "primary";
3159
+ return /* @__PURE__ */ r(
3160
+ un,
3161
+ {
3162
+ animation: f ?? "scale",
3163
+ border: !u && t === void 0 ? 2 : t,
3164
+ borderColor: o ?? m,
3165
+ color: m,
3166
+ elementClass: "uui-radio",
3167
+ filled: s,
3168
+ icon: u ?? Yo,
3169
+ indeterminateIcon: void 0,
3170
+ ref: d,
3171
+ shape: l,
3172
+ size: a,
3173
+ type: "radio",
3174
+ uncheckedBorder: e ?? t ?? (p ? void 0 : 2),
3175
+ uncheckedBorderColor: i ?? o ?? "onSurfaceVariant",
3176
+ uncheckedIcon: p,
3177
+ ...c
3178
+ }
3179
+ );
3180
+ }
3181
+ );
3182
+ yr.displayName = "Radio";
3183
+ const Ni = ({
3184
+ children: e,
3185
+ colorMode: t,
3186
+ seedColor: n,
3187
+ extraColors: o
3188
+ }) => {
3189
+ const [i, l] = q(Sn), a = Qe(
3190
+ (f) => {
3191
+ f ? document.body.classList.add("dark") : document.body.classList.remove("dark"), l((c) => ({ ...c, darkMode: f }));
3192
+ },
3193
+ [l]
3194
+ ), s = Qe(
3195
+ (f) => (i.darkMode ? i.schemes.dark : i.schemes.light)[f] ?? "",
3196
+ [i]
3197
+ ), u = Qe(
3198
+ (f, c) => i.schemes[f][c] ?? "",
3199
+ [i]
3200
+ );
3201
+ ye(() => {
3202
+ if (t) {
3203
+ const f = t === "dark";
3204
+ document.body.classList.toggle("dark", f), l((c) => ({ ...c, darkMode: f }));
3205
+ }
3206
+ }, [t]), ye(() => {
3207
+ const { schemes: f } = Sn;
3208
+ l((c) => ({
3209
+ darkMode: c.darkMode,
3210
+ schemes: Do(n, o, f)
3211
+ }));
3212
+ }, [o, n]);
3213
+ const p = ft(
3214
+ () => ({
3215
+ theme: i,
3216
+ setTheme: l,
3217
+ darkMode: i.darkMode,
3218
+ setDarkMode: a,
3219
+ getColorValue: s,
3220
+ getThemeColorValue: u
3221
+ }),
3222
+ [s, u, a, i]
3223
+ );
3224
+ return /* @__PURE__ */ r(Vn.Provider, { value: p, children: e });
3225
+ }, br = I(
3226
+ ({ children: e, className: t = "", title: n = "", align: o = "topRight", value: i, ...l }, a) => {
3227
+ const s = W(null);
3228
+ return /* @__PURE__ */ $("span", { className: "uui-tooltip-wrapper", ref: a, ...l, children: [
3229
+ /* @__PURE__ */ r(Lt, { align: o, tooltip: /* @__PURE__ */ r("div", { children: n }), triggerRef: s }),
3230
+ /* @__PURE__ */ r("div", { ref: s, children: e })
3231
+ ] });
3232
+ }
3233
+ );
3234
+ br.displayName = "Tooltip";
3235
+ const vr = I(
3236
+ ({ direction: e = "col", ...t }, n) => /* @__PURE__ */ r(
3237
+ Be,
3238
+ {
3239
+ ref: n,
3240
+ ...t,
3241
+ component: "article",
3242
+ direction: e,
3243
+ elementClass: "uui-article"
3244
+ }
3245
+ )
3246
+ );
3247
+ vr.displayName = "Article";
3248
+ const Cr = I(
3249
+ ({ direction: e = "col", ...t }, n) => /* @__PURE__ */ r(
3250
+ Be,
3251
+ {
3252
+ ref: n,
3253
+ ...t,
3254
+ component: "aside",
3255
+ direction: e,
3256
+ elementClass: "uui-aside"
3257
+ }
3258
+ )
3259
+ );
3260
+ Cr.displayName = "Aside";
3261
+ const xr = I(
3262
+ ({ direction: e = "col", ...t }, n) => /* @__PURE__ */ r(
3263
+ Be,
3264
+ {
3265
+ ref: n,
3266
+ ...t,
3267
+ direction: e,
3268
+ elementClass: "uui-article-content"
3269
+ }
3270
+ )
3271
+ );
3272
+ xr.displayName = "Content";
3273
+ const wr = I((e, t) => /* @__PURE__ */ r(Be, { ...e, ref: t, type: "block" }));
3274
+ wr.displayName = "Div";
3275
+ const Jn = I(
3276
+ ({ direction: e = "row", ...t }, n) => /* @__PURE__ */ r(Be, { ...t, direction: e, ref: n, type: "flex" })
3277
+ );
3278
+ Jn.displayName = "Flex";
3279
+ const Nr = I(
3280
+ ({ direction: e = "row", ...t }, n) => /* @__PURE__ */ r(
3281
+ Be,
3282
+ {
3283
+ ref: n,
3284
+ ...t,
3285
+ component: "footer",
3286
+ direction: e,
3287
+ elementClass: "uui-footer"
3288
+ }
3289
+ )
3290
+ );
3291
+ Nr.displayName = "Footer";
3292
+ const Qn = I((e, t) => /* @__PURE__ */ r(Be, { ...e, ref: t, type: "grid" }));
3293
+ Qn.displayName = "Grid";
3294
+ const kr = I(
3295
+ ({ direction: e = "row", ...t }, n) => /* @__PURE__ */ r(
3296
+ Be,
3297
+ {
3298
+ ref: n,
3299
+ ...t,
3300
+ component: "header",
3301
+ direction: e,
3302
+ elementClass: "uui-header"
3303
+ }
3304
+ )
3305
+ );
3306
+ kr.displayName = "Header";
3307
+ const Sr = I(
3308
+ ({ direction: e = "col", ...t }, n) => /* @__PURE__ */ r(
3309
+ Be,
3310
+ {
3311
+ ref: n,
3312
+ ...t,
3313
+ component: "main",
3314
+ direction: e,
3315
+ elementClass: "uui-main"
3316
+ }
3317
+ )
3318
+ );
3319
+ Sr.displayName = "Main";
3320
+ const Lr = I(
3321
+ ({ direction: e = "row", ...t }, n) => /* @__PURE__ */ r(
3322
+ Be,
3323
+ {
3324
+ ref: n,
3325
+ ...t,
3326
+ component: "nav",
3327
+ direction: e,
3328
+ elementClass: "uui-nav"
3329
+ }
3330
+ )
3331
+ );
3332
+ Lr.displayName = "Nav";
3333
+ const Fr = I(
3334
+ ({ direction: e = "col", ...t }, n) => /* @__PURE__ */ r(
3335
+ Be,
3336
+ {
3337
+ ref: n,
3338
+ ...t,
3339
+ component: "section",
3340
+ direction: e,
3341
+ elementClass: "uui-section"
3342
+ }
3343
+ )
3344
+ );
3345
+ Fr.displayName = "Section";
3346
+ const Ir = I((e, t) => /* @__PURE__ */ r(zt, { ref: t, ...e, elementClass: "uui-dialog" }));
3347
+ Ir.displayName = "Dialog";
3348
+ const Br = ({
3349
+ children: e,
3350
+ className: t,
3351
+ color: n,
3352
+ borderTop: o = !1,
3353
+ borderTopWidth: i = 1,
3354
+ borderColor: l
3355
+ }) => {
3356
+ if (!e)
3357
+ return null;
3358
+ const a = o ? et(i) : "", s = R();
3359
+ s.border(l), s.text.on(n), s.bg(n);
3360
+ const u = Oe(
3361
+ "uui-dialog-actions",
3362
+ o ? "uui-dialog-actions-border-top" : "",
3363
+ a,
3364
+ t
3365
+ );
3366
+ return /* @__PURE__ */ r("div", { className: u, style: s.get(), children: e });
3367
+ };
3368
+ Br.displayName = "DialogActions";
3369
+ const Dr = ({ children: e, className: t }) => {
3370
+ const n = Oe("uui-dialog-content", t);
3371
+ return e ? /* @__PURE__ */ r("div", { className: n, children: /* @__PURE__ */ r("div", { className: "uui-content", children: e }) }) : null;
3372
+ };
3373
+ Dr.displayName = "DialogContent";
3374
+ const $r = ({ icon: e, label: t, children: n, className: o, font: i = "headlineSmall" }) => {
3375
+ const l = t ?? n ?? null;
3376
+ return l ? /* @__PURE__ */ $("div", { className: Oe("uui-dialog-title", o, xe(i)), children: [
3377
+ e && /* @__PURE__ */ r("div", { className: "uui-icon", children: e }),
3378
+ l && /* @__PURE__ */ r("div", { className: "uui-content", children: l })
3379
+ ] }) : null;
3380
+ };
3381
+ $r.displayName = "DialogTitle";
3382
+ const Er = I((e, t) => /* @__PURE__ */ r(zt, { ref: t, ...e, elementClass: "uui-drawer", type: "dockRight" }));
3383
+ Er.displayName = "Drawer";
3384
+ const Tr = I((e, t) => /* @__PURE__ */ r(zt, { ref: t, ...e, elementClass: "uui-bottom-sheet", type: "dockBottom" }));
3385
+ Tr.displayName = "BottomSheet";
3386
+ const eo = I(
3387
+ ({
3388
+ description: e,
3389
+ error: t,
3390
+ font: n,
3391
+ label: o,
3392
+ disabled: i,
3393
+ legend: l,
3394
+ children: a,
3395
+ direction: s = "col",
3396
+ required: u,
3397
+ descriptionColor: p,
3398
+ descriptionFont: f,
3399
+ alignItems: c = "start",
3400
+ ...d
3401
+ }, m) => {
3402
+ const g = l ?? o, C = ["uui-fieldset-legend", xe(n ?? "labelLarge")].filter(Boolean).join(" "), x = R();
3403
+ t ? x.text("error") : p ? x.text(p) : x.text.on("surfaceVariant");
3404
+ const b = [
3405
+ "uui-support-text",
3406
+ xe(f ?? "bodySmall"),
3407
+ t && "uui-error",
3408
+ e && !t && "uui-description"
3409
+ ].filter(Boolean).join(" "), v = (e ?? t) && /* @__PURE__ */ r("div", { className: b, style: x.get(), children: t ?? e });
3410
+ return /* @__PURE__ */ $(it, { children: [
3411
+ /* @__PURE__ */ r(ln.Provider, { value: { disabled: i }, children: /* @__PURE__ */ $(
3412
+ Be,
3413
+ {
3414
+ ref: m,
3415
+ ...d,
3416
+ alignItems: c,
3417
+ component: "fieldset",
3418
+ direction: s,
3419
+ disabled: i,
3420
+ elementClass: "uui-fieldset",
3421
+ children: [
3422
+ g && /* @__PURE__ */ $("legend", { className: C, children: [
3423
+ g,
3424
+ u && /* @__PURE__ */ r("span", { "aria-hidden": "true", className: "uui-required", children: "*" })
3425
+ ] }),
3426
+ a
3427
+ ]
3428
+ }
3429
+ ) }),
3430
+ v
3431
+ ] });
3432
+ }
3433
+ );
3434
+ eo.displayName = "Fieldset";
3435
+ const Mr = I(
3436
+ ({
3437
+ name: e,
3438
+ disabled: t,
3439
+ onChange: n,
3440
+ value: o,
3441
+ defaultValue: i,
3442
+ children: l,
3443
+ ...a
3444
+ }, s) => {
3445
+ const [u, p] = q(i), f = o !== void 0, c = f ? o : u, d = Qe(
3446
+ (g) => {
3447
+ f || p(g), n == null || n(g);
3448
+ },
3449
+ [f, n]
3450
+ ), m = ft(
3451
+ () => ({ name: e, value: c, setValue: d, disabled: t }),
3452
+ [e, c, d, t]
3453
+ );
3454
+ return /* @__PURE__ */ r(eo, { disabled: t, ref: s, ...a, children: /* @__PURE__ */ r(Rn.Provider, { value: m, children: l }) });
3455
+ }
3456
+ );
3457
+ Mr.displayName = "RadioGroup";
3458
+ const to = Symbol.for("uui.listItem");
3459
+ function Rr(e) {
3460
+ return mt(e) && typeof e.type != "string" && !!e.type[to];
3461
+ }
3462
+ const ki = ({ type: e = "single", defaultValue: t, children: n }) => {
3463
+ const [o, i] = q(t ? [t] : []), l = rt.Children.toArray(n).filter(Rr);
3464
+ function a(f) {
3465
+ i((c) => {
3466
+ const d = c.includes(f);
3467
+ return e === "single" ? d ? [] : [f] : d ? c.filter((m) => m !== f) : [...c, f];
3468
+ });
3469
+ }
3470
+ function s(f) {
3471
+ i(e === "single" ? [f] : [f]);
3472
+ }
3473
+ function u() {
3474
+ i([]);
3475
+ }
3476
+ const p = ft(
3477
+ () => ({
3478
+ values: o,
3479
+ type: e,
3480
+ toggle: a,
3481
+ set: s,
3482
+ clear: u
3483
+ }),
3484
+ [o, e]
3485
+ );
3486
+ return /* @__PURE__ */ r(Wt.Provider, { value: p, children: /* @__PURE__ */ r("div", { "aria-orientation": "vertical", className: "uui-list uui-flex uui-flex-col", role: "listbox", children: l }) });
3487
+ }, mn = I(
3488
+ ({
3489
+ shape: e,
3490
+ touchEffects: t = ["ripple"],
3491
+ focusEffects: n = ["ring", "overlay"],
3492
+ selectedEffects: o = ["color"],
3493
+ checkedIcon: i,
3494
+ uncheckedIcon: l,
3495
+ selectedColor: a,
3496
+ textColor: s,
3497
+ labelColor: u,
3498
+ descriptionColor: p,
3499
+ shortcutColor: f,
3500
+ fixedLeading: c,
3501
+ color: d,
3502
+ icon: m,
3503
+ endIcon: g,
3504
+ leading: C,
3505
+ trailing: x,
3506
+ label: b,
3507
+ disabled: v = !1,
3508
+ className: N,
3509
+ onClick: w,
3510
+ badge: L,
3511
+ expanded: F,
3512
+ active: B,
3513
+ children: T,
3514
+ focusVisible: _,
3515
+ type: D = "item",
3516
+ checked: h,
3517
+ description: k,
3518
+ shortcut: S,
3519
+ density: E,
3520
+ horizontal: A,
3521
+ labelFont: U,
3522
+ font: j,
3523
+ descriptionFont: re,
3524
+ shortcutFont: ee,
3525
+ selected: P,
3526
+ __index: be,
3527
+ __interactionsDisabled: pe,
3528
+ onChange: De,
3529
+ variant: ne = "classic",
3530
+ ...$e
3531
+ }, Z) => {
3532
+ const G = W(null), ie = rt.Children.toArray(T), ae = ie.find((z) => Nt(z)), ke = ie.filter((z) => !Nt(z)), se = !!ae;
3533
+ let we;
3534
+ D !== "item" && (D === "radio" ? we = h ? i ?? zn : l ?? Kn : D === "checkbox" && (we = h ? i ?? Xo : l));
3535
+ const Ae = we ?? C ?? m ?? (c && !A), me = Ae && /* @__PURE__ */ r("div", { className: "uui-icon uui-leading", children: Ae }), X = x ?? g;
3536
+ let J;
3537
+ L && (typeof L == "string" || typeof L == "number" ? J = /* @__PURE__ */ r(dn, { value: L }) : J = L);
3538
+ const Se = ne === "modern" ? "labelLarge" : "bodyLarge", oe = U ?? j ?? Se, ue = re ?? (ne === "modern" ? "bodySmall" : "bodyMedium"), Le = ee ?? Se, Ce = R();
3539
+ Ce.text(f);
3540
+ const Q = se && !A ? Un : X, Re = S && /* @__PURE__ */ r("div", { className: `uui-menu-item-shortcut ${xe(Le)}`, style: Ce.get(), children: S }), je = (S ?? L ?? Q) && /* @__PURE__ */ $(it, { children: [
3541
+ Re,
3542
+ J,
3543
+ Q && /* @__PURE__ */ r("div", { className: "uui-icon uui-trailing", children: Q })
3544
+ ] }), Te = R();
3545
+ Te.text(u);
3546
+ const ge = b && /* @__PURE__ */ r("div", { className: `uui-menu-item-label ${xe(oe)}`, style: Te.get(), children: b }), Y = R();
3547
+ (p || !s && ne === "classic" && (d != null && d.startsWith("surface"))) && (p ? Y.text(p) : Y.text.on("surfaceVariant"));
3548
+ const Ne = k && /* @__PURE__ */ r(
3549
+ "div",
3550
+ {
3551
+ className: `uui-menu-item-description ${xe(ue)}`,
3552
+ style: Y.get(),
3553
+ children: k
3554
+ }
3555
+ ), fe = (ge ?? Ne) && /* @__PURE__ */ $("div", { className: "uui-menu-item-text", children: [
3556
+ ge,
3557
+ Ne
3558
+ ] }), Fe = (z) => {
3559
+ if (pe || v) {
3560
+ z == null || z.preventDefault();
3561
+ return;
3562
+ }
3563
+ w == null || w(z), t.includes("ripple") && G.current && z && kt(G.current, z);
3564
+ };
3565
+ let ve = d ?? (ne === "modern" ? "surfaceContainerLow" : "surfaceContainer");
3566
+ D === "option" && P && o.includes("color") && (ve = a ?? (ne === "modern" ? "tertiaryContainer" : "secondaryContainer"));
3567
+ const le = R();
3568
+ le.bg.on(ve);
3569
+ const he = R();
3570
+ he.bg(ve), s ? he.text(s) : he.text.on(ve);
3571
+ const He = [
3572
+ "uui-menu-item",
3573
+ N,
3574
+ ct(E),
3575
+ v && "uui-disabled",
3576
+ ne === "modern" ? "uui-menu-item-modern" : "uui-menu-item-classic"
3577
+ ].filter(Boolean).join(" "), Me = Ve(e ?? (ne === "modern" ? "rounded" : "smooth")), M = [
3578
+ "uui-menu-item-content",
3579
+ Me,
3580
+ ...n.includes("ring") && B ? ["uui-focus-ring-in"] : [],
3581
+ ...n.includes("overlay") && B ? ["uui-focus-overlay"] : [],
3582
+ B && "uui-active",
3583
+ B && _ && "uui-focus-visible"
3584
+ ].filter(Boolean).join(" "), O = /* @__PURE__ */ $("div", { className: M, style: he.get(), children: [
3585
+ ke.length > 0 ? /* @__PURE__ */ r("div", { className: "uui-menu-item-children", children: ke }) : /* @__PURE__ */ $(it, { children: [
3586
+ me,
3587
+ fe,
3588
+ je
3589
+ ] }),
3590
+ /* @__PURE__ */ r("div", { className: ["uui-state", Me].join(" "), style: le.get() })
3591
+ ] });
3592
+ return (
3593
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events
3594
+ /* @__PURE__ */ r(
3595
+ "div",
3596
+ {
3597
+ ...$e,
3598
+ "aria-checked": D === "radio" || D === "checkbox" ? h ?? !1 : void 0,
3599
+ "aria-disabled": v ? "true" : void 0,
3600
+ "aria-expanded": se ? F : void 0,
3601
+ "aria-haspopup": se ? "menu" : void 0,
3602
+ className: He,
3603
+ onClick: Fe,
3604
+ ref: ht(G, Z),
3605
+ role: "option",
3606
+ tabIndex: -1,
3607
+ children: O
3608
+ }
3609
+ )
3610
+ );
3611
+ }
3612
+ );
3613
+ mn[to] = !0;
3614
+ mn[fn] = !0;
3615
+ mn.displayName = "ListItem";
3616
+ const Vr = I((e, t) => {
3617
+ const {
3618
+ density: n,
3619
+ icon: o,
3620
+ disabled: i,
3621
+ elevation: l,
3622
+ checked: a,
3623
+ children: s,
3624
+ color: u = "primary",
3625
+ uncheckedColor: p,
3626
+ defaultChecked: f,
3627
+ hoverEffects: c = ["overlay"],
3628
+ touchEffects: d = ["ripple"],
3629
+ focusEffects: m = ["ring"],
3630
+ selectedEffects: g = [],
3631
+ pressedEffects: C = ["overlay", "scale"],
3632
+ id: x,
3633
+ name: b,
3634
+ label: v,
3635
+ font: N,
3636
+ border: w,
3637
+ borderColor: L,
3638
+ uncheckedBorder: F,
3639
+ uncheckedBorderColor: B,
3640
+ onChange: T,
3641
+ onClick: _,
3642
+ onFocus: D,
3643
+ onBlur: h,
3644
+ required: k,
3645
+ shape: S = "round",
3646
+ title: E,
3647
+ value: A,
3648
+ size: U = "small",
3649
+ uncheckedIcon: j,
3650
+ description: re,
3651
+ className: ee,
3652
+ error: P,
3653
+ focusColor: be,
3654
+ duration: pe = 200,
3655
+ tooltipAlign: De = "auto",
3656
+ textPlacement: ne = "end",
3657
+ "aria-label": $e,
3658
+ readOnly: Z,
3659
+ ...G
3660
+ } = e, ie = W(null), ae = Mt(ln), ke = i ?? (ae == null ? void 0 : ae.disabled), { focusVisible: se, isFocused: we, focusHandlers: Ae } = St(D, h), me = W(null), X = W(null), J = W(null), Se = W(vt("check")), oe = x ?? Se.current, ue = a !== void 0, [Le, Ce] = q(f ?? !1), Q = ue ? !!a : Le, Re = $e ?? (v ? void 0 : E), je = P ? "error" : u, Te = E ? /* @__PURE__ */ r("div", { id: `${oe}-tip`, children: E }) : null, ge = (te) => {
3661
+ if (Z) {
3662
+ te.preventDefault();
3663
+ return;
3664
+ }
3665
+ const _e = te.currentTarget;
3666
+ ue || Ce(_e.checked), T == null || T(te);
3667
+ }, Y = (te) => {
3668
+ if (Z) {
3669
+ te.preventDefault();
3670
+ return;
3671
+ }
3672
+ d.includes("ripple") && (ie.current && clearTimeout(ie.current), ie.current = window.setTimeout(() => {
3673
+ J.current && X.current && (kt(J.current, te, X.current), ie.current = null);
3674
+ }, pe)), _ == null || _(te);
3675
+ }, Ne = [
3676
+ "uui-switch",
3677
+ ct(n),
3678
+ ee,
3679
+ P && "uui-error",
3680
+ ke && "uui-disabled",
3681
+ ...s ? [] : [gt(U)]
3682
+ ].filter(Boolean).join(" "), fe = [
3683
+ "uui-switch-control",
3684
+ Q && "uui-checked",
3685
+ j && "uui-symmetric-thumb",
3686
+ ...c.includes("overlay") && !Z ? ["uui-hover-overlay"] : [],
3687
+ ...m.includes("overlay") && se && we ? ["uui-focus-overlay"] : [],
3688
+ ...g.includes("overlay") ? ["uui-selected-overlay"] : [],
3689
+ ...C.includes("overlay") && !Z ? ["uui-pressed-overlay"] : [],
3690
+ ...C.includes("scale") && !Z ? ["uui-pressed-scale"] : [],
3691
+ Ve(S),
3692
+ m.includes("ring") && se && we && "uui-focus-visible uui-focus-ring"
3693
+ ].filter(Boolean).join(" "), Fe = R();
3694
+ be && se && we && Fe.set("--uui-focus-color", Tn(be).color), Fe.set("--uui-switch-duration", `${pe}ms`);
3695
+ const ve = ["uui-input"].filter(Boolean).join(" "), le = ["uui-state", Ve("round")].filter(Boolean).join(" "), he = R(), Me = [
3696
+ "uui-switch-track",
3697
+ et(Q ? w : F ?? w ?? 2),
3698
+ Ve(S),
3699
+ at(l)
3700
+ ].filter(Boolean).join(" "), M = R(), O = ["uui-switch-thumb", Ve(S)].filter(Boolean).join(" "), Pe = ["uui-icon"].filter(Boolean).join(" "), z = R(), nt = ["uui-switch-glyph"].filter(Boolean).join(" "), Ue = R(), We = R();
3701
+ M.border(P ? "error" : L ?? "outline"), We.border(P ? "error" : L ?? "outline"), Q ? (he.bg(je), M.bg(P ? "errorContainer" : u), Ue.bg.on(u), z.text.onContainer(u)) : (B && (M.border(P ? "error" : B), We.border(P ? "error" : B)), he.bg(P ? "error" : p ?? "onSurface"), M.bg(P ? "errorContainer" : p ?? "surfaceContainerHighest"), p ? (Ue.bg.on(p), z.text.onContainer(p)) : (Ue.bg(j ? "onSurfaceVariant" : "outline"), z.text("surfaceContainerHighest")));
3702
+ let Ye;
3703
+ if (s) {
3704
+ const te = [
3705
+ "uui-switch-content uui-overflow-hidden",
3706
+ Ve(S),
3707
+ et(w),
3708
+ at(l)
3709
+ ].filter(Boolean).join(" ");
3710
+ Ye = /* @__PURE__ */ $("div", { className: te, style: We.get(), children: [
3711
+ s,
3712
+ /* @__PURE__ */ r("div", { className: le, ref: J, style: he.get() })
3713
+ ] });
3714
+ } else {
3715
+ const te = Q ? o : j;
3716
+ Ye = /* @__PURE__ */ $(it, { children: [
3717
+ /* @__PURE__ */ r("div", { className: Me, style: M.get() }),
3718
+ /* @__PURE__ */ $("div", { className: O, children: [
3719
+ /* @__PURE__ */ r("div", { className: nt, style: Ue.get(), children: /* @__PURE__ */ r("div", { className: Pe, style: z.get(), children: te }) }),
3720
+ /* @__PURE__ */ r("div", { className: le, ref: J, style: he.get() })
3721
+ ] })
3722
+ ] });
3723
+ }
3724
+ const Xe = v && /* @__PURE__ */ r(Hn, { font: N, htmlFor: oe, label: v, required: k }), K = /* @__PURE__ */ r(cn, { description: re, error: P }), de = /* @__PURE__ */ r("div", { className: "uui-switch-control-wrapper", children: /* @__PURE__ */ $("div", { className: fe, ref: X, style: Fe.get(), children: [
3725
+ /* @__PURE__ */ r(
3726
+ "input",
3727
+ {
3728
+ ...Ae,
3729
+ "aria-label": Re,
3730
+ "aria-readonly": Z === !0 ? !0 : void 0,
3731
+ checked: !!Q,
3732
+ className: ve,
3733
+ disabled: ke,
3734
+ id: oe,
3735
+ name: b,
3736
+ onChange: ge,
3737
+ onClick: Y,
3738
+ readOnly: Z,
3739
+ ref: ht(me, t),
3740
+ type: "checkbox",
3741
+ value: A,
3742
+ ...G
3743
+ }
3744
+ ),
3745
+ Ye,
3746
+ Te && /* @__PURE__ */ r(Lt, { align: De, tooltip: Te, triggerRef: me })
3747
+ ] }) });
3748
+ return /* @__PURE__ */ r(
3749
+ an,
3750
+ {
3751
+ className: Ne,
3752
+ control: de,
3753
+ description: K,
3754
+ label: Xe,
3755
+ textPlacement: ne
3756
+ }
3757
+ );
3758
+ });
3759
+ Vr.displayName = "Switch";
3760
+ const Ar = I(
3761
+ ({ font: e = "headlineLarge", ...t }, n) => /* @__PURE__ */ r(
3762
+ ut,
3763
+ {
3764
+ ref: n,
3765
+ ...t,
3766
+ component: "h1",
3767
+ elementClass: "uui-h1",
3768
+ font: e
3769
+ }
3770
+ )
3771
+ );
3772
+ Ar.displayName = "H1";
3773
+ const jr = I(
3774
+ ({ font: e = "headlineMedium", ...t }, n) => /* @__PURE__ */ r(
3775
+ ut,
3776
+ {
3777
+ ref: n,
3778
+ ...t,
3779
+ component: "h2",
3780
+ elementClass: "uui-h2",
3781
+ font: e
3782
+ }
3783
+ )
3784
+ );
3785
+ jr.displayName = "H2";
3786
+ const Pr = I(
3787
+ ({ font: e = "headlineSmall", ...t }, n) => /* @__PURE__ */ r(
3788
+ ut,
3789
+ {
3790
+ ref: n,
3791
+ ...t,
3792
+ component: "h3",
3793
+ elementClass: "uui-h3",
3794
+ font: e
3795
+ }
3796
+ )
3797
+ );
3798
+ Pr.displayName = "H3";
3799
+ const Or = I(
3800
+ ({ font: e = "titleLarge", ...t }, n) => /* @__PURE__ */ r(
3801
+ ut,
3802
+ {
3803
+ ref: n,
3804
+ ...t,
3805
+ component: "h4",
3806
+ elementClass: "uui-h4",
3807
+ font: e
3808
+ }
3809
+ )
3810
+ );
3811
+ Or.displayName = "H4";
3812
+ const _r = I(
3813
+ ({ font: e = "titleMedium", ...t }, n) => /* @__PURE__ */ r(
3814
+ ut,
3815
+ {
3816
+ ref: n,
3817
+ ...t,
3818
+ component: "h5",
3819
+ elementClass: "uui-h5",
3820
+ font: e
3821
+ }
3822
+ )
3823
+ );
3824
+ _r.displayName = "H5";
3825
+ const Hr = I(
3826
+ ({ font: e = "titleSmall", ...t }, n) => /* @__PURE__ */ r(
3827
+ ut,
3828
+ {
3829
+ ref: n,
3830
+ ...t,
3831
+ component: "h6",
3832
+ elementClass: "uui-h6",
3833
+ font: e
3834
+ }
3835
+ )
3836
+ );
3837
+ Hr.displayName = "H6";
3838
+ const Wr = I((e, t) => /* @__PURE__ */ r(ut, { ref: t, ...e, component: "p", elementClass: "uui-p" }));
3839
+ Wr.displayName = "P";
3840
+ const Ur = I((e, t) => /* @__PURE__ */ r(ut, { ref: t, ...e, component: "span", elementClass: "uui-span" }));
3841
+ Ur.displayName = "Span";
3842
+ const zr = I(
3843
+ ({ font: e = "labelLarge", ...t }, n) => /* @__PURE__ */ r(
3844
+ ut,
3845
+ {
3846
+ ref: n,
3847
+ ...t,
3848
+ component: "label",
3849
+ elementClass: "uui-label",
3850
+ font: e
3851
+ }
3852
+ )
3853
+ );
3854
+ zr.displayName = "Label";
3855
+ const no = Symbol.for("uui.accordionItem");
3856
+ function Kr(e) {
3857
+ return mt(e) && typeof e.type != "string" && !!e.type[no];
3858
+ }
3859
+ const Si = ({
3860
+ type: e = "single",
3861
+ variant: t = "segmented",
3862
+ children: n,
3863
+ density: o,
3864
+ border: i,
3865
+ borderColor: l,
3866
+ elevation: a,
3867
+ showIcon: s,
3868
+ font: u,
3869
+ shape: p,
3870
+ animation: f,
3871
+ motionStyle: c,
3872
+ duration: d = 250,
3873
+ color: m,
3874
+ disabled: g
3875
+ }) => {
3876
+ const C = Ao(e, "vertical"), { values: x } = C, b = rt.Children.toArray(n).filter(Kr), w = {
3877
+ elevation: a,
3878
+ border: i ?? (t !== "text" ? 1 : void 0),
3879
+ borderColor: l,
3880
+ shape: p ?? (t !== "text" ? "round" : void 0)
3881
+ }, L = {
3882
+ density: o,
3883
+ variant: t,
3884
+ showIcon: s,
3885
+ font: u,
3886
+ animation: f,
3887
+ motionStyle: c,
3888
+ duration: d,
3889
+ color: m,
3890
+ disabled: g,
3891
+ ...w
3892
+ }, F = ft(
3893
+ () => ({
3894
+ ...C,
3895
+ config: L
3896
+ }),
3897
+ [L, C]
3898
+ ), B = [], T = [];
3899
+ b.forEach((D) => {
3900
+ t === "pills" || t === "segmented" ? B.push([D]) : T.push(D);
3901
+ }), T.length && B.push(T);
3902
+ const _ = ["uui-accordion-group", ct(o)];
3903
+ return /* @__PURE__ */ r(Wt.Provider, { value: F, children: /* @__PURE__ */ r("div", { className: `uui-accordion uui-accordion-${t}`, children: B.map((D, h) => {
3904
+ const S = D[0].props.value, E = x.includes(S), A = h === 0, U = h === b.length - 1, j = b[h - 1], re = b[h + 1], ee = j && x.includes(j.props.value), P = re && x.includes(re.props.value), be = t === "segmented", pe = be && !A && !E && !ee, De = be && !U && !E && !P;
3905
+ return /* @__PURE__ */ r(
3906
+ Be,
3907
+ {
3908
+ ...w,
3909
+ className: Oe(_, E && "uui-open"),
3910
+ direction: "col",
3911
+ style: be ? {
3912
+ // Nakładanie ramek i odstępy
3913
+ // marginTop: shouldStickTop ? '0' : isFirst ? '0' : '12px',
3914
+ // Dynamiczne promienie (null/undefined przywraca domyślny z klasy shape)
3915
+ borderTopLeftRadius: pe ? 0 : void 0,
3916
+ borderTopRightRadius: pe ? 0 : void 0,
3917
+ borderBottomLeftRadius: De ? 0 : void 0,
3918
+ borderBottomRightRadius: De ? 0 : void 0,
3919
+ // overflowY: 'hidden',
3920
+ // clipPath: isOpen
3921
+ // ? 'inset(-100px -100px -100px -100px)'
3922
+ // : `inset(${topClip} -100px ${bottomClip} -100px)`,
3923
+ // Żeby cienie i ramki otwartego elementu były na wierzchu
3924
+ zIndex: E ? 0 : h,
3925
+ position: "relative",
3926
+ transition: "all 250ms ease"
3927
+ } : void 0,
3928
+ children: D
3929
+ },
3930
+ S
3931
+ );
3932
+ }) }) });
3933
+ }, qr = ({
3934
+ value: e,
3935
+ label: t,
3936
+ children: n,
3937
+ leading: o,
3938
+ trailing: i,
3939
+ showIcon: l,
3940
+ icon: a,
3941
+ font: s,
3942
+ variant: u,
3943
+ animation: p,
3944
+ duration: f,
3945
+ motionStyle: c,
3946
+ flush: d,
3947
+ divided: m,
3948
+ onFocus: g,
3949
+ onBlur: C,
3950
+ color: x,
3951
+ disabled: b,
3952
+ hoverEffects: v = ["overlay"],
3953
+ focusEffects: N = ["ring", "overlay"],
3954
+ pressedEffects: w = ["overlay"],
3955
+ touchEffects: L = ["ripple"],
3956
+ selectedEffects: F = ["color"]
3957
+ }) => {
3958
+ const B = W(null), { values: T, toggle: _, roving: D, config: h } = An(), k = T.includes(e), { focusVisible: S, focusHandlers: E } = St(g, C), A = `accordion-${e}`, U = l ?? (h == null ? void 0 : h.showIcon) ?? !0, j = u ?? (h == null ? void 0 : h.variant) ?? "segmented", re = b ?? (h == null ? void 0 : h.disabled), ee = x ?? (h == null ? void 0 : h.color), P = U && /* @__PURE__ */ r("div", { className: "uui-accordion-icon uui-icon", children: a ?? Qo }), be = o && /* @__PURE__ */ r(On, { content: o }), pe = (i ?? U) && /* @__PURE__ */ r(_n, { content: i, end: P }), De = [
3959
+ "uui-accordion-trigger",
3960
+ xe(s ?? (h == null ? void 0 : h.font) ?? "labelLarge"),
3961
+ ...N.includes("ring") && S ? ["uui-focus-ring"] : [],
3962
+ ...N.includes("overlay") ? ["uui-focus-overlay"] : [],
3963
+ ...v.includes("overlay") ? ["uui-hover-overlay"] : [],
3964
+ ...w.includes("overlay") ? ["uui-pressed-overlay"] : []
3965
+ ].filter(Boolean).join(" ");
3966
+ function ne(ie) {
3967
+ _(e), L.includes("ripple") && B.current && kt(B.current, ie);
3968
+ }
3969
+ const $e = [
3970
+ `uui-accordion-item uui-accordion-item-${j}`,
3971
+ d && "uui-flush",
3972
+ m && "uui-divided"
3973
+ ].filter(Boolean).join(" "), Z = R(), G = R();
3974
+ return G.bg.on(ee), Z.bg(ee), Z.text.on(ee), /* @__PURE__ */ $("div", { className: $e, "data-open": k, children: [
3975
+ /* @__PURE__ */ $("div", { className: "uui-accordion-header", ref: B, style: Z.get(), children: [
3976
+ be,
3977
+ /* @__PURE__ */ $(
3978
+ "button",
3979
+ {
3980
+ ...E,
3981
+ "aria-controls": `${A}-content`,
3982
+ "aria-expanded": k,
3983
+ className: De,
3984
+ disabled: re,
3985
+ id: `${A}-trigger`,
3986
+ onClick: ne,
3987
+ onKeyDown: D == null ? void 0 : D.onKeyDown,
3988
+ ref: D == null ? void 0 : D.register,
3989
+ type: "button",
3990
+ children: [
3991
+ t,
3992
+ /* @__PURE__ */ r("div", { className: "uui-state", style: G.get() })
3993
+ ]
3994
+ }
3995
+ ),
3996
+ pe
3997
+ ] }),
3998
+ /* @__PURE__ */ r(
3999
+ Ut,
4000
+ {
4001
+ animation: p ?? (h == null ? void 0 : h.animation),
4002
+ duration: f ?? (h == null ? void 0 : h.duration),
4003
+ motionStyle: c ?? (h == null ? void 0 : h.motionStyle),
4004
+ open: k,
4005
+ children: /* @__PURE__ */ r("div", { "aria-labelledby": `${A}-trigger`, id: `${A}-content`, role: "region", children: n })
4006
+ }
4007
+ )
4008
+ ] });
4009
+ };
4010
+ qr[no] = !0;
4011
+ const oo = Symbol.for("uui.tab");
4012
+ function Zr(e) {
4013
+ return mt(e) && typeof e.type != "string" && !!e.type[oo];
4014
+ }
4015
+ const Li = ({ defaultValue: e, children: t, ...n }) => {
4016
+ const [o, i] = q([e]), l = Dn.toArray(t).filter(Zr);
4017
+ function a(f) {
4018
+ i([f]);
4019
+ }
4020
+ const s = ft(
4021
+ () => ({
4022
+ values: o,
4023
+ type: "single",
4024
+ toggle: a,
4025
+ set: a,
4026
+ clear: () => {
4027
+ i([]);
4028
+ }
4029
+ }),
4030
+ [o]
4031
+ );
4032
+ function u(f) {
4033
+ const c = l.findIndex((C) => o.includes(C.props.value));
4034
+ if (c === -1)
4035
+ return;
4036
+ let d;
4037
+ switch (f.key) {
4038
+ case "ArrowRight":
4039
+ d = (c + 1) % l.length;
4040
+ break;
4041
+ case "ArrowLeft":
4042
+ d = (c - 1 + l.length) % l.length;
4043
+ break;
4044
+ case "Home":
4045
+ d = 0;
4046
+ break;
4047
+ case "End":
4048
+ d = l.length - 1;
4049
+ break;
4050
+ default:
4051
+ return;
4052
+ }
4053
+ f.preventDefault();
4054
+ const m = l[d].props.value;
4055
+ a(m);
4056
+ const g = document.getElementById(`uui-tab-${m}-trigger`);
4057
+ g == null || g.focus();
4058
+ }
4059
+ const p = l.map((f) => ({
4060
+ label: f.props.label,
4061
+ value: f.props.value
4062
+ })).map(({ label: f, value: c }) => /* @__PURE__ */ r(
4063
+ "button",
4064
+ {
4065
+ "aria-controls": `uui-tab-${c}-panel`,
4066
+ "aria-selected": o.includes(c),
4067
+ className: "uui-tabs-trigger",
4068
+ id: `uui-tab-${c}-trigger`,
4069
+ onClick: () => {
4070
+ a(c);
4071
+ },
4072
+ role: "tab",
4073
+ tabIndex: o.includes(c) ? 0 : -1,
4074
+ children: f
4075
+ },
4076
+ c
4077
+ ));
4078
+ return /* @__PURE__ */ r(Wt.Provider, { value: s, children: /* @__PURE__ */ $(Be, { direction: "col", gap: 2, ...n, children: [
4079
+ /* @__PURE__ */ r("div", { "aria-orientation": "horizontal", className: "uui-tabs-list", onKeyDown: u, role: "tablist", children: p }),
4080
+ /* @__PURE__ */ r("div", { className: "uui-tabs-panels", children: l })
4081
+ ] }) });
4082
+ }, ro = ({ value: e, label: t, children: n }) => {
4083
+ const { values: o } = An(), i = o.includes(e);
4084
+ return /* @__PURE__ */ r(
4085
+ "div",
4086
+ {
4087
+ "aria-labelledby": `uui-tab-${e}-trigger`,
4088
+ className: "uui-tabs-panel",
4089
+ hidden: !i,
4090
+ id: `uui-tab-${e}-panel`,
4091
+ role: "tabpanel",
4092
+ children: n
4093
+ }
4094
+ );
4095
+ };
4096
+ ro[oo] = !0;
4097
+ ro.displayName = "Tab";
4098
+ const Gr = I(
4099
+ ({
4100
+ variant: e = "docked",
4101
+ color: t,
4102
+ elevation: n,
4103
+ shape: o,
4104
+ density: i,
4105
+ wFull: l,
4106
+ placement: a = "bottom",
4107
+ fixed: s,
4108
+ divider: u,
4109
+ children: p,
4110
+ className: f,
4111
+ disabled: c,
4112
+ orientation: d = "horizontal",
4113
+ ...m
4114
+ }, g) => {
4115
+ const C = e === "floating", x = n ?? (C ? 3 : 0), b = o ?? (C ? "round" : void 0), v = t ?? (e === "floating" ? "surfaceContainerHigh" : "surfaceContainer"), N = [
4116
+ "uui-toolbar",
4117
+ `uui-toolbar-${e}`,
4118
+ c && "uui-disabled",
4119
+ f,
4120
+ l && "uui-toolbar-full",
4121
+ s && "uui-toolbar-fixed",
4122
+ u && "uui-toolbar-divider",
4123
+ x && at(x),
4124
+ b && Ve(b),
4125
+ i && ct(i),
4126
+ d === "horizontal" ? "uui-horizontal" : "uui-vertical"
4127
+ ].filter(Boolean).join(" ");
4128
+ return /* @__PURE__ */ r(
4129
+ Be,
4130
+ {
4131
+ ref: g,
4132
+ ...m,
4133
+ className: N,
4134
+ color: v,
4135
+ component: "div",
4136
+ "data-position": a,
4137
+ direction: d === "horizontal" ? "row" : "col",
4138
+ disabled: c,
4139
+ children: p
4140
+ }
4141
+ );
4142
+ }
4143
+ );
4144
+ Gr.displayName = "Toolbar";
4145
+ const Yr = I(
4146
+ ({
4147
+ variant: e = "linear",
4148
+ value: t,
4149
+ min: n = 0,
4150
+ max: o = 100,
4151
+ color: i = "primary",
4152
+ size: l = "medium",
4153
+ thickness: a,
4154
+ className: s,
4155
+ style: u,
4156
+ ...p
4157
+ }, f) => {
4158
+ const c = typeof t == "number", d = ft(() => c ? Math.min(Math.max(t, n), o) : 0, [t, n, o, c]), m = ft(() => c ? (d - n) / (o - n) * 100 : 0, [d, n, o, c]), g = c ? {
4159
+ role: "progressbar",
4160
+ "aria-valuemin": n,
4161
+ "aria-valuemax": o,
4162
+ "aria-valuenow": d
4163
+ } : {
4164
+ role: "progressbar",
4165
+ "aria-valuemin": n,
4166
+ "aria-valuemax": o
4167
+ }, C = [
4168
+ "uui-progress",
4169
+ e === "circular" ? "uui-progress-circular" : "uui-progress-linear",
4170
+ c ? "" : "uui-progress-indeterminate",
4171
+ gt(l),
4172
+ s
4173
+ ].filter(Boolean).join(" "), x = {
4174
+ ...u ?? {},
4175
+ ...a ? { "--uui-progress-thickness": `${a}px` } : {}
4176
+ };
4177
+ if (e === "circular") {
4178
+ const N = R(), w = R();
4179
+ return N.stroke.container(i), w.stroke(i), /* @__PURE__ */ r(
4180
+ Be,
4181
+ {
4182
+ className: C,
4183
+ ref: f,
4184
+ style: x,
4185
+ ...g,
4186
+ ...p,
4187
+ children: /* @__PURE__ */ $("svg", { className: "uui-progress-svg", viewBox: "0 0 100 100", children: [
4188
+ /* @__PURE__ */ r(
4189
+ "circle",
4190
+ {
4191
+ className: "uui-progress-track",
4192
+ cx: "50",
4193
+ cy: "50",
4194
+ fill: "none",
4195
+ r: "45",
4196
+ style: N.get()
4197
+ }
4198
+ ),
4199
+ /* @__PURE__ */ r(
4200
+ "circle",
4201
+ {
4202
+ className: "uui-progress-indicator",
4203
+ cx: "50",
4204
+ cy: "50",
4205
+ fill: "none",
4206
+ pathLength: "100",
4207
+ r: "45",
4208
+ strokeDasharray: "100",
4209
+ strokeDashoffset: c ? 100 - m : void 0,
4210
+ style: w.get()
4211
+ }
4212
+ )
4213
+ ] })
4214
+ }
4215
+ );
4216
+ }
4217
+ const b = R(), v = R();
4218
+ return b.bg.container(i), v.bg(i), /* @__PURE__ */ r(
4219
+ Be,
4220
+ {
4221
+ className: C,
4222
+ ref: f,
4223
+ style: x,
4224
+ ...g,
4225
+ ...p,
4226
+ children: /* @__PURE__ */ r("div", { className: "uui-progress-track", style: b.get(), children: /* @__PURE__ */ r(
4227
+ "div",
4228
+ {
4229
+ className: "uui-progress-indicator",
4230
+ style: {
4231
+ ...v.get(),
4232
+ ...c ? { width: `${m}%` } : {}
4233
+ }
4234
+ }
4235
+ ) })
4236
+ }
4237
+ );
4238
+ }
4239
+ );
4240
+ Yr.displayName = "Progress";
4241
+ const gn = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(), Xr = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth(), Jr = (e) => gn(e, /* @__PURE__ */ new Date()), Qr = (e) => new Date(e.getFullYear(), e.getMonth(), 1), ei = (e) => new Date(e.getFullYear(), e.getMonth() + 1, 0), io = (e, t = 1) => {
4242
+ const n = new Date(e), o = n.getDay(), i = (o < t ? 7 : 0) + o - t;
4243
+ return n.setDate(n.getDate() - i), n.setHours(0, 0, 0, 0), n;
4244
+ }, ti = (e, t = 1) => {
4245
+ const n = io(e, t);
4246
+ return n.setDate(n.getDate() + 6), n.setHours(23, 59, 59, 999), n;
4247
+ }, Fn = (e, t) => {
4248
+ const n = new Date(e);
4249
+ return n.setMonth(n.getMonth() + t), n;
4250
+ }, ni = (e, t) => {
4251
+ const n = Qr(e), o = ei(n), i = io(n, 1), l = ti(o, 1), a = [], s = new Date(i);
4252
+ for (; s <= l; )
4253
+ a.push({
4254
+ date: new Date(s),
4255
+ isCurrentMonth: Xr(s, n),
4256
+ isToday: Jr(s),
4257
+ isSelected: !!t && gn(s, t)
4258
+ }), s.setDate(s.getDate() + 1);
4259
+ return a;
4260
+ }, oi = () => ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], ri = (e) => e.toLocaleDateString("en-US", { month: "long", year: "numeric" }), ii = I(
4261
+ ({ value: e, onChange: t, viewDate: n, className: o, ...i }, l) => {
4262
+ const [a, s] = q(n || e || /* @__PURE__ */ new Date()), u = (g) => {
4263
+ g.preventDefault(), s(Fn(a, -1));
4264
+ }, p = (g) => {
4265
+ g.preventDefault(), s(Fn(a, 1));
4266
+ }, f = (g) => {
4267
+ t == null || t(g);
4268
+ }, c = ni(a, e), d = oi(), m = R();
4269
+ return m.bg("surfaceContainerHigh"), m.text.on("surface"), /* @__PURE__ */ $(Be, { className: Oe("uui-calendar", o), ...i, style: m.get(), children: [
4270
+ /* @__PURE__ */ $("div", { className: "uui-calendar-header", children: [
4271
+ /* @__PURE__ */ r("div", { className: "uui-calendar-title", children: ri(a) }),
4272
+ /* @__PURE__ */ $("div", { className: "uui-calendar-nav", children: [
4273
+ /* @__PURE__ */ r(
4274
+ "button",
4275
+ {
4276
+ "aria-label": "Previous month",
4277
+ className: "uui-calendar-nav-btn",
4278
+ onClick: u,
4279
+ type: "button",
4280
+ children: "<"
4281
+ }
4282
+ ),
4283
+ /* @__PURE__ */ r(
4284
+ "button",
4285
+ {
4286
+ "aria-label": "Next month",
4287
+ className: "uui-calendar-nav-btn",
4288
+ onClick: p,
4289
+ type: "button",
4290
+ children: ">"
4291
+ }
4292
+ )
4293
+ ] })
4294
+ ] }),
4295
+ /* @__PURE__ */ $("div", { className: "uui-calendar-grid", children: [
4296
+ d.map((g) => /* @__PURE__ */ r("div", { className: "uui-calendar-weekday", children: g }, g)),
4297
+ c.map((g, C) => {
4298
+ const x = !!e && gn(g.date, e);
4299
+ return /* @__PURE__ */ r(
4300
+ qn,
4301
+ {
4302
+ className: Oe("uui-calendar-day"),
4303
+ disabled: !g.isCurrentMonth,
4304
+ filled: x,
4305
+ onClick: () => {
4306
+ f(g.date);
4307
+ },
4308
+ outlined: g.isToday,
4309
+ children: /* @__PURE__ */ r("span", { children: g.date.getDate() })
4310
+ },
4311
+ C
4312
+ );
4313
+ })
4314
+ ] })
4315
+ ] });
4316
+ }
4317
+ );
4318
+ ii.displayName = "Calendar";
4319
+ const so = Symbol.for("uui.avatar");
4320
+ function si(e) {
4321
+ return mt(e) && typeof e.type != "string" && !!e.type[so];
4322
+ }
4323
+ const In = En.filter((e) => e !== "white" && e !== "black");
4324
+ function li(e) {
4325
+ let t = 0;
4326
+ for (let n = 0; n < e.length; n++)
4327
+ t = e.charCodeAt(n) + ((t << 5) - t);
4328
+ return Math.abs(t);
4329
+ }
4330
+ function ai(e) {
4331
+ const t = e == null ? void 0 : e.trim().split(/\s+/).filter(Boolean);
4332
+ if (!(t != null && t.length))
4333
+ return "";
4334
+ const n = t[0][0], o = t.length > 1 ? t[t.length - 1][0] : "";
4335
+ return (n + o).toUpperCase();
4336
+ }
4337
+ const hn = I(
4338
+ ({ children: e, className: t, shape: n = "round", size: o = "medium", src: i, alt: l, name: a, color: s, ...u }, p) => {
4339
+ const [f, c] = q(!1), d = Oe("uui-avatar", gt(o), t), m = !!(i && !f), g = ai(a), C = ft(() => {
4340
+ if (!a || m || s)
4341
+ return;
4342
+ const b = li(a) % In.length;
4343
+ return In[b];
4344
+ }, [a, m, s]);
4345
+ let x;
4346
+ return m ? x = /* @__PURE__ */ r(
4347
+ "img",
4348
+ {
4349
+ alt: l ?? a ?? "",
4350
+ draggable: !1,
4351
+ onError: () => {
4352
+ c(!0);
4353
+ },
4354
+ src: i
4355
+ }
4356
+ ) : a ? x = /* @__PURE__ */ r("span", { "aria-hidden": !0, children: g }) : x = e, /* @__PURE__ */ r(
4357
+ Qn,
4358
+ {
4359
+ "aria-label": m ? void 0 : a,
4360
+ className: d,
4361
+ color: s ?? C,
4362
+ font: "labelLarge",
4363
+ ref: p,
4364
+ shape: n,
4365
+ ...u,
4366
+ children: x
4367
+ }
4368
+ );
4369
+ }
4370
+ );
4371
+ hn[so] = !0;
4372
+ hn.displayName = "Avatar";
4373
+ const ci = I(
4374
+ ({
4375
+ children: e,
4376
+ max: t,
4377
+ overlap: n = 8,
4378
+ size: o,
4379
+ shape: i,
4380
+ border: l,
4381
+ borderColor: a,
4382
+ overflow: s,
4383
+ className: u,
4384
+ ...p
4385
+ }, f) => {
4386
+ const c = Dn.toArray(e).filter(si), d = c.length;
4387
+ let m = c, g = 0;
4388
+ if (t !== void 0 && d > t) {
4389
+ const b = Math.max(t - 1, 0);
4390
+ m = c.slice(0, b), g = d - b;
4391
+ }
4392
+ const C = m.map(
4393
+ (b, v) => Tt(b, {
4394
+ key: b.key ?? v,
4395
+ size: o ?? b.props.size,
4396
+ shape: i ?? b.props.shape,
4397
+ border: l ?? b.props.border,
4398
+ borderColor: a ?? b.props.borderColor,
4399
+ style: {
4400
+ ...b.props.style ?? {},
4401
+ marginInlineStart: v === 0 ? 0 : -n,
4402
+ zIndex: v,
4403
+ position: "relative"
4404
+ }
4405
+ })
4406
+ );
4407
+ if (g > 0) {
4408
+ const b = (s == null ? void 0 : s(g)) ?? /* @__PURE__ */ $(hn, { shape: i, size: o, children: [
4409
+ "+",
4410
+ g
4411
+ ] });
4412
+ C.push(
4413
+ Tt(b, {
4414
+ key: "overflow",
4415
+ style: {
4416
+ marginInlineStart: C.length === 0 ? 0 : -n,
4417
+ zIndex: C.length,
4418
+ position: "relative"
4419
+ }
4420
+ })
4421
+ );
4422
+ }
4423
+ const x = ["uui-avatar-group", u].filter(Boolean).join(" ");
4424
+ return /* @__PURE__ */ r(Jn, { alignItems: "center", ref: f, ...p, className: x, children: C });
4425
+ }
4426
+ );
4427
+ ci.displayName = "AvatarGroup";
4428
+ const ui = I(
4429
+ ({
4430
+ size: e = "small",
4431
+ value: t,
4432
+ defaultValue: n = 0,
4433
+ max: o = 5,
4434
+ step: i = 0.5,
4435
+ readOnly: l,
4436
+ disabled: a,
4437
+ icon: s,
4438
+ font: u,
4439
+ emptyIcon: p,
4440
+ color: f,
4441
+ name: c,
4442
+ id: d,
4443
+ label: m,
4444
+ description: g,
4445
+ error: C,
4446
+ required: x,
4447
+ density: b,
4448
+ onChange: v,
4449
+ onFocus: N,
4450
+ onBlur: w,
4451
+ title: L,
4452
+ textPlacement: F = "start",
4453
+ focusEffects: B = ["ring"],
4454
+ className: T,
4455
+ tooltipAlign: _ = "auto",
4456
+ "aria-label": D,
4457
+ filled: h,
4458
+ ...k
4459
+ }, S) => {
4460
+ const E = W(vt("rating")).current, A = d ?? c ?? E, U = m ? `${A}_label` : void 0, { isFocused: j, focusHandlers: re, focusVisible: ee } = St(N, w), P = W(null), be = W(null), pe = t !== void 0, [De, ne] = q(n), [$e, Z] = q(null), G = pe ? t ?? 0 : De, ie = $e ?? G, ae = Math.max(0, Math.min(ie, o)), ke = L ? /* @__PURE__ */ r("div", { id: `${A}-tip`, children: L }) : null;
4461
+ function se(ge) {
4462
+ if (!P.current)
4463
+ return G;
4464
+ const Y = P.current, Ne = Y.getBoundingClientRect(), fe = Y.getElementsByClassName("uui-rating-icon"), Fe = ge - Ne.left;
4465
+ if (Fe < 5)
4466
+ return 0;
4467
+ const ve = Ne.width / o;
4468
+ let le = Math.floor(Fe / ve);
4469
+ le = Math.max(0, Math.min(le, o - 1));
4470
+ const he = fe[le].getBoundingClientRect(), He = ge - he.left, Me = Math.max(0, Math.min(1, He / he.width)), M = 1 / i, O = le + Math.ceil(Me * M) / M;
4471
+ return parseFloat(Math.min(O, o).toFixed(10));
4472
+ }
4473
+ function we(ge) {
4474
+ pe || ne(ge), v == null || v(ge);
4475
+ }
4476
+ function Ae(ge) {
4477
+ l || a || Z(se(ge.clientX));
4478
+ }
4479
+ function me() {
4480
+ !l && !a && Z(null);
4481
+ }
4482
+ function X(ge) {
4483
+ if (l || a)
4484
+ return;
4485
+ const Y = se(ge.clientX);
4486
+ Z(null), we(Y === G ? 0 : Y);
4487
+ }
4488
+ const J = Ro({
4489
+ value: ie,
4490
+ min: 0,
4491
+ max: o,
4492
+ step: i,
4493
+ disabled: a,
4494
+ readOnly: l,
4495
+ onChange: we
4496
+ }), Se = s ?? tr, oe = p ?? (h ? Se : er), ue = Oe(
4497
+ "uui-rating",
4498
+ gt(e),
4499
+ T,
4500
+ h && "uui-filled",
4501
+ l && "uui-read-only",
4502
+ C && "uui-error",
4503
+ a && "uui-disabled"
4504
+ ), Le = Oe(
4505
+ "uui-rating-control",
4506
+ ...B.includes("ring") && j && ee ? ["uui-focus-ring uui-focus-visible"] : [],
4507
+ ct(b)
4508
+ ), Ce = C ? "error" : f, Q = Array.from({ length: Math.ceil(o) }).map((ge, Y) => {
4509
+ const Ne = Math.min(Math.max(ae - Y, 0), 1) * 100, fe = R();
4510
+ return fe.text(Ce), fe.set("width", `${Ne}%`), /* @__PURE__ */ $(
4511
+ "div",
4512
+ {
4513
+ className: "uui-icon uui-rating-icon",
4514
+ style: { cursor: l || a ? "default" : "pointer", lineHeight: 0 },
4515
+ children: [
4516
+ /* @__PURE__ */ r("div", { className: "uui-rating-empty-icon", children: oe }),
4517
+ /* @__PURE__ */ r("div", { className: "uui-rating-filled-icon", style: fe.get(), children: Se })
4518
+ ]
4519
+ },
4520
+ `${A}-star-${Y}`
4521
+ );
4522
+ }), Re = /* @__PURE__ */ $(
4523
+ "div",
4524
+ {
4525
+ ...re,
4526
+ "aria-disabled": a || void 0,
4527
+ "aria-label": m ? void 0 : D ?? L,
4528
+ "aria-labelledby": U,
4529
+ "aria-valuemax": o,
4530
+ "aria-valuemin": 0,
4531
+ "aria-valuenow": ie,
4532
+ className: Le,
4533
+ id: A,
4534
+ onClick: X,
4535
+ onKeyDown: J.onKeyDown,
4536
+ onMouseLeave: me,
4537
+ onMouseMove: Ae,
4538
+ ref: P,
4539
+ role: "slider",
4540
+ tabIndex: l || a ? -1 : 0,
4541
+ children: [
4542
+ /* @__PURE__ */ r("input", { disabled: a, ref: S, type: "hidden", value: G, ...k }),
4543
+ Q,
4544
+ ke && /* @__PURE__ */ r(Lt, { align: _, tooltip: ke, triggerRef: be })
4545
+ ]
4546
+ }
4547
+ );
4548
+ return /* @__PURE__ */ r(
4549
+ an,
4550
+ {
4551
+ className: ue,
4552
+ control: Re,
4553
+ description: (g ?? C) && /* @__PURE__ */ r(cn, { description: g, error: C }),
4554
+ label: m && /* @__PURE__ */ r(Hn, { focusRef: P, font: u, id: U, label: m, required: x, tag: "span" }),
4555
+ ref: be,
4556
+ spanDesc: !0,
4557
+ textPlacement: F
4558
+ }
4559
+ );
4560
+ }
4561
+ );
4562
+ ui.displayName = "Rating";
4563
+ const di = I(
4564
+ ({
4565
+ items: e,
4566
+ children: t,
4567
+ separator: n = "/",
4568
+ maxItems: o,
4569
+ itemsBeforeCollapse: i = 1,
4570
+ itemsAfterCollapse: l = 1,
4571
+ renderItem: a,
4572
+ renderSeparator: s,
4573
+ renderCollapse: u,
4574
+ component: p = "nav",
4575
+ itemComponent: f = "a",
4576
+ animation: c = "fade",
4577
+ motionStyle: d = "regular",
4578
+ duration: m = 200,
4579
+ ...g
4580
+ }, C) => {
4581
+ const [x, b] = q(!1), { visible: v, hidden: N } = ft(() => {
4582
+ if (!e || !o || e.length <= o)
4583
+ return { visible: e ?? [], hidden: [] };
4584
+ const F = e.slice(0, i), B = e.slice(e.length - l), T = e.slice(i, e.length - l);
4585
+ return {
4586
+ visible: [...F, { label: "__collapse__" }, ...B],
4587
+ hidden: T
4588
+ };
4589
+ }, [e, o, i, l]), w = (F, B) => {
4590
+ const T = F.current || B === v.length - 1;
4591
+ return /* @__PURE__ */ $(
4592
+ Be,
4593
+ {
4594
+ "aria-current": T ? "page" : void 0,
4595
+ component: f,
4596
+ disabled: F.disabled,
4597
+ style: {
4598
+ display: "inline-flex",
4599
+ alignItems: "center",
4600
+ gap: 4,
4601
+ opacity: F.disabled ? 0.5 : void 0,
4602
+ pointerEvents: F.disabled ? "none" : void 0
4603
+ },
4604
+ children: [
4605
+ F.icon,
4606
+ F.label
4607
+ ]
4608
+ }
4609
+ );
4610
+ }, L = () => /* @__PURE__ */ r(
4611
+ Wn,
4612
+ {
4613
+ onClick: () => {
4614
+ b((F) => !F);
4615
+ },
4616
+ style: {
4617
+ display: "inline-flex",
4618
+ alignItems: "center",
4619
+ paddingInline: 4,
4620
+ opacity: 0.7,
4621
+ cursor: "pointer"
4622
+ },
4623
+ type: "button",
4624
+ children: "…"
4625
+ }
4626
+ );
4627
+ return /* @__PURE__ */ $(
4628
+ Be,
4629
+ {
4630
+ "aria-label": "breadcrumb",
4631
+ component: p,
4632
+ ref: C,
4633
+ style: {
4634
+ display: "flex",
4635
+ flexWrap: "wrap",
4636
+ alignItems: "center",
4637
+ gap: 4
4638
+ },
4639
+ ...g,
4640
+ children: [
4641
+ t || v.map((F, B) => {
4642
+ const T = F.label === "__collapse__";
4643
+ return /* @__PURE__ */ $(bo, { children: [
4644
+ T ? u ? u(N) : L() : a ? a(F, B) : w(F, B),
4645
+ B < v.length - 1 && (s ? s(B) : /* @__PURE__ */ r(
4646
+ "span",
4647
+ {
4648
+ style: {
4649
+ opacity: 0.5,
4650
+ paddingInline: 4
4651
+ },
4652
+ children: n
4653
+ }
4654
+ ))
4655
+ ] }, B);
4656
+ }),
4657
+ /* @__PURE__ */ r(Ut, { animation: c, duration: m, motionStyle: d, open: x, children: /* @__PURE__ */ r(
4658
+ Be,
4659
+ {
4660
+ style: {
4661
+ marginTop: 4,
4662
+ display: "flex",
4663
+ flexDirection: "column",
4664
+ border: "1px solid",
4665
+ padding: 4
4666
+ },
4667
+ children: N.map((F, B) => /* @__PURE__ */ r("div", {}))
4668
+ }
4669
+ ) })
4670
+ ]
4671
+ }
4672
+ );
4673
+ }
4674
+ );
4675
+ di.displayName = "Breadcrumbs";
4676
+ const fi = I(
4677
+ ({
4678
+ as: e,
4679
+ children: t,
4680
+ leading: n,
4681
+ trailing: o,
4682
+ color: i,
4683
+ underline: l = "hover",
4684
+ font: a = "labelLarge",
4685
+ isExternal: s,
4686
+ label: u,
4687
+ className: p,
4688
+ disabled: f,
4689
+ hoverEffects: c = ["overlay"],
4690
+ focusEffects: d = ["ring", "overlay"],
4691
+ pressedEffects: m = ["overlay"],
4692
+ underlineAnimation: g,
4693
+ underlineOrigin: C,
4694
+ "aria-label": x,
4695
+ ...b
4696
+ }, v) => {
4697
+ const N = e ?? "a", { onClick: w, ...L } = b, F = Oe(
4698
+ ...d.includes("overlay") ? ["uui-focus-overlay"] : [],
4699
+ ...c.includes("overlay") ? ["uui-hover-overlay"] : [],
4700
+ ...m.includes("overlay") ? ["uui-pressed-overlay"] : []
4701
+ ), B = Oe(
4702
+ "uui-link",
4703
+ "uui-text-trigger",
4704
+ xe(a),
4705
+ `uui-link-underline-${l}`,
4706
+ g && `uui-link-anim-${g}`,
4707
+ p,
4708
+ F,
4709
+ ...d.includes("ring") ? ["uui-focus-ring"] : []
4710
+ ), T = x ?? u ?? (typeof t == "string" ? t : void 0), _ = R();
4711
+ _.text(i), C && _.set("--uui-underline-origin", C);
4712
+ const D = /* @__PURE__ */ $("span", { className: "uui-link-content", children: [
4713
+ n && /* @__PURE__ */ r(On, { content: n }),
4714
+ /* @__PURE__ */ r("span", { className: "uui-link-text", children: t ?? u }),
4715
+ o && /* @__PURE__ */ r(_n, { content: o })
4716
+ ] });
4717
+ return /* @__PURE__ */ r(
4718
+ N,
4719
+ {
4720
+ "aria-disabled": f ?? void 0,
4721
+ "aria-label": T,
4722
+ className: B,
4723
+ onClick: (h) => {
4724
+ if (f) {
4725
+ h.preventDefault(), h.stopPropagation();
4726
+ return;
4727
+ }
4728
+ w == null || w(h);
4729
+ },
4730
+ ref: v,
4731
+ style: _.get(),
4732
+ tabIndex: f ? -1 : void 0,
4733
+ ...s && !f && {
4734
+ target: "_blank",
4735
+ rel: "noopener noreferrer"
4736
+ },
4737
+ ...L,
4738
+ children: D
4739
+ }
4740
+ );
4741
+ }
4742
+ );
4743
+ fi.displayName = "Link";
4744
+ export {
4745
+ Si as Accordion,
4746
+ qr as AccordionItem,
4747
+ vr as Article,
4748
+ Cr as Aside,
4749
+ hn as Avatar,
4750
+ ci as AvatarGroup,
4751
+ dn as Badge,
4752
+ Tr as BottomSheet,
4753
+ Be as BoxBase,
4754
+ di as Breadcrumbs,
4755
+ Wn as Button,
4756
+ Ft as ButtonBase,
4757
+ ii as Calendar,
4758
+ qo as Card,
4759
+ nr as Checkbox,
4760
+ un as CheckboxBase,
4761
+ Ko as Chip,
4762
+ Ut as Collapse,
4763
+ xr as Content,
4764
+ R as ControlStyle,
4765
+ ar as DateField,
4766
+ cr as DateTimeField,
4767
+ Ir as Dialog,
4768
+ Br as DialogActions,
4769
+ zt as DialogBase,
4770
+ Dr as DialogContent,
4771
+ $r as DialogTitle,
4772
+ wr as Div,
4773
+ Xn as Divider,
4774
+ Er as Drawer,
4775
+ ir as EmailField,
4776
+ mr as Fab,
4777
+ tt as FieldBase,
4778
+ eo as Fieldset,
4779
+ ln as FieldsetContext,
4780
+ Jn as Flex,
4781
+ Nr as Footer,
4782
+ Qn as Grid,
4783
+ Ar as H1,
4784
+ jr as H2,
4785
+ Pr as H3,
4786
+ Or as H4,
4787
+ _r as H5,
4788
+ Hr as H6,
4789
+ kr as Header,
4790
+ Gn as IS_DIVIDER,
4791
+ Zn as IS_MENU,
4792
+ fn as IS_MENU_ITEM,
4793
+ qn as IconButton,
4794
+ zr as Label,
4795
+ fi as Link,
4796
+ ki as List,
4797
+ mn as ListItem,
4798
+ Sr as Main,
4799
+ pn as Menu,
4800
+ Yn as MenuItem,
4801
+ dr as MonthField,
4802
+ Lr as Nav,
4803
+ rr as NumberField,
4804
+ Wr as P,
4805
+ lr as PasswordField,
4806
+ sr as PhoneField,
4807
+ Yr as Progress,
4808
+ yr as Radio,
4809
+ Mr as RadioGroup,
4810
+ Rn as RadioGroupContext,
4811
+ ui as Rating,
4812
+ Fr as Section,
4813
+ Wt as SelectionContext,
4814
+ Ur as Span,
4815
+ Wo as Spinner,
4816
+ Vr as Switch,
4817
+ ro as Tab,
4818
+ Li as Tabs,
4819
+ ut as TextBase,
4820
+ or as TextField,
4821
+ Vn as ThemeContext,
4822
+ En as ThemeExtendedColorKeys,
4823
+ Ni as ThemeProvider,
4824
+ No as ThemeSchemeKeys,
4825
+ $n as ThemeSemanticColorKeys,
4826
+ wo as ThemeSurfaceColorKeys,
4827
+ ur as TimeField,
4828
+ jn as Toast,
4829
+ Oo as ToastViewport,
4830
+ gr as ToggleButton,
4831
+ Gr as Toolbar,
4832
+ br as Tooltip,
4833
+ pr as UrlField,
4834
+ fr as WeekField,
4835
+ Mn as calculateFloatingPosition,
4836
+ So as capitalize,
4837
+ rn as clampInt,
4838
+ Oe as cn,
4839
+ kt as createRipple,
4840
+ Sn as defaultTheme,
4841
+ Fo as ensureInputMethod,
4842
+ Bo as generateMaterialColors,
4843
+ Do as generateSchemes,
4844
+ Lo as getAlignClass,
4845
+ nn as getAnimationClass,
4846
+ yi as getAnimationList,
4847
+ et as getBorderClass,
4848
+ Ht as getBorderColor,
4849
+ ct as getDensityClass,
4850
+ at as getElevationClass,
4851
+ xe as getFontClass,
4852
+ Io as getInputMethod,
4853
+ on as getMotionStyleClass,
4854
+ bi as getSemanticColorClasses,
4855
+ Ve as getShapeClass,
4856
+ gt as getSizeClass,
4857
+ Tn as getSurfaceColorVar,
4858
+ Ci as getTintOverlayColor,
4859
+ Ho as getWrapperStyle,
4860
+ vi as hexToRgb,
4861
+ ko as hexToRgbValues,
4862
+ Xt as inverseColorMap,
4863
+ Yt as isDivider,
4864
+ Nt as isMenu,
4865
+ Gt as isMenuItem,
4866
+ ht as mergeRefs,
4867
+ tn as motionClassMap,
4868
+ Rt as toKebabCase,
4869
+ wi as toast,
4870
+ vt as uniqueID,
4871
+ sn as useAnimate,
4872
+ To as useClickOutside,
4873
+ Mo as useEscapeHandler,
4874
+ jo as useFocusTrap,
4875
+ St as useFocusVisible,
4876
+ Qt as useResizeObserver,
4877
+ An as useSelection,
4878
+ Ao as useSelectionState,
4879
+ Ro as useSliderKeys,
4880
+ xi as useTheme
4881
+ };