@versini/sassysaint 7.1.0 → 7.1.2

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,16 +1,16 @@
1
- import { jsxs as i, jsx as e, Fragment as B } from "react/jsx-runtime";
2
- import { f as $, un as F, R as H, CARDS as N, renderDataAsList as de, pluralize as ue, ABOUT_TITLE as Qe, INFINITE_SCROLL_LIMIT as ve, INFINITE_SCROLL_THRESHOLD as Se, LOCAL_STORAGE_PREFIX as ke, LOCAL_STORAGE_SORT as Ze, re as se, ACTION_SORT as Ae, LOCAL_STORAGE_SEARCH as Je, HISTORY_TITLE as et, fe as be, C as q, ACTION_SEARCH as tt, debounce as rt, M as at, isElectron as nt, L as Q, j as O, l as Ie, durationFormatter as ot, PROFILE_TITLE as st, PROMPTS_DESCRIPTION as lt, DEFAULT_AI_PROVIDER as ct, LOCAL_STORAGE_CHAT_DETAILS as it, SETTINGS_TITLE as dt, PROVIDER_OPENAI as X, PROVIDER_ANTHROPIC as te, APP_NAME as ut, getCurrentGeoLocation as mt, LOG_OUT as _e } from "./index.Ct43f1gn.js";
3
- import { i as me, useServerCapabilities as ht, Ze as ie, HistoryContext as Pe, ChatContext as Oe, E as Ce, ConfirmationPanel as Me, Ue as ft, je as pt, Fe as ge, Le as P, De as gt, $e as yt, p as bt, z as xt, We as kt, serviceCall as le, SERVICE_TYPES as ce, setNewProvider as Ct, CHAT_RESTORE as Tt, B as re, useChatsHistory as Et, useUserChatStats as Nt, useUserPreferences as ze, m as wt, _e as vt, me as St, R as ae, P as At } from "./App.Ds0uId3o.js";
4
- import It, { useRef as S, useState as k, useContext as he, useCallback as Be, useEffect as U, Fragment as _t, useLayoutEffect as ne, useMemo as He, useId as Rt, useReducer as Lt } from "react";
5
- import y from "clsx";
6
- const Pt = ({
1
+ import { jsxs as i, jsx as e, Fragment as H } from "react/jsx-runtime";
2
+ import { f as V, un as $, R as P, CARDS as x, renderDataAsList as se, pluralize as le, ABOUT_TITLE as Xe, INFINITE_SCROLL_LIMIT as Ne, INFINITE_SCROLL_THRESHOLD as Se, LOCAL_STORAGE_PREFIX as ye, LOCAL_STORAGE_SORT as qe, re as te, ACTION_SORT as we, LOCAL_STORAGE_SEARCH as Qe, HISTORY_TITLE as Ze, fe, C as j, ACTION_SEARCH as Je, debounce as et, M as tt, isElectron as rt, L as K, j as M, l as ve, durationFormatter as at, PROFILE_TITLE as nt, PROMPTS_DESCRIPTION as ot, DEFAULT_AI_PROVIDER as st, LOCAL_STORAGE_CHAT_DETAILS as lt, SETTINGS_TITLE as ct, APP_NAME as it, getCurrentGeoLocation as dt, LOG_OUT as Ae } from "./index.DdXdvpdr.js";
3
+ import { i as ce, useServerCapabilities as ut, Ze as ne, HistoryContext as Re, ChatContext as Le, E as be, ConfirmationPanel as Pe, Ue as mt, je as ht, Fe as me, Le as L, De as ft, $e as pt, p as gt, z as yt, We as bt, serviceCall as re, SERVICE_TYPES as ae, setNewProvider as xt, CHAT_RESTORE as kt, B as Z, useChatsHistory as Ct, useUserChatStats as Tt, useUserPreferences as Me, m as Et, _e as Nt, me as St, R as J, P as wt } from "./App.CBWEb0V8.js";
4
+ import vt, { useRef as v, useState as k, useContext as ie, useCallback as Oe, useEffect as F, Fragment as At, useLayoutEffect as ee, useMemo as ze, useId as It, useReducer as _t } from "react";
5
+ import g from "clsx";
6
+ const Rt = ({
7
7
  className: t,
8
8
  viewBox: o,
9
9
  title: n,
10
10
  monotone: a,
11
11
  ...r
12
12
  }) => /* @__PURE__ */ i(
13
- $,
13
+ V,
14
14
  {
15
15
  defaultViewBox: "0 0 512 512",
16
16
  size: "size-5",
@@ -29,14 +29,14 @@ const Pt = ({
29
29
  /* @__PURE__ */ e("path", { d: "M32 0h160c17.7 0 32 14.3 32 32s-14.3 32-32 32h-82.7l233.3 233.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L64 109.3V192c0 17.7-14.3 32-32 32S0 209.7 0 192V32C0 14.3 14.3 0 32 0" })
30
30
  ]
31
31
  }
32
- ), Ot = ({
32
+ ), Lt = ({
33
33
  className: t,
34
34
  viewBox: o,
35
35
  title: n,
36
36
  monotone: a,
37
37
  ...r
38
38
  }) => /* @__PURE__ */ i(
39
- $,
39
+ V,
40
40
  {
41
41
  defaultViewBox: "0 0 448 512",
42
42
  size: "size-5",
@@ -55,14 +55,14 @@ const Pt = ({
55
55
  /* @__PURE__ */ e("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64s14.3 32 32 32h384c17.7 0 32-14.3 32-32s-14.3-32-32-32h-96l-7.2-14.3C307.4 6.8 296.3 0 284.2 0z" })
56
56
  ]
57
57
  }
58
- ), Mt = ({
58
+ ), Pt = ({
59
59
  className: t,
60
60
  viewBox: o,
61
61
  title: n,
62
62
  monotone: a,
63
63
  ...r
64
64
  }) => /* @__PURE__ */ i(
65
- $,
65
+ V,
66
66
  {
67
67
  defaultViewBox: "0 0 512 512",
68
68
  size: "size-5",
@@ -81,14 +81,14 @@ const Pt = ({
81
81
  /* @__PURE__ */ e("path", { d: "M256 128c13.3 0 24 10.7 24 24v94.1l65 65c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-72-72c-4.5-4.5-7-10.6-7-17V152c0-13.3 10.7-24 24-24z" })
82
82
  ]
83
83
  }
84
- ), zt = ({
84
+ ), Mt = ({
85
85
  className: t,
86
86
  viewBox: o,
87
87
  title: n,
88
88
  monotone: a,
89
89
  ...r
90
90
  }) => /* @__PURE__ */ i(
91
- $,
91
+ V,
92
92
  {
93
93
  defaultViewBox: "0 0 512 512",
94
94
  size: "size-5",
@@ -107,14 +107,14 @@ const Pt = ({
107
107
  /* @__PURE__ */ e("path", { d: "M256 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64m-64 120c0-13.3 10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24h-80c-13.3 0-24-10.7-24-24s10.7-24 24-24h24v-64h-24c-13.3 0-24-10.7-24-24" })
108
108
  ]
109
109
  }
110
- ), Bt = ({
110
+ ), Ot = ({
111
111
  className: t,
112
112
  viewBox: o,
113
113
  title: n,
114
114
  monotone: a,
115
115
  ...r
116
116
  }) => /* @__PURE__ */ i(
117
- $,
117
+ V,
118
118
  {
119
119
  defaultViewBox: "0 0 576 512",
120
120
  size: "size-5",
@@ -133,14 +133,14 @@ const Pt = ({
133
133
  /* @__PURE__ */ e("path", { d: "M176 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128m-32 32c-44.2 0-80 35.8-80 80 0 8.8 7.2 16 16 16h192c8.8 0 16-7.2 16-16 0-44.2-35.8-80-80-80z" })
134
134
  ]
135
135
  }
136
- ), Ht = ({
136
+ ), zt = ({
137
137
  className: t,
138
138
  viewBox: o,
139
139
  title: n,
140
140
  monotone: a,
141
141
  ...r
142
142
  }) => /* @__PURE__ */ i(
143
- $,
143
+ V,
144
144
  {
145
145
  defaultViewBox: "0 0 512 512",
146
146
  size: "size-5",
@@ -159,14 +159,14 @@ const Pt = ({
159
159
  /* @__PURE__ */ e("path", { d: "M64 128c-35.3 0-64 28.7-64 64v256c0 35.3 28.7 64 64 64h256c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64zm32 64h192c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32" })
160
160
  ]
161
161
  }
162
- ), Dt = ({
162
+ ), Ht = ({
163
163
  className: t,
164
164
  viewBox: o,
165
165
  title: n,
166
166
  monotone: a,
167
167
  ...r
168
168
  }) => /* @__PURE__ */ e(
169
- $,
169
+ V,
170
170
  {
171
171
  defaultViewBox: "0 0 448 512",
172
172
  size: "size-5",
@@ -176,14 +176,14 @@ const Pt = ({
176
176
  ...r,
177
177
  children: /* @__PURE__ */ e("path", { d: "M432 256a48 48 0 1 1-96 0 48 48 0 1 1 96 0m-160 0a48 48 0 1 1-96 0 48 48 0 1 1 96 0M64 304a48 48 0 1 1 0-96 48 48 0 1 1 0 96" })
178
178
  }
179
- ), Vt = ({
179
+ ), Bt = ({
180
180
  className: t,
181
181
  viewBox: o,
182
182
  title: n,
183
183
  monotone: a,
184
184
  ...r
185
185
  }) => /* @__PURE__ */ i(
186
- $,
186
+ V,
187
187
  {
188
188
  defaultViewBox: "0 0 512 512",
189
189
  size: "size-5",
@@ -202,57 +202,57 @@ const Pt = ({
202
202
  /* @__PURE__ */ e("path", { d: "M128 416a32 32 0 1 1 64 0 32 32 0 1 1-64 0m112 0a80 80 0 1 0-160 0 80 80 0 1 0 160 0m80-160a32 32 0 1 1 64 0 32 32 0 1 1-64 0m112 0a80 80 0 1 0-160 0 80 80 0 1 0 160 0M192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64m0-112a80 80 0 1 0 0 160 80 80 0 1 0 0-160" })
203
203
  ]
204
204
  }
205
- ), $t = () => {
206
- const { getAccessToken: t } = F(), o = me(), n = me(), {
205
+ ), Dt = () => {
206
+ const { getAccessToken: t } = $(), o = ce(), n = ce(), {
207
207
  data: a,
208
208
  error: r,
209
209
  isLoading: c
210
- } = ht({
210
+ } = ut({
211
211
  getAccessToken: t
212
212
  }), s = (a == null ? void 0 : a.plugins) || [], d = (a == null ? void 0 : a.version) || "", m = (a == null ? void 0 : a.models) || [];
213
- return /* @__PURE__ */ i(B, { children: [
213
+ return /* @__PURE__ */ i(H, { children: [
214
214
  /* @__PURE__ */ e("div", { className: "mb-4", children: /* @__PURE__ */ e(
215
- H,
215
+ P,
216
216
  {
217
- header: N.ABOUT.TITLE_CLIENT,
217
+ header: x.ABOUT.TITLE_CLIENT,
218
218
  className: "prose-dark dark:prose-lighter",
219
- children: de(o, {
220
- [N.ABOUT.VERSION]: "7.1.0",
221
- [N.ABOUT.BUILD_TIMESTAMP]: "02/08/2025 04:03 PM EST"
219
+ children: se(o, {
220
+ [x.ABOUT.VERSION]: "7.1.2",
221
+ [x.ABOUT.BUILD_TIMESTAMP]: "02/08/2025 07:57 PM EST"
222
222
  })
223
223
  }
224
224
  ) }),
225
225
  r || c ? null : /* @__PURE__ */ e(
226
- H,
226
+ P,
227
227
  {
228
- header: N.ABOUT.TITLE_SERVER,
228
+ header: x.ABOUT.TITLE_SERVER,
229
229
  className: "prose-dark dark:prose-lighter",
230
- children: de(n, {
231
- [N.ABOUT.VERSION]: d,
232
- [ue(N.ABOUT.PROVIDER, m.length)]: /* @__PURE__ */ e(B, { children: m.map((h) => /* @__PURE__ */ e("div", { className: "text-right", children: h }, h)) }),
233
- [ue(N.ABOUT.PLUGIN, s.length)]: /* @__PURE__ */ e(B, { children: s.map((h) => /* @__PURE__ */ e("div", { className: "text-right", children: h }, h)) })
230
+ children: se(n, {
231
+ [x.ABOUT.VERSION]: d,
232
+ [le(x.ABOUT.PROVIDER, m.length)]: /* @__PURE__ */ e(H, { children: m.map((h) => /* @__PURE__ */ e("div", { className: "text-right", children: h }, h)) }),
233
+ [le(x.ABOUT.PLUGIN, s.length)]: /* @__PURE__ */ e(H, { children: s.map((h) => /* @__PURE__ */ e("div", { className: "text-right", children: h }, h)) })
234
234
  })
235
235
  }
236
236
  )
237
237
  ] });
238
- }, Ft = ({
238
+ }, Vt = ({
239
239
  open: t,
240
240
  onOpenChange: o
241
- }) => /* @__PURE__ */ e(ie, { open: t, onOpenChange: o, title: Qe, children: /* @__PURE__ */ e($t, {}) }), Ut = async (t, o, n, a, r, c) => {
241
+ }) => /* @__PURE__ */ e(ne, { open: t, onOpenChange: o, title: Xe, children: /* @__PURE__ */ e(Dt, {}) }), $t = async (t, o, n, a, r, c) => {
242
242
  try {
243
- const s = await le({
243
+ const s = await re({
244
244
  accessToken: a,
245
- type: ce.GET_CHAT,
245
+ type: ae.GET_CHAT,
246
246
  params: {
247
247
  id: t.id
248
248
  }
249
249
  });
250
- s.status === 200 && (s.data.provider !== c && await Ct({
250
+ s.status === 200 && (s.data.provider !== c && await xt({
251
251
  provider: s.data.provider,
252
252
  accessToken: a,
253
253
  username: r
254
254
  }), o({
255
- type: Tt,
255
+ type: kt,
256
256
  payload: {
257
257
  id: t.id,
258
258
  model: s.data.model,
@@ -263,51 +263,51 @@ const Pt = ({
263
263
  }), n(!1));
264
264
  } catch {
265
265
  }
266
- }, Gt = ({
266
+ }, Ft = ({
267
267
  filteredHistory: t,
268
268
  dispatch: o,
269
269
  onOpenChange: n,
270
270
  mutate: a
271
271
  }) => {
272
272
  var I;
273
- const { user: r, getAccessToken: c } = F(), s = S(null), d = S({
273
+ const { user: r, getAccessToken: c } = $(), s = v(null), d = v({
274
274
  id: 0,
275
275
  timestamp: "",
276
276
  message: ""
277
- }), [m, h] = k(!1), [f, b] = k(
278
- ve + Se
279
- ), { state: C, dispatch: l } = he(Pe), {
277
+ }), [m, h] = k(!1), [f, y] = k(
278
+ Ne + Se
279
+ ), { state: C, dispatch: l } = ie(Re), {
280
280
  state: { provider: p }
281
- } = he(Oe), [, T] = Ce({
282
- key: ke + Ze,
281
+ } = ie(Le), [, E] = be({
282
+ key: ye + qe,
283
283
  initialValue: C.sortDirection
284
- }), E = (u) => {
284
+ }), N = (u) => {
285
285
  switch (C.sortDirection) {
286
- case re.ASC:
287
- T(re.DESC), l({
288
- type: Ae,
286
+ case Z.ASC:
287
+ E(Z.DESC), l({
288
+ type: we,
289
289
  payload: {
290
290
  sortedCell: u,
291
- sortDirection: re.DESC
291
+ sortDirection: Z.DESC
292
292
  }
293
293
  });
294
294
  break;
295
295
  default:
296
- T(re.ASC), l({
297
- type: Ae,
296
+ E(Z.ASC), l({
297
+ type: we,
298
298
  payload: {
299
299
  sortedCell: u,
300
- sortDirection: re.ASC
300
+ sortDirection: Z.ASC
301
301
  }
302
302
  });
303
303
  break;
304
304
  }
305
- }, g = async () => {
305
+ }, b = async () => {
306
306
  const u = d.current;
307
307
  try {
308
- await le({
308
+ await re({
309
309
  accessToken: await c(),
310
- type: ce.DELETE_CHAT,
310
+ type: ae.DELETE_CHAT,
311
311
  params: {
312
312
  userId: (r == null ? void 0 : r.username) || "",
313
313
  id: u.id
@@ -315,22 +315,22 @@ const Pt = ({
315
315
  }), a();
316
316
  } catch {
317
317
  }
318
- }, R = Be((u) => {
319
- u[0].isIntersecting && b((M) => M + ve);
318
+ }, _ = Oe((u) => {
319
+ u[0].isIntersecting && y((O) => O + Ne);
320
320
  }, []);
321
- return U(() => {
321
+ return F(() => {
322
322
  const u = {
323
323
  // root: null,
324
324
  rootMargin: "20px"
325
- }, w = new IntersectionObserver(R, u);
325
+ }, w = new IntersectionObserver(_, u);
326
326
  s.current && w.observe(s.current);
327
- }), /* @__PURE__ */ i(B, { children: [
327
+ }), /* @__PURE__ */ i(H, { children: [
328
328
  /* @__PURE__ */ i(
329
- Me,
329
+ Pe,
330
330
  {
331
331
  showConfirmation: m,
332
332
  setShowConfirmation: h,
333
- action: g,
333
+ action: b,
334
334
  customStrings: {
335
335
  confirmAction: "Delete",
336
336
  cancelAction: "Cancel",
@@ -353,11 +353,11 @@ const Pt = ({
353
353
  ]
354
354
  }
355
355
  ),
356
- /* @__PURE__ */ i(ft, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
357
- /* @__PURE__ */ e(pt, { children: /* @__PURE__ */ i(ge, { children: [
358
- /* @__PURE__ */ e(P, { className: "sr-only", children: "Row" }),
356
+ /* @__PURE__ */ i(mt, { stickyHeader: !0, stickyFooter: !0, compact: !0, children: [
357
+ /* @__PURE__ */ e(ht, { children: /* @__PURE__ */ i(me, { children: [
358
+ /* @__PURE__ */ e(L, { className: "sr-only", children: "Row" }),
359
359
  /* @__PURE__ */ e(
360
- gt,
360
+ ft,
361
361
  {
362
362
  buttonClassName: "text-xs sm:text-sm",
363
363
  cellId: "timestamp",
@@ -365,24 +365,24 @@ const Pt = ({
365
365
  sortDirection: C.sortDirection,
366
366
  sortedCell: C.sortedCell,
367
367
  onClick: () => {
368
- E("timestamp");
368
+ N("timestamp");
369
369
  },
370
370
  children: "Date"
371
371
  }
372
372
  ),
373
- /* @__PURE__ */ e(P, { className: "text-xs sm:text-sm", children: "Summary" }),
374
- /* @__PURE__ */ e(P, { className: "text-xs sm:text-sm", children: "Provider" }),
375
- /* @__PURE__ */ e(P, { className: "text-xs sm:text-sm text-right", children: "Actions" })
373
+ /* @__PURE__ */ e(L, { className: "text-xs sm:text-sm", children: "Summary" }),
374
+ /* @__PURE__ */ e(L, { className: "text-xs sm:text-sm", children: "Provider" }),
375
+ /* @__PURE__ */ e(L, { className: "text-xs sm:text-sm text-right", children: "Actions" })
376
376
  ] }) }),
377
- /* @__PURE__ */ e(yt, { children: t.slice(0, f).map((u, w) => {
378
- var D, v;
379
- const M = u.summary || (u.messages.length > 0 ? (D = u.messages[0]) == null ? void 0 : D.content : "");
380
- return ((v = u == null ? void 0 : u.messages) == null ? void 0 : v.length) > 0 ? /* @__PURE__ */ i(_t, { children: [
377
+ /* @__PURE__ */ e(pt, { children: t.slice(0, f).map((u, w) => {
378
+ var U, S;
379
+ const O = u.summary || (u.messages.length > 0 ? (U = u.messages[0]) == null ? void 0 : U.content : "");
380
+ return ((S = u == null ? void 0 : u.messages) == null ? void 0 : S.length) > 0 ? /* @__PURE__ */ i(At, { children: [
381
381
  w === f - Se && /* @__PURE__ */ e("tr", { ref: s }),
382
- /* @__PURE__ */ i(ge, { children: [
383
- /* @__PURE__ */ e(P, { children: w + 1 }),
382
+ /* @__PURE__ */ i(me, { children: [
383
+ /* @__PURE__ */ e(L, { children: w + 1 }),
384
384
  /* @__PURE__ */ e(
385
- P,
385
+ L,
386
386
  {
387
387
  component: "th",
388
388
  scope: "row",
@@ -391,85 +391,85 @@ const Pt = ({
391
391
  }
392
392
  ),
393
393
  /* @__PURE__ */ e(
394
- P,
394
+ L,
395
395
  {
396
396
  className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
397
397
  style: {
398
398
  wordBreak: "break-word"
399
399
  },
400
- children: M
400
+ children: O
401
401
  }
402
402
  ),
403
403
  /* @__PURE__ */ i(
404
- P,
404
+ L,
405
405
  {
406
406
  component: "th",
407
407
  scope: "row",
408
408
  className: "text-gray-400",
409
409
  align: "center",
410
410
  children: [
411
- u.model && u.model.startsWith("claude") && /* @__PURE__ */ e(bt, { size: "size-4 sm:size-5" }),
412
- u.model && u.model.startsWith("gpt") && /* @__PURE__ */ e(xt, { size: "size-4 sm:size-5" })
411
+ u.model && u.model.startsWith("claude") && /* @__PURE__ */ e(gt, { size: "size-4 sm:size-5" }),
412
+ u.model && u.model.startsWith("gpt") && /* @__PURE__ */ e(yt, { size: "size-4 sm:size-5" })
413
413
  ]
414
414
  }
415
415
  ),
416
- /* @__PURE__ */ i(P, { align: "right", children: [
416
+ /* @__PURE__ */ i(L, { align: "right", children: [
417
417
  /* @__PURE__ */ e(
418
- se,
418
+ te,
419
419
  {
420
420
  className: "mr-2",
421
421
  focusMode: "alt-system",
422
422
  noBorder: !0,
423
423
  label: "Restore chat",
424
424
  onClick: async () => {
425
- const z = await c();
426
- Ut(
425
+ const T = await c();
426
+ $t(
427
427
  u,
428
428
  o,
429
429
  n,
430
- z,
430
+ T,
431
431
  (r == null ? void 0 : r.username) || "",
432
432
  p
433
433
  );
434
434
  },
435
- children: /* @__PURE__ */ e(Ht, { size: "size-3", monotone: !0 })
435
+ children: /* @__PURE__ */ e(zt, { size: "size-3", monotone: !0 })
436
436
  }
437
437
  ),
438
438
  /* @__PURE__ */ e(
439
- se,
439
+ te,
440
440
  {
441
441
  focusMode: "alt-system",
442
442
  noBorder: !0,
443
443
  label: "Delete chat",
444
444
  onClick: () => {
445
- var z;
445
+ var T;
446
446
  d.current = {
447
447
  id: u.id,
448
448
  timestamp: u.timestamp,
449
- message: u.messages.length > 0 ? (z = u.messages[0]) == null ? void 0 : z.content : ""
449
+ message: u.messages.length > 0 ? (T = u.messages[0]) == null ? void 0 : T.content : ""
450
450
  }, h(!m);
451
451
  },
452
- children: /* @__PURE__ */ e("div", { className: "text-red-400", children: /* @__PURE__ */ e(Ot, { size: "size-3", monotone: !0 }) })
452
+ children: /* @__PURE__ */ e("div", { className: "text-red-400", children: /* @__PURE__ */ e(Lt, { size: "size-3", monotone: !0 }) })
453
453
  }
454
454
  )
455
455
  ] })
456
456
  ] })
457
- ] }, `${N.HISTORY.TITLE}-${u.id}-${w}`) : null;
457
+ ] }, `${x.HISTORY.TITLE}-${u.id}-${w}`) : null;
458
458
  }) }),
459
- /* @__PURE__ */ e(kt, { children: /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(P, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: ue(
459
+ /* @__PURE__ */ e(bt, { children: /* @__PURE__ */ e(me, { children: /* @__PURE__ */ e(L, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: le(
460
460
  `${t.length} chat`,
461
461
  t.length
462
462
  ) }) }) }) })
463
463
  ] })
464
464
  ] });
465
- }, Yt = ({
465
+ }, Ut = ({
466
466
  open: t,
467
467
  onOpenChange: o
468
468
  }) => {
469
- const { getAccessToken: n, user: a } = F(), {
469
+ const { getAccessToken: n, user: a } = $(), {
470
470
  state: { lastTriggeredTimestamp: r },
471
471
  dispatch: c
472
- } = he(Oe), { state: s, dispatch: d } = he(Pe), { data: m, mutate: h } = Et({
472
+ } = ie(Le), { state: s, dispatch: d } = ie(Re), { data: m, mutate: h } = Ct({
473
473
  keys: [
474
474
  a == null ? void 0 : a.username,
475
475
  s.searchString,
@@ -477,26 +477,26 @@ const Pt = ({
477
477
  r || 0
478
478
  ],
479
479
  getAccessToken: n
480
- }), f = S(null), [, b] = Ce({
481
- key: ke + Je,
480
+ }), f = v(null), [, y] = be({
481
+ key: ye + Qe,
482
482
  initialValue: s.searchString
483
483
  }), [C, l] = k([]);
484
- U(() => {
484
+ F(() => {
485
485
  m && l(m);
486
486
  }, [m]);
487
- const p = async (g) => {
488
- b(g), d({
489
- type: tt,
490
- payload: { searchString: g }
487
+ const p = async (b) => {
488
+ y(b), d({
489
+ type: Je,
490
+ payload: { searchString: b }
491
491
  });
492
- }, T = rt((g) => {
493
- p(g.target.value.trim());
492
+ }, E = et((b) => {
493
+ p(b.target.value.trim());
494
494
  }, 500);
495
- return /* @__PURE__ */ e(ie, { open: t, onOpenChange: o, title: et, children: /* @__PURE__ */ i(B, { children: [
496
- /* @__PURE__ */ e("form", { autoComplete: "off", onSubmit: async (g) => {
497
- g.preventDefault();
495
+ return /* @__PURE__ */ e(ne, { open: t, onOpenChange: o, title: Ze, children: /* @__PURE__ */ i(H, { children: [
496
+ /* @__PURE__ */ e("form", { autoComplete: "off", onSubmit: async (b) => {
497
+ b.preventDefault();
498
498
  }, children: /* @__PURE__ */ e(
499
- be,
499
+ fe,
500
500
  {
501
501
  autoCapitalize: "off",
502
502
  autoComplete: "off",
@@ -507,11 +507,11 @@ const Pt = ({
507
507
  mode: "dark",
508
508
  name: "Search",
509
509
  label: "Search",
510
- onChange: T,
510
+ onChange: E,
511
511
  className: "mt-2 mb-2",
512
512
  ...s.searchString && {
513
513
  rightElement: /* @__PURE__ */ e(
514
- q,
514
+ j,
515
515
  {
516
516
  type: "button",
517
517
  disabled: !s.searchString,
@@ -520,8 +520,8 @@ const Pt = ({
520
520
  noBorder: !0,
521
521
  size: "small",
522
522
  onClick: () => {
523
- var g;
524
- p(""), (g = f.current) != null && g.value && (f.current.value = "", f.current.focus());
523
+ var b;
524
+ p(""), (b = f.current) != null && b.value && (f.current.value = "", f.current.focus());
525
525
  },
526
526
  children: "Reset"
527
527
  }
@@ -530,7 +530,7 @@ const Pt = ({
530
530
  }
531
531
  ) }),
532
532
  /* @__PURE__ */ e("div", { className: "flex flex-col gap-2 sm:flex-row max-h-[60vh] min-h-[60vh]", children: /* @__PURE__ */ e(
533
- Gt,
533
+ Ft,
534
534
  {
535
535
  mutate: h,
536
536
  filteredHistory: C,
@@ -539,70 +539,70 @@ const Pt = ({
539
539
  }
540
540
  ) })
541
541
  ] }) });
542
- }, jt = ({ stats: t }) => {
543
- const { isAuthenticated: o, user: n, registeringForPasskey: a, authenticationType: r } = F(), c = me(), s = me(), d = (n == null ? void 0 : n.username) || "";
544
- return o && d ? /* @__PURE__ */ i(B, { children: [
542
+ }, Gt = ({ stats: t }) => {
543
+ const { isAuthenticated: o, user: n, registeringForPasskey: a, authenticationType: r } = $(), c = ce(), s = ce(), d = (n == null ? void 0 : n.username) || "";
544
+ return o && d ? /* @__PURE__ */ i(H, { children: [
545
545
  /* @__PURE__ */ e(
546
- H,
546
+ P,
547
547
  {
548
- header: N.PREFERENCES.TITLE,
548
+ header: x.PREFERENCES.TITLE,
549
549
  className: "prose-dark dark:prose-lighter",
550
- children: de(c, {
551
- [N.PREFERENCES.NAME]: d,
552
- [N.PREFERENCES.EMAIL]: (n == null ? void 0 : n.email) || ""
550
+ children: se(c, {
551
+ [x.PREFERENCES.NAME]: d,
552
+ [x.PREFERENCES.EMAIL]: (n == null ? void 0 : n.email) || ""
553
553
  })
554
554
  }
555
555
  ),
556
- r !== at.PASSKEY && !nt() && /* @__PURE__ */ i(
557
- H,
556
+ r !== tt.PASSKEY && !rt() && /* @__PURE__ */ i(
557
+ P,
558
558
  {
559
559
  className: "prose-dark dark:prose-lighter mt-4",
560
- header: /* @__PURE__ */ e("h2", { className: "m-0", children: /* @__PURE__ */ i(Q, { columnGap: 3, alignVertical: "center", children: [
561
- /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(Ie, { size: "size-8" }) }),
562
- /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e("div", { children: N.PREFERENCES.PASSKEY_TITLE }) })
560
+ header: /* @__PURE__ */ e("h2", { className: "m-0", children: /* @__PURE__ */ i(K, { columnGap: 3, alignVertical: "center", children: [
561
+ /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(ve, { size: "size-8" }) }),
562
+ /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e("div", { children: x.PREFERENCES.PASSKEY_TITLE }) })
563
563
  ] }) }),
564
564
  children: [
565
- /* @__PURE__ */ e("p", { children: N.PREFERENCES.PASSKEY_INSTRUCTIONS }),
565
+ /* @__PURE__ */ e("p", { children: x.PREFERENCES.PASSKEY_INSTRUCTIONS }),
566
566
  /* @__PURE__ */ e(
567
- se,
567
+ te,
568
568
  {
569
569
  size: "small",
570
570
  className: "mt-2",
571
571
  onClick: a,
572
- labelLeft: N.PREFERENCES.PASSKEY_BUTTON,
573
- children: /* @__PURE__ */ e(Ie, { size: "size-5", monotone: !0 })
572
+ labelLeft: x.PREFERENCES.PASSKEY_BUTTON,
573
+ children: /* @__PURE__ */ e(ve, { size: "size-5", monotone: !0 })
574
574
  }
575
575
  )
576
576
  ]
577
577
  }
578
578
  ),
579
579
  /* @__PURE__ */ e(
580
- H,
580
+ P,
581
581
  {
582
- header: N.MAIN_STATISTICS.TITLE,
582
+ header: x.MAIN_STATISTICS.TITLE,
583
583
  className: "prose-dark dark:prose-lighter mt-4",
584
- children: de(s, {
585
- [ue(N.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
586
- [N.MAIN_STATISTICS.PROCESSING_TIME]: ot(
584
+ children: se(s, {
585
+ [le(x.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
586
+ [x.MAIN_STATISTICS.PROCESSING_TIME]: at(
587
587
  t.averageProcessingTimes
588
588
  )
589
589
  })
590
590
  }
591
591
  )
592
592
  ] }) : null;
593
- }, Kt = ({
593
+ }, Yt = ({
594
594
  open: t,
595
595
  onOpenChange: o
596
596
  }) => {
597
- const { getAccessToken: n, user: a } = F(), {
597
+ const { getAccessToken: n, user: a } = $(), {
598
598
  data: r,
599
599
  error: c,
600
600
  isLoading: s
601
- } = Nt({
601
+ } = Tt({
602
602
  keys: [a == null ? void 0 : a.username],
603
603
  getAccessToken: n
604
604
  });
605
- return c || s ? null : /* @__PURE__ */ e(ie, { open: t, onOpenChange: o, title: st, children: /* @__PURE__ */ e(jt, { stats: r }) });
605
+ return c || s ? null : /* @__PURE__ */ e(ne, { open: t, onOpenChange: o, title: nt, children: /* @__PURE__ */ e(Gt, { stats: r }) });
606
606
  };
607
607
  /*!
608
608
  @versini/ui-textarea v3.0.13
@@ -617,22 +617,22 @@ try {
617
617
  });
618
618
  } catch {
619
619
  }
620
- const De = "av-text-area", Wt = "av-text-area-wrapper", ye = "av-text-area-helper-text", Xt = "av-text-area__control--right", qt = "av-text-area__control--left";
621
- function Qt() {
622
- const t = S(!1);
623
- return U(() => (t.current = !0, () => {
620
+ const He = "av-text-area", jt = "av-text-area-wrapper", he = "av-text-area-helper-text", Kt = "av-text-area__control--right", Wt = "av-text-area__control--left";
621
+ function Xt() {
622
+ const t = v(!1);
623
+ return F(() => (t.current = !0, () => {
624
624
  t.current = !1;
625
- }), []), Be(() => t.current, []);
625
+ }), []), Oe(() => t.current, []);
626
626
  }
627
- function Zt(t) {
628
- return He(() => t.every((o) => o == null) ? () => {
627
+ function qt(t) {
628
+ return ze(() => t.every((o) => o == null) ? () => {
629
629
  } : (o) => {
630
630
  t.forEach((n) => {
631
631
  typeof n == "function" ? n(o) : n != null && (n.current = o);
632
632
  });
633
633
  }, t);
634
634
  }
635
- const Jt = {
635
+ const Qt = {
636
636
  x: 0,
637
637
  y: 0,
638
638
  width: 0,
@@ -642,18 +642,18 @@ const Jt = {
642
642
  bottom: 0,
643
643
  right: 0
644
644
  };
645
- function Re(t) {
646
- const o = Qt(), n = S(0), a = S(null), [r, c] = k(Jt), s = He(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
645
+ function Ie(t) {
646
+ const o = Xt(), n = v(0), a = v(null), [r, c] = k(Qt), s = ze(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
647
647
  const m = d[0];
648
648
  m && (cancelAnimationFrame(n.current), n.current = requestAnimationFrame(() => {
649
649
  a.current && o() && c(m.contentRect);
650
650
  }));
651
651
  }), [o]);
652
- return U(() => (a.current && (s == null || s.observe(a.current, t)), () => {
652
+ return F(() => (a.current && (s == null || s.observe(a.current, t)), () => {
653
653
  s == null || s.disconnect(), n.current && cancelAnimationFrame(n.current);
654
654
  }), [s, t]), [a, r];
655
655
  }
656
- function er({
656
+ function Zt({
657
657
  value: t,
658
658
  defaultValue: o,
659
659
  finalValue: n,
@@ -666,14 +666,14 @@ function er({
666
666
  ), h = (f) => {
667
667
  m(f), a == null || a(f);
668
668
  };
669
- return U(() => {
669
+ return F(() => {
670
670
  (async () => t !== void 0 && !c && r > 0 && (await new Promise(
671
671
  (f) => setTimeout(f, r)
672
672
  ), s(!0)))();
673
673
  }, [t, r, c]), t !== void 0 ? !c && r > 0 ? ["", a, !0] : [t, a, !0] : [d, h, !1];
674
674
  }
675
- function tr(t) {
676
- const o = Rt();
675
+ function Jt(t) {
676
+ const o = It();
677
677
  if (!t)
678
678
  return o;
679
679
  if (typeof t == "number" || typeof t == "string")
@@ -683,7 +683,7 @@ function tr(t) {
683
683
  return typeof n == "number" || typeof n == "string" ? `${a}${n}` : `${a}${o}`;
684
684
  }
685
685
  }
686
- const Ve = "SET_ANNOUNCEMENT", $e = "CLEAR_ANNOUNCEMENT", rr = {
686
+ const Be = "SET_ANNOUNCEMENT", De = "CLEAR_ANNOUNCEMENT", er = {
687
687
  alert: null,
688
688
  alertdialog: null,
689
689
  log: "polite",
@@ -691,14 +691,14 @@ const Ve = "SET_ANNOUNCEMENT", $e = "CLEAR_ANNOUNCEMENT", rr = {
691
691
  progressbar: null,
692
692
  status: "polite",
693
693
  timer: "assertive"
694
- }, ar = (t, o) => {
694
+ }, tr = (t, o) => {
695
695
  switch (o == null ? void 0 : o.type) {
696
- case Ve:
696
+ case Be:
697
697
  return {
698
698
  ...t,
699
699
  announcement: o.payload
700
700
  };
701
- case $e:
701
+ case De:
702
702
  return {
703
703
  ...t,
704
704
  announcement: null
@@ -706,14 +706,14 @@ const Ve = "SET_ANNOUNCEMENT", $e = "CLEAR_ANNOUNCEMENT", rr = {
706
706
  default:
707
707
  return t;
708
708
  }
709
- }, nr = ({
709
+ }, rr = ({
710
710
  onAnnouncementClear: t,
711
711
  dispatch: o
712
712
  }) => {
713
713
  o({
714
- type: $e
714
+ type: De
715
715
  }), typeof t == "function" && t();
716
- }, Le = ({
716
+ }, _e = ({
717
717
  children: t,
718
718
  clearAnnouncementDelay: o,
719
719
  clearAnnouncementTimeoutRef: n,
@@ -721,16 +721,16 @@ const Ve = "SET_ANNOUNCEMENT", $e = "CLEAR_ANNOUNCEMENT", rr = {
721
721
  dispatch: r
722
722
  }) => {
723
723
  clearTimeout(n.current), t !== null && r({
724
- type: Ve,
724
+ type: Be,
725
725
  payload: t
726
726
  }), o && (n.current = setTimeout(
727
- () => nr({
727
+ () => rr({
728
728
  onAnnouncementClear: a,
729
729
  dispatch: r
730
730
  }),
731
731
  o
732
732
  ));
733
- }, or = ({
733
+ }, ar = ({
734
734
  children: t,
735
735
  announcementTimeoutRef: o,
736
736
  announcementDelay: n,
@@ -739,13 +739,13 @@ const Ve = "SET_ANNOUNCEMENT", $e = "CLEAR_ANNOUNCEMENT", rr = {
739
739
  onAnnouncementClear: c,
740
740
  dispatch: s
741
741
  }) => {
742
- clearTimeout(o.current), n ? o.current = setTimeout(Le, n, {
742
+ clearTimeout(o.current), n ? o.current = setTimeout(_e, n, {
743
743
  children: t,
744
744
  clearAnnouncementDelay: a,
745
745
  clearAnnouncementTimeoutRef: r,
746
746
  onAnnouncementClear: c,
747
747
  dispatch: s
748
- }) : Le({
748
+ }) : _e({
749
749
  children: t,
750
750
  clearAnnouncementDelay: a,
751
751
  clearAnnouncementTimeoutRef: r,
@@ -753,7 +753,7 @@ const Ve = "SET_ANNOUNCEMENT", $e = "CLEAR_ANNOUNCEMENT", rr = {
753
753
  dispatch: s
754
754
  });
755
755
  };
756
- function sr({
756
+ function nr({
757
757
  children: t,
758
758
  className: o,
759
759
  politeness: n,
@@ -764,12 +764,12 @@ function sr({
764
764
  visible: d,
765
765
  ...m
766
766
  }) {
767
- const h = S(null), f = S(null), [b, C] = Lt(ar, {
767
+ const h = v(null), f = v(null), [y, C] = _t(tr, {
768
768
  announcement: null
769
769
  });
770
770
  let l = n;
771
- typeof l > "u" && (l = a ? rr[a] : "assertive"), U(() => {
772
- or({
771
+ typeof l > "u" && (l = a ? er[a] : "assertive"), F(() => {
772
+ ar({
773
773
  announcementTimeoutRef: h,
774
774
  announcementDelay: r,
775
775
  children: t,
@@ -784,7 +784,7 @@ function sr({
784
784
  c,
785
785
  s
786
786
  ]);
787
- const p = y(o, {
787
+ const p = g(o, {
788
788
  "sr-only": !d
789
789
  });
790
790
  return /* @__PURE__ */ e(
@@ -794,7 +794,7 @@ function sr({
794
794
  ...a && { role: a },
795
795
  className: p,
796
796
  ...m,
797
- children: b.announcement
797
+ children: y.announcement
798
798
  }
799
799
  );
800
800
  }
@@ -811,27 +811,27 @@ try {
811
811
  });
812
812
  } catch {
813
813
  }
814
- const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", cr = ({ mode: t }) => y({
814
+ const or = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", sr = ({ mode: t }) => g({
815
815
  "bg-surface-darker text-copy-lighter caret-copy-light": t === "dark",
816
816
  "bg-surface-lighter text-copy-dark caret-copy-dark": t === "light",
817
817
  "bg-surface-lighter text-copy-dark caret-copy-dark dark:bg-surface-darker dark:text-copy-lighter dark:caret-copy-light": t === "system",
818
818
  "bg-surface-darker text-copy-lighter caret-copy-light dark:bg-surface-lighter dark:text-copy-dark dark:caret-copy-dark": t === "alt-system"
819
- }), ir = ({
819
+ }), lr = ({
820
820
  focusMode: t
821
- }) => y("focus:outline focus:outline-2 focus:outline-offset-2", {
821
+ }) => g("focus:outline focus:outline-2 focus:outline-offset-2", {
822
822
  "focus:outline-focus-dark": t === "dark",
823
823
  "focus:outline-focus-light": t === "light",
824
824
  "focus:outline-focus-light dark:focus:outline-focus-dark": t === "alt-system",
825
825
  "focus:outline-focus-dark dark:focus:outline-focus-light": t === "system"
826
- }), dr = ({
826
+ }), cr = ({
827
827
  noBorder: t,
828
828
  error: o
829
- }) => y("border-2", {
829
+ }) => g("border-2", {
830
830
  "border-border-dark": !t && !o,
831
831
  "focus:border-border-dark": !t && o,
832
832
  "border-border-error-dark": !t && o,
833
833
  "border-transparent": t
834
- }), ur = ({
834
+ }), ir = ({
835
835
  disabled: t,
836
836
  raw: o,
837
837
  error: n,
@@ -842,14 +842,14 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
842
842
  if (o)
843
843
  return "";
844
844
  if (t)
845
- return y(
845
+ return g(
846
846
  "transform translate-y-0 scale-100 absolute px-2 cursor-not-allowed opacity-50 font-medium",
847
847
  {
848
848
  "translate-x-[12px]": c === !0 && !r || !c && !r
849
849
  }
850
850
  );
851
851
  if (!n)
852
- return y(
852
+ return g(
853
853
  "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
854
854
  {
855
855
  "translate-x-[12px]": c === !0 && !r || !c && !r,
@@ -860,7 +860,7 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
860
860
  }
861
861
  );
862
862
  if (n)
863
- return y(
863
+ return g(
864
864
  "absolute px-2 cursor-text font-medium transform translate-y-0 scale-100",
865
865
  {
866
866
  "translate-x-[12px]": c === !0 && !r || !c && !r,
@@ -870,7 +870,7 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
870
870
  "text-copy-medium dark:text-copy-error-dark": a === "alt-system"
871
871
  }
872
872
  );
873
- }, mr = ({
873
+ }, dr = ({
874
874
  error: t,
875
875
  raw: o,
876
876
  mode: n,
@@ -879,25 +879,25 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
879
879
  if (o)
880
880
  return "";
881
881
  if (a)
882
- return y(
883
- ye,
882
+ return g(
883
+ he,
884
884
  "absolute px-2 cursor-not-allowed opacity-50 font-medium"
885
885
  );
886
886
  if (!t)
887
- return y(ye, "absolute px-2 font-medium", {
887
+ return g(he, "absolute px-2 font-medium", {
888
888
  "text-copy-medium": n === "dark",
889
889
  "text-copy-dark": n === "light",
890
890
  "text-copy-dark dark:text-copy-medium": n === "system",
891
891
  "text-copy-medium dark:text-copy-dark": n === "alt-system"
892
892
  });
893
893
  if (t)
894
- return y(ye, "absolute px-2 font-medium", {
894
+ return g(he, "absolute px-2 font-medium", {
895
895
  "text-copy-error-light": n === "dark",
896
896
  "text-copy-error-dark": n === "light",
897
897
  "text-copy-error-dark dark:text-copy-error-light": n === "system",
898
898
  "dark:text-copy-error-dark text-copy-error-light": n === "alt-system"
899
899
  });
900
- }, hr = ({
900
+ }, ur = ({
901
901
  className: t,
902
902
  textAreaClassName: o,
903
903
  raw: n,
@@ -909,46 +909,46 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
909
909
  leftElement: m,
910
910
  rightElement: h
911
911
  }) => {
912
- const f = n ? t : y(
912
+ const f = n ? t : g(
913
913
  "relative flex w-full flex-col justify-center",
914
- Wt,
914
+ jt,
915
915
  t
916
- ), b = n ? y(o) : y(
917
- De,
916
+ ), y = n ? g(o) : g(
917
+ He,
918
918
  o,
919
- lr(),
920
- cr({ mode: d }),
921
- ir({ focusMode: a }),
922
- dr({
919
+ or(),
920
+ sr({ mode: d }),
921
+ lr({ focusMode: a }),
922
+ cr({
923
923
  noBorder: c,
924
924
  error: s
925
925
  }),
926
926
  {
927
927
  "disabled:cursor-not-allowed disabled:opacity-50": r
928
928
  }
929
- ), C = n ? void 0 : "sr-only", l = ur({
929
+ ), C = n ? void 0 : "sr-only", l = ir({
930
930
  disabled: r,
931
931
  raw: n,
932
932
  error: s,
933
933
  mode: d,
934
934
  rightElement: h,
935
935
  leftElement: m
936
- }), p = mr({
936
+ }), p = dr({
937
937
  error: s,
938
938
  raw: n,
939
939
  mode: d,
940
940
  disabled: r
941
- }), T = n ? void 0 : y(Xt, "absolute"), E = n ? void 0 : y(qt, "absolute");
941
+ }), E = n ? void 0 : g(Kt, "absolute"), N = n ? void 0 : g(Wt, "absolute");
942
942
  return {
943
943
  wrapper: f,
944
- textArea: b,
944
+ textArea: y,
945
945
  accessibleLabel: C,
946
946
  visibleLabel: l,
947
947
  helperText: p,
948
- rightElement: T,
949
- leftElement: E
948
+ rightElement: E,
949
+ leftElement: N
950
950
  };
951
- }, fr = ({
951
+ }, mr = ({
952
952
  scrollHeight: t,
953
953
  currentHeight: o,
954
954
  currentLabelOffset: n = 0,
@@ -964,7 +964,7 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
964
964
  helperTextOffset: c,
965
965
  scrollHeight: t
966
966
  };
967
- }, xe = It.forwardRef(
967
+ }, pe = vt.forwardRef(
968
968
  ({
969
969
  id: t,
970
970
  name: o,
@@ -977,161 +977,161 @@ const lr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
977
977
  focusMode: m = "system",
978
978
  value: h,
979
979
  defaultValue: f,
980
- disabled: b = !1,
980
+ disabled: y = !1,
981
981
  noBorder: C = !1,
982
982
  labelId: l,
983
983
  helperText: p = "",
984
- helperTextOnFocus: T = !1,
985
- rightElement: E,
986
- leftElement: g,
987
- onChange: R,
984
+ helperTextOnFocus: E = !1,
985
+ rightElement: N,
986
+ leftElement: b,
987
+ onChange: _,
988
988
  onFocus: I,
989
989
  onBlur: u,
990
990
  ...w
991
- }, M) => {
992
- var D;
993
- const v = S(null), z = Zt([M, v]), [x, _] = Re(), [Z, G] = Re(), W = S(80), Y = S(-25), L = S(null), J = S(30), ee = S(null), j = tr({ id: t, prefix: `${De}-` }), [Te, Fe] = k(0), [Ee, Ue] = k(0), [Ge, Ne] = k(
994
- !!(!T && p)
995
- ), Ye = `${o} error, ${p}`, K = hr({
991
+ }, O) => {
992
+ var U;
993
+ const S = v(null), T = qt([O, S]), [W, G] = Ie(), [xe, z] = Ie(), B = v(80), X = v(-25), R = v(null), oe = v(30), q = v(null), Q = Jt({ id: t, prefix: `${He}-` }), [ke, Ve] = k(0), [Ce, $e] = k(0), [Fe, Te] = k(
994
+ !!(!E && p)
995
+ ), Ue = `${o} error, ${p}`, Y = ur({
996
996
  className: c,
997
997
  textAreaClassName: s,
998
998
  error: a,
999
999
  raw: r,
1000
1000
  focusMode: m,
1001
- disabled: b,
1001
+ disabled: y,
1002
1002
  noBorder: C,
1003
1003
  mode: d,
1004
- rightElement: !!E,
1005
- leftElement: !!g
1006
- }), [V, je] = er({
1004
+ rightElement: !!N,
1005
+ leftElement: !!b
1006
+ }), [D, Ge] = Zt({
1007
1007
  value: h,
1008
1008
  initialControlledDelay: 20,
1009
1009
  defaultValue: f,
1010
1010
  onChange: (A) => {
1011
- R && R({
1011
+ _ && _({
1012
1012
  target: {
1013
1013
  value: A
1014
1014
  }
1015
1015
  });
1016
1016
  }
1017
- }), Ke = (A) => {
1018
- je(A.target.value);
1019
- }, We = (A) => {
1020
- T && p && Ne(!0), I && I(A);
1021
- }, Xe = (A) => {
1022
- T && p && !V && Ne(!1), u && u(A);
1017
+ }), Ye = (A) => {
1018
+ Ge(A.target.value);
1019
+ }, je = (A) => {
1020
+ E && p && Te(!0), I && I(A);
1021
+ }, Ke = (A) => {
1022
+ E && p && !D && Te(!1), u && u(A);
1023
1023
  };
1024
- return ne(() => {
1025
- _ && _.width && Fe(_.width + 18 + 10);
1026
- }, [_]), ne(() => {
1027
- G && G.width && Ue(G.width + 18 + 10);
1028
- }, [G]), ne(() => {
1029
- r || v && v.current && V !== void 0 && (v.current.style.height = "inherit", v.current.style.height = v.current.scrollHeight + "px");
1030
- }, [V, r]), ne(() => {
1024
+ return ee(() => {
1025
+ G && G.width && Ve(G.width + 18 + 10);
1026
+ }, [G]), ee(() => {
1027
+ z && z.width && $e(z.width + 18 + 10);
1028
+ }, [z]), ee(() => {
1029
+ r || S && S.current && D !== void 0 && (S.current.style.height = "inherit", S.current.style.height = S.current.scrollHeight + "px");
1030
+ }, [D, r]), ee(() => {
1031
1031
  r || setTimeout(() => {
1032
1032
  var A;
1033
- (A = L == null ? void 0 : L.current) == null || A.style.setProperty(
1033
+ (A = R == null ? void 0 : R.current) == null || A.style.setProperty(
1034
1034
  "--av-text-area-wrapper-transition",
1035
- V ? "none" : "all 0.2s ease-out"
1035
+ D ? "none" : "all 0.2s ease-out"
1036
1036
  );
1037
1037
  }, 0);
1038
- }, [V, r]), ne(() => {
1039
- var A, we;
1040
- if (!r && v && v.current && V !== void 0) {
1041
- const { labelOffset: fe, helperTextOffset: pe, scrollHeight: qe } = fr({
1042
- scrollHeight: v.current.scrollHeight,
1043
- currentHeight: W.current,
1044
- currentLabelOffset: Y.current,
1045
- currentHelperTextOffset: J.current
1038
+ }, [D, r]), ee(() => {
1039
+ var A, Ee;
1040
+ if (!r && S && S.current && D !== void 0) {
1041
+ const { labelOffset: de, helperTextOffset: ue, scrollHeight: We } = mr({
1042
+ scrollHeight: S.current.scrollHeight,
1043
+ currentHeight: B.current,
1044
+ currentLabelOffset: X.current,
1045
+ currentHelperTextOffset: oe.current
1046
1046
  });
1047
- fe && (Y.current = fe, (A = L == null ? void 0 : L.current) == null || A.style.setProperty(
1047
+ de && (X.current = de, (A = R == null ? void 0 : R.current) == null || A.style.setProperty(
1048
1048
  "--av-text-area-label",
1049
- `${fe}px`
1050
- )), pe && (J.current = pe, (we = ee == null ? void 0 : ee.current) == null || we.style.setProperty(
1049
+ `${de}px`
1050
+ )), ue && (oe.current = ue, (Ee = q == null ? void 0 : q.current) == null || Ee.style.setProperty(
1051
1051
  "--av-text-area-helper-text",
1052
- `${pe}px`
1053
- )), W.current = qe || W.current;
1052
+ `${ue}px`
1053
+ )), B.current = We || B.current;
1054
1054
  }
1055
- }, [V, r]), G.width > 0 && ((D = L == null ? void 0 : L.current) == null || D.style.setProperty(
1055
+ }, [D, r]), z.width > 0 && ((U = R == null ? void 0 : R.current) == null || U.style.setProperty(
1056
1056
  "--tw-translate-x",
1057
- `${12 + G.width + 5}px`
1058
- )), /* @__PURE__ */ i("div", { className: K.wrapper, children: [
1057
+ `${12 + z.width + 5}px`
1058
+ )), /* @__PURE__ */ i("div", { className: Y.wrapper, children: [
1059
1059
  /* @__PURE__ */ e(
1060
1060
  "label",
1061
1061
  {
1062
- htmlFor: j,
1062
+ htmlFor: Q,
1063
1063
  id: l,
1064
- className: K.accessibleLabel,
1064
+ className: Y.accessibleLabel,
1065
1065
  children: n
1066
1066
  }
1067
1067
  ),
1068
- g && /* @__PURE__ */ e(
1068
+ b && /* @__PURE__ */ e(
1069
1069
  "div",
1070
1070
  {
1071
- ref: Z,
1072
- className: K.leftElement,
1073
- children: g
1071
+ ref: xe,
1072
+ className: Y.leftElement,
1073
+ children: b
1074
1074
  }
1075
1075
  ),
1076
1076
  /* @__PURE__ */ e(
1077
1077
  "textarea",
1078
1078
  {
1079
- ref: z,
1080
- id: j,
1079
+ ref: T,
1080
+ id: Q,
1081
1081
  name: o,
1082
- disabled: b,
1082
+ disabled: y,
1083
1083
  placeholder: r ? void 0 : " ",
1084
- className: K.textArea,
1084
+ className: Y.textArea,
1085
1085
  rows: 1,
1086
- ...p && { "aria-describedby": `${j}-helper` },
1086
+ ...p && { "aria-describedby": `${Q}-helper` },
1087
1087
  ...a && { "aria-invalid": "true" },
1088
- ...E && !g && !r && { style: { paddingRight: Te } },
1089
- ...g && !E && !r && { style: { paddingLeft: Ee } },
1090
- ...E && g && !r && {
1088
+ ...N && !b && !r && { style: { paddingRight: ke } },
1089
+ ...b && !N && !r && { style: { paddingLeft: Ce } },
1090
+ ...N && b && !r && {
1091
1091
  style: {
1092
- paddingRight: Te,
1093
- paddingLeft: Ee
1092
+ paddingRight: ke,
1093
+ paddingLeft: Ce
1094
1094
  }
1095
1095
  },
1096
- value: V,
1097
- onChange: Ke,
1098
- onFocus: We,
1099
- onBlur: Xe,
1096
+ value: D,
1097
+ onChange: Ye,
1098
+ onFocus: je,
1099
+ onBlur: Ke,
1100
1100
  ...w
1101
1101
  }
1102
1102
  ),
1103
1103
  !r && /* @__PURE__ */ e(
1104
1104
  "label",
1105
1105
  {
1106
- ref: L,
1106
+ ref: R,
1107
1107
  "aria-hidden": !0,
1108
- htmlFor: j,
1109
- className: `${K.visibleLabel}`,
1108
+ htmlFor: Q,
1109
+ className: `${Y.visibleLabel}`,
1110
1110
  children: n
1111
1111
  }
1112
1112
  ),
1113
- Ge && /* @__PURE__ */ e(
1113
+ Fe && /* @__PURE__ */ e(
1114
1114
  "div",
1115
1115
  {
1116
- ref: ee,
1117
- id: `${j}-helper`,
1118
- className: K.helperText,
1116
+ ref: q,
1117
+ id: `${Q}-helper`,
1118
+ className: Y.helperText,
1119
1119
  children: p
1120
1120
  }
1121
1121
  ),
1122
- E && /* @__PURE__ */ e(
1122
+ N && /* @__PURE__ */ e(
1123
1123
  "div",
1124
1124
  {
1125
- ref: x,
1126
- className: K.rightElement,
1127
- children: E
1125
+ ref: W,
1126
+ className: Y.rightElement,
1127
+ children: N
1128
1128
  }
1129
1129
  ),
1130
- a && p && /* @__PURE__ */ e(sr, { politeness: "polite", clearAnnouncementDelay: 500, children: Ye })
1130
+ a && p && /* @__PURE__ */ e(nr, { politeness: "polite", clearAnnouncementDelay: 500, children: Ue })
1131
1131
  ] });
1132
1132
  }
1133
1133
  );
1134
- xe.displayName = "TextArea";
1134
+ pe.displayName = "TextArea";
1135
1135
  /*!
1136
1136
  @versini/ui-toggle v3.0.9
1137
1137
  © 2025 gizmette.com
@@ -1145,9 +1145,9 @@ try {
1145
1145
  });
1146
1146
  } catch {
1147
1147
  }
1148
- const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr = ({
1148
+ const hr = "av-toggle", fr = () => g("peer", "h-6", "w-11", "rounded-full"), pr = ({
1149
1149
  focusMode: t
1150
- }) => y(
1150
+ }) => g(
1151
1151
  "peer-focus:outline",
1152
1152
  "peer-focus:outline-2",
1153
1153
  "peer-focus:outline-offset-2",
@@ -1157,14 +1157,14 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1157
1157
  "peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": t === "alt-system",
1158
1158
  "peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": t === "system"
1159
1159
  }
1160
- ), br = () => y(
1160
+ ), gr = () => g(
1161
1161
  "peer-checked:after:translate-x-full",
1162
1162
  // background color when checked
1163
1163
  "peer-checked:bg-violet-500",
1164
1164
  // knob circle and border color when checked
1165
1165
  "peer-checked:after:bg-white",
1166
1166
  "peer-checked:after:border-white"
1167
- ), xr = () => y(
1167
+ ), yr = () => g(
1168
1168
  "after:left-[2px]",
1169
1169
  "after:top-[2px]",
1170
1170
  "after:border",
@@ -1176,45 +1176,45 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1176
1176
  "after:rounded-full",
1177
1177
  "after:transition-all",
1178
1178
  "after:content-['']"
1179
- ), kr = ({
1179
+ ), br = ({
1180
1180
  mode: t,
1181
1181
  noBorder: o
1182
- }) => y({
1182
+ }) => g({
1183
1183
  border: !o,
1184
1184
  "border-border-dark bg-surface-medium": t === "light",
1185
1185
  "border-border-light bg-surface-darker": t === "dark",
1186
1186
  "border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": t === "alt-system",
1187
1187
  "border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": t === "system"
1188
- }), Cr = ({
1188
+ }), xr = ({
1189
1189
  mode: t,
1190
1190
  labelHidden: o
1191
- }) => o ? "sr-only" : y("ml-2 text-sm", {
1191
+ }) => o ? "sr-only" : g("ml-2 text-sm", {
1192
1192
  "text-copy-dark": t === "light",
1193
1193
  "text-copy-lighter": t === "dark",
1194
1194
  "text-copy-lighter dark:text-copy-dark": t === "alt-system",
1195
1195
  "text-copy-dark dark:text-copy-lighter": t === "system"
1196
- }), Tr = ({ className: t }) => y(
1197
- pr,
1196
+ }), kr = ({ className: t }) => g(
1197
+ hr,
1198
1198
  "relative flex cursor-pointer items-center",
1199
1199
  t
1200
- ), Er = ({
1200
+ ), Cr = ({
1201
1201
  mode: t,
1202
1202
  focusMode: o,
1203
1203
  labelHidden: n,
1204
1204
  className: a,
1205
1205
  noBorder: r
1206
1206
  }) => ({
1207
- toggle: y(
1208
- gr(),
1209
- kr({ mode: t, noBorder: r }),
1210
- yr({ focusMode: o }),
1211
- xr(),
1212
- br()
1207
+ toggle: g(
1208
+ fr(),
1209
+ br({ mode: t, noBorder: r }),
1210
+ pr({ focusMode: o }),
1211
+ yr(),
1212
+ gr()
1213
1213
  ),
1214
- label: Cr({ mode: t, labelHidden: n }),
1214
+ label: xr({ mode: t, labelHidden: n }),
1215
1215
  input: "peer sr-only",
1216
- wrapper: Tr({ className: a })
1217
- }), oe = ({
1216
+ wrapper: kr({ className: a })
1217
+ }), ge = ({
1218
1218
  checked: t = !1,
1219
1219
  onChange: o,
1220
1220
  label: n,
@@ -1225,14 +1225,14 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1225
1225
  className: d,
1226
1226
  noBorder: m = !1
1227
1227
  }) => {
1228
- const h = Er({
1228
+ const h = Cr({
1229
1229
  mode: c,
1230
1230
  focusMode: s,
1231
1231
  labelHidden: a,
1232
1232
  className: d,
1233
1233
  noBorder: m
1234
- }), f = (b) => {
1235
- o == null || o(b.target.checked);
1234
+ }), f = (y) => {
1235
+ o == null || o(y.target.checked);
1236
1236
  };
1237
1237
  return /* @__PURE__ */ i("label", { className: h.wrapper, children: [
1238
1238
  /* @__PURE__ */ e(
@@ -1248,16 +1248,16 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1248
1248
  /* @__PURE__ */ e("div", { className: h.toggle }),
1249
1249
  /* @__PURE__ */ e("span", { className: h.label, children: n })
1250
1250
  ] });
1251
- }, Nr = ({
1251
+ }, Tr = ({
1252
1252
  open: t,
1253
1253
  onOpenChange: o
1254
1254
  }) => {
1255
- const { getAccessToken: n, user: a } = F(), {
1255
+ const { getAccessToken: n, user: a } = $(), {
1256
1256
  data: r,
1257
1257
  error: c,
1258
1258
  isLoading: s,
1259
1259
  mutate: d
1260
- } = ze({
1260
+ } = Me({
1261
1261
  keys: [a == null ? void 0 : a.username],
1262
1262
  getAccessToken: n,
1263
1263
  isPaused: !0
@@ -1266,32 +1266,32 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1266
1266
  }), f = ({
1267
1267
  slot: l,
1268
1268
  checked: p,
1269
- label: T,
1270
- content: E,
1271
- privateChat: g = !1
1269
+ label: E,
1270
+ content: N,
1271
+ privateChat: b = !1
1272
1272
  }) => {
1273
- h((R) => {
1274
- const I = R.prompts, u = {
1273
+ h((_) => {
1274
+ const I = _.prompts, u = {
1275
1275
  slot: l,
1276
- label: T,
1277
- content: E,
1276
+ label: E,
1277
+ content: N,
1278
1278
  enabled: p,
1279
- privateChat: g
1280
- }, w = I.findIndex((M) => M.slot === l);
1279
+ privateChat: b
1280
+ }, w = I.findIndex((O) => O.slot === l);
1281
1281
  return w === -1 ? {
1282
- ...R,
1282
+ ..._,
1283
1283
  prompts: [...I, { ...u, slot: l }]
1284
1284
  } : (I[w] = u, {
1285
- ...R,
1285
+ ..._,
1286
1286
  prompts: [...I]
1287
1287
  });
1288
1288
  });
1289
- }, b = async (l) => {
1289
+ }, y = async (l) => {
1290
1290
  l.preventDefault();
1291
1291
  try {
1292
- await le({
1292
+ await re({
1293
1293
  accessToken: await n(),
1294
- type: ce.SET_USER_PREFERENCES,
1294
+ type: ae.SET_USER_PREFERENCES,
1295
1295
  params: {
1296
1296
  user: a == null ? void 0 : a.username,
1297
1297
  tags: m.prompts
@@ -1302,23 +1302,23 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1302
1302
  }, C = () => {
1303
1303
  d({ ...r }), o(!1);
1304
1304
  };
1305
- return U(() => {
1305
+ return F(() => {
1306
1306
  r != null && r.tags && h({ prompts: r.tags });
1307
1307
  }, [r]), c || s ? null : /* @__PURE__ */ i(
1308
- ie,
1308
+ ne,
1309
1309
  {
1310
1310
  open: t,
1311
1311
  onOpenChange: C,
1312
1312
  title: "Prompts",
1313
1313
  footer: /* @__PURE__ */ i(
1314
- Q,
1314
+ K,
1315
1315
  {
1316
1316
  columnGap: 2,
1317
1317
  alignHorizontal: "flex-end",
1318
1318
  className: "pb-8 sm:pb-0",
1319
1319
  children: [
1320
- /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
1321
- q,
1320
+ /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(
1321
+ j,
1322
1322
  {
1323
1323
  mode: "dark",
1324
1324
  variant: "secondary",
@@ -1327,14 +1327,14 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1327
1327
  children: "Cancel"
1328
1328
  }
1329
1329
  ) }),
1330
- /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
1331
- q,
1330
+ /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(
1331
+ j,
1332
1332
  {
1333
1333
  mode: "dark",
1334
1334
  variant: "danger",
1335
1335
  focusMode: "light",
1336
1336
  onClick: async (l) => {
1337
- o(!1), await b(l);
1337
+ o(!1), await y(l);
1338
1338
  },
1339
1339
  children: "Save"
1340
1340
  }
@@ -1343,16 +1343,16 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1343
1343
  }
1344
1344
  ),
1345
1345
  children: [
1346
- /* @__PURE__ */ e("p", { children: lt }),
1346
+ /* @__PURE__ */ e("p", { children: ot }),
1347
1347
  m.prompts && m.prompts.map((l) => /* @__PURE__ */ i(
1348
- H,
1348
+ P,
1349
1349
  {
1350
1350
  header: `Prompt ${l.slot + 1}`,
1351
1351
  className: "prose-dark dark:prose-lighter mb-2",
1352
1352
  children: [
1353
- /* @__PURE__ */ i(Q, { className: "mt-8 mb-6", columnGap: 2, rowGap: 6, children: [
1354
- /* @__PURE__ */ e(O, { span: 12, children: /* @__PURE__ */ e(
1355
- be,
1353
+ /* @__PURE__ */ i(K, { className: "mt-8 mb-6", columnGap: 2, rowGap: 6, children: [
1354
+ /* @__PURE__ */ e(M, { span: 12, children: /* @__PURE__ */ e(
1355
+ fe,
1356
1356
  {
1357
1357
  label: "Label",
1358
1358
  name: `prompt${l.slot}-label`,
@@ -1367,8 +1367,8 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1367
1367
  }
1368
1368
  }
1369
1369
  ) }),
1370
- /* @__PURE__ */ e(O, { span: 12, children: /* @__PURE__ */ e(
1371
- be,
1370
+ /* @__PURE__ */ e(M, { span: 12, children: /* @__PURE__ */ e(
1371
+ fe,
1372
1372
  {
1373
1373
  label: "Content",
1374
1374
  name: `prompt${l.slot}-content`,
@@ -1385,7 +1385,7 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1385
1385
  ) })
1386
1386
  ] }),
1387
1387
  /* @__PURE__ */ e(
1388
- oe,
1388
+ ge,
1389
1389
  {
1390
1390
  className: "mt-2",
1391
1391
  noBorder: !0,
@@ -1403,7 +1403,7 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1403
1403
  }
1404
1404
  ),
1405
1405
  /* @__PURE__ */ e(
1406
- oe,
1406
+ ge,
1407
1407
  {
1408
1408
  className: "mt-2",
1409
1409
  noBorder: !0,
@@ -1428,106 +1428,104 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1428
1428
  ]
1429
1429
  }
1430
1430
  );
1431
- }, wr = ({
1431
+ }, Er = ({
1432
1432
  open: t,
1433
1433
  onOpenChange: o
1434
1434
  }) => {
1435
- const { getAccessToken: n, user: a } = F(), {
1435
+ const { getAccessToken: n, user: a } = $(), {
1436
1436
  data: r,
1437
1437
  error: c,
1438
1438
  isLoading: s,
1439
1439
  mutate: d
1440
- } = ze({
1440
+ } = Me({
1441
1441
  keys: [a == null ? void 0 : a.username],
1442
1442
  getAccessToken: n
1443
- }), [m, h] = k(!1), [f, b] = k({
1443
+ }), [m, h] = k(!1), [f, y] = k({
1444
1444
  loadingLocation: !1
1445
- }), [C, l] = k(""), [p, T] = k(""), [E, g] = k(ct), [R, I] = Ce({
1446
- key: ke + it,
1445
+ }), [C, l] = k(""), [p, E] = k(""), [N, b] = k(st), [_, I] = be({
1446
+ key: ye + lt,
1447
1447
  initialValue: !1
1448
- }), u = (x) => {
1449
- I(x);
1450
- }, w = async (x) => {
1451
- x.preventDefault();
1448
+ }), u = (T) => {
1449
+ I(T);
1450
+ }, w = async (T) => {
1451
+ T.preventDefault();
1452
1452
  try {
1453
- await le({
1453
+ await re({
1454
1454
  accessToken: await n(),
1455
- type: ce.SET_USER_PREFERENCES,
1455
+ type: ae.SET_USER_PREFERENCES,
1456
1456
  params: {
1457
1457
  user: a == null ? void 0 : a.username,
1458
1458
  instructions: C,
1459
1459
  location: p,
1460
- provider: E
1460
+ provider: N
1461
1461
  }
1462
- }), d(), b({
1462
+ }), d(), y({
1463
1463
  loadingLocation: !1
1464
1464
  });
1465
1465
  } catch {
1466
1466
  }
1467
- }, M = async () => {
1468
- b({
1467
+ }, O = async () => {
1468
+ y({
1469
1469
  loadingLocation: !0
1470
- }), T("...");
1470
+ }), E("...");
1471
1471
  try {
1472
- const x = Date.now(), _ = await mt(), Z = await le({
1472
+ const T = Date.now(), W = await dt(), G = await re({
1473
1473
  accessToken: await n(),
1474
- type: ce.GET_LOCATION,
1474
+ type: ae.GET_LOCATION,
1475
1475
  params: {
1476
- latitude: _.latitude,
1477
- longitude: _.longitude
1476
+ latitude: W.latitude,
1477
+ longitude: W.longitude
1478
1478
  }
1479
- }), W = Date.now() - x;
1480
- if (W < 2e3 && await new Promise((Y) => setTimeout(Y, 2e3 - W)), Z.status === 200) {
1481
- const { city: Y, state: L, country: J, displayName: ee } = Z.data, j = Y && L && J ? `${Y}, ${L}, ${J}` : ee;
1482
- b({
1479
+ }), z = Date.now() - T;
1480
+ if (z < 2e3 && await new Promise((B) => setTimeout(B, 2e3 - z)), G.status === 200) {
1481
+ const { city: B, state: X, country: R, displayName: oe } = G.data, q = B && X && R ? `${B}, ${X}, ${R}` : oe;
1482
+ y({
1483
1483
  loadingLocation: !1
1484
- }), T(j);
1484
+ }), E(q);
1485
1485
  } else
1486
- b({
1486
+ y({
1487
1487
  loadingLocation: !1
1488
1488
  });
1489
1489
  } catch {
1490
1490
  }
1491
- }, D = (x, _) => {
1492
- g(x ? _ : _ === X ? te : X);
1493
- }, v = () => {
1491
+ }, U = () => {
1494
1492
  h(!m);
1495
- }, z = () => {
1493
+ }, S = () => {
1496
1494
  d({ ...r }), o(!1);
1497
1495
  };
1498
- return U(() => {
1499
- r != null && r.instructions && l(r.instructions), r != null && r.location && T(r.location), r != null && r.provider && g(r.provider);
1496
+ return F(() => {
1497
+ r != null && r.instructions && l(r.instructions), r != null && r.location && E(r.location), r != null && r.provider && b(r.provider);
1500
1498
  }, [r]), c || s ? null : /* @__PURE__ */ e(
1501
- ie,
1499
+ ne,
1502
1500
  {
1503
1501
  open: t,
1504
- onOpenChange: z,
1505
- title: dt,
1502
+ onOpenChange: S,
1503
+ title: ct,
1506
1504
  footer: /* @__PURE__ */ i(
1507
- Q,
1505
+ K,
1508
1506
  {
1509
1507
  columnGap: 2,
1510
1508
  alignHorizontal: "flex-end",
1511
1509
  className: "pb-8 sm:pb-0",
1512
1510
  children: [
1513
- /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
1514
- q,
1511
+ /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(
1512
+ j,
1515
1513
  {
1516
1514
  mode: "dark",
1517
1515
  variant: "secondary",
1518
1516
  focusMode: "light",
1519
- onClick: z,
1517
+ onClick: S,
1520
1518
  children: "Cancel"
1521
1519
  }
1522
1520
  ) }),
1523
- /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
1524
- q,
1521
+ /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(
1522
+ j,
1525
1523
  {
1526
1524
  mode: "dark",
1527
1525
  variant: "danger",
1528
1526
  focusMode: "light",
1529
- onClick: async (x) => {
1530
- o(!1), await w(x);
1527
+ onClick: async (T) => {
1528
+ o(!1), await w(T);
1531
1529
  },
1532
1530
  children: "Save"
1533
1531
  }
@@ -1535,75 +1533,59 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1535
1533
  ]
1536
1534
  }
1537
1535
  ),
1538
- children: /* @__PURE__ */ i(B, { children: [
1539
- m && /* @__PURE__ */ e(Nr, { open: m, onOpenChange: h }),
1536
+ children: /* @__PURE__ */ i(H, { children: [
1537
+ m && /* @__PURE__ */ e(Tr, { open: m, onOpenChange: h }),
1540
1538
  /* @__PURE__ */ i(
1541
- H,
1539
+ P,
1542
1540
  {
1543
- header: N.SETTINGS_PROVIDER.TITLE,
1541
+ header: x.SETTINGS_DETAILS.TITLE,
1544
1542
  className: "prose-dark dark:prose-lighter",
1545
1543
  children: [
1546
- /* @__PURE__ */ e("p", { className: "text-sm", children: "Select the AI provider that will be used to generate responses." }),
1547
- /* @__PURE__ */ e(
1548
- oe,
1549
- {
1550
- noBorder: !0,
1551
- label: X,
1552
- name: X,
1553
- onChange: (x) => D(x, X),
1554
- checked: E === X
1555
- }
1556
- ),
1557
- /* @__PURE__ */ e(
1558
- oe,
1559
- {
1560
- className: "mt-2",
1561
- noBorder: !0,
1562
- label: te,
1563
- name: te,
1564
- onChange: (x) => D(x, te),
1565
- checked: E === te
1566
- }
1567
- ),
1568
- /* @__PURE__ */ e("p", { className: "text-sm", children: 'This "Show Message Statistics" option adds individual statistics for each messages under their respective bubbles, such as processing time, model name, and more.' }),
1544
+ /* @__PURE__ */ e("p", { className: "text-sm", children: x.SETTINGS_DETAILS.INSTRUCTION }),
1569
1545
  /* @__PURE__ */ e(
1570
- oe,
1546
+ ge,
1571
1547
  {
1572
1548
  className: "mt-2",
1573
1549
  noBorder: !0,
1574
1550
  label: "Show Message Statistics",
1575
1551
  name: "show-message-statistics",
1576
1552
  onChange: u,
1577
- checked: R
1578
- }
1579
- ),
1580
- /* @__PURE__ */ e("h3", { className: "border-b-2 border-slate-400", children: "Prompts" }),
1581
- /* @__PURE__ */ e(
1582
- se,
1583
- {
1584
- className: "mt-2",
1585
- size: "small",
1586
- onClick: v,
1587
- labelLeft: "Edit Custom Prompts",
1588
- children: /* @__PURE__ */ e(wt, { size: "size-3", monotone: !0 })
1553
+ checked: _
1589
1554
  }
1590
1555
  )
1591
1556
  ]
1592
1557
  }
1593
1558
  ),
1559
+ /* @__PURE__ */ e(
1560
+ P,
1561
+ {
1562
+ header: x.SETTINGS_PROMPTS.TITLE,
1563
+ className: "prose-dark dark:prose-lighter mt-4",
1564
+ children: /* @__PURE__ */ e(
1565
+ te,
1566
+ {
1567
+ className: "mt-2",
1568
+ size: "small",
1569
+ onClick: U,
1570
+ labelLeft: "Edit Custom Prompts",
1571
+ children: /* @__PURE__ */ e(Et, { size: "size-3", monotone: !0 })
1572
+ }
1573
+ )
1574
+ }
1575
+ ),
1594
1576
  /* @__PURE__ */ i(
1595
- H,
1577
+ P,
1596
1578
  {
1597
1579
  header: "Custom Instructions",
1598
1580
  className: "prose-dark dark:prose-lighter mt-4",
1599
1581
  children: [
1600
1582
  /* @__PURE__ */ i("p", { className: "text-sm", children: [
1601
1583
  "What would you like ",
1602
- /* @__PURE__ */ e("em", { children: ut }),
1584
+ /* @__PURE__ */ e("em", { children: it }),
1603
1585
  " to know about you to provide better responses?"
1604
1586
  ] }),
1605
1587
  /* @__PURE__ */ e(
1606
- xe,
1588
+ pe,
1607
1589
  {
1608
1590
  mode: "alt-system",
1609
1591
  autoCapitalize: "off",
@@ -1612,8 +1594,8 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1612
1594
  name: "customInstructions",
1613
1595
  label: "Custom Instructions",
1614
1596
  value: C,
1615
- onChange: (x) => {
1616
- l(x.target.value);
1597
+ onChange: (T) => {
1598
+ l(T.target.value);
1617
1599
  },
1618
1600
  helperText: "Press ENTER to add a new line."
1619
1601
  }
@@ -1622,33 +1604,33 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1622
1604
  }
1623
1605
  ),
1624
1606
  /* @__PURE__ */ i(
1625
- H,
1607
+ P,
1626
1608
  {
1627
1609
  header: "Location",
1628
1610
  className: "prose-dark dark:prose-lighter mt-4",
1629
1611
  children: [
1630
1612
  /* @__PURE__ */ e("p", { className: "text-sm", children: "You can share your location to receive customized responses based on your area." }),
1631
1613
  /* @__PURE__ */ e(
1632
- xe,
1614
+ pe,
1633
1615
  {
1634
1616
  mode: "alt-system",
1635
1617
  name: "location",
1636
1618
  label: "Location",
1637
1619
  value: p,
1638
- onChange: (x) => {
1639
- T(x.target.value);
1620
+ onChange: (T) => {
1621
+ E(T.target.value);
1640
1622
  },
1641
1623
  helperText: "Enter your location or press auto-detect."
1642
1624
  }
1643
1625
  ),
1644
1626
  /* @__PURE__ */ e(
1645
- q,
1627
+ j,
1646
1628
  {
1647
1629
  className: "mt-2",
1648
1630
  size: "small",
1649
1631
  noBorder: !0,
1650
1632
  disabled: f.loadingLocation,
1651
- onClick: M,
1633
+ onClick: O,
1652
1634
  children: f.loadingLocation ? "Detecting..." : "Auto-detect"
1653
1635
  }
1654
1636
  )
@@ -1658,29 +1640,29 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1658
1640
  ] })
1659
1641
  }
1660
1642
  );
1661
- }, Rr = ({ isComponent: t = !1 }) => {
1662
- const { logout: o } = F(), [n, a] = k(!1), [r, c] = k(!1), [s, d] = k(!1), [m, h] = k(!1), [f, b] = k(!1);
1663
- return /* @__PURE__ */ i(B, { children: [
1643
+ }, Ir = ({ isComponent: t = !1 }) => {
1644
+ const { logout: o } = $(), [n, a] = k(!1), [r, c] = k(!1), [s, d] = k(!1), [m, h] = k(!1), [f, y] = k(!1);
1645
+ return /* @__PURE__ */ i(H, { children: [
1664
1646
  /* @__PURE__ */ e(
1665
- Me,
1647
+ Pe,
1666
1648
  {
1667
1649
  showConfirmation: f,
1668
- setShowConfirmation: b,
1650
+ setShowConfirmation: y,
1669
1651
  action: o,
1670
1652
  customStrings: {
1671
- confirmAction: _e,
1653
+ confirmAction: Ae,
1672
1654
  cancelAction: "Cancel",
1673
- title: _e
1655
+ title: Ae
1674
1656
  },
1675
1657
  children: /* @__PURE__ */ e("p", { children: "Are you sure you want to log out?" })
1676
1658
  }
1677
1659
  ),
1678
- /* @__PURE__ */ e(Kt, { open: n, onOpenChange: a }),
1679
- /* @__PURE__ */ e(wr, { open: r, onOpenChange: c }),
1680
- s && /* @__PURE__ */ e(Yt, { open: s, onOpenChange: d }),
1681
- /* @__PURE__ */ e(Ft, { open: m, onOpenChange: h }),
1682
- /* @__PURE__ */ e("div", { className: "bg-slate-900 py-4 px-4 rounded-t-md", children: /* @__PURE__ */ e(Q, { alignHorizontal: "flex-end", alignVertical: "center", children: /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
1683
- vt,
1660
+ /* @__PURE__ */ e(Yt, { open: n, onOpenChange: a }),
1661
+ /* @__PURE__ */ e(Er, { open: r, onOpenChange: c }),
1662
+ s && /* @__PURE__ */ e(Ut, { open: s, onOpenChange: d }),
1663
+ /* @__PURE__ */ e(Vt, { open: m, onOpenChange: h }),
1664
+ /* @__PURE__ */ e("div", { className: "bg-slate-900 py-4 px-4 rounded-t-md", children: /* @__PURE__ */ e(K, { alignHorizontal: "flex-end", alignVertical: "center", children: /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(
1665
+ Nt,
1684
1666
  {
1685
1667
  label: "Profile, Settings, etc.",
1686
1668
  mode: "light",
@@ -1690,59 +1672,59 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1690
1672
  {
1691
1673
  mode: "dark",
1692
1674
  focusMode: "light",
1693
- trigger: /* @__PURE__ */ e(se, { label: "Settings", children: /* @__PURE__ */ e(Dt, {}) }),
1675
+ trigger: /* @__PURE__ */ e(te, { label: "Settings", children: /* @__PURE__ */ e(Ht, {}) }),
1694
1676
  defaultPlacement: "bottom-end",
1695
1677
  children: [
1696
1678
  /* @__PURE__ */ e(
1697
- ae,
1679
+ J,
1698
1680
  {
1699
1681
  label: "Profile",
1700
1682
  onClick: () => {
1701
1683
  a(!n);
1702
1684
  },
1703
- icon: /* @__PURE__ */ e(Bt, {})
1685
+ icon: /* @__PURE__ */ e(Ot, {})
1704
1686
  }
1705
1687
  ),
1706
1688
  /* @__PURE__ */ e(
1707
- ae,
1689
+ J,
1708
1690
  {
1709
1691
  label: "Settings",
1710
1692
  onClick: () => {
1711
1693
  c(!r);
1712
1694
  },
1713
- icon: /* @__PURE__ */ e(Vt, {})
1695
+ icon: /* @__PURE__ */ e(Bt, {})
1714
1696
  }
1715
1697
  ),
1716
1698
  /* @__PURE__ */ e(
1717
- ae,
1699
+ J,
1718
1700
  {
1719
1701
  label: "History",
1720
1702
  onClick: () => {
1721
1703
  d(!s);
1722
1704
  },
1723
- icon: /* @__PURE__ */ e(Mt, {})
1705
+ icon: /* @__PURE__ */ e(Pt, {})
1724
1706
  }
1725
1707
  ),
1726
1708
  /* @__PURE__ */ e(
1727
- ae,
1709
+ J,
1728
1710
  {
1729
1711
  label: "About",
1730
1712
  onClick: () => {
1731
1713
  h(!m);
1732
1714
  },
1733
- icon: /* @__PURE__ */ e(zt, {})
1715
+ icon: /* @__PURE__ */ e(Mt, {})
1734
1716
  }
1735
1717
  ),
1736
- !t && /* @__PURE__ */ i(B, { children: [
1737
- /* @__PURE__ */ e(At, {}),
1718
+ !t && /* @__PURE__ */ i(H, { children: [
1719
+ /* @__PURE__ */ e(wt, {}),
1738
1720
  /* @__PURE__ */ e(
1739
- ae,
1721
+ J,
1740
1722
  {
1741
1723
  label: "Log out",
1742
1724
  onClick: () => {
1743
- b(!f);
1725
+ y(!f);
1744
1726
  },
1745
- icon: /* @__PURE__ */ e("div", { className: "text-red-700", children: /* @__PURE__ */ e(Pt, { monotone: !0 }) })
1727
+ icon: /* @__PURE__ */ e("div", { className: "text-red-700", children: /* @__PURE__ */ e(Rt, { monotone: !0 }) })
1746
1728
  }
1747
1729
  )
1748
1730
  ] })
@@ -1754,5 +1736,5 @@ const pr = "av-toggle", gr = () => y("peer", "h-6", "w-11", "rounded-full"), yr
1754
1736
  ] });
1755
1737
  };
1756
1738
  export {
1757
- Rr as default
1739
+ Ir as default
1758
1740
  };