@versini/sassysaint 5.2.0 → 5.3.0

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,101 +1,136 @@
1
- import { jsxs as v, Fragment as H, jsx as i } from "react/jsx-runtime";
2
- import { AppContext as j, TagsContext as q, LOCAL_STORAGE_PREFIX as M, b as _e, j as G, R as B, TAG_CONTENT as O, TAGS as C, isLastMessageFromRole as de, CANCEL as Ne, CLEAR as we, ACTION_RESET as le, ACTION_TOGGLE_TAG as ce, ROLE_ASSISTANT as I, ROLE_INTERNAL as Z, ROLE_USER as Y, rn as J, ROLE_SYSTEM as Ee, ROLE_HIDDEN as Ce, DEFAULT_AI_ENGINE as z, STATS_SEPARATOR as te, ACTION_MODEL as ge, ACTION_MESSAGE as L, ACTION_RESET_TAGS as ue, TYPE_QUESTION as Ie, SEND as Re, ACTION_STREAMING as me, ERROR_MESSAGE as Se, getMessageContaintWrapperClass as Ae, MessagesContainerHeader as Be, ACTION_SEARCH as Me, ACTION_SORT as Oe, ACTION_RESTORE as Le, ACTION_ENGINE as he, HistoryContext as $e, d as Ue, AppFooter as Ve, LOCAL_STORAGE_SEARCH as ze, LOCAL_STORAGE_SORT as De } from "./index.BbfwgIO_.js";
3
- import { E as $, restCall as He, we as je, serviceCall as Pe, SERVICE_TYPES as Ge, f as Fe } from "./index.CGGeNJS3.js";
1
+ import { jsxs as v, Fragment as H, jsx as n } from "react/jsx-runtime";
2
+ import { AppContext as j, TagsContext as Y, LOCAL_STORAGE_PREFIX as M, b as _e, j as G, R as B, TAG_CONTENT as O, TAGS as C, isLastMessageFromRole as de, CANCEL as Ne, CLEAR as we, ACTION_RESET as le, ACTION_TOGGLE_TAG as ce, ROLE_ASSISTANT as I, ROLE_INTERNAL as q, ROLE_USER as K, rn as Z, ROLE_SYSTEM as Ee, ROLE_HIDDEN as Ce, DEFAULT_AI_ENGINE as z, STATS_SEPARATOR as te, ACTION_MODEL as ge, ACTION_MESSAGE as L, ACTION_RESET_TAGS as ue, TYPE_QUESTION as Ie, SEND as Re, ACTION_STREAMING as me, ERROR_MESSAGE as Se, getMessageContaintWrapperClass as Ae, MessagesContainerHeader as Be, ACTION_SEARCH as Me, ACTION_SORT as Oe, ACTION_RESTORE as Le, ACTION_ENGINE as he, HistoryContext as $e, d as Ue, AppFooter as Ve, LOCAL_STORAGE_SEARCH as ze, LOCAL_STORAGE_SORT as De } from "./index.CKHEQpgF.js";
3
+ import { E as $, restCall as He, we as je, serviceCall as Pe, SERVICE_TYPES as Ge, f as Fe } from "./index.Ck-_31wH.js";
4
4
  import S, { useContext as U, useRef as R, useEffect as E, useState as P, lazy as We, Suspense as re, useReducer as F } from "react";
5
- import s from "clsx";
6
- var y = [];
5
+ import d from "clsx";
6
+ function Ke(e) {
7
+ const t = e.toLowerCase().split("+").map((o) => o.trim()), r = {
8
+ alt: t.includes("alt"),
9
+ ctrl: t.includes("ctrl"),
10
+ meta: t.includes("meta"),
11
+ mod: t.includes("mod"),
12
+ shift: t.includes("shift")
13
+ }, a = ["alt", "ctrl", "meta", "shift", "mod"], i = t.find((o) => !a.includes(o));
14
+ return {
15
+ ...r,
16
+ key: i
17
+ };
18
+ }
19
+ function Ye(e, t) {
20
+ const { alt: r, ctrl: a, meta: i, mod: o, shift: l, key: s } = e, { altKey: b, ctrlKey: u, metaKey: m, shiftKey: c, key: g } = t;
21
+ if (r !== b)
22
+ return !1;
23
+ if (o) {
24
+ if (!u && !m)
25
+ return !1;
26
+ } else if (a !== u || i !== m)
27
+ return !1;
28
+ return l !== c ? !1 : !!(s && (g.toLowerCase() === s.toLowerCase() || t.code.replace("Key", "").toLowerCase() === s.toLowerCase()));
29
+ }
30
+ function qe(e) {
31
+ return (t) => Ye(Ke(e), t);
32
+ }
33
+ function Ze(e) {
34
+ return (t) => {
35
+ const r = "nativeEvent" in t ? t.nativeEvent : t;
36
+ e.forEach(([a, i, o = { preventDefault: !0 }]) => {
37
+ qe(a)(r) && (o.preventDefault && t.preventDefault(), i(r));
38
+ });
39
+ };
40
+ }
41
+ var f = [];
7
42
  for (var W = 0; W < 256; ++W)
8
- y.push((W + 256).toString(16).slice(1));
9
- function Ye(e, t = 0) {
10
- return (y[e[t + 0]] + y[e[t + 1]] + y[e[t + 2]] + y[e[t + 3]] + "-" + y[e[t + 4]] + y[e[t + 5]] + "-" + y[e[t + 6]] + y[e[t + 7]] + "-" + y[e[t + 8]] + y[e[t + 9]] + "-" + y[e[t + 10]] + y[e[t + 11]] + y[e[t + 12]] + y[e[t + 13]] + y[e[t + 14]] + y[e[t + 15]]).toLowerCase();
43
+ f.push((W + 256).toString(16).slice(1));
44
+ function Je(e, t = 0) {
45
+ return (f[e[t + 0]] + f[e[t + 1]] + f[e[t + 2]] + f[e[t + 3]] + "-" + f[e[t + 4]] + f[e[t + 5]] + "-" + f[e[t + 6]] + f[e[t + 7]] + "-" + f[e[t + 8]] + f[e[t + 9]] + "-" + f[e[t + 10]] + f[e[t + 11]] + f[e[t + 12]] + f[e[t + 13]] + f[e[t + 14]] + f[e[t + 15]]).toLowerCase();
11
46
  }
12
- var V, qe = new Uint8Array(16);
13
- function Ze() {
47
+ var V, Qe = new Uint8Array(16);
48
+ function Xe() {
14
49
  if (!V && (V = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !V))
15
50
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
16
- return V(qe);
51
+ return V(Qe);
17
52
  }
18
- var Je = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
53
+ var et = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
19
54
  const ae = {
20
- randomUUID: Je
55
+ randomUUID: et
21
56
  };
22
- function K(e, t, r) {
57
+ function J(e, t, r) {
23
58
  if (ae.randomUUID && !t && !e)
24
59
  return ae.randomUUID();
25
60
  e = e || {};
26
- var a = e.random || (e.rng || Ze)();
27
- return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ye(a);
61
+ var a = e.random || (e.rng || Xe)();
62
+ return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Je(a);
28
63
  }
29
- const Ke = () => {
30
- const { dispatch: e, state: t } = U(j), { dispatch: r } = U(q), a = "mt-2 flex justify-center rounded-md", n = R(null), o = R(!1), [l] = $({
64
+ const tt = () => {
65
+ const { dispatch: e, state: t } = U(j), { dispatch: r } = U(Y), a = "mt-2 flex justify-center rounded-md", i = R(null), o = R(!1), [l] = $({
31
66
  key: M + "summarize-article",
32
67
  initialValue: !1
33
- }), [d] = $({
68
+ }), [s] = $({
34
69
  key: M + "proofread-content",
35
70
  initialValue: !1
36
71
  }), [b] = $({
37
72
  key: M + "rephrase-content",
38
73
  initialValue: !1
39
- }), m = (g) => {
40
- g.preventDefault(), e({
74
+ }), u = (c) => {
75
+ c.preventDefault(), e({
41
76
  type: le
42
77
  });
43
78
  };
44
79
  E(() => {
45
- (t == null ? void 0 : t.streaming) === !0 && !o.current && n.current && (o.current = !0, n.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (o.current = !1);
80
+ (t == null ? void 0 : t.streaming) === !0 && !o.current && i.current && (o.current = !0, i.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (o.current = !1);
46
81
  }, [t]);
47
- const p = (g, c) => {
48
- g.preventDefault(), r({
82
+ const m = (c, g) => {
83
+ c.preventDefault(), r({
49
84
  type: ce,
50
85
  payload: {
51
- tag: c
86
+ tag: g
52
87
  }
53
88
  });
54
89
  };
55
90
  return /* @__PURE__ */ v(H, { children: [
56
91
  /* @__PURE__ */ v(_e, { alignHorizontal: "center", columnGap: 2, children: [
57
- /* @__PURE__ */ i(G, { children: l && /* @__PURE__ */ i("div", { className: a, children: /* @__PURE__ */ i(
92
+ /* @__PURE__ */ n(G, { children: l && /* @__PURE__ */ n("div", { className: a, children: /* @__PURE__ */ n(
58
93
  B,
59
94
  {
60
95
  noBorder: !0,
61
96
  mode: "dark",
62
97
  focusMode: "light",
63
98
  size: "small",
64
- onClick: (g) => p(g, C.SUMMARIZE_ARTICLE),
99
+ onClick: (c) => m(c, C.SUMMARIZE_ARTICLE),
65
100
  children: O[C.SUMMARIZE_ARTICLE].label
66
101
  }
67
102
  ) }) }),
68
- /* @__PURE__ */ i(G, { children: d && /* @__PURE__ */ i("div", { className: a, children: /* @__PURE__ */ i(
103
+ /* @__PURE__ */ n(G, { children: s && /* @__PURE__ */ n("div", { className: a, children: /* @__PURE__ */ n(
69
104
  B,
70
105
  {
71
106
  noBorder: !0,
72
107
  mode: "dark",
73
108
  focusMode: "light",
74
109
  size: "small",
75
- onClick: (g) => p(g, C.PROOFREAD_CONTENT),
110
+ onClick: (c) => m(c, C.PROOFREAD_CONTENT),
76
111
  children: O[C.PROOFREAD_CONTENT].label
77
112
  }
78
113
  ) }) }),
79
- /* @__PURE__ */ i(G, { children: b && /* @__PURE__ */ i("div", { className: a, children: /* @__PURE__ */ i(
114
+ /* @__PURE__ */ n(G, { children: b && /* @__PURE__ */ n("div", { className: a, children: /* @__PURE__ */ n(
80
115
  B,
81
116
  {
82
117
  noBorder: !0,
83
118
  mode: "dark",
84
119
  focusMode: "light",
85
120
  size: "small",
86
- onClick: (g) => p(g, C.REPHRASE_CONTENT),
121
+ onClick: (c) => m(c, C.REPHRASE_CONTENT),
87
122
  children: O[C.REPHRASE_CONTENT].label
88
123
  }
89
124
  ) }) })
90
125
  ] }),
91
- de(I, t) && /* @__PURE__ */ i("div", { className: a, children: /* @__PURE__ */ i(
126
+ de(I, t) && /* @__PURE__ */ n("div", { className: a, children: /* @__PURE__ */ n(
92
127
  B,
93
128
  {
94
129
  noBorder: !0,
95
130
  mode: "dark",
96
131
  focusMode: "light",
97
- ref: n,
98
- onClick: m,
132
+ ref: i,
133
+ onClick: u,
99
134
  children: t != null && t.streaming ? Ne : we
100
135
  }
101
136
  ) })
@@ -114,7 +149,7 @@ try {
114
149
  });
115
150
  } catch {
116
151
  }
117
- const Qe = "av-bubble", oe = "av-button", Xe = (e) => {
152
+ const rt = "av-bubble", oe = "av-button", at = (e) => {
118
153
  let t = "";
119
154
  if (typeof e == "number" || typeof e == "string")
120
155
  t = "m-" + e;
@@ -123,32 +158,32 @@ const Qe = "av-bubble", oe = "av-button", Xe = (e) => {
123
158
  (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
124
159
  }
125
160
  return t;
126
- }, Q = "icon", et = "button", tt = "link", rt = ({
161
+ }, Q = "icon", ot = "button", it = "link", nt = ({
127
162
  type: e,
128
163
  size: t,
129
164
  labelRight: r,
130
165
  labelLeft: a,
131
- align: n
166
+ align: i
132
167
  }) => {
133
- const o = "text-sm font-medium max-h-8 py-0", l = "text-base font-medium max-h-9 py-1", d = "text-lg font-medium max-h-12 py-2";
168
+ const o = "text-sm font-medium max-h-8 py-0", l = "text-base font-medium max-h-9 py-1", s = "text-lg font-medium max-h-12 py-2";
134
169
  switch (e) {
135
- case et:
136
- return s("px-4", {
170
+ case ot:
171
+ return d("px-4", {
137
172
  [o]: t === "small",
138
173
  [l]: t === "medium",
139
- [d]: t === "large"
174
+ [s]: t === "large"
140
175
  });
141
- case tt:
142
- return s("px-4 text-center", {
176
+ case it:
177
+ return d("px-4 text-center", {
143
178
  [o]: t === "small",
144
179
  [l]: t === "medium",
145
- [d]: t === "large"
180
+ [s]: t === "large"
146
181
  });
147
182
  case Q:
148
- return s("inline-flex items-center", {
149
- "justify-center": n === "center",
150
- "justify-start": n === "left",
151
- "justify-end": n === "right",
183
+ return d("inline-flex items-center", {
184
+ "justify-center": i === "center",
185
+ "justify-start": i === "left",
186
+ "justify-end": i === "right",
152
187
  "h-6 w-6 p-0": t === "small" && !(r || a),
153
188
  "h-6 px-4 text-sm font-medium": t === "small" && (r || a),
154
189
  "h-8 w-8 p-1": t === "medium" && !(r || a),
@@ -157,7 +192,7 @@ const Qe = "av-bubble", oe = "av-button", Xe = (e) => {
157
192
  "h-12 px-4 text-lg font-medium": t === "large" && (r || a)
158
193
  });
159
194
  }
160
- }, at = ({
195
+ }, st = ({
161
196
  mode: e,
162
197
  noBackground: t,
163
198
  noTruncate: r,
@@ -166,7 +201,7 @@ const Qe = "av-bubble", oe = "av-button", Xe = (e) => {
166
201
  if (t)
167
202
  return "not-prose rounded-full";
168
203
  if (a === "primary")
169
- return s("not-prose rounded-full", {
204
+ return d("not-prose rounded-full", {
170
205
  truncate: !r,
171
206
  "bg-action-dark text-copy-light": e === "dark",
172
207
  "bg-action-light text-copy-lighter": e === "light",
@@ -174,7 +209,7 @@ const Qe = "av-bubble", oe = "av-button", Xe = (e) => {
174
209
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
175
210
  });
176
211
  if (a === "secondary")
177
- return s("not-prose rounded-full", {
212
+ return d("not-prose rounded-full", {
178
213
  truncate: !r,
179
214
  "bg-action-dark text-copy-light": e === "light",
180
215
  "bg-action-light text-copy-lighter": e === "dark",
@@ -182,14 +217,14 @@ const Qe = "av-bubble", oe = "av-button", Xe = (e) => {
182
217
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
183
218
  });
184
219
  if (a === "danger")
185
- return s("not-prose rounded-full", {
220
+ return d("not-prose rounded-full", {
186
221
  truncate: !r,
187
222
  "bg-action-danger-dark text-copy-light": e === "dark",
188
223
  "bg-action-danger-light text-copy-lighter": e === "light",
189
224
  "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
190
225
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
191
226
  });
192
- }, ot = ({
227
+ }, dt = ({
193
228
  mode: e,
194
229
  disabled: t,
195
230
  variant: r
@@ -197,27 +232,27 @@ const Qe = "av-bubble", oe = "av-button", Xe = (e) => {
197
232
  if (t)
198
233
  return "";
199
234
  if (r === "primary")
200
- return s("hover:text-copy-light-hover", {
235
+ return d("hover:text-copy-light-hover", {
201
236
  "hover:bg-action-dark-hover": e === "dark",
202
237
  "hover:bg-action-light-hover": e === "light",
203
238
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
204
239
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
205
240
  });
206
241
  if (r === "secondary")
207
- return s("hover:text-copy-light-hover", {
242
+ return d("hover:text-copy-light-hover", {
208
243
  "hover:bg-action-dark-hover": e === "light",
209
244
  "hover:bg-action-light-hover": e === "dark",
210
245
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
211
246
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
212
247
  });
213
248
  if (r === "danger")
214
- return s("hover:text-copy-light-hover", {
249
+ return d("hover:text-copy-light-hover", {
215
250
  "hover:bg-action-danger-dark-hover": e === "dark",
216
251
  "hover:bg-action-danger-light-hover": e === "light",
217
252
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
218
253
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
219
254
  });
220
- }, it = ({
255
+ }, lt = ({
221
256
  mode: e,
222
257
  disabled: t,
223
258
  variant: r
@@ -225,27 +260,27 @@ const Qe = "av-bubble", oe = "av-button", Xe = (e) => {
225
260
  if (t)
226
261
  return "";
227
262
  if (r === "primary")
228
- return s("active:text-copy-light-active", {
263
+ return d("active:text-copy-light-active", {
229
264
  "active:bg-action-dark-active": e === "dark",
230
265
  "active:bg-action-light-active": e === "light",
231
266
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
232
267
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
233
268
  });
234
269
  if (r === "secondary")
235
- return s("active:text-copy-light-active", {
270
+ return d("active:text-copy-light-active", {
236
271
  "active:bg-action-dark-active": e === "light",
237
272
  "active:bg-action-light-active": e === "dark",
238
273
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
239
274
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
240
275
  });
241
276
  if (r === "danger")
242
- return s("active:text-copy-lighter-active", {
277
+ return d("active:text-copy-lighter-active", {
243
278
  "active:bg-action-danger-dark-active": e === "dark",
244
279
  "active:bg-action-danger-light-active": e === "light",
245
280
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
246
281
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
247
282
  });
248
- }, nt = ({
283
+ }, ct = ({
249
284
  mode: e,
250
285
  noBorder: t,
251
286
  variant: r
@@ -253,27 +288,27 @@ const Qe = "av-bubble", oe = "av-button", Xe = (e) => {
253
288
  if (t)
254
289
  return "border border-transparent";
255
290
  if (r === "primary")
256
- return s("border", {
291
+ return d("border", {
257
292
  "border-border-dark": e === "dark",
258
293
  "border-border-accent": e === "light",
259
294
  "border-border-dark dark:border-border-accent": e === "system",
260
295
  "border-border-accent dark:border-border-dark": e === "alt-system"
261
296
  });
262
297
  if (r === "secondary")
263
- return s("border", {
298
+ return d("border", {
264
299
  "border-border-dark": e === "light",
265
300
  "border-border-accent": e === "dark",
266
301
  "border-border-dark dark:border-border-accent": e === "alt-system",
267
302
  "border-border-accent dark:border-border-dark": e === "system"
268
303
  });
269
304
  if (r === "danger")
270
- return s("border", {
305
+ return d("border", {
271
306
  "border-border-danger-dark": e === "dark",
272
307
  "border-border-danger-medium": e === "light",
273
308
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
274
309
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
275
310
  });
276
- }, st = ({ focusMode: e }) => s("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
311
+ }, gt = ({ focusMode: e }) => d("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
277
312
  "focus:outline-focus-dark": e === "dark",
278
313
  "focus:outline-focus-light": e === "light",
279
314
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
@@ -283,45 +318,45 @@ const Qe = "av-bubble", oe = "av-button", Xe = (e) => {
283
318
  className: t,
284
319
  raw: r,
285
320
  mode: a,
286
- focusMode: n,
321
+ focusMode: i,
287
322
  disabled: o,
288
323
  fullWidth: l,
289
- size: d,
324
+ size: s,
290
325
  noBorder: b,
291
- labelRight: m,
292
- labelLeft: p,
293
- spacing: g,
294
- noBackground: c,
295
- variant: u,
296
- noTruncate: h,
297
- align: f
298
- }) => (u || (u = "primary"), r ? s(oe, t) : s(
326
+ labelRight: u,
327
+ labelLeft: m,
328
+ spacing: c,
329
+ noBackground: g,
330
+ variant: h,
331
+ noTruncate: p,
332
+ align: y
333
+ }) => (h || (h = "primary"), r ? d(oe, t) : d(
299
334
  oe,
300
335
  t,
301
- Xe(g),
302
- at({ mode: a, variant: u, noBackground: c, noTruncate: h }),
303
- rt({ type: e, size: d, labelRight: m, labelLeft: p, align: f }),
304
- nt({ mode: a, variant: u, noBorder: b }),
305
- st({ focusMode: n }),
306
- ot({ mode: a, variant: u, disabled: o }),
307
- it({ mode: a, variant: u, disabled: o }),
336
+ at(c),
337
+ st({ mode: a, variant: h, noBackground: g, noTruncate: p }),
338
+ nt({ type: e, size: s, labelRight: u, labelLeft: m, align: y }),
339
+ ct({ mode: a, variant: h, noBorder: b }),
340
+ gt({ focusMode: i }),
341
+ dt({ mode: a, variant: h, disabled: o }),
342
+ lt({ mode: a, variant: h, disabled: o }),
308
343
  {
309
344
  "w-full": l,
310
345
  "disabled:cursor-not-allowed disabled:opacity-50": o
311
346
  }
312
- )), dt = (e, t, r) => {
347
+ )), ut = (e, t, r) => {
313
348
  var a;
314
349
  !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);
315
350
  }, X = S.forwardRef((e, t) => {
316
- const { onClick: r, noInternalClick: a = !1, ...n } = e;
317
- return /* @__PURE__ */ i(
351
+ const { onClick: r, noInternalClick: a = !1, ...i } = e;
352
+ return /* @__PURE__ */ n(
318
353
  "button",
319
354
  {
320
355
  ref: t,
321
356
  onClick: (o) => {
322
- dt(o, a, r);
357
+ ut(o, a, r);
323
358
  },
324
- ...n
359
+ ...i
325
360
  }
326
361
  );
327
362
  });
@@ -332,18 +367,18 @@ const be = S.forwardRef(
332
367
  disabled: t = !1,
333
368
  mode: r = "system",
334
369
  focusMode: a = "system",
335
- fullWidth: n = !1,
370
+ fullWidth: i = !1,
336
371
  className: o,
337
372
  type: l = "button",
338
- raw: d = !1,
373
+ raw: s = !1,
339
374
  noBorder: b = !1,
340
- "aria-label": m,
341
- label: p,
342
- size: g = "medium",
343
- labelRight: c,
344
- labelLeft: u,
345
- spacing: h,
346
- noBackground: f = !1,
375
+ "aria-label": u,
376
+ label: m,
377
+ size: c = "medium",
378
+ labelRight: g,
379
+ labelLeft: h,
380
+ spacing: p,
381
+ noBackground: y = !1,
347
382
  align: _ = "center",
348
383
  ...N
349
384
  }, w) => {
@@ -351,22 +386,22 @@ const be = S.forwardRef(
351
386
  type: Q,
352
387
  mode: r,
353
388
  focusMode: a,
354
- fullWidth: n,
389
+ fullWidth: i,
355
390
  disabled: t,
356
- raw: d,
391
+ raw: s,
357
392
  className: o,
358
393
  noBorder: b,
359
- size: g,
360
- labelRight: c,
361
- labelLeft: u,
362
- spacing: h,
363
- noBackground: f,
394
+ size: c,
395
+ labelRight: g,
396
+ labelLeft: h,
397
+ spacing: p,
398
+ noBackground: y,
364
399
  align: _
365
- }), x = s({
366
- "text-copy-accent-dark": r === "light" && !d,
367
- "text-copy-light": r === "dark" && !d,
368
- "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
369
- "text-copy-light dark:text-copy-accent-dark": r === "system" && !d
400
+ }), x = d({
401
+ "text-copy-accent-dark": r === "light" && !s,
402
+ "text-copy-light": r === "dark" && !s,
403
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !s,
404
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !s
370
405
  });
371
406
  return /* @__PURE__ */ v(
372
407
  X,
@@ -375,12 +410,12 @@ const be = S.forwardRef(
375
410
  className: k,
376
411
  disabled: t,
377
412
  type: l,
378
- "aria-label": m || p,
413
+ "aria-label": u || m,
379
414
  ...N,
380
415
  children: [
381
- u && /* @__PURE__ */ i("span", { className: "pr-2", children: u }),
382
- /* @__PURE__ */ i("div", { className: x, children: e }),
383
- c && /* @__PURE__ */ i("span", { className: "pl-2", children: c })
416
+ h && /* @__PURE__ */ n("span", { className: "pr-2", children: h }),
417
+ /* @__PURE__ */ n("div", { className: x, children: e }),
418
+ g && /* @__PURE__ */ n("span", { className: "pl-2", children: g })
384
419
  ]
385
420
  }
386
421
  );
@@ -400,24 +435,24 @@ try {
400
435
  });
401
436
  } catch {
402
437
  }
403
- const lt = S.forwardRef(
438
+ const mt = S.forwardRef(
404
439
  ({
405
440
  children: e,
406
441
  disabled: t = !1,
407
442
  mode: r = "system",
408
443
  focusMode: a = "system",
409
- fullWidth: n = !1,
444
+ fullWidth: i = !1,
410
445
  className: o,
411
446
  type: l = "button",
412
- raw: d = !1,
447
+ raw: s = !1,
413
448
  noBorder: b = !1,
414
- "aria-label": m,
415
- label: p,
416
- size: g = "medium",
417
- labelRight: c,
418
- labelLeft: u,
419
- spacing: h,
420
- noBackground: f = !1,
449
+ "aria-label": u,
450
+ label: m,
451
+ size: c = "medium",
452
+ labelRight: g,
453
+ labelLeft: h,
454
+ spacing: p,
455
+ noBackground: y = !1,
421
456
  align: _ = "center",
422
457
  active: N = !1,
423
458
  ...w
@@ -426,23 +461,23 @@ const lt = S.forwardRef(
426
461
  type: Q,
427
462
  mode: r,
428
463
  focusMode: a,
429
- fullWidth: n,
464
+ fullWidth: i,
430
465
  disabled: t,
431
- raw: d,
466
+ raw: s,
432
467
  className: o,
433
468
  noBorder: b,
434
- size: g,
435
- labelRight: c,
436
- labelLeft: u,
437
- spacing: h,
438
- noBackground: f,
469
+ size: c,
470
+ labelRight: g,
471
+ labelLeft: h,
472
+ spacing: p,
473
+ noBackground: y,
439
474
  align: _
440
- }), A = s({
441
- "text-copy-accent-dark": r === "light" && !d,
442
- "text-copy-light": r === "dark" && !d,
443
- "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
444
- "text-copy-light dark:text-copy-accent-dark": r === "system" && !d
445
- }), T = N ? s(
475
+ }), A = d({
476
+ "text-copy-accent-dark": r === "light" && !s,
477
+ "text-copy-light": r === "dark" && !s,
478
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !s,
479
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !s
480
+ }), T = N ? d(
446
481
  "relative",
447
482
  "focus-within:static",
448
483
  "focus-within:after:border-transparent",
@@ -459,26 +494,26 @@ const lt = S.forwardRef(
459
494
  "after:border-table-light dark:after:border-table-dark": r === "alt-system"
460
495
  }
461
496
  ) : "";
462
- return /* @__PURE__ */ i("div", { className: T, children: /* @__PURE__ */ v(
497
+ return /* @__PURE__ */ n("div", { className: T, children: /* @__PURE__ */ v(
463
498
  X,
464
499
  {
465
500
  ref: k,
466
501
  className: x,
467
502
  disabled: t,
468
503
  type: l,
469
- "aria-label": m || p,
504
+ "aria-label": u || m,
470
505
  ...w,
471
506
  children: [
472
- u && /* @__PURE__ */ i("span", { className: "pr-2", children: u }),
473
- /* @__PURE__ */ i("div", { className: A, children: e }),
474
- c && /* @__PURE__ */ i("span", { className: "pl-2", children: c })
507
+ h && /* @__PURE__ */ n("span", { className: "pr-2", children: h }),
508
+ /* @__PURE__ */ n("div", { className: A, children: e }),
509
+ g && /* @__PURE__ */ n("span", { className: "pl-2", children: g })
475
510
  ]
476
511
  }
477
512
  ) });
478
513
  }
479
514
  );
480
- lt.displayName = "ButtonSort";
481
- const ct = (e) => {
515
+ mt.displayName = "ButtonSort";
516
+ const ht = (e) => {
482
517
  let t = "";
483
518
  if (typeof e == "number" || typeof e == "string")
484
519
  t = "m-" + e;
@@ -487,38 +522,38 @@ const ct = (e) => {
487
522
  (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
488
523
  }
489
524
  return t;
490
- }, ye = ({
525
+ }, fe = ({
491
526
  children: e,
492
527
  fill: t,
493
528
  viewBox: r,
494
529
  className: a,
495
- defaultViewBox: n,
530
+ defaultViewBox: i,
496
531
  defaultClassName: o,
497
532
  spacing: l,
498
- title: d,
533
+ title: s,
499
534
  semantic: b = !1,
500
- ...m
535
+ ...u
501
536
  }) => {
502
- const p = ct(l), g = s(
503
- p,
537
+ const m = ht(l), c = d(
538
+ m,
504
539
  a || o
505
540
  );
506
541
  return /* @__PURE__ */ v(H, { children: [
507
- /* @__PURE__ */ i(
542
+ /* @__PURE__ */ n(
508
543
  "svg",
509
544
  {
510
545
  xmlns: "http://www.w3.org/2000/svg",
511
- className: g,
512
- viewBox: r || n,
546
+ className: c,
547
+ viewBox: r || i,
513
548
  fill: t || "currentColor",
514
549
  role: "img",
515
550
  "aria-hidden": !b,
516
551
  focusable: !1,
517
- ...m,
552
+ ...u,
518
553
  children: e
519
554
  }
520
555
  ),
521
- d && b && /* @__PURE__ */ i("span", { className: "sr-only", children: d })
556
+ s && b && /* @__PURE__ */ n("span", { className: "sr-only", children: s })
522
557
  ] });
523
558
  };
524
559
  /*!
@@ -534,15 +569,15 @@ try {
534
569
  });
535
570
  } catch {
536
571
  }
537
- const gt = ({
572
+ const pt = ({
538
573
  className: e,
539
574
  viewBox: t,
540
575
  spacing: r,
541
576
  title: a,
542
- monotone: n,
577
+ monotone: i,
543
578
  ...o
544
579
  }) => /* @__PURE__ */ v(
545
- ye,
580
+ fe,
546
581
  {
547
582
  defaultViewBox: "0 0 448 512",
548
583
  defaultClassName: "size-5",
@@ -552,25 +587,25 @@ const gt = ({
552
587
  title: a || "Copied",
553
588
  ...o,
554
589
  children: [
555
- /* @__PURE__ */ i(
590
+ /* @__PURE__ */ n(
556
591
  "path",
557
592
  {
558
593
  opacity: "0.4",
559
594
  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"
560
595
  }
561
596
  ),
562
- /* @__PURE__ */ i("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" })
597
+ /* @__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" })
563
598
  ]
564
599
  }
565
- ), ut = ({
600
+ ), bt = ({
566
601
  className: e,
567
602
  viewBox: t,
568
603
  spacing: r,
569
604
  title: a,
570
- monotone: n,
605
+ monotone: i,
571
606
  ...o
572
- }) => /* @__PURE__ */ i(
573
- ye,
607
+ }) => /* @__PURE__ */ n(
608
+ fe,
574
609
  {
575
610
  defaultViewBox: "0 0 512 512",
576
611
  defaultClassName: "size-5",
@@ -579,7 +614,7 @@ const gt = ({
579
614
  spacing: r,
580
615
  title: a || "Copy",
581
616
  ...o,
582
- children: /* @__PURE__ */ i("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" })
617
+ 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" })
583
618
  }
584
619
  );
585
620
  /*!
@@ -595,7 +630,7 @@ try {
595
630
  });
596
631
  } catch {
597
632
  }
598
- const mt = (e) => {
633
+ const ft = (e) => {
599
634
  let t = "";
600
635
  if (typeof e == "number" || typeof e == "string")
601
636
  t = "m-" + e;
@@ -604,93 +639,93 @@ const mt = (e) => {
604
639
  (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
605
640
  }
606
641
  return t;
607
- }, ht = () => "p-4 sm:max-w-md md:max-w-2xl", pt = ({ kind: e }) => s({
642
+ }, yt = () => "p-4 sm:max-w-md md:max-w-2xl", vt = ({ kind: e }) => d({
608
643
  "bg-surface-lighter dark:bg-surface-dark": e === "left",
609
644
  "bg-surface-accent": e === "right"
610
- }), bt = ({ kind: e }) => s(
645
+ }), kt = ({ kind: e }) => d(
611
646
  "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",
612
647
  {
613
648
  "text-copy-lighter": e === "right"
614
649
  }
615
- ), yt = ({ kind: e }) => s("rounded-b-xl", {
650
+ ), xt = ({ kind: e }) => d("rounded-b-xl", {
616
651
  "rounded-tr-xl": e === "left",
617
652
  "rounded-tl-xl": e === "right"
618
- }), ft = ({
653
+ }), Tt = ({
619
654
  kind: e,
620
655
  className: t,
621
656
  spacing: r
622
657
  }) => {
623
- const a = s(
658
+ const a = d(
624
659
  t,
625
- Qe,
660
+ rt,
626
661
  "flex items-start",
627
- mt(r),
662
+ ft(r),
628
663
  {
629
664
  "flex-row-reverse": e === "right"
630
665
  }
631
- ), n = s(
666
+ ), i = d(
632
667
  "flex flex-col empty:hidden",
633
- ht(),
634
- bt({ kind: e }),
635
- pt({ kind: e }),
636
- yt({ kind: e })
637
- ), o = "pr-2 pt-1 text-end text-xs text-copy-light", l = s("flex flex-col-reverse gap-2 sm:flex-row", {
668
+ yt(),
669
+ kt({ kind: e }),
670
+ vt({ kind: e }),
671
+ xt({ kind: e })
672
+ ), o = "pr-2 pt-1 text-end text-xs text-copy-light", l = d("flex flex-col-reverse gap-2 sm:flex-row", {
638
673
  "ml-2": e === "left",
639
674
  "mr-2": e === "right"
640
675
  });
641
676
  return {
642
677
  wrapper: a,
643
- main: n,
678
+ main: i,
644
679
  footer: o,
645
680
  copyButton: l
646
681
  };
647
- }, vt = ({
682
+ }, _t = ({
648
683
  children: e,
649
684
  kind: t = "left",
650
685
  className: r,
651
686
  footer: a,
652
- rawFooter: n,
687
+ rawFooter: i,
653
688
  copyToClipboard: o,
654
689
  copyToClipboardFocusMode: l = "system",
655
- copyToClipboardMode: d = "system",
690
+ copyToClipboardMode: s = "system",
656
691
  spacing: b
657
692
  }) => {
658
- const [m, p] = P(!1), g = ft({ kind: t, className: r, spacing: b }), c = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), u = () => {
659
- p(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
693
+ const [u, m] = P(!1), c = Tt({ kind: t, className: r, spacing: b }), g = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), h = () => {
694
+ m(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
660
695
  };
661
696
  return E(() => {
662
- let h;
663
- return m && (h = window.setTimeout(() => {
664
- p(!1);
697
+ let p;
698
+ return u && (p = window.setTimeout(() => {
699
+ m(!1);
665
700
  }, 3e3)), () => {
666
- clearTimeout(h);
701
+ clearTimeout(p);
667
702
  };
668
- }, [m]), /* @__PURE__ */ v("div", { className: g.wrapper, children: [
703
+ }, [u]), /* @__PURE__ */ v("div", { className: c.wrapper, children: [
669
704
  /* @__PURE__ */ v("div", { children: [
670
- /* @__PURE__ */ i("div", { className: g.main, children: e }),
671
- a && Object.keys(a).map((h) => a[h] ? /* @__PURE__ */ i("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: g.footer, children: [
672
- h,
705
+ /* @__PURE__ */ n("div", { className: c.main, children: e }),
706
+ a && Object.keys(a).map((p) => a[p] ? /* @__PURE__ */ n("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: c.footer, children: [
707
+ p,
673
708
  ": ",
674
- a[h]
675
- ] }) }, `-${h}`) : null),
676
- n && n
709
+ a[p]
710
+ ] }) }, `-${p}`) : null),
711
+ i && i
677
712
  ] }),
678
- c && /* @__PURE__ */ i("div", { className: g.copyButton, children: /* @__PURE__ */ i(
713
+ g && /* @__PURE__ */ n("div", { className: c.copyButton, children: /* @__PURE__ */ n(
679
714
  be,
680
715
  {
681
716
  noBorder: !0,
682
717
  noBackground: !0,
683
718
  size: "small",
684
- mode: d,
719
+ mode: s,
685
720
  focusMode: l,
686
- label: m ? "Copied to clipboard" : "Copy to clipboard",
687
- onClick: u,
688
- disabled: m,
689
- children: m ? /* @__PURE__ */ i(gt, { className: "size-3" }) : /* @__PURE__ */ i(ut, { className: "size-3" })
721
+ label: u ? "Copied to clipboard" : "Copy to clipboard",
722
+ onClick: h,
723
+ disabled: u,
724
+ children: u ? /* @__PURE__ */ n(pt, { className: "size-3" }) : /* @__PURE__ */ n(bt, { className: "size-3" })
690
725
  }
691
726
  ) })
692
727
  ] });
693
- }, ie = "av-button", kt = (e) => {
728
+ }, ie = "av-button", Nt = (e) => {
694
729
  let t = "";
695
730
  if (typeof e == "number" || typeof e == "string")
696
731
  t = "m-" + e;
@@ -699,32 +734,32 @@ const mt = (e) => {
699
734
  (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
700
735
  }
701
736
  return t;
702
- }, fe = "icon", ve = "button", xt = "link", Tt = ({
737
+ }, ye = "icon", ve = "button", wt = "link", Et = ({
703
738
  type: e,
704
739
  size: t,
705
740
  labelRight: r,
706
741
  labelLeft: a,
707
- align: n
742
+ align: i
708
743
  }) => {
709
- const o = "text-sm font-medium max-h-8 py-0", l = "text-base font-medium max-h-9 py-1", d = "text-lg font-medium max-h-12 py-2";
744
+ const o = "text-sm font-medium max-h-8 py-0", l = "text-base font-medium max-h-9 py-1", s = "text-lg font-medium max-h-12 py-2";
710
745
  switch (e) {
711
746
  case ve:
712
- return s("px-4", {
747
+ return d("px-4", {
713
748
  [o]: t === "small",
714
749
  [l]: t === "medium",
715
- [d]: t === "large"
750
+ [s]: t === "large"
716
751
  });
717
- case xt:
718
- return s("px-4 text-center", {
752
+ case wt:
753
+ return d("px-4 text-center", {
719
754
  [o]: t === "small",
720
755
  [l]: t === "medium",
721
- [d]: t === "large"
756
+ [s]: t === "large"
722
757
  });
723
- case fe:
724
- return s("inline-flex items-center", {
725
- "justify-center": n === "center",
726
- "justify-start": n === "left",
727
- "justify-end": n === "right",
758
+ case ye:
759
+ return d("inline-flex items-center", {
760
+ "justify-center": i === "center",
761
+ "justify-start": i === "left",
762
+ "justify-end": i === "right",
728
763
  "h-6 w-6 p-0": t === "small" && !(r || a),
729
764
  "h-6 px-4 text-sm font-medium": t === "small" && (r || a),
730
765
  "h-8 w-8 p-1": t === "medium" && !(r || a),
@@ -733,7 +768,7 @@ const mt = (e) => {
733
768
  "h-12 px-4 text-lg font-medium": t === "large" && (r || a)
734
769
  });
735
770
  }
736
- }, _t = ({
771
+ }, Ct = ({
737
772
  mode: e,
738
773
  noBackground: t,
739
774
  noTruncate: r,
@@ -742,7 +777,7 @@ const mt = (e) => {
742
777
  if (t)
743
778
  return "not-prose rounded-full";
744
779
  if (a === "primary")
745
- return s("not-prose rounded-full", {
780
+ return d("not-prose rounded-full", {
746
781
  truncate: !r,
747
782
  "bg-action-dark text-copy-light": e === "dark",
748
783
  "bg-action-light text-copy-lighter": e === "light",
@@ -750,7 +785,7 @@ const mt = (e) => {
750
785
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
751
786
  });
752
787
  if (a === "secondary")
753
- return s("not-prose rounded-full", {
788
+ return d("not-prose rounded-full", {
754
789
  truncate: !r,
755
790
  "bg-action-dark text-copy-light": e === "light",
756
791
  "bg-action-light text-copy-lighter": e === "dark",
@@ -758,14 +793,14 @@ const mt = (e) => {
758
793
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
759
794
  });
760
795
  if (a === "danger")
761
- return s("not-prose rounded-full", {
796
+ return d("not-prose rounded-full", {
762
797
  truncate: !r,
763
798
  "bg-action-danger-dark text-copy-light": e === "dark",
764
799
  "bg-action-danger-light text-copy-lighter": e === "light",
765
800
  "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
766
801
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
767
802
  });
768
- }, Nt = ({
803
+ }, It = ({
769
804
  mode: e,
770
805
  disabled: t,
771
806
  variant: r
@@ -773,27 +808,27 @@ const mt = (e) => {
773
808
  if (t)
774
809
  return "";
775
810
  if (r === "primary")
776
- return s("hover:text-copy-light-hover", {
811
+ return d("hover:text-copy-light-hover", {
777
812
  "hover:bg-action-dark-hover": e === "dark",
778
813
  "hover:bg-action-light-hover": e === "light",
779
814
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
780
815
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
781
816
  });
782
817
  if (r === "secondary")
783
- return s("hover:text-copy-light-hover", {
818
+ return d("hover:text-copy-light-hover", {
784
819
  "hover:bg-action-dark-hover": e === "light",
785
820
  "hover:bg-action-light-hover": e === "dark",
786
821
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
787
822
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
788
823
  });
789
824
  if (r === "danger")
790
- return s("hover:text-copy-light-hover", {
825
+ return d("hover:text-copy-light-hover", {
791
826
  "hover:bg-action-danger-dark-hover": e === "dark",
792
827
  "hover:bg-action-danger-light-hover": e === "light",
793
828
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
794
829
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
795
830
  });
796
- }, wt = ({
831
+ }, Rt = ({
797
832
  mode: e,
798
833
  disabled: t,
799
834
  variant: r
@@ -801,27 +836,27 @@ const mt = (e) => {
801
836
  if (t)
802
837
  return "";
803
838
  if (r === "primary")
804
- return s("active:text-copy-light-active", {
839
+ return d("active:text-copy-light-active", {
805
840
  "active:bg-action-dark-active": e === "dark",
806
841
  "active:bg-action-light-active": e === "light",
807
842
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
808
843
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
809
844
  });
810
845
  if (r === "secondary")
811
- return s("active:text-copy-light-active", {
846
+ return d("active:text-copy-light-active", {
812
847
  "active:bg-action-dark-active": e === "light",
813
848
  "active:bg-action-light-active": e === "dark",
814
849
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
815
850
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
816
851
  });
817
852
  if (r === "danger")
818
- return s("active:text-copy-lighter-active", {
853
+ return d("active:text-copy-lighter-active", {
819
854
  "active:bg-action-danger-dark-active": e === "dark",
820
855
  "active:bg-action-danger-light-active": e === "light",
821
856
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
822
857
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
823
858
  });
824
- }, Et = ({
859
+ }, St = ({
825
860
  mode: e,
826
861
  noBorder: t,
827
862
  variant: r
@@ -829,27 +864,27 @@ const mt = (e) => {
829
864
  if (t)
830
865
  return "border border-transparent";
831
866
  if (r === "primary")
832
- return s("border", {
867
+ return d("border", {
833
868
  "border-border-dark": e === "dark",
834
869
  "border-border-accent": e === "light",
835
870
  "border-border-dark dark:border-border-accent": e === "system",
836
871
  "border-border-accent dark:border-border-dark": e === "alt-system"
837
872
  });
838
873
  if (r === "secondary")
839
- return s("border", {
874
+ return d("border", {
840
875
  "border-border-dark": e === "light",
841
876
  "border-border-accent": e === "dark",
842
877
  "border-border-dark dark:border-border-accent": e === "alt-system",
843
878
  "border-border-accent dark:border-border-dark": e === "system"
844
879
  });
845
880
  if (r === "danger")
846
- return s("border", {
881
+ return d("border", {
847
882
  "border-border-danger-dark": e === "dark",
848
883
  "border-border-danger-medium": e === "light",
849
884
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
850
885
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
851
886
  });
852
- }, Ct = ({ focusMode: e }) => s("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
887
+ }, At = ({ focusMode: e }) => d("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
853
888
  "focus:outline-focus-dark": e === "dark",
854
889
  "focus:outline-focus-light": e === "light",
855
890
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
@@ -859,45 +894,45 @@ const mt = (e) => {
859
894
  className: t,
860
895
  raw: r,
861
896
  mode: a,
862
- focusMode: n,
897
+ focusMode: i,
863
898
  disabled: o,
864
899
  fullWidth: l,
865
- size: d,
900
+ size: s,
866
901
  noBorder: b,
867
- labelRight: m,
868
- labelLeft: p,
869
- spacing: g,
870
- noBackground: c,
871
- variant: u,
872
- noTruncate: h,
873
- align: f
874
- }) => (u || (u = "primary"), r ? s(ie, t) : s(
902
+ labelRight: u,
903
+ labelLeft: m,
904
+ spacing: c,
905
+ noBackground: g,
906
+ variant: h,
907
+ noTruncate: p,
908
+ align: y
909
+ }) => (h || (h = "primary"), r ? d(ie, t) : d(
875
910
  ie,
876
911
  t,
877
- kt(g),
878
- _t({ mode: a, variant: u, noBackground: c, noTruncate: h }),
879
- Tt({ type: e, size: d, labelRight: m, labelLeft: p, align: f }),
880
- Et({ mode: a, variant: u, noBorder: b }),
881
- Ct({ focusMode: n }),
882
- Nt({ mode: a, variant: u, disabled: o }),
883
- wt({ mode: a, variant: u, disabled: o }),
912
+ Nt(c),
913
+ Ct({ mode: a, variant: h, noBackground: g, noTruncate: p }),
914
+ Et({ type: e, size: s, labelRight: u, labelLeft: m, align: y }),
915
+ St({ mode: a, variant: h, noBorder: b }),
916
+ At({ focusMode: i }),
917
+ It({ mode: a, variant: h, disabled: o }),
918
+ Rt({ mode: a, variant: h, disabled: o }),
884
919
  {
885
920
  "w-full": l,
886
921
  "disabled:cursor-not-allowed disabled:opacity-50": o
887
922
  }
888
- )), It = (e, t, r) => {
923
+ )), Bt = (e, t, r) => {
889
924
  var a;
890
925
  !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);
891
926
  }, ee = S.forwardRef((e, t) => {
892
- const { onClick: r, noInternalClick: a = !1, ...n } = e;
893
- return /* @__PURE__ */ i(
927
+ const { onClick: r, noInternalClick: a = !1, ...i } = e;
928
+ return /* @__PURE__ */ n(
894
929
  "button",
895
930
  {
896
931
  ref: t,
897
932
  onClick: (o) => {
898
- It(o, a, r);
933
+ Bt(o, a, r);
899
934
  },
900
- ...n
935
+ ...i
901
936
  }
902
937
  );
903
938
  });
@@ -908,37 +943,37 @@ const xe = S.forwardRef(
908
943
  disabled: t = !1,
909
944
  mode: r = "system",
910
945
  focusMode: a = "system",
911
- fullWidth: n = !1,
946
+ fullWidth: i = !1,
912
947
  className: o,
913
948
  size: l = "medium",
914
- raw: d = !1,
949
+ raw: s = !1,
915
950
  noBorder: b = !1,
916
- spacing: m,
917
- variant: p = "primary",
918
- noTruncate: g = !1,
919
- ...c
920
- }, u) => {
921
- const h = ke({
951
+ spacing: u,
952
+ variant: m = "primary",
953
+ noTruncate: c = !1,
954
+ ...g
955
+ }, h) => {
956
+ const p = ke({
922
957
  type: ve,
923
958
  mode: r,
924
959
  focusMode: a,
925
- fullWidth: n,
960
+ fullWidth: i,
926
961
  disabled: t,
927
- raw: d,
962
+ raw: s,
928
963
  className: o,
929
964
  size: l,
930
965
  noBorder: b,
931
- spacing: m,
932
- variant: p,
933
- noTruncate: g
966
+ spacing: u,
967
+ variant: m,
968
+ noTruncate: c
934
969
  });
935
- return /* @__PURE__ */ i(
970
+ return /* @__PURE__ */ n(
936
971
  ee,
937
972
  {
938
- ref: u,
939
- className: h,
973
+ ref: h,
974
+ className: p,
940
975
  disabled: t,
941
- ...c,
976
+ ...g,
942
977
  children: e
943
978
  }
944
979
  );
@@ -958,49 +993,49 @@ try {
958
993
  });
959
994
  } catch {
960
995
  }
961
- const Rt = S.forwardRef(
996
+ const Mt = S.forwardRef(
962
997
  ({
963
998
  children: e,
964
999
  disabled: t = !1,
965
1000
  mode: r = "system",
966
1001
  focusMode: a = "system",
967
- fullWidth: n = !1,
1002
+ fullWidth: i = !1,
968
1003
  className: o,
969
1004
  type: l = "button",
970
- raw: d = !1,
1005
+ raw: s = !1,
971
1006
  noBorder: b = !1,
972
- "aria-label": m,
973
- label: p,
974
- size: g = "medium",
975
- labelRight: c,
976
- labelLeft: u,
977
- spacing: h,
978
- noBackground: f = !1,
1007
+ "aria-label": u,
1008
+ label: m,
1009
+ size: c = "medium",
1010
+ labelRight: g,
1011
+ labelLeft: h,
1012
+ spacing: p,
1013
+ noBackground: y = !1,
979
1014
  align: _ = "center",
980
1015
  active: N = !1,
981
1016
  ...w
982
1017
  }, k) => {
983
1018
  const x = ke({
984
- type: fe,
1019
+ type: ye,
985
1020
  mode: r,
986
1021
  focusMode: a,
987
- fullWidth: n,
1022
+ fullWidth: i,
988
1023
  disabled: t,
989
- raw: d,
1024
+ raw: s,
990
1025
  className: o,
991
1026
  noBorder: b,
992
- size: g,
993
- labelRight: c,
994
- labelLeft: u,
995
- spacing: h,
996
- noBackground: f,
1027
+ size: c,
1028
+ labelRight: g,
1029
+ labelLeft: h,
1030
+ spacing: p,
1031
+ noBackground: y,
997
1032
  align: _
998
- }), A = s({
999
- "text-copy-accent-dark": r === "light" && !d,
1000
- "text-copy-light": r === "dark" && !d,
1001
- "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
1002
- "text-copy-light dark:text-copy-accent-dark": r === "system" && !d
1003
- }), T = N ? s(
1033
+ }), A = d({
1034
+ "text-copy-accent-dark": r === "light" && !s,
1035
+ "text-copy-light": r === "dark" && !s,
1036
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !s,
1037
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !s
1038
+ }), T = N ? d(
1004
1039
  "relative",
1005
1040
  "focus-within:static",
1006
1041
  "focus-within:after:border-transparent",
@@ -1017,28 +1052,28 @@ const Rt = S.forwardRef(
1017
1052
  "after:border-table-light dark:after:border-table-dark": r === "alt-system"
1018
1053
  }
1019
1054
  ) : "";
1020
- return /* @__PURE__ */ i("div", { className: T, children: /* @__PURE__ */ v(
1055
+ return /* @__PURE__ */ n("div", { className: T, children: /* @__PURE__ */ v(
1021
1056
  ee,
1022
1057
  {
1023
1058
  ref: k,
1024
1059
  className: x,
1025
1060
  disabled: t,
1026
1061
  type: l,
1027
- "aria-label": m || p,
1062
+ "aria-label": u || m,
1028
1063
  ...w,
1029
1064
  children: [
1030
- u && /* @__PURE__ */ i("span", { className: "pr-2", children: u }),
1031
- /* @__PURE__ */ i("div", { className: A, children: e }),
1032
- c && /* @__PURE__ */ i("span", { className: "pl-2", children: c })
1065
+ h && /* @__PURE__ */ n("span", { className: "pr-2", children: h }),
1066
+ /* @__PURE__ */ n("div", { className: A, children: e }),
1067
+ g && /* @__PURE__ */ n("span", { className: "pl-2", children: g })
1033
1068
  ]
1034
1069
  }
1035
1070
  ) });
1036
1071
  }
1037
1072
  );
1038
- Rt.displayName = "ButtonSort";
1039
- const St = 200, At = ({
1073
+ Mt.displayName = "ButtonSort";
1074
+ const Ot = 200, Lt = ({
1040
1075
  string: e,
1041
- idealLength: t = St
1076
+ idealLength: t = Ot
1042
1077
  }) => {
1043
1078
  if (e.length <= t)
1044
1079
  return { string: e, isTruncated: !1 };
@@ -1049,22 +1084,22 @@ const St = 200, At = ({
1049
1084
  string: e.slice(0, t + r),
1050
1085
  isTruncated: !0
1051
1086
  };
1052
- }, Bt = ({
1087
+ }, $t = ({
1053
1088
  children: e,
1054
1089
  length: t = 200,
1055
1090
  mode: r = "system",
1056
1091
  focusMode: a = "system"
1057
1092
  }) => {
1058
- const [n, o] = P(!1);
1093
+ const [i, o] = P(!1);
1059
1094
  if (typeof e != "string")
1060
1095
  return e;
1061
- const { string: l, isTruncated: d } = At({
1096
+ const { string: l, isTruncated: s } = Lt({
1062
1097
  string: e,
1063
1098
  idealLength: t
1064
1099
  });
1065
1100
  return /* @__PURE__ */ v("span", { children: [
1066
- n ? e : l,
1067
- d && /* @__PURE__ */ i(
1101
+ i ? e : l,
1102
+ s && /* @__PURE__ */ n(
1068
1103
  xe,
1069
1104
  {
1070
1105
  mode: r,
@@ -1072,9 +1107,9 @@ const St = 200, At = ({
1072
1107
  spacing: { l: 2 },
1073
1108
  size: "small",
1074
1109
  onClick: (b) => {
1075
- b.preventDefault(), o(!n);
1110
+ b.preventDefault(), o(!i);
1076
1111
  },
1077
- children: n ? "less..." : "more..."
1112
+ children: i ? "less..." : "more..."
1078
1113
  }
1079
1114
  )
1080
1115
  ] });
@@ -1095,32 +1130,32 @@ try {
1095
1130
  const ne = We(
1096
1131
  () => import(
1097
1132
  /* webpackChunkName: "LazyMessageAssistant" */
1098
- "./LazyMessageAssistant.3aYd1Tzp.js"
1133
+ "./LazyMessageAssistant.s5h7NaV1.js"
1099
1134
  ).then((e) => e.LazyMessageAssistant)
1100
- ), Mt = () => {
1135
+ ), Ut = () => {
1101
1136
  const { state: e } = U(j);
1102
1137
  return /* @__PURE__ */ v(H, { children: [
1103
1138
  e && e.messages.length > 0 && e.messages.map((t, r) => {
1104
- const { role: a, content: n, name: o, processingTime: l } = t.message;
1105
- return (a === I || a === Z) && n ? /* @__PURE__ */ i(re, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(
1139
+ const { role: a, content: i, name: o, processingTime: l } = t.message;
1140
+ return (a === I || a === q) && i ? /* @__PURE__ */ n(re, { fallback: /* @__PURE__ */ n("span", {}), children: /* @__PURE__ */ n(
1106
1141
  ne,
1107
1142
  {
1108
1143
  name: o,
1109
1144
  processingTime: l,
1110
- children: n
1145
+ children: i
1111
1146
  }
1112
- ) }, `${r}-${a}`) : a === Y && n ? /* @__PURE__ */ i(
1113
- vt,
1147
+ ) }, `${r}-${a}`) : a === K && i ? /* @__PURE__ */ n(
1148
+ _t,
1114
1149
  {
1115
1150
  kind: "right",
1116
- copyToClipboard: n,
1151
+ copyToClipboard: i,
1117
1152
  copyToClipboardFocusMode: "light",
1118
- children: /* @__PURE__ */ i(Bt, { mode: "light", focusMode: "light", children: n })
1153
+ children: /* @__PURE__ */ n($t, { mode: "light", focusMode: "light", children: i })
1119
1154
  },
1120
1155
  `${r}-${a}`
1121
1156
  ) : null;
1122
1157
  }),
1123
- de(Y, e) && /* @__PURE__ */ i(re, { fallback: /* @__PURE__ */ i("span", {}), children: /* @__PURE__ */ i(ne, { loading: !0 }) })
1158
+ de(K, e) && /* @__PURE__ */ n(re, { fallback: /* @__PURE__ */ n("span", {}), children: /* @__PURE__ */ n(ne, { loading: !0 }) })
1124
1159
  ] });
1125
1160
  }, D = (e, t) => {
1126
1161
  e({
@@ -1134,43 +1169,43 @@ const ne = We(
1134
1169
  type: L,
1135
1170
  payload: {
1136
1171
  message: {
1137
- role: Z,
1172
+ role: q,
1138
1173
  content: Se
1139
1174
  }
1140
1175
  }
1141
1176
  });
1142
- }, Ot = () => {
1143
- const { state: e, dispatch: t } = U(j), { state: r, dispatch: a } = U(q), [n, o] = P(""), { getAccessToken: l, user: d } = J(), b = R(!1), m = R(null), p = R(
1177
+ }, Vt = () => {
1178
+ const { state: e, dispatch: t } = U(j), { state: r, dispatch: a } = U(Y), [i, o] = P(""), { getAccessToken: l, user: s } = Z(), b = R(!1), u = R(null), m = R(
1144
1179
  null
1145
1180
  );
1146
1181
  E(() => {
1147
1182
  (async () => {
1148
- var u;
1183
+ var h;
1149
1184
  if (!e || e.messages.length === 0) {
1150
- (u = p == null ? void 0 : p.current) == null || u.cancel();
1185
+ (h = m == null ? void 0 : m.current) == null || h.cancel();
1151
1186
  return;
1152
1187
  }
1153
- const c = e.messages[e.messages.length - 1];
1154
- if (!(e.messages.length === 0 || c.message.role === I || c.message.role === Ee || c.message.role === Z || c.message.role === Ce))
1188
+ const g = e.messages[e.messages.length - 1];
1189
+ if (!(e.messages.length === 0 || g.message.role === I || g.message.role === Ee || g.message.role === q || g.message.role === Ce))
1155
1190
  try {
1156
- const h = await He({
1191
+ const p = await He({
1157
1192
  accessToken: await l(),
1158
1193
  name: "generate",
1159
1194
  data: {
1160
1195
  messages: e.messages,
1161
1196
  model: e.engine || z,
1162
- user: (d == null ? void 0 : d.username) || "",
1197
+ user: (s == null ? void 0 : s.username) || "",
1163
1198
  id: e.id,
1164
1199
  usage: e.usage
1165
1200
  }
1166
1201
  });
1167
- if (h && h.ok) {
1168
- const f = K();
1169
- p.current = h.body.getReader();
1202
+ if (p && p.ok) {
1203
+ const y = J();
1204
+ m.current = p.body.getReader();
1170
1205
  const _ = new TextDecoder();
1171
1206
  for (; ; ) {
1172
1207
  D(t, !0);
1173
- const { done: N, value: w } = await p.current.read();
1208
+ const { done: N, value: w } = await m.current.read();
1174
1209
  if (N) {
1175
1210
  D(t, !1);
1176
1211
  break;
@@ -1192,7 +1227,7 @@ const ne = We(
1192
1227
  message: {
1193
1228
  content: A,
1194
1229
  role: I,
1195
- messageId: f,
1230
+ messageId: y,
1196
1231
  processingTime: T.processingTime,
1197
1232
  name: T.name
1198
1233
  }
@@ -1206,49 +1241,50 @@ const ne = We(
1206
1241
  message: {
1207
1242
  content: k,
1208
1243
  role: I,
1209
- messageId: f
1244
+ messageId: y
1210
1245
  }
1211
1246
  }
1212
1247
  });
1213
1248
  }
1214
1249
  } else
1215
1250
  se(t);
1216
- } catch (h) {
1217
- console.error(h), se(t);
1251
+ } catch (p) {
1252
+ console.error(p), se(t);
1218
1253
  }
1219
1254
  })();
1220
1255
  }, [e == null ? void 0 : e.messages]);
1221
- const g = async (c) => {
1222
- c.preventDefault(), t({
1256
+ const c = async (g) => {
1257
+ g.preventDefault(), t({
1223
1258
  type: L,
1224
1259
  payload: {
1225
1260
  message: {
1226
- role: Y,
1227
- content: n
1261
+ role: K,
1262
+ content: i
1228
1263
  }
1229
1264
  }
1230
1265
  }), o("");
1231
1266
  };
1232
1267
  return E(() => {
1233
- (e == null ? void 0 : e.streaming) === !1 && !b.current && m.current && (b.current = !0, m.current.focus()), (e == null ? void 0 : e.streaming) === !0 && b.current === !0 && (b.current = !1);
1268
+ (e == null ? void 0 : e.streaming) === !1 && !b.current && u.current && (b.current = !0, u.current.focus()), (e == null ? void 0 : e.streaming) === !0 && b.current === !0 && (b.current = !1);
1234
1269
  }, [e]), E(() => {
1235
- r.tag !== "" && O[r.tag] && (o(O[r.tag].content), m.current && m.current.focus(), a({
1270
+ r.tag !== "" && O[r.tag] && (o(O[r.tag].content), u.current && u.current.focus(), a({
1236
1271
  type: ue
1237
1272
  }));
1238
- }, [r, a]), /* @__PURE__ */ i("form", { className: "mt-2", onSubmit: g, children: /* @__PURE__ */ i(
1273
+ }, [r, a]), /* @__PURE__ */ n("form", { className: "mt-2", onSubmit: c, children: /* @__PURE__ */ n(
1239
1274
  je,
1240
1275
  {
1241
1276
  mode: "dark",
1242
1277
  focusMode: "light",
1243
- ref: m,
1278
+ ref: u,
1244
1279
  name: "chat-input",
1245
1280
  label: Ie,
1246
1281
  helperText: "Press ENTER to add a new line",
1247
1282
  helperTextOnFocus: !0,
1248
1283
  required: !0,
1249
- value: n,
1250
- onChange: (c) => o(c.target.value),
1251
- rightElement: /* @__PURE__ */ i(
1284
+ value: i,
1285
+ onChange: (g) => o(g.target.value),
1286
+ onKeyDown: Ze([["mod+Enter", c]]),
1287
+ rightElement: /* @__PURE__ */ n(
1252
1288
  B,
1253
1289
  {
1254
1290
  disabled: e == null ? void 0 : e.streaming,
@@ -1261,21 +1297,21 @@ const ne = We(
1261
1297
  )
1262
1298
  }
1263
1299
  ) });
1264
- }, Lt = () => {
1265
- const { isAuthenticated: e } = J(), t = Ae(e);
1300
+ }, zt = () => {
1301
+ const { isAuthenticated: e } = Z(), t = Ae(e);
1266
1302
  return /* @__PURE__ */ v(H, { children: [
1267
1303
  /* @__PURE__ */ v("div", { className: t, children: [
1268
- /* @__PURE__ */ i(Be, {}),
1269
- /* @__PURE__ */ i(Mt, {})
1304
+ /* @__PURE__ */ n(Be, {}),
1305
+ /* @__PURE__ */ n(Ut, {})
1270
1306
  ] }),
1271
- /* @__PURE__ */ i(Ke, {}),
1272
- /* @__PURE__ */ i(Ot, {})
1307
+ /* @__PURE__ */ n(tt, {}),
1308
+ /* @__PURE__ */ n(Vt, {})
1273
1309
  ] });
1274
- }, $t = (e, t) => (t == null ? void 0 : t.type) === ce ? {
1310
+ }, Dt = (e, t) => (t == null ? void 0 : t.type) === ce ? {
1275
1311
  tag: t.payload.tag
1276
1312
  } : (t == null ? void 0 : t.type) === ue ? {
1277
1313
  tag: ""
1278
- } : e, Ut = (e, t) => (t == null ? void 0 : t.type) === Me ? {
1314
+ } : e, Ht = (e, t) => (t == null ? void 0 : t.type) === Me ? {
1279
1315
  searchString: t.payload.searchString,
1280
1316
  sortedCell: e.sortedCell,
1281
1317
  sortDirection: e.sortDirection
@@ -1283,7 +1319,7 @@ const ne = We(
1283
1319
  searchString: e.searchString,
1284
1320
  sortedCell: t.payload.sortedCell,
1285
1321
  sortDirection: t.payload.sortDirection
1286
- } : e, Vt = (e, t) => {
1322
+ } : e, jt = (e, t) => {
1287
1323
  if ((t == null ? void 0 : t.type) === Le) {
1288
1324
  const r = t.payload.messages.map((a) => ({
1289
1325
  message: {
@@ -1303,34 +1339,34 @@ const ne = We(
1303
1339
  };
1304
1340
  }
1305
1341
  if ((t == null ? void 0 : t.type) === L) {
1306
- const r = t.payload.message.role, a = t.payload.message.content, n = t.payload.message.name, o = t.payload.message.processingTime, l = t.payload.message.messageId;
1342
+ const r = t.payload.message.role, a = t.payload.message.content, i = t.payload.message.name, o = t.payload.message.processingTime, l = t.payload.message.messageId;
1307
1343
  if (r !== "") {
1308
- const d = {
1344
+ const s = {
1309
1345
  role: r,
1310
1346
  content: a,
1311
- name: n,
1347
+ name: i,
1312
1348
  processingTime: o,
1313
1349
  messageId: l
1314
1350
  };
1315
1351
  if (r === I) {
1316
1352
  const b = e.messages.findIndex(
1317
- (m) => m.message.messageId === l
1353
+ (u) => u.message.messageId === l
1318
1354
  );
1319
1355
  if (b !== -1) {
1320
- const m = e.messages.map((p, g) => g === b ? {
1356
+ const u = e.messages.map((m, c) => c === b ? {
1321
1357
  message: {
1322
- ...p.message,
1323
- content: `${p.message.content}${a}`,
1358
+ ...m.message,
1359
+ content: `${m.message.content}${a}`,
1324
1360
  processingTime: o,
1325
- name: n
1361
+ name: i
1326
1362
  }
1327
- } : p);
1363
+ } : m);
1328
1364
  return {
1329
1365
  id: e.id,
1330
1366
  model: e.model,
1331
1367
  usage: e.usage,
1332
1368
  isComponent: e.isComponent,
1333
- messages: m,
1369
+ messages: u,
1334
1370
  engine: e.engine
1335
1371
  };
1336
1372
  }
@@ -1344,14 +1380,14 @@ const ne = We(
1344
1380
  messages: [
1345
1381
  ...e.messages,
1346
1382
  {
1347
- message: d
1383
+ message: s
1348
1384
  }
1349
1385
  ]
1350
1386
  };
1351
1387
  }
1352
1388
  }
1353
1389
  return (t == null ? void 0 : t.type) === le ? {
1354
- id: K(),
1390
+ id: J(),
1355
1391
  model: e.model,
1356
1392
  engine: e.engine,
1357
1393
  usage: 0,
@@ -1373,26 +1409,26 @@ const ne = We(
1373
1409
  } : e;
1374
1410
  };
1375
1411
  function Te({ isComponent: e = !1 }) {
1376
- const t = R(!1), { getAccessToken: r, user: a } = J(), [n] = $({
1412
+ const t = R(!1), { getAccessToken: r, user: a } = Z(), [i] = $({
1377
1413
  key: M + ze,
1378
1414
  initialValue: ""
1379
1415
  }), [o] = $({
1380
1416
  key: M + De,
1381
1417
  initialValue: Fe.ASC
1382
- }), [l, d] = F(Vt, {
1383
- id: K(),
1418
+ }), [l, s] = F(jt, {
1419
+ id: J(),
1384
1420
  model: z,
1385
1421
  engine: z,
1386
1422
  usage: 0,
1387
1423
  messages: [],
1388
1424
  isComponent: e
1389
- }), [b, m] = F(Ut, {
1390
- searchString: n,
1425
+ }), [b, u] = F(Ht, {
1426
+ searchString: i,
1391
1427
  sortedCell: "timestamp",
1392
1428
  sortDirection: o
1393
- }), [p, g] = F($t, {
1429
+ }), [m, c] = F(Dt, {
1394
1430
  tag: ""
1395
- }), [c, u] = P({
1431
+ }), [g, h] = P({
1396
1432
  version: "",
1397
1433
  models: [],
1398
1434
  plugins: [],
@@ -1400,45 +1436,45 @@ function Te({ isComponent: e = !1 }) {
1400
1436
  engines: []
1401
1437
  });
1402
1438
  return E(() => {
1403
- c.version !== "" || t.current || (async () => {
1439
+ g.version !== "" || t.current || (async () => {
1404
1440
  try {
1405
1441
  t.current = !0;
1406
- const h = await Pe({
1442
+ const p = await Pe({
1407
1443
  accessToken: await r(),
1408
1444
  type: Ge.ABOUT,
1409
1445
  params: {
1410
1446
  user: a == null ? void 0 : a.username
1411
1447
  }
1412
1448
  });
1413
- t.current = !1, h.status === 200 && (u(h.data), d({
1449
+ t.current = !1, p.status === 200 && (h(p.data), s({
1414
1450
  type: he,
1415
1451
  payload: {
1416
- engine: h.data.engine
1452
+ engine: p.data.engine
1417
1453
  }
1418
1454
  }));
1419
1455
  } catch {
1420
1456
  }
1421
1457
  })();
1422
- }, [c, r, a]), E(() => {
1423
- var h;
1424
- (h = document.getElementById("logo")) == null || h.classList.add("fadeOut"), setTimeout(() => {
1425
- var f;
1426
- (f = document.getElementById("root")) == null || f.classList.replace("app-hidden", "fadeIn");
1458
+ }, [g, r, a]), E(() => {
1459
+ var p;
1460
+ (p = document.getElementById("logo")) == null || p.classList.add("fadeOut"), setTimeout(() => {
1461
+ var y;
1462
+ (y = document.getElementById("root")) == null || y.classList.replace("app-hidden", "fadeIn");
1427
1463
  }, 500);
1428
- }), /* @__PURE__ */ i(j.Provider, { value: { state: l, dispatch: d, serverStats: c }, children: /* @__PURE__ */ i(
1464
+ }), /* @__PURE__ */ n(j.Provider, { value: { state: l, dispatch: s, serverStats: g }, children: /* @__PURE__ */ n(
1429
1465
  $e.Provider,
1430
1466
  {
1431
1467
  value: {
1432
1468
  state: b,
1433
- dispatch: m
1469
+ dispatch: u
1434
1470
  },
1435
1471
  children: /* @__PURE__ */ v(
1436
- q.Provider,
1472
+ Y.Provider,
1437
1473
  {
1438
- value: { state: p, dispatch: g },
1474
+ value: { state: m, dispatch: c },
1439
1475
  children: [
1440
- /* @__PURE__ */ i(Ue, { children: /* @__PURE__ */ i(Lt, {}) }),
1441
- /* @__PURE__ */ i(Ve, { serverStats: c })
1476
+ /* @__PURE__ */ n(Ue, { children: /* @__PURE__ */ n(zt, {}) }),
1477
+ /* @__PURE__ */ n(Ve, { serverStats: g })
1442
1478
  ]
1443
1479
  }
1444
1480
  )
@@ -1446,8 +1482,8 @@ function Te({ isComponent: e = !1 }) {
1446
1482
  ) });
1447
1483
  }
1448
1484
  Te.displayName = "App";
1449
- const Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Te }, Symbol.toStringTag, { value: "Module" }));
1485
+ const Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Te }, Symbol.toStringTag, { value: "Module" }));
1450
1486
  export {
1451
- Gt as App,
1452
- vt as le
1487
+ Yt as App,
1488
+ _t as le
1453
1489
  };