@jameskyeong/uix 0.1.6 → 0.1.8

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.
package/dist/index.js CHANGED
@@ -1,34 +1,133 @@
1
- import { jsx as s, jsxs as v, Fragment as M } from "react/jsx-runtime";
2
- import { motion as f, useInView as D, AnimatePresence as k } from "motion/react";
3
- import { forwardRef as c, useState as y, useEffect as w, useRef as S, createContext as T, useLayoutEffect as R, useContext as C, useId as V } from "react";
4
- import { clsx as h } from "clsx";
5
- import { twMerge as A } from "tailwind-merge";
6
- import { Check as $, Copy as j, ChevronUp as G } from "lucide-react";
7
- import { codeToHtml as X } from "shiki";
8
- import { createPortal as O } from "react-dom";
9
- function u(...e) {
10
- return A(h(e));
1
+ import { jsx as r, jsxs as H, Fragment as xe } from "react/jsx-runtime";
2
+ import { clsx as J } from "clsx";
3
+ import { AnimatePresence as It, motion as j, useInView as Ut } from "motion/react";
4
+ import i, { forwardRef as N, createContext as yt, useState as nt, useContext as wt, useEffect as lt, useRef as mt, useLayoutEffect as be, useCallback as ge, useId as he } from "react";
5
+ import { twMerge as ve } from "tailwind-merge";
6
+ import { Check as ye, Copy as we, Upload as Ne, ChevronUp as Te } from "lucide-react";
7
+ import { codeToHtml as Ee } from "shiki";
8
+ import ke, { createPortal as Se } from "react-dom";
9
+ const Wt = yt(null), Kt = yt(null), Gt = () => {
10
+ const n = wt(Wt);
11
+ if (!n)
12
+ throw new Error("Accordion components must be used within an Accordion");
13
+ return n;
14
+ }, qt = () => {
15
+ const n = wt(Kt);
16
+ if (!n)
17
+ throw new Error("AccordionTrigger/Content must be used within an AccordionItem");
18
+ return n;
19
+ }, De = N(
20
+ ({ children: n, className: s, multiple: t = !0, defaultValue: a = [], ...l }, o) => {
21
+ const [c, d] = nt(() => new Set(a)), p = (u) => {
22
+ d((m) => {
23
+ const e = new Set(m);
24
+ return e.has(u) ? e.delete(u) : (t || e.clear(), e.add(u)), e;
25
+ });
26
+ };
27
+ return /* @__PURE__ */ r(Wt.Provider, { value: { openItems: c, toggle: p, multiple: t }, children: /* @__PURE__ */ r("div", { ref: o, className: J("space-y-2", s), ...l, children: n }) });
28
+ }
29
+ );
30
+ De.displayName = "Accordion";
31
+ const Ce = N(
32
+ ({ children: n, className: s, value: t, disabled: a = !1, ...l }, o) => {
33
+ const { openItems: c } = Gt(), d = c.has(t);
34
+ return /* @__PURE__ */ r(Kt.Provider, { value: { value: t, isOpen: d, disabled: a }, children: /* @__PURE__ */ r(
35
+ "div",
36
+ {
37
+ ref: o,
38
+ className: J(
39
+ "border border-black/5 dark:border-white/5 rounded-xl overflow-hidden",
40
+ a && "opacity-50",
41
+ s
42
+ ),
43
+ ...l,
44
+ children: n
45
+ }
46
+ ) });
47
+ }
48
+ );
49
+ Ce.displayName = "AccordionItem";
50
+ const Ie = N(
51
+ ({ children: n, className: s, ...t }, a) => {
52
+ const { toggle: l } = Gt(), { value: o, isOpen: c, disabled: d } = qt();
53
+ return /* @__PURE__ */ r(
54
+ "button",
55
+ {
56
+ ref: a,
57
+ type: "button",
58
+ disabled: d,
59
+ onClick: () => !d && l(o),
60
+ className: J(
61
+ "w-full flex items-center justify-between px-4 py-3 text-left transition-colors",
62
+ c ? "bg-uix-surface-200/50" : "hover:bg-uix-surface-200/30",
63
+ d && "cursor-not-allowed",
64
+ s
65
+ ),
66
+ "aria-expanded": c,
67
+ ...t,
68
+ children: /* @__PURE__ */ H("div", { className: "flex items-center gap-3", children: [
69
+ /* @__PURE__ */ r(
70
+ "svg",
71
+ {
72
+ className: J(
73
+ "w-4 h-4 text-uix-text-300 transition-transform duration-200",
74
+ c && "rotate-90"
75
+ ),
76
+ fill: "none",
77
+ viewBox: "0 0 24 24",
78
+ stroke: "currentColor",
79
+ strokeWidth: 2,
80
+ "aria-hidden": "true",
81
+ children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" })
82
+ }
83
+ ),
84
+ n
85
+ ] })
86
+ }
87
+ );
88
+ }
89
+ );
90
+ Ie.displayName = "AccordionTrigger";
91
+ const Me = N(
92
+ ({ children: n, className: s, ...t }, a) => {
93
+ const { isOpen: l } = qt();
94
+ return /* @__PURE__ */ r(It, { initial: !1, children: l && /* @__PURE__ */ r(
95
+ j.div,
96
+ {
97
+ ref: a,
98
+ initial: { height: 0, opacity: 0 },
99
+ animate: { height: "auto", opacity: 1 },
100
+ exit: { height: 0, opacity: 0 },
101
+ transition: { duration: 0.2, ease: "easeInOut" },
102
+ children: /* @__PURE__ */ r("div", { className: J("px-4 pb-4 pt-2", s), ...t, children: n })
103
+ }
104
+ ) });
105
+ }
106
+ );
107
+ Me.displayName = "AccordionContent";
108
+ function x(...n) {
109
+ return ve(J(n));
11
110
  }
12
- const L = c(
13
- ({ className: e, variant: t = "default", size: r = "sm", children: i, ...n }, o) => {
14
- const a = t === "default" ? "uix-convex-colored-sm" : "uix-convex-sm", l = {
111
+ const Qt = N(
112
+ ({ className: n, variant: s = "default", size: t = "sm", children: a, ...l }, o) => {
113
+ const c = s === "default" ? "uix-convex-colored-sm" : "uix-convex-sm", d = {
15
114
  default: "bg-uix-prime-300 backdrop-blur-sm text-uix-white-100",
16
115
  secondary: "bg-uix-surface-300/80 backdrop-blur-sm text-uix-text-100",
17
116
  outline: "border border-uix-border-200 bg-uix-surface-100/50 backdrop-blur-sm text-uix-text-300"
18
- }, x = {
117
+ }, p = {
19
118
  sm: "px-2 py-0.5 text-xs",
20
119
  md: "px-2.5 py-1 text-sm"
21
- }, { onDrag: g, onDragStart: d, onDragEnd: b, ...m } = n;
22
- return /* @__PURE__ */ s(
23
- f.span,
120
+ }, { onDrag: u, onDragStart: m, onDragEnd: e, ...f } = l;
121
+ return /* @__PURE__ */ r(
122
+ j.span,
24
123
  {
25
124
  ref: o,
26
- className: u(
125
+ className: x(
27
126
  "inline-flex items-center rounded-xl font-medium",
28
- a,
29
- l[t],
30
- x[r],
31
- e
127
+ c,
128
+ d[s],
129
+ p[t],
130
+ n
32
131
  ),
33
132
  whileHover: { scale: 1.05 },
34
133
  whileTap: { scale: 0.97 },
@@ -37,41 +136,41 @@ const L = c(
37
136
  duration: 0.1,
38
137
  ease: "linear"
39
138
  },
40
- ...m,
41
- children: i
139
+ ...f,
140
+ children: a
42
141
  }
43
142
  );
44
143
  }
45
144
  );
46
- L.displayName = "Badge";
47
- const F = c(
48
- ({ className: e, variant: t, color: r = "prime", size: i = "md", children: n, ...o }, a) => {
49
- const x = `inline-flex items-center justify-center rounded-full font-semibold transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300 disabled:pointer-events-none disabled:opacity-50 cursor-pointer backdrop-blur-sm ${t === "filled" ? "uix-convex-colored-sm" : "uix-convex-sm"}`, g = "bg-uix-surface-200/70 text-uix-text-100 hover:bg-uix-surface-300/80", d = {
145
+ Qt.displayName = "Badge";
146
+ const Be = N(
147
+ ({ className: n, variant: s, color: t = "prime", size: a = "md", children: l, ...o }, c) => {
148
+ const p = `inline-flex items-center justify-center rounded-full font-semibold transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300 disabled:pointer-events-none disabled:opacity-50 cursor-pointer backdrop-blur-sm ${s === "filled" ? "uix-convex-colored-sm" : "uix-convex-sm"}`, u = "bg-uix-surface-200/70 text-uix-text-100 hover:bg-uix-surface-300/80", m = {
50
149
  prime: "bg-uix-prime-300 text-uix-white-100 hover:bg-uix-prime-400",
51
150
  sub1: "bg-uix-sub1-300 text-uix-white-100 hover:bg-uix-sub1-400",
52
151
  sub2: "bg-uix-sub2-300 text-uix-black-300 hover:bg-uix-sub2-400"
53
- }, b = {
152
+ }, e = {
54
153
  prime: "border border-uix-prime-300/50 text-uix-prime-300 bg-uix-surface-100/20 hover:bg-uix-prime-300 hover:text-uix-white-100 hover:border-transparent",
55
154
  sub1: "border border-uix-sub1-300/50 text-uix-sub1-300 bg-uix-surface-100/20 hover:bg-uix-sub1-300 hover:text-uix-white-100 hover:border-transparent",
56
155
  sub2: "border border-uix-sub2-300/50 text-uix-sub2-400 bg-uix-surface-100/20 hover:bg-uix-sub2-300 hover:text-uix-black-300 hover:border-transparent"
57
- }, m = {
156
+ }, f = {
58
157
  prime: "bg-transparent text-uix-prime-300 hover:bg-uix-prime-100/15",
59
158
  sub1: "bg-transparent text-uix-sub1-300 hover:bg-uix-sub1-100/15",
60
159
  sub2: "bg-transparent text-uix-sub2-400 hover:bg-uix-sub2-100/15"
61
- }, p = {
62
- filled: d[r],
63
- outline: b[r],
64
- ghost: m[r]
65
- }, N = {
160
+ }, y = {
161
+ filled: m[t],
162
+ outline: e[t],
163
+ ghost: f[t]
164
+ }, E = {
66
165
  sm: "px-4 py-2 text-sm",
67
166
  md: "px-6 py-3 text-base",
68
167
  lg: "px-8 py-4 text-lg"
69
- }, _ = t ? p[t] : g;
70
- return /* @__PURE__ */ s(
71
- f.button,
168
+ }, q = s ? y[s] : u;
169
+ return /* @__PURE__ */ r(
170
+ j.button,
72
171
  {
73
- ref: a,
74
- className: u(x, _, N[i], e),
172
+ ref: c,
173
+ className: x(p, q, E[a], n),
75
174
  whileHover: {
76
175
  scale: 1.03,
77
176
  y: -1
@@ -84,30 +183,30 @@ const F = c(
84
183
  ease: [0, 0, 1, 1]
85
184
  },
86
185
  ...o,
87
- children: n
186
+ children: l
88
187
  }
89
188
  );
90
189
  }
91
190
  );
92
- F.displayName = "Button";
93
- const U = c(
94
- ({ className: e, children: t, hover: r = !0, accentColor: i = "none", accentPosition: n = "none", ...o }, a) => {
95
- const l = {
191
+ Be.displayName = "Button";
192
+ const Re = N(
193
+ ({ className: n, children: s, hover: t = !0, accentColor: a = "none", accentPosition: l = "none", ...o }, c) => {
194
+ const d = {
96
195
  prime: "bg-uix-prime-300",
97
196
  sub1: "bg-uix-sub1-300",
98
197
  sub2: "bg-uix-sub2-300",
99
198
  none: ""
100
199
  };
101
- return /* @__PURE__ */ v(
102
- f.div,
200
+ return /* @__PURE__ */ H(
201
+ j.div,
103
202
  {
104
- ref: a,
105
- className: u(
203
+ ref: c,
204
+ className: x(
106
205
  "relative bg-uix-surface-100/80 backdrop-blur-xl backdrop-saturate-150 uix-glass-border rounded-[2rem] overflow-hidden uix-convex",
107
- e
206
+ n
108
207
  ),
109
208
  initial: !1,
110
- whileHover: r ? {
209
+ whileHover: t ? {
111
210
  y: -4,
112
211
  scale: 1.01
113
212
  } : void 0,
@@ -118,87 +217,87 @@ const U = c(
118
217
  },
119
218
  ...o,
120
219
  children: [
121
- n === "top" && i !== "none" && /* @__PURE__ */ s("div", { className: u("absolute top-0 left-0 right-0 h-1", l[i]) }),
122
- n === "left" && i !== "none" && /* @__PURE__ */ s("div", { className: u("absolute top-0 left-0 bottom-0 w-1", l[i]) }),
123
- t
220
+ l === "top" && a !== "none" && /* @__PURE__ */ r("div", { className: x("absolute top-0 left-0 right-0 h-1", d[a]) }),
221
+ l === "left" && a !== "none" && /* @__PURE__ */ r("div", { className: x("absolute top-0 left-0 bottom-0 w-1", d[a]) }),
222
+ s
124
223
  ]
125
224
  }
126
225
  );
127
226
  }
128
227
  );
129
- U.displayName = "Card";
130
- const W = c(
131
- ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("div", { ref: i, className: u("p-6 xl:p-8", e), ...r, children: t })
228
+ Re.displayName = "Card";
229
+ const Ae = N(
230
+ ({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("div", { ref: a, className: x("p-6 xl:p-8", n), ...t, children: s })
132
231
  );
133
- W.displayName = "CardContent";
134
- const Y = c(
135
- ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("div", { ref: i, className: u("flex items-center gap-4 mb-4", e), ...r, children: t })
232
+ Ae.displayName = "CardContent";
233
+ const _e = N(
234
+ ({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("div", { ref: a, className: x("flex items-center gap-4 mb-4", n), ...t, children: s })
136
235
  );
137
- Y.displayName = "CardHeader";
138
- const q = c(
139
- ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s(
236
+ _e.displayName = "CardHeader";
237
+ const Le = N(
238
+ ({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r(
140
239
  "h3",
141
240
  {
142
- ref: i,
143
- className: u("text-xl xl:text-2xl font-bold text-uix-text-100", e),
144
- ...r,
145
- children: t
241
+ ref: a,
242
+ className: x("text-xl xl:text-2xl font-bold text-uix-text-100", n),
243
+ ...t,
244
+ children: s
146
245
  }
147
246
  )
148
247
  );
149
- q.displayName = "CardTitle";
150
- const J = c(
151
- ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("p", { ref: i, className: u("text-uix-gray-200 leading-relaxed", e), ...r, children: t })
248
+ Le.displayName = "CardTitle";
249
+ const He = N(
250
+ ({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("p", { ref: a, className: x("text-uix-gray-200 leading-relaxed", n), ...t, children: s })
152
251
  );
153
- J.displayName = "CardDescription";
154
- const K = c(
155
- ({ className: e, code: t, language: r = "tsx", showLineNumbers: i = !1, ...n }, o) => {
156
- const [a, l] = y(!1), [x, g] = y("");
157
- w(() => {
252
+ He.displayName = "CardDescription";
253
+ const Pe = N(
254
+ ({ className: n, code: s, language: t = "tsx", showLineNumbers: a = !1, ...l }, o) => {
255
+ const [c, d] = nt(!1), [p, u] = nt("");
256
+ lt(() => {
158
257
  (async () => {
159
- const m = await X(t.trim(), {
160
- lang: r,
258
+ const f = await Ee(s.trim(), {
259
+ lang: t,
161
260
  theme: "github-dark"
162
261
  });
163
- g(m);
262
+ u(f);
164
263
  })();
165
- }, [t, r]);
166
- const d = async () => {
167
- await navigator.clipboard.writeText(t.trim()), l(!0), setTimeout(() => l(!1), 2e3);
264
+ }, [s, t]);
265
+ const m = async () => {
266
+ await navigator.clipboard.writeText(s.trim()), d(!0), setTimeout(() => d(!1), 2e3);
168
267
  };
169
- return /* @__PURE__ */ v(
268
+ return /* @__PURE__ */ H(
170
269
  "div",
171
270
  {
172
271
  ref: o,
173
- className: u(
272
+ className: x(
174
273
  "relative rounded-2xl bg-uix-black-400 overflow-hidden uix-convex",
175
- e
274
+ n
176
275
  ),
177
- ...n,
276
+ ...l,
178
277
  children: [
179
- /* @__PURE__ */ v("div", { className: "flex items-center justify-between px-4 py-2 border-b border-uix-black-200", children: [
180
- /* @__PURE__ */ s(L, { variant: "secondary", size: "sm", children: r }),
181
- /* @__PURE__ */ s(
278
+ /* @__PURE__ */ H("div", { className: "flex items-center justify-between px-4 py-2 border-b border-uix-black-200", children: [
279
+ /* @__PURE__ */ r(Qt, { variant: "secondary", size: "sm", children: t }),
280
+ /* @__PURE__ */ r(
182
281
  "button",
183
282
  {
184
283
  type: "button",
185
- onClick: d,
284
+ onClick: m,
186
285
  className: "p-1.5 rounded-xl hover:bg-uix-black-200 transition-colors",
187
286
  "aria-label": "Copy code",
188
- children: a ? /* @__PURE__ */ s($, { size: 14, className: "text-green-400" }) : /* @__PURE__ */ s(j, { size: 14, className: "text-uix-gray-100" })
287
+ children: c ? /* @__PURE__ */ r(ye, { size: 14, className: "text-green-400" }) : /* @__PURE__ */ r(we, { size: 14, className: "text-uix-gray-100" })
189
288
  }
190
289
  )
191
290
  ] }),
192
- /* @__PURE__ */ s(
291
+ /* @__PURE__ */ r(
193
292
  "div",
194
293
  {
195
- className: u(
294
+ className: x(
196
295
  "p-4 overflow-x-auto text-sm",
197
296
  "[&_pre]:!bg-transparent [&_pre]:!m-0 [&_pre]:!p-0",
198
297
  "[&_code]:!bg-transparent",
199
- i && "[&_.line]:before:content-[counter(line)] [&_.line]:before:counter-increment-[line] [&_.line]:before:mr-4 [&_.line]:before:text-uix-gray-300"
298
+ a && "[&_.line]:before:content-[counter(line)] [&_.line]:before:counter-increment-[line] [&_.line]:before:mr-4 [&_.line]:before:text-uix-gray-300"
200
299
  ),
201
- dangerouslySetInnerHTML: { __html: x }
300
+ dangerouslySetInnerHTML: { __html: p }
202
301
  }
203
302
  )
204
303
  ]
@@ -206,153 +305,153 @@ const K = c(
206
305
  );
207
306
  }
208
307
  );
209
- K.displayName = "CodeBlock";
210
- const Q = {
308
+ Pe.displayName = "CodeBlock";
309
+ const ze = {
211
310
  prime: "var(--uix-prime-300)",
212
311
  sub1: "var(--uix-sub1-300)",
213
312
  sub2: "var(--uix-sub2-300)"
214
- }, Z = {
313
+ }, Oe = {
215
314
  prime: "bg-gradient-to-br from-uix-prime-400 via-uix-prime-300 to-uix-prime-400",
216
315
  sub1: "bg-gradient-to-br from-uix-sub1-400 via-uix-sub1-300 to-uix-sub1-400",
217
316
  sub2: "bg-gradient-to-br from-uix-sub2-400 via-uix-sub2-300 to-uix-sub2-400"
218
317
  };
219
- function He({
220
- children: e,
221
- className: t = "",
222
- color: r = "prime",
223
- gradient: i = !1,
224
- delay: n = 0,
318
+ function Ks({
319
+ children: n,
320
+ className: s = "",
321
+ color: t = "prime",
322
+ gradient: a = !1,
323
+ delay: l = 0,
225
324
  charDelay: o = 0.04
226
325
  }) {
227
- const a = S(null), l = D(a, { once: !0, margin: "-50px" }), [x, g] = y(!1), d = 1, b = e.length, m = d + n + b * o + 0.25;
228
- return w(() => {
229
- if (i && l && !x) {
230
- const p = setTimeout(() => {
231
- g(!0);
232
- }, m * 1e3);
233
- return () => clearTimeout(p);
326
+ const c = mt(null), d = Ut(c, { once: !0, margin: "-50px" }), [p, u] = nt(!1), m = 1, e = n.length, f = m + l + e * o + 0.25;
327
+ return lt(() => {
328
+ if (a && d && !p) {
329
+ const y = setTimeout(() => {
330
+ u(!0);
331
+ }, f * 1e3);
332
+ return () => clearTimeout(y);
234
333
  }
235
- }, [i, l, x, m]), i && x ? /* @__PURE__ */ s(
334
+ }, [a, d, p, f]), a && p ? /* @__PURE__ */ r(
236
335
  "span",
237
336
  {
238
- ref: a,
239
- className: `inline-block bg-clip-text text-transparent ${Z[r]} ${t}`,
240
- children: e
337
+ ref: c,
338
+ className: `inline-block bg-clip-text text-transparent ${Oe[t]} ${s}`,
339
+ children: n
241
340
  }
242
- ) : /* @__PURE__ */ s("span", { ref: a, className: `inline-block ${t}`, children: e.split("").map((p, N) => /* @__PURE__ */ s(
243
- f.span,
341
+ ) : /* @__PURE__ */ r("span", { ref: c, className: `inline-block ${s}`, children: n.split("").map((y, E) => /* @__PURE__ */ r(
342
+ j.span,
244
343
  {
245
344
  className: "inline-block",
246
345
  style: { color: "var(--uix-text-100)" },
247
- animate: l ? {
248
- color: Q[r]
346
+ animate: d ? {
347
+ color: ze[t]
249
348
  } : {},
250
349
  transition: {
251
350
  duration: 0.25,
252
- delay: d + n + N * o,
351
+ delay: m + l + E * o,
253
352
  ease: [0.1, 0.1, 0.9, 0.9]
254
353
  },
255
- children: p === " " ? " " : p
354
+ children: y === " " ? " " : y
256
355
  },
257
- N
356
+ E
258
357
  )) });
259
358
  }
260
- const H = T(null);
261
- function E() {
262
- const e = C(H);
263
- if (!e)
359
+ const Zt = yt(null);
360
+ function _t() {
361
+ const n = wt(Zt);
362
+ if (!n)
264
363
  throw new Error("Dropdown components must be used within a Dropdown");
265
- return e;
364
+ return n;
266
365
  }
267
- function ze({
268
- children: e,
269
- open: t,
270
- onOpenChange: r,
271
- className: i,
272
- ...n
366
+ function Gs({
367
+ children: n,
368
+ open: s,
369
+ onOpenChange: t,
370
+ className: a,
371
+ ...l
273
372
  }) {
274
- const [o, a] = y(!1), l = S(null), x = t ?? o, g = (d) => {
275
- a(d), r == null || r(d);
373
+ const [o, c] = nt(!1), d = mt(null), p = s ?? o, u = (m) => {
374
+ c(m), t == null || t(m);
276
375
  };
277
- return /* @__PURE__ */ s(H.Provider, { value: { open: x, setOpen: g, triggerRef: l }, children: /* @__PURE__ */ s("div", { className: h("relative inline-block", i), ...n, children: e }) });
376
+ return /* @__PURE__ */ r(Zt.Provider, { value: { open: p, setOpen: u, triggerRef: d }, children: /* @__PURE__ */ r("div", { className: J("relative inline-block", a), ...l, children: n }) });
278
377
  }
279
- function Ie({ children: e, className: t, onClick: r, ...i }) {
280
- const { open: n, setOpen: o, triggerRef: a } = E();
281
- return /* @__PURE__ */ v(
378
+ function qs({ children: n, className: s, onClick: t, ...a }) {
379
+ const { open: l, setOpen: o, triggerRef: c } = _t();
380
+ return /* @__PURE__ */ H(
282
381
  "button",
283
382
  {
284
- ref: a,
383
+ ref: c,
285
384
  type: "button",
286
- className: h(
385
+ className: J(
287
386
  "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl text-sm font-medium",
288
387
  "uix-glass uix-glass-border uix-convex-sm",
289
388
  "text-uix-text-200 hover:text-uix-text-100 transition-colors",
290
- t
389
+ s
291
390
  ),
292
- onClick: (l) => {
293
- o(!n), r == null || r(l);
391
+ onClick: (d) => {
392
+ o(!l), t == null || t(d);
294
393
  },
295
- "aria-expanded": n,
394
+ "aria-expanded": l,
296
395
  "aria-haspopup": "true",
297
- ...i,
396
+ ...a,
298
397
  children: [
299
- e,
300
- /* @__PURE__ */ s(
398
+ n,
399
+ /* @__PURE__ */ r(
301
400
  "svg",
302
401
  {
303
- className: h("w-3.5 h-3.5 transition-transform duration-200", n && "rotate-180"),
402
+ className: J("w-3.5 h-3.5 transition-transform duration-200", l && "rotate-180"),
304
403
  fill: "none",
305
404
  viewBox: "0 0 24 24",
306
405
  stroke: "currentColor",
307
406
  strokeWidth: 2,
308
407
  "aria-hidden": "true",
309
- children: /* @__PURE__ */ s("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
408
+ children: /* @__PURE__ */ r("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
310
409
  }
311
410
  )
312
411
  ]
313
412
  }
314
413
  );
315
414
  }
316
- function Pe({ children: e, className: t, align: r = "start" }) {
317
- const { open: i, setOpen: n, triggerRef: o } = E(), a = S(null), [l, x] = y({ top: 0, left: 0 });
318
- R(() => {
319
- if (!i || !o.current) return;
320
- const d = () => {
321
- var p;
322
- const b = (p = o.current) == null ? void 0 : p.getBoundingClientRect();
323
- if (!b) return;
324
- let m = b.left;
325
- r === "center" ? m = b.left + b.width / 2 : r === "end" && (m = b.right), x({
326
- top: b.bottom + 8,
415
+ function Qs({ children: n, className: s, align: t = "start" }) {
416
+ const { open: a, setOpen: l, triggerRef: o } = _t(), c = mt(null), [d, p] = nt({ top: 0, left: 0 });
417
+ be(() => {
418
+ if (!a || !o.current) return;
419
+ const m = () => {
420
+ var y;
421
+ const e = (y = o.current) == null ? void 0 : y.getBoundingClientRect();
422
+ if (!e) return;
423
+ let f = e.left;
424
+ t === "center" ? f = e.left + e.width / 2 : t === "end" && (f = e.right), p({
425
+ top: e.bottom + 8,
327
426
  // mt-2 equivalent
328
- left: m
427
+ left: f
329
428
  });
330
429
  };
331
- return d(), window.addEventListener("scroll", d, !0), window.addEventListener("resize", d), () => {
332
- window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
430
+ return m(), window.addEventListener("scroll", m, !0), window.addEventListener("resize", m), () => {
431
+ window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", m);
333
432
  };
334
- }, [i, o, r]), w(() => {
335
- if (!i) return;
336
- const d = (m) => {
337
- a.current && !a.current.contains(m.target) && o.current && !o.current.contains(m.target) && n(!1);
338
- }, b = (m) => {
339
- var p;
340
- m.key === "Escape" && (n(!1), (p = o.current) == null || p.focus());
433
+ }, [a, o, t]), lt(() => {
434
+ if (!a) return;
435
+ const m = (f) => {
436
+ c.current && !c.current.contains(f.target) && o.current && !o.current.contains(f.target) && l(!1);
437
+ }, e = (f) => {
438
+ var y;
439
+ f.key === "Escape" && (l(!1), (y = o.current) == null || y.focus());
341
440
  };
342
- return document.addEventListener("mousedown", d), document.addEventListener("keydown", b), () => {
343
- document.removeEventListener("mousedown", d), document.removeEventListener("keydown", b);
441
+ return document.addEventListener("mousedown", m), document.addEventListener("keydown", e), () => {
442
+ document.removeEventListener("mousedown", m), document.removeEventListener("keydown", e);
344
443
  };
345
- }, [i, n, o]);
346
- const g = {
444
+ }, [a, l, o]);
445
+ const u = {
347
446
  start: { transform: "translateX(0)" },
348
447
  center: { transform: "translateX(-50%)" },
349
448
  end: { transform: "translateX(-100%)" }
350
449
  };
351
- return typeof document > "u" ? null : O(
352
- /* @__PURE__ */ s(k, { children: i && /* @__PURE__ */ s(
353
- f.div,
450
+ return typeof document > "u" ? null : Se(
451
+ /* @__PURE__ */ r(It, { children: a && /* @__PURE__ */ r(
452
+ j.div,
354
453
  {
355
- ref: a,
454
+ ref: c,
356
455
  initial: { opacity: 0, y: -8 },
357
456
  animate: { opacity: 1, y: 0 },
358
457
  exit: { opacity: 0, y: -8 },
@@ -362,94 +461,297 @@ function Pe({ children: e, className: t, align: r = "start" }) {
362
461
  damping: 25,
363
462
  mass: 0.8
364
463
  },
365
- className: h(
464
+ className: J(
366
465
  "fixed z-50 min-w-[180px]",
367
466
  "uix-glass uix-glass-border uix-convex uix-glass-noise rounded-2xl",
368
467
  "p-1.5 shadow-xl",
369
- t
468
+ s
370
469
  ),
371
470
  style: {
372
- top: l.top,
373
- left: l.left,
374
- ...g[r]
471
+ top: d.top,
472
+ left: d.left,
473
+ ...u[t]
375
474
  },
376
475
  role: "menu",
377
- children: e
476
+ children: n
378
477
  }
379
478
  ) }),
380
479
  document.body
381
480
  );
382
481
  }
383
- function Be({
384
- children: e,
385
- className: t,
386
- disabled: r,
387
- onClick: i,
388
- ...n
482
+ function Zs({
483
+ children: n,
484
+ className: s,
485
+ disabled: t,
486
+ onClick: a,
487
+ ...l
389
488
  }) {
390
- const { setOpen: o } = E();
391
- return /* @__PURE__ */ s(
489
+ const { setOpen: o } = _t();
490
+ return /* @__PURE__ */ r(
392
491
  "button",
393
492
  {
394
493
  type: "button",
395
494
  role: "menuitem",
396
- disabled: r,
397
- className: h(
495
+ disabled: t,
496
+ className: J(
398
497
  "w-full flex items-center gap-2 px-3 py-2 rounded-xl text-sm text-left",
399
498
  "transition-colors duration-100",
400
- r ? "text-uix-text-300 cursor-not-allowed" : "text-uix-text-200 hover:text-uix-text-100 hover:bg-uix-surface-300/60",
401
- t
499
+ t ? "text-uix-text-300 cursor-not-allowed" : "text-uix-text-200 hover:text-uix-text-100 hover:bg-uix-surface-300/60",
500
+ s
402
501
  ),
403
- onClick: (a) => {
404
- r || (i == null || i(a), o(!1));
502
+ onClick: (c) => {
503
+ t || (a == null || a(c), o(!1));
405
504
  },
406
- ...n,
407
- children: e
505
+ ...l,
506
+ children: n
408
507
  }
409
508
  );
410
509
  }
411
- function _e({ className: e, ...t }) {
412
- return /* @__PURE__ */ s("hr", { className: h("my-1.5 h-px border-0 bg-uix-border-100", e), ...t });
510
+ function Js({ className: n, ...s }) {
511
+ return /* @__PURE__ */ r("hr", { className: J("my-1.5 h-px border-0 bg-white/15", n), ...s });
413
512
  }
414
- const z = c(
415
- ({ className: e, orientation: t = "vertical", children: r, ...i }, n) => /* @__PURE__ */ s(
513
+ const je = ({
514
+ onFileSelect: n,
515
+ onFilesSelect: s,
516
+ accept: t = "image/*",
517
+ maxSizeMB: a = 10,
518
+ multiple: l = !1,
519
+ disabled: o = !1,
520
+ size: c = "md",
521
+ icon: d,
522
+ title: p,
523
+ description: u,
524
+ className: m,
525
+ onError: e
526
+ }) => {
527
+ const f = mt(null), [y, E] = nt(!1), q = (g) => {
528
+ const z = a * 1024 * 1024;
529
+ return g.size > z ? (e == null || e(`파일 크기는 ${a}MB 이하여야 합니다`), !1) : !0;
530
+ }, V = (g) => {
531
+ if (!g || g.length === 0) return;
532
+ const z = [];
533
+ for (const F of Array.from(g))
534
+ q(F) && z.push(F);
535
+ z.length !== 0 && (l && s ? s(z) : n(z[0]));
536
+ }, v = (g) => {
537
+ V(g.target.files), g.target.value = "";
538
+ }, U = (g) => {
539
+ g.preventDefault(), E(!1), !o && V(g.dataTransfer.files);
540
+ }, h = (g) => {
541
+ g.preventDefault(), o || E(!0);
542
+ }, k = () => {
543
+ E(!1);
544
+ }, I = (g) => {
545
+ if (o) return;
546
+ const z = g.clipboardData.items, F = [];
547
+ for (const T of Array.from(z))
548
+ if (T.type.startsWith("image/") || t === "*") {
549
+ const R = T.getAsFile();
550
+ if (R && q(R) && (F.push(R), !l))
551
+ break;
552
+ }
553
+ F.length > 0 && (l && s ? s(F) : n(F[0]));
554
+ }, S = () => {
555
+ var g;
556
+ o || (g = f.current) == null || g.click();
557
+ }, P = (g) => {
558
+ (g.key === "Enter" || g.key === " ") && (g.preventDefault(), S());
559
+ }, C = {
560
+ sm: "p-6",
561
+ md: "p-10",
562
+ lg: "p-14"
563
+ }, _ = {
564
+ sm: "w-8 h-8",
565
+ md: "w-12 h-12",
566
+ lg: "w-16 h-16"
567
+ }, B = x(
568
+ "relative rounded-3xl text-center cursor-pointer transition-all duration-200",
569
+ "uix-glass uix-glass-border uix-convex",
570
+ "border-2 border-dashed",
571
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300",
572
+ C[c],
573
+ y ? "border-uix-prime-300 bg-uix-prime-500/10" : "border-uix-border-100 hover:border-uix-prime-300/50",
574
+ o && "opacity-50 cursor-not-allowed"
575
+ ), W = p ?? "파일을 선택하거나 드래그하세요", Y = u ?? "클릭, 드래그 앤 드롭, 또는 붙여넣기";
576
+ return /* @__PURE__ */ H(
577
+ j.div,
578
+ {
579
+ className: x(B, m),
580
+ onClick: S,
581
+ onDrop: U,
582
+ onDragOver: h,
583
+ onDragLeave: k,
584
+ onPaste: I,
585
+ onKeyDown: P,
586
+ tabIndex: o ? -1 : 0,
587
+ role: "button",
588
+ "aria-label": W,
589
+ "aria-disabled": o,
590
+ whileHover: o ? void 0 : { scale: 1.01 },
591
+ whileTap: o ? void 0 : { scale: 0.99 },
592
+ transition: { duration: 0.1 },
593
+ children: [
594
+ /* @__PURE__ */ r(
595
+ "input",
596
+ {
597
+ ref: f,
598
+ type: "file",
599
+ accept: t,
600
+ multiple: l,
601
+ onChange: v,
602
+ disabled: o,
603
+ className: "hidden",
604
+ tabIndex: -1
605
+ }
606
+ ),
607
+ /* @__PURE__ */ H("div", { className: "space-y-3", children: [
608
+ /* @__PURE__ */ r("div", { className: "flex justify-center", children: d ?? /* @__PURE__ */ r(
609
+ Ne,
610
+ {
611
+ className: x(
612
+ _[c],
613
+ "transition-colors",
614
+ y ? "text-uix-prime-300" : "text-uix-text-300"
615
+ ),
616
+ strokeWidth: 1.5
617
+ }
618
+ ) }),
619
+ /* @__PURE__ */ H("div", { children: [
620
+ /* @__PURE__ */ r("p", { className: "text-uix-text-100 font-medium mb-1", children: W }),
621
+ /* @__PURE__ */ r("p", { className: "text-sm text-uix-text-200", children: Y })
622
+ ] }),
623
+ /* @__PURE__ */ H("p", { className: "text-xs text-uix-text-300", children: [
624
+ "최대 ",
625
+ a,
626
+ "MB"
627
+ ] })
628
+ ] })
629
+ ]
630
+ }
631
+ );
632
+ };
633
+ je.displayName = "FileUploader";
634
+ const Ve = ({
635
+ length: n = 6,
636
+ onComplete: s,
637
+ onChange: t,
638
+ disabled: a = !1,
639
+ error: l = !1,
640
+ mask: o = !1,
641
+ size: c = "md",
642
+ type: d = "numeric",
643
+ className: p,
644
+ autoFocus: u = !0
645
+ }) => {
646
+ const [m, e] = nt(Array(n).fill("")), f = mt([]);
647
+ lt(() => {
648
+ var h;
649
+ u && ((h = f.current[0]) == null || h.focus());
650
+ }, [u]), lt(() => {
651
+ const h = m.join("");
652
+ t == null || t(h), h.length === n && m.every((k) => k !== "") && s(h);
653
+ }, [m, n, s, t]);
654
+ const y = (h) => d === "numeric" ? h.replace(/\D/g, "") : h.replace(/[^a-zA-Z0-9]/g, ""), E = (h, k) => {
655
+ var P;
656
+ const I = y(k).slice(-1), S = [...m];
657
+ S[h] = I, e(S), I && h < n - 1 && ((P = f.current[h + 1]) == null || P.focus());
658
+ }, q = (h, k) => {
659
+ var I, S, P;
660
+ if (k.key === "Backspace")
661
+ if (!m[h] && h > 0) {
662
+ (I = f.current[h - 1]) == null || I.focus();
663
+ const C = [...m];
664
+ C[h - 1] = "", e(C);
665
+ } else {
666
+ const C = [...m];
667
+ C[h] = "", e(C);
668
+ }
669
+ else k.key === "ArrowLeft" && h > 0 ? (S = f.current[h - 1]) == null || S.focus() : k.key === "ArrowRight" && h < n - 1 && ((P = f.current[h + 1]) == null || P.focus());
670
+ }, V = (h) => {
671
+ var I;
672
+ h.preventDefault();
673
+ const k = y(h.clipboardData.getData("text")).slice(0, n);
674
+ if (k) {
675
+ const S = [...m];
676
+ for (let C = 0; C < k.length; C++)
677
+ S[C] = k[C];
678
+ e(S);
679
+ const P = Math.min(k.length, n - 1);
680
+ (I = f.current[P]) == null || I.focus();
681
+ }
682
+ }, v = {
683
+ sm: { input: "w-10 h-11 text-lg", gap: "gap-2" },
684
+ md: { input: "w-12 h-14 text-xl", gap: "gap-3" },
685
+ lg: { input: "w-14 h-16 text-2xl", gap: "gap-3" }
686
+ }, U = x(
687
+ "text-center font-semibold rounded-2xl outline-none transition-all",
688
+ "uix-glass uix-glass-border",
689
+ "focus:ring-2 text-uix-text-100",
690
+ "disabled:opacity-50 disabled:cursor-not-allowed",
691
+ v[c].input,
692
+ l ? "border-uix-sub1-400 focus:ring-uix-sub1-300/30" : "focus:border-uix-prime-300 focus:ring-uix-prime-300/20"
693
+ );
694
+ return /* @__PURE__ */ r("div", { className: x("flex justify-center", v[c].gap, p), children: m.map((h, k) => /* @__PURE__ */ r(
695
+ "input",
696
+ {
697
+ ref: (I) => {
698
+ f.current[k] = I;
699
+ },
700
+ type: o ? "password" : "text",
701
+ inputMode: d === "numeric" ? "numeric" : "text",
702
+ maxLength: 1,
703
+ value: h,
704
+ onChange: (I) => E(k, I.target.value),
705
+ onKeyDown: (I) => q(k, I),
706
+ onPaste: V,
707
+ disabled: a,
708
+ className: U,
709
+ autoComplete: "one-time-code",
710
+ "aria-label": `PIN 입력 ${k + 1}/${n}`
711
+ },
712
+ k
713
+ )) });
714
+ };
715
+ Ve.displayName = "PinInput";
716
+ const Jt = N(
717
+ ({ className: n, orientation: s = "vertical", children: t, ...a }, l) => /* @__PURE__ */ r(
416
718
  "div",
417
719
  {
418
- ref: n,
419
- className: u(
720
+ ref: l,
721
+ className: x(
420
722
  "relative",
421
723
  {
422
724
  vertical: "overflow-y-auto overflow-x-hidden",
423
725
  horizontal: "overflow-x-auto overflow-y-hidden",
424
726
  both: "overflow-auto"
425
- }[t],
727
+ }[s],
426
728
  // Custom scrollbar styling
427
729
  "[&::-webkit-scrollbar]:w-2",
428
730
  "[&::-webkit-scrollbar-track]:bg-transparent",
429
731
  "[&::-webkit-scrollbar-thumb]:bg-uix-gray-300/50",
430
732
  "[&::-webkit-scrollbar-thumb]:rounded-full",
431
733
  "[&::-webkit-scrollbar-thumb]:hover:bg-uix-gray-300",
432
- e
734
+ n
433
735
  ),
434
- ...i,
435
- children: r
736
+ ...a,
737
+ children: t
436
738
  }
437
739
  )
438
740
  );
439
- z.displayName = "ScrollArea";
440
- function Me({ threshold: e = 500, className: t }) {
441
- const [r, i] = y(!1);
442
- w(() => {
741
+ Jt.displayName = "ScrollArea";
742
+ function tn({ threshold: n = 500, className: s }) {
743
+ const [t, a] = nt(!1);
744
+ lt(() => {
443
745
  const o = () => {
444
- i(window.scrollY > e);
746
+ a(window.scrollY > n);
445
747
  };
446
748
  return window.addEventListener("scroll", o, { passive: !0 }), () => window.removeEventListener("scroll", o);
447
- }, [e]);
448
- const n = () => {
749
+ }, [n]);
750
+ const l = () => {
449
751
  window.scrollTo({ top: 0, behavior: "smooth" });
450
752
  };
451
- return /* @__PURE__ */ s(k, { children: r && /* @__PURE__ */ s(
452
- f.button,
753
+ return /* @__PURE__ */ r(It, { children: t && /* @__PURE__ */ r(
754
+ j.button,
453
755
  {
454
756
  initial: { opacity: 0, scale: 0.5, y: 20 },
455
757
  animate: { opacity: 1, scale: 1, y: 0 },
@@ -468,86 +770,86 @@ function Me({ threshold: e = 500, className: t }) {
468
770
  ease: [0, 0, 1, 1]
469
771
  }
470
772
  },
471
- onClick: n,
472
- className: u(
773
+ onClick: l,
774
+ className: x(
473
775
  "fixed bottom-6 right-6 z-50 p-3 rounded-full bg-uix-prime-300 backdrop-blur-sm text-uix-white-100 hover:bg-uix-prime-400 cursor-pointer uix-convex-colored",
474
- t
776
+ s
475
777
  ),
476
778
  "aria-label": "Scroll to top",
477
- children: /* @__PURE__ */ s(G, { size: 24 })
779
+ children: /* @__PURE__ */ r(Te, { size: 24 })
478
780
  }
479
781
  ) });
480
782
  }
481
- const ee = c(
482
- ({ className: e, children: t, variant: r = "default", container: i = !0, animate: n = !0, id: o, ...a }, l) => {
483
- const x = S(null), g = D(x, { once: !0, margin: "-100px" }), d = "backdrop-blur-xl backdrop-saturate-150 uix-glass-border uix-convex", b = {
484
- default: `bg-uix-surface-200/50 ${d}`,
485
- secondary: `bg-uix-surface-300/50 ${d}`,
486
- accent: `bg-uix-prime-300/60 ${d} text-uix-white-100`
487
- }, m = i ? /* @__PURE__ */ s("div", { className: "max-w-4xl mx-auto px-6 xl:px-12", children: t }) : t;
488
- return /* @__PURE__ */ s(
783
+ const $e = N(
784
+ ({ className: n, children: s, variant: t = "default", container: a = !0, animate: l = !0, id: o, ...c }, d) => {
785
+ const p = mt(null), u = Ut(p, { once: !0, margin: "-100px" }), m = "backdrop-blur-xl backdrop-saturate-150 uix-glass-border uix-convex", e = {
786
+ default: `bg-uix-surface-200/50 ${m}`,
787
+ secondary: `bg-uix-surface-300/50 ${m}`,
788
+ accent: `bg-uix-prime-300/60 ${m} text-uix-white-100`
789
+ }, f = a ? /* @__PURE__ */ r("div", { className: "max-w-4xl mx-auto px-6 xl:px-12", children: s }) : s;
790
+ return /* @__PURE__ */ r(
489
791
  "section",
490
792
  {
491
- ref: (p) => {
492
- x.current = p, typeof l == "function" ? l(p) : l && (l.current = p);
793
+ ref: (y) => {
794
+ p.current = y, typeof d == "function" ? d(y) : d && (d.current = y);
493
795
  },
494
796
  id: o,
495
- className: u("relative py-16 xl:py-24 rounded-[2.5rem]", b[r], e),
496
- ...a,
497
- children: n ? /* @__PURE__ */ s(
498
- f.div,
797
+ className: x("relative py-16 xl:py-24 rounded-[2.5rem]", e[t], n),
798
+ ...c,
799
+ children: l ? /* @__PURE__ */ r(
800
+ j.div,
499
801
  {
500
802
  initial: { opacity: 0, y: 40 },
501
- animate: g ? { opacity: 1, y: 0 } : { opacity: 0, y: 40 },
803
+ animate: u ? { opacity: 1, y: 0 } : { opacity: 0, y: 40 },
502
804
  transition: {
503
805
  type: "spring",
504
806
  stiffness: 200,
505
807
  damping: 25,
506
808
  mass: 1
507
809
  },
508
- children: m
810
+ children: f
509
811
  }
510
- ) : m
812
+ ) : f
511
813
  }
512
814
  );
513
815
  }
514
816
  );
515
- ee.displayName = "Section";
516
- const te = c(
517
- ({ className: e, children: t, subtitle: r, ...i }, n) => /* @__PURE__ */ v("div", { className: "text-center mb-14 xl:mb-20", children: [
518
- /* @__PURE__ */ s(
817
+ $e.displayName = "Section";
818
+ const Ye = N(
819
+ ({ className: n, children: s, subtitle: t, ...a }, l) => /* @__PURE__ */ H("div", { className: "text-center mb-14 xl:mb-20", children: [
820
+ /* @__PURE__ */ r(
519
821
  "h2",
520
822
  {
521
- ref: n,
522
- className: u(
823
+ ref: l,
824
+ className: x(
523
825
  "text-4xl xl:text-6xl font-bold text-uix-text-100 mb-6 tracking-tight",
524
- e
826
+ n
525
827
  ),
526
- ...i,
527
- children: t
828
+ ...a,
829
+ children: s
528
830
  }
529
831
  ),
530
- r && /* @__PURE__ */ s("p", { className: "text-xl xl:text-2xl text-uix-gray-200 max-w-3xl mx-auto leading-relaxed", children: r })
832
+ t && /* @__PURE__ */ r("p", { className: "text-xl xl:text-2xl text-uix-gray-200 max-w-3xl mx-auto leading-relaxed", children: t })
531
833
  ] })
532
834
  );
533
- te.displayName = "SectionTitle";
534
- const I = T(null), re = () => {
535
- const e = C(I);
536
- if (!e)
835
+ Ye.displayName = "SectionTitle";
836
+ const te = yt(null), Fe = () => {
837
+ const n = wt(te);
838
+ if (!n)
537
839
  throw new Error("Sheet components must be used within a Sheet provider");
538
- return e;
539
- }, ie = ({ open: e, onOpenChange: t, children: r }) => (w(() => {
540
- const i = (n) => {
541
- n.key === "Escape" && e && t(!1);
840
+ return n;
841
+ }, Xe = ({ open: n, onOpenChange: s, children: t }) => (lt(() => {
842
+ const a = (l) => {
843
+ l.key === "Escape" && n && s(!1);
542
844
  };
543
- return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
544
- }, [e, t]), w(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
845
+ return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
846
+ }, [n, s]), lt(() => (n ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
545
847
  document.body.style.overflow = "";
546
- }), [e]), /* @__PURE__ */ s(I.Provider, { value: { open: e, onOpenChange: t }, children: r }));
547
- ie.displayName = "Sheet";
548
- const se = c(
549
- ({ className: e, side: t = "left", children: r }, i) => {
550
- const { open: n, onOpenChange: o } = re(), a = {
848
+ }), [n]), /* @__PURE__ */ r(te.Provider, { value: { open: n, onOpenChange: s }, children: t }));
849
+ Xe.displayName = "Sheet";
850
+ const Ue = N(
851
+ ({ className: n, side: s = "left", children: t }, a) => {
852
+ const { open: l, onOpenChange: o } = Fe(), c = {
551
853
  left: {
552
854
  initial: { x: "-100%" },
553
855
  animate: { x: 0 },
@@ -558,13 +860,13 @@ const se = c(
558
860
  animate: { x: 0 },
559
861
  exit: { x: "100%" }
560
862
  }
561
- }, l = {
863
+ }, d = {
562
864
  left: "left-0",
563
865
  right: "right-0"
564
866
  };
565
- return /* @__PURE__ */ s(k, { children: n && /* @__PURE__ */ v(M, { children: [
566
- /* @__PURE__ */ s(
567
- f.div,
867
+ return /* @__PURE__ */ r(It, { children: l && /* @__PURE__ */ H(xe, { children: [
868
+ /* @__PURE__ */ r(
869
+ j.div,
568
870
  {
569
871
  initial: { opacity: 0 },
570
872
  animate: { opacity: 1 },
@@ -574,100 +876,103 @@ const se = c(
574
876
  onClick: () => o(!1)
575
877
  }
576
878
  ),
577
- /* @__PURE__ */ s(
578
- f.div,
879
+ /* @__PURE__ */ r(
880
+ j.div,
579
881
  {
580
- ref: i,
581
- initial: a[t].initial,
582
- animate: a[t].animate,
583
- exit: a[t].exit,
882
+ ref: a,
883
+ initial: c[s].initial,
884
+ animate: c[s].animate,
885
+ exit: c[s].exit,
584
886
  transition: { type: "spring", damping: 25, stiffness: 300 },
585
- className: u(
887
+ className: x(
586
888
  "fixed top-0 z-50 h-full w-72 bg-uix-surface-100/90 backdrop-blur-xl backdrop-saturate-150 border-r border-black/[0.3] dark:border-white/[0.03] rounded-r-3xl uix-convex-lg",
587
- l[t],
588
- e
889
+ d[s],
890
+ n
589
891
  ),
590
- children: r
892
+ children: t
591
893
  }
592
894
  )
593
895
  ] }) });
594
896
  }
595
897
  );
596
- se.displayName = "SheetContent";
597
- const ne = c(
598
- ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s(
898
+ Ue.displayName = "SheetContent";
899
+ const We = N(
900
+ ({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r(
599
901
  "div",
600
902
  {
601
- ref: i,
602
- className: u("flex flex-col gap-2 p-6 border-b border-uix-border-100", e),
603
- ...r,
604
- children: t
903
+ ref: a,
904
+ className: x(
905
+ "flex flex-col gap-2 p-6 border-b border-black/10 dark:border-white/10",
906
+ n
907
+ ),
908
+ ...t,
909
+ children: s
605
910
  }
606
911
  )
607
912
  );
608
- ne.displayName = "SheetHeader";
609
- const oe = c(
610
- ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("h2", { ref: i, className: u("text-lg font-semibold text-uix-text-100", e), ...r, children: t })
913
+ We.displayName = "SheetHeader";
914
+ const Ke = N(
915
+ ({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("h2", { ref: a, className: x("text-lg font-semibold text-uix-text-100", n), ...t, children: s })
611
916
  );
612
- oe.displayName = "SheetTitle";
613
- const ae = "relative uix-glass uix-glass-border uix-convex uix-glass-noise rounded-3xl", le = c(({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s(
917
+ Ke.displayName = "SheetTitle";
918
+ const Ge = "relative uix-glass uix-glass-border uix-convex uix-glass-noise rounded-3xl", qe = N(({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r(
614
919
  "aside",
615
920
  {
616
- ref: i,
617
- className: u("hidden xl:flex flex-col w-60 h-full", ae, e),
618
- ...r,
619
- children: t
921
+ ref: a,
922
+ className: x("hidden xl:flex flex-col w-60 h-full", Ge, n),
923
+ ...t,
924
+ children: s
620
925
  }
621
926
  ));
622
- le.displayName = "Sidebar";
623
- const ue = c(
624
- ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("div", { ref: i, className: u("flex flex-col gap-1 p-6", e), ...r, children: t })
927
+ qe.displayName = "Sidebar";
928
+ const Qe = N(
929
+ ({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("div", { ref: a, className: x("flex flex-col gap-1 p-6", n), ...t, children: s })
625
930
  );
626
- ue.displayName = "SidebarHeader";
627
- const ce = c(
628
- ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s(z, { ref: i, className: u("flex-1 p-4", e), ...r, children: t })
931
+ Qe.displayName = "SidebarHeader";
932
+ const Ze = N(
933
+ ({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r(Jt, { ref: a, className: x("flex-1 p-4", n), ...t, children: s })
629
934
  );
630
- ce.displayName = "SidebarContent";
631
- const de = c(
632
- ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("div", { ref: i, className: u("mb-6", e), ...r, children: t })
935
+ Ze.displayName = "SidebarContent";
936
+ const Je = N(
937
+ ({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("div", { ref: a, className: x("mb-6", n), ...t, children: s })
633
938
  );
634
- de.displayName = "SidebarGroup";
635
- const xe = c(
636
- ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s(
939
+ Je.displayName = "SidebarGroup";
940
+ const ts = N(
941
+ ({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r(
637
942
  "div",
638
943
  {
639
- ref: i,
640
- className: u(
944
+ ref: a,
945
+ className: x(
641
946
  "px-3 mb-3 text-xs font-semibold uppercase tracking-widest text-uix-sub1-300/80",
642
- e
947
+ n
643
948
  ),
644
- ...r,
645
- children: t
949
+ ...t,
950
+ children: s
646
951
  }
647
952
  )
648
953
  );
649
- xe.displayName = "SidebarGroupLabel";
650
- const me = c(
651
- ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("ul", { ref: i, className: u("space-y-1", e), ...r, children: t })
954
+ ts.displayName = "SidebarGroupLabel";
955
+ const es = N(
956
+ ({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("ul", { ref: a, className: x("space-y-1", n), ...t, children: s })
652
957
  );
653
- me.displayName = "SidebarMenu";
654
- const be = c(
655
- ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("li", { ref: i, className: u("", e), ...r, children: t })
958
+ es.displayName = "SidebarMenu";
959
+ const ss = N(
960
+ ({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("li", { ref: a, className: x("", n), ...t, children: s })
656
961
  );
657
- be.displayName = "SidebarMenuItem";
658
- const pe = c(
659
- ({ className: e, isActive: t = !1, children: r, ...i }, n) => {
660
- const { onDrag: o, onDragStart: a, onDragEnd: l, ...x } = i;
661
- return /* @__PURE__ */ v(
662
- f.button,
962
+ ss.displayName = "SidebarMenuItem";
963
+ const ns = N(
964
+ ({ className: n, isActive: s = !1, children: t, ...a }, l) => {
965
+ const { onDrag: o, onDragStart: c, onDragEnd: d, ...p } = a;
966
+ return /* @__PURE__ */ H(
967
+ j.button,
663
968
  {
664
- ref: n,
969
+ ref: l,
665
970
  type: "button",
666
- className: u(
971
+ className: x(
667
972
  "relative flex w-full items-center gap-2 rounded-xl px-3 py-2.5 text-base font-medium",
668
973
  "hover:bg-uix-surface-300/50 hover:text-uix-text-100",
669
- t ? "text-uix-prime-300 bg-uix-prime-100/15" : "text-uix-text-300",
670
- e
974
+ s ? "text-uix-prime-300 bg-uix-prime-100/15" : "text-uix-text-300",
975
+ n
671
976
  ),
672
977
  whileHover: { x: 4, scale: 1.01 },
673
978
  whileTap: { scale: 0.97 },
@@ -675,10 +980,10 @@ const pe = c(
675
980
  duration: 0.08,
676
981
  ease: [0, 0, 1, 1]
677
982
  },
678
- ...x,
983
+ ...p,
679
984
  children: [
680
- t && /* @__PURE__ */ s(
681
- f.span,
985
+ s && /* @__PURE__ */ r(
986
+ j.span,
682
987
  {
683
988
  className: "absolute left-0 top-1/2 -translate-y-1/2 w-0.5 h-5 bg-uix-prime-300 rounded-r-full",
684
989
  layoutId: "sidebar-active-indicator",
@@ -690,20 +995,186 @@ const pe = c(
690
995
  }
691
996
  }
692
997
  ),
693
- r
998
+ t
694
999
  ]
695
1000
  }
696
1001
  );
697
1002
  }
698
1003
  );
699
- pe.displayName = "SidebarMenuButton";
700
- const fe = c(
701
- ({ className: e, variant: t = "default", rounded: r = "3xl", children: i, ...n }, o) => {
702
- const a = "relative uix-glass uix-glass-border uix-convex uix-glass-noise", l = {
1004
+ ns.displayName = "SidebarMenuButton";
1005
+ const as = ({
1006
+ value: n,
1007
+ onChange: s,
1008
+ min: t = 0,
1009
+ max: a = 100,
1010
+ step: l = 1,
1011
+ disabled: o = !1,
1012
+ size: c = "md",
1013
+ color: d = "prime",
1014
+ showValue: p = !1,
1015
+ showMinMax: u = !1,
1016
+ marks: m,
1017
+ label: e,
1018
+ description: f,
1019
+ className: y
1020
+ }) => {
1021
+ const E = mt(null), [q, V] = nt(!1), v = (n - t) / (a - t) * 100, U = ge(
1022
+ (_) => {
1023
+ if (!E.current) return n;
1024
+ const B = E.current.getBoundingClientRect(), W = Math.max(0, Math.min(1, (_ - B.left) / B.width)), Y = t + W * (a - t), g = Math.round(Y / l) * l;
1025
+ return Math.max(t, Math.min(a, g));
1026
+ },
1027
+ [t, a, l, n]
1028
+ ), h = (_) => {
1029
+ if (o) return;
1030
+ _.preventDefault(), V(!0);
1031
+ const B = U(_.clientX);
1032
+ s(B);
1033
+ const W = (g) => {
1034
+ const z = U(g.clientX);
1035
+ s(z);
1036
+ }, Y = () => {
1037
+ V(!1), document.removeEventListener("mousemove", W), document.removeEventListener("mouseup", Y);
1038
+ };
1039
+ document.addEventListener("mousemove", W), document.addEventListener("mouseup", Y);
1040
+ }, k = (_) => {
1041
+ if (o) return;
1042
+ V(!0);
1043
+ const B = _.touches[0], W = U(B.clientX);
1044
+ s(W);
1045
+ const Y = (z) => {
1046
+ const F = z.touches[0], T = U(F.clientX);
1047
+ s(T);
1048
+ }, g = () => {
1049
+ V(!1), document.removeEventListener("touchmove", Y), document.removeEventListener("touchend", g);
1050
+ };
1051
+ document.addEventListener("touchmove", Y), document.addEventListener("touchend", g);
1052
+ }, I = (_) => {
1053
+ if (o) return;
1054
+ let B = n;
1055
+ switch (_.key) {
1056
+ case "ArrowRight":
1057
+ case "ArrowUp":
1058
+ B = Math.min(a, n + l);
1059
+ break;
1060
+ case "ArrowLeft":
1061
+ case "ArrowDown":
1062
+ B = Math.max(t, n - l);
1063
+ break;
1064
+ case "Home":
1065
+ B = t;
1066
+ break;
1067
+ case "End":
1068
+ B = a;
1069
+ break;
1070
+ default:
1071
+ return;
1072
+ }
1073
+ _.preventDefault(), s(B);
1074
+ }, S = {
1075
+ sm: { track: "h-1.5", thumb: "w-4 h-4" },
1076
+ md: { track: "h-2", thumb: "w-5 h-5" },
1077
+ lg: { track: "h-3", thumb: "w-6 h-6" }
1078
+ }, P = {
1079
+ prime: "bg-uix-prime-400",
1080
+ sub1: "bg-uix-sub1-400",
1081
+ sub2: "bg-uix-sub2-400"
1082
+ }, C = {
1083
+ prime: "bg-uix-prime-300",
1084
+ sub1: "bg-uix-sub1-300",
1085
+ sub2: "bg-uix-sub2-300"
1086
+ };
1087
+ return /* @__PURE__ */ H("div", { className: x("w-full", y), children: [
1088
+ (e || p) && /* @__PURE__ */ H("div", { className: "flex items-center justify-between mb-2", children: [
1089
+ e && /* @__PURE__ */ r("span", { className: "text-sm font-medium text-uix-text-100", children: e }),
1090
+ p && /* @__PURE__ */ r("span", { className: "text-sm font-semibold text-uix-text-200", children: n })
1091
+ ] }),
1092
+ f && /* @__PURE__ */ r("p", { className: "text-sm text-uix-text-300 mb-3", children: f }),
1093
+ /* @__PURE__ */ H(
1094
+ "div",
1095
+ {
1096
+ ref: E,
1097
+ className: x(
1098
+ "relative w-full rounded-full cursor-pointer",
1099
+ "uix-glass uix-glass-border",
1100
+ S[c].track,
1101
+ o && "opacity-50 cursor-not-allowed"
1102
+ ),
1103
+ onMouseDown: h,
1104
+ onTouchStart: k,
1105
+ role: "slider",
1106
+ "aria-valuemin": t,
1107
+ "aria-valuemax": a,
1108
+ "aria-valuenow": n,
1109
+ "aria-disabled": o,
1110
+ tabIndex: o ? -1 : 0,
1111
+ onKeyDown: I,
1112
+ children: [
1113
+ /* @__PURE__ */ r(
1114
+ "div",
1115
+ {
1116
+ className: x("absolute left-0 top-0 h-full rounded-full", P[d]),
1117
+ style: { width: `${v}%` }
1118
+ }
1119
+ ),
1120
+ m == null ? void 0 : m.map((_) => {
1121
+ const B = (_.value - t) / (a - t) * 100;
1122
+ return /* @__PURE__ */ H(
1123
+ "div",
1124
+ {
1125
+ className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2",
1126
+ style: { left: `${B}%` },
1127
+ children: [
1128
+ /* @__PURE__ */ r(
1129
+ "div",
1130
+ {
1131
+ className: x(
1132
+ "w-2 h-2 rounded-full",
1133
+ _.value <= n ? C[d] : "bg-uix-surface-400"
1134
+ )
1135
+ }
1136
+ ),
1137
+ /* @__PURE__ */ r("span", { className: "absolute top-4 left-1/2 -translate-x-1/2 text-xs text-uix-text-300 whitespace-nowrap", children: _.label })
1138
+ ]
1139
+ },
1140
+ _.value
1141
+ );
1142
+ }),
1143
+ /* @__PURE__ */ r(
1144
+ j.div,
1145
+ {
1146
+ className: x(
1147
+ "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 rounded-full",
1148
+ "uix-convex-colored shadow-lg",
1149
+ S[c].thumb,
1150
+ C[d],
1151
+ !o && "cursor-grab active:cursor-grabbing"
1152
+ ),
1153
+ style: { left: `${v}%` },
1154
+ animate: {
1155
+ scale: q ? 1.15 : 1
1156
+ },
1157
+ whileHover: o ? void 0 : { scale: 1.1 },
1158
+ transition: { duration: 0.1 }
1159
+ }
1160
+ )
1161
+ ]
1162
+ }
1163
+ ),
1164
+ u && /* @__PURE__ */ H("div", { className: "flex justify-between mt-2 text-xs text-uix-text-300", children: [
1165
+ /* @__PURE__ */ r("span", { children: t }),
1166
+ /* @__PURE__ */ r("span", { children: a })
1167
+ ] })
1168
+ ] });
1169
+ };
1170
+ as.displayName = "Slider";
1171
+ const os = N(
1172
+ ({ className: n, variant: s = "default", rounded: t = "3xl", children: a, ...l }, o) => {
1173
+ const c = "relative uix-glass uix-glass-border uix-convex uix-glass-noise", d = {
703
1174
  default: "",
704
1175
  subtle: "uix-convex-subtle",
705
1176
  strong: "uix-convex-lg"
706
- }, x = {
1177
+ }, p = {
707
1178
  none: "rounded-none",
708
1179
  sm: "rounded-lg",
709
1180
  md: "rounded-xl",
@@ -713,59 +1184,59 @@ const fe = c(
713
1184
  "3xl": "rounded-3xl",
714
1185
  full: "rounded-full"
715
1186
  };
716
- return /* @__PURE__ */ s(
1187
+ return /* @__PURE__ */ r(
717
1188
  "div",
718
1189
  {
719
1190
  ref: o,
720
- className: u(a, l[t], x[r], e),
721
- ...n,
722
- children: i
1191
+ className: x(c, d[s], p[t], n),
1192
+ ...l,
1193
+ children: a
723
1194
  }
724
1195
  );
725
1196
  }
726
1197
  );
727
- fe.displayName = "Surface";
728
- const P = T(null), B = () => {
729
- const e = C(P);
730
- if (!e)
1198
+ os.displayName = "Surface";
1199
+ const ee = yt(null), se = () => {
1200
+ const n = wt(ee);
1201
+ if (!n)
731
1202
  throw new Error("Tabs components must be used within a Tabs provider");
732
- return e;
733
- }, ge = c(
734
- ({ className: e, defaultValue: t, children: r, ...i }, n) => {
735
- const [o, a] = y(t), l = V();
736
- return /* @__PURE__ */ s(P.Provider, { value: { activeTab: o, setActiveTab: a, tabsId: l }, children: /* @__PURE__ */ s("div", { ref: n, className: u("w-full", e), ...i, children: r }) });
1203
+ return n;
1204
+ }, rs = N(
1205
+ ({ className: n, defaultValue: s, children: t, ...a }, l) => {
1206
+ const [o, c] = nt(s), d = he();
1207
+ return /* @__PURE__ */ r(ee.Provider, { value: { activeTab: o, setActiveTab: c, tabsId: d }, children: /* @__PURE__ */ r("div", { ref: l, className: x("w-full", n), ...a, children: t }) });
737
1208
  }
738
1209
  );
739
- ge.displayName = "Tabs";
740
- const ve = c(
741
- ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s(
1210
+ rs.displayName = "Tabs";
1211
+ const is = N(
1212
+ ({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r(
742
1213
  "div",
743
1214
  {
744
- ref: i,
745
- className: u(
1215
+ ref: a,
1216
+ className: x(
746
1217
  "inline-flex items-center gap-1 rounded-2xl bg-uix-surface-300/50 backdrop-blur-xl backdrop-saturate-150 uix-glass-border p-1.5 uix-convex",
747
- e
1218
+ n
748
1219
  ),
749
- ...r,
750
- children: t
1220
+ ...t,
1221
+ children: s
751
1222
  }
752
1223
  )
753
1224
  );
754
- ve.displayName = "TabsList";
755
- const ye = c(
756
- ({ className: e, value: t, children: r, ...i }, n) => {
757
- const { activeTab: o, setActiveTab: a, tabsId: l } = B(), x = o === t, { onDrag: g, onDragStart: d, onDragEnd: b, ...m } = i;
758
- return /* @__PURE__ */ v(
759
- f.button,
1225
+ is.displayName = "TabsList";
1226
+ const ls = N(
1227
+ ({ className: n, value: s, children: t, ...a }, l) => {
1228
+ const { activeTab: o, setActiveTab: c, tabsId: d } = se(), p = o === s, { onDrag: u, onDragStart: m, onDragEnd: e, ...f } = a;
1229
+ return /* @__PURE__ */ H(
1230
+ j.button,
760
1231
  {
761
- ref: n,
1232
+ ref: l,
762
1233
  type: "button",
763
- onClick: () => a(t),
764
- className: u(
1234
+ onClick: () => c(s),
1235
+ className: x(
765
1236
  "relative inline-flex items-center justify-center px-4 py-2 text-base font-medium rounded-xl",
766
1237
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-uix-prime-300",
767
- x ? "text-uix-text-100" : "text-uix-text-300 hover:text-uix-text-100",
768
- e
1238
+ p ? "text-uix-text-100" : "text-uix-text-300 hover:text-uix-text-100",
1239
+ n
769
1240
  ),
770
1241
  whileHover: { scale: 1.02 },
771
1242
  whileTap: { scale: 0.96 },
@@ -773,12 +1244,12 @@ const ye = c(
773
1244
  duration: 0.06,
774
1245
  ease: [0, 0, 1, 1]
775
1246
  },
776
- ...m,
1247
+ ...f,
777
1248
  children: [
778
- x && /* @__PURE__ */ s(
779
- f.span,
1249
+ p && /* @__PURE__ */ r(
1250
+ j.span,
780
1251
  {
781
- layoutId: `tabs-indicator-${l}`,
1252
+ layoutId: `tabs-indicator-${d}`,
782
1253
  className: "absolute inset-0 bg-uix-surface-100 rounded-xl uix-convex-sm",
783
1254
  transition: {
784
1255
  type: "spring",
@@ -788,31 +1259,31 @@ const ye = c(
788
1259
  }
789
1260
  }
790
1261
  ),
791
- /* @__PURE__ */ s("span", { className: "relative z-10", children: r })
1262
+ /* @__PURE__ */ r("span", { className: "relative z-10", children: t })
792
1263
  ]
793
1264
  }
794
1265
  );
795
1266
  }
796
1267
  );
797
- ye.displayName = "TabsTrigger";
798
- const he = c(
799
- ({ className: e, children: t, ...r }, i) => /* @__PURE__ */ s("div", { ref: i, className: u("relative mt-4", e), ...r, children: /* @__PURE__ */ s("div", { className: "grid [&>*]:col-start-1 [&>*]:row-start-1", children: t }) })
1268
+ ls.displayName = "TabsTrigger";
1269
+ const cs = N(
1270
+ ({ className: n, children: s, ...t }, a) => /* @__PURE__ */ r("div", { ref: a, className: x("relative mt-4", n), ...t, children: /* @__PURE__ */ r("div", { className: "grid [&>*]:col-start-1 [&>*]:row-start-1", children: s }) })
800
1271
  );
801
- he.displayName = "TabsPanels";
802
- const we = c(
803
- ({ className: e, value: t, children: r, ...i }, n) => {
804
- const { activeTab: o } = B(), a = o === t;
805
- return /* @__PURE__ */ s(
806
- f.div,
1272
+ cs.displayName = "TabsPanels";
1273
+ const ds = N(
1274
+ ({ className: n, value: s, children: t, ...a }, l) => {
1275
+ const { activeTab: o } = se(), c = o === s;
1276
+ return /* @__PURE__ */ r(
1277
+ j.div,
807
1278
  {
808
- ref: n,
809
- className: u(e),
1279
+ ref: l,
1280
+ className: x(n),
810
1281
  initial: !1,
811
1282
  animate: {
812
- opacity: a ? 1 : 0,
813
- scale: a ? 1 : 0.98,
814
- y: a ? 0 : 8,
815
- visibility: a ? "visible" : "hidden"
1283
+ opacity: c ? 1 : 0,
1284
+ scale: c ? 1 : 0.98,
1285
+ y: c ? 0 : 8,
1286
+ visibility: c ? "visible" : "hidden"
816
1287
  },
817
1288
  transition: {
818
1289
  type: "spring",
@@ -820,49 +1291,839 @@ const we = c(
820
1291
  damping: 25,
821
1292
  mass: 0.8
822
1293
  },
823
- "aria-hidden": !a,
824
- children: /* @__PURE__ */ s("div", { ...i, children: r })
1294
+ "aria-hidden": !c,
1295
+ children: /* @__PURE__ */ r("div", { ...a, children: t })
825
1296
  }
826
1297
  );
827
1298
  }
828
1299
  );
829
- we.displayName = "TabsContent";
1300
+ ds.displayName = "TabsContent";
1301
+ function us(n) {
1302
+ if (typeof document > "u") return;
1303
+ let s = document.head || document.getElementsByTagName("head")[0], t = document.createElement("style");
1304
+ t.type = "text/css", s.appendChild(t), t.styleSheet ? t.styleSheet.cssText = n : t.appendChild(document.createTextNode(n));
1305
+ }
1306
+ const ms = (n) => {
1307
+ switch (n) {
1308
+ case "success":
1309
+ return xs;
1310
+ case "info":
1311
+ return gs;
1312
+ case "warning":
1313
+ return bs;
1314
+ case "error":
1315
+ return hs;
1316
+ default:
1317
+ return null;
1318
+ }
1319
+ }, fs = Array(12).fill(0), ps = ({ visible: n, className: s }) => /* @__PURE__ */ i.createElement("div", {
1320
+ className: [
1321
+ "sonner-loading-wrapper",
1322
+ s
1323
+ ].filter(Boolean).join(" "),
1324
+ "data-visible": n
1325
+ }, /* @__PURE__ */ i.createElement("div", {
1326
+ className: "sonner-spinner"
1327
+ }, fs.map((t, a) => /* @__PURE__ */ i.createElement("div", {
1328
+ className: "sonner-loading-bar",
1329
+ key: `spinner-bar-${a}`
1330
+ })))), xs = /* @__PURE__ */ i.createElement("svg", {
1331
+ xmlns: "http://www.w3.org/2000/svg",
1332
+ viewBox: "0 0 20 20",
1333
+ fill: "currentColor",
1334
+ height: "20",
1335
+ width: "20"
1336
+ }, /* @__PURE__ */ i.createElement("path", {
1337
+ fillRule: "evenodd",
1338
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
1339
+ clipRule: "evenodd"
1340
+ })), bs = /* @__PURE__ */ i.createElement("svg", {
1341
+ xmlns: "http://www.w3.org/2000/svg",
1342
+ viewBox: "0 0 24 24",
1343
+ fill: "currentColor",
1344
+ height: "20",
1345
+ width: "20"
1346
+ }, /* @__PURE__ */ i.createElement("path", {
1347
+ fillRule: "evenodd",
1348
+ d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
1349
+ clipRule: "evenodd"
1350
+ })), gs = /* @__PURE__ */ i.createElement("svg", {
1351
+ xmlns: "http://www.w3.org/2000/svg",
1352
+ viewBox: "0 0 20 20",
1353
+ fill: "currentColor",
1354
+ height: "20",
1355
+ width: "20"
1356
+ }, /* @__PURE__ */ i.createElement("path", {
1357
+ fillRule: "evenodd",
1358
+ d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
1359
+ clipRule: "evenodd"
1360
+ })), hs = /* @__PURE__ */ i.createElement("svg", {
1361
+ xmlns: "http://www.w3.org/2000/svg",
1362
+ viewBox: "0 0 20 20",
1363
+ fill: "currentColor",
1364
+ height: "20",
1365
+ width: "20"
1366
+ }, /* @__PURE__ */ i.createElement("path", {
1367
+ fillRule: "evenodd",
1368
+ d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
1369
+ clipRule: "evenodd"
1370
+ })), vs = /* @__PURE__ */ i.createElement("svg", {
1371
+ xmlns: "http://www.w3.org/2000/svg",
1372
+ width: "12",
1373
+ height: "12",
1374
+ viewBox: "0 0 24 24",
1375
+ fill: "none",
1376
+ stroke: "currentColor",
1377
+ strokeWidth: "1.5",
1378
+ strokeLinecap: "round",
1379
+ strokeLinejoin: "round"
1380
+ }, /* @__PURE__ */ i.createElement("line", {
1381
+ x1: "18",
1382
+ y1: "6",
1383
+ x2: "6",
1384
+ y2: "18"
1385
+ }), /* @__PURE__ */ i.createElement("line", {
1386
+ x1: "6",
1387
+ y1: "6",
1388
+ x2: "18",
1389
+ y2: "18"
1390
+ })), ys = () => {
1391
+ const [n, s] = i.useState(document.hidden);
1392
+ return i.useEffect(() => {
1393
+ const t = () => {
1394
+ s(document.hidden);
1395
+ };
1396
+ return document.addEventListener("visibilitychange", t), () => window.removeEventListener("visibilitychange", t);
1397
+ }, []), n;
1398
+ };
1399
+ let At = 1;
1400
+ class ws {
1401
+ constructor() {
1402
+ this.subscribe = (s) => (this.subscribers.push(s), () => {
1403
+ const t = this.subscribers.indexOf(s);
1404
+ this.subscribers.splice(t, 1);
1405
+ }), this.publish = (s) => {
1406
+ this.subscribers.forEach((t) => t(s));
1407
+ }, this.addToast = (s) => {
1408
+ this.publish(s), this.toasts = [
1409
+ ...this.toasts,
1410
+ s
1411
+ ];
1412
+ }, this.create = (s) => {
1413
+ var t;
1414
+ const { message: a, ...l } = s, o = typeof (s == null ? void 0 : s.id) == "number" || ((t = s.id) == null ? void 0 : t.length) > 0 ? s.id : At++, c = this.toasts.find((p) => p.id === o), d = s.dismissible === void 0 ? !0 : s.dismissible;
1415
+ return this.dismissedToasts.has(o) && this.dismissedToasts.delete(o), c ? this.toasts = this.toasts.map((p) => p.id === o ? (this.publish({
1416
+ ...p,
1417
+ ...s,
1418
+ id: o,
1419
+ title: a
1420
+ }), {
1421
+ ...p,
1422
+ ...s,
1423
+ id: o,
1424
+ dismissible: d,
1425
+ title: a
1426
+ }) : p) : this.addToast({
1427
+ title: a,
1428
+ ...l,
1429
+ dismissible: d,
1430
+ id: o
1431
+ }), o;
1432
+ }, this.dismiss = (s) => (s ? (this.dismissedToasts.add(s), requestAnimationFrame(() => this.subscribers.forEach((t) => t({
1433
+ id: s,
1434
+ dismiss: !0
1435
+ })))) : this.toasts.forEach((t) => {
1436
+ this.subscribers.forEach((a) => a({
1437
+ id: t.id,
1438
+ dismiss: !0
1439
+ }));
1440
+ }), s), this.message = (s, t) => this.create({
1441
+ ...t,
1442
+ message: s
1443
+ }), this.error = (s, t) => this.create({
1444
+ ...t,
1445
+ message: s,
1446
+ type: "error"
1447
+ }), this.success = (s, t) => this.create({
1448
+ ...t,
1449
+ type: "success",
1450
+ message: s
1451
+ }), this.info = (s, t) => this.create({
1452
+ ...t,
1453
+ type: "info",
1454
+ message: s
1455
+ }), this.warning = (s, t) => this.create({
1456
+ ...t,
1457
+ type: "warning",
1458
+ message: s
1459
+ }), this.loading = (s, t) => this.create({
1460
+ ...t,
1461
+ type: "loading",
1462
+ message: s
1463
+ }), this.promise = (s, t) => {
1464
+ if (!t)
1465
+ return;
1466
+ let a;
1467
+ t.loading !== void 0 && (a = this.create({
1468
+ ...t,
1469
+ promise: s,
1470
+ type: "loading",
1471
+ message: t.loading,
1472
+ description: typeof t.description != "function" ? t.description : void 0
1473
+ }));
1474
+ const l = Promise.resolve(s instanceof Function ? s() : s);
1475
+ let o = a !== void 0, c;
1476
+ const d = l.then(async (u) => {
1477
+ if (c = [
1478
+ "resolve",
1479
+ u
1480
+ ], i.isValidElement(u))
1481
+ o = !1, this.create({
1482
+ id: a,
1483
+ type: "default",
1484
+ message: u
1485
+ });
1486
+ else if (Ts(u) && !u.ok) {
1487
+ o = !1;
1488
+ const e = typeof t.error == "function" ? await t.error(`HTTP error! status: ${u.status}`) : t.error, f = typeof t.description == "function" ? await t.description(`HTTP error! status: ${u.status}`) : t.description, E = typeof e == "object" && !i.isValidElement(e) ? e : {
1489
+ message: e
1490
+ };
1491
+ this.create({
1492
+ id: a,
1493
+ type: "error",
1494
+ description: f,
1495
+ ...E
1496
+ });
1497
+ } else if (u instanceof Error) {
1498
+ o = !1;
1499
+ const e = typeof t.error == "function" ? await t.error(u) : t.error, f = typeof t.description == "function" ? await t.description(u) : t.description, E = typeof e == "object" && !i.isValidElement(e) ? e : {
1500
+ message: e
1501
+ };
1502
+ this.create({
1503
+ id: a,
1504
+ type: "error",
1505
+ description: f,
1506
+ ...E
1507
+ });
1508
+ } else if (t.success !== void 0) {
1509
+ o = !1;
1510
+ const e = typeof t.success == "function" ? await t.success(u) : t.success, f = typeof t.description == "function" ? await t.description(u) : t.description, E = typeof e == "object" && !i.isValidElement(e) ? e : {
1511
+ message: e
1512
+ };
1513
+ this.create({
1514
+ id: a,
1515
+ type: "success",
1516
+ description: f,
1517
+ ...E
1518
+ });
1519
+ }
1520
+ }).catch(async (u) => {
1521
+ if (c = [
1522
+ "reject",
1523
+ u
1524
+ ], t.error !== void 0) {
1525
+ o = !1;
1526
+ const m = typeof t.error == "function" ? await t.error(u) : t.error, e = typeof t.description == "function" ? await t.description(u) : t.description, y = typeof m == "object" && !i.isValidElement(m) ? m : {
1527
+ message: m
1528
+ };
1529
+ this.create({
1530
+ id: a,
1531
+ type: "error",
1532
+ description: e,
1533
+ ...y
1534
+ });
1535
+ }
1536
+ }).finally(() => {
1537
+ o && (this.dismiss(a), a = void 0), t.finally == null || t.finally.call(t);
1538
+ }), p = () => new Promise((u, m) => d.then(() => c[0] === "reject" ? m(c[1]) : u(c[1])).catch(m));
1539
+ return typeof a != "string" && typeof a != "number" ? {
1540
+ unwrap: p
1541
+ } : Object.assign(a, {
1542
+ unwrap: p
1543
+ });
1544
+ }, this.custom = (s, t) => {
1545
+ const a = (t == null ? void 0 : t.id) || At++;
1546
+ return this.create({
1547
+ jsx: s(a),
1548
+ id: a,
1549
+ ...t
1550
+ }), a;
1551
+ }, this.getActiveToasts = () => this.toasts.filter((s) => !this.dismissedToasts.has(s.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
1552
+ }
1553
+ }
1554
+ const X = new ws(), Ns = (n, s) => {
1555
+ const t = (s == null ? void 0 : s.id) || At++;
1556
+ return X.addToast({
1557
+ title: n,
1558
+ ...s,
1559
+ id: t
1560
+ }), t;
1561
+ }, Ts = (n) => n && typeof n == "object" && "ok" in n && typeof n.ok == "boolean" && "status" in n && typeof n.status == "number", Es = Ns, ks = () => X.toasts, Ss = () => X.getActiveToasts(), en = Object.assign(Es, {
1562
+ success: X.success,
1563
+ info: X.info,
1564
+ warning: X.warning,
1565
+ error: X.error,
1566
+ custom: X.custom,
1567
+ message: X.message,
1568
+ promise: X.promise,
1569
+ dismiss: X.dismiss,
1570
+ loading: X.loading
1571
+ }, {
1572
+ getHistory: ks,
1573
+ getToasts: Ss
1574
+ });
1575
+ us("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
1576
+ function Ct(n) {
1577
+ return n.label !== void 0;
1578
+ }
1579
+ const Ds = 3, Cs = "24px", Is = "16px", Ft = 4e3, Ms = 356, Bs = 14, Rs = 45, As = 200;
1580
+ function at(...n) {
1581
+ return n.filter(Boolean).join(" ");
1582
+ }
1583
+ function _s(n) {
1584
+ const [s, t] = n.split("-"), a = [];
1585
+ return s && a.push(s), t && a.push(t), a;
1586
+ }
1587
+ const Ls = (n) => {
1588
+ var s, t, a, l, o, c, d, p, u;
1589
+ const { invert: m, toast: e, unstyled: f, interacting: y, setHeights: E, visibleToasts: q, heights: V, index: v, toasts: U, expanded: h, removeToast: k, defaultRichColors: I, closeButton: S, style: P, cancelButtonStyle: C, actionButtonStyle: _, className: B = "", descriptionClassName: W = "", duration: Y, position: g, gap: z, expandByDefault: F, classNames: T, icons: R, closeButtonAriaLabel: rt = "Close toast" } = n, [ct, tt] = i.useState(null), [dt, Nt] = i.useState(null), [w, A] = i.useState(!1), [M, Q] = i.useState(!1), [ft, D] = i.useState(!1), [pt, Tt] = i.useState(!1), [Et, xt] = i.useState(!1), [ne, Mt] = i.useState(0), [ae, Lt] = i.useState(0), vt = i.useRef(e.duration || Y || Ft), Ht = i.useRef(null), ot = i.useRef(null), oe = v === 0, re = v + 1 <= q, K = e.type, bt = e.dismissible !== !1, ie = e.className || "", le = e.descriptionClassName || "", kt = i.useMemo(() => V.findIndex((b) => b.toastId === e.id) || 0, [
1590
+ V,
1591
+ e.id
1592
+ ]), ce = i.useMemo(() => {
1593
+ var b;
1594
+ return (b = e.closeButton) != null ? b : S;
1595
+ }, [
1596
+ e.closeButton,
1597
+ S
1598
+ ]), Pt = i.useMemo(() => e.duration || Y || Ft, [
1599
+ e.duration,
1600
+ Y
1601
+ ]), Bt = i.useRef(0), gt = i.useRef(0), zt = i.useRef(0), ht = i.useRef(null), [de, ue] = g.split("-"), Ot = i.useMemo(() => V.reduce((b, L, $) => $ >= kt ? b : b + L.height, 0), [
1602
+ V,
1603
+ kt
1604
+ ]), jt = ys(), me = e.invert || m, Rt = K === "loading";
1605
+ gt.current = i.useMemo(() => kt * z + Ot, [
1606
+ kt,
1607
+ Ot
1608
+ ]), i.useEffect(() => {
1609
+ vt.current = Pt;
1610
+ }, [
1611
+ Pt
1612
+ ]), i.useEffect(() => {
1613
+ A(!0);
1614
+ }, []), i.useEffect(() => {
1615
+ const b = ot.current;
1616
+ if (b) {
1617
+ const L = b.getBoundingClientRect().height;
1618
+ return Lt(L), E(($) => [
1619
+ {
1620
+ toastId: e.id,
1621
+ height: L,
1622
+ position: e.position
1623
+ },
1624
+ ...$
1625
+ ]), () => E(($) => $.filter((G) => G.toastId !== e.id));
1626
+ }
1627
+ }, [
1628
+ E,
1629
+ e.id
1630
+ ]), i.useLayoutEffect(() => {
1631
+ if (!w) return;
1632
+ const b = ot.current, L = b.style.height;
1633
+ b.style.height = "auto";
1634
+ const $ = b.getBoundingClientRect().height;
1635
+ b.style.height = L, Lt($), E((G) => G.find((O) => O.toastId === e.id) ? G.map((O) => O.toastId === e.id ? {
1636
+ ...O,
1637
+ height: $
1638
+ } : O) : [
1639
+ {
1640
+ toastId: e.id,
1641
+ height: $,
1642
+ position: e.position
1643
+ },
1644
+ ...G
1645
+ ]);
1646
+ }, [
1647
+ w,
1648
+ e.title,
1649
+ e.description,
1650
+ E,
1651
+ e.id,
1652
+ e.jsx,
1653
+ e.action,
1654
+ e.cancel
1655
+ ]);
1656
+ const it = i.useCallback(() => {
1657
+ Q(!0), Mt(gt.current), E((b) => b.filter((L) => L.toastId !== e.id)), setTimeout(() => {
1658
+ k(e);
1659
+ }, As);
1660
+ }, [
1661
+ e,
1662
+ k,
1663
+ E,
1664
+ gt
1665
+ ]);
1666
+ i.useEffect(() => {
1667
+ if (e.promise && K === "loading" || e.duration === 1 / 0 || e.type === "loading") return;
1668
+ let b;
1669
+ return h || y || jt ? (() => {
1670
+ if (zt.current < Bt.current) {
1671
+ const G = (/* @__PURE__ */ new Date()).getTime() - Bt.current;
1672
+ vt.current = vt.current - G;
1673
+ }
1674
+ zt.current = (/* @__PURE__ */ new Date()).getTime();
1675
+ })() : (() => {
1676
+ vt.current !== 1 / 0 && (Bt.current = (/* @__PURE__ */ new Date()).getTime(), b = setTimeout(() => {
1677
+ e.onAutoClose == null || e.onAutoClose.call(e, e), it();
1678
+ }, vt.current));
1679
+ })(), () => clearTimeout(b);
1680
+ }, [
1681
+ h,
1682
+ y,
1683
+ e,
1684
+ K,
1685
+ jt,
1686
+ it
1687
+ ]), i.useEffect(() => {
1688
+ e.delete && (it(), e.onDismiss == null || e.onDismiss.call(e, e));
1689
+ }, [
1690
+ it,
1691
+ e.delete
1692
+ ]);
1693
+ function fe() {
1694
+ var b;
1695
+ if (R != null && R.loading) {
1696
+ var L;
1697
+ return /* @__PURE__ */ i.createElement("div", {
1698
+ className: at(T == null ? void 0 : T.loader, e == null || (L = e.classNames) == null ? void 0 : L.loader, "sonner-loader"),
1699
+ "data-visible": K === "loading"
1700
+ }, R.loading);
1701
+ }
1702
+ return /* @__PURE__ */ i.createElement(ps, {
1703
+ className: at(T == null ? void 0 : T.loader, e == null || (b = e.classNames) == null ? void 0 : b.loader),
1704
+ visible: K === "loading"
1705
+ });
1706
+ }
1707
+ const pe = e.icon || (R == null ? void 0 : R[K]) || ms(K);
1708
+ var Vt, $t;
1709
+ return /* @__PURE__ */ i.createElement("li", {
1710
+ tabIndex: 0,
1711
+ ref: ot,
1712
+ className: at(B, ie, T == null ? void 0 : T.toast, e == null || (s = e.classNames) == null ? void 0 : s.toast, T == null ? void 0 : T.default, T == null ? void 0 : T[K], e == null || (t = e.classNames) == null ? void 0 : t[K]),
1713
+ "data-sonner-toast": "",
1714
+ "data-rich-colors": (Vt = e.richColors) != null ? Vt : I,
1715
+ "data-styled": !(e.jsx || e.unstyled || f),
1716
+ "data-mounted": w,
1717
+ "data-promise": !!e.promise,
1718
+ "data-swiped": Et,
1719
+ "data-removed": M,
1720
+ "data-visible": re,
1721
+ "data-y-position": de,
1722
+ "data-x-position": ue,
1723
+ "data-index": v,
1724
+ "data-front": oe,
1725
+ "data-swiping": ft,
1726
+ "data-dismissible": bt,
1727
+ "data-type": K,
1728
+ "data-invert": me,
1729
+ "data-swipe-out": pt,
1730
+ "data-swipe-direction": dt,
1731
+ "data-expanded": !!(h || F && w),
1732
+ "data-testid": e.testId,
1733
+ style: {
1734
+ "--index": v,
1735
+ "--toasts-before": v,
1736
+ "--z-index": U.length - v,
1737
+ "--offset": `${M ? ne : gt.current}px`,
1738
+ "--initial-height": F ? "auto" : `${ae}px`,
1739
+ ...P,
1740
+ ...e.style
1741
+ },
1742
+ onDragEnd: () => {
1743
+ D(!1), tt(null), ht.current = null;
1744
+ },
1745
+ onPointerDown: (b) => {
1746
+ b.button !== 2 && (Rt || !bt || (Ht.current = /* @__PURE__ */ new Date(), Mt(gt.current), b.target.setPointerCapture(b.pointerId), b.target.tagName !== "BUTTON" && (D(!0), ht.current = {
1747
+ x: b.clientX,
1748
+ y: b.clientY
1749
+ })));
1750
+ },
1751
+ onPointerUp: () => {
1752
+ var b, L, $;
1753
+ if (pt || !bt) return;
1754
+ ht.current = null;
1755
+ const G = Number(((b = ot.current) == null ? void 0 : b.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), St = Number(((L = ot.current) == null ? void 0 : L.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), O = (/* @__PURE__ */ new Date()).getTime() - (($ = Ht.current) == null ? void 0 : $.getTime()), Z = ct === "x" ? G : St, Dt = Math.abs(Z) / O;
1756
+ if (Math.abs(Z) >= Rs || Dt > 0.11) {
1757
+ Mt(gt.current), e.onDismiss == null || e.onDismiss.call(e, e), Nt(ct === "x" ? G > 0 ? "right" : "left" : St > 0 ? "down" : "up"), it(), Tt(!0);
1758
+ return;
1759
+ } else {
1760
+ var et, st;
1761
+ (et = ot.current) == null || et.style.setProperty("--swipe-amount-x", "0px"), (st = ot.current) == null || st.style.setProperty("--swipe-amount-y", "0px");
1762
+ }
1763
+ xt(!1), D(!1), tt(null);
1764
+ },
1765
+ onPointerMove: (b) => {
1766
+ var L, $, G;
1767
+ if (!ht.current || !bt || ((L = window.getSelection()) == null ? void 0 : L.toString().length) > 0) return;
1768
+ const O = b.clientY - ht.current.y, Z = b.clientX - ht.current.x;
1769
+ var Dt;
1770
+ const et = (Dt = n.swipeDirections) != null ? Dt : _s(g);
1771
+ !ct && (Math.abs(Z) > 1 || Math.abs(O) > 1) && tt(Math.abs(Z) > Math.abs(O) ? "x" : "y");
1772
+ let st = {
1773
+ x: 0,
1774
+ y: 0
1775
+ };
1776
+ const Yt = (ut) => 1 / (1.5 + Math.abs(ut) / 20);
1777
+ if (ct === "y") {
1778
+ if (et.includes("top") || et.includes("bottom"))
1779
+ if (et.includes("top") && O < 0 || et.includes("bottom") && O > 0)
1780
+ st.y = O;
1781
+ else {
1782
+ const ut = O * Yt(O);
1783
+ st.y = Math.abs(ut) < Math.abs(O) ? ut : O;
1784
+ }
1785
+ } else if (ct === "x" && (et.includes("left") || et.includes("right")))
1786
+ if (et.includes("left") && Z < 0 || et.includes("right") && Z > 0)
1787
+ st.x = Z;
1788
+ else {
1789
+ const ut = Z * Yt(Z);
1790
+ st.x = Math.abs(ut) < Math.abs(Z) ? ut : Z;
1791
+ }
1792
+ (Math.abs(st.x) > 0 || Math.abs(st.y) > 0) && xt(!0), ($ = ot.current) == null || $.style.setProperty("--swipe-amount-x", `${st.x}px`), (G = ot.current) == null || G.style.setProperty("--swipe-amount-y", `${st.y}px`);
1793
+ }
1794
+ }, ce && !e.jsx && K !== "loading" ? /* @__PURE__ */ i.createElement("button", {
1795
+ "aria-label": rt,
1796
+ "data-disabled": Rt,
1797
+ "data-close-button": !0,
1798
+ onClick: Rt || !bt ? () => {
1799
+ } : () => {
1800
+ it(), e.onDismiss == null || e.onDismiss.call(e, e);
1801
+ },
1802
+ className: at(T == null ? void 0 : T.closeButton, e == null || (a = e.classNames) == null ? void 0 : a.closeButton)
1803
+ }, ($t = R == null ? void 0 : R.close) != null ? $t : vs) : null, (K || e.icon || e.promise) && e.icon !== null && ((R == null ? void 0 : R[K]) !== null || e.icon) ? /* @__PURE__ */ i.createElement("div", {
1804
+ "data-icon": "",
1805
+ className: at(T == null ? void 0 : T.icon, e == null || (l = e.classNames) == null ? void 0 : l.icon)
1806
+ }, e.promise || e.type === "loading" && !e.icon ? e.icon || fe() : null, e.type !== "loading" ? pe : null) : null, /* @__PURE__ */ i.createElement("div", {
1807
+ "data-content": "",
1808
+ className: at(T == null ? void 0 : T.content, e == null || (o = e.classNames) == null ? void 0 : o.content)
1809
+ }, /* @__PURE__ */ i.createElement("div", {
1810
+ "data-title": "",
1811
+ className: at(T == null ? void 0 : T.title, e == null || (c = e.classNames) == null ? void 0 : c.title)
1812
+ }, e.jsx ? e.jsx : typeof e.title == "function" ? e.title() : e.title), e.description ? /* @__PURE__ */ i.createElement("div", {
1813
+ "data-description": "",
1814
+ className: at(W, le, T == null ? void 0 : T.description, e == null || (d = e.classNames) == null ? void 0 : d.description)
1815
+ }, typeof e.description == "function" ? e.description() : e.description) : null), /* @__PURE__ */ i.isValidElement(e.cancel) ? e.cancel : e.cancel && Ct(e.cancel) ? /* @__PURE__ */ i.createElement("button", {
1816
+ "data-button": !0,
1817
+ "data-cancel": !0,
1818
+ style: e.cancelButtonStyle || C,
1819
+ onClick: (b) => {
1820
+ Ct(e.cancel) && bt && (e.cancel.onClick == null || e.cancel.onClick.call(e.cancel, b), it());
1821
+ },
1822
+ className: at(T == null ? void 0 : T.cancelButton, e == null || (p = e.classNames) == null ? void 0 : p.cancelButton)
1823
+ }, e.cancel.label) : null, /* @__PURE__ */ i.isValidElement(e.action) ? e.action : e.action && Ct(e.action) ? /* @__PURE__ */ i.createElement("button", {
1824
+ "data-button": !0,
1825
+ "data-action": !0,
1826
+ style: e.actionButtonStyle || _,
1827
+ onClick: (b) => {
1828
+ Ct(e.action) && (e.action.onClick == null || e.action.onClick.call(e.action, b), !b.defaultPrevented && it());
1829
+ },
1830
+ className: at(T == null ? void 0 : T.actionButton, e == null || (u = e.classNames) == null ? void 0 : u.actionButton)
1831
+ }, e.action.label) : null);
1832
+ };
1833
+ function Xt() {
1834
+ if (typeof window > "u" || typeof document > "u") return "ltr";
1835
+ const n = document.documentElement.getAttribute("dir");
1836
+ return n === "auto" || !n ? window.getComputedStyle(document.documentElement).direction : n;
1837
+ }
1838
+ function Hs(n, s) {
1839
+ const t = {};
1840
+ return [
1841
+ n,
1842
+ s
1843
+ ].forEach((a, l) => {
1844
+ const o = l === 1, c = o ? "--mobile-offset" : "--offset", d = o ? Is : Cs;
1845
+ function p(u) {
1846
+ [
1847
+ "top",
1848
+ "right",
1849
+ "bottom",
1850
+ "left"
1851
+ ].forEach((m) => {
1852
+ t[`${c}-${m}`] = typeof u == "number" ? `${u}px` : u;
1853
+ });
1854
+ }
1855
+ typeof a == "number" || typeof a == "string" ? p(a) : typeof a == "object" ? [
1856
+ "top",
1857
+ "right",
1858
+ "bottom",
1859
+ "left"
1860
+ ].forEach((u) => {
1861
+ a[u] === void 0 ? t[`${c}-${u}`] = d : t[`${c}-${u}`] = typeof a[u] == "number" ? `${a[u]}px` : a[u];
1862
+ }) : p(d);
1863
+ }), t;
1864
+ }
1865
+ const Ps = /* @__PURE__ */ i.forwardRef(function(s, t) {
1866
+ const { id: a, invert: l, position: o = "bottom-right", hotkey: c = [
1867
+ "altKey",
1868
+ "KeyT"
1869
+ ], expand: d, closeButton: p, className: u, offset: m, mobileOffset: e, theme: f = "light", richColors: y, duration: E, style: q, visibleToasts: V = Ds, toastOptions: v, dir: U = Xt(), gap: h = Bs, icons: k, containerAriaLabel: I = "Notifications" } = s, [S, P] = i.useState([]), C = i.useMemo(() => a ? S.filter((w) => w.toasterId === a) : S.filter((w) => !w.toasterId), [
1870
+ S,
1871
+ a
1872
+ ]), _ = i.useMemo(() => Array.from(new Set([
1873
+ o
1874
+ ].concat(C.filter((w) => w.position).map((w) => w.position)))), [
1875
+ C,
1876
+ o
1877
+ ]), [B, W] = i.useState([]), [Y, g] = i.useState(!1), [z, F] = i.useState(!1), [T, R] = i.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), rt = i.useRef(null), ct = c.join("+").replace(/Key/g, "").replace(/Digit/g, ""), tt = i.useRef(null), dt = i.useRef(!1), Nt = i.useCallback((w) => {
1878
+ P((A) => {
1879
+ var M;
1880
+ return (M = A.find((Q) => Q.id === w.id)) != null && M.delete || X.dismiss(w.id), A.filter(({ id: Q }) => Q !== w.id);
1881
+ });
1882
+ }, []);
1883
+ return i.useEffect(() => X.subscribe((w) => {
1884
+ if (w.dismiss) {
1885
+ requestAnimationFrame(() => {
1886
+ P((A) => A.map((M) => M.id === w.id ? {
1887
+ ...M,
1888
+ delete: !0
1889
+ } : M));
1890
+ });
1891
+ return;
1892
+ }
1893
+ setTimeout(() => {
1894
+ ke.flushSync(() => {
1895
+ P((A) => {
1896
+ const M = A.findIndex((Q) => Q.id === w.id);
1897
+ return M !== -1 ? [
1898
+ ...A.slice(0, M),
1899
+ {
1900
+ ...A[M],
1901
+ ...w
1902
+ },
1903
+ ...A.slice(M + 1)
1904
+ ] : [
1905
+ w,
1906
+ ...A
1907
+ ];
1908
+ });
1909
+ });
1910
+ });
1911
+ }), [
1912
+ S
1913
+ ]), i.useEffect(() => {
1914
+ if (f !== "system") {
1915
+ R(f);
1916
+ return;
1917
+ }
1918
+ if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? R("dark") : R("light")), typeof window > "u") return;
1919
+ const w = window.matchMedia("(prefers-color-scheme: dark)");
1920
+ try {
1921
+ w.addEventListener("change", ({ matches: A }) => {
1922
+ R(A ? "dark" : "light");
1923
+ });
1924
+ } catch {
1925
+ w.addListener(({ matches: M }) => {
1926
+ try {
1927
+ R(M ? "dark" : "light");
1928
+ } catch (Q) {
1929
+ console.error(Q);
1930
+ }
1931
+ });
1932
+ }
1933
+ }, [
1934
+ f
1935
+ ]), i.useEffect(() => {
1936
+ S.length <= 1 && g(!1);
1937
+ }, [
1938
+ S
1939
+ ]), i.useEffect(() => {
1940
+ const w = (A) => {
1941
+ var M;
1942
+ if (c.every((D) => A[D] || A.code === D)) {
1943
+ var ft;
1944
+ g(!0), (ft = rt.current) == null || ft.focus();
1945
+ }
1946
+ A.code === "Escape" && (document.activeElement === rt.current || (M = rt.current) != null && M.contains(document.activeElement)) && g(!1);
1947
+ };
1948
+ return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
1949
+ }, [
1950
+ c
1951
+ ]), i.useEffect(() => {
1952
+ if (rt.current)
1953
+ return () => {
1954
+ tt.current && (tt.current.focus({
1955
+ preventScroll: !0
1956
+ }), tt.current = null, dt.current = !1);
1957
+ };
1958
+ }, [
1959
+ rt.current
1960
+ ]), // Remove item from normal navigation flow, only available via hotkey
1961
+ /* @__PURE__ */ i.createElement("section", {
1962
+ ref: t,
1963
+ "aria-label": `${I} ${ct}`,
1964
+ tabIndex: -1,
1965
+ "aria-live": "polite",
1966
+ "aria-relevant": "additions text",
1967
+ "aria-atomic": "false",
1968
+ suppressHydrationWarning: !0
1969
+ }, _.map((w, A) => {
1970
+ var M;
1971
+ const [Q, ft] = w.split("-");
1972
+ return C.length ? /* @__PURE__ */ i.createElement("ol", {
1973
+ key: w,
1974
+ dir: U === "auto" ? Xt() : U,
1975
+ tabIndex: -1,
1976
+ ref: rt,
1977
+ className: u,
1978
+ "data-sonner-toaster": !0,
1979
+ "data-sonner-theme": T,
1980
+ "data-y-position": Q,
1981
+ "data-x-position": ft,
1982
+ style: {
1983
+ "--front-toast-height": `${((M = B[0]) == null ? void 0 : M.height) || 0}px`,
1984
+ "--width": `${Ms}px`,
1985
+ "--gap": `${h}px`,
1986
+ ...q,
1987
+ ...Hs(m, e)
1988
+ },
1989
+ onBlur: (D) => {
1990
+ dt.current && !D.currentTarget.contains(D.relatedTarget) && (dt.current = !1, tt.current && (tt.current.focus({
1991
+ preventScroll: !0
1992
+ }), tt.current = null));
1993
+ },
1994
+ onFocus: (D) => {
1995
+ D.target instanceof HTMLElement && D.target.dataset.dismissible === "false" || dt.current || (dt.current = !0, tt.current = D.relatedTarget);
1996
+ },
1997
+ onMouseEnter: () => g(!0),
1998
+ onMouseMove: () => g(!0),
1999
+ onMouseLeave: () => {
2000
+ z || g(!1);
2001
+ },
2002
+ onDragEnd: () => g(!1),
2003
+ onPointerDown: (D) => {
2004
+ D.target instanceof HTMLElement && D.target.dataset.dismissible === "false" || F(!0);
2005
+ },
2006
+ onPointerUp: () => F(!1)
2007
+ }, C.filter((D) => !D.position && A === 0 || D.position === w).map((D, pt) => {
2008
+ var Tt, Et;
2009
+ return /* @__PURE__ */ i.createElement(Ls, {
2010
+ key: D.id,
2011
+ icons: k,
2012
+ index: pt,
2013
+ toast: D,
2014
+ defaultRichColors: y,
2015
+ duration: (Tt = v == null ? void 0 : v.duration) != null ? Tt : E,
2016
+ className: v == null ? void 0 : v.className,
2017
+ descriptionClassName: v == null ? void 0 : v.descriptionClassName,
2018
+ invert: l,
2019
+ visibleToasts: V,
2020
+ closeButton: (Et = v == null ? void 0 : v.closeButton) != null ? Et : p,
2021
+ interacting: z,
2022
+ position: w,
2023
+ style: v == null ? void 0 : v.style,
2024
+ unstyled: v == null ? void 0 : v.unstyled,
2025
+ classNames: v == null ? void 0 : v.classNames,
2026
+ cancelButtonStyle: v == null ? void 0 : v.cancelButtonStyle,
2027
+ actionButtonStyle: v == null ? void 0 : v.actionButtonStyle,
2028
+ closeButtonAriaLabel: v == null ? void 0 : v.closeButtonAriaLabel,
2029
+ removeToast: Nt,
2030
+ toasts: C.filter((xt) => xt.position == D.position),
2031
+ heights: B.filter((xt) => xt.position == D.position),
2032
+ setHeights: W,
2033
+ expandByDefault: d,
2034
+ gap: h,
2035
+ expanded: Y,
2036
+ swipeDirections: s.swipeDirections
2037
+ });
2038
+ })) : null;
2039
+ }));
2040
+ }), zs = ({ position: n = "bottom-center", theme: s = "system", toasterProps: t }) => {
2041
+ const a = {
2042
+ toast: "uix-glass uix-glass-border uix-convex rounded-2xl shadow-lg text-uix-text-100",
2043
+ title: "text-uix-text-100 font-medium",
2044
+ description: "text-uix-text-200",
2045
+ actionButton: "bg-uix-prime-300 text-white rounded-xl hover:bg-uix-prime-400",
2046
+ cancelButton: "bg-uix-surface-300/50 text-uix-text-200 rounded-xl hover:bg-uix-surface-400/50",
2047
+ success: "text-green-500",
2048
+ error: "text-uix-sub1-400",
2049
+ warning: "text-amber-500",
2050
+ info: "text-uix-prime-400"
2051
+ };
2052
+ return /* @__PURE__ */ r(
2053
+ Ps,
2054
+ {
2055
+ position: n,
2056
+ theme: s,
2057
+ toastOptions: {
2058
+ unstyled: !0,
2059
+ classNames: {
2060
+ toast: a.toast,
2061
+ title: a.title,
2062
+ description: a.description,
2063
+ actionButton: a.actionButton,
2064
+ cancelButton: a.cancelButton,
2065
+ success: a.success,
2066
+ error: a.error,
2067
+ warning: a.warning,
2068
+ info: a.info
2069
+ },
2070
+ style: {
2071
+ padding: "16px",
2072
+ gap: "8px",
2073
+ display: "flex",
2074
+ alignItems: "center"
2075
+ }
2076
+ },
2077
+ ...t
2078
+ }
2079
+ );
2080
+ };
2081
+ zs.displayName = "Toaster";
830
2082
  export {
831
- L as Badge,
832
- F as Button,
833
- U as Card,
834
- W as CardContent,
835
- J as CardDescription,
836
- Y as CardHeader,
837
- q as CardTitle,
838
- K as CodeBlock,
839
- He as ColorSwipeText,
840
- ze as Dropdown,
841
- Pe as DropdownContent,
842
- Be as DropdownItem,
843
- _e as DropdownSeparator,
844
- Ie as DropdownTrigger,
845
- z as ScrollArea,
846
- Me as ScrollToTop,
847
- ee as Section,
848
- te as SectionTitle,
849
- ie as Sheet,
850
- se as SheetContent,
851
- ne as SheetHeader,
852
- oe as SheetTitle,
853
- le as Sidebar,
854
- ce as SidebarContent,
855
- de as SidebarGroup,
856
- xe as SidebarGroupLabel,
857
- ue as SidebarHeader,
858
- me as SidebarMenu,
859
- pe as SidebarMenuButton,
860
- be as SidebarMenuItem,
861
- fe as Surface,
862
- ge as Tabs,
863
- we as TabsContent,
864
- ve as TabsList,
865
- he as TabsPanels,
866
- ye as TabsTrigger,
867
- u as cn
2083
+ De as Accordion,
2084
+ Me as AccordionContent,
2085
+ Ce as AccordionItem,
2086
+ Ie as AccordionTrigger,
2087
+ Qt as Badge,
2088
+ Be as Button,
2089
+ Re as Card,
2090
+ Ae as CardContent,
2091
+ He as CardDescription,
2092
+ _e as CardHeader,
2093
+ Le as CardTitle,
2094
+ Pe as CodeBlock,
2095
+ Ks as ColorSwipeText,
2096
+ Gs as Dropdown,
2097
+ Qs as DropdownContent,
2098
+ Zs as DropdownItem,
2099
+ Js as DropdownSeparator,
2100
+ qs as DropdownTrigger,
2101
+ je as FileUploader,
2102
+ Ve as PinInput,
2103
+ Jt as ScrollArea,
2104
+ tn as ScrollToTop,
2105
+ $e as Section,
2106
+ Ye as SectionTitle,
2107
+ Xe as Sheet,
2108
+ Ue as SheetContent,
2109
+ We as SheetHeader,
2110
+ Ke as SheetTitle,
2111
+ qe as Sidebar,
2112
+ Ze as SidebarContent,
2113
+ Je as SidebarGroup,
2114
+ ts as SidebarGroupLabel,
2115
+ Qe as SidebarHeader,
2116
+ es as SidebarMenu,
2117
+ ns as SidebarMenuButton,
2118
+ ss as SidebarMenuItem,
2119
+ as as Slider,
2120
+ os as Surface,
2121
+ rs as Tabs,
2122
+ ds as TabsContent,
2123
+ is as TabsList,
2124
+ cs as TabsPanels,
2125
+ ls as TabsTrigger,
2126
+ zs as Toaster,
2127
+ x as cn,
2128
+ en as toast
868
2129
  };