@versini/sassysaint 5.5.23 → 5.5.25

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,8 +1,8 @@
1
1
  import { jsxs as I, jsx as d, Fragment as yt } from "react/jsx-runtime";
2
- import { g as bt, ACTION_RESTORE as $r, ACTION_MESSAGE as xe, ROLE_ASSISTANT as we, ACTION_RESET as rr, ACTION_MODEL as ar, ACTION_STREAMING as nr, ACTION_SORT as Mr, ACTION_SEARCH as Dr, ACTION_RESET_PROMPT as or, ACTION_TOGGLE_PROMPT as sr, DEFAULT_AI_ENGINE as Se, P as ir, un as Me, ROLE_SYSTEM as Vr, ROLE_INTERNAL as vt, ROLE_HIDDEN as zr, STATS_SEPARATOR as Bt, CLIPBOARD_PROMPT as $t, TYPE_QUESTION as Ur, C as cr, SEND as Pr, ERROR_MESSAGE as Hr, ROLE_USER as nt, L as Fr, j as Gr, isLastMessageFromRole as Wr, getMessageContaintWrapperClass as jr, Logo as qr, getMainPaddingClass as Mt, r as Kr, LOCAL_STORAGE_PREFIX as Dt, LOCAL_STORAGE_SEARCH as Jr, LOCAL_STORAGE_SORT as Yr } from "./index.-EILV3b7.js";
2
+ import { g as bt, ACTION_RESTORE as Vr, ACTION_MESSAGE as xe, ROLE_ASSISTANT as we, ACTION_RESET as ar, ACTION_MODEL as nr, ACTION_STREAMING as or, ACTION_SORT as zr, ACTION_SEARCH as Pr, ACTION_RESET_PROMPT as sr, ACTION_TOGGLE_PROMPT as ir, DEFAULT_AI_ENGINE as Se, P as cr, un as Me, ROLE_SYSTEM as Ur, ROLE_INTERNAL as vt, ROLE_HIDDEN as Hr, STATS_SEPARATOR as $t, CLIPBOARD_PROMPT as Mt, TYPE_QUESTION as Fr, C as lr, SEND as Gr, ERROR_MESSAGE as Wr, ROLE_USER as nt, L as jr, j as qr, isLastMessageFromRole as Kr, getMessageContaintWrapperClass as Jr, Logo as Yr, getMainPaddingClass as Dt, r as Xr, LOCAL_STORAGE_PREFIX as Vt, LOCAL_STORAGE_SEARCH as Qr, LOCAL_STORAGE_SORT as Zr } from "./index.DBAc9xii.js";
3
3
  import c from "clsx";
4
- import $, { useRef as S, useEffect as L, useCallback as Z, useSyncExternalStore as Xr, useState as G, useMemo as De, useContext as P, useLayoutEffect as fe, useId as Qr, useReducer as Be, createContext as Zr, useDebugValue as ea, lazy as lr, Suspense as ot } from "react";
5
- const ta = ({
4
+ import $, { useRef as S, useEffect as L, useCallback as Z, useSyncExternalStore as ea, useState as G, useMemo as De, useContext as U, createContext as ta, useLayoutEffect as fe, useDebugValue as ra, useId as aa, useReducer as Be, lazy as dr, Suspense as ot } from "react";
5
+ const na = ({
6
6
  className: e,
7
7
  viewBox: t,
8
8
  title: r,
@@ -28,7 +28,7 @@ const ta = ({
28
28
  )
29
29
  ]
30
30
  }
31
- ), ra = ({
31
+ ), oa = ({
32
32
  className: e,
33
33
  viewBox: t,
34
34
  title: r,
@@ -45,7 +45,7 @@ const ta = ({
45
45
  ...n,
46
46
  children: /* @__PURE__ */ d("path", { d: "M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z" })
47
47
  }
48
- ), aa = ({
48
+ ), sa = ({
49
49
  className: e,
50
50
  viewBox: t,
51
51
  title: r,
@@ -64,19 +64,19 @@ const ta = ({
64
64
  }
65
65
  );
66
66
  /*!
67
- @versini/ui-header v3.0.0
67
+ @versini/ui-header v3.0.1
68
68
  © 2025 gizmette.com
69
69
  */
70
70
  try {
71
71
  window.__VERSINI_UI_HEADER__ || (window.__VERSINI_UI_HEADER__ = {
72
- version: "3.0.0",
73
- buildTime: "01/03/2025 10:45 AM EST",
72
+ version: "3.0.1",
73
+ buildTime: "01/06/2025 08:00 PM EST",
74
74
  homepage: "https://github.com/aversini/ui-components",
75
75
  license: "MIT"
76
76
  });
77
77
  } catch {
78
78
  }
79
- const na = "av-header", oa = ({
79
+ const ia = "av-header", ca = ({
80
80
  children: e,
81
81
  className: t,
82
82
  raw: r = !1,
@@ -88,7 +88,7 @@ const na = "av-header", oa = ({
88
88
  noPadding: l = !1
89
89
  }) => {
90
90
  const h = c(
91
- na,
91
+ ia,
92
92
  {
93
93
  "border-border-accent": a === "dark" && !r && !n && !s,
94
94
  "border-border-medium": a === "light" && !r && !n && !s,
@@ -110,7 +110,7 @@ const na = "av-header", oa = ({
110
110
  });
111
111
  return /* @__PURE__ */ d("header", { className: h, children: /* @__PURE__ */ d("div", { className: f, children: e }) });
112
112
  };
113
- function sa(e) {
113
+ function la(e) {
114
114
  const t = e.toLowerCase().split("+").map((o) => o.trim()), r = {
115
115
  alt: t.includes("alt"),
116
116
  ctrl: t.includes("ctrl"),
@@ -123,8 +123,8 @@ function sa(e) {
123
123
  key: n
124
124
  };
125
125
  }
126
- function ia(e, t) {
127
- const { alt: r, ctrl: a, meta: n, mod: o, shift: s, key: i } = e, { altKey: l, ctrlKey: h, metaKey: f, shiftKey: g, key: u } = t;
126
+ function da(e, t) {
127
+ const { alt: r, ctrl: a, meta: n, mod: o, shift: s, key: i } = e, { altKey: l, ctrlKey: h, metaKey: f, shiftKey: m, key: u } = t;
128
128
  if (r !== l)
129
129
  return !1;
130
130
  if (o) {
@@ -132,45 +132,45 @@ function ia(e, t) {
132
132
  return !1;
133
133
  } else if (a !== h || n !== f)
134
134
  return !1;
135
- return s !== g ? !1 : !!(i && (u.toLowerCase() === i.toLowerCase() || t.code.replace("Key", "").toLowerCase() === i.toLowerCase()));
135
+ return s !== m ? !1 : !!(i && (u.toLowerCase() === i.toLowerCase() || t.code.replace("Key", "").toLowerCase() === i.toLowerCase()));
136
136
  }
137
- function ca(e) {
138
- return (t) => ia(sa(e), t);
137
+ function ua(e) {
138
+ return (t) => da(la(e), t);
139
139
  }
140
- function la(e) {
140
+ function ma(e) {
141
141
  return (t) => {
142
142
  const r = "nativeEvent" in t ? t.nativeEvent : t;
143
143
  e.forEach(([a, n, o = { preventDefault: !0 }]) => {
144
- ca(a)(r) && (o.preventDefault && t.preventDefault(), n(r));
144
+ ua(a)(r) && (o.preventDefault && t.preventDefault(), n(r));
145
145
  });
146
146
  };
147
147
  }
148
- function da() {
148
+ function ga() {
149
149
  const e = S(!1);
150
150
  return L(() => (e.current = !0, () => {
151
151
  e.current = !1;
152
152
  }), []), Z(() => e.current, []);
153
153
  }
154
- function dr(e, t) {
154
+ function ur(e, t) {
155
155
  window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: t }));
156
156
  }
157
- const Vt = (e, t) => {
157
+ const zt = (e, t) => {
158
158
  const r = JSON.stringify(
159
159
  typeof t == "function" ? t() : t
160
160
  );
161
- window.localStorage.setItem(e, r), dr(e, r);
162
- }, ua = (e) => {
163
- window.localStorage.removeItem(e), dr(e, null);
164
- }, zt = (e) => window.localStorage.getItem(e), ma = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
161
+ window.localStorage.setItem(e, r), ur(e, r);
162
+ }, ha = (e) => {
163
+ window.localStorage.removeItem(e), ur(e, null);
164
+ }, Pt = (e) => window.localStorage.getItem(e), fa = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
165
165
  function Ut({
166
166
  key: e,
167
167
  initialValue: t
168
168
  }) {
169
- const r = Xr(ma, () => zt(e)), a = Z(
169
+ const r = ea(fa, () => Pt(e)), a = Z(
170
170
  (s) => {
171
171
  try {
172
172
  const i = typeof s == "function" ? s(JSON.parse(r)) : s;
173
- i == null ? ua(e) : Vt(e, i);
173
+ i == null ? ha(e) : zt(e, i);
174
174
  } catch (i) {
175
175
  console.warn(i);
176
176
  }
@@ -183,13 +183,13 @@ function Ut({
183
183
  }, [a]);
184
184
  return L(() => {
185
185
  try {
186
- zt(e) === null && typeof t < "u" && Vt(e, t);
186
+ Pt(e) === null && typeof t < "u" && zt(e, t);
187
187
  } catch (s) {
188
188
  console.warn(s);
189
189
  }
190
190
  }, [e, t]), [r ? JSON.parse(r) : null, a, n, o];
191
191
  }
192
- const ga = {
192
+ const pa = {
193
193
  x: 0,
194
194
  y: 0,
195
195
  width: 0,
@@ -199,8 +199,8 @@ const ga = {
199
199
  bottom: 0,
200
200
  right: 0
201
201
  };
202
- function ha(e) {
203
- const t = da(), r = S(0), a = S(null), [n, o] = G(ga), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
202
+ function ya(e) {
203
+ const t = ga(), r = S(0), a = S(null), [n, o] = G(pa), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
204
204
  const l = i[0];
205
205
  l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
206
206
  a.current && t() && o(l.contentRect);
@@ -211,13 +211,13 @@ function ha(e) {
211
211
  }), [s, e]), [a, n];
212
212
  }
213
213
  /*!
214
- @versini/ui-table v3.0.4
214
+ @versini/ui-table v3.0.5
215
215
  © 2025 gizmette.com
216
216
  */
217
217
  try {
218
218
  window.__VERSINI_UI_TABLE__ || (window.__VERSINI_UI_TABLE__ = {
219
- version: "3.0.4",
220
- buildTime: "01/04/2025 04:09 PM EST",
219
+ version: "3.0.5",
220
+ buildTime: "01/06/2025 08:01 PM EST",
221
221
  homepage: "https://github.com/aversini/ui-components",
222
222
  license: "MIT"
223
223
  });
@@ -226,7 +226,7 @@ try {
226
226
  const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
227
227
  ASC: "asc",
228
228
  DESC: "desc"
229
- }, fa = ({
229
+ }, ba = ({
230
230
  mode: e,
231
231
  className: t,
232
232
  wrapperClassName: r,
@@ -261,7 +261,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
261
261
  "text-copy-light dark:text-copy-dark": e === "system",
262
262
  "text-copy-dark dark:text-copy-light": e === "alt-system"
263
263
  })
264
- }), pa = ({
264
+ }), va = ({
265
265
  className: e,
266
266
  stickyHeader: t,
267
267
  mode: r
@@ -274,7 +274,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
274
274
  "shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": t && r === "alt-system"
275
275
  },
276
276
  e
277
- ), ya = ({
277
+ ), ka = ({
278
278
  className: e,
279
279
  stickyFooter: t,
280
280
  mode: r
@@ -287,7 +287,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
287
287
  "shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": t && r === "alt-system"
288
288
  },
289
289
  e
290
- ), ba = ({
290
+ ), _a = ({
291
291
  mode: e,
292
292
  className: t,
293
293
  cellWrapper: r
@@ -312,7 +312,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
312
312
  "odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": r === ye && e === "alt-system"
313
313
  },
314
314
  t
315
- ), va = ({
315
+ ), Ea = ({
316
316
  cellWrapper: e,
317
317
  className: t,
318
318
  compact: r,
@@ -336,9 +336,9 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
336
336
  },
337
337
  t
338
338
  )
339
- }), ka = ({
339
+ }), xa = ({
340
340
  buttonClassName: e
341
- }) => c("rounded-none text-sm", e), Pt = "av-button", _t = "icon", ur = "button", st = "link", _a = ({
341
+ }) => c("rounded-none text-sm", e), Ht = "av-button", _t = "icon", mr = "button", st = "link", wa = ({
342
342
  type: e,
343
343
  size: t,
344
344
  labelRight: r,
@@ -347,7 +347,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
347
347
  }) => {
348
348
  const o = "max-h-8 py-0 px-2", s = "max-h-9 py-1 px-3", i = "max-h-12 py-2 px-4";
349
349
  switch (e) {
350
- case ur:
350
+ case mr:
351
351
  case st:
352
352
  return c({
353
353
  [o]: t === "small",
@@ -367,7 +367,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
367
367
  "h-12 px-4": t === "large" && (r || a)
368
368
  });
369
369
  }
370
- }, Ea = ({
370
+ }, Sa = ({
371
371
  type: e,
372
372
  size: t,
373
373
  labelRight: r,
@@ -375,7 +375,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
375
375
  }) => {
376
376
  const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
377
377
  switch (e) {
378
- case ur:
378
+ case mr:
379
379
  case st:
380
380
  return c({
381
381
  "text-center": e === st,
@@ -390,7 +390,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
390
390
  [s]: t === "large" && (r || a)
391
391
  });
392
392
  }
393
- }, xa = ({
393
+ }, Ta = ({
394
394
  mode: e,
395
395
  noBackground: t,
396
396
  noTruncate: r,
@@ -426,7 +426,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
426
426
  return c("not-prose text-copy-lighter", {
427
427
  truncate: !r
428
428
  });
429
- }, wa = ({
429
+ }, Na = ({
430
430
  mode: e,
431
431
  noBackground: t,
432
432
  variant: r
@@ -456,13 +456,13 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
456
456
  if (r === "selected")
457
457
  return "bg-action-selected-dark";
458
458
  }
459
- }, Sa = ({
459
+ }, Ra = ({
460
460
  radius: e
461
461
  }) => c({
462
462
  "rounded-full": e === "large",
463
463
  "rounded-md": e === "medium",
464
464
  "rounded-sm": e === "small"
465
- }), Ta = ({
465
+ }), Ca = ({
466
466
  mode: e,
467
467
  disabled: t,
468
468
  variant: r
@@ -492,7 +492,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
492
492
  });
493
493
  if (r === "selected")
494
494
  return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
495
- }, Na = ({
495
+ }, Ia = ({
496
496
  mode: e,
497
497
  disabled: t,
498
498
  variant: r
@@ -522,7 +522,7 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
522
522
  });
523
523
  if (r === "selected")
524
524
  return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
525
- }, Ra = ({
525
+ }, Aa = ({
526
526
  mode: e,
527
527
  noBorder: t,
528
528
  variant: r
@@ -552,14 +552,14 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
552
552
  });
553
553
  if (r === "selected")
554
554
  return "border border-border-selected-dark";
555
- }, Ca = ({
555
+ }, Oa = ({
556
556
  focusMode: e
557
557
  }) => c("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
558
558
  "focus:outline-focus-dark": e === "dark",
559
559
  "focus:outline-focus-light": e === "light",
560
560
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
561
561
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
562
- }), Ia = ({
562
+ }), La = ({
563
563
  type: e,
564
564
  className: t,
565
565
  raw: r,
@@ -571,69 +571,69 @@ const Ve = "thead", kt = "tfoot", ye = "tbody", Ee = {
571
571
  noBorder: l,
572
572
  labelRight: h,
573
573
  labelLeft: f,
574
- noBackground: g,
574
+ noBackground: m,
575
575
  variant: u,
576
- noTruncate: m,
577
- align: y,
576
+ noTruncate: g,
577
+ align: p,
578
578
  radius: b
579
- }) => (u || (u = "primary"), r ? c(Pt, t) : c(
580
- Pt,
581
- xa({
579
+ }) => (u || (u = "primary"), r ? c(Ht, t) : c(
580
+ Ht,
581
+ Ta({
582
582
  mode: a,
583
583
  variant: u,
584
- noBackground: g,
585
- noTruncate: m
584
+ noBackground: m,
585
+ noTruncate: g
586
586
  }),
587
- wa({ mode: a, noBackground: g, variant: u }),
588
- Sa({ radius: b }),
589
- _a({
587
+ Na({ mode: a, noBackground: m, variant: u }),
588
+ Ra({ radius: b }),
589
+ wa({
590
590
  type: e,
591
591
  size: i,
592
592
  labelRight: h,
593
593
  labelLeft: f,
594
- align: y
594
+ align: p
595
595
  }),
596
- Ea({ type: e, size: i, labelRight: h, labelLeft: f }),
597
- Ra({ mode: a, variant: u, noBorder: l }),
598
- Ca({ focusMode: n }),
599
- Ta({ mode: a, variant: u, disabled: o }),
600
- Na({ mode: a, variant: u, disabled: o }),
596
+ Sa({ type: e, size: i, labelRight: h, labelLeft: f }),
597
+ Aa({ mode: a, variant: u, noBorder: l }),
598
+ Oa({ focusMode: n }),
599
+ Ca({ mode: a, variant: u, disabled: o }),
600
+ Ia({ mode: a, variant: u, disabled: o }),
601
601
  {
602
602
  "w-full": s,
603
603
  "disabled:cursor-not-allowed disabled:opacity-50": o
604
604
  },
605
605
  t
606
- )), Aa = (e, t, r) => {
606
+ )), Ba = (e, t, r) => {
607
607
  var a;
608
608
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
609
- }, mr = $.forwardRef((e, t) => {
609
+ }, gr = $.forwardRef((e, t) => {
610
610
  const { onClick: r, noInternalClick: a = !1, ...n } = e;
611
611
  return /* @__PURE__ */ d(
612
612
  "button",
613
613
  {
614
614
  ref: t,
615
615
  onClick: (o) => {
616
- Aa(o, a, r);
616
+ Ba(o, a, r);
617
617
  },
618
618
  ...n
619
619
  }
620
620
  );
621
621
  });
622
- mr.displayName = "BaseButton";
622
+ gr.displayName = "BaseButton";
623
623
  /*!
624
- @versini/ui-button v4.0.3
624
+ @versini/ui-button v4.0.4
625
625
  © 2025 gizmette.com
626
626
  */
627
627
  try {
628
628
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
629
- version: "4.0.3",
630
- buildTime: "01/04/2025 04:09 PM EST",
629
+ version: "4.0.4",
630
+ buildTime: "01/06/2025 08:01 PM EST",
631
631
  homepage: "https://github.com/aversini/ui-components",
632
632
  license: "MIT"
633
633
  });
634
634
  } catch {
635
635
  }
636
- const gr = $.forwardRef(
636
+ const hr = $.forwardRef(
637
637
  ({
638
638
  children: e,
639
639
  disabled: t = !1,
@@ -646,16 +646,16 @@ const gr = $.forwardRef(
646
646
  noBorder: l = !1,
647
647
  "aria-label": h,
648
648
  label: f,
649
- size: g = "medium",
649
+ size: m = "medium",
650
650
  labelRight: u,
651
- labelLeft: m,
652
- noBackground: y = !1,
651
+ labelLeft: g,
652
+ noBackground: p = !1,
653
653
  align: b = "center",
654
654
  active: k = !1,
655
- radius: p = "large",
655
+ radius: y = "large",
656
656
  ...N
657
657
  }, A) => {
658
- const R = Ia({
658
+ const R = La({
659
659
  type: _t,
660
660
  mode: r,
661
661
  focusMode: a,
@@ -664,12 +664,12 @@ const gr = $.forwardRef(
664
664
  raw: i,
665
665
  className: o,
666
666
  noBorder: l,
667
- size: g,
667
+ size: m,
668
668
  labelRight: u,
669
- labelLeft: m,
670
- noBackground: y,
669
+ labelLeft: g,
670
+ noBackground: p,
671
671
  align: b,
672
- radius: p
672
+ radius: y
673
673
  }), E = c({
674
674
  "text-copy-accent-dark": r === "light" && !i,
675
675
  "text-copy-light": r === "dark" && !i,
@@ -693,7 +693,7 @@ const gr = $.forwardRef(
693
693
  }
694
694
  ) : "";
695
695
  return /* @__PURE__ */ d("div", { className: C, children: /* @__PURE__ */ I(
696
- mr,
696
+ gr,
697
697
  {
698
698
  ref: A,
699
699
  className: R,
@@ -702,7 +702,7 @@ const gr = $.forwardRef(
702
702
  "aria-label": h || f,
703
703
  ...N,
704
704
  children: [
705
- m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
705
+ g && /* @__PURE__ */ d("span", { className: "pr-2", children: g }),
706
706
  /* @__PURE__ */ d("div", { className: E, children: e }),
707
707
  u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
708
708
  ]
@@ -710,7 +710,7 @@ const gr = $.forwardRef(
710
710
  ) });
711
711
  }
712
712
  );
713
- gr.displayName = "ButtonSort";
713
+ hr.displayName = "ButtonSort";
714
714
  const Et = ({
715
715
  children: e,
716
716
  fill: t,
@@ -742,19 +742,19 @@ const Et = ({
742
742
  ] });
743
743
  };
744
744
  /*!
745
- @versini/ui-svgicon v4.0.0
745
+ @versini/ui-svgicon v4.0.1
746
746
  © 2025 gizmette.com
747
747
  */
748
748
  try {
749
749
  window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
750
- version: "4.0.0",
751
- buildTime: "01/04/2025 04:09 PM EST",
750
+ version: "4.0.1",
751
+ buildTime: "01/06/2025 08:00 PM EST",
752
752
  homepage: "https://github.com/aversini/ui-components",
753
753
  license: "MIT"
754
754
  });
755
755
  } catch {
756
756
  }
757
- const Oa = ({
757
+ const $a = ({
758
758
  className: e,
759
759
  viewBox: t,
760
760
  title: r,
@@ -787,7 +787,7 @@ const Oa = ({
787
787
  )
788
788
  ]
789
789
  }
790
- ), La = ({
790
+ ), Ma = ({
791
791
  className: e,
792
792
  viewBox: t,
793
793
  title: r,
@@ -820,7 +820,7 @@ const Oa = ({
820
820
  )
821
821
  ]
822
822
  }
823
- ), Ba = ({
823
+ ), Da = ({
824
824
  className: e,
825
825
  viewBox: t,
826
826
  title: r,
@@ -855,13 +855,13 @@ const Oa = ({
855
855
  }
856
856
  );
857
857
  /*!
858
- @versini/ui-icons v4.2.0
858
+ @versini/ui-icons v4.2.1
859
859
  © 2025 gizmette.com
860
860
  */
861
861
  try {
862
862
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
863
- version: "4.2.0",
864
- buildTime: "01/04/2025 04:09 PM EST",
863
+ version: "4.2.1",
864
+ buildTime: "01/06/2025 08:00 PM EST",
865
865
  homepage: "https://github.com/aversini/ui-components",
866
866
  license: "MIT"
867
867
  });
@@ -873,7 +873,7 @@ const be = $.createContext({
873
873
  stickyHeader: !1,
874
874
  stickyFooter: !1,
875
875
  compact: !1
876
- }), Wo = ({
876
+ }), Ko = ({
877
877
  children: e,
878
878
  mode: t = "system",
879
879
  caption: r,
@@ -886,7 +886,7 @@ const be = $.createContext({
886
886
  stickyFooter: h,
887
887
  ...f
888
888
  }) => {
889
- const g = fa({
889
+ const m = ba({
890
890
  mode: t,
891
891
  className: o,
892
892
  wrapperClassName: s,
@@ -900,66 +900,66 @@ const be = $.createContext({
900
900
  children: /* @__PURE__ */ d(
901
901
  "div",
902
902
  {
903
- className: g.wrapper,
903
+ className: m.wrapper,
904
904
  ...i && {
905
905
  style: { maxHeight: i }
906
906
  },
907
- children: /* @__PURE__ */ I("table", { className: g.table, summary: n, ...f, children: [
908
- r && /* @__PURE__ */ d("caption", { className: g.caption, children: r }),
907
+ children: /* @__PURE__ */ I("table", { className: m.table, summary: n, ...f, children: [
908
+ r && /* @__PURE__ */ d("caption", { className: m.caption, children: r }),
909
909
  e
910
910
  ] })
911
911
  }
912
912
  )
913
913
  }
914
914
  );
915
- }, jo = ({
915
+ }, Jo = ({
916
916
  children: e,
917
917
  className: t,
918
918
  ...r
919
919
  }) => {
920
- const a = P(be);
920
+ const a = U(be);
921
921
  a.cellWrapper = Ve;
922
- const n = pa({
922
+ const n = va({
923
923
  className: t,
924
924
  mode: a.mode,
925
925
  stickyHeader: a.stickyHeader
926
926
  });
927
927
  return /* @__PURE__ */ d("thead", { className: n, ...r, children: e });
928
- }, qo = ({
928
+ }, Yo = ({
929
929
  children: e,
930
930
  className: t,
931
931
  ...r
932
932
  }) => {
933
- const a = P(be);
933
+ const a = U(be);
934
934
  a.cellWrapper = kt;
935
- const n = ya({
935
+ const n = ka({
936
936
  className: t,
937
937
  mode: a.mode,
938
938
  stickyFooter: a.stickyFooter
939
939
  });
940
940
  return /* @__PURE__ */ d("tfoot", { className: n, ...r, children: e });
941
- }, Ko = ({ children: e, ...t }) => {
942
- const r = P(be);
941
+ }, Xo = ({ children: e, ...t }) => {
942
+ const r = U(be);
943
943
  return r.cellWrapper = ye, /* @__PURE__ */ d("tbody", { ...t, children: e });
944
- }, Jo = ({
944
+ }, Qo = ({
945
945
  children: e,
946
946
  className: t,
947
947
  ...r
948
948
  }) => {
949
- const a = P(be), n = ba({
949
+ const a = U(be), n = _a({
950
950
  mode: a.mode,
951
951
  cellWrapper: a.cellWrapper,
952
952
  className: t
953
953
  });
954
954
  return /* @__PURE__ */ d("tr", { className: n, ...r, children: e });
955
- }, $a = ({
955
+ }, Va = ({
956
956
  children: e,
957
957
  component: t,
958
958
  className: r,
959
959
  align: a,
960
960
  ...n
961
961
  }) => {
962
- const o = P(be), s = t || (o.cellWrapper === Ve ? "th" : "td"), { mainClasses: i, alignClasses: l } = va({
962
+ const o = U(be), s = t || (o.cellWrapper === Ve ? "th" : "td"), { mainClasses: i, alignClasses: l } = Ea({
963
963
  cellWrapper: o.cellWrapper,
964
964
  className: r,
965
965
  mode: o.mode,
@@ -967,7 +967,7 @@ const be = $.createContext({
967
967
  align: a
968
968
  });
969
969
  return a ? /* @__PURE__ */ d(s, { className: i, ...n, children: /* @__PURE__ */ d("div", { className: l, children: e }) }) : /* @__PURE__ */ d(s, { className: i, ...n, children: e });
970
- }, Yo = ({
970
+ }, Zo = ({
971
971
  align: e,
972
972
  children: t,
973
973
  buttonClassName: r,
@@ -979,19 +979,19 @@ const be = $.createContext({
979
979
  sortDirection: l,
980
980
  sortedCell: h,
981
981
  cellId: f,
982
- ...g
982
+ ...m
983
983
  }) => {
984
- const u = ka({ buttonClassName: r });
984
+ const u = xa({ buttonClassName: r });
985
985
  return /* @__PURE__ */ d(
986
- $a,
986
+ Va,
987
987
  {
988
988
  component: n,
989
989
  className: a,
990
990
  role: "columnheader",
991
991
  "aria-sort": l === Ee.ASC && h === f ? "ascending" : l === Ee.DESC && h === f ? "descending" : "other",
992
- ...g,
992
+ ...m,
993
993
  children: /* @__PURE__ */ d(
994
- gr,
994
+ hr,
995
995
  {
996
996
  active: h === f,
997
997
  className: u,
@@ -1002,7 +1002,7 @@ const be = $.createContext({
1002
1002
  mode: s,
1003
1003
  fullWidth: !0,
1004
1004
  labelRight: t,
1005
- children: l === Ee.ASC && h === f ? /* @__PURE__ */ d(Ba, { className: "size-4", monotone: !0 }) : l === Ee.DESC && h === f ? /* @__PURE__ */ d(La, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ d(Oa, { className: "size-4", monotone: !0 })
1005
+ children: l === Ee.ASC && h === f ? /* @__PURE__ */ d(Da, { className: "size-4", monotone: !0 }) : l === Ee.DESC && h === f ? /* @__PURE__ */ d(Ma, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ d($a, { className: "size-4", monotone: !0 })
1006
1006
  }
1007
1007
  )
1008
1008
  }
@@ -1010,29 +1010,32 @@ const be = $.createContext({
1010
1010
  }, D = [];
1011
1011
  for (let e = 0; e < 256; ++e)
1012
1012
  D.push((e + 256).toString(16).slice(1));
1013
- function Ma(e, t = 0) {
1013
+ function za(e, t = 0) {
1014
1014
  return (D[e[t + 0]] + D[e[t + 1]] + D[e[t + 2]] + D[e[t + 3]] + "-" + D[e[t + 4]] + D[e[t + 5]] + "-" + D[e[t + 6]] + D[e[t + 7]] + "-" + D[e[t + 8]] + D[e[t + 9]] + "-" + D[e[t + 10]] + D[e[t + 11]] + D[e[t + 12]] + D[e[t + 13]] + D[e[t + 14]] + D[e[t + 15]]).toLowerCase();
1015
1015
  }
1016
1016
  let Ke;
1017
- const Da = new Uint8Array(16);
1018
- function Va() {
1017
+ const Pa = new Uint8Array(16);
1018
+ function Ua() {
1019
1019
  if (!Ke) {
1020
1020
  if (typeof crypto > "u" || !crypto.getRandomValues)
1021
1021
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1022
1022
  Ke = crypto.getRandomValues.bind(crypto);
1023
1023
  }
1024
- return Ke(Da);
1024
+ return Ke(Pa);
1025
1025
  }
1026
- const za = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ht = { randomUUID: za };
1026
+ const Ha = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ft = { randomUUID: Ha };
1027
1027
  function xt(e, t, r) {
1028
- if (Ht.randomUUID && !t && !e)
1029
- return Ht.randomUUID();
1028
+ var n;
1029
+ if (Ft.randomUUID && !t && !e)
1030
+ return Ft.randomUUID();
1030
1031
  e = e || {};
1031
- const a = e.random || (e.rng || Va)();
1032
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ma(a);
1032
+ const a = e.random ?? ((n = e.rng) == null ? void 0 : n.call(e)) ?? Ua();
1033
+ if (a.length < 16)
1034
+ throw new Error("Random bytes length must be >= 16");
1035
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, za(a);
1033
1036
  }
1034
- const Ua = (e, t) => {
1035
- if ((t == null ? void 0 : t.type) === $r) {
1037
+ const Fa = (e, t) => {
1038
+ if ((t == null ? void 0 : t.type) === Vr) {
1036
1039
  const r = t.payload.messages.map((a) => ({
1037
1040
  message: {
1038
1041
  role: a.role,
@@ -1066,7 +1069,7 @@ const Ua = (e, t) => {
1066
1069
  (h) => h.message.messageId === s
1067
1070
  );
1068
1071
  if (l !== -1) {
1069
- const h = e.messages.map((f, g) => g === l ? {
1072
+ const h = e.messages.map((f, m) => m === l ? {
1070
1073
  message: {
1071
1074
  ...f.message,
1072
1075
  content: `${f.message.content}${a}`,
@@ -1101,7 +1104,7 @@ const Ua = (e, t) => {
1101
1104
  };
1102
1105
  }
1103
1106
  }
1104
- return (t == null ? void 0 : t.type) === rr ? {
1107
+ return (t == null ? void 0 : t.type) === ar ? {
1105
1108
  id: xt(),
1106
1109
  model: e.model,
1107
1110
  engine: e.engine,
@@ -1109,7 +1112,7 @@ const Ua = (e, t) => {
1109
1112
  messages: [],
1110
1113
  isComponent: e.isComponent,
1111
1114
  prompts: e.prompts
1112
- } : (t == null ? void 0 : t.type) === ar ? {
1115
+ } : (t == null ? void 0 : t.type) === nr ? {
1113
1116
  id: e.id,
1114
1117
  model: t.payload.model,
1115
1118
  engine: e.engine,
@@ -1117,19 +1120,19 @@ const Ua = (e, t) => {
1117
1120
  usage: t.payload.usage,
1118
1121
  messages: e.messages,
1119
1122
  isComponent: e.isComponent
1120
- } : (t == null ? void 0 : t.type) === nr ? {
1123
+ } : (t == null ? void 0 : t.type) === or ? {
1121
1124
  ...e,
1122
1125
  streaming: t.payload.streaming
1123
1126
  } : e;
1124
- }, Pa = (e, t) => {
1127
+ }, Ga = (e, t) => {
1125
1128
  switch (t == null ? void 0 : t.type) {
1126
- case Dr:
1129
+ case Pr:
1127
1130
  return {
1128
1131
  searchString: t.payload.searchString,
1129
1132
  sortedCell: e.sortedCell,
1130
1133
  sortDirection: e.sortDirection
1131
1134
  };
1132
- case Mr:
1135
+ case zr:
1133
1136
  return {
1134
1137
  searchString: e.searchString,
1135
1138
  sortedCell: t.payload.sortedCell,
@@ -1138,575 +1141,657 @@ const Ua = (e, t) => {
1138
1141
  default:
1139
1142
  return e;
1140
1143
  }
1141
- }, Ha = (e, t) => {
1144
+ }, Wa = (e, t) => {
1142
1145
  switch (t == null ? void 0 : t.type) {
1143
- case sr:
1146
+ case ir:
1144
1147
  return {
1145
1148
  prompt: t.payload.prompt
1146
1149
  };
1147
- case or:
1150
+ case sr:
1148
1151
  return {
1149
1152
  prompt: ""
1150
1153
  };
1151
1154
  default:
1152
1155
  return e;
1153
1156
  }
1154
- }, ve = $.createContext({
1155
- state: {
1156
- id: "",
1157
- model: Se,
1158
- engine: Se,
1159
- usage: 0,
1160
- messages: [],
1161
- isComponent: !1,
1162
- prompts: []
1163
- },
1164
- dispatch: () => {
1165
- },
1166
- serverStats: {
1167
- version: "",
1168
- models: [],
1169
- plugins: [],
1170
- engines: []
1157
+ };
1158
+ var Ae = { exports: {} }, Je = {};
1159
+ /**
1160
+ * @license React
1161
+ * use-sync-external-store-shim.production.js
1162
+ *
1163
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1164
+ *
1165
+ * This source code is licensed under the MIT license found in the
1166
+ * LICENSE file in the root directory of this source tree.
1167
+ */
1168
+ var Gt;
1169
+ function ja() {
1170
+ if (Gt) return Je;
1171
+ Gt = 1;
1172
+ var e = $;
1173
+ function t(m, u) {
1174
+ return m === u && (m !== 0 || 1 / m === 1 / u) || m !== m && u !== u;
1171
1175
  }
1172
- }), Fa = $.createContext({
1173
- state: { searchString: "", sortedCell: "", sortDirection: "" },
1174
- dispatch: () => {
1176
+ var r = typeof Object.is == "function" ? Object.is : t, a = e.useState, n = e.useEffect, o = e.useLayoutEffect, s = e.useDebugValue;
1177
+ function i(m, u) {
1178
+ var g = u(), p = a({ inst: { value: g, getSnapshot: u } }), b = p[0].inst, k = p[1];
1179
+ return o(
1180
+ function() {
1181
+ b.value = g, b.getSnapshot = u, l(b) && k({ inst: b });
1182
+ },
1183
+ [m, g, u]
1184
+ ), n(
1185
+ function() {
1186
+ return l(b) && k({ inst: b }), m(function() {
1187
+ l(b) && k({ inst: b });
1188
+ });
1189
+ },
1190
+ [m]
1191
+ ), s(g), g;
1175
1192
  }
1176
- }), wt = $.createContext({
1177
- state: { prompt: "" },
1178
- dispatch: () => {
1193
+ function l(m) {
1194
+ var u = m.getSnapshot;
1195
+ m = m.value;
1196
+ try {
1197
+ var g = u();
1198
+ return !r(m, g);
1199
+ } catch {
1200
+ return !0;
1201
+ }
1179
1202
  }
1180
- });
1181
- /*!
1182
- @versini/ui-textarea v3.0.0
1183
- © 2025 gizmette.com
1184
- */
1185
- try {
1186
- window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
1187
- version: "3.0.0",
1188
- buildTime: "01/03/2025 10:45 AM EST",
1189
- homepage: "https://github.com/aversini/ui-components",
1190
- license: "MIT"
1191
- });
1192
- } catch {
1203
+ function h(m, u) {
1204
+ return u();
1205
+ }
1206
+ var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? h : i;
1207
+ return Je.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, Je;
1193
1208
  }
1194
- const hr = "av-text-area", Ga = "av-text-area-wrapper", Je = "av-text-area-helper-text", Wa = "av-text-area__control--right", ja = "av-text-area__control--left";
1209
+ var Ye = {};
1210
+ /**
1211
+ * @license React
1212
+ * use-sync-external-store-shim.development.js
1213
+ *
1214
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1215
+ *
1216
+ * This source code is licensed under the MIT license found in the
1217
+ * LICENSE file in the root directory of this source tree.
1218
+ */
1219
+ var Wt;
1195
1220
  function qa() {
1196
- const e = S(!1);
1197
- return L(() => (e.current = !0, () => {
1198
- e.current = !1;
1199
- }), []), Z(() => e.current, []);
1200
- }
1201
- function Ka(e) {
1202
- return De(() => e.every((t) => t == null) ? () => {
1203
- } : (t) => {
1204
- e.forEach((r) => {
1205
- typeof r == "function" ? r(t) : r != null && (r.current = t);
1206
- });
1207
- }, e);
1208
- }
1209
- const Ja = {
1210
- x: 0,
1211
- y: 0,
1212
- width: 0,
1213
- height: 0,
1214
- top: 0,
1215
- left: 0,
1216
- bottom: 0,
1217
- right: 0
1218
- };
1219
- function Ft(e) {
1220
- const t = qa(), r = S(0), a = S(null), [n, o] = G(Ja), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
1221
- const l = i[0];
1222
- l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
1223
- a.current && t() && o(l.contentRect);
1224
- }));
1225
- }), [t]);
1226
- return L(() => (a.current && (s == null || s.observe(a.current, e)), () => {
1227
- s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
1228
- }), [s, e]), [a, n];
1221
+ return Wt || (Wt = 1, process.env.NODE_ENV !== "production" && function() {
1222
+ function e(g, p) {
1223
+ return g === p && (g !== 0 || 1 / g === 1 / p) || g !== g && p !== p;
1224
+ }
1225
+ function t(g, p) {
1226
+ f || n.startTransition === void 0 || (f = !0, console.error(
1227
+ "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
1228
+ ));
1229
+ var b = p();
1230
+ if (!m) {
1231
+ var k = p();
1232
+ o(b, k) || (console.error(
1233
+ "The result of getSnapshot should be cached to avoid an infinite loop"
1234
+ ), m = !0);
1235
+ }
1236
+ k = s({
1237
+ inst: { value: b, getSnapshot: p }
1238
+ });
1239
+ var y = k[0].inst, N = k[1];
1240
+ return l(
1241
+ function() {
1242
+ y.value = b, y.getSnapshot = p, r(y) && N({ inst: y });
1243
+ },
1244
+ [g, b, p]
1245
+ ), i(
1246
+ function() {
1247
+ return r(y) && N({ inst: y }), g(function() {
1248
+ r(y) && N({ inst: y });
1249
+ });
1250
+ },
1251
+ [g]
1252
+ ), h(b), b;
1253
+ }
1254
+ function r(g) {
1255
+ var p = g.getSnapshot;
1256
+ g = g.value;
1257
+ try {
1258
+ var b = p();
1259
+ return !o(g, b);
1260
+ } catch {
1261
+ return !0;
1262
+ }
1263
+ }
1264
+ function a(g, p) {
1265
+ return p();
1266
+ }
1267
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
1268
+ var n = $, o = typeof Object.is == "function" ? Object.is : e, s = n.useState, i = n.useEffect, l = n.useLayoutEffect, h = n.useDebugValue, f = !1, m = !1, u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : t;
1269
+ Ye.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1270
+ }()), Ye;
1229
1271
  }
1230
- function Ya({
1231
- value: e,
1232
- defaultValue: t,
1233
- finalValue: r,
1234
- onChange: a = () => {
1235
- },
1236
- initialControlledDelay: n = 0
1237
- }) {
1238
- const [o, s] = G(!1), [i, l] = G(
1239
- t !== void 0 ? t : r
1240
- ), h = (f) => {
1241
- l(f), a == null || a(f);
1242
- };
1243
- return L(() => {
1244
- (async () => e !== void 0 && !o && n > 0 && (await new Promise(
1245
- (f) => setTimeout(f, n)
1246
- ), s(!0)))();
1247
- }, [e, n, o]), e !== void 0 ? !o && n > 0 ? ["", a, !0] : [e, a, !0] : [i, h, !1];
1272
+ var jt;
1273
+ function Ka() {
1274
+ return jt || (jt = 1, process.env.NODE_ENV === "production" ? Ae.exports = /* @__PURE__ */ ja() : Ae.exports = /* @__PURE__ */ qa()), Ae.exports;
1248
1275
  }
1249
- function Xa(e) {
1250
- const t = Qr();
1251
- if (!e)
1252
- return t;
1253
- if (typeof e == "number" || typeof e == "string")
1254
- return `${e}${t}`;
1255
- if (typeof e == "object") {
1256
- const { id: r, prefix: a = "" } = e;
1257
- return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
1276
+ var Ja = /* @__PURE__ */ Ka(), qt = Object.prototype.hasOwnProperty;
1277
+ function it(e, t) {
1278
+ var r, a;
1279
+ if (e === t) return !0;
1280
+ if (e && t && (r = e.constructor) === t.constructor) {
1281
+ if (r === Date) return e.getTime() === t.getTime();
1282
+ if (r === RegExp) return e.toString() === t.toString();
1283
+ if (r === Array) {
1284
+ if ((a = e.length) === t.length)
1285
+ for (; a-- && it(e[a], t[a]); ) ;
1286
+ return a === -1;
1287
+ }
1288
+ if (!r || typeof e == "object") {
1289
+ a = 0;
1290
+ for (r in e)
1291
+ if (qt.call(e, r) && ++a && !qt.call(t, r) || !(r in t) || !it(e[r], t[r])) return !1;
1292
+ return Object.keys(t).length === a;
1293
+ }
1258
1294
  }
1295
+ return e !== e && t !== t;
1259
1296
  }
1260
- const fr = "SET_ANNOUNCEMENT", pr = "CLEAR_ANNOUNCEMENT", Qa = {
1261
- alert: null,
1262
- alertdialog: null,
1263
- log: "polite",
1264
- marquee: null,
1265
- progressbar: null,
1266
- status: "polite",
1267
- timer: "assertive"
1268
- }, Za = (e, t) => {
1269
- switch (t == null ? void 0 : t.type) {
1270
- case fr:
1271
- return {
1272
- ...e,
1273
- announcement: t.payload
1274
- };
1275
- case pr:
1276
- return {
1277
- ...e,
1278
- announcement: null
1279
- };
1280
- default:
1281
- return e;
1282
- }
1283
- }, en = ({
1284
- onAnnouncementClear: e,
1285
- dispatch: t
1286
- }) => {
1287
- t({
1288
- type: pr
1289
- }), typeof e == "function" && e();
1290
- }, Gt = ({
1291
- children: e,
1292
- clearAnnouncementDelay: t,
1293
- clearAnnouncementTimeoutRef: r,
1294
- onAnnouncementClear: a,
1295
- dispatch: n
1296
- }) => {
1297
- clearTimeout(r.current), e !== null && n({
1298
- type: fr,
1299
- payload: e
1300
- }), t && (r.current = setTimeout(
1301
- () => en({
1302
- onAnnouncementClear: a,
1303
- dispatch: n
1304
- }),
1305
- t
1306
- ));
1307
- }, tn = ({
1308
- children: e,
1309
- announcementTimeoutRef: t,
1310
- announcementDelay: r,
1311
- clearAnnouncementDelay: a,
1312
- clearAnnouncementTimeoutRef: n,
1313
- onAnnouncementClear: o,
1314
- dispatch: s
1315
- }) => {
1316
- clearTimeout(t.current), r ? t.current = setTimeout(Gt, r, {
1317
- children: e,
1318
- clearAnnouncementDelay: a,
1319
- clearAnnouncementTimeoutRef: n,
1320
- onAnnouncementClear: o,
1321
- dispatch: s
1322
- }) : Gt({
1323
- children: e,
1324
- clearAnnouncementDelay: a,
1325
- clearAnnouncementTimeoutRef: n,
1326
- onAnnouncementClear: o,
1327
- dispatch: s
1328
- });
1329
- };
1330
- function rn({
1331
- children: e,
1332
- className: t,
1333
- politeness: r,
1334
- role: a = null,
1335
- announcementDelay: n,
1336
- clearAnnouncementDelay: o,
1337
- onAnnouncementClear: s,
1338
- visible: i,
1339
- ...l
1340
- }) {
1341
- const h = S(null), f = S(null), [g, u] = Be(Za, {
1342
- announcement: null
1343
- });
1344
- let m = r;
1345
- typeof m > "u" && (m = a ? Qa[a] : "assertive"), L(() => {
1346
- tn({
1347
- announcementTimeoutRef: h,
1348
- announcementDelay: n,
1349
- children: e,
1350
- clearAnnouncementDelay: o,
1351
- clearAnnouncementTimeoutRef: f,
1352
- onAnnouncementClear: s,
1353
- dispatch: u
1354
- });
1355
- }, [
1297
+ const X = /* @__PURE__ */ new WeakMap(), de = () => {
1298
+ }, z = (
1299
+ /*#__NOINLINE__*/
1300
+ de()
1301
+ ), ct = Object, _ = (e) => e === z, Q = (e) => typeof e == "function", ue = (e, t) => ({
1302
+ ...e,
1303
+ ...t
1304
+ }), fr = (e) => Q(e.then), Xe = {}, Oe = {}, wt = "undefined", ze = typeof window != wt, lt = typeof document != wt, Ya = () => ze && typeof window.requestAnimationFrame != wt, pr = (e, t) => {
1305
+ const r = X.get(e);
1306
+ return [
1307
+ // Getter
1308
+ () => !_(t) && e.get(t) || Xe,
1309
+ // Setter
1310
+ (a) => {
1311
+ if (!_(t)) {
1312
+ const n = e.get(t);
1313
+ t in Oe || (Oe[t] = n), r[5](t, ue(n, a), n || Xe);
1314
+ }
1315
+ },
1316
+ // Subscriber
1317
+ r[6],
1318
+ // Get server cache snapshot
1319
+ () => !_(t) && t in Oe ? Oe[t] : !_(t) && e.get(t) || Xe
1320
+ ];
1321
+ };
1322
+ let dt = !0;
1323
+ const Xa = () => dt, [ut, mt] = ze && window.addEventListener ? [
1324
+ window.addEventListener.bind(window),
1325
+ window.removeEventListener.bind(window)
1326
+ ] : [
1327
+ de,
1328
+ de
1329
+ ], Qa = () => {
1330
+ const e = lt && document.visibilityState;
1331
+ return _(e) || e !== "hidden";
1332
+ }, Za = (e) => (lt && document.addEventListener("visibilitychange", e), ut("focus", e), () => {
1333
+ lt && document.removeEventListener("visibilitychange", e), mt("focus", e);
1334
+ }), en = (e) => {
1335
+ const t = () => {
1336
+ dt = !0, e();
1337
+ }, r = () => {
1338
+ dt = !1;
1339
+ };
1340
+ return ut("online", t), ut("offline", r), () => {
1341
+ mt("online", t), mt("offline", r);
1342
+ };
1343
+ }, tn = {
1344
+ isOnline: Xa,
1345
+ isVisible: Qa
1346
+ }, rn = {
1347
+ initFocus: Za,
1348
+ initReconnect: en
1349
+ }, Kt = !$.useId, Te = !ze || "Deno" in globalThis, an = (e) => Ya() ? window.requestAnimationFrame(e) : setTimeout(e, 1), Qe = Te ? L : fe, Ze = typeof navigator < "u" && navigator.connection, Jt = !Te && Ze && ([
1350
+ "slow-2g",
1351
+ "2g"
1352
+ ].includes(Ze.effectiveType) || Ze.saveData), Le = /* @__PURE__ */ new WeakMap(), et = (e, t) => ct.prototype.toString.call(e) === `[object ${t}]`;
1353
+ let nn = 0;
1354
+ const gt = (e) => {
1355
+ const t = typeof e, r = et(e, "Date"), a = et(e, "RegExp"), n = et(e, "Object");
1356
+ let o, s;
1357
+ if (ct(e) === e && !r && !a) {
1358
+ if (o = Le.get(e), o) return o;
1359
+ if (o = ++nn + "~", Le.set(e, o), Array.isArray(e)) {
1360
+ for (o = "@", s = 0; s < e.length; s++)
1361
+ o += gt(e[s]) + ",";
1362
+ Le.set(e, o);
1363
+ }
1364
+ if (n) {
1365
+ o = "#";
1366
+ const i = ct.keys(e).sort();
1367
+ for (; !_(s = i.pop()); )
1368
+ _(e[s]) || (o += s + ":" + gt(e[s]) + ",");
1369
+ Le.set(e, o);
1370
+ }
1371
+ } else
1372
+ o = r ? e.toJSON() : t == "symbol" ? e.toString() : t == "string" ? JSON.stringify(e) : "" + e;
1373
+ return o;
1374
+ }, Pe = (e) => {
1375
+ if (Q(e))
1376
+ try {
1377
+ e = e();
1378
+ } catch {
1379
+ e = "";
1380
+ }
1381
+ const t = e;
1382
+ return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ? gt(e) : "", [
1356
1383
  e,
1357
- n,
1358
- o,
1359
- s
1360
- ]);
1361
- const y = c(t, {
1362
- "sr-only": !i
1363
- });
1364
- return /* @__PURE__ */ d(
1365
- "div",
1366
- {
1367
- "aria-live": m,
1368
- ...a && { role: a },
1369
- className: y,
1370
- ...l,
1371
- children: g.announcement
1384
+ t
1385
+ ];
1386
+ };
1387
+ let on = 0;
1388
+ const ht = () => ++on, yr = 0, br = 1, vr = 2, sn = 3;
1389
+ var _e = {
1390
+ __proto__: null,
1391
+ ERROR_REVALIDATE_EVENT: sn,
1392
+ FOCUS_EVENT: yr,
1393
+ MUTATE_EVENT: vr,
1394
+ RECONNECT_EVENT: br
1395
+ };
1396
+ async function kr(...e) {
1397
+ const [t, r, a, n] = e, o = ue({
1398
+ populateCache: !0,
1399
+ throwOnError: !0
1400
+ }, typeof n == "boolean" ? {
1401
+ revalidate: n
1402
+ } : n || {});
1403
+ let s = o.populateCache;
1404
+ const i = o.rollbackOnError;
1405
+ let l = o.optimisticData;
1406
+ const h = (u) => typeof i == "function" ? i(u) : i !== !1, f = o.throwOnError;
1407
+ if (Q(r)) {
1408
+ const u = r, g = [], p = t.keys();
1409
+ for (const b of p)
1410
+ // Skip the special useSWRInfinite and useSWRSubscription keys.
1411
+ !/^\$(inf|sub)\$/.test(b) && u(t.get(b)._k) && g.push(b);
1412
+ return Promise.all(g.map(m));
1413
+ }
1414
+ return m(r);
1415
+ async function m(u) {
1416
+ const [g] = Pe(u);
1417
+ if (!g) return;
1418
+ const [p, b] = pr(t, g), [k, y, N, A] = X.get(t), R = () => {
1419
+ const B = k[g];
1420
+ return (Q(o.revalidate) ? o.revalidate(p().data, u) : o.revalidate !== !1) && (delete N[g], delete A[g], B && B[0]) ? B[0](vr).then(() => p().data) : p().data;
1421
+ };
1422
+ if (e.length < 3)
1423
+ return R();
1424
+ let E = a, C;
1425
+ const ee = ht();
1426
+ y[g] = [
1427
+ ee,
1428
+ 0
1429
+ ];
1430
+ const x = !_(l), oe = p(), H = oe.data, W = oe._c, te = _(W) ? H : W;
1431
+ if (x && (l = Q(l) ? l(te, H) : l, b({
1432
+ data: l,
1433
+ _c: te
1434
+ })), Q(E))
1435
+ try {
1436
+ E = E(te);
1437
+ } catch (B) {
1438
+ C = B;
1439
+ }
1440
+ if (E && fr(E))
1441
+ if (E = await E.catch((B) => {
1442
+ C = B;
1443
+ }), ee !== y[g][0]) {
1444
+ if (C) throw C;
1445
+ return E;
1446
+ } else C && x && h(C) && (s = !0, b({
1447
+ data: te,
1448
+ _c: z
1449
+ }));
1450
+ if (s && !C)
1451
+ if (Q(s)) {
1452
+ const B = s(E, te);
1453
+ b({
1454
+ data: B,
1455
+ error: z,
1456
+ _c: z
1457
+ });
1458
+ } else
1459
+ b({
1460
+ data: E,
1461
+ error: z,
1462
+ _c: z
1463
+ });
1464
+ if (y[g][1] = ht(), Promise.resolve(R()).then(() => {
1465
+ b({
1466
+ _c: z
1467
+ });
1468
+ }), C) {
1469
+ if (f) throw C;
1470
+ return;
1372
1471
  }
1373
- );
1374
- }
1375
- /*!
1376
- @versini/ui-liveregion v1.3.0
1377
- © 2025 gizmette.com
1378
- */
1379
- try {
1380
- window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
1381
- version: "1.3.0",
1382
- buildTime: "01/03/2025 10:45 AM EST",
1383
- homepage: "https://github.com/aversini/ui-components",
1384
- license: "MIT"
1385
- });
1386
- } catch {
1472
+ return E;
1473
+ }
1387
1474
  }
1388
- const an = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", nn = ({ mode: e }) => c({
1389
- "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
1390
- "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
1391
- "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
1392
- "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
1393
- }), on = ({
1394
- focusMode: e
1395
- }) => c("focus:outline focus:outline-2 focus:outline-offset-2", {
1396
- "focus:outline-focus-dark": e === "dark",
1397
- "focus:outline-focus-light": e === "light",
1398
- "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1399
- "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1400
- }), sn = ({
1401
- noBorder: e,
1402
- error: t
1403
- }) => c("border-2", {
1404
- "border-border-dark": !e && !t,
1405
- "focus:border-border-dark": !e && t,
1406
- "border-border-error-dark": !e && t,
1407
- "border-transparent": e
1408
- }), cn = ({
1409
- disabled: e,
1410
- raw: t,
1411
- error: r,
1412
- mode: a,
1413
- leftElement: n,
1414
- rightElement: o
1415
- }) => {
1416
- if (t)
1417
- return "";
1418
- if (e)
1419
- return c(
1420
- "transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
1421
- {
1422
- "translate-x-[12px]": o === !0 && !n || !o && !n
1423
- }
1424
- );
1425
- if (!r)
1426
- return c(
1427
- "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
1428
- {
1429
- "translate-x-[12px]": o === !0 && !n || !o && !n,
1430
- "text-copy-medium": a === "dark",
1431
- "text-copy-dark": a === "light",
1432
- "text-copy-dark dark:text-copy-medium": a === "system",
1433
- "text-copy-medium dark:text-copy-dark": a === "alt-system"
1434
- }
1435
- );
1436
- if (r)
1437
- return c(
1438
- "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
1439
- {
1440
- "translate-x-[12px]": o === !0 && !n || !o && !n,
1441
- "text-copy-medium": a === "dark",
1442
- "text-copy-error-dark": a === "light",
1443
- "text-copy-error-dark dark:text-copy-error-light": a === "system",
1444
- "text-copy-medium dark:text-copy-error-dark": a === "alt-system"
1475
+ const Yt = (e, t) => {
1476
+ for (const r in e)
1477
+ e[r][0] && e[r][0](t);
1478
+ }, cn = (e, t) => {
1479
+ if (!X.has(e)) {
1480
+ const r = ue(rn, t), a = {}, n = kr.bind(z, e);
1481
+ let o = de;
1482
+ const s = {}, i = (f, m) => {
1483
+ const u = s[f] || [];
1484
+ return s[f] = u, u.push(m), () => u.splice(u.indexOf(m), 1);
1485
+ }, l = (f, m, u) => {
1486
+ e.set(f, m);
1487
+ const g = s[f];
1488
+ if (g)
1489
+ for (const p of g)
1490
+ p(m, u);
1491
+ }, h = () => {
1492
+ if (!X.has(e) && (X.set(e, [
1493
+ a,
1494
+ {},
1495
+ {},
1496
+ {},
1497
+ n,
1498
+ l,
1499
+ i
1500
+ ]), !Te)) {
1501
+ const f = r.initFocus(setTimeout.bind(z, Yt.bind(z, a, yr))), m = r.initReconnect(setTimeout.bind(z, Yt.bind(z, a, br)));
1502
+ o = () => {
1503
+ f && f(), m && m(), X.delete(e);
1504
+ };
1445
1505
  }
1446
- );
1447
- }, ln = ({
1448
- error: e,
1449
- raw: t,
1450
- mode: r,
1451
- disabled: a
1452
- }) => {
1453
- if (t)
1454
- return "";
1455
- if (a)
1456
- return c(
1457
- Je,
1458
- "absolute px-2 cursor-not-allowed opacity-50 font-medium"
1459
- );
1460
- if (!e)
1461
- return c(Je, "absolute px-2 font-medium", {
1462
- "text-copy-medium": r === "dark",
1463
- "text-copy-dark": r === "light",
1464
- "text-copy-dark dark:text-copy-medium": r === "system",
1465
- "text-copy-medium dark:text-copy-dark": r === "alt-system"
1466
- });
1467
- if (e)
1468
- return c(Je, "absolute px-2 font-medium", {
1469
- "text-copy-error-light": r === "dark",
1470
- "text-copy-error-dark": r === "light",
1471
- "text-copy-error-dark dark:text-copy-error-light": r === "system",
1472
- "dark:text-copy-error-dark text-copy-error-light": r === "alt-system"
1473
- });
1474
- }, dn = ({
1475
- className: e,
1476
- textAreaClassName: t,
1477
- raw: r,
1478
- focusMode: a,
1479
- disabled: n,
1480
- noBorder: o,
1481
- error: s,
1482
- mode: i,
1483
- leftElement: l,
1484
- rightElement: h
1485
- }) => {
1486
- const f = r ? e : c(
1487
- "relative flex w-full flex-col justify-center",
1488
- Ga,
1489
- e
1490
- ), g = r ? c(t) : c(
1491
- hr,
1492
- t,
1493
- an(),
1494
- nn({ mode: i }),
1495
- on({ focusMode: a }),
1496
- sn({
1497
- noBorder: o,
1498
- error: s
1506
+ };
1507
+ return h(), [
1508
+ e,
1509
+ n,
1510
+ h,
1511
+ o
1512
+ ];
1513
+ }
1514
+ return [
1515
+ e,
1516
+ X.get(e)[4]
1517
+ ];
1518
+ }, ln = (e, t, r, a, n) => {
1519
+ const o = r.errorRetryCount, s = n.retryCount, i = ~~((Math.random() + 0.5) * (1 << (s < 8 ? s : 8))) * r.errorRetryInterval;
1520
+ !_(o) && s > o || setTimeout(a, i, n);
1521
+ }, dn = it, [St, un] = cn(/* @__PURE__ */ new Map()), mn = ue(
1522
+ {
1523
+ // events
1524
+ onLoadingSlow: de,
1525
+ onSuccess: de,
1526
+ onError: de,
1527
+ onErrorRetry: ln,
1528
+ onDiscarded: de,
1529
+ // switches
1530
+ revalidateOnFocus: !0,
1531
+ revalidateOnReconnect: !0,
1532
+ revalidateIfStale: !0,
1533
+ shouldRetryOnError: !0,
1534
+ // timeouts
1535
+ errorRetryInterval: Jt ? 1e4 : 5e3,
1536
+ focusThrottleInterval: 5 * 1e3,
1537
+ dedupingInterval: 2 * 1e3,
1538
+ loadingTimeout: Jt ? 5e3 : 3e3,
1539
+ // providers
1540
+ compare: dn,
1541
+ isPaused: () => !1,
1542
+ cache: St,
1543
+ mutate: un,
1544
+ fallback: {}
1545
+ },
1546
+ // use web preset by default
1547
+ tn
1548
+ ), gn = (e, t) => {
1549
+ const r = ue(e, t);
1550
+ if (t) {
1551
+ const { use: a, fallback: n } = e, { use: o, fallback: s } = t;
1552
+ a && o && (r.use = a.concat(o)), n && s && (r.fallback = ue(n, s));
1553
+ }
1554
+ return r;
1555
+ }, hn = ta({}), fn = "$inf$", _r = ze && window.__SWR_DEVTOOLS_USE__, pn = _r ? window.__SWR_DEVTOOLS_USE__ : [], yn = () => {
1556
+ _r && (window.__SWR_DEVTOOLS_REACT__ = $);
1557
+ }, bn = (e) => Q(e[1]) ? [
1558
+ e[0],
1559
+ e[1],
1560
+ e[2] || {}
1561
+ ] : [
1562
+ e[0],
1563
+ null,
1564
+ (e[1] === null ? e[2] : e[1]) || {}
1565
+ ], vn = () => ue(mn, U(hn)), Tt = (e, t) => {
1566
+ const [r, a] = Pe(e), [, , , n] = X.get(St);
1567
+ if (n[r]) return n[r];
1568
+ const o = t(a);
1569
+ return n[r] = o, o;
1570
+ }, kn = (e) => (t, r, a) => e(t, r && ((...o) => {
1571
+ const [s] = Pe(t), [, , , i] = X.get(St);
1572
+ if (s.startsWith(fn))
1573
+ return r(...o);
1574
+ const l = i[s];
1575
+ return _(l) ? r(...o) : (delete i[s], l);
1576
+ }), a), _n = pn.concat(kn), En = (e) => function(...r) {
1577
+ const a = vn(), [n, o, s] = bn(r), i = gn(a, s);
1578
+ let l = e;
1579
+ const { use: h } = i, f = (h || []).concat(_n);
1580
+ for (let m = f.length; m--; )
1581
+ l = f[m](l);
1582
+ return l(n, o || i.fetcher || null, i);
1583
+ }, xn = (e, t, r) => {
1584
+ const a = t[e] || (t[e] = []);
1585
+ return a.push(r), () => {
1586
+ const n = a.indexOf(r);
1587
+ n >= 0 && (a[n] = a[a.length - 1], a.pop());
1588
+ };
1589
+ };
1590
+ yn();
1591
+ const tt = $.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
1592
+ // and emitting an error.
1593
+ // We assume that this is only for the `use(thenable)` case, not `use(context)`.
1594
+ // https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45
1595
+ ((e) => {
1596
+ switch (e.status) {
1597
+ case "pending":
1598
+ throw e;
1599
+ case "fulfilled":
1600
+ return e.value;
1601
+ case "rejected":
1602
+ throw e.reason;
1603
+ default:
1604
+ throw e.status = "pending", e.then((t) => {
1605
+ e.status = "fulfilled", e.value = t;
1606
+ }, (t) => {
1607
+ e.status = "rejected", e.reason = t;
1608
+ }), e;
1609
+ }
1610
+ }), rt = {
1611
+ dedupe: !0
1612
+ }, wn = (e, t, r) => {
1613
+ const { cache: a, compare: n, suspense: o, fallbackData: s, revalidateOnMount: i, revalidateIfStale: l, refreshInterval: h, refreshWhenHidden: f, refreshWhenOffline: m, keepPreviousData: u } = r, [g, p, b, k] = X.get(a), [y, N] = Pe(e), A = S(!1), R = S(!1), E = S(y), C = S(t), ee = S(r), x = () => ee.current, oe = () => x().isVisible() && x().isOnline(), [H, W, te, B] = pr(a, y), j = S({}).current, me = _(s) ? _(r.fallback) ? z : r.fallback[y] : s, q = (w, v) => {
1614
+ for (const O in j) {
1615
+ const T = O;
1616
+ if (T === "data") {
1617
+ if (!n(w[T], v[T]) && (!_(w[T]) || !n(ge, v[T])))
1618
+ return !1;
1619
+ } else if (v[T] !== w[T])
1620
+ return !1;
1621
+ }
1622
+ return !0;
1623
+ }, ke = De(() => {
1624
+ const w = !y || !t ? !1 : _(i) ? x().isPaused() || o ? !1 : l !== !1 : i, v = (V) => {
1625
+ const ae = ue(V);
1626
+ return delete ae._k, w ? {
1627
+ isValidating: !0,
1628
+ isLoading: !0,
1629
+ ...ae
1630
+ } : ae;
1631
+ }, O = H(), T = B(), P = v(O), ce = O === T ? P : v(T);
1632
+ let M = P;
1633
+ return [
1634
+ () => {
1635
+ const V = v(H());
1636
+ return q(V, M) ? (M.data = V.data, M.isLoading = V.isLoading, M.isValidating = V.isValidating, M.error = V.error, M) : (M = V, V);
1637
+ },
1638
+ () => ce
1639
+ ];
1640
+ }, [
1641
+ a,
1642
+ y
1643
+ ]), K = Ja.useSyncExternalStore(Z(
1644
+ (w) => te(y, (v, O) => {
1645
+ q(O, v) || w();
1499
1646
  }),
1500
- {
1501
- "disabled:cursor-not-allowed disabled:opacity-50": n
1647
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1648
+ [
1649
+ a,
1650
+ y
1651
+ ]
1652
+ ), ke[0], ke[1]), se = !A.current, Ne = g[y] && g[y].length > 0, ie = K.data, re = _(ie) ? me && fr(me) ? tt(me) : me : ie, pe = K.error, Re = S(re), ge = u ? _(ie) ? Re.current : ie : re, Ce = Ne && !_(pe) ? !1 : se && !_(i) ? i : x().isPaused() ? !1 : o ? _(re) ? !1 : l : _(re) || l, J = !!(y && t && se && Ce), Y = _(K.isValidating) ? J : K.isValidating, We = _(K.isLoading) ? J : K.isLoading, he = Z(
1653
+ async (w) => {
1654
+ const v = C.current;
1655
+ if (!y || !v || R.current || x().isPaused())
1656
+ return !1;
1657
+ let O, T, P = !0;
1658
+ const ce = w || {}, M = !b[y] || !ce.dedupe, V = () => Kt ? !R.current && y === E.current && A.current : y === E.current, ae = {
1659
+ isValidating: !1,
1660
+ isLoading: !1
1661
+ }, Ot = () => {
1662
+ W(ae);
1663
+ }, Lt = () => {
1664
+ const F = b[y];
1665
+ F && F[1] === T && delete b[y];
1666
+ }, Bt = {
1667
+ isValidating: !0
1668
+ };
1669
+ _(H().data) && (Bt.isLoading = !0);
1670
+ try {
1671
+ if (M && (W(Bt), r.loadingTimeout && _(H().data) && setTimeout(() => {
1672
+ P && V() && x().onLoadingSlow(y, r);
1673
+ }, r.loadingTimeout), b[y] = [
1674
+ v(N),
1675
+ ht()
1676
+ ]), [O, T] = b[y], O = await O, M && setTimeout(Lt, r.dedupingInterval), !b[y] || b[y][1] !== T)
1677
+ return M && V() && x().onDiscarded(y), !1;
1678
+ ae.error = z;
1679
+ const F = p[y];
1680
+ if (!_(F) && // case 1
1681
+ (T <= F[0] || // case 2
1682
+ T <= F[1] || // case 3
1683
+ F[1] === 0))
1684
+ return Ot(), M && V() && x().onDiscarded(y), !1;
1685
+ const ne = H().data;
1686
+ ae.data = n(ne, O) ? ne : O, M && V() && x().onSuccess(O, y, r);
1687
+ } catch (F) {
1688
+ Lt();
1689
+ const ne = x(), { shouldRetryOnError: je } = ne;
1690
+ ne.isPaused() || (ae.error = F, M && V() && (ne.onError(F, y, ne), (je === !0 || Q(je) && je(F)) && (!x().revalidateOnFocus || !x().revalidateOnReconnect || oe()) && ne.onErrorRetry(F, y, ne, (Dr) => {
1691
+ const qe = g[y];
1692
+ qe && qe[0] && qe[0](_e.ERROR_REVALIDATE_EVENT, Dr);
1693
+ }, {
1694
+ retryCount: (ce.retryCount || 0) + 1,
1695
+ dedupe: !0
1696
+ })));
1697
+ }
1698
+ return P = !1, Ot(), !0;
1699
+ },
1700
+ // `setState` is immutable, and `eventsCallback`, `fnArg`, and
1701
+ // `keyValidating` are depending on `key`, so we can exclude them from
1702
+ // the deps array.
1703
+ //
1704
+ // FIXME:
1705
+ // `fn` and `config` might be changed during the lifecycle,
1706
+ // but they might be changed every render like this.
1707
+ // `useSWR('key', () => fetch('/api/'), { suspense: true })`
1708
+ // So we omit the values from the deps array
1709
+ // even though it might cause unexpected behaviors.
1710
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1711
+ [
1712
+ y,
1713
+ a
1714
+ ]
1715
+ ), Ie = Z(
1716
+ // Use callback to make sure `keyRef.current` returns latest result every time
1717
+ (...w) => kr(a, E.current, ...w),
1718
+ // eslint-disable-next-line react-hooks/exhaustive-deps
1719
+ []
1720
+ );
1721
+ if (Qe(() => {
1722
+ C.current = t, ee.current = r, _(ie) || (Re.current = ie);
1723
+ }), Qe(() => {
1724
+ if (!y) return;
1725
+ const w = he.bind(z, rt);
1726
+ let v = 0;
1727
+ const T = xn(y, g, (P, ce = {}) => {
1728
+ if (P == _e.FOCUS_EVENT) {
1729
+ const M = Date.now();
1730
+ x().revalidateOnFocus && M > v && oe() && (v = M + x().focusThrottleInterval, w());
1731
+ } else if (P == _e.RECONNECT_EVENT)
1732
+ x().revalidateOnReconnect && oe() && w();
1733
+ else {
1734
+ if (P == _e.MUTATE_EVENT)
1735
+ return he();
1736
+ if (P == _e.ERROR_REVALIDATE_EVENT)
1737
+ return he(ce);
1738
+ }
1739
+ });
1740
+ return R.current = !1, E.current = y, A.current = !0, W({
1741
+ _k: N
1742
+ }), Ce && (_(re) || Te ? w() : an(w)), () => {
1743
+ R.current = !0, T();
1744
+ };
1745
+ }, [
1746
+ y
1747
+ ]), Qe(() => {
1748
+ let w;
1749
+ function v() {
1750
+ const T = Q(h) ? h(H().data) : h;
1751
+ T && w !== -1 && (w = setTimeout(O, T));
1502
1752
  }
1503
- ), u = r ? void 0 : "sr-only", m = cn({
1504
- disabled: n,
1505
- raw: r,
1506
- error: s,
1507
- mode: i,
1508
- rightElement: h,
1509
- leftElement: l
1510
- }), y = ln({
1511
- error: s,
1512
- raw: r,
1513
- mode: i,
1514
- disabled: n
1515
- }), b = r ? void 0 : c(Wa, "absolute"), k = r ? void 0 : c(ja, "absolute");
1516
- return {
1517
- wrapper: f,
1518
- textArea: g,
1519
- accessibleLabel: u,
1520
- visibleLabel: m,
1521
- helperText: y,
1522
- rightElement: b,
1523
- leftElement: k
1524
- };
1525
- }, un = ({
1526
- scrollHeight: e,
1527
- currentHeight: t,
1528
- currentLabelOffset: r = 0,
1529
- currentHelperTextOffset: a = 0
1530
- }) => {
1531
- let n, o;
1532
- if (e > 0 && e !== t) {
1533
- const s = e - t, i = Math.abs(s / 24);
1534
- n = r + -1 * Math.sign(s) * (12 * i), o = a + Math.sign(s) * (12 * i);
1753
+ function O() {
1754
+ !H().error && (f || x().isVisible()) && (m || x().isOnline()) ? he(rt).then(v) : v();
1755
+ }
1756
+ return v(), () => {
1757
+ w && (clearTimeout(w), w = -1);
1758
+ };
1759
+ }, [
1760
+ h,
1761
+ f,
1762
+ m,
1763
+ y
1764
+ ]), ra(ge), o && _(re) && y) {
1765
+ if (!Kt && Te)
1766
+ throw new Error("Fallback data is required when using Suspense in SSR.");
1767
+ C.current = t, ee.current = r, R.current = !1;
1768
+ const w = k[y];
1769
+ if (!_(w)) {
1770
+ const v = Ie(w);
1771
+ tt(v);
1772
+ }
1773
+ if (_(pe)) {
1774
+ const v = he(rt);
1775
+ _(ge) || (v.status = "fulfilled", v.value = !0), tt(v);
1776
+ } else
1777
+ throw pe;
1535
1778
  }
1536
1779
  return {
1537
- labelOffset: n,
1538
- helperTextOffset: o,
1539
- scrollHeight: e
1780
+ mutate: Ie,
1781
+ get data() {
1782
+ return j.data = !0, ge;
1783
+ },
1784
+ get error() {
1785
+ return j.error = !0, pe;
1786
+ },
1787
+ get isValidating() {
1788
+ return j.isValidating = !0, Y;
1789
+ },
1790
+ get isLoading() {
1791
+ return j.isLoading = !0, We;
1792
+ }
1540
1793
  };
1541
- }, yr = $.forwardRef(
1542
- ({
1543
- id: e,
1544
- name: t,
1545
- label: r,
1546
- error: a = !1,
1547
- raw: n = !1,
1548
- className: o,
1549
- textAreaClassName: s,
1550
- mode: i = "system",
1551
- focusMode: l = "system",
1552
- value: h,
1553
- defaultValue: f,
1554
- disabled: g = !1,
1555
- noBorder: u = !1,
1556
- labelId: m,
1557
- helperText: y = "",
1558
- helperTextOnFocus: b = !1,
1559
- rightElement: k,
1560
- leftElement: p,
1561
- onChange: N,
1562
- onFocus: A,
1563
- onBlur: R,
1564
- ...E
1565
- }, C) => {
1566
- var ee;
1567
- const x = S(null), oe = Ka([C, x]), [H, W] = Ft(), [te, B] = Ft(), j = S(80), me = S(-25), q = S(null), ke = S(30), K = S(null), se = Xa({ id: e, prefix: `${hr}-` }), [Ne, ie] = G(0), [re, pe] = G(0), [Re, ge] = G(
1568
- !!(!b && y)
1569
- ), Ce = `${t} error, ${y}`, J = dn({
1570
- className: o,
1571
- textAreaClassName: s,
1572
- error: a,
1573
- raw: n,
1574
- focusMode: l,
1575
- disabled: g,
1576
- noBorder: u,
1577
- mode: i,
1578
- rightElement: !!k,
1579
- leftElement: !!p
1580
- }), [Y, We] = Ya({
1581
- value: h,
1582
- initialControlledDelay: 20,
1583
- defaultValue: f,
1584
- onChange: (v) => {
1585
- N && N({
1586
- target: {
1587
- value: v
1588
- }
1589
- });
1590
- }
1591
- }), he = (v) => {
1592
- We(v.target.value);
1593
- }, Ie = (v) => {
1594
- b && y && ge(!0), A && A(v);
1595
- }, w = (v) => {
1596
- b && y && !Y && ge(!1), R && R(v);
1597
- };
1598
- return fe(() => {
1599
- W && W.width && ie(W.width + 18 + 10);
1600
- }, [W]), fe(() => {
1601
- B && B.width && pe(B.width + 18 + 10);
1602
- }, [B]), fe(() => {
1603
- n || x && x.current && Y !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
1604
- }, [Y, n]), fe(() => {
1605
- n || setTimeout(() => {
1606
- var v;
1607
- (v = q == null ? void 0 : q.current) == null || v.style.setProperty(
1608
- "--av-text-area-wrapper-transition",
1609
- Y ? "none" : "all 0.2s ease-out"
1610
- );
1611
- }, 0);
1612
- }, [Y, n]), fe(() => {
1613
- var v, O;
1614
- if (!n && x && x.current && Y !== void 0) {
1615
- const { labelOffset: T, helperTextOffset: U, scrollHeight: ce } = un({
1616
- scrollHeight: x.current.scrollHeight,
1617
- currentHeight: j.current,
1618
- currentLabelOffset: me.current,
1619
- currentHelperTextOffset: ke.current
1620
- });
1621
- T && (me.current = T, (v = q == null ? void 0 : q.current) == null || v.style.setProperty(
1622
- "--av-text-area-label",
1623
- `${T}px`
1624
- )), U && (ke.current = U, (O = K == null ? void 0 : K.current) == null || O.style.setProperty(
1625
- "--av-text-area-helper-text",
1626
- `${U}px`
1627
- )), j.current = ce || j.current;
1628
- }
1629
- }, [Y, n]), B.width > 0 && ((ee = q == null ? void 0 : q.current) == null || ee.style.setProperty(
1630
- "--tw-translate-x",
1631
- `${12 + B.width + 5}px`
1632
- )), /* @__PURE__ */ I("div", { className: J.wrapper, children: [
1633
- /* @__PURE__ */ d(
1634
- "label",
1635
- {
1636
- htmlFor: se,
1637
- id: m,
1638
- className: J.accessibleLabel,
1639
- children: r
1640
- }
1641
- ),
1642
- p && /* @__PURE__ */ d(
1643
- "div",
1644
- {
1645
- ref: te,
1646
- className: J.leftElement,
1647
- children: p
1648
- }
1649
- ),
1650
- /* @__PURE__ */ d(
1651
- "textarea",
1652
- {
1653
- ref: oe,
1654
- id: se,
1655
- name: t,
1656
- disabled: g,
1657
- placeholder: n ? void 0 : " ",
1658
- className: J.textArea,
1659
- rows: 1,
1660
- ...y && { "aria-describedby": `${se}-helper` },
1661
- ...a && { "aria-invalid": "true" },
1662
- ...k && !p && !n && { style: { paddingRight: Ne } },
1663
- ...p && !k && !n && { style: { paddingLeft: re } },
1664
- ...k && p && !n && {
1665
- style: {
1666
- paddingRight: Ne,
1667
- paddingLeft: re
1668
- }
1669
- },
1670
- value: Y,
1671
- onChange: he,
1672
- onFocus: Ie,
1673
- onBlur: w,
1674
- ...E
1675
- }
1676
- ),
1677
- !n && /* @__PURE__ */ d(
1678
- "label",
1679
- {
1680
- ref: q,
1681
- "aria-hidden": !0,
1682
- htmlFor: se,
1683
- className: `${J.visibleLabel}`,
1684
- children: r
1685
- }
1686
- ),
1687
- Re && /* @__PURE__ */ d(
1688
- "div",
1689
- {
1690
- ref: K,
1691
- id: `${se}-helper`,
1692
- className: J.helperText,
1693
- children: y
1694
- }
1695
- ),
1696
- k && /* @__PURE__ */ d(
1697
- "div",
1698
- {
1699
- ref: H,
1700
- className: J.rightElement,
1701
- children: k
1702
- }
1703
- ),
1704
- a && y && /* @__PURE__ */ d(rn, { politeness: "polite", clearAnnouncementDelay: 500, children: Ce })
1705
- ] });
1706
- }
1707
- );
1708
- yr.displayName = "TextArea";
1709
- const le = {
1794
+ }, Sn = En(wn), le = {
1710
1795
  GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
1711
1796
  location(latitude: $latitude, longitude: $longitude) {
1712
1797
  country
@@ -1797,7 +1882,7 @@ const le = {
1797
1882
  engine: $engine,
1798
1883
  tags: $tags)
1799
1884
  }`
1800
- }, ze = {
1885
+ }, Ue = {
1801
1886
  GET_LOCATION: {
1802
1887
  schema: le.GET_LOCATION,
1803
1888
  method: "location"
@@ -1830,11 +1915,11 @@ const le = {
1830
1915
  schema: le.SET_USER_PREFERENCES,
1831
1916
  method: "setUserPreferences"
1832
1917
  }
1833
- }, br = process.env.PUBLIC_SASSY_API_SERVER_URL, mn = async ({
1918
+ }, Er = process.env.PUBLIC_SASSY_API_SERVER_URL, Tn = async ({
1834
1919
  query: e,
1835
1920
  data: t,
1836
1921
  headers: r = {}
1837
- }) => await fetch(`${br}/graphql`, {
1922
+ }) => await fetch(`${Er}/graphql`, {
1838
1923
  method: "POST",
1839
1924
  credentials: "include",
1840
1925
  headers: {
@@ -1846,14 +1931,14 @@ const le = {
1846
1931
  query: e,
1847
1932
  variables: t
1848
1933
  })
1849
- }), gn = async ({
1934
+ }), Nn = async ({
1850
1935
  accessToken: e,
1851
1936
  type: t,
1852
1937
  params: r = {}
1853
1938
  }) => {
1854
1939
  const a = t != null && t.data ? t.data(r) : r;
1855
1940
  try {
1856
- const n = `Bearer ${e}`, o = await mn({
1941
+ const n = `Bearer ${e}`, o = await Tn({
1857
1942
  headers: {
1858
1943
  authorization: n
1859
1944
  },
@@ -1871,14 +1956,14 @@ const le = {
1871
1956
  } catch (n) {
1872
1957
  return console.error(n), { status: 500, data: [] };
1873
1958
  }
1874
- }, hn = async ({
1959
+ }, Rn = async ({
1875
1960
  accessToken: e,
1876
1961
  name: t,
1877
1962
  data: r,
1878
1963
  method: a = "POST"
1879
1964
  }) => {
1880
1965
  const n = `Bearer ${e}`;
1881
- return await fetch(`${br}/api/${t}`, {
1966
+ return await fetch(`${Er}/api/${t}`, {
1882
1967
  method: a,
1883
1968
  credentials: "include",
1884
1969
  headers: {
@@ -1887,925 +1972,854 @@ const le = {
1887
1972
  },
1888
1973
  body: JSON.stringify(r)
1889
1974
  });
1890
- }, fn = ({
1891
- mode: e = "light",
1892
- focusMode: t = "light",
1893
- radius: r = "small"
1975
+ }, He = ({
1976
+ fetcher: e,
1977
+ scope: t,
1978
+ keys: r,
1979
+ swrOptions: a,
1980
+ getAccessToken: n
1894
1981
  }) => {
1895
- const { state: a, dispatch: n } = P(ve), o = S(null), s = S(!1), i = (l) => {
1896
- l.preventDefault(), n({
1897
- type: rr
1898
- });
1899
- };
1900
- return L(() => {
1901
- var l;
1902
- (a == null ? void 0 : a.streaming) === !0 && !s.current && o.current && (s.current = !0, o.current.focus()), (a == null ? void 0 : a.streaming) === !1 && (s.current = !1, (l = o.current) == null || l.blur());
1903
- }, [a]), /* @__PURE__ */ d(
1904
- ir,
1905
- {
1906
- noBorder: !0,
1907
- radius: r,
1908
- mode: e,
1909
- focusMode: t,
1910
- ref: o,
1911
- onClick: i,
1912
- children: a != null && a.streaming ? /* @__PURE__ */ d(ra, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ d(ta, { size: "size-4", monotone: !0 })
1913
- }
1982
+ const { data: o, error: s, isLoading: i, mutate: l } = Sn(
1983
+ [t, ...r],
1984
+ (h) => e(h, n),
1985
+ { ...a }
1914
1986
  );
1915
- }, $e = (e, t) => {
1916
- e({
1917
- type: nr,
1918
- payload: {
1919
- streaming: t
1920
- }
1921
- });
1922
- }, Wt = (e) => {
1923
- $e(e, !1), e({
1924
- type: xe,
1925
- payload: {
1926
- message: {
1927
- role: vt,
1928
- content: Hr
1929
- }
1930
- }
1987
+ return { data: o, error: s, isLoading: i, mutate: l };
1988
+ }, Fe = async ({
1989
+ getAccessToken: e,
1990
+ type: t,
1991
+ params: r
1992
+ }) => {
1993
+ const a = await e(), n = await Nn({
1994
+ accessToken: a,
1995
+ type: t,
1996
+ params: r
1931
1997
  });
1932
- }, pn = () => {
1933
- const { state: e, dispatch: t } = P(ve), { state: r, dispatch: a } = P(wt), [n, o] = G(""), { getAccessToken: s, user: i } = Me(), l = S(null), h = S(
1934
- null
1998
+ if (n.status === 200 && n.errors === void 0)
1999
+ return n.data;
2000
+ throw new Error("An error occurred while fetching the data.");
2001
+ }, xr = async ([e, t], r) => Fe({
2002
+ getAccessToken: r,
2003
+ type: Ue.GET_USER_PREFERENCES,
2004
+ params: {
2005
+ user: t
2006
+ }
2007
+ }), Cn = ({
2008
+ keys: e,
2009
+ getAccessToken: t
2010
+ }) => He({
2011
+ fetcher: xr,
2012
+ scope: "/preferences",
2013
+ keys: e,
2014
+ swrOptions: { keepPreviousData: !0 },
2015
+ getAccessToken: t
2016
+ }), In = ({
2017
+ keys: e,
2018
+ getAccessToken: t
2019
+ }) => {
2020
+ Tt(
2021
+ ["/preferences", ...e],
2022
+ (r) => xr(r, t)
1935
2023
  );
1936
- L(() => {
1937
- (async () => {
1938
- var u;
1939
- if (!e || e.messages.length === 0) {
1940
- (u = h == null ? void 0 : h.current) == null || u.cancel();
1941
- return;
1942
- }
1943
- const g = e.messages[e.messages.length - 1];
1944
- if (!(e.messages.length === 0 || g.message.role === we || g.message.role === Vr || g.message.role === vt || g.message.role === zr))
1945
- try {
1946
- const m = await hn({
1947
- accessToken: await s(),
1948
- name: "generate",
1949
- data: {
1950
- messages: e.messages,
1951
- model: e.engine || Se,
1952
- user: (i == null ? void 0 : i.username) || "",
1953
- id: e.id,
1954
- usage: e.usage
1955
- }
1956
- });
1957
- if (m && m.ok) {
1958
- const y = xt();
1959
- h.current = m.body.getReader();
1960
- const b = new TextDecoder();
1961
- for (; ; ) {
1962
- $e(t, !0);
1963
- const { done: k, value: p } = await h.current.read();
1964
- if (k) {
1965
- $e(t, !1);
1966
- break;
1967
- }
1968
- const N = b.decode(p, { stream: !0 }), A = N.indexOf(Bt);
1969
- if (A !== -1) {
1970
- const R = N.substring(0, A), E = JSON.parse(
1971
- N.substring(A + Bt.length)
1972
- );
1973
- t({
1974
- type: ar,
1975
- payload: {
1976
- model: E.model,
1977
- usage: E.usage
1978
- }
1979
- }), t({
1980
- type: xe,
1981
- payload: {
1982
- message: {
1983
- content: R,
1984
- role: we,
1985
- messageId: y,
1986
- processingTime: E.processingTime,
1987
- name: E.name
1988
- }
1989
- }
1990
- }), $e(t, !1);
1991
- break;
1992
- } else
1993
- t({
1994
- type: xe,
1995
- payload: {
1996
- message: {
1997
- content: N,
1998
- role: we,
1999
- messageId: y
2000
- }
2001
- }
2002
- });
2003
- }
2004
- } else
2005
- Wt(t);
2006
- } catch (m) {
2007
- console.error(m), Wt(t);
2008
- }
2009
- })();
2010
- }, [e == null ? void 0 : e.messages]);
2011
- const f = async (g) => {
2012
- g.preventDefault(), t({
2013
- type: xe,
2014
- payload: {
2015
- message: {
2016
- role: nt,
2017
- content: n
2018
- }
2019
- }
2020
- }), o("");
2021
- };
2022
- return L(() => {
2023
- if (r.prompt !== "") {
2024
- const g = r.prompt.endsWith(":") && !r.prompt.endsWith(": ") ? r.prompt + " " : r.prompt;
2025
- g.indexOf($t) !== -1 ? navigator.clipboard.readText().then((m) => {
2026
- o(g.replace($t, m));
2027
- }) : o(g), l.current && l.current.focus(), a({
2028
- type: or
2029
- });
2030
- }
2031
- }, [r, a]), L(() => {
2032
- e && e.usage === 0 && e.messages.length === 0 && l.current && l.current.focus();
2033
- }, [e]), /* @__PURE__ */ d(yt, { children: /* @__PURE__ */ d("form", { className: "mt-2", onSubmit: f, children: /* @__PURE__ */ d(
2034
- yr,
2035
- {
2036
- mode: "dark",
2037
- focusMode: "light",
2038
- ref: l,
2039
- name: "chat-input",
2040
- label: Ur,
2041
- helperText: "Press ENTER to add a new line",
2042
- helperTextOnFocus: !0,
2043
- required: !0,
2044
- value: n,
2045
- onChange: (g) => o(g.target.value),
2046
- onKeyDown: la([["mod+Enter", f]]),
2047
- leftElement: /* @__PURE__ */ d(fn, {}),
2048
- rightElement: /* @__PURE__ */ d(
2049
- cr,
2050
- {
2051
- disabled: e == null ? void 0 : e.streaming,
2052
- noBorder: !0,
2053
- type: "submit",
2054
- mode: "light",
2055
- focusMode: "light",
2056
- children: Pr
2057
- }
2058
- )
2059
- }
2060
- ) }) });
2061
- };
2062
- var Ae = { exports: {} }, Ye = {};
2063
- /**
2064
- * @license React
2065
- * use-sync-external-store-shim.production.js
2066
- *
2067
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2068
- *
2069
- * This source code is licensed under the MIT license found in the
2070
- * LICENSE file in the root directory of this source tree.
2071
- */
2072
- var jt;
2073
- function yn() {
2074
- if (jt) return Ye;
2075
- jt = 1;
2076
- var e = $;
2077
- function t(g, u) {
2078
- return g === u && (g !== 0 || 1 / g === 1 / u) || g !== g && u !== u;
2024
+ }, An = async ([e, t], r) => Fe({
2025
+ getAccessToken: r,
2026
+ type: Ue.GET_CHATS_STATS,
2027
+ params: {
2028
+ user: t
2079
2029
  }
2080
- var r = typeof Object.is == "function" ? Object.is : t, a = e.useState, n = e.useEffect, o = e.useLayoutEffect, s = e.useDebugValue;
2081
- function i(g, u) {
2082
- var m = u(), y = a({ inst: { value: m, getSnapshot: u } }), b = y[0].inst, k = y[1];
2083
- return o(
2084
- function() {
2085
- b.value = m, b.getSnapshot = u, l(b) && k({ inst: b });
2086
- },
2087
- [g, m, u]
2088
- ), n(
2089
- function() {
2090
- return l(b) && k({ inst: b }), g(function() {
2091
- l(b) && k({ inst: b });
2092
- });
2093
- },
2094
- [g]
2095
- ), s(m), m;
2030
+ }), es = ({
2031
+ keys: e,
2032
+ getAccessToken: t
2033
+ }) => He({
2034
+ fetcher: An,
2035
+ scope: "/stats",
2036
+ keys: e,
2037
+ getAccessToken: t
2038
+ }), wr = async ([e, t, r, a], n) => Fe({
2039
+ getAccessToken: n,
2040
+ type: Ue.GET_CHATS,
2041
+ params: {
2042
+ user: t,
2043
+ searchString: r,
2044
+ direction: a,
2045
+ limit: 1,
2046
+ truncateSize: 100
2096
2047
  }
2097
- function l(g) {
2098
- var u = g.getSnapshot;
2099
- g = g.value;
2100
- try {
2101
- var m = u();
2102
- return !r(g, m);
2103
- } catch {
2104
- return !0;
2105
- }
2048
+ }), ts = ({
2049
+ keys: e,
2050
+ getAccessToken: t
2051
+ }) => He({
2052
+ fetcher: wr,
2053
+ scope: "/history",
2054
+ keys: e,
2055
+ getAccessToken: t,
2056
+ swrOptions: {
2057
+ keepPreviousData: !0,
2058
+ dedupingInterval: 1e4
2106
2059
  }
2107
- function h(g, u) {
2108
- return u();
2060
+ }), On = ({
2061
+ keys: e,
2062
+ getAccessToken: t
2063
+ }) => {
2064
+ Tt(["/history", ...e], (r) => wr(r, t));
2065
+ }, Sr = async ([e], t) => Fe({
2066
+ getAccessToken: t,
2067
+ type: Ue.GET_SERVER_CAPABILITIES
2068
+ }), rs = ({
2069
+ getAccessToken: e
2070
+ }) => He({
2071
+ fetcher: Sr,
2072
+ scope: "/capabilities",
2073
+ keys: [],
2074
+ getAccessToken: e
2075
+ }), Ln = ({
2076
+ getAccessToken: e
2077
+ }) => {
2078
+ Tt(["/capabilities"], (t) => Sr(t, e));
2079
+ }, ve = $.createContext({
2080
+ state: {
2081
+ id: "",
2082
+ model: Se,
2083
+ engine: Se,
2084
+ usage: 0,
2085
+ messages: [],
2086
+ isComponent: !1,
2087
+ prompts: []
2088
+ },
2089
+ dispatch: () => {
2090
+ },
2091
+ serverStats: {
2092
+ version: "",
2093
+ models: [],
2094
+ plugins: [],
2095
+ engines: []
2109
2096
  }
2110
- var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? h : i;
2111
- return Ye.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, Ye;
2112
- }
2113
- var Xe = {};
2114
- /**
2115
- * @license React
2116
- * use-sync-external-store-shim.development.js
2117
- *
2118
- * Copyright (c) Meta Platforms, Inc. and affiliates.
2119
- *
2120
- * This source code is licensed under the MIT license found in the
2121
- * LICENSE file in the root directory of this source tree.
2097
+ }), Bn = $.createContext({
2098
+ state: { searchString: "", sortedCell: "", sortDirection: "" },
2099
+ dispatch: () => {
2100
+ }
2101
+ }), Nt = $.createContext({
2102
+ state: { prompt: "" },
2103
+ dispatch: () => {
2104
+ }
2105
+ });
2106
+ /*!
2107
+ @versini/ui-textarea v3.0.1
2108
+ © 2025 gizmette.com
2122
2109
  */
2123
- var qt;
2124
- function bn() {
2125
- return qt || (qt = 1, process.env.NODE_ENV !== "production" && function() {
2126
- function e(m, y) {
2127
- return m === y && (m !== 0 || 1 / m === 1 / y) || m !== m && y !== y;
2128
- }
2129
- function t(m, y) {
2130
- f || n.startTransition === void 0 || (f = !0, console.error(
2131
- "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
2132
- ));
2133
- var b = y();
2134
- if (!g) {
2135
- var k = y();
2136
- o(b, k) || (console.error(
2137
- "The result of getSnapshot should be cached to avoid an infinite loop"
2138
- ), g = !0);
2139
- }
2140
- k = s({
2141
- inst: { value: b, getSnapshot: y }
2142
- });
2143
- var p = k[0].inst, N = k[1];
2144
- return l(
2145
- function() {
2146
- p.value = b, p.getSnapshot = y, r(p) && N({ inst: p });
2147
- },
2148
- [m, b, y]
2149
- ), i(
2150
- function() {
2151
- return r(p) && N({ inst: p }), m(function() {
2152
- r(p) && N({ inst: p });
2153
- });
2154
- },
2155
- [m]
2156
- ), h(b), b;
2157
- }
2158
- function r(m) {
2159
- var y = m.getSnapshot;
2160
- m = m.value;
2161
- try {
2162
- var b = y();
2163
- return !o(m, b);
2164
- } catch {
2165
- return !0;
2166
- }
2167
- }
2168
- function a(m, y) {
2169
- return y();
2170
- }
2171
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
2172
- var n = $, o = typeof Object.is == "function" ? Object.is : e, s = n.useState, i = n.useEffect, l = n.useLayoutEffect, h = n.useDebugValue, f = !1, g = !1, u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : t;
2173
- Xe.useSyncExternalStore = n.useSyncExternalStore !== void 0 ? n.useSyncExternalStore : u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
2174
- }()), Xe;
2110
+ try {
2111
+ window.__VERSINI_UI_TEXTAREA__ || (window.__VERSINI_UI_TEXTAREA__ = {
2112
+ version: "3.0.1",
2113
+ buildTime: "01/06/2025 08:00 PM EST",
2114
+ homepage: "https://github.com/aversini/ui-components",
2115
+ license: "MIT"
2116
+ });
2117
+ } catch {
2118
+ }
2119
+ const Tr = "av-text-area", $n = "av-text-area-wrapper", at = "av-text-area-helper-text", Mn = "av-text-area__control--right", Dn = "av-text-area__control--left";
2120
+ function Vn() {
2121
+ const e = S(!1);
2122
+ return L(() => (e.current = !0, () => {
2123
+ e.current = !1;
2124
+ }), []), Z(() => e.current, []);
2125
+ }
2126
+ function zn(e) {
2127
+ return De(() => e.every((t) => t == null) ? () => {
2128
+ } : (t) => {
2129
+ e.forEach((r) => {
2130
+ typeof r == "function" ? r(t) : r != null && (r.current = t);
2131
+ });
2132
+ }, e);
2175
2133
  }
2176
- var Kt;
2177
- function vn() {
2178
- return Kt || (Kt = 1, process.env.NODE_ENV === "production" ? Ae.exports = /* @__PURE__ */ yn() : Ae.exports = /* @__PURE__ */ bn()), Ae.exports;
2134
+ const Pn = {
2135
+ x: 0,
2136
+ y: 0,
2137
+ width: 0,
2138
+ height: 0,
2139
+ top: 0,
2140
+ left: 0,
2141
+ bottom: 0,
2142
+ right: 0
2143
+ };
2144
+ function Xt(e) {
2145
+ const t = Vn(), r = S(0), a = S(null), [n, o] = G(Pn), s = De(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((i) => {
2146
+ const l = i[0];
2147
+ l && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
2148
+ a.current && t() && o(l.contentRect);
2149
+ }));
2150
+ }), [t]);
2151
+ return L(() => (a.current && (s == null || s.observe(a.current, e)), () => {
2152
+ s == null || s.disconnect(), r.current && cancelAnimationFrame(r.current);
2153
+ }), [s, e]), [a, n];
2179
2154
  }
2180
- var kn = /* @__PURE__ */ vn(), Jt = Object.prototype.hasOwnProperty;
2181
- function it(e, t) {
2182
- var r, a;
2183
- if (e === t) return !0;
2184
- if (e && t && (r = e.constructor) === t.constructor) {
2185
- if (r === Date) return e.getTime() === t.getTime();
2186
- if (r === RegExp) return e.toString() === t.toString();
2187
- if (r === Array) {
2188
- if ((a = e.length) === t.length)
2189
- for (; a-- && it(e[a], t[a]); ) ;
2190
- return a === -1;
2191
- }
2192
- if (!r || typeof e == "object") {
2193
- a = 0;
2194
- for (r in e)
2195
- if (Jt.call(e, r) && ++a && !Jt.call(t, r) || !(r in t) || !it(e[r], t[r])) return !1;
2196
- return Object.keys(t).length === a;
2197
- }
2155
+ function Un({
2156
+ value: e,
2157
+ defaultValue: t,
2158
+ finalValue: r,
2159
+ onChange: a = () => {
2160
+ },
2161
+ initialControlledDelay: n = 0
2162
+ }) {
2163
+ const [o, s] = G(!1), [i, l] = G(
2164
+ t !== void 0 ? t : r
2165
+ ), h = (f) => {
2166
+ l(f), a == null || a(f);
2167
+ };
2168
+ return L(() => {
2169
+ (async () => e !== void 0 && !o && n > 0 && (await new Promise(
2170
+ (f) => setTimeout(f, n)
2171
+ ), s(!0)))();
2172
+ }, [e, n, o]), e !== void 0 ? !o && n > 0 ? ["", a, !0] : [e, a, !0] : [i, h, !1];
2173
+ }
2174
+ function Hn(e) {
2175
+ const t = aa();
2176
+ if (!e)
2177
+ return t;
2178
+ if (typeof e == "number" || typeof e == "string")
2179
+ return `${e}${t}`;
2180
+ if (typeof e == "object") {
2181
+ const { id: r, prefix: a = "" } = e;
2182
+ return typeof r == "number" || typeof r == "string" ? `${a}${r}` : `${a}${t}`;
2198
2183
  }
2199
- return e !== e && t !== t;
2200
2184
  }
2201
- const X = /* @__PURE__ */ new WeakMap(), de = () => {
2202
- }, z = (
2203
- /*#__NOINLINE__*/
2204
- de()
2205
- ), ct = Object, _ = (e) => e === z, Q = (e) => typeof e == "function", ue = (e, t) => ({
2206
- ...e,
2207
- ...t
2208
- }), vr = (e) => Q(e.then), Qe = {}, Oe = {}, St = "undefined", Ue = typeof window != St, lt = typeof document != St, _n = () => Ue && typeof window.requestAnimationFrame != St, kr = (e, t) => {
2209
- const r = X.get(e);
2210
- return [
2211
- // Getter
2212
- () => !_(t) && e.get(t) || Qe,
2213
- // Setter
2214
- (a) => {
2215
- if (!_(t)) {
2216
- const n = e.get(t);
2217
- t in Oe || (Oe[t] = n), r[5](t, ue(n, a), n || Qe);
2218
- }
2219
- },
2220
- // Subscriber
2221
- r[6],
2222
- // Get server cache snapshot
2223
- () => !_(t) && t in Oe ? Oe[t] : !_(t) && e.get(t) || Qe
2224
- ];
2225
- };
2226
- let dt = !0;
2227
- const En = () => dt, [ut, mt] = Ue && window.addEventListener ? [
2228
- window.addEventListener.bind(window),
2229
- window.removeEventListener.bind(window)
2230
- ] : [
2231
- de,
2232
- de
2233
- ], xn = () => {
2234
- const e = lt && document.visibilityState;
2235
- return _(e) || e !== "hidden";
2236
- }, wn = (e) => (lt && document.addEventListener("visibilitychange", e), ut("focus", e), () => {
2237
- lt && document.removeEventListener("visibilitychange", e), mt("focus", e);
2238
- }), Sn = (e) => {
2239
- const t = () => {
2240
- dt = !0, e();
2241
- }, r = () => {
2242
- dt = !1;
2243
- };
2244
- return ut("online", t), ut("offline", r), () => {
2245
- mt("online", t), mt("offline", r);
2246
- };
2247
- }, Tn = {
2248
- isOnline: En,
2249
- isVisible: xn
2250
- }, Nn = {
2251
- initFocus: wn,
2252
- initReconnect: Sn
2253
- }, Yt = !$.useId, Te = !Ue || "Deno" in globalThis, Rn = (e) => _n() ? window.requestAnimationFrame(e) : setTimeout(e, 1), Ze = Te ? L : fe, et = typeof navigator < "u" && navigator.connection, Xt = !Te && et && ([
2254
- "slow-2g",
2255
- "2g"
2256
- ].includes(et.effectiveType) || et.saveData), Le = /* @__PURE__ */ new WeakMap(), tt = (e, t) => ct.prototype.toString.call(e) === `[object ${t}]`;
2257
- let Cn = 0;
2258
- const gt = (e) => {
2259
- const t = typeof e, r = tt(e, "Date"), a = tt(e, "RegExp"), n = tt(e, "Object");
2260
- let o, s;
2261
- if (ct(e) === e && !r && !a) {
2262
- if (o = Le.get(e), o) return o;
2263
- if (o = ++Cn + "~", Le.set(e, o), Array.isArray(e)) {
2264
- for (o = "@", s = 0; s < e.length; s++)
2265
- o += gt(e[s]) + ",";
2266
- Le.set(e, o);
2267
- }
2268
- if (n) {
2269
- o = "#";
2270
- const i = ct.keys(e).sort();
2271
- for (; !_(s = i.pop()); )
2272
- _(e[s]) || (o += s + ":" + gt(e[s]) + ",");
2273
- Le.set(e, o);
2274
- }
2275
- } else
2276
- o = r ? e.toJSON() : t == "symbol" ? e.toString() : t == "string" ? JSON.stringify(e) : "" + e;
2277
- return o;
2278
- }, Pe = (e) => {
2279
- if (Q(e))
2280
- try {
2281
- e = e();
2282
- } catch {
2283
- e = "";
2284
- }
2285
- const t = e;
2286
- return e = typeof e == "string" ? e : (Array.isArray(e) ? e.length : e) ? gt(e) : "", [
2287
- e,
2185
+ const Nr = "SET_ANNOUNCEMENT", Rr = "CLEAR_ANNOUNCEMENT", Fn = {
2186
+ alert: null,
2187
+ alertdialog: null,
2188
+ log: "polite",
2189
+ marquee: null,
2190
+ progressbar: null,
2191
+ status: "polite",
2192
+ timer: "assertive"
2193
+ }, Gn = (e, t) => {
2194
+ switch (t == null ? void 0 : t.type) {
2195
+ case Nr:
2196
+ return {
2197
+ ...e,
2198
+ announcement: t.payload
2199
+ };
2200
+ case Rr:
2201
+ return {
2202
+ ...e,
2203
+ announcement: null
2204
+ };
2205
+ default:
2206
+ return e;
2207
+ }
2208
+ }, Wn = ({
2209
+ onAnnouncementClear: e,
2210
+ dispatch: t
2211
+ }) => {
2212
+ t({
2213
+ type: Rr
2214
+ }), typeof e == "function" && e();
2215
+ }, Qt = ({
2216
+ children: e,
2217
+ clearAnnouncementDelay: t,
2218
+ clearAnnouncementTimeoutRef: r,
2219
+ onAnnouncementClear: a,
2220
+ dispatch: n
2221
+ }) => {
2222
+ clearTimeout(r.current), e !== null && n({
2223
+ type: Nr,
2224
+ payload: e
2225
+ }), t && (r.current = setTimeout(
2226
+ () => Wn({
2227
+ onAnnouncementClear: a,
2228
+ dispatch: n
2229
+ }),
2288
2230
  t
2289
- ];
2290
- };
2291
- let In = 0;
2292
- const ht = () => ++In, _r = 0, Er = 1, xr = 2, An = 3;
2293
- var _e = {
2294
- __proto__: null,
2295
- ERROR_REVALIDATE_EVENT: An,
2296
- FOCUS_EVENT: _r,
2297
- MUTATE_EVENT: xr,
2298
- RECONNECT_EVENT: Er
2231
+ ));
2232
+ }, jn = ({
2233
+ children: e,
2234
+ announcementTimeoutRef: t,
2235
+ announcementDelay: r,
2236
+ clearAnnouncementDelay: a,
2237
+ clearAnnouncementTimeoutRef: n,
2238
+ onAnnouncementClear: o,
2239
+ dispatch: s
2240
+ }) => {
2241
+ clearTimeout(t.current), r ? t.current = setTimeout(Qt, r, {
2242
+ children: e,
2243
+ clearAnnouncementDelay: a,
2244
+ clearAnnouncementTimeoutRef: n,
2245
+ onAnnouncementClear: o,
2246
+ dispatch: s
2247
+ }) : Qt({
2248
+ children: e,
2249
+ clearAnnouncementDelay: a,
2250
+ clearAnnouncementTimeoutRef: n,
2251
+ onAnnouncementClear: o,
2252
+ dispatch: s
2253
+ });
2299
2254
  };
2300
- async function wr(...e) {
2301
- const [t, r, a, n] = e, o = ue({
2302
- populateCache: !0,
2303
- throwOnError: !0
2304
- }, typeof n == "boolean" ? {
2305
- revalidate: n
2306
- } : n || {});
2307
- let s = o.populateCache;
2308
- const i = o.rollbackOnError;
2309
- let l = o.optimisticData;
2310
- const h = (u) => typeof i == "function" ? i(u) : i !== !1, f = o.throwOnError;
2311
- if (Q(r)) {
2312
- const u = r, m = [], y = t.keys();
2313
- for (const b of y)
2314
- // Skip the special useSWRInfinite and useSWRSubscription keys.
2315
- !/^\$(inf|sub)\$/.test(b) && u(t.get(b)._k) && m.push(b);
2316
- return Promise.all(m.map(g));
2317
- }
2318
- return g(r);
2319
- async function g(u) {
2320
- const [m] = Pe(u);
2321
- if (!m) return;
2322
- const [y, b] = kr(t, m), [k, p, N, A] = X.get(t), R = () => {
2323
- const B = k[m];
2324
- return (Q(o.revalidate) ? o.revalidate(y().data, u) : o.revalidate !== !1) && (delete N[m], delete A[m], B && B[0]) ? B[0](xr).then(() => y().data) : y().data;
2325
- };
2326
- if (e.length < 3)
2327
- return R();
2328
- let E = a, C;
2329
- const ee = ht();
2330
- p[m] = [
2331
- ee,
2332
- 0
2333
- ];
2334
- const x = !_(l), oe = y(), H = oe.data, W = oe._c, te = _(W) ? H : W;
2335
- if (x && (l = Q(l) ? l(te, H) : l, b({
2336
- data: l,
2337
- _c: te
2338
- })), Q(E))
2339
- try {
2340
- E = E(te);
2341
- } catch (B) {
2342
- C = B;
2343
- }
2344
- if (E && vr(E))
2345
- if (E = await E.catch((B) => {
2346
- C = B;
2347
- }), ee !== p[m][0]) {
2348
- if (C) throw C;
2349
- return E;
2350
- } else C && x && h(C) && (s = !0, b({
2351
- data: te,
2352
- _c: z
2353
- }));
2354
- if (s && !C)
2355
- if (Q(s)) {
2356
- const B = s(E, te);
2357
- b({
2358
- data: B,
2359
- error: z,
2360
- _c: z
2361
- });
2362
- } else
2363
- b({
2364
- data: E,
2365
- error: z,
2366
- _c: z
2367
- });
2368
- if (p[m][1] = ht(), Promise.resolve(R()).then(() => {
2369
- b({
2370
- _c: z
2371
- });
2372
- }), C) {
2373
- if (f) throw C;
2374
- return;
2255
+ function qn({
2256
+ children: e,
2257
+ className: t,
2258
+ politeness: r,
2259
+ role: a = null,
2260
+ announcementDelay: n,
2261
+ clearAnnouncementDelay: o,
2262
+ onAnnouncementClear: s,
2263
+ visible: i,
2264
+ ...l
2265
+ }) {
2266
+ const h = S(null), f = S(null), [m, u] = Be(Gn, {
2267
+ announcement: null
2268
+ });
2269
+ let g = r;
2270
+ typeof g > "u" && (g = a ? Fn[a] : "assertive"), L(() => {
2271
+ jn({
2272
+ announcementTimeoutRef: h,
2273
+ announcementDelay: n,
2274
+ children: e,
2275
+ clearAnnouncementDelay: o,
2276
+ clearAnnouncementTimeoutRef: f,
2277
+ onAnnouncementClear: s,
2278
+ dispatch: u
2279
+ });
2280
+ }, [
2281
+ e,
2282
+ n,
2283
+ o,
2284
+ s
2285
+ ]);
2286
+ const p = c(t, {
2287
+ "sr-only": !i
2288
+ });
2289
+ return /* @__PURE__ */ d(
2290
+ "div",
2291
+ {
2292
+ "aria-live": g,
2293
+ ...a && { role: a },
2294
+ className: p,
2295
+ ...l,
2296
+ children: m.announcement
2375
2297
  }
2376
- return E;
2377
- }
2298
+ );
2378
2299
  }
2379
- const Qt = (e, t) => {
2380
- for (const r in e)
2381
- e[r][0] && e[r][0](t);
2382
- }, On = (e, t) => {
2383
- if (!X.has(e)) {
2384
- const r = ue(Nn, t), a = {}, n = wr.bind(z, e);
2385
- let o = de;
2386
- const s = {}, i = (f, g) => {
2387
- const u = s[f] || [];
2388
- return s[f] = u, u.push(g), () => u.splice(u.indexOf(g), 1);
2389
- }, l = (f, g, u) => {
2390
- e.set(f, g);
2391
- const m = s[f];
2392
- if (m)
2393
- for (const y of m)
2394
- y(g, u);
2395
- }, h = () => {
2396
- if (!X.has(e) && (X.set(e, [
2397
- a,
2398
- {},
2399
- {},
2400
- {},
2401
- n,
2402
- l,
2403
- i
2404
- ]), !Te)) {
2405
- const f = r.initFocus(setTimeout.bind(z, Qt.bind(z, a, _r))), g = r.initReconnect(setTimeout.bind(z, Qt.bind(z, a, Er)));
2406
- o = () => {
2407
- f && f(), g && g(), X.delete(e);
2408
- };
2300
+ /*!
2301
+ @versini/ui-liveregion v1.3.1
2302
+ © 2025 gizmette.com
2303
+ */
2304
+ try {
2305
+ window.__VERSINI_UI_LIVEREGION__ || (window.__VERSINI_UI_LIVEREGION__ = {
2306
+ version: "1.3.1",
2307
+ buildTime: "01/06/2025 08:00 PM EST",
2308
+ homepage: "https://github.com/aversini/ui-components",
2309
+ license: "MIT"
2310
+ });
2311
+ } catch {
2312
+ }
2313
+ const Kn = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", Jn = ({ mode: e }) => c({
2314
+ "bg-surface-darker text-copy-lighter caret-copy-light": e === "dark",
2315
+ "bg-surface-lighter text-copy-dark caret-copy-dark": e === "light",
2316
+ "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": e === "system",
2317
+ "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": e === "alt-system"
2318
+ }), Yn = ({
2319
+ focusMode: e
2320
+ }) => c("focus:outline focus:outline-2 focus:outline-offset-2", {
2321
+ "focus:outline-focus-dark": e === "dark",
2322
+ "focus:outline-focus-light": e === "light",
2323
+ "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
2324
+ "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
2325
+ }), Xn = ({
2326
+ noBorder: e,
2327
+ error: t
2328
+ }) => c("border-2", {
2329
+ "border-border-dark": !e && !t,
2330
+ "focus:border-border-dark": !e && t,
2331
+ "border-border-error-dark": !e && t,
2332
+ "border-transparent": e
2333
+ }), Qn = ({
2334
+ disabled: e,
2335
+ raw: t,
2336
+ error: r,
2337
+ mode: a,
2338
+ leftElement: n,
2339
+ rightElement: o
2340
+ }) => {
2341
+ if (t)
2342
+ return "";
2343
+ if (e)
2344
+ return c(
2345
+ "transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
2346
+ {
2347
+ "translate-x-[12px]": o === !0 && !n || !o && !n
2409
2348
  }
2410
- };
2411
- return h(), [
2412
- e,
2413
- n,
2414
- h,
2415
- o
2416
- ];
2417
- }
2418
- return [
2419
- e,
2420
- X.get(e)[4]
2421
- ];
2422
- }, Ln = (e, t, r, a, n) => {
2423
- const o = r.errorRetryCount, s = n.retryCount, i = ~~((Math.random() + 0.5) * (1 << (s < 8 ? s : 8))) * r.errorRetryInterval;
2424
- !_(o) && s > o || setTimeout(a, i, n);
2425
- }, Bn = it, [Tt, $n] = On(/* @__PURE__ */ new Map()), Mn = ue(
2426
- {
2427
- // events
2428
- onLoadingSlow: de,
2429
- onSuccess: de,
2430
- onError: de,
2431
- onErrorRetry: Ln,
2432
- onDiscarded: de,
2433
- // switches
2434
- revalidateOnFocus: !0,
2435
- revalidateOnReconnect: !0,
2436
- revalidateIfStale: !0,
2437
- shouldRetryOnError: !0,
2438
- // timeouts
2439
- errorRetryInterval: Xt ? 1e4 : 5e3,
2440
- focusThrottleInterval: 5 * 1e3,
2441
- dedupingInterval: 2 * 1e3,
2442
- loadingTimeout: Xt ? 5e3 : 3e3,
2443
- // providers
2444
- compare: Bn,
2445
- isPaused: () => !1,
2446
- cache: Tt,
2447
- mutate: $n,
2448
- fallback: {}
2449
- },
2450
- // use web preset by default
2451
- Tn
2452
- ), Dn = (e, t) => {
2453
- const r = ue(e, t);
2454
- if (t) {
2455
- const { use: a, fallback: n } = e, { use: o, fallback: s } = t;
2456
- a && o && (r.use = a.concat(o)), n && s && (r.fallback = ue(n, s));
2457
- }
2458
- return r;
2459
- }, Vn = Zr({}), zn = "$inf$", Sr = Ue && window.__SWR_DEVTOOLS_USE__, Un = Sr ? window.__SWR_DEVTOOLS_USE__ : [], Pn = () => {
2460
- Sr && (window.__SWR_DEVTOOLS_REACT__ = $);
2461
- }, Hn = (e) => Q(e[1]) ? [
2462
- e[0],
2463
- e[1],
2464
- e[2] || {}
2465
- ] : [
2466
- e[0],
2467
- null,
2468
- (e[1] === null ? e[2] : e[1]) || {}
2469
- ], Fn = () => ue(Mn, P(Vn)), Gn = (e, t) => {
2470
- const [r, a] = Pe(e), [, , , n] = X.get(Tt);
2471
- if (n[r]) return n[r];
2472
- const o = t(a);
2473
- return n[r] = o, o;
2474
- }, Wn = (e) => (t, r, a) => e(t, r && ((...o) => {
2475
- const [s] = Pe(t), [, , , i] = X.get(Tt);
2476
- if (s.startsWith(zn))
2477
- return r(...o);
2478
- const l = i[s];
2479
- return _(l) ? r(...o) : (delete i[s], l);
2480
- }), a), jn = Un.concat(Wn), qn = (e) => function(...r) {
2481
- const a = Fn(), [n, o, s] = Hn(r), i = Dn(a, s);
2482
- let l = e;
2483
- const { use: h } = i, f = (h || []).concat(jn);
2484
- for (let g = f.length; g--; )
2485
- l = f[g](l);
2486
- return l(n, o || i.fetcher || null, i);
2487
- }, Kn = (e, t, r) => {
2488
- const a = t[e] || (t[e] = []);
2489
- return a.push(r), () => {
2490
- const n = a.indexOf(r);
2491
- n >= 0 && (a[n] = a[a.length - 1], a.pop());
2349
+ );
2350
+ if (!r)
2351
+ return c(
2352
+ "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
2353
+ {
2354
+ "translate-x-[12px]": o === !0 && !n || !o && !n,
2355
+ "text-copy-medium": a === "dark",
2356
+ "text-copy-dark": a === "light",
2357
+ "text-copy-dark dark:text-copy-medium": a === "system",
2358
+ "text-copy-medium dark:text-copy-dark": a === "alt-system"
2359
+ }
2360
+ );
2361
+ if (r)
2362
+ return c(
2363
+ "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
2364
+ {
2365
+ "translate-x-[12px]": o === !0 && !n || !o && !n,
2366
+ "text-copy-medium": a === "dark",
2367
+ "text-copy-error-dark": a === "light",
2368
+ "text-copy-error-dark dark:text-copy-error-light": a === "system",
2369
+ "text-copy-medium dark:text-copy-error-dark": a === "alt-system"
2370
+ }
2371
+ );
2372
+ }, Zn = ({
2373
+ error: e,
2374
+ raw: t,
2375
+ mode: r,
2376
+ disabled: a
2377
+ }) => {
2378
+ if (t)
2379
+ return "";
2380
+ if (a)
2381
+ return c(
2382
+ at,
2383
+ "absolute px-2 cursor-not-allowed opacity-50 font-medium"
2384
+ );
2385
+ if (!e)
2386
+ return c(at, "absolute px-2 font-medium", {
2387
+ "text-copy-medium": r === "dark",
2388
+ "text-copy-dark": r === "light",
2389
+ "text-copy-dark dark:text-copy-medium": r === "system",
2390
+ "text-copy-medium dark:text-copy-dark": r === "alt-system"
2391
+ });
2392
+ if (e)
2393
+ return c(at, "absolute px-2 font-medium", {
2394
+ "text-copy-error-light": r === "dark",
2395
+ "text-copy-error-dark": r === "light",
2396
+ "text-copy-error-dark dark:text-copy-error-light": r === "system",
2397
+ "dark:text-copy-error-dark text-copy-error-light": r === "alt-system"
2398
+ });
2399
+ }, eo = ({
2400
+ className: e,
2401
+ textAreaClassName: t,
2402
+ raw: r,
2403
+ focusMode: a,
2404
+ disabled: n,
2405
+ noBorder: o,
2406
+ error: s,
2407
+ mode: i,
2408
+ leftElement: l,
2409
+ rightElement: h
2410
+ }) => {
2411
+ const f = r ? e : c(
2412
+ "relative flex w-full flex-col justify-center",
2413
+ $n,
2414
+ e
2415
+ ), m = r ? c(t) : c(
2416
+ Tr,
2417
+ t,
2418
+ Kn(),
2419
+ Jn({ mode: i }),
2420
+ Yn({ focusMode: a }),
2421
+ Xn({
2422
+ noBorder: o,
2423
+ error: s
2424
+ }),
2425
+ {
2426
+ "disabled:cursor-not-allowed disabled:opacity-50": n
2427
+ }
2428
+ ), u = r ? void 0 : "sr-only", g = Qn({
2429
+ disabled: n,
2430
+ raw: r,
2431
+ error: s,
2432
+ mode: i,
2433
+ rightElement: h,
2434
+ leftElement: l
2435
+ }), p = Zn({
2436
+ error: s,
2437
+ raw: r,
2438
+ mode: i,
2439
+ disabled: n
2440
+ }), b = r ? void 0 : c(Mn, "absolute"), k = r ? void 0 : c(Dn, "absolute");
2441
+ return {
2442
+ wrapper: f,
2443
+ textArea: m,
2444
+ accessibleLabel: u,
2445
+ visibleLabel: g,
2446
+ helperText: p,
2447
+ rightElement: b,
2448
+ leftElement: k
2492
2449
  };
2493
- };
2494
- Pn();
2495
- const rt = $.use || // This extra generic is to avoid TypeScript mixing up the generic and JSX sytax
2496
- // and emitting an error.
2497
- // We assume that this is only for the `use(thenable)` case, not `use(context)`.
2498
- // https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45
2499
- ((e) => {
2500
- switch (e.status) {
2501
- case "pending":
2502
- throw e;
2503
- case "fulfilled":
2504
- return e.value;
2505
- case "rejected":
2506
- throw e.reason;
2507
- default:
2508
- throw e.status = "pending", e.then((t) => {
2509
- e.status = "fulfilled", e.value = t;
2510
- }, (t) => {
2511
- e.status = "rejected", e.reason = t;
2512
- }), e;
2450
+ }, to = ({
2451
+ scrollHeight: e,
2452
+ currentHeight: t,
2453
+ currentLabelOffset: r = 0,
2454
+ currentHelperTextOffset: a = 0
2455
+ }) => {
2456
+ let n, o;
2457
+ if (e > 0 && e !== t) {
2458
+ const s = e - t, i = Math.abs(s / 24);
2459
+ n = r + -1 * Math.sign(s) * (12 * i), o = a + Math.sign(s) * (12 * i);
2513
2460
  }
2514
- }), at = {
2515
- dedupe: !0
2516
- }, Jn = (e, t, r) => {
2517
- const { cache: a, compare: n, suspense: o, fallbackData: s, revalidateOnMount: i, revalidateIfStale: l, refreshInterval: h, refreshWhenHidden: f, refreshWhenOffline: g, keepPreviousData: u } = r, [m, y, b, k] = X.get(a), [p, N] = Pe(e), A = S(!1), R = S(!1), E = S(p), C = S(t), ee = S(r), x = () => ee.current, oe = () => x().isVisible() && x().isOnline(), [H, W, te, B] = kr(a, p), j = S({}).current, me = _(s) ? _(r.fallback) ? z : r.fallback[p] : s, q = (w, v) => {
2518
- for (const O in j) {
2519
- const T = O;
2520
- if (T === "data") {
2521
- if (!n(w[T], v[T]) && (!_(w[T]) || !n(ge, v[T])))
2522
- return !1;
2523
- } else if (v[T] !== w[T])
2524
- return !1;
2525
- }
2526
- return !0;
2527
- }, ke = De(() => {
2528
- const w = !p || !t ? !1 : _(i) ? x().isPaused() || o ? !1 : l !== !1 : i, v = (V) => {
2529
- const ae = ue(V);
2530
- return delete ae._k, w ? {
2531
- isValidating: !0,
2532
- isLoading: !0,
2533
- ...ae
2534
- } : ae;
2535
- }, O = H(), T = B(), U = v(O), ce = O === T ? U : v(T);
2536
- let M = U;
2537
- return [
2538
- () => {
2539
- const V = v(H());
2540
- return q(V, M) ? (M.data = V.data, M.isLoading = V.isLoading, M.isValidating = V.isValidating, M.error = V.error, M) : (M = V, V);
2541
- },
2542
- () => ce
2543
- ];
2544
- }, [
2545
- a,
2546
- p
2547
- ]), K = kn.useSyncExternalStore(Z(
2548
- (w) => te(p, (v, O) => {
2549
- q(O, v) || w();
2550
- }),
2551
- // eslint-disable-next-line react-hooks/exhaustive-deps
2552
- [
2553
- a,
2554
- p
2555
- ]
2556
- ), ke[0], ke[1]), se = !A.current, Ne = m[p] && m[p].length > 0, ie = K.data, re = _(ie) ? me && vr(me) ? rt(me) : me : ie, pe = K.error, Re = S(re), ge = u ? _(ie) ? Re.current : ie : re, Ce = Ne && !_(pe) ? !1 : se && !_(i) ? i : x().isPaused() ? !1 : o ? _(re) ? !1 : l : _(re) || l, J = !!(p && t && se && Ce), Y = _(K.isValidating) ? J : K.isValidating, We = _(K.isLoading) ? J : K.isLoading, he = Z(
2557
- async (w) => {
2558
- const v = C.current;
2559
- if (!p || !v || R.current || x().isPaused())
2560
- return !1;
2561
- let O, T, U = !0;
2562
- const ce = w || {}, M = !b[p] || !ce.dedupe, V = () => Yt ? !R.current && p === E.current && A.current : p === E.current, ae = {
2563
- isValidating: !1,
2564
- isLoading: !1
2565
- }, At = () => {
2566
- W(ae);
2567
- }, Ot = () => {
2568
- const F = b[p];
2569
- F && F[1] === T && delete b[p];
2570
- }, Lt = {
2571
- isValidating: !0
2572
- };
2573
- _(H().data) && (Lt.isLoading = !0);
2574
- try {
2575
- if (M && (W(Lt), r.loadingTimeout && _(H().data) && setTimeout(() => {
2576
- U && V() && x().onLoadingSlow(p, r);
2577
- }, r.loadingTimeout), b[p] = [
2578
- v(N),
2579
- ht()
2580
- ]), [O, T] = b[p], O = await O, M && setTimeout(Ot, r.dedupingInterval), !b[p] || b[p][1] !== T)
2581
- return M && V() && x().onDiscarded(p), !1;
2582
- ae.error = z;
2583
- const F = y[p];
2584
- if (!_(F) && // case 1
2585
- (T <= F[0] || // case 2
2586
- T <= F[1] || // case 3
2587
- F[1] === 0))
2588
- return At(), M && V() && x().onDiscarded(p), !1;
2589
- const ne = H().data;
2590
- ae.data = n(ne, O) ? ne : O, M && V() && x().onSuccess(O, p, r);
2591
- } catch (F) {
2592
- Ot();
2593
- const ne = x(), { shouldRetryOnError: je } = ne;
2594
- ne.isPaused() || (ae.error = F, M && V() && (ne.onError(F, p, ne), (je === !0 || Q(je) && je(F)) && (!x().revalidateOnFocus || !x().revalidateOnReconnect || oe()) && ne.onErrorRetry(F, p, ne, (Br) => {
2595
- const qe = m[p];
2596
- qe && qe[0] && qe[0](_e.ERROR_REVALIDATE_EVENT, Br);
2597
- }, {
2598
- retryCount: (ce.retryCount || 0) + 1,
2599
- dedupe: !0
2600
- })));
2461
+ return {
2462
+ labelOffset: n,
2463
+ helperTextOffset: o,
2464
+ scrollHeight: e
2465
+ };
2466
+ }, Cr = $.forwardRef(
2467
+ ({
2468
+ id: e,
2469
+ name: t,
2470
+ label: r,
2471
+ error: a = !1,
2472
+ raw: n = !1,
2473
+ className: o,
2474
+ textAreaClassName: s,
2475
+ mode: i = "system",
2476
+ focusMode: l = "system",
2477
+ value: h,
2478
+ defaultValue: f,
2479
+ disabled: m = !1,
2480
+ noBorder: u = !1,
2481
+ labelId: g,
2482
+ helperText: p = "",
2483
+ helperTextOnFocus: b = !1,
2484
+ rightElement: k,
2485
+ leftElement: y,
2486
+ onChange: N,
2487
+ onFocus: A,
2488
+ onBlur: R,
2489
+ ...E
2490
+ }, C) => {
2491
+ var ee;
2492
+ const x = S(null), oe = zn([C, x]), [H, W] = Xt(), [te, B] = Xt(), j = S(80), me = S(-25), q = S(null), ke = S(30), K = S(null), se = Hn({ id: e, prefix: `${Tr}-` }), [Ne, ie] = G(0), [re, pe] = G(0), [Re, ge] = G(
2493
+ !!(!b && p)
2494
+ ), Ce = `${t} error, ${p}`, J = eo({
2495
+ className: o,
2496
+ textAreaClassName: s,
2497
+ error: a,
2498
+ raw: n,
2499
+ focusMode: l,
2500
+ disabled: m,
2501
+ noBorder: u,
2502
+ mode: i,
2503
+ rightElement: !!k,
2504
+ leftElement: !!y
2505
+ }), [Y, We] = Un({
2506
+ value: h,
2507
+ initialControlledDelay: 20,
2508
+ defaultValue: f,
2509
+ onChange: (v) => {
2510
+ N && N({
2511
+ target: {
2512
+ value: v
2513
+ }
2514
+ });
2601
2515
  }
2602
- return U = !1, At(), !0;
2603
- },
2604
- // `setState` is immutable, and `eventsCallback`, `fnArg`, and
2605
- // `keyValidating` are depending on `key`, so we can exclude them from
2606
- // the deps array.
2607
- //
2608
- // FIXME:
2609
- // `fn` and `config` might be changed during the lifecycle,
2610
- // but they might be changed every render like this.
2611
- // `useSWR('key', () => fetch('/api/'), { suspense: true })`
2612
- // So we omit the values from the deps array
2613
- // even though it might cause unexpected behaviors.
2614
- // eslint-disable-next-line react-hooks/exhaustive-deps
2615
- [
2616
- p,
2617
- a
2618
- ]
2619
- ), Ie = Z(
2620
- // Use callback to make sure `keyRef.current` returns latest result every time
2621
- (...w) => wr(a, E.current, ...w),
2622
- // eslint-disable-next-line react-hooks/exhaustive-deps
2623
- []
2624
- );
2625
- if (Ze(() => {
2626
- C.current = t, ee.current = r, _(ie) || (Re.current = ie);
2627
- }), Ze(() => {
2628
- if (!p) return;
2629
- const w = he.bind(z, at);
2630
- let v = 0;
2631
- const T = Kn(p, m, (U, ce = {}) => {
2632
- if (U == _e.FOCUS_EVENT) {
2633
- const M = Date.now();
2634
- x().revalidateOnFocus && M > v && oe() && (v = M + x().focusThrottleInterval, w());
2635
- } else if (U == _e.RECONNECT_EVENT)
2636
- x().revalidateOnReconnect && oe() && w();
2637
- else {
2638
- if (U == _e.MUTATE_EVENT)
2639
- return he();
2640
- if (U == _e.ERROR_REVALIDATE_EVENT)
2641
- return he(ce);
2516
+ }), he = (v) => {
2517
+ We(v.target.value);
2518
+ }, Ie = (v) => {
2519
+ b && p && ge(!0), A && A(v);
2520
+ }, w = (v) => {
2521
+ b && p && !Y && ge(!1), R && R(v);
2522
+ };
2523
+ return fe(() => {
2524
+ W && W.width && ie(W.width + 18 + 10);
2525
+ }, [W]), fe(() => {
2526
+ B && B.width && pe(B.width + 18 + 10);
2527
+ }, [B]), fe(() => {
2528
+ n || x && x.current && Y !== void 0 && (x.current.style.height = "inherit", x.current.style.height = x.current.scrollHeight + "px");
2529
+ }, [Y, n]), fe(() => {
2530
+ n || setTimeout(() => {
2531
+ var v;
2532
+ (v = q == null ? void 0 : q.current) == null || v.style.setProperty(
2533
+ "--av-text-area-wrapper-transition",
2534
+ Y ? "none" : "all 0.2s ease-out"
2535
+ );
2536
+ }, 0);
2537
+ }, [Y, n]), fe(() => {
2538
+ var v, O;
2539
+ if (!n && x && x.current && Y !== void 0) {
2540
+ const { labelOffset: T, helperTextOffset: P, scrollHeight: ce } = to({
2541
+ scrollHeight: x.current.scrollHeight,
2542
+ currentHeight: j.current,
2543
+ currentLabelOffset: me.current,
2544
+ currentHelperTextOffset: ke.current
2545
+ });
2546
+ T && (me.current = T, (v = q == null ? void 0 : q.current) == null || v.style.setProperty(
2547
+ "--av-text-area-label",
2548
+ `${T}px`
2549
+ )), P && (ke.current = P, (O = K == null ? void 0 : K.current) == null || O.style.setProperty(
2550
+ "--av-text-area-helper-text",
2551
+ `${P}px`
2552
+ )), j.current = ce || j.current;
2642
2553
  }
2554
+ }, [Y, n]), B.width > 0 && ((ee = q == null ? void 0 : q.current) == null || ee.style.setProperty(
2555
+ "--tw-translate-x",
2556
+ `${12 + B.width + 5}px`
2557
+ )), /* @__PURE__ */ I("div", { className: J.wrapper, children: [
2558
+ /* @__PURE__ */ d(
2559
+ "label",
2560
+ {
2561
+ htmlFor: se,
2562
+ id: g,
2563
+ className: J.accessibleLabel,
2564
+ children: r
2565
+ }
2566
+ ),
2567
+ y && /* @__PURE__ */ d(
2568
+ "div",
2569
+ {
2570
+ ref: te,
2571
+ className: J.leftElement,
2572
+ children: y
2573
+ }
2574
+ ),
2575
+ /* @__PURE__ */ d(
2576
+ "textarea",
2577
+ {
2578
+ ref: oe,
2579
+ id: se,
2580
+ name: t,
2581
+ disabled: m,
2582
+ placeholder: n ? void 0 : " ",
2583
+ className: J.textArea,
2584
+ rows: 1,
2585
+ ...p && { "aria-describedby": `${se}-helper` },
2586
+ ...a && { "aria-invalid": "true" },
2587
+ ...k && !y && !n && { style: { paddingRight: Ne } },
2588
+ ...y && !k && !n && { style: { paddingLeft: re } },
2589
+ ...k && y && !n && {
2590
+ style: {
2591
+ paddingRight: Ne,
2592
+ paddingLeft: re
2593
+ }
2594
+ },
2595
+ value: Y,
2596
+ onChange: he,
2597
+ onFocus: Ie,
2598
+ onBlur: w,
2599
+ ...E
2600
+ }
2601
+ ),
2602
+ !n && /* @__PURE__ */ d(
2603
+ "label",
2604
+ {
2605
+ ref: q,
2606
+ "aria-hidden": !0,
2607
+ htmlFor: se,
2608
+ className: `${J.visibleLabel}`,
2609
+ children: r
2610
+ }
2611
+ ),
2612
+ Re && /* @__PURE__ */ d(
2613
+ "div",
2614
+ {
2615
+ ref: K,
2616
+ id: `${se}-helper`,
2617
+ className: J.helperText,
2618
+ children: p
2619
+ }
2620
+ ),
2621
+ k && /* @__PURE__ */ d(
2622
+ "div",
2623
+ {
2624
+ ref: H,
2625
+ className: J.rightElement,
2626
+ children: k
2627
+ }
2628
+ ),
2629
+ a && p && /* @__PURE__ */ d(qn, { politeness: "polite", clearAnnouncementDelay: 500, children: Ce })
2630
+ ] });
2631
+ }
2632
+ );
2633
+ Cr.displayName = "TextArea";
2634
+ const ro = ({
2635
+ mode: e = "light",
2636
+ focusMode: t = "light",
2637
+ radius: r = "small"
2638
+ }) => {
2639
+ const { state: a, dispatch: n } = U(ve), o = S(null), s = S(!1), i = (l) => {
2640
+ l.preventDefault(), n({
2641
+ type: ar
2643
2642
  });
2644
- return R.current = !1, E.current = p, A.current = !0, W({
2645
- _k: N
2646
- }), Ce && (_(re) || Te ? w() : Rn(w)), () => {
2647
- R.current = !0, T();
2648
- };
2649
- }, [
2650
- p
2651
- ]), Ze(() => {
2652
- let w;
2653
- function v() {
2654
- const T = Q(h) ? h(H().data) : h;
2655
- T && w !== -1 && (w = setTimeout(O, T));
2656
- }
2657
- function O() {
2658
- !H().error && (f || x().isVisible()) && (g || x().isOnline()) ? he(at).then(v) : v();
2643
+ };
2644
+ return L(() => {
2645
+ var l;
2646
+ (a == null ? void 0 : a.streaming) === !0 && !s.current && o.current && (s.current = !0, o.current.focus()), (a == null ? void 0 : a.streaming) === !1 && (s.current = !1, (l = o.current) == null || l.blur());
2647
+ }, [a]), /* @__PURE__ */ d(
2648
+ cr,
2649
+ {
2650
+ noBorder: !0,
2651
+ radius: r,
2652
+ mode: e,
2653
+ focusMode: t,
2654
+ ref: o,
2655
+ onClick: i,
2656
+ children: a != null && a.streaming ? /* @__PURE__ */ d(oa, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ d(na, { size: "size-4", monotone: !0 })
2659
2657
  }
2660
- return v(), () => {
2661
- w && (clearTimeout(w), w = -1);
2662
- };
2663
- }, [
2664
- h,
2665
- f,
2666
- g,
2667
- p
2668
- ]), ea(ge), o && _(re) && p) {
2669
- if (!Yt && Te)
2670
- throw new Error("Fallback data is required when using Suspense in SSR.");
2671
- C.current = t, ee.current = r, R.current = !1;
2672
- const w = k[p];
2673
- if (!_(w)) {
2674
- const v = Ie(w);
2675
- rt(v);
2658
+ );
2659
+ }, $e = (e, t) => {
2660
+ e({
2661
+ type: or,
2662
+ payload: {
2663
+ streaming: t
2676
2664
  }
2677
- if (_(pe)) {
2678
- const v = he(at);
2679
- _(ge) || (v.status = "fulfilled", v.value = !0), rt(v);
2680
- } else
2681
- throw pe;
2682
- }
2683
- return {
2684
- mutate: Ie,
2685
- get data() {
2686
- return j.data = !0, ge;
2687
- },
2688
- get error() {
2689
- return j.error = !0, pe;
2690
- },
2691
- get isValidating() {
2692
- return j.isValidating = !0, Y;
2693
- },
2694
- get isLoading() {
2695
- return j.isLoading = !0, We;
2665
+ });
2666
+ }, Zt = (e) => {
2667
+ $e(e, !1), e({
2668
+ type: xe,
2669
+ payload: {
2670
+ message: {
2671
+ role: vt,
2672
+ content: Wr
2673
+ }
2696
2674
  }
2697
- };
2698
- }, Yn = qn(Jn), He = ({
2699
- fetcher: e,
2700
- scope: t,
2701
- keys: r,
2702
- swrOptions: a,
2703
- getAccessToken: n
2704
- }) => {
2705
- const { data: o, error: s, isLoading: i, mutate: l } = Yn(
2706
- [t, ...r],
2707
- (h) => e(h, n),
2708
- { ...a }
2709
- );
2710
- return { data: o, error: s, isLoading: i, mutate: l };
2711
- }, Fe = async ({
2712
- getAccessToken: e,
2713
- type: t,
2714
- params: r
2715
- }) => {
2716
- const a = await e(), n = await gn({
2717
- accessToken: a,
2718
- type: t,
2719
- params: r
2720
2675
  });
2721
- if (n.status === 200 && n.errors === void 0)
2722
- return n.data;
2723
- throw new Error("An error occurred while fetching the data.");
2724
- }, Xn = async ([e, t], r) => Fe({
2725
- getAccessToken: r,
2726
- type: ze.GET_USER_PREFERENCES,
2727
- params: {
2728
- user: t
2729
- }
2730
- }), Qn = ({
2731
- keys: e,
2732
- getAccessToken: t
2733
- }) => He({
2734
- fetcher: Xn,
2735
- scope: "/preferences",
2736
- keys: e,
2737
- swrOptions: { keepPreviousData: !0 },
2738
- getAccessToken: t
2739
- }), Zn = async ([e, t], r) => Fe({
2740
- getAccessToken: r,
2741
- type: ze.GET_CHATS_STATS,
2742
- params: {
2743
- user: t
2744
- }
2745
- }), Xo = ({
2746
- keys: e,
2747
- getAccessToken: t
2748
- }) => He({
2749
- fetcher: Zn,
2750
- scope: "/stats",
2751
- keys: e,
2752
- getAccessToken: t
2753
- }), Tr = async ([e, t, r, a], n) => Fe({
2754
- getAccessToken: n,
2755
- type: ze.GET_CHATS,
2756
- params: {
2757
- user: t,
2758
- searchString: r,
2759
- direction: a,
2760
- limit: 1,
2761
- truncateSize: 100
2762
- }
2763
- }), Qo = ({
2764
- keys: e,
2765
- getAccessToken: t
2766
- }) => He({
2767
- fetcher: Tr,
2768
- scope: "/history",
2769
- keys: e,
2770
- getAccessToken: t,
2771
- swrOptions: {
2772
- keepPreviousData: !0,
2773
- dedupingInterval: 1e4
2774
- }
2775
- }), Zo = ({
2776
- keys: e,
2777
- getAccessToken: t
2778
- }) => {
2779
- Gn(["/history", ...e], (r) => Tr(r, t));
2780
- }, eo = async ([e], t) => Fe({
2781
- getAccessToken: t,
2782
- type: ze.GET_SERVER_CAPABILITIES
2783
- }), es = ({
2784
- keys: e,
2785
- getAccessToken: t
2786
- }) => He({
2787
- fetcher: eo,
2788
- scope: "/capabilities",
2789
- keys: e,
2790
- getAccessToken: t
2791
- }), to = () => {
2792
- const { dispatch: e } = P(wt), { getAccessToken: t, user: r } = Me(), {
2676
+ }, ao = () => {
2677
+ const { state: e, dispatch: t } = U(ve), { state: r, dispatch: a } = U(Nt), [n, o] = G(""), { getAccessToken: s, user: i } = Me(), l = S(null), h = S(
2678
+ null
2679
+ );
2680
+ L(() => {
2681
+ (async () => {
2682
+ var u;
2683
+ if (!e || e.messages.length === 0) {
2684
+ (u = h == null ? void 0 : h.current) == null || u.cancel();
2685
+ return;
2686
+ }
2687
+ const m = e.messages[e.messages.length - 1];
2688
+ if (!(e.messages.length === 0 || m.message.role === we || m.message.role === Ur || m.message.role === vt || m.message.role === Hr))
2689
+ try {
2690
+ const g = await Rn({
2691
+ accessToken: await s(),
2692
+ name: "generate",
2693
+ data: {
2694
+ messages: e.messages,
2695
+ model: e.engine || Se,
2696
+ user: (i == null ? void 0 : i.username) || "",
2697
+ id: e.id,
2698
+ usage: e.usage
2699
+ }
2700
+ });
2701
+ if (g && g.ok) {
2702
+ const p = xt();
2703
+ h.current = g.body.getReader();
2704
+ const b = new TextDecoder();
2705
+ for (; ; ) {
2706
+ $e(t, !0);
2707
+ const { done: k, value: y } = await h.current.read();
2708
+ if (k) {
2709
+ $e(t, !1);
2710
+ break;
2711
+ }
2712
+ const N = b.decode(y, { stream: !0 }), A = N.indexOf($t);
2713
+ if (A !== -1) {
2714
+ const R = N.substring(0, A), E = JSON.parse(
2715
+ N.substring(A + $t.length)
2716
+ );
2717
+ t({
2718
+ type: nr,
2719
+ payload: {
2720
+ model: E.model,
2721
+ usage: E.usage
2722
+ }
2723
+ }), t({
2724
+ type: xe,
2725
+ payload: {
2726
+ message: {
2727
+ content: R,
2728
+ role: we,
2729
+ messageId: p,
2730
+ processingTime: E.processingTime,
2731
+ name: E.name
2732
+ }
2733
+ }
2734
+ }), $e(t, !1);
2735
+ break;
2736
+ } else
2737
+ t({
2738
+ type: xe,
2739
+ payload: {
2740
+ message: {
2741
+ content: N,
2742
+ role: we,
2743
+ messageId: p
2744
+ }
2745
+ }
2746
+ });
2747
+ }
2748
+ } else
2749
+ Zt(t);
2750
+ } catch (g) {
2751
+ console.error(g), Zt(t);
2752
+ }
2753
+ })();
2754
+ }, [e == null ? void 0 : e.messages]);
2755
+ const f = async (m) => {
2756
+ m.preventDefault(), t({
2757
+ type: xe,
2758
+ payload: {
2759
+ message: {
2760
+ role: nt,
2761
+ content: n
2762
+ }
2763
+ }
2764
+ }), o("");
2765
+ };
2766
+ return L(() => {
2767
+ if (r.prompt !== "") {
2768
+ const m = r.prompt.endsWith(":") && !r.prompt.endsWith(": ") ? r.prompt + " " : r.prompt;
2769
+ m.indexOf(Mt) !== -1 ? navigator.clipboard.readText().then((g) => {
2770
+ o(m.replace(Mt, g));
2771
+ }) : o(m), l.current && l.current.focus(), a({
2772
+ type: sr
2773
+ });
2774
+ }
2775
+ }, [r, a]), L(() => {
2776
+ e && e.usage === 0 && e.messages.length === 0 && l.current && l.current.focus();
2777
+ }, [e]), /* @__PURE__ */ d(yt, { children: /* @__PURE__ */ d("form", { className: "mt-2", onSubmit: f, children: /* @__PURE__ */ d(
2778
+ Cr,
2779
+ {
2780
+ mode: "dark",
2781
+ focusMode: "light",
2782
+ ref: l,
2783
+ name: "chat-input",
2784
+ label: Fr,
2785
+ helperText: "Press ENTER to add a new line",
2786
+ helperTextOnFocus: !0,
2787
+ required: !0,
2788
+ value: n,
2789
+ onChange: (m) => o(m.target.value),
2790
+ onKeyDown: ma([["mod+Enter", f]]),
2791
+ leftElement: /* @__PURE__ */ d(ro, {}),
2792
+ rightElement: /* @__PURE__ */ d(
2793
+ lr,
2794
+ {
2795
+ disabled: e == null ? void 0 : e.streaming,
2796
+ noBorder: !0,
2797
+ type: "submit",
2798
+ mode: "light",
2799
+ focusMode: "light",
2800
+ children: Gr
2801
+ }
2802
+ )
2803
+ }
2804
+ ) }) });
2805
+ }, no = () => {
2806
+ const { dispatch: e } = U(Nt), { getAccessToken: t, user: r } = Me(), {
2793
2807
  data: a,
2794
2808
  error: n,
2795
2809
  isLoading: o
2796
- } = Qn({
2810
+ } = Cn({
2797
2811
  keys: [r == null ? void 0 : r.username],
2798
2812
  getAccessToken: t
2799
2813
  }), s = "mt-2 flex justify-center rounded-md", i = (l, h) => {
2800
2814
  l.preventDefault(), e({
2801
- type: sr,
2815
+ type: ir,
2802
2816
  payload: {
2803
2817
  prompt: h
2804
2818
  }
2805
2819
  });
2806
2820
  };
2807
- return n || o ? null : /* @__PURE__ */ d(Fr, { alignHorizontal: "center", columnGap: 2, children: a && a.tags && a.tags.map((l) => l.enabled && l.label && l.content && /* @__PURE__ */ d(Gr, { children: /* @__PURE__ */ d("div", { className: s, children: /* @__PURE__ */ d(
2808
- cr,
2821
+ return n || o ? null : /* @__PURE__ */ d(jr, { alignHorizontal: "center", columnGap: 2, children: a && a.tags && a.tags.map((l) => l.enabled && l.label && l.content && /* @__PURE__ */ d(qr, { children: /* @__PURE__ */ d("div", { className: s, children: /* @__PURE__ */ d(
2822
+ lr,
2809
2823
  {
2810
2824
  noBorder: !0,
2811
2825
  mode: "dark",
@@ -2815,8 +2829,8 @@ const rt = $.use || // This extra generic is to avoid TypeScript mixing up the g
2815
2829
  children: l.label
2816
2830
  }
2817
2831
  ) }) }, `prompt-button-${l.slot}`)) });
2818
- }, ro = () => {
2819
- const { state: e } = P(ve), t = S(!1), r = window.innerWidth < 403, [a, n] = G(
2832
+ }, oo = () => {
2833
+ const { state: e } = U(ve), t = S(!1), r = window.innerWidth < 403, [a, n] = G(
2820
2834
  r ? "bottom-10" : "top-[245px]"
2821
2835
  );
2822
2836
  return L(() => {
@@ -2831,26 +2845,26 @@ const rt = $.use || // This extra generic is to avoid TypeScript mixing up the g
2831
2845
  a
2832
2846
  ),
2833
2847
  children: [
2834
- /* @__PURE__ */ d(to, {}),
2835
- /* @__PURE__ */ d(pn, {})
2848
+ /* @__PURE__ */ d(no, {}),
2849
+ /* @__PURE__ */ d(ao, {})
2836
2850
  ]
2837
2851
  }
2838
2852
  );
2839
2853
  };
2840
2854
  /*!
2841
- @versini/ui-bubble v3.0.4
2855
+ @versini/ui-bubble v3.1.1
2842
2856
  © 2025 gizmette.com
2843
2857
  */
2844
2858
  try {
2845
2859
  window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
2846
- version: "3.0.4",
2847
- buildTime: "01/04/2025 07:31 PM EST",
2860
+ version: "3.1.1",
2861
+ buildTime: "01/06/2025 08:01 PM EST",
2848
2862
  homepage: "https://github.com/aversini/ui-components",
2849
2863
  license: "MIT"
2850
2864
  });
2851
2865
  } catch {
2852
2866
  }
2853
- const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link", no = ({
2867
+ const so = "av-bubble", er = "av-button", Ge = "icon", Ir = "button", ft = "link", io = ({
2854
2868
  type: e,
2855
2869
  size: t,
2856
2870
  labelRight: r,
@@ -2859,7 +2873,7 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
2859
2873
  }) => {
2860
2874
  const o = "max-h-8 py-0 px-2", s = "max-h-9 py-1 px-3", i = "max-h-12 py-2 px-4";
2861
2875
  switch (e) {
2862
- case Nr:
2876
+ case Ir:
2863
2877
  case ft:
2864
2878
  return c({
2865
2879
  [o]: t === "small",
@@ -2879,7 +2893,7 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
2879
2893
  "h-12 px-4": t === "large" && (r || a)
2880
2894
  });
2881
2895
  }
2882
- }, oo = ({
2896
+ }, co = ({
2883
2897
  type: e,
2884
2898
  size: t,
2885
2899
  labelRight: r,
@@ -2887,7 +2901,7 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
2887
2901
  }) => {
2888
2902
  const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
2889
2903
  switch (e) {
2890
- case Nr:
2904
+ case Ir:
2891
2905
  case ft:
2892
2906
  return c({
2893
2907
  "text-center": e === ft,
@@ -2902,7 +2916,7 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
2902
2916
  [s]: t === "large" && (r || a)
2903
2917
  });
2904
2918
  }
2905
- }, so = ({
2919
+ }, lo = ({
2906
2920
  mode: e,
2907
2921
  noBackground: t,
2908
2922
  noTruncate: r,
@@ -2938,7 +2952,7 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
2938
2952
  return c("not-prose text-copy-lighter", {
2939
2953
  truncate: !r
2940
2954
  });
2941
- }, io = ({
2955
+ }, uo = ({
2942
2956
  mode: e,
2943
2957
  noBackground: t,
2944
2958
  variant: r
@@ -2968,13 +2982,13 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
2968
2982
  if (r === "selected")
2969
2983
  return "bg-action-selected-dark";
2970
2984
  }
2971
- }, co = ({
2985
+ }, mo = ({
2972
2986
  radius: e
2973
2987
  }) => c({
2974
2988
  "rounded-full": e === "large",
2975
2989
  "rounded-md": e === "medium",
2976
2990
  "rounded-sm": e === "small"
2977
- }), lo = ({
2991
+ }), go = ({
2978
2992
  mode: e,
2979
2993
  disabled: t,
2980
2994
  variant: r
@@ -3004,7 +3018,7 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
3004
3018
  });
3005
3019
  if (r === "selected")
3006
3020
  return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
3007
- }, uo = ({
3021
+ }, ho = ({
3008
3022
  mode: e,
3009
3023
  disabled: t,
3010
3024
  variant: r
@@ -3034,7 +3048,7 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
3034
3048
  });
3035
3049
  if (r === "selected")
3036
3050
  return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
3037
- }, mo = ({
3051
+ }, fo = ({
3038
3052
  mode: e,
3039
3053
  noBorder: t,
3040
3054
  variant: r
@@ -3064,14 +3078,14 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
3064
3078
  });
3065
3079
  if (r === "selected")
3066
3080
  return "border border-border-selected-dark";
3067
- }, go = ({
3081
+ }, po = ({
3068
3082
  focusMode: e
3069
3083
  }) => c("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
3070
3084
  "focus:outline-focus-dark": e === "dark",
3071
3085
  "focus:outline-focus-light": e === "light",
3072
3086
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
3073
3087
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
3074
- }), Rr = ({
3088
+ }), Ar = ({
3075
3089
  type: e,
3076
3090
  className: t,
3077
3091
  raw: r,
@@ -3083,56 +3097,56 @@ const ao = "av-bubble", Zt = "av-button", Ge = "icon", Nr = "button", ft = "link
3083
3097
  noBorder: l,
3084
3098
  labelRight: h,
3085
3099
  labelLeft: f,
3086
- noBackground: g,
3100
+ noBackground: m,
3087
3101
  variant: u,
3088
- noTruncate: m,
3089
- align: y,
3102
+ noTruncate: g,
3103
+ align: p,
3090
3104
  radius: b
3091
- }) => (u || (u = "primary"), r ? c(Zt, t) : c(
3092
- Zt,
3093
- so({
3105
+ }) => (u || (u = "primary"), r ? c(er, t) : c(
3106
+ er,
3107
+ lo({
3094
3108
  mode: a,
3095
3109
  variant: u,
3096
- noBackground: g,
3097
- noTruncate: m
3110
+ noBackground: m,
3111
+ noTruncate: g
3098
3112
  }),
3099
- io({ mode: a, noBackground: g, variant: u }),
3100
- co({ radius: b }),
3101
- no({
3113
+ uo({ mode: a, noBackground: m, variant: u }),
3114
+ mo({ radius: b }),
3115
+ io({
3102
3116
  type: e,
3103
3117
  size: i,
3104
3118
  labelRight: h,
3105
3119
  labelLeft: f,
3106
- align: y
3120
+ align: p
3107
3121
  }),
3108
- oo({ type: e, size: i, labelRight: h, labelLeft: f }),
3109
- mo({ mode: a, variant: u, noBorder: l }),
3110
- go({ focusMode: n }),
3111
- lo({ mode: a, variant: u, disabled: o }),
3112
- uo({ mode: a, variant: u, disabled: o }),
3122
+ co({ type: e, size: i, labelRight: h, labelLeft: f }),
3123
+ fo({ mode: a, variant: u, noBorder: l }),
3124
+ po({ focusMode: n }),
3125
+ go({ mode: a, variant: u, disabled: o }),
3126
+ ho({ mode: a, variant: u, disabled: o }),
3113
3127
  {
3114
3128
  "w-full": s,
3115
3129
  "disabled:cursor-not-allowed disabled:opacity-50": o
3116
3130
  },
3117
3131
  t
3118
- )), ho = (e, t, r) => {
3132
+ )), yo = (e, t, r) => {
3119
3133
  var a;
3120
3134
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
3121
- }, Nt = $.forwardRef((e, t) => {
3135
+ }, Rt = $.forwardRef((e, t) => {
3122
3136
  const { onClick: r, noInternalClick: a = !1, ...n } = e;
3123
3137
  return /* @__PURE__ */ d(
3124
3138
  "button",
3125
3139
  {
3126
3140
  ref: t,
3127
3141
  onClick: (o) => {
3128
- ho(o, a, r);
3142
+ yo(o, a, r);
3129
3143
  },
3130
3144
  ...n
3131
3145
  }
3132
3146
  );
3133
3147
  });
3134
- Nt.displayName = "BaseButton";
3135
- const Cr = $.forwardRef(
3148
+ Rt.displayName = "BaseButton";
3149
+ const Or = $.forwardRef(
3136
3150
  ({
3137
3151
  children: e,
3138
3152
  disabled: t = !1,
@@ -3145,16 +3159,16 @@ const Cr = $.forwardRef(
3145
3159
  noBorder: l = !1,
3146
3160
  "aria-label": h,
3147
3161
  label: f,
3148
- size: g = "medium",
3162
+ size: m = "medium",
3149
3163
  labelRight: u,
3150
- labelLeft: m,
3151
- noBackground: y = !1,
3164
+ labelLeft: g,
3165
+ noBackground: p = !1,
3152
3166
  align: b = "center",
3153
3167
  radius: k = "large",
3154
- variant: p = "primary",
3168
+ variant: y = "primary",
3155
3169
  ...N
3156
3170
  }, A) => {
3157
- const R = Rr({
3171
+ const R = Ar({
3158
3172
  type: Ge,
3159
3173
  mode: r,
3160
3174
  focusMode: a,
@@ -3163,13 +3177,13 @@ const Cr = $.forwardRef(
3163
3177
  raw: i,
3164
3178
  className: o,
3165
3179
  noBorder: l,
3166
- size: g,
3180
+ size: m,
3167
3181
  labelRight: u,
3168
- labelLeft: m,
3169
- noBackground: y,
3182
+ labelLeft: g,
3183
+ noBackground: p,
3170
3184
  align: b,
3171
3185
  radius: k,
3172
- variant: p
3186
+ variant: y
3173
3187
  }), E = c({
3174
3188
  "text-copy-accent-dark": r === "light" && !i,
3175
3189
  "text-copy-light": r === "dark" && !i,
@@ -3177,7 +3191,7 @@ const Cr = $.forwardRef(
3177
3191
  "text-copy-light dark:text-copy-accent-dark": r === "system" && !i
3178
3192
  });
3179
3193
  return /* @__PURE__ */ I(
3180
- Nt,
3194
+ Rt,
3181
3195
  {
3182
3196
  ref: A,
3183
3197
  className: R,
@@ -3186,7 +3200,7 @@ const Cr = $.forwardRef(
3186
3200
  "aria-label": h || f,
3187
3201
  ...N,
3188
3202
  children: [
3189
- m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
3203
+ g && /* @__PURE__ */ d("span", { className: "pr-2", children: g }),
3190
3204
  /* @__PURE__ */ d("div", { className: E, children: e }),
3191
3205
  u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
3192
3206
  ]
@@ -3194,21 +3208,21 @@ const Cr = $.forwardRef(
3194
3208
  );
3195
3209
  }
3196
3210
  );
3197
- Cr.displayName = "ButtonIcon";
3211
+ Or.displayName = "ButtonIcon";
3198
3212
  /*!
3199
- @versini/ui-button v4.0.3
3213
+ @versini/ui-button v4.0.4
3200
3214
  © 2025 gizmette.com
3201
3215
  */
3202
3216
  try {
3203
3217
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
3204
- version: "4.0.3",
3205
- buildTime: "01/04/2025 07:31 PM EST",
3218
+ version: "4.0.4",
3219
+ buildTime: "01/06/2025 08:01 PM EST",
3206
3220
  homepage: "https://github.com/aversini/ui-components",
3207
3221
  license: "MIT"
3208
3222
  });
3209
3223
  } catch {
3210
3224
  }
3211
- const fo = $.forwardRef(
3225
+ const bo = $.forwardRef(
3212
3226
  ({
3213
3227
  children: e,
3214
3228
  disabled: t = !1,
@@ -3221,16 +3235,16 @@ const fo = $.forwardRef(
3221
3235
  noBorder: l = !1,
3222
3236
  "aria-label": h,
3223
3237
  label: f,
3224
- size: g = "medium",
3238
+ size: m = "medium",
3225
3239
  labelRight: u,
3226
- labelLeft: m,
3227
- noBackground: y = !1,
3240
+ labelLeft: g,
3241
+ noBackground: p = !1,
3228
3242
  align: b = "center",
3229
3243
  active: k = !1,
3230
- radius: p = "large",
3244
+ radius: y = "large",
3231
3245
  ...N
3232
3246
  }, A) => {
3233
- const R = Rr({
3247
+ const R = Ar({
3234
3248
  type: Ge,
3235
3249
  mode: r,
3236
3250
  focusMode: a,
@@ -3239,12 +3253,12 @@ const fo = $.forwardRef(
3239
3253
  raw: i,
3240
3254
  className: o,
3241
3255
  noBorder: l,
3242
- size: g,
3256
+ size: m,
3243
3257
  labelRight: u,
3244
- labelLeft: m,
3245
- noBackground: y,
3258
+ labelLeft: g,
3259
+ noBackground: p,
3246
3260
  align: b,
3247
- radius: p
3261
+ radius: y
3248
3262
  }), E = c({
3249
3263
  "text-copy-accent-dark": r === "light" && !i,
3250
3264
  "text-copy-light": r === "dark" && !i,
@@ -3268,7 +3282,7 @@ const fo = $.forwardRef(
3268
3282
  }
3269
3283
  ) : "";
3270
3284
  return /* @__PURE__ */ d("div", { className: C, children: /* @__PURE__ */ I(
3271
- Nt,
3285
+ Rt,
3272
3286
  {
3273
3287
  ref: A,
3274
3288
  className: R,
@@ -3277,7 +3291,7 @@ const fo = $.forwardRef(
3277
3291
  "aria-label": h || f,
3278
3292
  ...N,
3279
3293
  children: [
3280
- m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
3294
+ g && /* @__PURE__ */ d("span", { className: "pr-2", children: g }),
3281
3295
  /* @__PURE__ */ d("div", { className: E, children: e }),
3282
3296
  u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
3283
3297
  ]
@@ -3285,8 +3299,8 @@ const fo = $.forwardRef(
3285
3299
  ) });
3286
3300
  }
3287
3301
  );
3288
- fo.displayName = "ButtonSort";
3289
- const Ir = ({
3302
+ bo.displayName = "ButtonSort";
3303
+ const Lr = ({
3290
3304
  children: e,
3291
3305
  fill: t,
3292
3306
  viewBox: r,
@@ -3317,26 +3331,26 @@ const Ir = ({
3317
3331
  ] });
3318
3332
  };
3319
3333
  /*!
3320
- @versini/ui-svgicon v4.0.0
3334
+ @versini/ui-svgicon v4.0.1
3321
3335
  © 2025 gizmette.com
3322
3336
  */
3323
3337
  try {
3324
3338
  window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
3325
- version: "4.0.0",
3326
- buildTime: "01/04/2025 07:31 PM EST",
3339
+ version: "4.0.1",
3340
+ buildTime: "01/06/2025 08:00 PM EST",
3327
3341
  homepage: "https://github.com/aversini/ui-components",
3328
3342
  license: "MIT"
3329
3343
  });
3330
3344
  } catch {
3331
3345
  }
3332
- const po = ({
3346
+ const vo = ({
3333
3347
  className: e,
3334
3348
  viewBox: t,
3335
3349
  title: r,
3336
3350
  monotone: a,
3337
3351
  ...n
3338
3352
  }) => /* @__PURE__ */ I(
3339
- Ir,
3353
+ Lr,
3340
3354
  {
3341
3355
  defaultViewBox: "0 0 448 512",
3342
3356
  size: "size-5",
@@ -3362,14 +3376,14 @@ const po = ({
3362
3376
  )
3363
3377
  ]
3364
3378
  }
3365
- ), yo = ({
3379
+ ), ko = ({
3366
3380
  className: e,
3367
3381
  viewBox: t,
3368
3382
  title: r,
3369
3383
  monotone: a,
3370
3384
  ...n
3371
3385
  }) => /* @__PURE__ */ d(
3372
- Ir,
3386
+ Lr,
3373
3387
  {
3374
3388
  defaultViewBox: "0 0 512 512",
3375
3389
  size: "size-5",
@@ -3381,59 +3395,64 @@ const po = ({
3381
3395
  }
3382
3396
  );
3383
3397
  /*!
3384
- @versini/ui-icons v4.2.0
3398
+ @versini/ui-icons v4.2.1
3385
3399
  © 2025 gizmette.com
3386
3400
  */
3387
3401
  try {
3388
3402
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
3389
- version: "4.2.0",
3390
- buildTime: "01/04/2025 07:31 PM EST",
3403
+ version: "4.2.1",
3404
+ buildTime: "01/06/2025 08:00 PM EST",
3391
3405
  homepage: "https://github.com/aversini/ui-components",
3392
3406
  license: "MIT"
3393
3407
  });
3394
3408
  } catch {
3395
3409
  }
3396
- const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3397
- "lg:max-w-3xl": e === "left"
3398
- }), vo = ({ kind: e }) => c({
3410
+ const _o = ({
3411
+ kind: e,
3412
+ noMaxWidth: t
3413
+ }) => c("p-4", {
3414
+ "max-w-xs sm:max-w-md md:max-w-2xl": !t,
3415
+ "lg:max-w-3xl": e === "left" && !t
3416
+ }), Eo = ({ kind: e }) => c({
3399
3417
  "bg-surface-lighter dark:bg-surface-dark": e === "left",
3400
3418
  "bg-surface-accent": e === "right"
3401
- }), ko = ({ kind: e }) => c(
3419
+ }), xo = ({ kind: e }) => c(
3402
3420
  "prose prose-dark dark:prose-lighter prose-p:my-3 prose-blockquote:my-3 prose-ol:my-3 prose-ul:my-3 prose-ul:prose-li:marker:text-black",
3403
3421
  {
3404
3422
  "text-copy-lighter": e === "right"
3405
3423
  }
3406
- ), _o = ({ kind: e }) => c("rounded-b-xl", {
3424
+ ), wo = ({ kind: e }) => c("rounded-b-xl", {
3407
3425
  "rounded-tr-xl": e === "left",
3408
3426
  "rounded-tl-xl": e === "right"
3409
- }), Eo = ({
3427
+ }), So = ({
3410
3428
  kind: e,
3411
- className: t
3429
+ className: t,
3430
+ noMaxWidth: r
3412
3431
  }) => {
3413
- const r = c(
3414
- ao,
3432
+ const a = c(
3433
+ so,
3415
3434
  "flex items-start",
3416
3435
  {
3417
3436
  "flex-row-reverse": e === "right"
3418
3437
  },
3419
3438
  t
3420
- ), a = c(
3439
+ ), n = c(
3421
3440
  "flex flex-col empty:hidden",
3422
- bo({ kind: e }),
3423
- ko({ kind: e }),
3424
- vo({ kind: e }),
3425
- _o({ kind: e })
3426
- ), n = "pr-2 pt-1 text-end text-xs text-copy-light", o = c("flex flex-col-reverse gap-2 sm:flex-row", {
3441
+ _o({ kind: e, noMaxWidth: r }),
3442
+ xo({ kind: e }),
3443
+ Eo({ kind: e }),
3444
+ wo({ kind: e })
3445
+ ), o = "pr-2 pt-1 text-end text-xs text-copy-light", s = c("flex flex-col-reverse gap-2 sm:flex-row", {
3427
3446
  "ml-2": e === "left",
3428
3447
  "mr-2": e === "right"
3429
3448
  });
3430
3449
  return {
3431
- wrapper: r,
3432
- main: a,
3433
- footer: n,
3434
- copyButton: o
3450
+ wrapper: a,
3451
+ main: n,
3452
+ footer: o,
3453
+ copyButton: s
3435
3454
  };
3436
- }, xo = ({
3455
+ }, To = ({
3437
3456
  children: e,
3438
3457
  kind: t = "left",
3439
3458
  className: r,
@@ -3441,44 +3460,45 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3441
3460
  rawFooter: n,
3442
3461
  copyToClipboard: o,
3443
3462
  copyToClipboardFocusMode: s = "system",
3444
- copyToClipboardMode: i = "system"
3463
+ copyToClipboardMode: i = "system",
3464
+ noMaxWidth: l = !1
3445
3465
  }) => {
3446
- const [l, h] = G(!1), f = Eo({ kind: t, className: r }), g = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), u = () => {
3447
- h(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
3466
+ const [h, f] = G(!1), m = So({ kind: t, className: r, noMaxWidth: l }), u = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), g = () => {
3467
+ f(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
3448
3468
  };
3449
3469
  return L(() => {
3450
- let m;
3451
- return l && (m = window.setTimeout(() => {
3452
- h(!1);
3470
+ let p;
3471
+ return h && (p = window.setTimeout(() => {
3472
+ f(!1);
3453
3473
  }, 3e3)), () => {
3454
- clearTimeout(m);
3474
+ clearTimeout(p);
3455
3475
  };
3456
- }, [l]), /* @__PURE__ */ I("div", { className: f.wrapper, children: [
3476
+ }, [h]), /* @__PURE__ */ I("div", { className: m.wrapper, children: [
3457
3477
  /* @__PURE__ */ I("div", { children: [
3458
- /* @__PURE__ */ d("div", { className: f.main, children: e }),
3459
- a && Object.keys(a).map((m) => a[m] ? /* @__PURE__ */ d("div", { className: "prose-p:m-0", children: /* @__PURE__ */ I("p", { className: f.footer, children: [
3460
- m,
3478
+ /* @__PURE__ */ d("div", { className: m.main, children: e }),
3479
+ a && Object.keys(a).map((p) => a[p] ? /* @__PURE__ */ d("div", { className: "prose-p:m-0", children: /* @__PURE__ */ I("p", { className: m.footer, children: [
3480
+ p,
3461
3481
  ": ",
3462
- a[m]
3463
- ] }) }, `-${m}`) : null),
3482
+ a[p]
3483
+ ] }) }, `-${p}`) : null),
3464
3484
  n && n
3465
3485
  ] }),
3466
- g && /* @__PURE__ */ d("div", { className: f.copyButton, children: /* @__PURE__ */ d(
3467
- Cr,
3486
+ u && /* @__PURE__ */ d("div", { className: m.copyButton, children: /* @__PURE__ */ d(
3487
+ Or,
3468
3488
  {
3469
3489
  noBorder: !0,
3470
3490
  noBackground: !0,
3471
3491
  size: "small",
3472
3492
  mode: i,
3473
3493
  focusMode: s,
3474
- label: l ? "Copied to clipboard" : "Copy to clipboard",
3475
- onClick: u,
3476
- disabled: l,
3477
- children: l ? /* @__PURE__ */ d(po, { size: "size-3" }) : /* @__PURE__ */ d(yo, { size: "size-3" })
3494
+ label: h ? "Copied to clipboard" : "Copy to clipboard",
3495
+ onClick: g,
3496
+ disabled: h,
3497
+ children: h ? /* @__PURE__ */ d(vo, { size: "size-3" }) : /* @__PURE__ */ d(ko, { size: "size-3" })
3478
3498
  }
3479
3499
  ) })
3480
3500
  ] });
3481
- }, er = "av-button", Rt = "icon", Ct = "button", pt = "link", wo = ({
3501
+ }, tr = "av-button", Ct = "icon", It = "button", pt = "link", No = ({
3482
3502
  type: e,
3483
3503
  size: t,
3484
3504
  labelRight: r,
@@ -3487,14 +3507,14 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3487
3507
  }) => {
3488
3508
  const o = "max-h-8 py-0 px-2", s = "max-h-9 py-1 px-3", i = "max-h-12 py-2 px-4";
3489
3509
  switch (e) {
3490
- case Ct:
3510
+ case It:
3491
3511
  case pt:
3492
3512
  return c({
3493
3513
  [o]: t === "small",
3494
3514
  [s]: t === "medium",
3495
3515
  [i]: t === "large"
3496
3516
  });
3497
- case Rt:
3517
+ case Ct:
3498
3518
  return c("inline-flex items-center", {
3499
3519
  "justify-center": n === "center",
3500
3520
  "justify-start": n === "left",
@@ -3507,7 +3527,7 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3507
3527
  "h-12 px-4": t === "large" && (r || a)
3508
3528
  });
3509
3529
  }
3510
- }, So = ({
3530
+ }, Ro = ({
3511
3531
  type: e,
3512
3532
  size: t,
3513
3533
  labelRight: r,
@@ -3515,7 +3535,7 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3515
3535
  }) => {
3516
3536
  const n = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
3517
3537
  switch (e) {
3518
- case Ct:
3538
+ case It:
3519
3539
  case pt:
3520
3540
  return c({
3521
3541
  "text-center": e === pt,
@@ -3523,14 +3543,14 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3523
3543
  [o]: t === "medium",
3524
3544
  [s]: t === "large"
3525
3545
  });
3526
- case Rt:
3546
+ case Ct:
3527
3547
  return c({
3528
3548
  [n]: t === "small" && (r || a),
3529
3549
  [o]: t === "medium" && (r || a),
3530
3550
  [s]: t === "large" && (r || a)
3531
3551
  });
3532
3552
  }
3533
- }, To = ({
3553
+ }, Co = ({
3534
3554
  mode: e,
3535
3555
  noBackground: t,
3536
3556
  noTruncate: r,
@@ -3566,7 +3586,7 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3566
3586
  return c("not-prose text-copy-lighter", {
3567
3587
  truncate: !r
3568
3588
  });
3569
- }, No = ({
3589
+ }, Io = ({
3570
3590
  mode: e,
3571
3591
  noBackground: t,
3572
3592
  variant: r
@@ -3596,13 +3616,13 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3596
3616
  if (r === "selected")
3597
3617
  return "bg-action-selected-dark";
3598
3618
  }
3599
- }, Ro = ({
3619
+ }, Ao = ({
3600
3620
  radius: e
3601
3621
  }) => c({
3602
3622
  "rounded-full": e === "large",
3603
3623
  "rounded-md": e === "medium",
3604
3624
  "rounded-sm": e === "small"
3605
- }), Co = ({
3625
+ }), Oo = ({
3606
3626
  mode: e,
3607
3627
  disabled: t,
3608
3628
  variant: r
@@ -3632,7 +3652,7 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3632
3652
  });
3633
3653
  if (r === "selected")
3634
3654
  return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
3635
- }, Io = ({
3655
+ }, Lo = ({
3636
3656
  mode: e,
3637
3657
  disabled: t,
3638
3658
  variant: r
@@ -3662,7 +3682,7 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3662
3682
  });
3663
3683
  if (r === "selected")
3664
3684
  return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
3665
- }, Ao = ({
3685
+ }, Bo = ({
3666
3686
  mode: e,
3667
3687
  noBorder: t,
3668
3688
  variant: r
@@ -3692,14 +3712,14 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3692
3712
  });
3693
3713
  if (r === "selected")
3694
3714
  return "border border-border-selected-dark";
3695
- }, Oo = ({
3715
+ }, $o = ({
3696
3716
  focusMode: e
3697
3717
  }) => c("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
3698
3718
  "focus:outline-focus-dark": e === "dark",
3699
3719
  "focus:outline-focus-light": e === "light",
3700
3720
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
3701
3721
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
3702
- }), Ar = ({
3722
+ }), Br = ({
3703
3723
  type: e,
3704
3724
  className: t,
3705
3725
  raw: r,
@@ -3711,56 +3731,56 @@ const bo = ({ kind: e }) => c("p-4 max-w-xs sm:max-w-md md:max-w-2xl", {
3711
3731
  noBorder: l,
3712
3732
  labelRight: h,
3713
3733
  labelLeft: f,
3714
- noBackground: g,
3734
+ noBackground: m,
3715
3735
  variant: u,
3716
- noTruncate: m,
3717
- align: y,
3736
+ noTruncate: g,
3737
+ align: p,
3718
3738
  radius: b
3719
- }) => (u || (u = "primary"), r ? c(er, t) : c(
3720
- er,
3721
- To({
3739
+ }) => (u || (u = "primary"), r ? c(tr, t) : c(
3740
+ tr,
3741
+ Co({
3722
3742
  mode: a,
3723
3743
  variant: u,
3724
- noBackground: g,
3725
- noTruncate: m
3744
+ noBackground: m,
3745
+ noTruncate: g
3726
3746
  }),
3727
- No({ mode: a, noBackground: g, variant: u }),
3728
- Ro({ radius: b }),
3729
- wo({
3747
+ Io({ mode: a, noBackground: m, variant: u }),
3748
+ Ao({ radius: b }),
3749
+ No({
3730
3750
  type: e,
3731
3751
  size: i,
3732
3752
  labelRight: h,
3733
3753
  labelLeft: f,
3734
- align: y
3754
+ align: p
3735
3755
  }),
3736
- So({ type: e, size: i, labelRight: h, labelLeft: f }),
3737
- Ao({ mode: a, variant: u, noBorder: l }),
3738
- Oo({ focusMode: n }),
3739
- Co({ mode: a, variant: u, disabled: o }),
3740
- Io({ mode: a, variant: u, disabled: o }),
3756
+ Ro({ type: e, size: i, labelRight: h, labelLeft: f }),
3757
+ Bo({ mode: a, variant: u, noBorder: l }),
3758
+ $o({ focusMode: n }),
3759
+ Oo({ mode: a, variant: u, disabled: o }),
3760
+ Lo({ mode: a, variant: u, disabled: o }),
3741
3761
  {
3742
3762
  "w-full": s,
3743
3763
  "disabled:cursor-not-allowed disabled:opacity-50": o
3744
3764
  },
3745
3765
  t
3746
- )), Lo = (e, t, r) => {
3766
+ )), Mo = (e, t, r) => {
3747
3767
  var a;
3748
3768
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
3749
- }, It = $.forwardRef((e, t) => {
3769
+ }, At = $.forwardRef((e, t) => {
3750
3770
  const { onClick: r, noInternalClick: a = !1, ...n } = e;
3751
3771
  return /* @__PURE__ */ d(
3752
3772
  "button",
3753
3773
  {
3754
3774
  ref: t,
3755
3775
  onClick: (o) => {
3756
- Lo(o, a, r);
3776
+ Mo(o, a, r);
3757
3777
  },
3758
3778
  ...n
3759
3779
  }
3760
3780
  );
3761
3781
  });
3762
- It.displayName = "BaseButton";
3763
- const Or = $.forwardRef(
3782
+ At.displayName = "BaseButton";
3783
+ const $r = $.forwardRef(
3764
3784
  ({
3765
3785
  children: e,
3766
3786
  disabled: t = !1,
@@ -3773,11 +3793,11 @@ const Or = $.forwardRef(
3773
3793
  noBorder: l = !1,
3774
3794
  variant: h = "primary",
3775
3795
  noTruncate: f = !1,
3776
- radius: g = "large",
3796
+ radius: m = "large",
3777
3797
  ...u
3778
- }, m) => {
3779
- const y = Ar({
3780
- type: Ct,
3798
+ }, g) => {
3799
+ const p = Br({
3800
+ type: It,
3781
3801
  mode: r,
3782
3802
  focusMode: a,
3783
3803
  fullWidth: n,
@@ -3788,13 +3808,13 @@ const Or = $.forwardRef(
3788
3808
  noBorder: l,
3789
3809
  variant: h,
3790
3810
  noTruncate: f,
3791
- radius: g
3811
+ radius: m
3792
3812
  });
3793
3813
  return /* @__PURE__ */ d(
3794
- It,
3814
+ At,
3795
3815
  {
3796
- ref: m,
3797
- className: y,
3816
+ ref: g,
3817
+ className: p,
3798
3818
  disabled: t,
3799
3819
  ...u,
3800
3820
  children: e
@@ -3802,21 +3822,21 @@ const Or = $.forwardRef(
3802
3822
  );
3803
3823
  }
3804
3824
  );
3805
- Or.displayName = "Button";
3825
+ $r.displayName = "Button";
3806
3826
  /*!
3807
- @versini/ui-button v4.0.3
3827
+ @versini/ui-button v4.0.4
3808
3828
  © 2025 gizmette.com
3809
3829
  */
3810
3830
  try {
3811
3831
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
3812
- version: "4.0.3",
3813
- buildTime: "01/04/2025 04:09 PM EST",
3832
+ version: "4.0.4",
3833
+ buildTime: "01/06/2025 08:01 PM EST",
3814
3834
  homepage: "https://github.com/aversini/ui-components",
3815
3835
  license: "MIT"
3816
3836
  });
3817
3837
  } catch {
3818
3838
  }
3819
- const Bo = $.forwardRef(
3839
+ const Do = $.forwardRef(
3820
3840
  ({
3821
3841
  children: e,
3822
3842
  disabled: t = !1,
@@ -3829,17 +3849,17 @@ const Bo = $.forwardRef(
3829
3849
  noBorder: l = !1,
3830
3850
  "aria-label": h,
3831
3851
  label: f,
3832
- size: g = "medium",
3852
+ size: m = "medium",
3833
3853
  labelRight: u,
3834
- labelLeft: m,
3835
- noBackground: y = !1,
3854
+ labelLeft: g,
3855
+ noBackground: p = !1,
3836
3856
  align: b = "center",
3837
3857
  active: k = !1,
3838
- radius: p = "large",
3858
+ radius: y = "large",
3839
3859
  ...N
3840
3860
  }, A) => {
3841
- const R = Ar({
3842
- type: Rt,
3861
+ const R = Br({
3862
+ type: Ct,
3843
3863
  mode: r,
3844
3864
  focusMode: a,
3845
3865
  fullWidth: n,
@@ -3847,12 +3867,12 @@ const Bo = $.forwardRef(
3847
3867
  raw: i,
3848
3868
  className: o,
3849
3869
  noBorder: l,
3850
- size: g,
3870
+ size: m,
3851
3871
  labelRight: u,
3852
- labelLeft: m,
3853
- noBackground: y,
3872
+ labelLeft: g,
3873
+ noBackground: p,
3854
3874
  align: b,
3855
- radius: p
3875
+ radius: y
3856
3876
  }), E = c({
3857
3877
  "text-copy-accent-dark": r === "light" && !i,
3858
3878
  "text-copy-light": r === "dark" && !i,
@@ -3876,7 +3896,7 @@ const Bo = $.forwardRef(
3876
3896
  }
3877
3897
  ) : "";
3878
3898
  return /* @__PURE__ */ d("div", { className: C, children: /* @__PURE__ */ I(
3879
- It,
3899
+ At,
3880
3900
  {
3881
3901
  ref: A,
3882
3902
  className: R,
@@ -3885,7 +3905,7 @@ const Bo = $.forwardRef(
3885
3905
  "aria-label": h || f,
3886
3906
  ...N,
3887
3907
  children: [
3888
- m && /* @__PURE__ */ d("span", { className: "pr-2", children: m }),
3908
+ g && /* @__PURE__ */ d("span", { className: "pr-2", children: g }),
3889
3909
  /* @__PURE__ */ d("div", { className: E, children: e }),
3890
3910
  u && /* @__PURE__ */ d("span", { className: "pl-2", children: u })
3891
3911
  ]
@@ -3893,10 +3913,10 @@ const Bo = $.forwardRef(
3893
3913
  ) });
3894
3914
  }
3895
3915
  );
3896
- Bo.displayName = "ButtonSort";
3897
- const $o = 200, Mo = ({
3916
+ Do.displayName = "ButtonSort";
3917
+ const Vo = 200, zo = ({
3898
3918
  string: e,
3899
- idealLength: t = $o
3919
+ idealLength: t = Vo
3900
3920
  }) => {
3901
3921
  if (e.length <= t)
3902
3922
  return { string: e, isTruncated: !1 };
@@ -3907,7 +3927,7 @@ const $o = 200, Mo = ({
3907
3927
  string: e.slice(0, t + r),
3908
3928
  isTruncated: !0
3909
3929
  };
3910
- }, Do = ({
3930
+ }, Po = ({
3911
3931
  children: e,
3912
3932
  length: t = 200,
3913
3933
  mode: r = "system",
@@ -3916,14 +3936,14 @@ const $o = 200, Mo = ({
3916
3936
  const [n, o] = G(!1);
3917
3937
  if (typeof e != "string")
3918
3938
  return e;
3919
- const { string: s, isTruncated: i } = Mo({
3939
+ const { string: s, isTruncated: i } = zo({
3920
3940
  string: e,
3921
3941
  idealLength: t
3922
3942
  });
3923
3943
  return /* @__PURE__ */ I("span", { style: { wordBreak: "break-word" }, children: [
3924
3944
  n ? e : s,
3925
3945
  i && /* @__PURE__ */ d(
3926
- Or,
3946
+ $r,
3927
3947
  {
3928
3948
  mode: r,
3929
3949
  focusMode: a,
@@ -3938,59 +3958,59 @@ const $o = 200, Mo = ({
3938
3958
  ] });
3939
3959
  };
3940
3960
  /*!
3941
- @versini/ui-truncate v3.0.3
3961
+ @versini/ui-truncate v3.0.4
3942
3962
  © 2025 gizmette.com
3943
3963
  */
3944
3964
  try {
3945
3965
  window.__VERSINI_UI_TRUNCATE__ || (window.__VERSINI_UI_TRUNCATE__ = {
3946
- version: "3.0.3",
3947
- buildTime: "01/04/2025 04:09 PM EST",
3966
+ version: "3.0.4",
3967
+ buildTime: "01/06/2025 08:01 PM EST",
3948
3968
  homepage: "https://github.com/aversini/ui-components",
3949
3969
  license: "MIT"
3950
3970
  });
3951
3971
  } catch {
3952
3972
  }
3953
- const tr = lr(
3973
+ const rr = dr(
3954
3974
  () => import(
3955
3975
  /* webpackChunkName: "LazyMessageAssistant" */
3956
- "./MessageAssistant.TBLReeCB.js"
3976
+ "./MessageAssistant.eUTdhSpu.js"
3957
3977
  ).then((e) => e.MessageAssistant)
3958
- ), Vo = () => {
3959
- const { state: e } = P(ve);
3978
+ ), Uo = () => {
3979
+ const { state: e } = U(ve);
3960
3980
  return /* @__PURE__ */ I("div", { className: "space-y-6 mt-2", children: [
3961
3981
  e && e.messages.length > 0 && e.messages.map((t, r) => {
3962
3982
  const { role: a, content: n, name: o, processingTime: s } = t.message;
3963
- return (a === we || a === vt) && n ? /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(tr, { name: o, processingTime: s, children: n }) }, `${r}-${a}`) : a === nt && n ? /* @__PURE__ */ d(
3964
- xo,
3983
+ return (a === we || a === vt) && n ? /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(rr, { name: o, processingTime: s, children: n }) }, `${r}-${a}`) : a === nt && n ? /* @__PURE__ */ d(
3984
+ To,
3965
3985
  {
3966
3986
  kind: "right",
3967
3987
  copyToClipboard: n,
3968
3988
  copyToClipboardFocusMode: "light",
3969
- children: /* @__PURE__ */ d(Do, { mode: "light", focusMode: "light", children: n })
3989
+ children: /* @__PURE__ */ d(Po, { mode: "light", focusMode: "light", children: n })
3970
3990
  },
3971
3991
  `${r}-${a}`
3972
3992
  ) : null;
3973
3993
  }),
3974
- Wr(nt, e) && /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(tr, { loading: !0 }) })
3994
+ Kr(nt, e) && /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(rr, { loading: !0 }) })
3975
3995
  ] });
3976
- }, zo = () => {
3977
- const { isAuthenticated: e } = Me(), { state: t } = P(ve), [r, a] = G(!1), [n, o] = ha(), s = jr({
3996
+ }, Ho = () => {
3997
+ const { isAuthenticated: e } = Me(), { state: t } = U(ve), [r, a] = G(!1), [n, o] = ya(), s = Jr({
3978
3998
  isAuthenticated: e,
3979
3999
  extraClass: "rounded-b-md"
3980
4000
  }), i = S(!1), l = Z(() => {
3981
4001
  const f = n.current;
3982
4002
  if (f) {
3983
- const { scrollHeight: g, clientHeight: u, scrollTop: m } = f, y = g - u - m;
4003
+ const { scrollHeight: m, clientHeight: u, scrollTop: g } = f, p = m - u - g;
3984
4004
  f.scrollBy({
3985
- top: y,
4005
+ top: p,
3986
4006
  behavior: "smooth"
3987
4007
  });
3988
4008
  }
3989
4009
  }, [n]), h = Z(() => {
3990
4010
  const f = n.current;
3991
4011
  if (f) {
3992
- const { scrollTop: g, scrollHeight: u, clientHeight: m } = f, y = u > m, b = g + m >= u - 1;
3993
- a(y && !b);
4012
+ const { scrollTop: m, scrollHeight: u, clientHeight: g } = f, p = u > g, b = m + g >= u - 1;
4013
+ a(p && !b);
3994
4014
  }
3995
4015
  }, [n]);
3996
4016
  return fe(() => {
@@ -4005,7 +4025,7 @@ const tr = lr(
4005
4025
  t && (!i.current && t.streaming && l(), i.current = !!t.streaming);
4006
4026
  }, [t, l]), /* @__PURE__ */ I("div", { className: s, ref: n, children: [
4007
4027
  r && /* @__PURE__ */ d("div", { className: "bottom-44 z-40 fixed left-1/2 transform -translate-x-1/2", children: /* @__PURE__ */ d(
4008
- ir,
4028
+ cr,
4009
4029
  {
4010
4030
  className: c(
4011
4031
  "dark:bg-slate-50 dark:hover:bg-slate-300 dark:active:bg-slate-400",
@@ -4016,7 +4036,7 @@ const tr = lr(
4016
4036
  mode: "dark",
4017
4037
  onClick: l,
4018
4038
  children: /* @__PURE__ */ d(
4019
- aa,
4039
+ sa,
4020
4040
  {
4021
4041
  monotone: !0,
4022
4042
  size: "size-4",
@@ -4025,23 +4045,23 @@ const tr = lr(
4025
4045
  )
4026
4046
  }
4027
4047
  ) }),
4028
- /* @__PURE__ */ d(qr, {}),
4029
- e && /* @__PURE__ */ d(Vo, {})
4048
+ /* @__PURE__ */ d(Yr, {}),
4049
+ e && /* @__PURE__ */ d(Uo, {})
4030
4050
  ] });
4031
- }, Uo = lr(
4051
+ }, Fo = dr(
4032
4052
  () => import(
4033
4053
  /* webpackChunkName: "LazyHeader" */
4034
- "./HeaderToolbar.BlpFAHv2.js"
4054
+ "./HeaderToolbar.CDxPnDwl.js"
4035
4055
  )
4036
4056
  );
4037
- function Lr({ isComponent: e = !1 }) {
4038
- const { isAuthenticated: t } = Me(), [r] = Ut({
4039
- key: Dt + Jr,
4057
+ function Mr({ isComponent: e = !1 }) {
4058
+ const { user: t, getAccessToken: r } = Me(), [a] = Ut({
4059
+ key: Vt + Qr,
4040
4060
  initialValue: ""
4041
- }), [a] = Ut({
4042
- key: Dt + Yr,
4061
+ }), [n] = Ut({
4062
+ key: Vt + Zr,
4043
4063
  initialValue: Ee.ASC
4044
- }), [n, o] = Be(Ua, {
4064
+ }), [o, s] = Be(Fa, {
4045
4065
  id: xt(),
4046
4066
  model: Se,
4047
4067
  engine: Se,
@@ -4049,85 +4069,91 @@ function Lr({ isComponent: e = !1 }) {
4049
4069
  messages: [],
4050
4070
  prompts: [],
4051
4071
  isComponent: e
4052
- }), [s, i] = Be(Pa, {
4053
- searchString: r,
4072
+ }), [i, l] = Be(Ga, {
4073
+ searchString: a,
4054
4074
  sortedCell: "timestamp",
4055
- sortDirection: a
4056
- }), [l, h] = Be(Ha, {
4075
+ sortDirection: n
4076
+ }), [h, f] = Be(Wa, {
4057
4077
  prompt: ""
4058
4078
  });
4059
- return L(() => {
4060
- var g;
4061
- (g = document.getElementById("logo")) == null || g.classList.add("fadeOut"), setTimeout(() => {
4062
- var u;
4063
- (u = document.getElementById("root")) == null || u.classList.replace("app-hidden", "fadeIn");
4079
+ return On({
4080
+ keys: [
4081
+ t == null ? void 0 : t.username,
4082
+ i.searchString,
4083
+ i.sortDirection
4084
+ ],
4085
+ getAccessToken: r
4086
+ }), Ln({ getAccessToken: r }), In({ keys: [t == null ? void 0 : t.username], getAccessToken: r }), L(() => {
4087
+ var u;
4088
+ (u = document.getElementById("logo")) == null || u.classList.add("fadeOut"), setTimeout(() => {
4089
+ var g;
4090
+ (g = document.getElementById("root")) == null || g.classList.replace("app-hidden", "fadeIn");
4064
4091
  }, 500);
4065
- }), /* @__PURE__ */ d(ve.Provider, { value: { state: n, dispatch: o }, children: /* @__PURE__ */ d(
4066
- Fa.Provider,
4092
+ }), /* @__PURE__ */ d(ve.Provider, { value: { state: o, dispatch: s }, children: /* @__PURE__ */ d(
4093
+ Bn.Provider,
4067
4094
  {
4068
4095
  value: {
4069
- state: s,
4070
- dispatch: i
4096
+ state: i,
4097
+ dispatch: l
4071
4098
  },
4072
4099
  children: /* @__PURE__ */ I(
4073
- wt.Provider,
4100
+ Nt.Provider,
4074
4101
  {
4075
- value: { state: l, dispatch: h },
4102
+ value: { state: h, dispatch: f },
4076
4103
  children: [
4077
4104
  /* @__PURE__ */ d(
4078
- oa,
4105
+ ca,
4079
4106
  {
4080
4107
  noColors: !0,
4081
4108
  noMargin: !0,
4082
4109
  noPadding: !0,
4083
4110
  noBorder: !0,
4084
- className: Mt({
4111
+ className: Dt({
4085
4112
  extraClass: "mt-5"
4086
4113
  }),
4087
- children: t && /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("div", {}), children: /* @__PURE__ */ d(Uo, {}) })
4114
+ children: /* @__PURE__ */ d(ot, { fallback: /* @__PURE__ */ d("div", {}), children: /* @__PURE__ */ d(Fo, {}) })
4088
4115
  }
4089
4116
  ),
4090
4117
  /* @__PURE__ */ d(
4091
- Kr,
4118
+ Xr,
4092
4119
  {
4093
- className: Mt({
4120
+ className: Dt({
4094
4121
  extraClass: "max-h-[calc(100svh_-_250px)]"
4095
4122
  }),
4096
4123
  noMargin: !0,
4097
4124
  noPadding: !0,
4098
- children: /* @__PURE__ */ d(zo, {})
4125
+ children: /* @__PURE__ */ d(Ho, {})
4099
4126
  }
4100
4127
  ),
4101
- /* @__PURE__ */ d(ro, {})
4128
+ /* @__PURE__ */ d(oo, {})
4102
4129
  ]
4103
4130
  }
4104
4131
  )
4105
4132
  }
4106
4133
  ) });
4107
4134
  }
4108
- Lr.displayName = "App";
4109
- const ts = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Lr }, Symbol.toStringTag, { value: "Module" }));
4135
+ Mr.displayName = "App";
4136
+ const as = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Mr }, Symbol.toStringTag, { value: "Module" }));
4110
4137
  export {
4111
- ts as App,
4138
+ as as App,
4112
4139
  ve as AppContext,
4113
4140
  Ut as E,
4114
- Fa as HistoryContext,
4115
- fn as NewChatButton,
4116
- yr as Pe,
4117
- ze as SERVICE_TYPES,
4118
- qo as be,
4141
+ Cr as Fe,
4142
+ Bn as HistoryContext,
4143
+ ro as NewChatButton,
4144
+ Ue as SERVICE_TYPES,
4145
+ Yo as be,
4119
4146
  Ee as f,
4120
- Wo as ge,
4121
- jo as he,
4122
- $a as ie,
4123
- xo as le,
4124
- Ko as me,
4125
- gn as serviceCall,
4126
- Jo as ue,
4127
- Qo as useChatsHistory,
4128
- Zo as usePreloadChatsHistory,
4129
- es as useServerCapabilities,
4130
- Xo as useUserChatStats,
4131
- Qn as useUserPreferences,
4132
- Yo as ye
4147
+ Ko as ge,
4148
+ Jo as he,
4149
+ Va as ie,
4150
+ To as le,
4151
+ Xo as me,
4152
+ Nn as serviceCall,
4153
+ Qo as ue,
4154
+ ts as useChatsHistory,
4155
+ rs as useServerCapabilities,
4156
+ es as useUserChatStats,
4157
+ Cn as useUserPreferences,
4158
+ Zo as ye
4133
4159
  };