@moondreamsdev/dreamer-ui 1.7.10-test.56 → 1.7.10-test.57

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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as n, Fragment as q, jsxs as b } from "react/jsx-runtime";
2
- import D, { createContext as e, useId as H, useState as h, useEffect as g, useRef as P, useCallback as z, useMemo as T, useContext as F } from "react";
3
- import { createPortal as K } from "react-dom";
4
- import { X as V, C as X, E as Z, I as G } from "./X-CIoyLewf.js";
2
+ import D, { createContext as e, useId as F, useState as h, useEffect as g, useRef as H, useCallback as T, useMemo as E, useContext as P } from "react";
3
+ import { createPortal as V } from "react-dom";
4
+ import { X as K, C as X, E as Z, I as G } from "./X-CIoyLewf.js";
5
5
  import { j as J } from "./join-BmgR_f4v.js";
6
6
  function N(...l) {
7
7
  return l.filter((r) => typeof r == "string" && r).join(" ").trim() || void 0;
@@ -96,7 +96,8 @@ e(null);
96
96
  e(null);
97
97
  e(null);
98
98
  e(null);
99
- function R() {
99
+ e(null);
100
+ function U() {
100
101
  const [l, r] = h(0);
101
102
  return g(() => {
102
103
  const i = setInterval(() => {
@@ -114,7 +115,7 @@ function R() {
114
115
  i
115
116
  )) });
116
117
  }
117
- const U = {
118
+ const W = {
118
119
  base: "",
119
120
  primary: "bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground",
120
121
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80",
@@ -122,7 +123,7 @@ const U = {
122
123
  outline: "border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted",
123
124
  link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted",
124
125
  destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground"
125
- }, W = {
126
+ }, Y = {
126
127
  stripped: "",
127
128
  fitted: "size-fit",
128
129
  sm: "px-2 py-1 text-sm",
@@ -130,7 +131,7 @@ const U = {
130
131
  lg: "px-6 py-3 text-lg",
131
132
  icon: "p-1 w-fit aspect-square",
132
133
  full: "p-2 w-full"
133
- }, Y = {
134
+ }, _ = {
134
135
  none: "rounded-none",
135
136
  sm: "rounded-sm",
136
137
  md: "rounded-md",
@@ -141,7 +142,7 @@ const U = {
141
142
  size: "md",
142
143
  rounded: "md"
143
144
  };
144
- function _({
145
+ function R({
145
146
  variant: l = w.variant,
146
147
  size: r,
147
148
  rounded: i = w.rounded,
@@ -156,9 +157,9 @@ function _({
156
157
  l === "link" && !r ? c = "fitted" : c = r || w.size;
157
158
  const m = N(
158
159
  "appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all",
159
- U[l],
160
- W[c],
161
- Y[i],
160
+ W[l],
161
+ Y[c],
162
+ _[i],
162
163
  t && "relative pointer-events-none",
163
164
  a && "relative",
164
165
  u
@@ -175,7 +176,7 @@ function _({
175
176
  type: s,
176
177
  className: m,
177
178
  children: [
178
- t && /* @__PURE__ */ n(R, {}),
179
+ t && /* @__PURE__ */ n(U, {}),
179
180
  /* @__PURE__ */ n("span", { className: N(t && "invisible"), children: d.children }),
180
181
  a && !d.disabled && /* @__PURE__ */ n(
181
182
  "a",
@@ -208,7 +209,7 @@ function ee(l, r) {
208
209
  }, [l, r]);
209
210
  }
210
211
  function le(l, r) {
211
- const i = P(null), t = z(() => {
212
+ const i = H(null), t = T(() => {
212
213
  const a = document.getElementById(l);
213
214
  if (!a) return;
214
215
  const o = a.querySelectorAll('[data-modal-action="true"]');
@@ -249,13 +250,13 @@ function te({
249
250
  ariaLabelledBy: f,
250
251
  ariaDescribedBy: p
251
252
  }) {
252
- const v = H(), k = l || `modal-${v}`, C = l ? `${l}-title` : `modal-title-${v}`, { show: L, shouldRender: y } = $(r);
253
+ const v = F(), k = l || `modal-${v}`, C = l ? `${l}-title` : `modal-title-${v}`, { show: z, shouldRender: y } = $(r);
253
254
  if (le(k, y), ee(y, i), !y) return null;
254
255
  const j = () => t ? D.isValidElement(t) ? /* @__PURE__ */ n("div", { className: "mb-4", children: t }) : /* @__PURE__ */ n("h2", { className: "mb-4 text-xl font-semibold", id: C, children: t }) : null, A = () => c.length === 0 ? null : /* @__PURE__ */ n("div", { className: "mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3", children: c.map((I, O) => {
255
- const { label: B, className: S, ...M } = I;
256
- return /* @__PURE__ */ n(_, { className: S, type: "button", ...M, "data-modal-action": "true", children: B }, O);
256
+ const { label: B, className: M, ...S } = I;
257
+ return /* @__PURE__ */ n(R, { className: M, type: "button", ...S, "data-modal-action": "true", children: B }, O);
257
258
  }) });
258
- return /* @__PURE__ */ n(q, { children: K(
259
+ return /* @__PURE__ */ n(q, { children: V(
259
260
  /* @__PURE__ */ n(
260
261
  "div",
261
262
  {
@@ -281,8 +282,8 @@ function te({
281
282
  id: k,
282
283
  tabIndex: -1,
283
284
  className: x(
284
- "relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75",
285
- L ? "opacity-100 scale-100" : "opacity-0 scale-90",
285
+ "relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover text-popover-foreground transition-all p-6 focus:ring ease-in duration-75",
286
+ z ? "opacity-100 scale-100" : "opacity-0 scale-90",
286
287
  s
287
288
  ),
288
289
  children: [
@@ -319,7 +320,7 @@ function de({
319
320
  title: u,
320
321
  ...d
321
322
  }) {
322
- const c = T(() => l === "confirm" ? {
323
+ const c = E(() => l === "confirm" ? {
323
324
  confirm: t || "Confirm",
324
325
  cancel: i || "Cancel",
325
326
  defaultTitle: u || "Confirm Action"
@@ -327,7 +328,7 @@ function de({
327
328
  confirm: t || "OK",
328
329
  cancel: null,
329
330
  defaultTitle: u || "Alert"
330
- }, [l, t, u, i]), m = T(
331
+ }, [l, t, u, i]), m = E(
331
332
  () => [
332
333
  ...c.cancel ? [
333
334
  {
@@ -360,11 +361,11 @@ function de({
360
361
  );
361
362
  }
362
363
  const ne = e(null), ue = () => {
363
- const l = F(ne);
364
+ const l = P(ne);
364
365
  if (!l)
365
366
  throw new Error("Tabs components must be used within a Tabs component");
366
367
  return l;
367
- }, E = {
368
+ }, L = {
368
369
  info: {
369
370
  className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
370
371
  icon: /* @__PURE__ */ n(G, { size: 20 })
@@ -389,7 +390,7 @@ function ce({
389
390
  customTypes: u,
390
391
  customComponent: d
391
392
  }) {
392
- const [c, m] = h(!1), f = z(() => {
393
+ const [c, m] = h(!1), f = T(() => {
393
394
  m(!0), setTimeout(() => {
394
395
  s == null || s(l);
395
396
  }, 150);
@@ -414,7 +415,7 @@ function ce({
414
415
  onRemove: s
415
416
  }
416
417
  );
417
- const p = (u == null ? void 0 : u[t]) || E[t] || E.info;
418
+ const p = (u == null ? void 0 : u[t]) || L[t] || L.info;
418
419
  return /* @__PURE__ */ b(
419
420
  "div",
420
421
  {
@@ -445,7 +446,7 @@ function ce({
445
446
  {
446
447
  onClick: f,
447
448
  className: "flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0",
448
- children: /* @__PURE__ */ n(V, { size: 16 })
449
+ children: /* @__PURE__ */ n(K, { size: 16 })
449
450
  }
450
451
  )
451
452
  ]
@@ -459,4 +460,4 @@ export {
459
460
  N as n,
460
461
  ue as u
461
462
  };
462
- //# sourceMappingURL=Toast-DqmCcDFx.js.map
463
+ //# sourceMappingURL=Toast-CbrcpfvS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast-CbrcpfvS.js","sources":["join-BmgR_f4v.js","X-CIoyLewf.js","Toast-DqmCcDFx.js","components.esm.js","../src/components/actionmodal/ActionModal.tsx","../src/components/tabs/TabsContext.tsx","../src/components/toast/Toast.tsx"],"sourcesContent":["function n(...t) {\n return t.filter((s) => typeof s == \"string\" && s).join(\" \").trim() || void 0;\n}\nexport {\n n as j\n};\n//# sourceMappingURL=join-BmgR_f4v.js.map\n","import { jsx as e } from \"react/jsx-runtime\";\nfunction t({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction o({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction d({\n size: C = 15,\n color: l = \"currentColor\",\n className: n = \"inline\",\n ...i\n}) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM8.24992 4.49999C8.24992 4.9142 7.91413 5.24999 7.49992 5.24999C7.08571 5.24999 6.74992 4.9142 6.74992 4.49999C6.74992 4.08577 7.08571 3.74999 7.49992 3.74999C7.91413 3.74999 8.24992 4.08577 8.24992 4.49999ZM6.00003 5.99999H6.50003H7.50003C7.77618 5.99999 8.00003 6.22384 8.00003 6.49999V9.99999H8.50003H9.00003V11H8.50003H7.50003H6.50003H6.00003V9.99999H6.50003H7.00003V6.99999H6.50003H6.00003V5.99999Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction h({ size: C = 15, color: l = \"currentColor\", className: n = \"inline\", ...i }) {\n return /* @__PURE__ */ e(\n \"svg\",\n {\n ...i,\n width: C,\n height: C,\n className: n,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ e(\n \"path\",\n {\n d: \"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\",\n fill: l,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nexport {\n t as C,\n o as E,\n d as I,\n h as X\n};\n//# sourceMappingURL=X-CIoyLewf.js.map\n","import { jsx as n, Fragment as q, jsxs as b } from \"react/jsx-runtime\";\nimport D, { createContext as e, useId as H, useState as h, useEffect as g, useRef as P, useCallback as z, useMemo as T, useContext as F } from \"react\";\nimport { createPortal as K } from \"react-dom\";\nimport { X as V, C as X, E as Z, I as G } from \"./X-CIoyLewf.js\";\nimport { j as J } from \"./join-BmgR_f4v.js\";\nfunction N(...l) {\n return l.filter((r) => typeof r == \"string\" && r).join(\" \").trim() || void 0;\n}\nfunction Q({ size: l = 15, color: r = \"currentColor\", className: i = \"inline\", ...t }) {\n return /* @__PURE__ */ n(\n \"svg\",\n {\n ...t,\n width: l,\n height: l,\n className: i,\n viewBox: \"0 0 15 15\",\n xmlns: \"http://www.w3.org/2000/svg\",\n children: /* @__PURE__ */ n(\n \"path\",\n {\n d: \"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\",\n fill: r,\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n }\n )\n }\n );\n}\nfunction x(...l) {\n return l.filter((r) => typeof r == \"string\" && r).join(\" \").trim() || void 0;\n}\ne(void 0);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(void 0);\ne(void 0);\ne(null);\ne(void 0);\ne(void 0);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\ne(null);\nfunction R() {\n const [l, r] = h(0);\n return g(() => {\n const i = setInterval(() => {\n r((t) => (t + 1) % 3);\n }, 500);\n return () => clearInterval(i);\n }, []), /* @__PURE__ */ n(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((i) => /* @__PURE__ */ n(\n \"div\",\n {\n className: N(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n l === i && \"transform -translate-y-1\"\n )\n },\n i\n )) });\n}\nconst U = {\n base: \"\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80\",\n tertiary: \"text-primary hover:text-primary-foreground disabled:text-muted\",\n outline: \"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted\",\n link: \"underline-offset-4 hover:underline disabled:underline disabled:text-muted\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground\"\n}, W = {\n stripped: \"\",\n fitted: \"size-fit\",\n sm: \"px-2 py-1 text-sm\",\n md: \"px-4 py-2 text-base\",\n lg: \"px-6 py-3 text-lg\",\n icon: \"p-1 w-fit aspect-square\",\n full: \"p-2 w-full\"\n}, Y = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, w = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction _({\n variant: l = w.variant,\n size: r,\n rounded: i = w.rounded,\n loading: t,\n linkTo: a,\n linkProps: o,\n type: s = \"button\",\n className: u,\n ...d\n}) {\n let c;\n l === \"link\" && !r ? c = \"fitted\" : c = r || w.size;\n const m = N(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n U[l],\n W[c],\n Y[i],\n t && \"relative pointer-events-none\",\n a && \"relative\",\n u\n );\n return /* @__PURE__ */ b(\n \"button\",\n {\n ...d,\n role: a ? \"link\" : d.role,\n \"aria-label\": d[\"aria-label\"] || (o == null ? void 0 : o[\"aria-label\"]),\n \"aria-description\": d[\"aria-description\"] || (o == null ? void 0 : o[\"aria-description\"]),\n \"aria-disabled\": d.disabled || t,\n \"aria-busy\": t,\n type: s,\n className: m,\n children: [\n t && /* @__PURE__ */ n(R, {}),\n /* @__PURE__ */ n(\"span\", { className: N(t && \"invisible\"), children: d.children }),\n a && !d.disabled && /* @__PURE__ */ n(\n \"a\",\n {\n ...o,\n \"aria-hidden\": !0,\n href: a,\n rel: (o == null ? void 0 : o.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nfunction $(l) {\n const [r, i] = h(!1), [t, a] = h(!1);\n return g(() => {\n l ? (a(!0), setTimeout(() => i(!0), 10)) : (i(!1), setTimeout(() => a(!1), 150));\n }, [l]), { show: r, shouldRender: t };\n}\nfunction ee(l, r) {\n g(() => {\n const i = (t) => {\n t.key === \"Escape\" && l && r();\n };\n return document.addEventListener(\"keydown\", i), l && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", i), document.body.style.overflow = \"auto\";\n };\n }, [l, r]);\n}\nfunction le(l, r) {\n const i = P(null), t = z(() => {\n const a = document.getElementById(l);\n if (!a) return;\n const o = a.querySelectorAll('[data-modal-action=\"true\"]');\n if (o.length > 0) {\n o[0].focus();\n return;\n }\n const s = a.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const u = Array.from(s).filter((d) => !(d instanceof HTMLButtonElement && d.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (u.length > 0) {\n u[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n a.focus();\n }, [l]);\n g(() => (r && (i.current = document.activeElement, t()), () => {\n document.body.style.overflow = \"auto\", i.current instanceof HTMLElement && i.current.focus();\n }), [r, t]);\n}\nfunction te({\n id: l,\n isOpen: r,\n onClose: i,\n title: t,\n children: a,\n contentOnly: o = !1,\n className: s,\n overlayClassName: u,\n hideCloseButton: d = !1,\n actions: c = [],\n disableCloseOnOverlayClick: m = !1,\n ariaLabelledBy: f,\n ariaDescribedBy: p\n}) {\n const v = H(), k = l || `modal-${v}`, C = l ? `${l}-title` : `modal-title-${v}`, { show: L, shouldRender: y } = $(r);\n if (le(k, y), ee(y, i), !y) return null;\n const j = () => t ? D.isValidElement(t) ? /* @__PURE__ */ n(\"div\", { className: \"mb-4\", children: t }) : /* @__PURE__ */ n(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: C, children: t }) : null, A = () => c.length === 0 ? null : /* @__PURE__ */ n(\"div\", { className: \"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3\", children: c.map((I, O) => {\n const { label: B, className: S, ...M } = I;\n return /* @__PURE__ */ n(_, { className: S, type: \"button\", ...M, \"data-modal-action\": \"true\", children: B }, O);\n }) });\n return /* @__PURE__ */ n(q, { children: K(\n /* @__PURE__ */ n(\n \"div\",\n {\n \"aria-labelledby\": f ?? t ? C : void 0,\n \"aria-describedby\": p,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ b(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ n(\n \"div\",\n {\n className: x(\"fixed inset-0 bg-black/20 transition-all\", u),\n onClick: () => {\n m || i();\n }\n }\n ),\n o && /* @__PURE__ */ n(\"div\", { className: x(\"relative w-fit\", s), children: a }),\n !o && /* @__PURE__ */ b(\n \"div\",\n {\n id: k,\n tabIndex: -1,\n className: x(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover transition-all p-6 focus:ring ease-in duration-75\",\n L ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n s\n ),\n children: [\n !d && /* @__PURE__ */ n(\n \"button\",\n {\n type: \"button\",\n onClick: i,\n \"data-modal-close-button\": \"true\",\n className: \"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ n(Q, { size: 18 })\n }\n ),\n j(),\n a,\n A()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nfunction de({\n type: l,\n message: r,\n cancelText: i,\n confirmText: t,\n onConfirm: a,\n onClose: o,\n destructive: s = !1,\n title: u,\n ...d\n}) {\n const c = T(() => l === \"confirm\" ? {\n confirm: t || \"Confirm\",\n cancel: i || \"Cancel\",\n defaultTitle: u || \"Confirm Action\"\n } : {\n confirm: t || \"OK\",\n cancel: null,\n defaultTitle: u || \"Alert\"\n }, [l, t, u, i]), m = T(\n () => [\n ...c.cancel ? [\n {\n label: c.cancel,\n variant: \"secondary\",\n onClick: o\n }\n ] : [],\n {\n label: c.confirm,\n variant: s ? \"destructive\" : \"primary\",\n onClick: () => {\n a == null || a(), o();\n }\n }\n ],\n [c, s, a, o]\n );\n return /* @__PURE__ */ n(\n te,\n {\n ...d,\n title: u || c.defaultTitle,\n onClose: o,\n actions: m,\n disableCloseOnOverlayClick: l === \"confirm\",\n hideCloseButton: l === \"confirm\",\n children: typeof r == \"string\" ? /* @__PURE__ */ n(\"p\", { className: \"text-sm\", children: r }) : r\n }\n );\n}\nconst ne = e(null), ue = () => {\n const l = F(ne);\n if (!l)\n throw new Error(\"Tabs components must be used within a Tabs component\");\n return l;\n}, E = {\n info: {\n className: \"bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100\",\n icon: /* @__PURE__ */ n(G, { size: 20 })\n },\n warning: {\n className: \"bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100\",\n icon: /* @__PURE__ */ n(Z, { size: 20 })\n },\n error: {\n className: \"bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100\",\n icon: /* @__PURE__ */ n(X, { size: 20 })\n }\n};\nfunction ce({\n id: l,\n title: r,\n description: i,\n type: t = \"info\",\n action: a,\n duration: o = 5e3,\n onRemove: s,\n customTypes: u,\n customComponent: d\n}) {\n const [c, m] = h(!1), f = z(() => {\n m(!0), setTimeout(() => {\n s == null || s(l);\n }, 150);\n }, [l, s]);\n if (g(() => {\n if (o > 0) {\n const v = setTimeout(() => {\n f();\n }, o);\n return () => clearTimeout(v);\n }\n }, [o, l, s, f]), d)\n return /* @__PURE__ */ n(\n d,\n {\n id: l,\n title: r,\n description: i,\n type: t,\n action: a,\n duration: o,\n onRemove: s\n }\n );\n const p = (u == null ? void 0 : u[t]) || E[t] || E.info;\n return /* @__PURE__ */ b(\n \"div\",\n {\n role: t === \"error\" ? \"alert\" : \"status\",\n \"aria-live\": t === \"error\" ? void 0 : \"polite\",\n className: J(\n \"relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out\",\n a && \"pb-3\",\n p.className,\n c ? \"opacity-0 translate-x-full\" : \"opacity-100 translate-x-0\"\n ),\n children: [\n /* @__PURE__ */ n(\"div\", { className: \"flex-shrink-0 mr-3\", children: p.icon }),\n /* @__PURE__ */ b(\"div\", { className: \"flex-grow min-w-0\", children: [\n /* @__PURE__ */ n(\"div\", { className: \"font-medium text-sm leading-5\", children: r }),\n i && /* @__PURE__ */ n(\"div\", { className: \"mt-1 text-sm opacity-90 leading-5\", children: i }),\n a && /* @__PURE__ */ n(\"div\", { className: \"mt-1.5\", children: /* @__PURE__ */ n(\n \"button\",\n {\n onClick: a.onClick,\n className: \"text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer\",\n children: a.label\n }\n ) })\n ] }),\n /* @__PURE__ */ n(\n \"button\",\n {\n onClick: f,\n className: \"flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0\",\n children: /* @__PURE__ */ n(V, { size: 16 })\n }\n )\n ]\n }\n );\n}\nexport {\n de as A,\n ce as T,\n ne as a,\n N as n,\n ue as u\n};\n//# sourceMappingURL=Toast-DqmCcDFx.js.map\n","import { jsxs as k, jsx as i, Fragment as Q } from \"react/jsx-runtime\";\nimport F, { useId as K, useState as z, createElement as ze, useEffect as $, useRef as j, useCallback as C, useMemo as q, isValidElement as Le, cloneElement as je } from \"react\";\nimport { j as N } from \"./join-BmgR_f4v.js\";\nimport { f as $e, j as Ve, c as Ae, g as Ie, h as Se, b as ve, D as Me, W as Be, k as We, i as Fe, C as Ke, a as He, l as Pe, E as _e, Q as Ze, d as Ge, e as qe } from \"./Window-uX5BuBwi.js\";\nimport { n as V, a as Ye, u as ge } from \"./Toast-DqmCcDFx.js\";\nimport { A as Yr, T as Ur } from \"./Toast-DqmCcDFx.js\";\nimport { X as oe, E as De, C as Ue, I as Xe } from \"./X-CIoyLewf.js\";\nimport { createPortal as ae } from \"react-dom\";\nimport { downloadFile as Je, mergeRefs as Qe } from \"./utils.esm.js\";\nfunction he({\n id: o,\n title: a,\n content: t,\n children: n,\n className: e = \"\",\n disabled: r = !1,\n isOpen: s = !1,\n onToggle: l,\n triggerClassName: c = \"\",\n bodyClassName: u = \"\"\n}) {\n const f = K(), d = o || `accordion-item-${f}`, h = `${d}-header`, m = `${d}-panel`, v = () => {\n !r && l && l();\n }, b = (p) => {\n (p.key === \"Enter\" || p.key === \" \") && (p.preventDefault(), v());\n };\n return /* @__PURE__ */ k(\"div\", { className: N(\"border-b border-gray-200\", r && \"opacity-60 cursor-not-allowed\", e), children: [\n /* @__PURE__ */ k(\n \"button\",\n {\n id: h,\n type: \"button\",\n className: N(\n \"w-full text-left py-3 px-4 flex justify-between items-center focus:outline focus:outline-secondary\",\n r ? \"cursor-not-allowed\" : \"hover:bg-gray-50/10 cursor-pointer\",\n c\n ),\n \"aria-expanded\": s,\n \"aria-controls\": m,\n disabled: r,\n onClick: v,\n onKeyDown: b,\n children: [\n /* @__PURE__ */ i(\"span\", { children: a }),\n /* @__PURE__ */ i(\n \"span\",\n {\n className: N(\n \"transform transition-transform duration-300 ease-linear\",\n s ? \"rotate-180\" : \"rotate-0\"\n ),\n \"aria-hidden\": \"true\",\n children: /* @__PURE__ */ i($e, { size: 18 })\n }\n )\n ]\n }\n ),\n /* @__PURE__ */ i(\n \"div\",\n {\n id: m,\n role: \"region\",\n \"aria-labelledby\": h,\n className: N(\n \"transition-all duration-300 ease-linear px-4\",\n s ? \"max-h-96 opacity-100 overflow-auto py-3\" : \"max-h-0 opacity-0 overflow-hidden\",\n u\n ),\n children: s && (n || t)\n }\n )\n ] });\n}\nfunction vr({\n id: o,\n items: a = [],\n children: t,\n className: n = \"\",\n itemClassName: e = \"\",\n allowMultiple: r = !1,\n defaultOpenItems: s = [],\n triggersClassName: l = \"\",\n bodiesClassName: c = \"\"\n}) {\n const u = K(), f = o || `accordion-group-${u}`, [d, h] = z(new Set(s)), m = (p) => {\n h((x) => {\n const g = new Set(x);\n return g.has(p) ? g.delete(p) : (r || g.clear(), g.add(p)), g;\n });\n }, v = (p) => `${u}-item-${p}`, b = (p) => d.has(p);\n return /* @__PURE__ */ k(\"div\", { id: f, className: n, children: [\n a.length > 0 && a.map((p, x) => {\n const g = p.id || v(x);\n return /* @__PURE__ */ i(\n he,\n {\n id: g,\n title: p.title,\n content: p.content,\n disabled: p.disabled,\n isOpen: b(g),\n onToggle: () => m(g),\n className: e,\n triggerClassName: l,\n bodyClassName: c\n },\n g\n );\n }),\n a.length === 0 && t && F.Children.map(t, (p, x) => {\n if (F.isValidElement(p) && p.type === he) {\n const g = p.props.id || v(x);\n return /* @__PURE__ */ ze(\n he,\n {\n ...p.props,\n key: g,\n id: g,\n className: N(e, p.props.className),\n isOpen: b(g),\n onToggle: () => m(g),\n triggerClassName: N(l, p.props.triggerClassName),\n bodyClassName: N(c, p.props.bodyClassName)\n }\n );\n }\n return null;\n })\n ] });\n}\nfunction Oe() {\n const [o, a] = z(0);\n return $(() => {\n const t = setInterval(() => {\n a((n) => (n + 1) % 3);\n }, 500);\n return () => clearInterval(t);\n }, []), /* @__PURE__ */ i(\"div\", { className: \"absolute inset-0 inline-flex items-center justify-center gap-x-2 align-middle\", children: [0, 1, 2].map((t) => /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\n \"rounded-full transition-all duration-500 ease-in-out size-[0.35em] bg-current\",\n o === t && \"transform -translate-y-1\"\n )\n },\n t\n )) });\n}\nconst et = {\n base: \"\",\n primary: \"bg-primary text-primary-foreground hover:bg-primary/85 disabled:bg-muted disabled:text-muted-foreground\",\n secondary: \"bg-secondary text-secondary-foreground hover:bg-secondary/85 disabled:bg-muted/80 disabled:text-muted-foreground/80\",\n tertiary: \"text-primary hover:text-primary-foreground disabled:text-muted\",\n outline: \"border border-primary text-primary hover:border-primary-foreground hover:text-primary-foreground disabled:border-muted disabled:text-muted\",\n link: \"underline-offset-4 hover:underline disabled:underline disabled:text-muted\",\n destructive: \"bg-destructive text-destructive-foreground hover:bg-destructive/85 disabled:bg-muted disabled:text-muted-foreground\"\n}, tt = {\n stripped: \"\",\n fitted: \"size-fit\",\n sm: \"px-2 py-1 text-sm\",\n md: \"px-4 py-2 text-base\",\n lg: \"px-6 py-3 text-lg\",\n icon: \"p-1 w-fit aspect-square\",\n full: \"p-2 w-full\"\n}, rt = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"rounded-full\"\n}, pe = {\n variant: \"primary\",\n size: \"md\",\n rounded: \"md\"\n};\nfunction nt({\n variant: o = pe.variant,\n size: a,\n rounded: t = pe.rounded,\n loading: n,\n linkTo: e,\n linkProps: r,\n type: s = \"button\",\n className: l,\n ...c\n}) {\n let u;\n o === \"link\" && !a ? u = \"fitted\" : u = a || pe.size;\n const d = N(\n \"appearance-none focus:outline-none focus:ring not-disabled:hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-all\",\n et[o],\n tt[u],\n rt[t],\n n && \"relative pointer-events-none\",\n e && \"relative\",\n l\n );\n return /* @__PURE__ */ k(\n \"button\",\n {\n ...c,\n role: e ? \"link\" : c.role,\n \"aria-label\": c[\"aria-label\"] || (r == null ? void 0 : r[\"aria-label\"]),\n \"aria-description\": c[\"aria-description\"] || (r == null ? void 0 : r[\"aria-description\"]),\n \"aria-disabled\": c.disabled || n,\n \"aria-busy\": n,\n type: s,\n className: d,\n children: [\n n && /* @__PURE__ */ i(Oe, {}),\n /* @__PURE__ */ i(\"span\", { className: N(n && \"invisible\"), children: c.children }),\n e && !c.disabled && /* @__PURE__ */ i(\n \"a\",\n {\n ...r,\n \"aria-hidden\": !0,\n href: e,\n rel: (r == null ? void 0 : r.rel) || \"noreferrer\",\n className: \"absolute inset-0\"\n }\n )\n ]\n }\n );\n}\nconst ot = {\n info: {\n border: \"border-blue-600\",\n interior: \"bg-blue-800/20\",\n core: \"text-blue-400\",\n description: \"text-blue-200\"\n },\n destructive: {\n border: \"border-destructive\",\n interior: \"bg-destructive/10\",\n core: \"text-destructive\",\n description: \"text-destructive\"\n },\n success: {\n border: \"border-success\",\n interior: \"bg-success/10\",\n core: \"text-success\",\n description: \"text-success\"\n },\n warning: {\n border: \"border-yellow-700\",\n interior: \"bg-yellow-800/20\",\n core: \"text-yellow-400\",\n description: \"text-yellow-200\"\n },\n base: {\n border: \"\",\n interior: \"\",\n core: \"\",\n description: \"opacity-90\"\n }\n}, at = {\n info: /* @__PURE__ */ i(Xe, { size: 22 }),\n destructive: /* @__PURE__ */ i(Ue, { size: 22 }),\n success: /* @__PURE__ */ i(Ae, { size: 22 }),\n warning: /* @__PURE__ */ i(De, { size: 20 }),\n base: /* @__PURE__ */ i(Ve, { size: 22 })\n};\nfunction gr({\n id: o,\n ref: a,\n variant: t = \"base\",\n icon: n,\n title: e,\n description: r,\n className: s,\n dismissible: l = !1,\n onDismiss: c\n}) {\n const u = K(), f = o || `callout-${u}`, [d, h] = z(!1), m = ot[t], v = at[t], b = () => {\n h(!0), c && c();\n };\n return d ? null : /* @__PURE__ */ k(\n \"div\",\n {\n id: f,\n ref: a,\n className: N(\"relative rounded-lg p-2 sm:p-4 border\", m.border, m.interior, s),\n \"data-variant\": t,\n role: \"note\",\n \"aria-describedby\": r ? `${f}-description` : void 0,\n \"aria-labelledby\": e ? `${f}-title` : void 0,\n children: [\n /* @__PURE__ */ k(\"div\", { className: \"flex items-start gap-x-2\", children: [\n n && /* @__PURE__ */ i(\"span\", { className: m.core, children: n === \"default\" ? v : n }),\n (e || r) && /* @__PURE__ */ k(\"div\", { className: \"flex-1\", children: [\n e && /* @__PURE__ */ i(\"div\", { id: `${f}-title`, className: N(\"font-medium\", m.core), children: e }),\n r && /* @__PURE__ */ i(\"div\", { id: `${f}-description`, className: N(\"mt-0.5 font-light\", m.description), children: r })\n ] })\n ] }),\n l && /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: b,\n \"data-callout-close-button\": \"true\",\n className: N(\n m.core,\n \"rounded-md p-0.5 top-2.5 right-2.5 absolute focus:outline-none hover:ring focus:ring-2 focus:ring-current leading-0\"\n ),\n \"aria-label\": \"Close callout\",\n children: /* @__PURE__ */ i(oe, { size: 18 })\n }\n )\n ]\n }\n );\n}\nfunction st({\n totalItems: o,\n itemsToShow: a,\n infinite: t,\n autoScroll: n,\n scrollInterval: e,\n pauseScrollOnHover: r,\n currentIndex: s,\n onIndexChange: l\n}) {\n const [c, u] = z(s || 0), [f, d] = z(!1), h = j(null), m = Math.ceil(o / a), v = t || c > 0, b = t || c < m - 1, p = C(\n (w) => {\n const y = Math.max(0, Math.min(w, m - 1));\n u(y), l == null || l(y);\n },\n [m, l]\n ), x = C(() => {\n if (v) {\n const w = c === 0 && t ? m - 1 : c - 1;\n p(w);\n }\n }, [c, v, t, m, p]), g = C(() => {\n if (b) {\n const w = c === m - 1 && t ? 0 : c + 1;\n p(w);\n }\n }, [c, b, t, m, p]);\n return $(() => {\n s !== void 0 && s !== c && u(s);\n }, [s, c]), $(() => {\n if (!n) return;\n const w = () => {\n h.current = setInterval(() => {\n r && f || g();\n }, e);\n }, y = () => {\n h.current && (clearInterval(h.current), h.current = null);\n };\n return !f || !r ? w() : y(), y;\n }, [n, e, r, f, g]), $(() => {\n u(0);\n }, [a]), {\n currentSlide: c,\n canGoPrev: v,\n canGoNext: b,\n goToPrev: x,\n goToNext: g,\n goToSlide: p,\n isHovered: f,\n setIsHovered: d\n };\n}\nconst te = {\n xs: 0,\n // Smaller than `sm`\n sm: 640,\n // Tailwind's `sm` breakpoint: `@media (min-width: 640px)`\n md: 768,\n // Tailwind's `md` breakpoint: `@media (min-width: 768px)`\n lg: 1024,\n // Tailwind's `lg` breakpoint: `@media (min-width: 1024px)`\n xl: 1280,\n // Tailwind's `xl` breakpoint: `@media (min-width: 1280px)`\n \"2xl\": 1536\n // Tailwind's `2xl` breakpoint: `@media (min-width: 1536px)`\n};\nfunction it() {\n const [o, a] = z(), [t, n] = z(0), e = (r) => te[r];\n return $(() => {\n const r = (l) => l >= te[\"2xl\"] ? \"2xl\" : l >= te.xl ? \"xl\" : l >= te.lg ? \"lg\" : l >= te.md ? \"md\" : l >= te.sm ? \"sm\" : \"xs\";\n a(r(window.innerWidth)), n(window.innerWidth);\n const s = () => {\n a(r(window.innerWidth)), n(window.innerWidth);\n };\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, []), { screenSize: o, screenWidth: t, getBreakpoint: e };\n}\nconst se = {\n sm: {\n button: \"h-6 w-6 text-xs\",\n icon: \"size-3\"\n },\n md: {\n button: \"h-8 w-8 text-sm\",\n icon: \"size-4\"\n },\n lg: {\n button: \"h-10 w-10 text-lg\",\n icon: \"size-5\"\n }\n}, xe = {\n default: \"bg-accent text-accent-foreground hover:bg-accent-foreground hover:text-accent\",\n outline: \"border border-border bg-background hover:bg-accent hover:text-accent-foreground hover:border-accent\",\n ghost: \"hover:text-accent\"\n}, ie = {\n aligned: {\n prev: \"absolute top-1/2 -translate-x-1/2 -translate-y-1/2 z-10\",\n next: \"absolute right-0 top-1/2 translate-x-1/2 -translate-y-1/2 z-10\"\n },\n exterior: {\n prev: \"absolute -left-10 top-1/2 -translate-y-1/2 z-10\",\n next: \"absolute -right-10 top-1/2 -translate-y-1/2 z-10\"\n },\n interior: {\n prev: \"absolute left-2 top-1/2 -translate-y-1/2 z-10\",\n next: \"absolute right-2 top-1/2 -translate-y-1/2 z-10\"\n }\n};\nfunction xr({\n children: o,\n id: a,\n ref: t,\n className: n,\n autoScroll: e = !1,\n scrollInterval: r = 3e3,\n pauseScrollOnHover: s = !0,\n currentIndex: l,\n onIndexChange: c,\n hidePrevNext: u = !1,\n hideDots: f = !1,\n itemsToShow: d = 1,\n buttonSize: h = \"md\",\n buttonVariant: m = \"default\",\n buttonPosition: v = \"exterior\",\n infinite: b = !0,\n prevButton: p,\n nextButton: x,\n itemsClassName: g,\n containerClassName: w,\n dotsClassName: y,\n gap: E = 8\n}) {\n var B, re;\n const I = j(null), D = F.Children.toArray(o).filter(F.isValidElement), A = D.length, { screenSize: H } = it(), L = q(() => {\n if (typeof d == \"number\")\n return d;\n if (typeof d == \"object\" && d && H) {\n const J = [\"2xl\", \"xl\", \"lg\", \"md\", \"sm\", \"xs\"], P = J.indexOf(H);\n for (let ee = P; ee < J.length; ee++) {\n const ne = J[ee];\n if (d[ne] !== void 0)\n return d[ne];\n }\n }\n return 1;\n }, [d, H]), { currentSlide: _, canGoPrev: W, canGoNext: R, goToPrev: S, goToNext: M, goToSlide: Z, setIsHovered: Y } = st({\n totalItems: A,\n itemsToShow: L,\n infinite: b,\n autoScroll: e,\n scrollInterval: r,\n pauseScrollOnHover: s,\n currentIndex: l,\n onIndexChange: c\n }), X = C(\n (J) => {\n if (L === 1)\n return { leftWidth: 0, rightWidth: 0, widthReduction: 0 };\n const P = E * (L - 1) / L;\n return J % L === 0 ? { leftWidth: 0, rightWidth: E / 2, widthReduction: P } : J % L === L - 1 ? { leftWidth: E / 2, rightWidth: 0, widthReduction: P } : { leftWidth: E / 2, rightWidth: E / 2, widthReduction: P };\n },\n [L, E]\n ), G = () => {\n S();\n }, O = () => {\n M();\n }, ue = () => {\n s && Y(!0);\n }, fe = () => {\n s && Y(!1);\n }, me = -(_ * (100 / A) * L), T = N(\n \"inline-flex items-center justify-center rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring focus-visible:ring-ring disabled:pointer-events-none\",\n v === \"aligned\" ? \"disabled:opacity-90\" : \"disabled:opacity-50\"\n );\n return /* @__PURE__ */ k(\"div\", { className: N(\"relative\", n), \"data-carousel-wrapper\": \"true\", children: [\n !u && /* @__PURE__ */ i(Q, { children: p ? F.cloneElement(\n p,\n {\n onClick: G,\n disabled: !W,\n className: N(\n ((B = p.props) == null ? void 0 : B.className) || \"\",\n ie[v].prev\n ),\n role: \"button\",\n \"aria-disabled\": !W,\n \"aria-label\": \"Previous slide\",\n \"data-carousel-prev\": \"true\"\n }\n ) : /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: G,\n disabled: !W,\n className: N(\n T,\n se[h].button,\n xe[m],\n ie[v].prev\n ),\n \"aria-disabled\": !W,\n \"aria-label\": \"Previous slide\",\n \"data-carousel-prev\": \"true\",\n children: /* @__PURE__ */ i(Ie, { className: se[h].icon })\n }\n ) }),\n /* @__PURE__ */ k(\n \"div\",\n {\n id: a,\n ref: t,\n className: N(\"relative overflow-hidden\", w),\n onMouseEnter: ue,\n onMouseLeave: fe,\n \"data-carousel\": \"true\",\n \"data-current-index\": _,\n \"data-items-to-show\": L,\n \"data-auto-scroll\": e,\n \"data-button-position\": v,\n children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n ref: I,\n className: \"flex transition-transform duration-300 ease-in-out\",\n style: {\n transform: `translateX(${me}%)`,\n width: `${A / L * 100}%`\n },\n children: D.map((J, P) => {\n const { leftWidth: ee, rightWidth: ne, widthReduction: Re } = X(P);\n return /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\"flex-shrink-0\", g),\n style: {\n width: `calc(${100 / A}% - ${Re}px)`,\n marginRight: ne > 0 ? `${ne}px` : void 0,\n marginLeft: ee > 0 ? `${ee}px` : void 0\n },\n \"data-slide-index\": P,\n children: J\n },\n P\n );\n })\n }\n ),\n !f && /* @__PURE__ */ i(\"div\", { className: \"absolute bottom-4 left-1/2 -translate-x-1/2 flex space-x-2\", children: Array.from({ length: Math.ceil(A / L) }).map((J, P) => /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: () => Z(P),\n className: N(\n \"w-2 h-2 rounded-full transition-colors duration-200\",\n P === _ ? \"bg-accent\" : \"bg-muted hover:bg-muted-foreground/50\",\n y\n ),\n \"aria-label\": `Go to slide ${P + 1}`,\n \"data-carousel-dot\": P\n },\n P\n )) })\n ]\n }\n ),\n !u && /* @__PURE__ */ i(Q, { children: x ? F.cloneElement(\n x,\n {\n onClick: O,\n disabled: !R,\n className: N(\n ((re = x.props) == null ? void 0 : re.className) || \"\",\n ie[v].next\n ),\n role: \"button\",\n \"aria-disabled\": !R,\n \"aria-label\": \"Next slide\",\n \"data-carousel-next\": \"true\"\n }\n ) : /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: O,\n disabled: !R,\n className: N(\n T,\n se[h].button,\n xe[m],\n ie[v].next\n ),\n \"aria-disabled\": !R,\n \"aria-label\": \"Next slide\",\n \"data-carousel-next\": \"true\",\n children: /* @__PURE__ */ i(Se, { className: se[h].icon })\n }\n ) })\n ] });\n}\nfunction lt(o) {\n const [a, t] = z(\"\"), n = C((e) => {\n let r = e, s = \"\";\n for (; r && !s; ) {\n const l = window.getComputedStyle(r).backgroundColor;\n l && l !== \"transparent\" && l !== \"rgba(0, 0, 0, 0)\" && (s = l), r = r.parentElement;\n }\n return s || \"transparent\";\n }, []);\n return $(() => {\n const e = document.getElementById(o);\n if (e) {\n const r = n(e.parentElement);\n t(r);\n }\n }, [o, n]), a;\n}\nfunction yr({\n ref: o,\n id: a,\n size: t = 20,\n color: n,\n filled: e = !1,\n rounded: r = !0,\n checked: s = !1,\n onCheckedChange: l,\n disabled: c,\n className: u = \"\",\n ...f\n}) {\n const d = K(), h = q(() => a || `checkbox-${d}`, [a, d]), m = lt(h), [v, b] = z(s);\n $(() => {\n b(s);\n }, [s]);\n const p = () => {\n c || (b(!v), l == null || l(!v));\n }, x = (w) => {\n w.key === \" \" && (w.preventDefault(), p());\n }, g = N(\n \"flex items-center justify-center border outline outline-transparent focus:outline-current focus:outline-offset-2\",\n r && \"rounded\",\n c && \"opacity-40 cursor-not-allowed\",\n !c && \"cursor-pointer\",\n u\n );\n return /* @__PURE__ */ i(\n \"button\",\n {\n id: h,\n type: \"button\",\n ref: o,\n tabIndex: 0,\n role: \"checkbox\",\n onClick: p,\n \"aria-checked\": v,\n \"aria-disabled\": c,\n onKeyDownCapture: x,\n style: {\n width: t,\n height: t,\n color: n,\n backgroundColor: v && e ? \"currentcolor\" : \"transparent\"\n },\n className: g,\n ...f,\n children: v && /* @__PURE__ */ i(ve, { size: t, color: e ? m : void 0 })\n }\n );\n}\nfunction wr({\n children: o,\n className: a,\n linkTo: t,\n linkProps: n,\n onButtonClick: e,\n buttonProps: r,\n ...s\n}) {\n return t && e && console.warn('Clickable: Both \"linkTo\" and \"onButtonClick\" props are provided. Only \"linkTo\" will be used.'), /* @__PURE__ */ k(\"div\", { className: N(\"relative w-fit\", a), ...s, children: [\n o,\n t && /* @__PURE__ */ i(\n \"a\",\n {\n ...n,\n rel: (n == null ? void 0 : n.rel) || \"noreferrer\",\n href: t,\n className: N(\"absolute inset-0\", n == null ? void 0 : n.className)\n }\n ),\n !t && e && /* @__PURE__ */ i(\n \"button\",\n {\n ...r,\n type: \"button\",\n onClick: e,\n className: N(\"absolute inset-0 cursor-pointer\", r == null ? void 0 : r.className)\n }\n )\n ] });\n}\nfunction ct(o) {\n const [a, t] = z(null);\n return $(() => {\n var l;\n const n = (l = document.getElementById(o)) == null ? void 0 : l.parentElement;\n if (!n) return;\n const e = () => {\n const c = window.getComputedStyle(n), u = parseFloat(c.fontSize), f = c.lineHeight === \"normal\" ? u * 1.2 : parseFloat(c.lineHeight), d = u - 2, h = d / u, m = f * h;\n t({\n fontSize: u,\n lineHeight: f,\n smallerFontSize: d,\n smallerLineHeight: m\n });\n };\n e();\n const r = new ResizeObserver(e);\n r.observe(n);\n const s = new MutationObserver(e);\n return s.observe(n, {\n attributes: !0,\n attributeFilter: [\"style\", \"class\"],\n subtree: !1\n }), () => {\n r.disconnect(), s.disconnect();\n };\n }, [o]), a;\n}\nconst dt = {\n base: \"\",\n modest: \"opacity-90 bg-muted/10\",\n accent: \"text-accent bg-muted/10\",\n current: \"text-current bg-current/10\"\n};\nfunction Nr({ id: o, ref: a, content: t, variant: n = \"accent\", className: e, style: r, ...s }) {\n const l = K(), c = o || `code-${l}`, u = ct(c);\n return /* @__PURE__ */ i(\n \"code\",\n {\n id: c,\n ref: a,\n className: N(\"px-2 py-1 rounded\", dt[n], e),\n \"data-variant\": n,\n style: {\n fontSize: u ? `${u.smallerFontSize}px` : void 0,\n lineHeight: u ? `${u.smallerLineHeight}px` : void 0,\n ...r\n },\n ...s,\n children: t\n }\n );\n}\nconst ut = {\n keyword: \"text-rose-400\",\n runner: \"text-amber-400\",\n comment: \"text-gray-500/80\",\n command: \"text-gray-100\",\n variable: \"text-blue-400\",\n string: \"text-white/70\",\n option: \"text-purple-400\",\n plain: \"text-gray-200\",\n operator: \"text-pink-500\",\n substitution: \"text-green-300\"\n}, ft = {\n selector: \"text-blue-400 font-medium\",\n property: \"text-purple-400\",\n value: \"text-green-400\",\n punctuation: \"text-gray-400\",\n atRule: \"text-pink-400 font-semibold\",\n comment: \"text-gray-500 italic\",\n string: \"text-green-400\",\n number: \"text-green-400\",\n plain: \"text-gray-100\",\n function: \"text-cyan-400\"\n}, mt = {\n key: \"text-purple-400 font-semibold\",\n string: \"text-green-400\",\n number: \"text-orange-400 font-medium\",\n boolean: \"text-cyan-400 font-medium\",\n punctuation: \"text-gray-400\",\n plain: \"text-gray-100\"\n}, ht = {\n keyword: \"text-purple-400 font-semibold\",\n type: \"text-cyan-400 font-medium\",\n string: \"text-green-400\",\n \"jsx-bracket\": \"text-gray-400\",\n \"jsx-tag\": \"text-blue-400 font-medium\",\n \"jsx-attribute\": \"text-amber-400\",\n \"jsx-brace\": \"text-yellow-400\",\n jsx: \"text-blue-400 font-medium\",\n // fallback for old jsx type\n property: \"text-amber-400\",\n number: \"text-orange-400 font-medium\",\n comment: \"text-gray-500 italic\",\n function: \"text-rose-400 font-semibold\",\n hook: \"text-rose-400 font-semibold\",\n operator: \"text-gray-300\",\n plain: \"text-gray-100\"\n}, pt = /* @__PURE__ */ new Set([\n \"for\",\n \"in\",\n \"do\",\n \"done\",\n \"else\",\n \"if\",\n \"fi\",\n \"then\",\n \"while\",\n \"until\",\n \"case\",\n \"esac\"\n]), bt = /* @__PURE__ */ new Set([\"npm\", \"npx\", \"pnpm\", \"yarn\", \"vite\"]);\nfunction Te(o) {\n const a = [];\n if (o.trim() === \"\")\n return a.push({ text: \" \", type: \"plain\" }), a;\n if (o.trim().startsWith(\"#\"))\n return a.push({ text: o, type: \"comment\" }), a;\n const t = /(\\$\\([^)]*\\)|\"[^\"]*\"|'[^']*'|\\$[\\w_]+|[a-zA-Z_]\\w*=|--?[a-zA-Z0-9][\\w-]*(?:=.*)?|>>|>|#.*|\\s+|[^\\s]+)/g, n = (r) => {\n if (/^\\$\\([^)]*\\)$/.test(r)) {\n const s = r.slice(2, -1);\n return [{ text: \"$(\", type: \"operator\" }, ...Te(s), { text: \")\", type: \"operator\" }];\n }\n if (/^\".*\"$/.test(r)) {\n const s = r.slice(1, -1), l = [];\n let c = 0;\n const u = /\\$[\\w_]+/g;\n let f;\n for (; (f = u.exec(s)) !== null; )\n f.index > c && l.push({\n text: s.slice(c, f.index),\n type: \"string\"\n }), l.push({ text: f[0], type: \"variable\" }), c = f.index + f[0].length;\n return c < s.length && l.push({ text: s.slice(c), type: \"string\" }), [{ text: '\"', type: \"string\" }, ...l, { text: '\"', type: \"string\" }];\n }\n return /^'.*'$/.test(r) ? [{ text: r, type: \"string\" }] : /^\\$[\\w_]+$/.test(r) ? [{ text: r, type: \"variable\" }] : /^[a-zA-Z_]\\w*=$/.test(r) ? [{ text: r, type: \"variable\" }] : /^--?[a-zA-Z0-9][\\w-]*(=.*)?$/.test(r) ? [{ text: r, type: \"option\" }] : /^>>|>$/.test(r) ? [{ text: r, type: \"operator\" }] : /^#.*$/.test(r) ? [{ text: r, type: \"comment\" }] : /^\\s+$/.test(r) ? [{ text: r, type: \"plain\" }] : pt.has(r) ? [{ text: r, type: \"keyword\" }] : bt.has(r) ? [{ text: r, type: \"runner\" }] : [{ text: r, type: \"command\" }];\n };\n let e;\n for (; (e = t.exec(o)) !== null; )\n a.push(...n(e[0]));\n return a;\n}\nfunction vt(o, a = !1) {\n const t = [];\n let n = a;\n if (o.trim() === \"\")\n return t.push({ text: \" \", type: \"plain\" }), { tokens: t, inComment: n };\n let e = \"selector\", r = 0;\n o.match(/^\\s+/) && o.includes(\":\") && !o.includes(\"{\") && (e = \"property\", r = 1);\n const s = /(\\/\\*[\\s\\S]*?\\*\\/|\\/\\*[\\s\\S]*$|\\*\\/)|(@[a-zA-Z-]+)|(\\{|\\}|:|;|,|\\(|\\))|(\"(?:[^\"]*)\"|'(?:[^']*)')|([a-zA-Z-]+)(?=\\()|([0-9.]+(?:px|rem|em|%|vh|vw|deg|s|ms|fr)?)|(#[a-fA-F0-9]{3,8})|([a-zA-Z0-9_-]+|[.#][a-zA-Z0-9_-]+)|(\\s+)|(\\S+)/g;\n let l;\n for (; l = s.exec(o); ) {\n const [, c, u, f, d, h, m, v, b, p, x] = l;\n if (c)\n c.includes(\"/*\") && !c.includes(\"*/\") ? n = !0 : c.includes(\"*/\") && (n = !1), t.push({ text: c, type: \"comment\" });\n else if (n)\n l[0].includes(\"*/\") && (n = !1), t.push({ text: l[0], type: \"comment\" });\n else if (u)\n t.push({ text: u, type: \"atRule\" });\n else if (h)\n t.push({ text: h, type: \"function\" });\n else if (f)\n f === \"{\" ? (r++, e = \"property\") : f === \"}\" ? (r--, e = r > 0 ? \"property\" : \"selector\") : f === \":\" ? e === \"property\" && (e = \"value\") : f === \";\" ? r > 0 && (e = \"property\") : f === \",\" && r === 0 && (e = \"selector\"), t.push({ text: f, type: \"punctuation\" });\n else if (d)\n t.push({ text: d, type: \"string\" });\n else if (m)\n t.push({ text: m, type: \"number\" });\n else if (v)\n t.push({ text: v, type: \"value\" });\n else if (b) {\n let g;\n b.startsWith(\".\") || b.startsWith(\"#\") || e === \"selector\" ? g = \"selector\" : e === \"property\" ? g = \"property\" : g = \"value\", t.push({ text: b, type: g });\n } else if (p)\n t.push({ text: p.replace(/ /g, \" \"), type: \"plain\" });\n else if (x) {\n const g = e === \"value\" ? \"value\" : \"plain\";\n t.push({ text: x, type: g });\n }\n }\n return { tokens: t, inComment: n };\n}\nfunction gt(o) {\n const a = /(\"[^\"]*\")\\s*(:)|(\"[^\"]*\")|(\\d+)|(true|false|null)|(\\{|\\}|\\[|\\]|,)/g, t = [];\n let n = 0, e;\n for (; (e = a.exec(o)) !== null; )\n e.index > n && t.push({ text: o.slice(n, e.index), type: \"plain\" }), e[1] && e[2] ? (t.push({ text: e[1], type: \"key\" }), t.push({ text: e[2], type: \"punctuation\" })) : e[3] ? t.push({ text: e[3], type: \"string\" }) : e[4] ? t.push({ text: e[4], type: \"number\" }) : e[5] ? t.push({ text: e[5], type: \"boolean\" }) : e[6] && t.push({ text: e[6], type: \"punctuation\" }), n = a.lastIndex;\n return n < o.length && t.push({ text: o.slice(n), type: \"plain\" }), t;\n}\nfunction xt(o, a = !1, t = 0) {\n const n = [];\n let e = o, r = a, s = t;\n for (; e.length > 0; ) {\n const l = e.match(/^\\/\\*[\\s\\S]*?\\*\\//);\n if (l) {\n n.push({ text: l[0], type: \"comment\" }), e = e.slice(l[0].length);\n continue;\n }\n const c = e.match(/^\\/\\/.*$/m);\n if (c) {\n n.push({ text: c[0], type: \"comment\" }), e = e.slice(c[0].length);\n continue;\n }\n const u = e.match(/^(`[^`]*`|\"[^\"]*\"|'[^']*')/);\n if (u) {\n n.push({ text: u[0], type: \"string\" }), e = e.slice(u[0].length);\n continue;\n }\n const f = e.match(/^<([a-zA-Z][a-zA-Z0-9]*)/);\n if (f) {\n n.push({ text: \"<\", type: \"jsx-bracket\" }), n.push({ text: f[1], type: \"jsx-tag\" }), e = e.slice(f[0].length), r = !0;\n continue;\n }\n const d = e.match(/^<\\/([a-zA-Z][a-zA-Z0-9]*)>/);\n if (d) {\n n.push({ text: \"</\", type: \"jsx-bracket\" }), n.push({ text: d[1], type: \"jsx-tag\" }), n.push({ text: \">\", type: \"jsx-bracket\" }), e = e.slice(d[0].length), r = !1;\n continue;\n }\n if (e.match(/^\\/?>/)) {\n const I = e.match(/^(\\/?>\\s*)/);\n if (I) {\n n.push({ text: I[1].trim(), type: \"jsx-bracket\" }), e = e.slice(I[1].length), I[1].includes(\">\") && (r = !1);\n continue;\n }\n }\n const h = e.match(/^([a-zA-Z][a-zA-Z0-9]*)(\\s*)(=)/);\n if (h && r && s === 0) {\n n.push({ text: h[1], type: \"jsx-attribute\" }), h[2] && n.push({ text: h[2], type: \"plain\" }), n.push({ text: \"=\", type: \"plain\" }), e = e.slice(h[0].length);\n continue;\n }\n const m = e.match(/^[{}]/);\n if (m) {\n n.push({ text: m[0], type: \"jsx-brace\" }), m[0] === \"{\" ? s++ : m[0] === \"}\" && s--, e = e.slice(1);\n continue;\n }\n const v = e.match(/^\\s+/);\n if (v) {\n n.push({ text: v[0], type: \"plain\" }), e = e.slice(v[0].length);\n continue;\n }\n const b = e.match(/^(=>|===|!==|==|!=|<=|>=|&&|\\|\\||[+\\-*/%=<>!&|^~?:;,()[\\]{}.])/);\n if (b) {\n n.push({ text: b[0], type: \"operator\" }), e = e.slice(b[0].length);\n continue;\n }\n const p = e.match(\n /^(const|let|var|function|if|else|for|while|return|import|export|class|extends|interface|type|enum|async|await|public|private|protected|static|from|as|default|new|this|super|try|catch|finally|throw|break|continue|switch|case|typeof|instanceof)\\b/\n );\n if (p) {\n n.push({ text: p[0], type: \"keyword\" }), e = e.slice(p[0].length);\n continue;\n }\n const x = e.match(/^(use[A-Z][a-zA-Z]*)\\b/);\n if (x) {\n n.push({ text: x[0], type: \"hook\" }), e = e.slice(x[0].length);\n continue;\n }\n const g = e.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)\\s*(?=(\\?\\.)?\\()/);\n if (g) {\n n.push({ text: g[1], type: \"function\" }), e = e.slice(g[1].length);\n continue;\n }\n const w = e.match(\n /^(string|number|boolean|object|any|void|never|unknown|null|undefined|Promise|Array|React\\.FC|FC|JSX\\.Element|HTMLElement|Event|MouseEvent|KeyboardEvent|ChangeEvent)\\b/\n );\n if (w) {\n n.push({ text: w[0], type: \"type\" }), e = e.slice(w[0].length);\n continue;\n }\n const y = e.match(/^(\\d+\\.?\\d*)/);\n if (y) {\n n.push({ text: y[0], type: \"number\" }), e = e.slice(y[0].length);\n continue;\n }\n const E = e.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)\\s*(?=:)/);\n if (E && !r) {\n n.push({ text: E[1], type: \"property\" }), e = e.slice(E[1].length);\n continue;\n }\n n.push({ text: e[0], type: \"plain\" }), e = e.slice(1);\n }\n return n;\n}\nfunction yt(o, a) {\n const t = {\n ...ut,\n ...a\n };\n return o.map((n, e) => {\n const r = Te(n);\n return /* @__PURE__ */ i(\"div\", { className: \"leading-6\", children: r.map((s, l) => /* @__PURE__ */ i(\"span\", { className: t[s.type] || \"text-gray-100\", children: s.text }, l)) }, e);\n });\n}\nfunction wt(o, a) {\n const t = { ...ft, ...a };\n let n = !1;\n return o.map((e, r) => {\n const { tokens: s, inComment: l } = vt(e, n);\n return n = l, /* @__PURE__ */ i(\"div\", { className: \"leading-6\", children: s.map((c, u) => /* @__PURE__ */ i(\"span\", { className: t[c.type] || \"text-gray-100\", children: c.text }, u)) }, r);\n });\n}\nfunction Nt(o, a) {\n const t = { ...mt, ...a };\n return o.map((n, e) => /* @__PURE__ */ i(\"div\", { className: \"leading-6\", children: gt(n).map((r, s) => /* @__PURE__ */ i(\"span\", { className: t[r.type] || \"text-gray-100\", children: r.text }, s)) }, e));\n}\nfunction Et(o, a) {\n const t = { ...ht, ...a };\n let n = !1, e = 0;\n return o.map((r, s) => {\n if (r.trim() === \"\")\n return /* @__PURE__ */ i(\"div\", { className: \"leading-6\", children: \" \" }, s);\n const l = xt(r, n, e);\n r.includes(\"<\") && r.match(/<[a-zA-Z]/) && (n = !0), r.includes(\">\") && !r.includes(\"<\") && (n = !1, e = 0);\n const c = (r.match(/\\{/g) || []).length, u = (r.match(/\\}/g) || []).length;\n return e += c - u, e < 0 && (e = 0), /* @__PURE__ */ i(\"div\", { className: \"leading-6\", children: l.map((f, d) => /* @__PURE__ */ i(\"span\", { className: t[f.type] || \"text-gray-100\", children: f.text }, d)) }, s);\n });\n}\nfunction kt(o) {\n const [a, t] = z(!1), n = C(async () => {\n try {\n await navigator.clipboard.writeText(o), t(!0), setTimeout(() => t(!1), 3e3);\n } catch (e) {\n console.error(\"Failed to copy code:\", e);\n }\n }, [o]);\n return { copied: a, handleCopy: n };\n}\nfunction Ct(o, a) {\n const t = j(null), n = j(null);\n return $(() => {\n if (o) {\n t.current = document.activeElement, document.body.style.overflow = \"hidden\", setTimeout(() => {\n var r;\n (r = n.current) == null || r.focus();\n }, 100);\n const e = (r) => {\n r.key === \"Escape\" && a(!1);\n };\n return document.addEventListener(\"keydown\", e), () => {\n document.removeEventListener(\"keydown\", e), document.body.style.overflow = \"\";\n };\n } else t.current && (t.current.focus(), t.current = null);\n }, [o, a]), { containerRef: n };\n}\nfunction zt(o, a, t, n) {\n return { handleKeyDown: C(\n (r) => {\n r.key === \"c\" && (r.metaKey || r.ctrlKey) && o ? (r.preventDefault(), t()) : r.key === \"f\" && a && (r.preventDefault(), n());\n },\n [o, a, t, n]\n ) };\n}\nfunction $t(o) {\n switch (o) {\n case \"typescript\":\n case \"ts\":\n return \"ts\";\n case \"tsx\":\n return \"tsx\";\n case \"json\":\n return \"json\";\n case \"bash\":\n case \"sh\":\n return \"sh\";\n default:\n return \"txt\";\n }\n}\nfunction Er({\n code: o,\n language: a = \"typescript\",\n allowCopy: t = !0,\n allowDownload: n = !1,\n allowFullscreen: e = !1,\n filename: r,\n showTrafficLights: s = !0,\n showLineNumbers: l = !1,\n hideHeader: c = !1,\n hideFiletype: u = !1,\n maxHeight: f,\n tokenClasses: d,\n className: h,\n id: m,\n ref: v,\n ...b\n}) {\n const [p, x] = z(!1), { containerRef: g } = Ct(p, x), { copied: w, handleCopy: y } = kt(o), E = C(() => {\n const S = r || `code.${$t(a)}`;\n Je(o, S);\n }, [o, r, a]), I = C(() => {\n x((S) => !S);\n }, []), { handleKeyDown: D } = zt(t, e, y, I), A = q(() => o.split(`\n`), [o]), H = C(\n (S = !0) => /* @__PURE__ */ k(\"div\", { className: N(\"flex items-center space-x-2\", !S && \"absolute top-2 right-2 z-10\"), children: [\n !u && /* @__PURE__ */ i(\n \"span\",\n {\n className: \"text-xs text-gray-400 uppercase tracking-wide font-medium\",\n \"aria-label\": `Code language: ${a}`,\n children: a\n }\n ),\n e && /* @__PURE__ */ i(\n \"button\",\n {\n onClick: I,\n className: \"p-1.5 leading-0 text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors motion-reduce:transition-none min-h-[44px] min-w-[44px] flex items-center justify-center md:min-h-auto md:min-w-auto md:p-1.5\",\n title: p ? \"Exit fullscreen\" : \"Fullscreen\",\n \"aria-label\": p ? \"Exit fullscreen mode\" : \"Enter fullscreen mode\",\n \"aria-pressed\": p,\n type: \"button\",\n children: p ? /* @__PURE__ */ i(Me, { size: 14 }) : /* @__PURE__ */ i(Be, { size: 14 })\n }\n ),\n n && /* @__PURE__ */ i(\n \"button\",\n {\n onClick: E,\n className: \"p-1.5 leading-0 text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors motion-reduce:transition-none min-h-[44px] min-w-[44px] flex items-center justify-center md:min-h-auto md:min-w-auto md:p-1.5\",\n title: \"Download code\",\n \"aria-label\": \"Download code as file\",\n type: \"button\",\n children: /* @__PURE__ */ i(We, { size: 14 })\n }\n ),\n t && /* @__PURE__ */ i(\n \"button\",\n {\n onClick: y,\n className: \"p-1.5 leading-0 text-gray-400 hover:text-white hover:bg-gray-700 rounded transition-colors motion-reduce:transition-none min-h-[44px] min-w-[44px] flex items-center justify-center md:min-h-auto md:min-w-auto md:p-1.5\",\n title: w ? \"Code copied!\" : \"Copy code\",\n \"aria-label\": w ? \"Code copied to clipboard\" : \"Copy code to clipboard\",\n \"aria-live\": \"polite\",\n type: \"button\",\n children: w ? /* @__PURE__ */ i(ve, { size: 14, className: \"text-green-400\" }) : /* @__PURE__ */ i(Fe, { size: 14 })\n }\n )\n ] }),\n [\n u,\n a,\n e,\n p,\n n,\n E,\n t,\n y,\n w,\n I\n ]\n ), L = q(() => a === \"json\" ? Nt(A, d) : a === \"tsx\" || a === \"ts\" || a === \"typescript\" ? Et(A, d) : a === \"bash\" || a === \"sh\" ? yt(A, d) : a === \"css\" ? wt(A, d) : [\n /* @__PURE__ */ i(\"span\", { className: \"text-gray-400\", children: \"Unsupported language\" }, 0)\n ], [A, d, a]), _ = q(() => l ? A.map((S, M) => /* @__PURE__ */ i(\n \"div\",\n {\n className: \"text-gray-500 text-right pl-3 pr-1 select-none min-w-8 text-sm font-mono leading-6\",\n \"aria-hidden\": \"true\",\n role: \"presentation\",\n children: M + 1\n },\n M\n )) : null, [l, A]), W = q(\n () => ({\n maxHeight: f && !p ? `${f}px` : p ? c ? \"calc(100vh - 5px)\" : \"calc(100vh - 45px)\" : void 0,\n overflow: f || p ? \"auto\" : \"visible\"\n }),\n [f, p, c]\n ), R = /* @__PURE__ */ k(\n \"div\",\n {\n id: m,\n ref: (S) => {\n g.current = S, typeof v == \"function\" ? v(S) : v && (v.current = S);\n },\n className: N(\n \"bg-gray-900 rounded-lg border border-gray-700 overflow-hidden motion-reduce:transition-none\",\n p && \"fixed inset-0 z-[9999] max-h-fit\",\n h\n ),\n \"data-language\": a,\n \"data-filename\": r,\n \"data-fullscreen\": p,\n role: \"region\",\n \"aria-label\": `Code block${r ? ` for ${r}` : \"\"} in ${a}`,\n \"aria-describedby\": l ? `${m}-description` : void 0,\n tabIndex: 0,\n onKeyDown: D,\n ...b,\n children: [\n l && /* @__PURE__ */ k(\"div\", { id: `${m}-description`, className: \"sr-only\", children: [\n \"Code block with line numbers. Use Cmd+C or Ctrl+C to copy code.\",\n e && \" Press F to toggle fullscreen.\"\n ] }),\n /* @__PURE__ */ i(\"div\", { \"aria-live\": \"polite\", \"aria-atomic\": \"true\", className: \"sr-only\", children: w && \"Code copied to clipboard\" }),\n !c && /* @__PURE__ */ k(\"div\", { className: \"flex items-center justify-between px-4 py-2 bg-gray-800 border-b border-gray-700\", children: [\n /* @__PURE__ */ k(\"div\", { className: \"flex items-center space-x-3\", children: [\n s && /* @__PURE__ */ k(\"div\", { className: \"flex space-x-2\", children: [\n /* @__PURE__ */ i(\"div\", { className: \"w-3 h-3 bg-red-500 rounded-full\" }),\n /* @__PURE__ */ i(\"div\", { className: \"w-3 h-3 bg-yellow-500 rounded-full\" }),\n /* @__PURE__ */ i(\"div\", { className: \"w-3 h-3 bg-green-500 rounded-full\" })\n ] }),\n r && /* @__PURE__ */ i(\"span\", { className: \"text-sm text-gray-300 font-medium\", children: r })\n ] }),\n H(!0)\n ] }),\n /* @__PURE__ */ k(\"div\", { className: N(\"flex overflow-hidden\", c && \"relative\"), style: W, children: [\n c && H(!1),\n /* @__PURE__ */ i(\"div\", { className: \"flex-1 overflow-x-auto\", children: /* @__PURE__ */ k(\"div\", { className: \"flex\", children: [\n l && /* @__PURE__ */ i(\n \"div\",\n {\n className: \"bg-gray-800 py-4 border-r border-gray-700 flex flex-col flex-shrink-0\",\n \"aria-hidden\": \"true\",\n role: \"presentation\",\n children: _\n }\n ),\n /* @__PURE__ */ i(\"div\", { className: \"flex-1 p-4\", children: /* @__PURE__ */ i(\n \"pre\",\n {\n className: \"text-sm font-mono focus:outline-none\",\n role: \"code\",\n \"aria-label\": `${a} code content`,\n tabIndex: -1,\n children: /* @__PURE__ */ i(\"code\", { children: L })\n }\n ) })\n ] }) })\n ] })\n ]\n }\n );\n return /* @__PURE__ */ k(Q, { children: [\n !p && R,\n p && ae(\n /* @__PURE__ */ k(Q, { children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n className: \"fixed inset-0 bg-black z-[9998]\",\n onClick: () => x(!1),\n \"aria-hidden\": \"true\"\n }\n ),\n R\n ] }),\n document.body\n )\n ] });\n}\nfunction kr({\n children: o,\n label: a,\n isOpen: t,\n onToggle: n,\n id: e,\n ref: r,\n disabled: s = !1,\n className: l,\n buttonClassName: c\n}) {\n const u = K(), f = e ?? u, [d, h] = z(!1), m = t !== void 0 ? t : d, v = () => {\n s || (t === void 0 && h((b) => !b), n == null || n(!m));\n };\n return $(() => {\n h(t ?? !1);\n }, [t]), /* @__PURE__ */ k(\"div\", { ref: r, id: f, \"data-open\": m, className: N(\"overflow-hidden\", l), children: [\n /* @__PURE__ */ i(\n \"button\",\n {\n id: `${f}-button`,\n type: \"button\",\n \"aria-expanded\": m,\n \"aria-controls\": `${f}-panel`,\n disabled: s,\n tabIndex: 0,\n className: N(\n \"w-full px-4 py-3 font-medium hover:bg-primary/10 disabled:opacity-50 disabled:cursor-not-allowed\",\n c\n ),\n onClick: v,\n onKeyDown: (b) => {\n (b.key === \"Enter\" || b.key === \" \") && (b.preventDefault(), v());\n },\n \"data-open\": m,\n \"data-label\": typeof a == \"string\" ? a : void 0,\n children: /* @__PURE__ */ k(\"div\", { className: \"flex items-center w-full gap-2\", children: [\n /* @__PURE__ */ i(\"span\", { className: \"flex-1 text-left\", children: a }),\n m ? /* @__PURE__ */ i(Ke, { className: \"size-5\", \"aria-hidden\": \"true\" }) : /* @__PURE__ */ i(He, { className: \"size-5\", \"aria-hidden\": \"true\" })\n ] })\n }\n ),\n /* @__PURE__ */ i(\"div\", { id: `${f}-panel`, role: \"region\", \"aria-labelledby\": f, \"aria-live\": \"polite\", hidden: !m, children: o })\n ] });\n}\nfunction At(o) {\n const [a, t] = z(!1), [n, e] = z(!1);\n return $(() => {\n if (o) {\n e(!0);\n const r = setTimeout(() => t(!0), 10);\n return () => clearTimeout(r);\n } else {\n t(!1);\n const r = setTimeout(() => e(!1), 300);\n return () => clearTimeout(r);\n }\n }, [o]), { show: a, shouldRender: n };\n}\nfunction It({\n isOpen: o,\n onClose: a,\n enabled: t = !0\n}) {\n const [n, e] = z(!1), [r, s] = z(0), [l, c] = z(0), u = C((y) => {\n !t || !o || (e(!0), c(y), document.body.style.userSelect = \"none\");\n }, [t, o]), f = C((y) => {\n if (!n || !t) return;\n const E = y - l, I = Math.max(0, E);\n s(I);\n }, [n, t, l]), d = C(() => {\n if (!n || !t) return;\n e(!1), document.body.style.userSelect = \"\", r > 100 && a(), s(0);\n }, [n, t, r, a]), h = C((y) => {\n y.preventDefault(), u(y.clientY);\n }, [u]), m = C((y) => {\n f(y.clientY);\n }, [f]), v = C(() => {\n d();\n }, [d]), b = C((y) => {\n y.preventDefault(), u(y.touches[0].clientY);\n }, [u]), p = C((y) => {\n y.preventDefault(), f(y.touches[0].clientY);\n }, [f]), x = C(() => {\n d();\n }, [d]), g = C((y) => {\n t && (y.key === \"ArrowDown\" || y.key === \"Escape\") && (y.preventDefault(), a());\n }, [t, a]);\n return {\n dragHandlers: t ? {\n onMouseDown: h,\n onMouseMove: m,\n onMouseUp: v,\n onTouchStart: b,\n onTouchMove: p,\n onTouchEnd: x,\n onKeyDown: g\n } : {},\n translateY: r,\n isDragging: n\n };\n}\nfunction St(o, a) {\n const t = j(null);\n $(() => {\n if (!a) return;\n t.current = document.activeElement;\n const n = document.getElementById(o);\n n && n.focus();\n const e = (r) => {\n if (r.key !== \"Tab\") return;\n const s = document.getElementById(o);\n if (!s) return;\n const l = s.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n ), c = l[0], u = l[l.length - 1];\n r.shiftKey && document.activeElement === c ? (r.preventDefault(), u == null || u.focus()) : !r.shiftKey && document.activeElement === u && (r.preventDefault(), c == null || c.focus());\n };\n return document.addEventListener(\"keydown\", e), () => {\n document.removeEventListener(\"keydown\", e), t.current && typeof t.current.focus == \"function\" && t.current.focus();\n };\n }, [o, a]);\n}\nfunction Dt(o, a) {\n $(() => {\n if (!o) return;\n const t = window.getComputedStyle(document.body).overflow;\n document.body.style.overflow = \"hidden\";\n const n = (e) => {\n e.key === \"Escape\" && a();\n };\n return document.addEventListener(\"keydown\", n), () => {\n document.body.style.overflow = t, document.removeEventListener(\"keydown\", n);\n };\n }, [o, a]);\n}\nfunction Cr({\n ref: o,\n id: a,\n isOpen: t,\n onClose: n,\n title: e,\n children: r,\n footer: s,\n className: l,\n overlayClassName: c,\n hideCloseButton: u = !1,\n disableCloseOnOverlayClick: f = !1,\n enableDragGestures: d = !0,\n ariaLabelledBy: h,\n ariaDescribedBy: m\n}) {\n const v = K(), b = a || `drawer-${v}`, p = `${v}-title`, { show: x, shouldRender: g } = At(t), { dragHandlers: w, translateY: y } = It({\n isOpen: t,\n onClose: n,\n enabled: d\n });\n if (St(b, g), Dt(g, n), !g) return null;\n const E = () => e ? F.isValidElement(e) ? /* @__PURE__ */ i(\"div\", { children: e }) : /* @__PURE__ */ i(\"h2\", { className: \"text-2xl font-semibold\", id: p, children: e }) : null, I = () => {\n if (!s) return null;\n if (F.isValidElement(s)) {\n const D = s, A = D.props.className || \"\";\n return F.cloneElement(D, { className: N(\"px-6 py-4\", A) });\n }\n return /* @__PURE__ */ i(\"div\", { className: \"px-6 py-4\", children: s });\n };\n return /* @__PURE__ */ i(Q, { children: ae(\n /* @__PURE__ */ k(\n \"div\",\n {\n \"aria-labelledby\": h ?? e ? p : void 0,\n \"aria-describedby\": m,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-hidden\",\n \"data-drawer-open\": t,\n children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\n \"fixed inset-0 bg-black/40 transition-opacity duration-300\",\n x ? \"opacity-100\" : \"opacity-0\",\n c\n ),\n onClick: () => {\n f || n();\n }\n }\n ),\n /* @__PURE__ */ i(\"div\", { className: \"fixed inset-x-0 bottom-0 flex max-h-full\", children: /* @__PURE__ */ i(\n \"div\",\n {\n id: b,\n ref: o,\n tabIndex: -1,\n className: N(\n \"relative w-screen transform shadow-xl bg-popover text-popover-foreground transition-transform duration-300 ease-in-out border-t border-border rounded-t-lg\",\n x ? \"translate-y-0\" : \"translate-y-full\",\n l\n ),\n style: {\n transform: d && y !== 0 ? `translateY(${y}px)` : void 0,\n transition: y !== 0 ? \"none\" : void 0\n },\n children: /* @__PURE__ */ k(\"div\", { className: \"flex h-full flex-col\", children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\n \"flex justify-center pt-3 pb-2 cursor-grab active:cursor-grabbing\",\n d && \"select-none\"\n ),\n ...w,\n role: \"button\",\n tabIndex: 0,\n \"aria-label\": \"Drag to resize drawer\",\n children: /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\n \"w-12 h-1.5 bg-gray-300 rounded-full transition-colors\",\n d && \"hover:bg-gray-400\"\n )\n }\n )\n }\n ),\n e && /* @__PURE__ */ i(\"div\", { className: \"px-6 pt-4\", children: E() }),\n !u && /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: n,\n \"data-drawer-close-button\": \"true\",\n \"aria-label\": \"Close drawer\",\n className: \"rounded-md p-0.5 top-3 right-3 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ i(oe, { size: 18 })\n }\n ),\n /* @__PURE__ */ i(\"div\", { className: N(\"flex-1 overflow-y-auto px-6 pb-6\", e ? \"pt-6\" : \"pt-4\"), children: r }),\n I()\n ] })\n }\n ) })\n ]\n }\n ),\n document.body\n ) });\n}\nfunction de({ elementId: o, type: a, message: t }) {\n return $(() => {\n const n = document.getElementById(o);\n if (n) {\n if (!t && a === \"error\") {\n n.removeAttribute(\"data-error\");\n return;\n }\n if (!t && a === \"success\") {\n n.removeAttribute(\"data-success\");\n return;\n }\n return n.setAttribute(\"aria-describedby\", `${o}-${a}-message`), n.setAttribute(\"aria-invalid\", a === \"error\" ? \"true\" : \"false\"), a === \"error\" && n.setAttribute(\"data-error\", \"true\"), a === \"success\" && n.setAttribute(\"data-success\", \"true\"), () => {\n n.removeAttribute(\"aria-describedby\"), n.removeAttribute(\"aria-invalid\"), n.removeAttribute(\"data-error\"), n.removeAttribute(\"data-success\");\n };\n }\n }, [o, a, t]), t ? /* @__PURE__ */ k(\n \"small\",\n {\n className: N(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-start\",\n a === \"error\" && \"text-destructive\",\n a === \"success\" && \"text-success\"\n ),\n role: \"status\",\n children: [\n a === \"error\" ? /* @__PURE__ */ i(De, {}) : /* @__PURE__ */ i(Ae, {}),\n /* @__PURE__ */ i(\"span\", { id: `${o}-${a}-message`, children: t })\n ]\n }\n ) : null;\n}\nconst Tt = {\n base: \"\",\n default: \"ring ring-transparent focus:ring-primary-foreground not-disabled:data-error:ring-destructive not-disabled:data-success:ring-success\",\n underline: \"border-b border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\",\n outline: \"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\"\n}, Rt = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, ye = {\n variant: \"default\",\n rounded: \"none\"\n};\nfunction zr({\n variant: o = ye.variant,\n rounded: a,\n displayOnlyMode: t = !1,\n errorMessage: n,\n successMessage: e,\n type: r = \"text\",\n className: s,\n ...l\n}) {\n const c = K(), [u, f] = z(!1);\n let d = a;\n o === \"outline\" && !a && (d = \"md\"), d = d || ye.rounded;\n const v = N(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all\",\n \"file:mr-2 file:border-0 file:rounded-md file:px-1.5 file:py-1 file:bg-primary hover:file:bg-primary/85 file:text-sm file:font-medium file:text-foreground file:transition-colors\",\n !t && Tt[o],\n !t && Rt[d],\n r === \"password\" && \"pr-10\",\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n s\n );\n return /* @__PURE__ */ k(\"div\", { className: N(t && \"cursor-text\"), style: { height: l.height, width: l.width }, children: [\n /* @__PURE__ */ k(\"div\", { className: N(r === \"password\" && \"relative\"), children: [\n /* @__PURE__ */ i(\n \"input\",\n {\n ...l,\n id: c,\n type: r === \"password\" && u ? \"text\" : r,\n \"aria-disabled\": l.disabled,\n readOnly: t,\n \"aria-readonly\": t || l[\"aria-readonly\"],\n \"data-error\": n ? !0 : void 0,\n \"data-success\": e ? !0 : void 0,\n className: v\n }\n ),\n r === \"password\" && /* @__PURE__ */ i(\n \"button\",\n {\n onClick: () => f(!u),\n className: \"absolute inset-y-0 right-0 px-2 hover:cursor-pointer\",\n \"aria-label\": \"Toggle password visibility\",\n \"data-state\": u ? \"visible\" : \"hidden\",\n children: u ? /* @__PURE__ */ i(Pe, { size: 20 }) : /* @__PURE__ */ i(_e, { size: 20 })\n }\n )\n ] }),\n !t && /* @__PURE__ */ i(de, { elementId: c, type: \"error\", message: n }),\n !t && /* @__PURE__ */ i(de, { elementId: c, type: \"success\", message: e })\n ] });\n}\nfunction $r({\n display: o = \"inline\",\n width: a = \"fit-content\",\n className: t = \"\",\n required: n,\n helpMessage: e,\n suffix: r,\n htmlFor: s,\n children: l,\n description: c,\n ...u\n}) {\n var b, p;\n const f = K(), d = (((b = e == null ? void 0 : e.trim()) == null ? void 0 : b.length) || 0) > 0, h = (((p = c == null ? void 0 : c.trim()) == null ? void 0 : p.length) || 0) > 0, m = d ? `${s ?? f}-help` : void 0, v = h ? `${s ?? f}-description` : void 0;\n return /* @__PURE__ */ k(\n \"div\",\n {\n style: { display: o === \"inline\" ? \"inline-block\" : \"block\", width: a },\n className: N(\"mb-0.5\", t),\n children: [\n /* @__PURE__ */ k(\"div\", { className: \"relative flex\", children: [\n /* @__PURE__ */ k(\"label\", { className: \"font-medium\", htmlFor: s, ...u, children: [\n l,\n n && /* @__PURE__ */ i(\"span\", { className: \"text-red-500 font-medium ml-1\", \"aria-label\": \"required\", children: \"*\" })\n ] }),\n d && /* @__PURE__ */ i(\n \"span\",\n {\n className: \"text-gray-500 ml-1 size-fit -translate-y-1/3\",\n \"aria-describedby\": m,\n \"aria-label\": \"Help information\",\n title: e,\n children: /* @__PURE__ */ i(Ze, {})\n }\n ),\n d && /* @__PURE__ */ i(\"div\", { id: m, className: \"sr-only\", children: e }),\n r && /* @__PURE__ */ i(\"span\", { className: \"ml-1\", children: r })\n ] }),\n h && /* @__PURE__ */ i(\"small\", { id: v, className: \"block opacity-80 mt-0.5\", role: \"note\", children: c })\n ]\n }\n );\n}\nfunction Lt(o) {\n const [a, t] = z(!1), [n, e] = z(!1);\n return $(() => {\n o ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 150));\n }, [o]), { show: a, shouldRender: n };\n}\nfunction jt(o, a) {\n $(() => {\n const t = (n) => {\n n.key === \"Escape\" && o && a();\n };\n return document.addEventListener(\"keydown\", t), o && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", t), document.body.style.overflow = \"auto\";\n };\n }, [o, a]);\n}\nfunction Vt(o, a) {\n const t = j(null), n = C(() => {\n const e = document.getElementById(o);\n if (!e) return;\n const r = e.querySelectorAll('[data-modal-action=\"true\"]');\n if (r.length > 0) {\n r[0].focus();\n return;\n }\n const s = e.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const l = Array.from(s).filter((c) => !(c instanceof HTMLButtonElement && c.getAttribute(\"data-modal-close-button\") === \"true\"));\n if (l.length > 0) {\n l[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n e.focus();\n }, [o]);\n $(() => (a && (t.current = document.activeElement, n()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [a, n]);\n}\nfunction Ar({\n id: o,\n isOpen: a,\n onClose: t,\n title: n,\n children: e,\n contentOnly: r = !1,\n className: s,\n overlayClassName: l,\n hideCloseButton: c = !1,\n actions: u = [],\n disableCloseOnOverlayClick: f = !1,\n ariaLabelledBy: d,\n ariaDescribedBy: h\n}) {\n const m = K(), v = o || `modal-${m}`, b = o ? `${o}-title` : `modal-title-${m}`, { show: p, shouldRender: x } = Lt(a);\n if (Vt(v, x), jt(x, t), !x) return null;\n const g = () => n ? F.isValidElement(n) ? /* @__PURE__ */ i(\"div\", { className: \"mb-4\", children: n }) : /* @__PURE__ */ i(\"h2\", { className: \"mb-4 text-xl font-semibold\", id: b, children: n }) : null, w = () => u.length === 0 ? null : /* @__PURE__ */ i(\"div\", { className: \"mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3\", children: u.map((y, E) => {\n const { label: I, className: D, ...A } = y;\n return /* @__PURE__ */ i(nt, { className: D, type: \"button\", ...A, \"data-modal-action\": \"true\", children: I }, E);\n }) });\n return /* @__PURE__ */ i(Q, { children: ae(\n /* @__PURE__ */ i(\n \"div\",\n {\n \"aria-labelledby\": d ?? n ? b : void 0,\n \"aria-describedby\": h,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-y-auto\",\n children: /* @__PURE__ */ k(\"div\", { className: \"flex min-h-screen items-center justify-center p-4\", children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n className: V(\"fixed inset-0 bg-black/20 transition-all\", l),\n onClick: () => {\n f || t();\n }\n }\n ),\n r && /* @__PURE__ */ i(\"div\", { className: V(\"relative w-fit\", s), children: e }),\n !r && /* @__PURE__ */ k(\n \"div\",\n {\n id: v,\n tabIndex: -1,\n className: V(\n \"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover text-popover-foreground transition-all p-6 focus:ring ease-in duration-75\",\n p ? \"opacity-100 scale-100\" : \"opacity-0 scale-90\",\n s\n ),\n children: [\n !c && /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: t,\n \"data-modal-close-button\": \"true\",\n className: \"rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ i(oe, { size: 18 })\n }\n ),\n g(),\n e,\n w()\n ]\n }\n )\n ] })\n }\n ),\n document.body\n ) });\n}\nconst Mt = {\n link: \"text-primary hover:text-primary-foreground hover:bg-primary/10 aria-current:text-primary-foreground aria-current:bg-primary\",\n outline: \"border border-primary text-primary hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground aria-current:border-primary\",\n filled: \"bg-secondary text-secondary-foreground hover:bg-primary hover:text-primary-foreground aria-current:bg-primary aria-current:text-primary-foreground\"\n}, Bt = {\n sm: \"px-2 py-1 text-sm min-w-[32px] min-h-8\",\n md: \"px-2 py-1 text-base min-w-[40px] min-h-10\"\n};\nfunction Ir({\n page: o,\n pageCount: a = 5,\n maxVisiblePages: t = 5,\n showFirstLast: n = !0,\n onPageChange: e,\n size: r = \"md\",\n variant: s = \"link\",\n className: l,\n ref: c,\n buttonsClassName: u,\n ...f\n}) {\n const d = a === 1 / 0, m = C(() => {\n if (d) return [];\n const y = a, E = Math.min(t, y);\n if (y <= E)\n return Array.from({ length: y }, (H, L) => L + 1);\n const I = Math.floor(E / 2);\n let D = Math.max(1, o - I), A = Math.min(y, D + E - 1);\n return A - D + 1 < E && (D = Math.max(1, A - E + 1), A = Math.min(y, D + E - 1)), Array.from({ length: A - D + 1 }, (H, L) => D + L);\n }, [d, t, o, a])(), v = o > 1, b = d || o < a, p = n && !d, x = n && !d, g = (y) => {\n y >= 1 && (d || y <= a) && e(y);\n }, w = C(() => {\n const y = V(\n \"flex items-center justify-center min-w-fit\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n Bt[r],\n \"rounded-md\"\n );\n return V(y, Mt[s], u);\n }, [s, r, u]);\n return /* @__PURE__ */ k(\n \"nav\",\n {\n ref: c,\n className: V(\"flex items-center justify-center gap-1\", l),\n role: \"navigation\",\n \"aria-label\": \"Pagination\",\n \"data-page\": o,\n \"data-page-count\": d ? \"infinite\" : a,\n ...f,\n children: [\n p && /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(1),\n className: w(),\n disabled: o === 1,\n \"aria-label\": \"Go to first page\",\n children: [\n /* @__PURE__ */ i(Ge, { size: r === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ i(\"span\", { className: \"ml-1\", children: \"First\" })\n ]\n }\n ),\n /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(o - 1),\n className: w(),\n disabled: !v,\n \"aria-label\": \"Go to previous page\",\n children: [\n /* @__PURE__ */ i(Ie, { size: r === \"sm\" ? 12 : 15 }),\n /* @__PURE__ */ i(\"span\", { className: \"ml-1\", children: \"Previous\" })\n ]\n }\n ),\n !d && m.map((y) => /* @__PURE__ */ i(\n \"button\",\n {\n onClick: () => g(y),\n className: V(w(), \"aspect-square\"),\n \"aria-label\": `Go to page ${y}`,\n \"aria-current\": y === o ? !0 : void 0,\n children: y\n },\n y\n )),\n /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(o + 1),\n className: w(),\n disabled: !b,\n \"aria-label\": \"Go to next page\",\n children: [\n /* @__PURE__ */ i(\"span\", { className: \"mr-1\", children: \"Next\" }),\n /* @__PURE__ */ i(Se, { size: r === \"sm\" ? 12 : 15 })\n ]\n }\n ),\n x && /* @__PURE__ */ k(\n \"button\",\n {\n onClick: () => g(a),\n className: w(),\n disabled: o === a,\n \"aria-label\": \"Go to last page\",\n children: [\n /* @__PURE__ */ i(\"span\", { className: \"mr-1\", children: \"Last\" }),\n /* @__PURE__ */ i(qe, { size: r === \"sm\" ? 12 : 15 })\n ]\n }\n )\n ]\n }\n );\n}\nfunction Wt(o) {\n const [a, t] = z(!1), [n, e] = z(!1);\n return $(() => {\n o ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 300));\n }, [o]), { show: a, shouldRender: n };\n}\nfunction Ft(o, a) {\n $(() => {\n const t = (n) => {\n n.key === \"Escape\" && o && a();\n };\n return document.addEventListener(\"keydown\", t), o && (document.body.style.overflow = \"hidden\"), () => {\n document.removeEventListener(\"keydown\", t), document.body.style.overflow = \"auto\";\n };\n }, [o, a]);\n}\nfunction Kt(o, a) {\n const t = j(null), n = C(() => {\n const e = document.getElementById(o);\n if (!e) return;\n const r = e.querySelectorAll('[data-panel-action=\"true\"]');\n if (r.length > 0) {\n r[0].focus();\n return;\n }\n const s = e.querySelectorAll(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])'\n );\n if (s.length > 0) {\n const l = Array.from(s).filter((c) => !(c instanceof HTMLButtonElement && c.getAttribute(\"data-panel-close-button\") === \"true\"));\n if (l.length > 0) {\n l[0].focus();\n return;\n }\n s[0].focus();\n return;\n }\n e.focus();\n }, [o]);\n $(() => (a && (t.current = document.activeElement, n()), () => {\n document.body.style.overflow = \"auto\", t.current instanceof HTMLElement && t.current.focus();\n }), [a, n]);\n}\nconst Ht = {\n size: {\n sm: \"max-w-sm\",\n md: \"max-w-md\",\n lg: \"max-w-lg\",\n xl: \"max-w-xl\",\n \"2xl\": \"max-w-2xl\",\n full: \"w-full\",\n screen: \"w-screen\"\n }\n};\nfunction Sr({\n ref: o,\n id: a,\n isOpen: t,\n onClose: n,\n title: e,\n children: r,\n footer: s,\n size: l = \"md\",\n className: c,\n overlayClassName: u,\n hideCloseButton: f = !1,\n disableCloseOnOverlayClick: d = !1,\n ariaLabelledBy: h,\n ariaDescribedBy: m\n}) {\n const v = K(), b = a || `panel-${v}`, p = a ? `${a}-title` : `panel-title-${v}`, { show: x, shouldRender: g } = Wt(t);\n if (Kt(b, g), Ft(g, n), !g) return null;\n const w = () => e ? F.isValidElement(e) ? /* @__PURE__ */ i(\"div\", { children: e }) : /* @__PURE__ */ i(\"h2\", { className: \"text-2xl font-semibold\", id: p, children: e }) : null, y = () => {\n if (!s) return null;\n if (F.isValidElement(s)) {\n const E = s, I = E.props.className || \"\";\n return F.cloneElement(E, { className: V(\"px-6 py-4\", I) });\n }\n return /* @__PURE__ */ i(\"div\", { className: \"px-6 py-4\", children: s });\n };\n return /* @__PURE__ */ i(Q, { children: ae(\n /* @__PURE__ */ k(\n \"div\",\n {\n \"aria-labelledby\": h ?? e ? p : void 0,\n \"aria-describedby\": m,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n className: \"fixed inset-0 z-[100] overflow-hidden\",\n \"data-panel-open\": t,\n children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n className: V(\n \"fixed inset-0 bg-black/40 transition-opacity duration-300\",\n x ? \"opacity-100\" : \"opacity-0\",\n u\n ),\n onClick: () => {\n d || n();\n }\n }\n ),\n /* @__PURE__ */ i(\"div\", { className: \"fixed inset-y-0 right-0 flex max-w-full\", children: /* @__PURE__ */ i(\n \"div\",\n {\n id: b,\n ref: o,\n tabIndex: -1,\n className: V(\n \"relative h-full transform shadow-xl bg-popover text-popover-foreground transition-transform duration-300 ease-in-out\",\n l !== \"screen\" && \"border-l border-border\",\n Ht.size[l],\n x ? \"translate-x-0\" : \"translate-x-full\",\n c\n ),\n \"data-panel-size\": l,\n children: /* @__PURE__ */ k(\"div\", { className: \"flex h-full flex-col\", children: [\n e && /* @__PURE__ */ i(\"div\", { className: \"px-6 pt-6\", children: w() }),\n !f && /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: n,\n \"data-panel-close-button\": \"true\",\n \"aria-label\": \"Close panel\",\n className: \"rounded-md p-0.5 top-3 right-3 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0\",\n children: /* @__PURE__ */ i(oe, { size: 18 })\n }\n ),\n /* @__PURE__ */ i(\"div\", { className: V(\"flex-1 overflow-y-auto px-6 pb-6\", e ? \"pt-6\" : \"pt-10\"), children: r }),\n y()\n ] })\n }\n ) })\n ]\n }\n ),\n document.body\n ) });\n}\nconst Pt = {\n left: \"left-0 origin-top-left\",\n center: \"left-1/2 -translate-x-1/2 origin-top\",\n right: \"right-0 origin-top-right\"\n};\nfunction Dr({\n id: o,\n ref: a,\n isOpen: t,\n children: n,\n className: e,\n closeOnOverlayClick: r = !0,\n trigger: s,\n alignment: l = \"center\",\n closeOnTriggerClick: c = !0\n}) {\n const [u, f] = F.useState(t !== void 0 ? t : !1), d = j(null), h = j(null), m = j(null), v = K();\n $(() => {\n t !== void 0 && f(t);\n }, [t]), $(() => {\n if (!u) return;\n const x = (g) => {\n g.key === \"Escape\" && (g.preventDefault(), f(!1));\n };\n return document.addEventListener(\"keydown\", x), () => document.removeEventListener(\"keydown\", x);\n }, [u]), $(() => {\n if (!u || !r) return;\n const x = (g) => {\n const w = g.target;\n d.current && !d.current.contains(w) && h.current && !h.current.contains(w) && f(!1);\n };\n return document.addEventListener(\"pointerdown\", x), document.addEventListener(\"mousedown\", x), () => {\n document.removeEventListener(\"pointerdown\", x), document.removeEventListener(\"mousedown\", x);\n };\n }, [u, r]), $(() => {\n u ? (m.current = document.activeElement, d.current && d.current.focus()) : m.current && (m.current.focus(), m.current = null);\n }, [u]);\n const b = s.props, p = F.cloneElement(\n s,\n {\n \"aria-expanded\": u,\n \"aria-haspopup\": \"dialog\",\n \"aria-controls\": v,\n ref: Qe(h, b.ref),\n onClick: (x) => {\n var g;\n if (b.onClick && b.onClick(x), !(!c && u) && t === void 0) {\n if (x.defaultPrevented || (g = d.current) != null && g.contains(x.target)) return;\n f((w) => !w);\n }\n }\n }\n );\n return /* @__PURE__ */ k(\"div\", { id: o, ref: a, className: \"relative inline-block\", children: [\n p,\n /* @__PURE__ */ i(\n \"div\",\n {\n id: v,\n ref: d,\n className: N(\n \"bg-popover text-popover-foreground z-[90] absolute top-full mt-2 transform rounded-md shadow-lg transition-all ease-out\",\n u ? \"opacity-100 scale-100\" : \"opacity-0 scale-75 pointer-events-none\",\n Pt[l],\n e\n ),\n role: \"dialog\",\n \"aria-modal\": \"true\",\n tabIndex: -1,\n children: n\n }\n )\n ] });\n}\nfunction _t({ itemId: o, checked: a, onChange: t, name: n, disabled: e = !1, className: r = \"\" }) {\n const s = \"relative inline-flex items-center justify-center rounded-full\", l = () => {\n e || t();\n }, c = N(\n s,\n !a && \"hover:border-current/60\",\n !e && \"border-current cursor-pointer\",\n e && \"border-muted/60 cursor-not-allowed\",\n r\n );\n return /* @__PURE__ */ i(\n \"div\",\n {\n id: o,\n role: \"radio\",\n tabIndex: -1,\n \"aria-checked\": a,\n \"aria-disabled\": e,\n \"aria-description\": `Radio button for ${n}`,\n \"aria-labelledby\": `${o}-label`,\n onClick: l,\n className: c,\n style: {\n width: \"1em\",\n height: \"1em\",\n padding: \"0.1em\",\n borderWidth: \"0.06em\"\n },\n children: a && /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\"size-full aspect-square rounded-full\", e && \"bg-muted/60\", !e && \"bg-current\")\n }\n )\n }\n );\n}\nfunction be({\n value: o,\n children: a,\n className: t = \"\",\n isSelected: n = !1,\n onChange: e,\n disabled: r = !1,\n hideInput: s = !1,\n description: l,\n name: c\n}) {\n const f = `radio-${K()}-${o}`, d = () => {\n r || e == null || e(o);\n };\n return /* @__PURE__ */ k(\n \"div\",\n {\n title: l,\n className: N(\n \"relative flex items-center\",\n t,\n // Uses text color for borders\n s && `p-2 border-2 focus-within:border-dashed focus-within:${r ? \"border-current/50\" : \"border-current/80\"}`,\n s && !n && `border-transparent ${r ? \"\" : \"not-focus-within:hover:border-border/60\"}`,\n s && n && \"border-border\",\n r && \"opacity-60 cursor-not-allowed\"\n ),\n style: {\n gap: \"0.5em\"\n },\n children: [\n !s && /* @__PURE__ */ i(\n _t,\n {\n itemId: f,\n name: c || \"\",\n checked: n,\n onChange: d,\n disabled: r,\n className: N(s && \"\")\n }\n ),\n /* @__PURE__ */ i(\n \"div\",\n {\n id: s ? f : void 0,\n tabIndex: s ? -1 : void 0,\n role: s ? \"radio\" : void 0,\n onClick: s ? d : void 0,\n \"aria-checked\": s ? n ? \"true\" : \"false\" : void 0,\n \"aria-disabled\": s ? r : void 0,\n \"aria-description\": s ? l || `Radio button for ${c}` : void 0,\n \"aria-labelledby\": s ? `${f}-label` : void 0,\n className: N(s && \"size-full\", typeof a == \"object\" && \"grow focus:outline-none\"),\n children: /* @__PURE__ */ i(\n \"label\",\n {\n id: `${f}-label`,\n onClick: s ? void 0 : d,\n className: N(r && \"cursor-not-allowed\", !r && \"cursor-pointer\"),\n children: a\n }\n )\n }\n )\n ]\n }\n );\n}\nfunction Zt(o, a) {\n const [t, n] = z(a), [e, r] = z(-1), [s, l] = z(!1), c = C((m, v) => {\n var x;\n const b = m[v];\n b.hasAttribute(\"disabled\") || b.getAttribute(\"aria-disabled\") === \"true\" || ((x = m[v]) == null || x.click(), r(v));\n }, []), u = C(\n (m, v) => {\n var p;\n if (m.preventDefault(), s || !v.length) return;\n const b = a !== -1 ? a : 0;\n (p = v[b]) == null || p.focus(), n(b), a !== -1 && c(v, b);\n },\n [a, s, c]\n ), f = C(\n (m) => {\n var x;\n if (!m.shiftKey)\n return;\n m.preventDefault();\n const v = Array.from(\n document.querySelectorAll(\n 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])'\n )\n ).filter((g) => !g.hasAttribute(\"disabled\") && g.tabIndex >= 0), b = v.findIndex((g) => g.id === o), p = b > 0 ? b - 1 : v.length - 1;\n (x = v[p]) == null || x.focus();\n },\n [o]\n ), d = C(\n (m, v) => {\n var w;\n if (!v.length) return;\n const b = m.target;\n if (!v.some((y) => y.id === b.id)) return;\n const x = t !== -1 ? t : 0;\n let g = x;\n switch (m.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n m.preventDefault(), g = x > 0 ? x - 1 : v.length - 1;\n break;\n case \"ArrowDown\":\n case \"ArrowRight\":\n m.preventDefault(), g = (x + 1) % v.length;\n break;\n // Select the option when the space key is pressed\n case \" \":\n m.preventDefault(), c(v, x);\n return;\n case \"Tab\":\n f(m);\n return;\n default:\n return;\n }\n (w = v[g]) == null || w.focus(), n(g), e !== -1 && c(v, g);\n },\n [t, e, f, c]\n ), h = C(() => {\n const m = document.querySelector(`[id=\"${o}\"][role=\"radiogroup\"]`);\n return m ? Array.from(m.querySelectorAll('[role=\"radio\"]')) : [];\n }, [o]);\n $(() => {\n const m = document.querySelector(`[id=\"${o}\"][role=\"radiogroup\"]`);\n if (!m) return;\n const v = h(), b = (w) => u(w, v), p = (w) => d(w, v), x = () => l(!0), g = () => l(!1);\n return document.addEventListener(\"keydown\", p), m.addEventListener(\"focus\", b), m.addEventListener(\"mousedown\", x), document.addEventListener(\"mouseup\", g), () => {\n document.removeEventListener(\"keydown\", p), m.removeEventListener(\"focus\", b), m.removeEventListener(\"mousedown\", x), document.removeEventListener(\"mouseup\", g);\n };\n }, [o, h, u, d]);\n}\nfunction Tr({\n options: o = [],\n value: a,\n onChange: t,\n id: n,\n children: e,\n className: r = \"\",\n childrenClassName: s = \"\",\n hideInputs: l = !1\n}) {\n const c = K(), u = n || `radio-group-${c}`;\n Zt(\n u,\n o.findIndex((d) => d === a)\n );\n const f = q(() => o.reduce((d, h) => (typeof h == \"string\" ? d.some((m) => m.value === h) || d.push({ label: h, value: h }) : d.push(h), d), []), [o]);\n return /* @__PURE__ */ k(\"div\", { id: u, role: \"radiogroup\", tabIndex: 0, className: N(r, \"focus:outline-none\"), children: [\n f.length > 0 && f.map((d, h) => /* @__PURE__ */ i(\n be,\n {\n value: d.value,\n isSelected: a === d.value,\n onChange: t,\n name: u,\n disabled: d.disabled,\n description: d.description,\n hideInput: l,\n className: s,\n children: d.label\n },\n `${d.value}-${h}`\n )),\n f.length === 0 && e && F.Children.map(e, (d) => F.isValidElement(d) && d.type === be ? /* @__PURE__ */ i(\n be,\n {\n ...d.props,\n className: N(s, d.props.className),\n hideInput: d.props.hideInput || l,\n isSelected: a === d.props.value,\n onChange: t,\n name: u,\n children: d.props.children\n }\n ) : null)\n ] });\n}\nfunction Gt(o) {\n const a = j(null), t = j(null), n = j(null), [e, r] = z(!1), [s, l] = z(!1), [c, u] = z({\n vertical: !1,\n horizontal: !1\n }), f = j(null), d = j(null), h = C(() => {\n const b = a.current;\n if (!b) return;\n const p = b.scrollHeight > b.clientHeight, x = b.scrollWidth > b.clientWidth;\n u({\n vertical: p,\n horizontal: x\n });\n }, []), m = C(() => {\n const b = a.current, p = t.current, x = n.current;\n if (b) {\n if (p && c.vertical) {\n const w = (c.horizontal ? b.clientHeight - o : b.clientHeight) / b.scrollHeight, y = Math.max(w * 100, 10), E = b.scrollHeight - b.clientHeight, I = E > 0 ? b.scrollTop / E : 0, D = 100 - y, A = I * D;\n p.style.height = `${y}%`, p.style.top = `${A}%`, p.style.transform = \"none\";\n }\n if (x && c.horizontal) {\n const w = (c.vertical ? b.clientWidth - o : b.clientWidth) / b.scrollWidth, y = Math.max(w * 100, 10), E = b.scrollWidth - b.clientWidth, I = E > 0 ? b.scrollLeft / E : 0, D = 100 - y, A = I * D;\n x.style.width = `${y}%`, x.style.left = `${A}%`, x.style.transform = \"none\";\n }\n }\n }, [c, o]), v = C(() => {\n f.current && clearTimeout(f.current), d.current && clearTimeout(d.current), r(!0), l(!1), m(), f.current = setTimeout(() => {\n l(!0), d.current = setTimeout(() => {\n r(!1), l(!1);\n }, 300);\n }, 1e3);\n }, [m]);\n return $(() => {\n const b = a.current;\n if (!b) return;\n h();\n const p = new ResizeObserver(h);\n p.observe(b);\n const x = new MutationObserver(h);\n return x.observe(b, {\n childList: !0,\n subtree: !0,\n attributes: !0\n }), () => {\n p.disconnect(), x.disconnect();\n };\n }, [h]), $(() => {\n m();\n }, [c, m]), $(() => () => {\n f.current && clearTimeout(f.current), d.current && clearTimeout(d.current);\n }, []), {\n viewportRef: a,\n verticalThumbRef: t,\n horizontalThumbRef: n,\n isScrolling: e,\n isFadingOut: s,\n scrollbarVisible: c,\n handleScroll: v\n };\n}\nfunction Rr({\n className: o,\n thumbClassName: a,\n viewportClassName: t,\n scrollbarClassName: n,\n scrollbarThickness: e = 10,\n children: r,\n id: s,\n ref: l,\n ...c\n}) {\n const { viewportRef: u, verticalThumbRef: f, horizontalThumbRef: d, isScrolling: h, isFadingOut: m, scrollbarVisible: v, handleScroll: b } = Gt(e), p = V(\n \"relative flex-1 rounded-full bg-slate-400/60 hover:bg-slate-400/80 active:bg-slate-400\",\n a\n );\n return /* @__PURE__ */ k(\"div\", { ref: l, id: s, className: V(\"relative overflow-hidden\", o), \"data-scroll-area-root\": \"\", ...c, children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n ref: u,\n className: V(\n \"h-full w-full overflow-auto rounded-[inherit] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden\",\n t\n ),\n onScroll: b,\n \"data-scroll-area-viewport\": \"\",\n children: r\n }\n ),\n v.vertical && (h || m) && /* @__PURE__ */ i(\n \"div\",\n {\n className: V(\n \"touch-none select-none transition-all duration-300\",\n \"p-[1px]\",\n \"absolute right-0 top-0\",\n m ? \"opacity-0\" : \"opacity-100\",\n n\n ),\n \"data-scroll-area-scrollbar\": \"vertical\",\n \"data-state\": h ? \"visible\" : \"hidden\",\n style: {\n width: `${e}px`,\n height: v.horizontal ? `calc(100% - ${e}px)` : \"100%\"\n },\n children: /* @__PURE__ */ i(\n \"div\",\n {\n ref: f,\n className: V(\"absolute rounded-full\", p),\n \"data-scroll-area-thumb\": \"\",\n style: { height: \"20%\", top: \"0%\", width: \"100%\" }\n }\n )\n }\n ),\n v.horizontal && (h || m) && /* @__PURE__ */ i(\n \"div\",\n {\n className: V(\n \"touch-none select-none transition-all duration-300\",\n \"p-[1px]\",\n \"absolute bottom-0 left-0\",\n m ? \"opacity-0\" : \"opacity-100\",\n n\n ),\n \"data-scroll-area-scrollbar\": \"horizontal\",\n \"data-state\": h ? \"visible\" : \"hidden\",\n style: {\n height: `${e}px`,\n width: v.vertical ? `calc(100% - ${e}px)` : \"100%\"\n },\n children: /* @__PURE__ */ i(\n \"div\",\n {\n ref: d,\n className: V(\"absolute rounded-full\", p),\n \"data-scroll-area-thumb\": \"\",\n style: { width: \"20%\", left: \"0%\", height: \"100%\" }\n }\n )\n }\n ),\n v.vertical && v.horizontal && /* @__PURE__ */ i(\n \"div\",\n {\n className: V(\"bg-transparent\", \"absolute bottom-0 right-0\"),\n \"data-scroll-area-corner\": \"\",\n style: {\n height: `${e}px`,\n width: `${e}px`\n }\n }\n )\n ] });\n}\nfunction qt(o) {\n const [a, t] = z(!1), [n, e] = z(!1);\n return $(() => {\n o ? (e(!0), setTimeout(() => t(!0), 10)) : (t(!1), setTimeout(() => e(!1), 150));\n }, [o]), { show: a, shouldRender: n };\n}\nfunction Yt({\n isOpen: o,\n setIsOpen: a,\n filteredOptions: t,\n highlightedIndex: n,\n setHighlightedIndex: e,\n onSelect: r,\n triggerRef: s\n}) {\n return { handleKeyDown: C(\n (c) => {\n var u;\n switch (c.key) {\n case \"ArrowDown\":\n if (c.preventDefault(), !o)\n a(!0);\n else {\n const f = n < t.length - 1 ? n + 1 : 0;\n let d = f;\n for (let h = 0; h < t.length; h++) {\n const m = (f + h) % t.length;\n if (!t[m].disabled) {\n d = m;\n break;\n }\n }\n e(d);\n }\n break;\n case \"ArrowUp\":\n if (c.preventDefault(), !o)\n a(!0);\n else {\n const f = n > 0 ? n - 1 : t.length - 1;\n let d = f;\n for (let h = 0; h < t.length; h++) {\n const m = (f - h + t.length) % t.length;\n if (!t[m].disabled) {\n d = m;\n break;\n }\n }\n e(d);\n }\n break;\n case \"Enter\":\n case \" \":\n if (c.preventDefault(), !o)\n a(!0);\n else if (n >= 0 && n < t.length) {\n const f = t[n];\n f.disabled || r(f);\n }\n break;\n case \"Escape\":\n c.preventDefault(), o && (a(!1), (u = s.current) == null || u.focus());\n break;\n case \"Tab\":\n o && a(!1);\n break;\n }\n },\n [o, a, t, n, e, r, s]\n ) };\n}\nfunction Ut({\n isOpen: o,\n filteredOptions: a,\n selectedOption: t,\n shouldRender: n,\n optionsContainerRef: e\n}) {\n const [r, s] = z(-1), l = q(() => t ? a.findIndex((c) => c.value === t.value) : -1, [a, t]);\n return $(() => {\n o && a.length > 0 ? s(t && l >= 0 ? l : 0) : s(-1);\n }, [a, o, t, l]), $(() => {\n if (r >= 0 && e.current && n) {\n const c = () => {\n const u = e.current, f = u == null ? void 0 : u.querySelector(`[data-option-index=\"${r}\"]`);\n if (f) {\n const d = o && t && r === l ? \"auto\" : \"smooth\";\n f.scrollIntoView({\n behavior: d,\n block: \"nearest\"\n });\n }\n };\n o && n && t ? setTimeout(c, 10) : c();\n }\n }, [r, n, o, t, a, e, l]), { highlightedIndex: r, setHighlightedIndex: s };\n}\nconst we = {\n sm: {\n trigger: \"px-2 py-1 text-sm\",\n options: \"px-2 py-2 text-xs\"\n },\n md: {\n trigger: \"px-3 py-2 text-base\",\n options: \"px-3 py-2.5 text-sm\"\n },\n lg: {\n trigger: \"px-4 py-3 text-lg\",\n options: \"px-4 py-3 text-base\"\n }\n};\nfunction Lr({\n options: o,\n value: a,\n placeholder: t = \"Select an option...\",\n searchable: n = !1,\n disabled: e = !1,\n clearable: r = !1,\n size: s = \"md\",\n className: l,\n triggerClassName: c,\n dropdownClassName: u,\n id: f,\n ref: d,\n onChange: h,\n onSearch: m,\n searchPlaceholder: v = \"Search options...\"\n}) {\n const b = K(), x = `${f ?? b}-listbox`, g = (T) => `${x}-option-${T}`, [w, y] = z(!1), [E, I] = z(\"\"), D = j(null), A = j(null), H = j(null), L = j(null), { show: _, shouldRender: W } = qt(w), R = q(() => !n || !E ? o : o.filter(\n (T) => {\n var B;\n return T.text.toLowerCase().includes(E.toLowerCase()) || ((B = T.description) == null ? void 0 : B.toLowerCase().includes(E.toLowerCase()));\n }\n ), [o, n, E]), S = q(() => o.find((T) => T.value === a), [o, a]), { highlightedIndex: M, setHighlightedIndex: Z } = Ut({\n isOpen: w,\n filteredOptions: R,\n selectedOption: S,\n shouldRender: W,\n optionsContainerRef: L\n }), Y = M >= 0 ? g(M) : void 0;\n $(() => {\n w && W && n && A.current && A.current.focus();\n }, [w, n, W]);\n const X = C(\n (T) => {\n var B;\n T.disabled || (h == null || h(T.value), y(!1), I(\"\"), (B = D.current) == null || B.focus());\n },\n [h]\n ), { handleKeyDown: G } = Yt({\n isOpen: w,\n setIsOpen: y,\n filteredOptions: R,\n highlightedIndex: M,\n setHighlightedIndex: Z,\n onSelect: X,\n triggerRef: D\n });\n $(() => {\n if (!w)\n return;\n const T = (B) => {\n var re;\n H.current && !H.current.contains(B.target) && !((re = D.current) != null && re.contains(B.target)) && (y(!1), I(\"\"));\n };\n return document.addEventListener(\"mousedown\", T), () => document.removeEventListener(\"mousedown\", T);\n }, [w]);\n const O = () => {\n e || (y(!w), w || (I(\"\"), Z(-1)));\n }, ue = (T) => {\n T.disabled || (h == null || h(T.value), y(!1), I(\"\"));\n }, fe = (T) => {\n const B = T.target.value;\n I(B), m == null || m(B), Z(-1);\n }, me = (T) => {\n T.preventDefault(), T.stopPropagation(), h == null || h(\"\");\n };\n return /* @__PURE__ */ k(\n \"div\",\n {\n className: N(\"relative\", l),\n id: f,\n ref: d,\n \"data-select\": \"true\",\n \"data-value\": a,\n \"data-searchable\": n,\n \"data-disabled\": e,\n \"data-clearable\": r,\n children: [\n /* @__PURE__ */ k(\"div\", { className: \"relative\", children: [\n /* @__PURE__ */ k(\n \"button\",\n {\n ref: D,\n type: \"button\",\n className: N(\n \"flex items-center justify-between w-full text-left bg-inherit border border-border rounded-md transition-colors\",\n \"hover:border-primary focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary\",\n e && \"opacity-50 cursor-not-allowed hover:border-border\",\n w && \"border-primary ring-1 ring-primary\",\n we[s].trigger,\n c\n ),\n onClick: O,\n onKeyDown: G,\n disabled: e,\n \"aria-disabled\": e,\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": w,\n \"aria-controls\": w ? x : void 0,\n \"aria-activedescendant\": w && !n ? Y : void 0,\n \"aria-label\": S ? S.text : t,\n \"data-select-trigger\": \"true\",\n children: [\n /* @__PURE__ */ i(\"span\", { className: N(\"block truncate\", !S && \"opacity-70\"), children: S ? S.text : t }),\n /* @__PURE__ */ i(\"div\", { className: \"flex items-center ml-2\", children: /* @__PURE__ */ i($e, { size: 16, className: N(\"transition-transform duration-200\", w && \"rotate-180\") }) })\n ]\n }\n ),\n r && S && /* @__PURE__ */ i(\n \"button\",\n {\n type: \"button\",\n onClick: me,\n className: \"absolute right-8 top-1/2 -translate-y-1/2 p-0.5 rounded hover:bg-accent/20 transition-colors group z-10\",\n \"aria-label\": \"Clear selection\",\n \"data-select-clear\": \"true\",\n children: /* @__PURE__ */ i(oe, { size: 14, className: \"opacity-70 group-hover:opacity-100 transition-opacity\" })\n }\n )\n ] }),\n W && /* @__PURE__ */ k(\n \"div\",\n {\n ref: H,\n className: N(\n \"absolute z-50 w-full mt-1 bg-popover text-popover-foreground border border-border rounded-md shadow-lg transition-all duration-150\",\n _ ? \"opacity-100 translate-y-0\" : \"opacity-0 -translate-y-2\",\n u\n ),\n id: x,\n role: \"listbox\",\n \"data-select-content\": \"true\",\n children: [\n n && /* @__PURE__ */ i(\"div\", { className: \"border-b border-border\", children: /* @__PURE__ */ i(\n \"input\",\n {\n ref: A,\n type: \"text\",\n value: E,\n onChange: fe,\n onKeyDown: G,\n placeholder: v,\n className: \"w-full px-2 py-2 text-inherit focus:outline-none\",\n \"aria-autocomplete\": \"list\",\n \"aria-controls\": x,\n \"aria-activedescendant\": Y,\n \"data-select-search\": \"true\"\n }\n ) }),\n /* @__PURE__ */ i(\"div\", { ref: L, className: \"max-h-60 overflow-auto\", children: R.length > 0 ? R.map((T, B) => /* @__PURE__ */ k(\n \"div\",\n {\n id: g(B),\n className: N(\n \"flex items-center cursor-pointer transition-colors\",\n \"hover:bg-accent/10 focus:bg-accent/10\",\n we[s].options,\n T.disabled && \"opacity-50 cursor-not-allowed\",\n B === M && \"bg-accent/20\",\n a === T.value && \"bg-accent/30\"\n ),\n onClick: () => ue(T),\n role: \"option\",\n \"aria-selected\": a === T.value,\n \"aria-disabled\": T.disabled,\n \"data-select-option\": \"true\",\n \"data-value\": T.value,\n \"data-highlighted\": B === M,\n \"data-option-index\": B,\n children: [\n /* @__PURE__ */ k(\"div\", { className: \"flex-1 min-w-0\", children: [\n /* @__PURE__ */ i(\"div\", { className: \"font-medium\", children: T.text }),\n T.description && /* @__PURE__ */ i(\"div\", { className: \"text-xs opacity-70 mt-0.5\", children: T.description })\n ] }),\n a === T.value && /* @__PURE__ */ i(ve, { size: 16, className: \"ml-2 text-primary flex-shrink-0\" })\n ]\n },\n T.value\n )) : /* @__PURE__ */ i(\"div\", { className: \"px-3 py-2 text-sm opacity-70 text-center\", children: n && E ? \"No results found\" : \"No options available\" }) })\n ]\n }\n )\n ]\n }\n );\n}\nconst Xt = {\n thin: {\n horizontal: \"h-px\",\n vertical: \"w-px\"\n },\n medium: {\n horizontal: \"h-0.5\",\n vertical: \"w-0.5\"\n },\n thick: {\n horizontal: \"h-1\",\n vertical: \"w-1\"\n },\n \"extra-thick\": {\n horizontal: \"h-2\",\n vertical: \"w-2\"\n }\n}, Jt = {\n horizontal: \"w-full\",\n vertical: \"min-h-4 h-full\"\n};\nfunction jr({\n orientation: o = \"horizontal\",\n decorative: a = !1,\n thickness: t = \"thin\",\n className: n,\n ...e\n}) {\n const r = N(\n \"shrink-0 bg-border\",\n Jt[o],\n Xt[t][o],\n n\n );\n return /* @__PURE__ */ i(\n \"div\",\n {\n ...e,\n className: r,\n role: a ? \"presentation\" : \"separator\",\n \"aria-orientation\": a ? void 0 : o,\n \"aria-hidden\": a,\n \"data-orientation\": o,\n \"data-thickness\": t\n }\n );\n}\nconst Ne = {\n shape: {\n rectangle: \"rounded-md min-h-1\",\n circle: \"rounded-full aspect-square min-h-1\",\n text: \"rounded-sm min-h-1 h-4\"\n },\n lineSpacing: {\n xs: \"space-y-1\",\n sm: \"space-y-2\",\n md: \"space-y-3\",\n lg: \"space-y-4\",\n xl: \"space-y-6\"\n }\n};\nfunction Vr({\n shape: o = \"rectangle\",\n lineSpacing: a = \"sm\",\n className: t,\n lines: n = 1,\n animate: e = !0,\n ref: r,\n ...s\n}) {\n const l = N(\"bg-muted/70\", e && \"animate-pulse\", Ne.shape[o], t);\n return n > 1 ? /* @__PURE__ */ i(\n \"div\",\n {\n ref: r,\n className: Ne.lineSpacing[a],\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-container\",\n \"data-lines\": n,\n \"data-shape\": o,\n \"data-animate\": e,\n ...s,\n children: Array.from({ length: n }, (c, u) => /* @__PURE__ */ i(\n \"div\",\n {\n className: N(\n l,\n // Make last line shorter for a more natural text appearance\n u === n - 1 && \"w-3/4\"\n ),\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton-line\",\n \"data-line-index\": u\n },\n u\n ))\n }\n ) : /* @__PURE__ */ i(\n \"div\",\n {\n ref: r,\n className: l,\n role: \"presentation\",\n \"aria-hidden\": \"true\",\n \"data-testid\": \"skeleton\",\n \"data-shape\": o,\n \"data-animate\": e,\n ...s\n }\n );\n}\nfunction Mr({\n id: o,\n value: a,\n defaultValue: t = 0,\n onValueChange: n,\n min: e = 0,\n max: r = 100,\n step: s = 1,\n disabled: l = !1,\n trackClassName: c,\n rangeClassName: u,\n thumbClassName: f,\n className: d,\n ref: h,\n ariaLabel: m,\n ariaLabelledBy: v,\n ...b\n}) {\n const [p, x] = z(t), g = a !== void 0, w = g ? a : p, y = j(null), E = j(!1), I = j(0), D = C(\n (R) => {\n const S = Math.max(e, Math.min(r, R)), M = Math.round(S / s) * s;\n g || x(M), n == null || n(M);\n },\n [e, r, s, g, n]\n ), A = C(\n (R, S = !1) => {\n var X;\n const M = (X = y.current) == null ? void 0 : X.getBoundingClientRect();\n if (!M) return w;\n let Z = R.clientX;\n S && (Z = Z - I.current);\n const Y = Math.max(0, Math.min(1, (Z - M.left) / M.width));\n return e + (r - e) * Y;\n },\n [e, r, w]\n ), H = C(\n (R) => {\n if (l || R.target !== R.currentTarget) return;\n const S = A(R);\n D(S);\n },\n [l, A, D]\n ), L = C(\n (R) => {\n var X;\n if (l) return;\n R.stopPropagation(), E.current = !0;\n const S = (X = y.current) == null ? void 0 : X.getBoundingClientRect(), M = R.currentTarget.getBoundingClientRect();\n if (S && M) {\n const G = M.left + M.width / 2;\n I.current = R.clientX - G;\n }\n R.currentTarget.setPointerCapture(R.pointerId);\n const Z = (G) => {\n if (!E.current) return;\n const O = A(G, !0);\n D(O);\n }, Y = (G) => {\n if (G.pointerId === R.pointerId) {\n E.current = !1, I.current = 0;\n try {\n R.currentTarget.releasePointerCapture(G.pointerId);\n } catch {\n }\n document.removeEventListener(\"pointermove\", Z), document.removeEventListener(\"pointerup\", Y);\n }\n };\n document.addEventListener(\"pointermove\", Z), document.addEventListener(\"pointerup\", Y);\n },\n [l, A, D]\n ), _ = C(\n (R) => {\n if (l) return;\n let S = w;\n switch (R.key) {\n case \"ArrowRight\":\n case \"ArrowUp\":\n S = w + s;\n break;\n case \"ArrowLeft\":\n case \"ArrowDown\":\n S = w - s;\n break;\n case \"Home\":\n S = e;\n break;\n case \"End\":\n S = r;\n break;\n case \"PageUp\":\n S = w + s * 10;\n break;\n case \"PageDown\":\n S = w - s * 10;\n break;\n default:\n return;\n }\n R.preventDefault(), D(S);\n },\n [l, w, s, e, r, D]\n ), W = r === e ? 0 : (w - e) / (r - e) * 100;\n return /* @__PURE__ */ i(\n \"div\",\n {\n id: o,\n ref: h,\n className: V(\n \"relative flex items-center w-full touch-none select-none\",\n l && \"opacity-50 cursor-not-allowed\",\n d\n ),\n \"data-disabled\": l,\n \"data-value\": w,\n \"data-min\": e,\n \"data-max\": r,\n \"data-step\": s,\n ...b,\n children: /* @__PURE__ */ k(\n \"div\",\n {\n ref: y,\n className: V(\n \"relative h-1.5 w-full rounded-full bg-muted cursor-pointer\",\n l && \"cursor-not-allowed\",\n c\n ),\n onPointerDown: H,\n children: [\n /* @__PURE__ */ i(\n \"div\",\n {\n className: V(\n \"absolute h-full rounded-full pointer-events-none\",\n // pointer-events are disabled so that user interactions are handled by the track element, enabling correct slider behavior\n !E.current && \"transition-all\",\n u\n ),\n style: { width: `${W}%` }\n }\n ),\n /* @__PURE__ */ i(\n \"div\",\n {\n className: V(\n \"absolute size-5 -top-2 rounded-full shadow-md cursor-grab\",\n l && \"cursor-not-allowed\",\n !l && \"cursor-grab focus:outline-none focus:ring-2\",\n E.current ? \"cursor-grabbing scale-110\" : \"transition-all\",\n f\n ),\n style: { left: `calc(${W}% - 10px)` },\n tabIndex: l ? -1 : 0,\n role: \"slider\",\n \"aria-valuemin\": e,\n \"aria-valuemax\": r,\n \"aria-valuenow\": w,\n \"aria-label\": m,\n \"aria-labelledby\": v,\n \"aria-disabled\": l,\n onKeyDown: _,\n onPointerDown: L\n }\n )\n ]\n }\n )\n }\n );\n}\nfunction Br({ children: o, ref: a, ...t }) {\n if (Le(o)) {\n let n = { ...t };\n return o.props && (n = { ...n, ...o.props }), je(o, {\n ...n,\n ref: (e) => {\n typeof a == \"function\" ? a(e) : a && (a.current = e);\n }\n });\n }\n return ze(\"div\", { ...t, ref: a }, o);\n}\nconst Qt = ({ defaultValue: o, value: a, onValueChange: t } = {}) => {\n const [n, e] = z(o || \"\"), r = a !== void 0, s = r ? a : n, l = C((c) => {\n r || e(c), t == null || t(c);\n }, [r, t]);\n return {\n value: s,\n onValueChange: l\n };\n};\nfunction Wr({\n defaultValue: o,\n value: a,\n onValueChange: t,\n tabsWidth: n = \"fit\",\n variant: e = \"underline\",\n className: r,\n children: s,\n ref: l,\n id: c,\n triggersClassName: u,\n contentClassName: f\n}) {\n const { value: d, onValueChange: h } = Qt({\n defaultValue: o,\n value: a,\n onValueChange: t\n }), m = {\n selectedValue: d,\n onValueChange: h,\n tabsWidth: n,\n variant: e,\n triggersClassName: u,\n contentClassName: f\n };\n return /* @__PURE__ */ i(Ye.Provider, { value: m, children: /* @__PURE__ */ i(\"div\", { id: c, ref: l, className: r, \"data-tabs-width\": n, \"data-variant\": e, children: s }) });\n}\nfunction Fr({ value: o, className: a, children: t, ref: n }) {\n const { selectedValue: e, contentClassName: r } = ge(), s = e === o;\n return s ? /* @__PURE__ */ i(\n \"div\",\n {\n ref: n,\n role: \"tabpanel\",\n id: `tabs-content-${o}`,\n \"aria-labelledby\": `tabs-trigger-${o}`,\n \"data-state\": s ? \"active\" : \"inactive\",\n \"data-value\": o,\n className: N(\"mt-4 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2\", r, a),\n tabIndex: 0,\n children: t\n }\n ) : null;\n}\nconst Ee = {\n width: {\n fit: \"w-fit\",\n full: \"w-full *:flex-1\"\n },\n variant: {\n underline: \"border-b border-border\",\n pills: \"\",\n bordered: \"border border-border rounded-lg p-1\"\n }\n}, Ot = {\n underline: \"border-b-2 border-transparent data-[state=active]:border-accent data-[state=active]:text-accent hover:text-accent-foreground\",\n pills: \"rounded-md data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30\",\n bordered: \"rounded data-[state=active]:bg-accent data-[state=active]:text-accent-foreground hover:bg-accent/30\"\n};\nfunction Kr({ children: o, className: a, id: t, ref: n }) {\n const { tabsWidth: e, variant: r } = ge();\n return /* @__PURE__ */ i(\n \"div\",\n {\n id: t,\n ref: n,\n role: \"tablist\",\n className: N(\"flex\", Ee.width[e], Ee.variant[r], a),\n \"data-tabs-width\": e,\n \"data-variant\": r,\n children: o\n }\n );\n}\nfunction Hr({ value: o, disabled: a = !1, className: t, children: n, onClick: e, id: r, ref: s }) {\n const { selectedValue: l, onValueChange: c, variant: u, triggersClassName: f } = ge(), d = l === o, h = (v) => {\n a || c(o), e == null || e(v);\n };\n return /* @__PURE__ */ i(\n \"button\",\n {\n id: r,\n ref: s,\n role: \"tab\",\n type: \"button\",\n \"aria-selected\": d,\n \"aria-controls\": `tabs-content-${o}`,\n \"data-state\": d ? \"active\" : \"inactive\",\n \"data-value\": o,\n disabled: a,\n className: N(\n \"inline-flex items-center justify-center whitespace-nowrap px-3 py-2 text-sm ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n d ? \"font-medium\" : \"font-light\",\n Ot[u],\n f,\n t\n ),\n onClick: h,\n children: n\n }\n );\n}\nfunction er({ elementId: o, maxLength: a }) {\n const [t, n] = z(0);\n return $(() => {\n const e = document.getElementById(o);\n if (!e)\n return;\n const r = () => {\n const s = e.value.length;\n n(s);\n const l = s >= a;\n e.setAttribute(\"aria-describedby\", `${o}-character-count`), e.setAttribute(\"aria-invalid\", l ? \"true\" : \"false\"), l ? e.setAttribute(\"data-error\", \"true\") : e.removeAttribute(\"data-error\");\n };\n return r(), e.addEventListener(\"input\", r), e.setAttribute(\"maxlength\", String(a)), () => {\n e.removeEventListener(\"input\", r), e.removeAttribute(\"maxlength\"), e.removeAttribute(\"aria-describedby\"), e.removeAttribute(\"aria-invalid\"), e.removeAttribute(\"data-error\");\n };\n }, [o, a]), /* @__PURE__ */ i(\n \"small\",\n {\n className: N(\n \"mt-0.5 text-sm inline-flex items-center gap-1 w-full justify-end\",\n t >= a && \"text-destructive\",\n t < a && \"text-current\"\n ),\n role: \"status\",\n children: /* @__PURE__ */ k(\"span\", { id: `${o}-character-count`, children: [\n t,\n \" / \",\n a,\n \" characters\"\n ] })\n }\n );\n}\nfunction tr(o, a) {\n $(() => {\n const t = document.getElementById(o);\n if (!t)\n return;\n if (!a) {\n t.style.height = \"auto\";\n return;\n }\n const n = () => {\n t.style.height = \"auto\", t.style.height = `${t.scrollHeight}px`;\n };\n return n(), t.addEventListener(\"input\", n), t.addEventListener(\"resize\", n), window.addEventListener(\"resize\", n), () => {\n t.removeEventListener(\"input\", n), t.removeEventListener(\"resize\", n), window.removeEventListener(\"resize\", n);\n };\n }, [o, a]);\n}\nconst rr = {\n base: \"\",\n \"left-line\": \"border-l border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\",\n outline: \"border border-border focus:border-primary-foreground disabled:border-muted/30 not-disabled:data-error:border-destructive not-disabled:data-success:border-success\"\n}, nr = {\n none: \"rounded-none\",\n sm: \"rounded-sm\",\n md: \"rounded-md\",\n lg: \"rounded-lg\",\n full: \"px-3 rounded-full\"\n}, ke = {\n variant: \"outline\",\n rounded: \"none\"\n};\nfunction Pr({\n variant: o = ke.variant,\n rounded: a,\n displayOnlyMode: t = !1,\n errorMessage: n,\n successMessage: e,\n hideResizeHandle: r = !1,\n autoExpand: s = !1,\n characterLimit: l = 0,\n className: c,\n ...u\n}) {\n const f = K();\n tr(f, s || t);\n let d = a;\n o === \"outline\" && !a && (d = \"md\"), d = d || ke.rounded;\n let h = r;\n (t || o === \"left-line\" && !r) && (h = !0);\n const v = N(\n \"appearance-none w-full focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-muted/70 hide-number-input-arrows transition-all\",\n !t && rr[o],\n !t && nr[d],\n !t && \"px-2 py-1\",\n t && \"pointer-events-none\",\n h && \"no-resize-handle\",\n c\n );\n return /* @__PURE__ */ k(\"div\", { className: N(\"-space-y-1.5\", t && \"cursor-text\"), children: [\n /* @__PURE__ */ i(\n \"textarea\",\n {\n ...u,\n id: f,\n \"aria-disabled\": u.disabled,\n readOnly: t,\n \"aria-readonly\": t || u[\"aria-readonly\"],\n style: {\n resize: s ? \"none\" : void 0\n },\n className: v\n }\n ),\n l > 0 && /* @__PURE__ */ i(er, { elementId: f, maxLength: l }),\n !t && /* @__PURE__ */ i(de, { elementId: f, type: \"error\", message: n }),\n !t && /* @__PURE__ */ i(de, { elementId: f, type: \"success\", message: e })\n ] });\n}\nconst or = {\n sm: {\n container: \"h-5 min-w-9 w-9\",\n thumb: \"h-4 w-4\",\n translate: \"translate-x-4\"\n },\n md: {\n container: \"h-6 min-w-11 w-11\",\n thumb: \"h-5 w-5\",\n translate: \"translate-x-5\"\n },\n lg: {\n container: \"h-7 min-w-13 w-13\",\n thumb: \"h-6 w-6\",\n translate: \"translate-x-6\"\n }\n}, ar = {\n default: {\n unchecked: \"bg-muted\",\n checked: \"bg-primary\"\n },\n success: {\n unchecked: \"bg-muted\",\n checked: \"bg-success\"\n },\n destructive: {\n unchecked: \"bg-muted\",\n checked: \"bg-destructive\"\n }\n}, Ce = {\n variant: \"default\",\n size: \"md\"\n};\nfunction _r({\n ref: o,\n id: a,\n size: t = Ce.size,\n variant: n = Ce.variant,\n checked: e,\n onCheckedChange: r,\n disabled: s = !1,\n className: l,\n thumbClassName: c,\n backgroundClassNames: u,\n ...f\n}) {\n const d = K(), h = q(() => a || `toggle-${d}`, [a, d]), [m, v] = z(e);\n $(() => {\n v(e);\n }, [e]);\n const b = () => {\n if (!s) {\n const E = !m;\n e === void 0 && v(E), r == null || r(E);\n }\n }, p = (E) => {\n (E.key === \" \" || E.key === \"Enter\") && (E.preventDefault(), b());\n }, x = or[t], g = ar[n], w = N(\n // Base styles\n \"relative inline-flex items-center rounded-full transition-all duration-200 ease-in-out\",\n \"focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2\",\n // Size\n x.container,\n // Variant and state\n m ? (u == null ? void 0 : u.checked) || g.checked : (u == null ? void 0 : u.unchecked) || g.unchecked,\n // Disabled state\n s && \"opacity-50 cursor-not-allowed\",\n !s && \"cursor-pointer\",\n l\n ), y = N(\n // Base thumb styles\n \"absolute left-0.5 top-1/2 -translate-y-1/2 rounded-full bg-white shadow-sm transition-transform duration-200 ease-in-out\",\n // Size\n x.thumb,\n // Position based on state\n m && x.translate,\n c\n );\n return /* @__PURE__ */ k(\n \"button\",\n {\n ref: o,\n id: h,\n type: \"button\",\n role: \"switch\",\n tabIndex: 0,\n \"aria-checked\": m,\n \"aria-disabled\": s,\n disabled: s,\n onClick: b,\n onKeyDown: p,\n className: w,\n ...f,\n children: [\n /* @__PURE__ */ i(\"span\", { className: y }),\n /* @__PURE__ */ i(\"span\", { className: \"sr-only\", children: m ? \"Enabled\" : \"Disabled\" })\n ]\n }\n );\n}\nconst le = 8, ce = 4, U = 6;\nfunction sr(o) {\n return { calculatePosition: C(\n (t, n) => {\n const e = t.getBoundingClientRect(), r = n.getBoundingClientRect(), s = {\n width: window.innerWidth,\n height: window.innerHeight\n }, l = (h, m, v, b) => h < 0 || m < 0 || h + v > s.width || m + b > s.height, c = {\n top: {\n x: e.left + e.width / 2 - r.width / 2,\n y: e.top - r.height - ce,\n arrow: {\n x: r.width / 2 - U,\n y: r.height\n }\n },\n bottom: {\n x: e.left + e.width / 2 - r.width / 2,\n y: e.bottom + ce,\n arrow: {\n x: r.width / 2 - U,\n y: -6\n }\n },\n left: {\n x: e.left - r.width - ce,\n y: e.top + e.height / 2 - r.height / 2,\n arrow: {\n x: r.width,\n y: r.height / 2 - U\n }\n },\n right: {\n x: e.right + ce,\n y: e.top + e.height / 2 - r.height / 2,\n arrow: {\n x: -6,\n y: r.height / 2 - U\n }\n }\n };\n let u = o, f = c[o];\n if (l(f.x, f.y, r.width, r.height)) {\n const h = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\"\n }, m = c[h[o]];\n if (!l(m.x, m.y, r.width, r.height))\n u = h[o], f = m;\n else {\n const v = [\"top\", \"bottom\", \"left\", \"right\"].filter(\n (b) => b !== o && b !== h[o]\n );\n for (const b of v) {\n const p = c[b];\n if (!l(p.x, p.y, r.width, r.height)) {\n u = b, f = p;\n break;\n }\n }\n }\n }\n f.x = Math.max(\n le,\n Math.min(f.x, s.width - r.width - le)\n ), f.y = Math.max(\n le,\n Math.min(f.y, s.height - r.height - le)\n );\n const d = {\n x: e.left + e.width / 2,\n y: e.top + e.height / 2\n };\n return u === \"top\" || u === \"bottom\" ? f.arrow.x = Math.max(\n U,\n Math.min(d.x - f.x - U, r.width - U * 2)\n ) : f.arrow.y = Math.max(\n U,\n Math.min(d.y - f.y - U, r.height - U * 2)\n ), {\n ...f,\n placement: u\n };\n },\n [o]\n ) };\n}\nfunction ir(o, a, t) {\n const n = j(null), e = j(null), r = C(() => {\n if (!n.current || !e.current) return;\n const s = o(n.current, e.current);\n t(s);\n }, [o, t]);\n return $(() => {\n if (!a) return;\n const s = () => r();\n return window.addEventListener(\"resize\", s), () => {\n window.removeEventListener(\"resize\", s);\n };\n }, [a, r]), {\n triggerRef: n,\n tooltipRef: e,\n updatePosition: r\n };\n}\nfunction lr(o, a, t, n, e, r, s, l, c) {\n const u = j(null), f = C(() => {\n o || (u.current && clearTimeout(u.current), u.current = window.setTimeout(() => {\n t(!0), requestAnimationFrame(() => {\n e(), n(!0);\n });\n }, a));\n }, [o, a, t, e, n]), d = C(\n (h = !1) => {\n if (u.current && clearTimeout(u.current), h) {\n n(!1), setTimeout(() => t(!1), 150);\n return;\n }\n u.current = window.setTimeout(() => {\n n(!1), setTimeout(() => t(!1), 150);\n }, 100);\n },\n [n, t]\n );\n return $(() => {\n !r && !s && !l && c && d();\n }, [r, s, l, c, d]), $(() => () => {\n u.current && clearTimeout(u.current);\n }, []), {\n showTooltip: f,\n hideTooltip: d,\n timeoutRef: u\n };\n}\nfunction Zr({\n id: o,\n children: a,\n message: t,\n placement: n = \"top\",\n disabled: e = !1,\n delay: r = 200,\n className: s\n}) {\n const [l, c] = z(!1), [u, f] = z(!1), [d, h] = z(null), [m, v] = z(!1), [b, p] = z(!1), [x, g] = z(!1), { calculatePosition: w } = sr(n), { triggerRef: y, tooltipRef: E, updatePosition: I } = ir(w, u, h), { showTooltip: D, hideTooltip: A, timeoutRef: H } = lr(\n e,\n r,\n f,\n c,\n I,\n m,\n b,\n x,\n l\n ), L = K(), _ = o ?? L;\n return /* @__PURE__ */ k(Q, { children: [\n F.cloneElement(a, {\n ref: (W) => {\n y.current = W;\n },\n onMouseEnter: () => {\n v(!0), D();\n },\n onMouseLeave: () => {\n v(!1);\n },\n onFocus: () => {\n g(!0), D();\n },\n onBlur: () => {\n g(!1), A(!0);\n },\n onKeyDown: (W) => {\n W.key === \"Escape\" && A(!0);\n },\n \"aria-describedby\": e ? void 0 : _\n }),\n u && ae(\n /* @__PURE__ */ i(\n \"div\",\n {\n ref: E,\n id: _,\n role: \"tooltip\",\n className: N(\n \"fixed z-50 px-2 py-1 text-sm rounded shadow-lg bg-popover text-popover-foreground pointer-events-auto transition-all duration-150 ease-out\",\n l ? \"opacity-100\" : \"opacity-0\",\n s\n ),\n style: d ? { left: d.x, top: d.y } : { opacity: 0 },\n onMouseEnter: () => {\n p(!0), H.current && clearTimeout(H.current);\n },\n onMouseLeave: () => {\n p(!1);\n },\n children: t\n }\n ),\n document.body\n )\n ] });\n}\nexport {\n vr as Accordion,\n he as AccordionItem,\n Yr as ActionModal,\n nt as Button,\n gr as Callout,\n xr as Carousel,\n yr as Checkbox,\n wr as Clickable,\n Nr as Code,\n Er as CodeBlock,\n kr as Disclosure,\n Cr as Drawer,\n zr as Input,\n $r as Label,\n Oe as LoadingDots,\n Ar as Modal,\n Ir as Pagination,\n Sr as Panel,\n Dr as Popover,\n Tr as RadioGroup,\n be as RadioGroupItem,\n _t as RadioInput,\n Rr as ScrollArea,\n Lr as Select,\n jr as Separator,\n Vr as Skeleton,\n Mr as Slider,\n Br as Slot,\n Wr as Tabs,\n Fr as TabsContent,\n Kr as TabsList,\n Hr as TabsTrigger,\n Pr as Textarea,\n Ur as Toast,\n _r as Toggle,\n Zr as Tooltip\n};\n//# sourceMappingURL=components.esm.js.map\n","import { Modal, ModalProps } from '@moondreamsdev/dreamer-ui/components';\nimport React, { useMemo } from 'react';\n\ninterface BaseActionModalProps extends Omit<ModalProps, 'children' | 'actions'> {\n message: React.ReactNode;\n destructive?: boolean;\n}\n\ninterface AlertModalProps extends BaseActionModalProps {\n type: 'alert';\n confirmText?: string;\n onConfirm?: () => void;\n // Cancel-related props are not allowed for alerts\n cancelText?: never;\n}\n\ninterface ConfirmModalProps extends BaseActionModalProps {\n type: 'confirm';\n confirmText?: string;\n cancelText?: string;\n onConfirm?: () => void;\n}\n\nexport type ActionModalProps = AlertModalProps | ConfirmModalProps;\n\nexport function ActionModal({\n type,\n message,\n cancelText,\n confirmText,\n onConfirm,\n onClose,\n destructive = false,\n title,\n ...modalProps\n}: ActionModalProps) {\n const defaultTexts = useMemo(() => {\n if (type === 'confirm') {\n return {\n confirm: confirmText || 'Confirm',\n cancel: cancelText || 'Cancel',\n defaultTitle: title || 'Confirm Action',\n };\n }\n return {\n confirm: confirmText || 'OK',\n cancel: null,\n defaultTitle: title || 'Alert',\n };\n }, [type, confirmText, title, cancelText]);\n\n const actions: ModalProps['actions'] = useMemo(\n () => [\n ...(defaultTexts.cancel\n ? [\n {\n label: defaultTexts.cancel,\n variant: 'secondary' as const,\n onClick: onClose,\n },\n ]\n : []),\n {\n label: defaultTexts.confirm,\n variant: destructive ? 'destructive' : 'primary',\n onClick: () => {\n onConfirm?.();\n onClose();\n },\n },\n ],\n [defaultTexts, destructive, onConfirm, onClose]\n );\n\n return (\n <Modal\n {...modalProps}\n title={title || defaultTexts.defaultTitle}\n onClose={onClose}\n actions={actions}\n disableCloseOnOverlayClick={type === 'confirm'}\n hideCloseButton={type === 'confirm'}\n >\n {typeof message === 'string' ? <p className='text-sm'>{message}</p> : message}\n </Modal>\n );\n}\n","import { createContext, useContext } from 'react';\nimport { TabsVariant, TabsWidth } from './variants';\n\nexport interface TabsContextValue {\n selectedValue: string;\n onValueChange: (value: string) => void;\n tabsWidth: TabsWidth;\n variant: TabsVariant;\n triggersClassName?: string;\n contentClassName?: string;\n}\n\nexport const TabsContext = createContext<TabsContextValue | null>(null);\n\nexport const useTabsContext = () => {\n const context = useContext(TabsContext);\n if (!context) {\n throw new Error('Tabs components must be used within a Tabs component');\n }\n return context;\n};\n","import { ReactNode, useCallback, useEffect, useState } from 'react';\nimport { CrossCircled, ExclamationTriangle, InfoCircled, X } from '../../symbols';\nimport { join } from '../../utils';\nexport type ToastType = 'info' | 'warning' | 'error';\n\nexport interface ToastAction {\n label: string;\n onClick: () => void;\n}\n\n/** Data for a toast notification */\nexport interface ToastData {\n id: string;\n title: string;\n description?: string;\n type?: ToastType;\n action?: ToastAction;\n duration?: number;\n onRemove?: (id: string) => void;\n}\n\ninterface ToastProps extends ToastData {\n customTypes?: Record<string, { className: string; icon?: ReactNode }>;\n customComponent?: React.ComponentType<ToastData>;\n}\n\nconst defaultTypeStyles: Record<ToastType, { className: string; icon: ReactNode }> = {\n info: {\n className: 'bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100',\n icon: <InfoCircled size={20} />,\n },\n warning: {\n className:\n 'bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100',\n icon: <ExclamationTriangle size={20} />,\n },\n error: {\n className: 'bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100',\n icon: <CrossCircled size={20} />,\n },\n};\n\nexport function Toast({\n id,\n title,\n description,\n type = 'info',\n action,\n duration = 5000,\n onRemove,\n customTypes,\n customComponent: CustomComponent,\n}: ToastProps) {\n const [isExiting, setIsExiting] = useState(false);\n\n const handleRemove = useCallback(() => {\n setIsExiting(true);\n setTimeout(() => {\n onRemove?.(id);\n }, 150); // Match animation duration\n }, [id, onRemove]);\n\n useEffect(() => {\n if (duration > 0) {\n const timer = setTimeout(() => {\n handleRemove();\n }, duration);\n\n return () => clearTimeout(timer);\n }\n }, [duration, id, onRemove, handleRemove]);\n\n if (CustomComponent) {\n return (\n <CustomComponent\n id={id}\n title={title}\n description={description}\n type={type}\n action={action}\n duration={duration}\n onRemove={onRemove}\n />\n );\n }\n\n // Check custom types first, then fall back to default\n const typeStyle = customTypes?.[type] || defaultTypeStyles[type as ToastType] || defaultTypeStyles.info;\n\n return (\n <div\n role={type === 'error' ? 'alert' : 'status'}\n aria-live={type === 'error' ? undefined : 'polite'}\n className={join(\n 'relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out',\n action && 'pb-3',\n typeStyle.className,\n isExiting ? 'opacity-0 translate-x-full' : 'opacity-100 translate-x-0'\n )}\n >\n {/* Icon */}\n <div className='flex-shrink-0 mr-3'>{typeStyle.icon}</div>\n\n {/* Content */}\n <div className='flex-grow min-w-0'>\n <div className='font-medium text-sm leading-5'>{title}</div>\n {description && <div className='mt-1 text-sm opacity-90 leading-5'>{description}</div>}\n {action && (\n <div className='mt-1.5'>\n <button\n onClick={action.onClick}\n className='text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer'\n >\n {action.label}\n </button>\n </div>\n )}\n </div>\n\n {/* Close button */}\n <button\n onClick={handleRemove}\n className='flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0'\n >\n <X size={16} />\n </button>\n </div>\n );\n}\n"],"names":["n","t","s","h","C","l","i","e","N","Oe","o","a","z","$","et","tt","rt","pe","nt","r","c","u","d","k","Lt","jt","Vt","j","Ar","f","m","K","v","b","p","x","g","F","w","y","E","I","D","A","Q","ae","V","oe","ActionModal","type","message","cancelText","confirmText","onConfirm","onClose","destructive","title","modalProps","defaultTexts","useMemo","actions","jsx","Modal","TabsContext","createContext","useTabsContext","context","useContext","defaultTypeStyles","InfoCircled","ExclamationTriangle","CrossCircled","Toast","id","description","action","duration","onRemove","customTypes","CustomComponent","isExiting","setIsExiting","useState","handleRemove","useCallback","useEffect","timer","typeStyle","jsxs","join","X"],"mappings":";;;;;AAAA,SAASA,KAAKC,GAAG;AACf,SAAOA,EAAE,OAAO,CAACC,MAAM,OAAOA,KAAK,YAAYA,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM,KAAI;AACxE;ACgFA,SAASC,EAAE,EAAE,MAAMC,IAAI,IAAI,OAAOC,IAAI,gBAAgB,WAAWL,IAAI,UAAU,GAAGM,EAAC,GAAI;AACrF,SAAuBC,gBAAAA;AAAAA,IACrB;AAAA,IACA;AAAA,MACE,GAAGD;AAAA,MACH,OAAOF;AAAA,MACP,QAAQA;AAAA,MACR,WAAWJ;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,MACP,UAA0BO,gBAAAA;AAAAA,QACxB;AAAA,QACA;AAAA,UACE,GAAG;AAAA,UACH,MAAMF;AAAA,UACN,UAAU;AAAA,UACV,UAAU;AAAA,QACpB;AAAA,MACA;AAAA,IACA;AAAA,EACG;AACH;AClGA,SAASG,KAAK,GAAG;AACf,SAAO,EAAE,OAAO,CAAC,MAAM,OAAO,KAAK,YAAY,CAAC,EAAE,KAAK,GAAG,EAAE,KAAM,KAAI;AACxE;AA0BAD,EAAE,MAAM;AACRA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE,IAAI;AACNA,EAAE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