@jameskyeong/uix 0.1.6 → 0.1.7

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