@versini/sassysaint 5.4.11 → 5.4.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { jsx as s, jsxs as v, Fragment as O } from "react/jsx-runtime";
2
- import { g as Ne, ACTION_RESTORE as we, ACTION_MESSAGE as S, ROLE_ASSISTANT as E, ACTION_RESET as ie, ACTION_MODEL as de, ACTION_ENGINE as se, ACTION_STREAMING as ne, ACTION_SORT as Ie, ACTION_SEARCH as Ee, ACTION_SET_TAGS as le, ACTION_RESET_TAGS as ce, ACTION_TOGGLE_TAG as ge, AppContext as U, TagsContext as H, un as z, L as Ce, j as Se, C as ue, isLastMessageFromRole as me, O as Re, TOOLBOX as Y, ROLE_INTERNAL as P, ROLE_USER as G, ROLE_SYSTEM as Be, ROLE_HIDDEN as Me, DEFAULT_AI_ENGINE as A, STATS_SEPARATOR as q, CLIPBOARD_TAG as X, TYPE_QUESTION as Ae, SEND as Le, ERROR_MESSAGE as Oe, getMessageContaintWrapperClass as Ue, MessagesContainerHeader as ze, HistoryContext as Ve, _ as De, AppFooter as $e, LOCAL_STORAGE_PREFIX as J, LOCAL_STORAGE_SEARCH as Ge, LOCAL_STORAGE_SORT as He } from "./index.BawXN3eR.js";
3
- import { serviceCall as he, SERVICE_TYPES as be, h as Pe, restCall as je, Le as We, E as Q, f as Fe } from "./index.C-b6HJz9.js";
1
+ import { jsx as n, jsxs as v, Fragment as O } from "react/jsx-runtime";
2
+ import { g as we, ACTION_RESTORE as Ne, ACTION_MESSAGE as S, ROLE_ASSISTANT as E, ACTION_RESET as ie, ACTION_MODEL as de, ACTION_ENGINE as ne, ACTION_STREAMING as se, ACTION_SORT as Ie, ACTION_SEARCH as Ee, ACTION_SET_TAGS as ce, ACTION_RESET_TAGS as le, ACTION_TOGGLE_TAG as ge, AppContext as z, TagsContext as H, un as U, L as Ce, j as Se, C as ue, isLastMessageFromRole as me, O as Re, TOOLBOX as Y, ROLE_INTERNAL as P, ROLE_USER as G, ROLE_SYSTEM as Be, ROLE_HIDDEN as Me, DEFAULT_AI_ENGINE as A, STATS_SEPARATOR as q, CLIPBOARD_TAG as X, TYPE_QUESTION as Ae, SEND as Le, ERROR_MESSAGE as Oe, getMessageContaintWrapperClass as ze, MessagesContainerHeader as Ue, HistoryContext as Ve, _ as De, AppFooter as $e, LOCAL_STORAGE_PREFIX as J, LOCAL_STORAGE_SEARCH as Ge, LOCAL_STORAGE_SORT as He } from "./index.SBEBWYWL.js";
3
+ import { serviceCall as he, SERVICE_TYPES as be, h as Pe, restCall as je, Le as We, E as Q, f as Fe } from "./index.BQqipbFO.js";
4
4
  import C, { useContext as R, useState as M, useRef as B, useEffect as _, lazy as Ke, Suspense as Z, useReducer as D } from "react";
5
5
  import d from "clsx";
6
6
  const Ye = ({
@@ -9,16 +9,16 @@ const Ye = ({
9
9
  title: r,
10
10
  monotone: a,
11
11
  ...o
12
- }) => /* @__PURE__ */ s(
13
- Ne,
12
+ }) => /* @__PURE__ */ n(
13
+ we,
14
14
  {
15
15
  defaultViewBox: "0 0 384 512",
16
- defaultClassName: "size-5",
16
+ size: "size-5",
17
17
  viewBox: t,
18
18
  className: e,
19
19
  title: r || "Close",
20
20
  ...o,
21
- children: /* @__PURE__ */ s("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
21
+ children: /* @__PURE__ */ n("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
22
22
  }
23
23
  );
24
24
  function qe(e) {
@@ -35,7 +35,7 @@ function qe(e) {
35
35
  };
36
36
  }
37
37
  function Xe(e, t) {
38
- const { alt: r, ctrl: a, meta: o, mod: i, shift: g, key: l } = e, { altKey: u, ctrlKey: m, metaKey: b, shiftKey: h, key: c } = t;
38
+ const { alt: r, ctrl: a, meta: o, mod: i, shift: g, key: c } = e, { altKey: u, ctrlKey: m, metaKey: b, shiftKey: h, key: l } = t;
39
39
  if (r !== u)
40
40
  return !1;
41
41
  if (i) {
@@ -43,7 +43,7 @@ function Xe(e, t) {
43
43
  return !1;
44
44
  } else if (a !== m || o !== b)
45
45
  return !1;
46
- return g !== h ? !1 : !!(l && (c.toLowerCase() === l.toLowerCase() || t.code.replace("Key", "").toLowerCase() === l.toLowerCase()));
46
+ return g !== h ? !1 : !!(c && (l.toLowerCase() === c.toLowerCase() || t.code.replace("Key", "").toLowerCase() === c.toLowerCase()));
47
47
  }
48
48
  function Je(e) {
49
49
  return (t) => Xe(qe(e), t);
@@ -81,7 +81,7 @@ function j(e, t, r) {
81
81
  return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ze(a);
82
82
  }
83
83
  const at = (e, t) => {
84
- if ((t == null ? void 0 : t.type) === we) {
84
+ if ((t == null ? void 0 : t.type) === Ne) {
85
85
  const r = t.payload.messages.map((a) => ({
86
86
  message: {
87
87
  role: a.role,
@@ -103,7 +103,7 @@ const at = (e, t) => {
103
103
  if ((t == null ? void 0 : t.type) === S) {
104
104
  const r = t.payload.message.role, a = t.payload.message.content, o = t.payload.message.name, i = t.payload.message.processingTime, g = t.payload.message.messageId;
105
105
  if (r !== "") {
106
- const l = {
106
+ const c = {
107
107
  role: r,
108
108
  content: a,
109
109
  name: o,
@@ -144,7 +144,7 @@ const at = (e, t) => {
144
144
  messages: [
145
145
  ...e.messages,
146
146
  {
147
- message: l
147
+ message: c
148
148
  }
149
149
  ]
150
150
  };
@@ -166,10 +166,10 @@ const at = (e, t) => {
166
166
  usage: t.payload.usage,
167
167
  messages: e.messages,
168
168
  isComponent: e.isComponent
169
- } : (t == null ? void 0 : t.type) === se ? {
169
+ } : (t == null ? void 0 : t.type) === ne ? {
170
170
  ...e,
171
171
  engine: t.payload.engine
172
- } : (t == null ? void 0 : t.type) === ne ? {
172
+ } : (t == null ? void 0 : t.type) === se ? {
173
173
  ...e,
174
174
  streaming: t.payload.streaming
175
175
  } : e;
@@ -197,12 +197,12 @@ const at = (e, t) => {
197
197
  tags: e.tags,
198
198
  tag: t.payload.tag
199
199
  };
200
- case ce:
200
+ case le:
201
201
  return {
202
202
  tags: e.tags,
203
203
  tag: ""
204
204
  };
205
- case le:
205
+ case ce:
206
206
  return {
207
207
  tags: t.payload.tags,
208
208
  tag: ""
@@ -211,19 +211,19 @@ const at = (e, t) => {
211
211
  return e;
212
212
  }
213
213
  }, dt = () => {
214
- const { dispatch: e, state: t } = R(U), { dispatch: r, state: a } = R(H), { getAccessToken: o, user: i } = z(), [g, l] = M({
214
+ const { dispatch: e, state: t } = R(z), { dispatch: r, state: a } = R(H), { getAccessToken: o, user: i } = U(), [g, c] = M({
215
215
  loaded: !1
216
- }), u = "mt-2 flex justify-center rounded-md", m = B(null), b = B(!1), h = (n) => {
217
- n.preventDefault(), e({
216
+ }), u = "mt-2 flex justify-center rounded-md", m = B(null), b = B(!1), h = (s) => {
217
+ s.preventDefault(), e({
218
218
  type: ie
219
219
  });
220
220
  };
221
221
  _(() => {
222
- var n;
223
- (t == null ? void 0 : t.streaming) === !0 && !b.current && m.current && (b.current = !0, m.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (b.current = !1, (n = m.current) == null || n.blur());
222
+ var s;
223
+ (t == null ? void 0 : t.streaming) === !0 && !b.current && m.current && (b.current = !0, m.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (b.current = !1, (s = m.current) == null || s.blur());
224
224
  }, [t]);
225
- const c = (n, p) => {
226
- n.preventDefault(), r({
225
+ const l = (s, p) => {
226
+ s.preventDefault(), r({
227
227
  type: ge,
228
228
  payload: {
229
229
  tag: p
@@ -232,44 +232,44 @@ const at = (e, t) => {
232
232
  };
233
233
  return _(() => {
234
234
  if (!i) {
235
- l({
235
+ c({
236
236
  loaded: !1
237
237
  });
238
238
  return;
239
239
  }
240
240
  g.loaded || (async () => {
241
241
  try {
242
- const n = await he({
242
+ const s = await he({
243
243
  accessToken: await o(),
244
244
  type: be.GET_USER_PREFERENCES,
245
245
  params: {
246
246
  user: i.username
247
247
  }
248
248
  });
249
- n.status === 200 && (r({
250
- type: le,
249
+ s.status === 200 && (r({
250
+ type: ce,
251
251
  payload: {
252
- tags: n.data.tags || []
252
+ tags: s.data.tags || []
253
253
  }
254
- }), l({
254
+ }), c({
255
255
  loaded: !0
256
256
  }));
257
257
  } catch {
258
258
  }
259
259
  })();
260
260
  }, [i]), /* @__PURE__ */ v(O, { children: [
261
- /* @__PURE__ */ s(Ce, { alignHorizontal: "center", columnGap: 2, children: g && g.loaded && a.tags && a.tags.map((n) => n.enabled && n.label && n.content && /* @__PURE__ */ s(Se, { children: /* @__PURE__ */ s("div", { className: u, children: /* @__PURE__ */ s(
261
+ /* @__PURE__ */ n(Ce, { alignHorizontal: "center", columnGap: 2, children: g && g.loaded && a.tags && a.tags.map((s) => s.enabled && s.label && s.content && /* @__PURE__ */ n(Se, { children: /* @__PURE__ */ n("div", { className: u, children: /* @__PURE__ */ n(
262
262
  ue,
263
263
  {
264
264
  noBorder: !0,
265
265
  mode: "dark",
266
266
  focusMode: "light",
267
267
  size: "small",
268
- onClick: (p) => c(p, n.content),
269
- children: n.label
268
+ onClick: (p) => l(p, s.content),
269
+ children: s.label
270
270
  }
271
- ) }) }, `tag-button-${n.slot}`)) }),
272
- me(E, t) && /* @__PURE__ */ s("div", { className: u, children: /* @__PURE__ */ s(
271
+ ) }) }, `tag-button-${s.slot}`)) }),
272
+ me(E, t) && /* @__PURE__ */ n("div", { className: u, children: /* @__PURE__ */ n(
273
273
  Re,
274
274
  {
275
275
  noBorder: !0,
@@ -278,44 +278,44 @@ const at = (e, t) => {
278
278
  ref: m,
279
279
  onClick: h,
280
280
  labelRight: t != null && t.streaming ? Y.ACTION_WHILE_STREAMING.content : Y.ACTION_WHILE_NOT_STREAMING.content,
281
- children: t != null && t.streaming ? /* @__PURE__ */ s(Ye, { className: "size-4" }) : /* @__PURE__ */ s(Pe, { className: "size-4" })
281
+ children: t != null && t.streaming ? /* @__PURE__ */ n(Ye, { size: "size-4" }) : /* @__PURE__ */ n(Pe, { size: "size-4" })
282
282
  }
283
283
  ) })
284
284
  ] });
285
285
  };
286
286
  /*!
287
- @versini/ui-bubble v2.0.2
287
+ @versini/ui-bubble v2.0.7
288
288
  © 2024 gizmette.com
289
289
  */
290
290
  try {
291
291
  window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
292
- version: "2.0.2",
293
- buildTime: "12/30/2024 12:27 PM EST",
292
+ version: "2.0.7",
293
+ buildTime: "12/30/2024 05:51 PM EST",
294
294
  homepage: "https://github.com/aversini/ui-components",
295
295
  license: "MIT"
296
296
  });
297
297
  } catch {
298
298
  }
299
- const st = "av-bubble", te = "av-button", W = "icon", nt = "button", lt = "link", ct = ({
299
+ const nt = "av-bubble", te = "av-button", W = "icon", st = "button", ct = "link", lt = ({
300
300
  type: e,
301
301
  size: t,
302
302
  labelRight: r,
303
303
  labelLeft: a,
304
304
  align: o
305
305
  }) => {
306
- const i = "text-sm font-medium max-h-8 py-0", g = "text-base font-medium max-h-9 py-1", l = "text-lg font-medium max-h-12 py-2";
306
+ const i = "text-sm font-medium max-h-8 py-0", g = "text-base font-medium max-h-9 py-1", c = "text-lg font-medium max-h-12 py-2";
307
307
  switch (e) {
308
- case nt:
308
+ case st:
309
309
  return d("px-4", {
310
310
  [i]: t === "small",
311
311
  [g]: t === "medium",
312
- [l]: t === "large"
312
+ [c]: t === "large"
313
313
  });
314
- case lt:
314
+ case ct:
315
315
  return d("px-4 text-center", {
316
316
  [i]: t === "small",
317
317
  [g]: t === "medium",
318
- [l]: t === "large"
318
+ [c]: t === "large"
319
319
  });
320
320
  case W:
321
321
  return d("inline-flex items-center", {
@@ -507,29 +507,29 @@ const st = "av-bubble", te = "av-button", W = "icon", nt = "button", lt = "link"
507
507
  focusMode: o,
508
508
  disabled: i,
509
509
  fullWidth: g,
510
- size: l,
510
+ size: c,
511
511
  noBorder: u,
512
512
  labelRight: m,
513
513
  labelLeft: b,
514
514
  noBackground: h,
515
- variant: c,
516
- noTruncate: n,
515
+ variant: l,
516
+ noTruncate: s,
517
517
  align: p,
518
518
  radius: f
519
- }) => (c || (c = "primary"), r ? d(te, t) : d(
519
+ }) => (l || (l = "primary"), r ? d(te, t) : d(
520
520
  te,
521
521
  gt({
522
522
  mode: a,
523
- variant: c,
523
+ variant: l,
524
524
  noBackground: h,
525
- noTruncate: n,
525
+ noTruncate: s,
526
526
  radius: f
527
527
  }),
528
- ct({ type: e, size: l, labelRight: m, labelLeft: b, align: p }),
529
- ht({ mode: a, variant: c, noBorder: u }),
528
+ lt({ type: e, size: c, labelRight: m, labelLeft: b, align: p }),
529
+ ht({ mode: a, variant: l, noBorder: u }),
530
530
  bt({ focusMode: o }),
531
- ut({ mode: a, variant: c, disabled: i }),
532
- mt({ mode: a, variant: c, disabled: i }),
531
+ ut({ mode: a, variant: l, disabled: i }),
532
+ mt({ mode: a, variant: l, disabled: i }),
533
533
  {
534
534
  "w-full": g,
535
535
  "disabled:cursor-not-allowed disabled:opacity-50": i
@@ -540,7 +540,7 @@ const st = "av-bubble", te = "av-button", W = "icon", nt = "button", lt = "link"
540
540
  !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);
541
541
  }, F = C.forwardRef((e, t) => {
542
542
  const { onClick: r, noInternalClick: a = !1, ...o } = e;
543
- return /* @__PURE__ */ s(
543
+ return /* @__PURE__ */ n(
544
544
  "button",
545
545
  {
546
546
  ref: t,
@@ -561,17 +561,17 @@ const ye = C.forwardRef(
561
561
  fullWidth: o = !1,
562
562
  className: i,
563
563
  type: g = "button",
564
- raw: l = !1,
564
+ raw: c = !1,
565
565
  noBorder: u = !1,
566
566
  "aria-label": m,
567
567
  label: b,
568
568
  size: h = "medium",
569
- labelRight: c,
570
- labelLeft: n,
569
+ labelRight: l,
570
+ labelLeft: s,
571
571
  noBackground: p = !1,
572
572
  align: f = "center",
573
- radius: N = "large",
574
- ...w
573
+ radius: w = "large",
574
+ ...N
575
575
  }, k) => {
576
576
  const x = pe({
577
577
  type: W,
@@ -579,20 +579,20 @@ const ye = C.forwardRef(
579
579
  focusMode: a,
580
580
  fullWidth: o,
581
581
  disabled: t,
582
- raw: l,
582
+ raw: c,
583
583
  className: i,
584
584
  noBorder: u,
585
585
  size: h,
586
- labelRight: c,
587
- labelLeft: n,
586
+ labelRight: l,
587
+ labelLeft: s,
588
588
  noBackground: p,
589
589
  align: f,
590
- radius: N
590
+ radius: w
591
591
  }), I = d({
592
- "text-copy-accent-dark": r === "light" && !l,
593
- "text-copy-light": r === "dark" && !l,
594
- "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
595
- "text-copy-light dark:text-copy-accent-dark": r === "system" && !l
592
+ "text-copy-accent-dark": r === "light" && !c,
593
+ "text-copy-light": r === "dark" && !c,
594
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !c,
595
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !c
596
596
  });
597
597
  return /* @__PURE__ */ v(
598
598
  F,
@@ -602,11 +602,11 @@ const ye = C.forwardRef(
602
602
  disabled: t,
603
603
  type: g,
604
604
  "aria-label": m || b,
605
- ...w,
605
+ ...N,
606
606
  children: [
607
- n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
608
- /* @__PURE__ */ s("div", { className: I, children: e }),
609
- c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
607
+ s && /* @__PURE__ */ n("span", { className: "pr-2", children: s }),
608
+ /* @__PURE__ */ n("div", { className: I, children: e }),
609
+ l && /* @__PURE__ */ n("span", { className: "pl-2", children: l })
610
610
  ]
611
611
  }
612
612
  );
@@ -614,13 +614,13 @@ const ye = C.forwardRef(
614
614
  );
615
615
  ye.displayName = "ButtonIcon";
616
616
  /*!
617
- @versini/ui-button v2.2.0
617
+ @versini/ui-button v3.0.1
618
618
  © 2024 gizmette.com
619
619
  */
620
620
  try {
621
621
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
622
- version: "2.2.0",
623
- buildTime: "12/30/2024 12:27 PM EST",
622
+ version: "3.0.1",
623
+ buildTime: "12/30/2024 05:51 PM EST",
624
624
  homepage: "https://github.com/aversini/ui-components",
625
625
  license: "MIT"
626
626
  });
@@ -635,17 +635,17 @@ const yt = C.forwardRef(
635
635
  fullWidth: o = !1,
636
636
  className: i,
637
637
  type: g = "button",
638
- raw: l = !1,
638
+ raw: c = !1,
639
639
  noBorder: u = !1,
640
640
  "aria-label": m,
641
641
  label: b,
642
642
  size: h = "medium",
643
- labelRight: c,
644
- labelLeft: n,
643
+ labelRight: l,
644
+ labelLeft: s,
645
645
  noBackground: p = !1,
646
646
  align: f = "center",
647
- active: N = !1,
648
- radius: w = "large",
647
+ active: w = !1,
648
+ radius: N = "large",
649
649
  ...k
650
650
  }, x) => {
651
651
  const I = pe({
@@ -654,21 +654,21 @@ const yt = C.forwardRef(
654
654
  focusMode: a,
655
655
  fullWidth: o,
656
656
  disabled: t,
657
- raw: l,
657
+ raw: c,
658
658
  className: i,
659
659
  noBorder: u,
660
660
  size: h,
661
- labelRight: c,
662
- labelLeft: n,
661
+ labelRight: l,
662
+ labelLeft: s,
663
663
  noBackground: p,
664
664
  align: f,
665
- radius: w
665
+ radius: N
666
666
  }), T = d({
667
- "text-copy-accent-dark": r === "light" && !l,
668
- "text-copy-light": r === "dark" && !l,
669
- "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
670
- "text-copy-light dark:text-copy-accent-dark": r === "system" && !l
671
- }), V = N ? d(
667
+ "text-copy-accent-dark": r === "light" && !c,
668
+ "text-copy-light": r === "dark" && !c,
669
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !c,
670
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !c
671
+ }), V = w ? d(
672
672
  "relative",
673
673
  "focus-within:static",
674
674
  "focus-within:after:border-transparent",
@@ -685,7 +685,7 @@ const yt = C.forwardRef(
685
685
  "after:border-table-light dark:after:border-table-dark": r === "alt-system"
686
686
  }
687
687
  ) : "";
688
- return /* @__PURE__ */ s("div", { className: V, children: /* @__PURE__ */ v(
688
+ return /* @__PURE__ */ n("div", { className: V, children: /* @__PURE__ */ v(
689
689
  F,
690
690
  {
691
691
  ref: x,
@@ -695,9 +695,9 @@ const yt = C.forwardRef(
695
695
  "aria-label": m || b,
696
696
  ...k,
697
697
  children: [
698
- n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
699
- /* @__PURE__ */ s("div", { className: T, children: e }),
700
- c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
698
+ s && /* @__PURE__ */ n("span", { className: "pr-2", children: s }),
699
+ /* @__PURE__ */ n("div", { className: T, children: e }),
700
+ l && /* @__PURE__ */ n("span", { className: "pl-2", children: l })
701
701
  ]
702
702
  }
703
703
  ) });
@@ -710,14 +710,14 @@ const fe = ({
710
710
  viewBox: r,
711
711
  className: a,
712
712
  defaultViewBox: o,
713
- defaultClassName: i,
713
+ size: i,
714
714
  title: g,
715
- semantic: l = !1,
715
+ semantic: c = !1,
716
716
  ...u
717
717
  }) => {
718
- const m = d(a || i);
718
+ const m = d(i, a);
719
719
  return /* @__PURE__ */ v(O, { children: [
720
- /* @__PURE__ */ s(
720
+ /* @__PURE__ */ n(
721
721
  "svg",
722
722
  {
723
723
  xmlns: "http://www.w3.org/2000/svg",
@@ -725,23 +725,23 @@ const fe = ({
725
725
  viewBox: r || o,
726
726
  fill: t || "currentColor",
727
727
  role: "img",
728
- "aria-hidden": !l,
728
+ "aria-hidden": !c,
729
729
  focusable: !1,
730
730
  ...u,
731
731
  children: e
732
732
  }
733
733
  ),
734
- g && l && /* @__PURE__ */ s("span", { className: "sr-only", children: g })
734
+ g && c && /* @__PURE__ */ n("span", { className: "sr-only", children: g })
735
735
  ] });
736
736
  };
737
737
  /*!
738
- @versini/ui-svgicon v2.0.2
738
+ @versini/ui-svgicon v3.0.1
739
739
  © 2024 gizmette.com
740
740
  */
741
741
  try {
742
742
  window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
743
- version: "2.0.2",
744
- buildTime: "12/30/2024 12:27 PM EST",
743
+ version: "3.0.1",
744
+ buildTime: "12/30/2024 05:51 PM EST",
745
745
  homepage: "https://github.com/aversini/ui-components",
746
746
  license: "MIT"
747
747
  });
@@ -757,20 +757,20 @@ const ft = ({
757
757
  fe,
758
758
  {
759
759
  defaultViewBox: "0 0 448 512",
760
- defaultClassName: "size-5",
760
+ size: "size-5",
761
761
  viewBox: t,
762
762
  className: e,
763
763
  title: r || "Copied",
764
764
  ...o,
765
765
  children: [
766
- /* @__PURE__ */ s(
766
+ /* @__PURE__ */ n(
767
767
  "path",
768
768
  {
769
769
  opacity: "0.4",
770
770
  d: "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"
771
771
  }
772
772
  ),
773
- /* @__PURE__ */ s("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
773
+ /* @__PURE__ */ n("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
774
774
  ]
775
775
  }
776
776
  ), vt = ({
@@ -779,32 +779,32 @@ const ft = ({
779
779
  title: r,
780
780
  monotone: a,
781
781
  ...o
782
- }) => /* @__PURE__ */ s(
782
+ }) => /* @__PURE__ */ n(
783
783
  fe,
784
784
  {
785
785
  defaultViewBox: "0 0 512 512",
786
- defaultClassName: "size-5",
786
+ size: "size-5",
787
787
  viewBox: t,
788
788
  className: e,
789
789
  title: r || "Copy",
790
790
  ...o,
791
- children: /* @__PURE__ */ s("path", { d: "M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z" })
791
+ children: /* @__PURE__ */ n("path", { d: "M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z" })
792
792
  }
793
793
  );
794
794
  /*!
795
- @versini/ui-icons v2.0.2
795
+ @versini/ui-icons v3.0.1
796
796
  © 2024 gizmette.com
797
797
  */
798
798
  try {
799
799
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
800
- version: "2.0.2",
801
- buildTime: "12/30/2024 12:27 PM EST",
800
+ version: "3.0.1",
801
+ buildTime: "12/30/2024 05:51 PM EST",
802
802
  homepage: "https://github.com/aversini/ui-components",
803
803
  license: "MIT"
804
804
  });
805
805
  } catch {
806
806
  }
807
- const kt = () => "p-4 sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) => d({
807
+ const kt = () => "p-4 max-w-md md:max-w-2xl", xt = ({ kind: e }) => d({
808
808
  "bg-surface-lighter dark:bg-surface-dark": e === "left",
809
809
  "bg-surface-accent": e === "right"
810
810
  }), Tt = ({ kind: e }) => d(
@@ -815,12 +815,12 @@ const kt = () => "p-4 sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) => d({
815
815
  ), _t = ({ kind: e }) => d("rounded-b-xl", {
816
816
  "rounded-tr-xl": e === "left",
817
817
  "rounded-tl-xl": e === "right"
818
- }), Nt = ({
818
+ }), wt = ({
819
819
  kind: e,
820
820
  className: t
821
821
  }) => {
822
822
  const r = d(
823
- st,
823
+ nt,
824
824
  "flex items-start",
825
825
  {
826
826
  "flex-row-reverse": e === "right"
@@ -842,7 +842,7 @@ const kt = () => "p-4 sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) => d({
842
842
  footer: o,
843
843
  copyButton: i
844
844
  };
845
- }, wt = ({
845
+ }, Nt = ({
846
846
  children: e,
847
847
  kind: t = "left",
848
848
  className: r,
@@ -850,40 +850,40 @@ const kt = () => "p-4 sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) => d({
850
850
  rawFooter: o,
851
851
  copyToClipboard: i,
852
852
  copyToClipboardFocusMode: g = "system",
853
- copyToClipboardMode: l = "system"
853
+ copyToClipboardMode: c = "system"
854
854
  }) => {
855
- const [u, m] = M(!1), b = Nt({ kind: t, className: r }), h = !!i && (typeof i == "function" || typeof i == "string" || typeof e == "string"), c = () => {
855
+ const [u, m] = M(!1), b = wt({ kind: t, className: r }), h = !!i && (typeof i == "function" || typeof i == "string" || typeof e == "string"), l = () => {
856
856
  m(!0), typeof i == "function" ? i(e) : typeof i == "string" ? navigator.clipboard.writeText(i) : typeof e == "string" && navigator.clipboard.writeText(e);
857
857
  };
858
858
  return _(() => {
859
- let n;
860
- return u && (n = window.setTimeout(() => {
859
+ let s;
860
+ return u && (s = window.setTimeout(() => {
861
861
  m(!1);
862
862
  }, 3e3)), () => {
863
- clearTimeout(n);
863
+ clearTimeout(s);
864
864
  };
865
865
  }, [u]), /* @__PURE__ */ v("div", { className: b.wrapper, children: [
866
866
  /* @__PURE__ */ v("div", { children: [
867
- /* @__PURE__ */ s("div", { className: b.main, children: e }),
868
- a && Object.keys(a).map((n) => a[n] ? /* @__PURE__ */ s("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: b.footer, children: [
869
- n,
867
+ /* @__PURE__ */ n("div", { className: b.main, children: e }),
868
+ a && Object.keys(a).map((s) => a[s] ? /* @__PURE__ */ n("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: b.footer, children: [
869
+ s,
870
870
  ": ",
871
- a[n]
872
- ] }) }, `-${n}`) : null),
871
+ a[s]
872
+ ] }) }, `-${s}`) : null),
873
873
  o && o
874
874
  ] }),
875
- h && /* @__PURE__ */ s("div", { className: b.copyButton, children: /* @__PURE__ */ s(
875
+ h && /* @__PURE__ */ n("div", { className: b.copyButton, children: /* @__PURE__ */ n(
876
876
  ye,
877
877
  {
878
878
  noBorder: !0,
879
879
  noBackground: !0,
880
880
  size: "small",
881
- mode: l,
881
+ mode: c,
882
882
  focusMode: g,
883
883
  label: u ? "Copied to clipboard" : "Copy to clipboard",
884
- onClick: c,
884
+ onClick: l,
885
885
  disabled: u,
886
- children: u ? /* @__PURE__ */ s(ft, { className: "size-3" }) : /* @__PURE__ */ s(vt, { className: "size-3" })
886
+ children: u ? /* @__PURE__ */ n(ft, { size: "size-3" }) : /* @__PURE__ */ n(vt, { size: "size-3" })
887
887
  }
888
888
  ) })
889
889
  ] });
@@ -894,19 +894,19 @@ const kt = () => "p-4 sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) => d({
894
894
  labelLeft: a,
895
895
  align: o
896
896
  }) => {
897
- const i = "text-sm font-medium max-h-8 py-0", g = "text-base font-medium max-h-9 py-1", l = "text-lg font-medium max-h-12 py-2";
897
+ const i = "text-sm font-medium max-h-8 py-0", g = "text-base font-medium max-h-9 py-1", c = "text-lg font-medium max-h-12 py-2";
898
898
  switch (e) {
899
899
  case ke:
900
900
  return d("px-4", {
901
901
  [i]: t === "small",
902
902
  [g]: t === "medium",
903
- [l]: t === "large"
903
+ [c]: t === "large"
904
904
  });
905
905
  case It:
906
906
  return d("px-4 text-center", {
907
907
  [i]: t === "small",
908
908
  [g]: t === "medium",
909
- [l]: t === "large"
909
+ [c]: t === "large"
910
910
  });
911
911
  case ve:
912
912
  return d("inline-flex items-center", {
@@ -1098,29 +1098,29 @@ const kt = () => "p-4 sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) => d({
1098
1098
  focusMode: o,
1099
1099
  disabled: i,
1100
1100
  fullWidth: g,
1101
- size: l,
1101
+ size: c,
1102
1102
  noBorder: u,
1103
1103
  labelRight: m,
1104
1104
  labelLeft: b,
1105
1105
  noBackground: h,
1106
- variant: c,
1107
- noTruncate: n,
1106
+ variant: l,
1107
+ noTruncate: s,
1108
1108
  align: p,
1109
1109
  radius: f
1110
- }) => (c || (c = "primary"), r ? d(re, t) : d(
1110
+ }) => (l || (l = "primary"), r ? d(re, t) : d(
1111
1111
  re,
1112
1112
  Ct({
1113
1113
  mode: a,
1114
- variant: c,
1114
+ variant: l,
1115
1115
  noBackground: h,
1116
- noTruncate: n,
1116
+ noTruncate: s,
1117
1117
  radius: f
1118
1118
  }),
1119
- Et({ type: e, size: l, labelRight: m, labelLeft: b, align: p }),
1120
- Bt({ mode: a, variant: c, noBorder: u }),
1119
+ Et({ type: e, size: c, labelRight: m, labelLeft: b, align: p }),
1120
+ Bt({ mode: a, variant: l, noBorder: u }),
1121
1121
  Mt({ focusMode: o }),
1122
- St({ mode: a, variant: c, disabled: i }),
1123
- Rt({ mode: a, variant: c, disabled: i }),
1122
+ St({ mode: a, variant: l, disabled: i }),
1123
+ Rt({ mode: a, variant: l, disabled: i }),
1124
1124
  {
1125
1125
  "w-full": g,
1126
1126
  "disabled:cursor-not-allowed disabled:opacity-50": i
@@ -1131,7 +1131,7 @@ const kt = () => "p-4 sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) => d({
1131
1131
  !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);
1132
1132
  }, K = C.forwardRef((e, t) => {
1133
1133
  const { onClick: r, noInternalClick: a = !1, ...o } = e;
1134
- return /* @__PURE__ */ s(
1134
+ return /* @__PURE__ */ n(
1135
1135
  "button",
1136
1136
  {
1137
1137
  ref: t,
@@ -1152,20 +1152,20 @@ const Te = C.forwardRef(
1152
1152
  fullWidth: o = !1,
1153
1153
  className: i,
1154
1154
  size: g = "medium",
1155
- raw: l = !1,
1155
+ raw: c = !1,
1156
1156
  noBorder: u = !1,
1157
1157
  variant: m = "primary",
1158
1158
  noTruncate: b = !1,
1159
1159
  radius: h = "large",
1160
- ...c
1161
- }, n) => {
1160
+ ...l
1161
+ }, s) => {
1162
1162
  const p = xe({
1163
1163
  type: ke,
1164
1164
  mode: r,
1165
1165
  focusMode: a,
1166
1166
  fullWidth: o,
1167
1167
  disabled: t,
1168
- raw: l,
1168
+ raw: c,
1169
1169
  className: i,
1170
1170
  size: g,
1171
1171
  noBorder: u,
@@ -1173,13 +1173,13 @@ const Te = C.forwardRef(
1173
1173
  noTruncate: b,
1174
1174
  radius: h
1175
1175
  });
1176
- return /* @__PURE__ */ s(
1176
+ return /* @__PURE__ */ n(
1177
1177
  K,
1178
1178
  {
1179
- ref: n,
1179
+ ref: s,
1180
1180
  className: p,
1181
1181
  disabled: t,
1182
- ...c,
1182
+ ...l,
1183
1183
  children: e
1184
1184
  }
1185
1185
  );
@@ -1187,13 +1187,13 @@ const Te = C.forwardRef(
1187
1187
  );
1188
1188
  Te.displayName = "Button";
1189
1189
  /*!
1190
- @versini/ui-button v2.2.0
1190
+ @versini/ui-button v3.0.1
1191
1191
  © 2024 gizmette.com
1192
1192
  */
1193
1193
  try {
1194
1194
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
1195
- version: "2.2.0",
1196
- buildTime: "12/30/2024 12:27 PM EST",
1195
+ version: "3.0.1",
1196
+ buildTime: "12/30/2024 05:27 PM EST",
1197
1197
  homepage: "https://github.com/aversini/ui-components",
1198
1198
  license: "MIT"
1199
1199
  });
@@ -1208,17 +1208,17 @@ const Lt = C.forwardRef(
1208
1208
  fullWidth: o = !1,
1209
1209
  className: i,
1210
1210
  type: g = "button",
1211
- raw: l = !1,
1211
+ raw: c = !1,
1212
1212
  noBorder: u = !1,
1213
1213
  "aria-label": m,
1214
1214
  label: b,
1215
1215
  size: h = "medium",
1216
- labelRight: c,
1217
- labelLeft: n,
1216
+ labelRight: l,
1217
+ labelLeft: s,
1218
1218
  noBackground: p = !1,
1219
1219
  align: f = "center",
1220
- active: N = !1,
1221
- radius: w = "large",
1220
+ active: w = !1,
1221
+ radius: N = "large",
1222
1222
  ...k
1223
1223
  }, x) => {
1224
1224
  const I = xe({
@@ -1227,21 +1227,21 @@ const Lt = C.forwardRef(
1227
1227
  focusMode: a,
1228
1228
  fullWidth: o,
1229
1229
  disabled: t,
1230
- raw: l,
1230
+ raw: c,
1231
1231
  className: i,
1232
1232
  noBorder: u,
1233
1233
  size: h,
1234
- labelRight: c,
1235
- labelLeft: n,
1234
+ labelRight: l,
1235
+ labelLeft: s,
1236
1236
  noBackground: p,
1237
1237
  align: f,
1238
- radius: w
1238
+ radius: N
1239
1239
  }), T = d({
1240
- "text-copy-accent-dark": r === "light" && !l,
1241
- "text-copy-light": r === "dark" && !l,
1242
- "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
1243
- "text-copy-light dark:text-copy-accent-dark": r === "system" && !l
1244
- }), V = N ? d(
1240
+ "text-copy-accent-dark": r === "light" && !c,
1241
+ "text-copy-light": r === "dark" && !c,
1242
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !c,
1243
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !c
1244
+ }), V = w ? d(
1245
1245
  "relative",
1246
1246
  "focus-within:static",
1247
1247
  "focus-within:after:border-transparent",
@@ -1258,7 +1258,7 @@ const Lt = C.forwardRef(
1258
1258
  "after:border-table-light dark:after:border-table-dark": r === "alt-system"
1259
1259
  }
1260
1260
  ) : "";
1261
- return /* @__PURE__ */ s("div", { className: V, children: /* @__PURE__ */ v(
1261
+ return /* @__PURE__ */ n("div", { className: V, children: /* @__PURE__ */ v(
1262
1262
  K,
1263
1263
  {
1264
1264
  ref: x,
@@ -1268,16 +1268,16 @@ const Lt = C.forwardRef(
1268
1268
  "aria-label": m || b,
1269
1269
  ...k,
1270
1270
  children: [
1271
- n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
1272
- /* @__PURE__ */ s("div", { className: T, children: e }),
1273
- c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
1271
+ s && /* @__PURE__ */ n("span", { className: "pr-2", children: s }),
1272
+ /* @__PURE__ */ n("div", { className: T, children: e }),
1273
+ l && /* @__PURE__ */ n("span", { className: "pl-2", children: l })
1274
1274
  ]
1275
1275
  }
1276
1276
  ) });
1277
1277
  }
1278
1278
  );
1279
1279
  Lt.displayName = "ButtonSort";
1280
- const Ot = 200, Ut = ({
1280
+ const Ot = 200, zt = ({
1281
1281
  string: e,
1282
1282
  idealLength: t = Ot
1283
1283
  }) => {
@@ -1290,7 +1290,7 @@ const Ot = 200, Ut = ({
1290
1290
  string: e.slice(0, t + r),
1291
1291
  isTruncated: !0
1292
1292
  };
1293
- }, zt = ({
1293
+ }, Ut = ({
1294
1294
  children: e,
1295
1295
  length: t = 200,
1296
1296
  mode: r = "system",
@@ -1299,13 +1299,13 @@ const Ot = 200, Ut = ({
1299
1299
  const [o, i] = M(!1);
1300
1300
  if (typeof e != "string")
1301
1301
  return e;
1302
- const { string: g, isTruncated: l } = Ut({
1302
+ const { string: g, isTruncated: c } = zt({
1303
1303
  string: e,
1304
1304
  idealLength: t
1305
1305
  });
1306
1306
  return /* @__PURE__ */ v("span", { style: { wordBreak: "break-word" }, children: [
1307
1307
  o ? e : g,
1308
- l && /* @__PURE__ */ s(
1308
+ c && /* @__PURE__ */ n(
1309
1309
  Te,
1310
1310
  {
1311
1311
  mode: r,
@@ -1321,13 +1321,13 @@ const Ot = 200, Ut = ({
1321
1321
  ] });
1322
1322
  };
1323
1323
  /*!
1324
- @versini/ui-truncate v2.0.2
1324
+ @versini/ui-truncate v2.0.5
1325
1325
  © 2024 gizmette.com
1326
1326
  */
1327
1327
  try {
1328
1328
  window.__VERSINI_UI_TRUNCATE__ || (window.__VERSINI_UI_TRUNCATE__ = {
1329
- version: "2.0.2",
1330
- buildTime: "12/30/2024 12:27 PM EST",
1329
+ version: "2.0.5",
1330
+ buildTime: "12/30/2024 05:27 PM EST",
1331
1331
  homepage: "https://github.com/aversini/ui-components",
1332
1332
  license: "MIT"
1333
1333
  });
@@ -1336,36 +1336,36 @@ try {
1336
1336
  const ae = Ke(
1337
1337
  () => import(
1338
1338
  /* webpackChunkName: "LazyMessageAssistant" */
1339
- "./LazyMessageAssistant.Dtgl0qF0.js"
1339
+ "./LazyMessageAssistant.D02uWotL.js"
1340
1340
  ).then((e) => e.LazyMessageAssistant)
1341
1341
  ), Vt = () => {
1342
- const { state: e } = R(U);
1342
+ const { state: e } = R(z);
1343
1343
  return /* @__PURE__ */ v(O, { children: [
1344
1344
  e && e.messages.length > 0 && e.messages.map((t, r) => {
1345
1345
  const { role: a, content: o, name: i, processingTime: g } = t.message;
1346
- return (a === E || a === P) && o ? /* @__PURE__ */ s(Z, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(
1346
+ return (a === E || a === P) && o ? /* @__PURE__ */ n(Z, { fallback: /* @__PURE__ */ n("span", {}), children: /* @__PURE__ */ n(
1347
1347
  ae,
1348
1348
  {
1349
1349
  name: i,
1350
1350
  processingTime: g,
1351
1351
  children: o
1352
1352
  }
1353
- ) }, `${r}-${a}`) : a === G && o ? /* @__PURE__ */ s(
1354
- wt,
1353
+ ) }, `${r}-${a}`) : a === G && o ? /* @__PURE__ */ n(
1354
+ Nt,
1355
1355
  {
1356
1356
  kind: "right",
1357
1357
  copyToClipboard: o,
1358
1358
  copyToClipboardFocusMode: "light",
1359
- children: /* @__PURE__ */ s(zt, { mode: "light", focusMode: "light", children: o })
1359
+ children: /* @__PURE__ */ n(Ut, { mode: "light", focusMode: "light", children: o })
1360
1360
  },
1361
1361
  `${r}-${a}`
1362
1362
  ) : null;
1363
1363
  }),
1364
- me(G, e) && /* @__PURE__ */ s(Z, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(ae, { loading: !0 }) })
1364
+ me(G, e) && /* @__PURE__ */ n(Z, { fallback: /* @__PURE__ */ n("span", {}), children: /* @__PURE__ */ n(ae, { loading: !0 }) })
1365
1365
  ] });
1366
1366
  }, L = (e, t) => {
1367
1367
  e({
1368
- type: ne,
1368
+ type: se,
1369
1369
  payload: {
1370
1370
  streaming: t
1371
1371
  }
@@ -1381,42 +1381,42 @@ const ae = Ke(
1381
1381
  }
1382
1382
  });
1383
1383
  }, Dt = () => {
1384
- const { state: e, dispatch: t } = R(U), { state: r, dispatch: a } = R(H), [o, i] = M(""), { getAccessToken: g, user: l } = z(), u = B(null), m = B(
1384
+ const { state: e, dispatch: t } = R(z), { state: r, dispatch: a } = R(H), [o, i] = M(""), { getAccessToken: g, user: c } = U(), u = B(null), m = B(
1385
1385
  null
1386
1386
  );
1387
1387
  _(() => {
1388
1388
  (async () => {
1389
- var c;
1389
+ var l;
1390
1390
  if (!e || e.messages.length === 0) {
1391
- (c = m == null ? void 0 : m.current) == null || c.cancel();
1391
+ (l = m == null ? void 0 : m.current) == null || l.cancel();
1392
1392
  return;
1393
1393
  }
1394
1394
  const h = e.messages[e.messages.length - 1];
1395
1395
  if (!(e.messages.length === 0 || h.message.role === E || h.message.role === Be || h.message.role === P || h.message.role === Me))
1396
1396
  try {
1397
- const n = await je({
1397
+ const s = await je({
1398
1398
  accessToken: await g(),
1399
1399
  name: "generate",
1400
1400
  data: {
1401
1401
  messages: e.messages,
1402
1402
  model: e.engine || A,
1403
- user: (l == null ? void 0 : l.username) || "",
1403
+ user: (c == null ? void 0 : c.username) || "",
1404
1404
  id: e.id,
1405
1405
  usage: e.usage
1406
1406
  }
1407
1407
  });
1408
- if (n && n.ok) {
1408
+ if (s && s.ok) {
1409
1409
  const p = j();
1410
- m.current = n.body.getReader();
1410
+ m.current = s.body.getReader();
1411
1411
  const f = new TextDecoder();
1412
1412
  for (; ; ) {
1413
1413
  L(t, !0);
1414
- const { done: N, value: w } = await m.current.read();
1415
- if (N) {
1414
+ const { done: w, value: N } = await m.current.read();
1415
+ if (w) {
1416
1416
  L(t, !1);
1417
1417
  break;
1418
1418
  }
1419
- const k = f.decode(w, { stream: !0 }), x = k.indexOf(q);
1419
+ const k = f.decode(N, { stream: !0 }), x = k.indexOf(q);
1420
1420
  if (x !== -1) {
1421
1421
  const I = k.substring(0, x), T = JSON.parse(
1422
1422
  k.substring(x + q.length)
@@ -1454,8 +1454,8 @@ const ae = Ke(
1454
1454
  }
1455
1455
  } else
1456
1456
  oe(t);
1457
- } catch (n) {
1458
- console.error(n), oe(t);
1457
+ } catch (s) {
1458
+ console.error(s), oe(t);
1459
1459
  }
1460
1460
  })();
1461
1461
  }, [e == null ? void 0 : e.messages]);
@@ -1473,15 +1473,15 @@ const ae = Ke(
1473
1473
  return _(() => {
1474
1474
  if (r.tag !== "") {
1475
1475
  const h = r.tag.endsWith(":") && !r.tag.endsWith(": ") ? r.tag + " " : r.tag;
1476
- h.indexOf(X) !== -1 ? navigator.clipboard.readText().then((n) => {
1477
- i(h.replace(X, n));
1476
+ h.indexOf(X) !== -1 ? navigator.clipboard.readText().then((s) => {
1477
+ i(h.replace(X, s));
1478
1478
  }) : i(h), u.current && u.current.focus(), a({
1479
- type: ce
1479
+ type: le
1480
1480
  });
1481
1481
  }
1482
1482
  }, [r, a]), _(() => {
1483
1483
  e && e.usage === 0 && e.messages.length === 0 && u.current && u.current.focus();
1484
- }, [e]), /* @__PURE__ */ s("form", { className: "mt-2", onSubmit: b, children: /* @__PURE__ */ s(
1484
+ }, [e]), /* @__PURE__ */ n("form", { className: "mt-2", onSubmit: b, children: /* @__PURE__ */ n(
1485
1485
  We,
1486
1486
  {
1487
1487
  mode: "dark",
@@ -1495,7 +1495,7 @@ const ae = Ke(
1495
1495
  value: o,
1496
1496
  onChange: (h) => i(h.target.value),
1497
1497
  onKeyDown: Qe([["mod+Enter", b]]),
1498
- rightElement: /* @__PURE__ */ s(
1498
+ rightElement: /* @__PURE__ */ n(
1499
1499
  ue,
1500
1500
  {
1501
1501
  disabled: e == null ? void 0 : e.streaming,
@@ -1509,24 +1509,24 @@ const ae = Ke(
1509
1509
  }
1510
1510
  ) });
1511
1511
  }, $t = () => {
1512
- const { isAuthenticated: e } = z(), t = Ue(e);
1512
+ const { isAuthenticated: e } = U(), t = ze(e);
1513
1513
  return /* @__PURE__ */ v(O, { children: [
1514
1514
  /* @__PURE__ */ v("div", { className: t, children: [
1515
- /* @__PURE__ */ s(ze, {}),
1516
- /* @__PURE__ */ s(Vt, {})
1515
+ /* @__PURE__ */ n(Ue, {}),
1516
+ /* @__PURE__ */ n(Vt, {})
1517
1517
  ] }),
1518
- /* @__PURE__ */ s(dt, {}),
1519
- /* @__PURE__ */ s(Dt, {})
1518
+ /* @__PURE__ */ n(dt, {}),
1519
+ /* @__PURE__ */ n(Dt, {})
1520
1520
  ] });
1521
1521
  };
1522
1522
  function _e({ isComponent: e = !1 }) {
1523
- const t = B(!1), { getAccessToken: r, user: a } = z(), [o] = Q({
1523
+ const t = B(!1), { getAccessToken: r, user: a } = U(), [o] = Q({
1524
1524
  key: J + Ge,
1525
1525
  initialValue: ""
1526
1526
  }), [i] = Q({
1527
1527
  key: J + He,
1528
1528
  initialValue: Fe.ASC
1529
- }), [g, l] = D(at, {
1529
+ }), [g, c] = D(at, {
1530
1530
  id: j(),
1531
1531
  model: A,
1532
1532
  engine: A,
@@ -1541,7 +1541,7 @@ function _e({ isComponent: e = !1 }) {
1541
1541
  }), [b, h] = D(it, {
1542
1542
  tag: "",
1543
1543
  tags: []
1544
- }), [c, n] = M({
1544
+ }), [l, s] = M({
1545
1545
  version: "",
1546
1546
  models: [],
1547
1547
  plugins: [],
@@ -1549,7 +1549,7 @@ function _e({ isComponent: e = !1 }) {
1549
1549
  engines: []
1550
1550
  });
1551
1551
  return _(() => {
1552
- c.version !== "" || t.current || (async () => {
1552
+ l.version !== "" || t.current || (async () => {
1553
1553
  try {
1554
1554
  t.current = !0;
1555
1555
  const p = await he({
@@ -1559,8 +1559,8 @@ function _e({ isComponent: e = !1 }) {
1559
1559
  user: a == null ? void 0 : a.username
1560
1560
  }
1561
1561
  });
1562
- t.current = !1, p.status === 200 && (n(p.data), l({
1563
- type: se,
1562
+ t.current = !1, p.status === 200 && (s(p.data), c({
1563
+ type: ne,
1564
1564
  payload: {
1565
1565
  engine: p.data.engine
1566
1566
  }
@@ -1568,13 +1568,13 @@ function _e({ isComponent: e = !1 }) {
1568
1568
  } catch {
1569
1569
  }
1570
1570
  })();
1571
- }, [c, r, a]), _(() => {
1571
+ }, [l, r, a]), _(() => {
1572
1572
  var p;
1573
1573
  (p = document.getElementById("logo")) == null || p.classList.add("fadeOut"), setTimeout(() => {
1574
1574
  var f;
1575
1575
  (f = document.getElementById("root")) == null || f.classList.replace("app-hidden", "fadeIn");
1576
1576
  }, 500);
1577
- }), /* @__PURE__ */ s(U.Provider, { value: { state: g, dispatch: l, serverStats: c }, children: /* @__PURE__ */ s(
1577
+ }), /* @__PURE__ */ n(z.Provider, { value: { state: g, dispatch: c, serverStats: l }, children: /* @__PURE__ */ n(
1578
1578
  Ve.Provider,
1579
1579
  {
1580
1580
  value: {
@@ -1586,8 +1586,8 @@ function _e({ isComponent: e = !1 }) {
1586
1586
  {
1587
1587
  value: { state: b, dispatch: h },
1588
1588
  children: [
1589
- /* @__PURE__ */ s(De, { children: /* @__PURE__ */ s($t, {}) }),
1590
- /* @__PURE__ */ s($e, { serverStats: c })
1589
+ /* @__PURE__ */ n(De, { children: /* @__PURE__ */ n($t, {}) }),
1590
+ /* @__PURE__ */ n($e, { serverStats: l })
1591
1591
  ]
1592
1592
  }
1593
1593
  )
@@ -1598,5 +1598,5 @@ _e.displayName = "App";
1598
1598
  const Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: _e }, Symbol.toStringTag, { value: "Module" }));
1599
1599
  export {
1600
1600
  Ft as LazyApp,
1601
- wt as ae
1601
+ Nt as ae
1602
1602
  };