@versini/sassysaint 5.4.15 → 5.5.1

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,10 +1,10 @@
1
- import { jsx as o, jsxs as y, Fragment as _ } from "react/jsx-runtime";
2
- import { g as O, R as L, CARDS as x, renderDataAsList as oe, pluralize as he, ABOUT_TITLE as Dt, DEFAULT_AI_ENGINE as te, numberFormatter as Vt, durationFormatter as Qe, NA as $t, ROLE_ASSISTANT as Ft, extractAverage as Ht, GPT4_MAX_TOKENS as Gt, un as W, STATS as Xe, L as q, j as z, C as F, LOCAL_STORAGE_PREFIX as se, LOCAL_STORAGE_SORT as Ut, O as j, ACTION_RESET as Je, ACTION_RESTORE as jt, ACTION_SORT as Ve, LOCAL_STORAGE_SEARCH as Kt, ye as Ne, ACTION_SEARCH as Wt, debounce as Yt, HISTORY_TITLE as qt, LOCAL_STORAGE_ENGINE_TOGGLE as et, ENGINE_OPENAI as Te, ENGINE_ANTHROPIC as me, APP_NAME as Zt, ACTION_ENGINE as tt, getCurrentGeoLocation as Qt, TAGS_DESCRIPTION as Xt, ACTION_SET_TAGS as Jt, LOCAL_STORAGE_CHAT_DETAILS as er, M as tr, z as $e, PROFILE_TITLE as rr, LOG_OUT as Fe } from "./index.D8QVMbN9.js";
3
- import { AppContext as ie, serviceCall as D, SERVICE_TYPES as V, HistoryContext as rt, E as ce, ce as or, se as ar, he as we, be as nr, oe as $, ge as sr, ne as ir, f as U, Le as He, TagsContext as cr, h as Ge } from "./index.Dn9p043U.js";
1
+ import { jsx as o, jsxs as y, Fragment as R } from "react/jsx-runtime";
2
+ import { g as z, R as P, CARDS as N, renderDataAsList as oe, pluralize as he, ABOUT_TITLE as Dt, DEFAULT_AI_ENGINE as te, numberFormatter as Vt, durationFormatter as Qe, NA as $t, ROLE_ASSISTANT as Ft, extractAverage as Ht, GPT4_MAX_TOKENS as Gt, un as Y, STATS as Xe, L as H, j as _, C as F, LOCAL_STORAGE_PREFIX as se, LOCAL_STORAGE_SORT as Ut, O as K, ACTION_RESET as Je, ACTION_RESTORE as jt, ACTION_SORT as Ve, LOCAL_STORAGE_SEARCH as Kt, ye as xe, ACTION_SEARCH as Wt, debounce as Yt, HISTORY_TITLE as qt, LOCAL_STORAGE_ENGINE_TOGGLE as et, ENGINE_OPENAI as Ce, ENGINE_ANTHROPIC as me, APP_NAME as Zt, ACTION_ENGINE as tt, getCurrentGeoLocation as Qt, TAGS_DESCRIPTION as Xt, ACTION_SET_TAGS as Jt, LOCAL_STORAGE_CHAT_DETAILS as er, M as tr, z as $e, PROFILE_TITLE as rr, LOG_OUT as Fe } from "./index.DiAX0KiN.js";
3
+ import { AppContext as ie, serviceCall as D, SERVICE_TYPES as V, HistoryContext as rt, E as ce, ce as or, se as ar, he as Te, be as nr, oe as $, ge as sr, ne as ir, f as j, Fe as He, TagsContext as cr, NewChatButton as lr } from "./index.Du-zwZIx.js";
4
4
  import * as f from "react";
5
- import E, { useId as Ae, forwardRef as ot, useState as I, useRef as Z, useContext as P, useEffect as H } from "react";
5
+ import E, { useId as Ae, forwardRef as ot, useState as I, useRef as Z, useContext as B, useEffect as G } from "react";
6
6
  import k from "clsx";
7
- import { useFloatingTree as at, useFloatingNodeId as lr, useListItem as nt, useFloating as st, offset as dr, flip as ur, shift as mr, autoUpdate as hr, useClick as it, useRole as ct, useDismiss as lt, useListNavigation as gr, useTypeahead as fr, useInteractions as dt, useMergeRefs as Me, FloatingNode as pr, FloatingList as br, FloatingPortal as ut, FloatingFocusManager as mt, FloatingTree as vr, FloatingOverlay as yr } from "@floating-ui/react";
7
+ import { useFloatingTree as at, useFloatingNodeId as dr, useListItem as nt, useFloating as st, offset as ur, flip as mr, shift as hr, autoUpdate as gr, useClick as it, useRole as ct, useDismiss as lt, useListNavigation as fr, useTypeahead as pr, useInteractions as dt, useMergeRefs as Me, FloatingNode as br, FloatingList as vr, FloatingPortal as ut, FloatingFocusManager as mt, FloatingTree as yr, FloatingOverlay as kr } from "@floating-ui/react";
8
8
  const ht = ({
9
9
  className: e,
10
10
  viewBox: t,
@@ -12,7 +12,7 @@ const ht = ({
12
12
  monotone: a,
13
13
  ...n
14
14
  }) => /* @__PURE__ */ o(
15
- O,
15
+ z,
16
16
  {
17
17
  defaultViewBox: "0 0 256 176",
18
18
  size: "size-5",
@@ -22,14 +22,14 @@ const ht = ({
22
22
  ...n,
23
23
  children: /* @__PURE__ */ o("path", { d: "m147.487 0l70.081 175.78H256L185.919 0zM66.183 106.221l23.98-61.774l23.98 61.774zM70.07 0L0 175.78h39.18l14.33-36.914h73.308l14.328 36.914h39.179L110.255 0z" })
24
24
  }
25
- ), kr = ({
25
+ ), wr = ({
26
26
  className: e,
27
27
  viewBox: t,
28
28
  title: r,
29
29
  monotone: a,
30
30
  ...n
31
31
  }) => /* @__PURE__ */ y(
32
- O,
32
+ z,
33
33
  {
34
34
  defaultViewBox: "0 0 512 512",
35
35
  size: "size-5",
@@ -55,7 +55,7 @@ const ht = ({
55
55
  monotone: a,
56
56
  ...n
57
57
  }) => /* @__PURE__ */ y(
58
- O,
58
+ z,
59
59
  {
60
60
  defaultViewBox: "0 0 448 512",
61
61
  size: "size-5",
@@ -81,7 +81,7 @@ const ht = ({
81
81
  monotone: a,
82
82
  ...n
83
83
  }) => /* @__PURE__ */ y(
84
- O,
84
+ z,
85
85
  {
86
86
  defaultViewBox: "0 0 448 512",
87
87
  size: "size-5",
@@ -100,14 +100,40 @@ const ht = ({
100
100
  /* @__PURE__ */ o("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 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8z" })
101
101
  ]
102
102
  }
103
- ), wr = ({
103
+ ), Ge = ({
104
104
  className: e,
105
105
  viewBox: t,
106
106
  title: r,
107
107
  monotone: a,
108
108
  ...n
109
109
  }) => /* @__PURE__ */ y(
110
- O,
110
+ z,
111
+ {
112
+ defaultViewBox: "0 0 512 512",
113
+ size: "size-5",
114
+ viewBox: t,
115
+ className: e,
116
+ title: r || "Edit",
117
+ ...n,
118
+ children: [
119
+ /* @__PURE__ */ o(
120
+ "path",
121
+ {
122
+ opacity: a ? "1" : "0.4",
123
+ d: "M0 160c0-53 43-96 96-96h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32 14.3-32 32V416c0 17.7 14.3 32 32 32H352c17.7 0 32-14.3 32-32V320c0-17.7 14.3-32 32-32s32 14.3 32 32v96c0 53-43 96-96 96H96c-53 0-96-43-96-96V160z"
124
+ }
125
+ ),
126
+ /* @__PURE__ */ o("path", { d: "M392.4 21.7L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0zM339.7 74.3L172.4 241.7c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3z" })
127
+ ]
128
+ }
129
+ ), Nr = ({
130
+ className: e,
131
+ viewBox: t,
132
+ title: r,
133
+ monotone: a,
134
+ ...n
135
+ }) => /* @__PURE__ */ y(
136
+ z,
111
137
  {
112
138
  defaultViewBox: "0 0 512 512",
113
139
  size: "size-5",
@@ -133,7 +159,7 @@ const ht = ({
133
159
  monotone: a,
134
160
  ...n
135
161
  }) => /* @__PURE__ */ y(
136
- O,
162
+ z,
137
163
  {
138
164
  defaultViewBox: "0 0 512 512",
139
165
  size: "size-5",
@@ -159,7 +185,7 @@ const ht = ({
159
185
  monotone: a,
160
186
  ...n
161
187
  }) => /* @__PURE__ */ o(
162
- O,
188
+ z,
163
189
  {
164
190
  defaultViewBox: "0 0 24 24",
165
191
  size: "size-5",
@@ -175,14 +201,14 @@ const ht = ({
175
201
  }
176
202
  )
177
203
  }
178
- ), Nr = ({
204
+ ), Er = ({
179
205
  className: e,
180
206
  viewBox: t,
181
207
  title: r,
182
208
  monotone: a,
183
209
  ...n
184
210
  }) => /* @__PURE__ */ y(
185
- O,
211
+ z,
186
212
  {
187
213
  defaultViewBox: "0 0 576 512",
188
214
  size: "size-5",
@@ -201,14 +227,14 @@ const ht = ({
201
227
  /* @__PURE__ */ o("path", { d: "M176 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16H272c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80H144z" })
202
228
  ]
203
229
  }
204
- ), Er = ({
230
+ ), Ir = ({
205
231
  className: e,
206
232
  viewBox: t,
207
233
  title: r,
208
234
  monotone: a,
209
235
  ...n
210
236
  }) => /* @__PURE__ */ y(
211
- O,
237
+ z,
212
238
  {
213
239
  defaultViewBox: "0 0 512 512",
214
240
  size: "size-5",
@@ -227,14 +253,14 @@ const ht = ({
227
253
  /* @__PURE__ */ o("path", { d: "M64 128c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64H64zm32 64H288c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32z" })
228
254
  ]
229
255
  }
230
- ), Ir = ({
256
+ ), Sr = ({
231
257
  className: e,
232
258
  viewBox: t,
233
259
  title: r,
234
260
  monotone: a,
235
261
  ...n
236
262
  }) => /* @__PURE__ */ o(
237
- O,
263
+ z,
238
264
  {
239
265
  defaultViewBox: "0 0 448 512",
240
266
  size: "size-5",
@@ -279,86 +305,86 @@ const Ee = f.createContext({
279
305
  focusMode: s = "system",
280
306
  ...c
281
307
  }, g) => {
282
- const [l, u] = I(!1), [p, b] = I(!1), [h, m] = I(null), d = Z([]), v = Z([]), T = P(Ee), C = at(), w = lr(), S = nt(), { floatingStyles: A, refs: M, context: R } = st({
283
- nodeId: w,
308
+ const [l, u] = I(!1), [p, b] = I(!1), [h, m] = I(null), d = Z([]), v = Z([]), C = B(Ee), w = at(), T = dr(), S = nt(), { floatingStyles: M, refs: L, context: A } = st({
309
+ nodeId: T,
284
310
  open: l,
285
311
  onOpenChange: (J) => {
286
312
  u(J), n == null || n(J);
287
313
  },
288
314
  placement: a,
289
315
  strategy: "fixed",
290
- middleware: [dr({ mainAxis: 10 }), ur(), mr()],
291
- whileElementsMounted: hr
292
- }), N = it(R, {
316
+ middleware: [ur({ mainAxis: 10 }), mr(), hr()],
317
+ whileElementsMounted: gr
318
+ }), x = it(A, {
293
319
  event: "mousedown",
294
320
  toggle: !0,
295
321
  ignoreMouse: !1
296
- }), le = ct(R, { role: "menu" }), de = lt(R, { bubbles: !0 }), X = gr(R, {
322
+ }), le = ct(A, { role: "menu" }), de = lt(A, { bubbles: !0 }), X = fr(A, {
297
323
  listRef: d,
298
324
  activeIndex: h,
299
325
  nested: !1,
300
326
  onNavigate: m,
301
327
  loop: !0
302
- }), ye = fr(R, {
328
+ }), ye = pr(A, {
303
329
  listRef: v,
304
330
  onMatch: l ? m : void 0,
305
331
  activeIndex: h
306
- }), { getReferenceProps: ke, getFloatingProps: Ce, getItemProps: B } = dt([N, le, de, X, ye]), De = Ue(e) === "Button" || Ue(e) === "ButtonIcon", Ot = De ? {
332
+ }), { getReferenceProps: ke, getFloatingProps: we, getItemProps: O } = dt([x, le, de, X, ye]), De = Ue(e) === "Button" || Ue(e) === "ButtonIcon", Bt = De ? {
307
333
  noInternalClick: De,
308
334
  focusMode: s,
309
335
  mode: i
310
- } : {}, Bt = E.cloneElement(
336
+ } : {}, Ot = E.cloneElement(
311
337
  e,
312
338
  {
313
- ...Ot,
339
+ ...Bt,
314
340
  "aria-label": r,
315
341
  "data-open": l ? "" : void 0,
316
342
  "data-focus-inside": p ? "" : void 0,
317
- ref: Me([M.setReference, S.ref, g]),
343
+ ref: Me([L.setReference, S.ref, g]),
318
344
  ...ke(
319
- T.getItemProps({
345
+ C.getItemProps({
320
346
  ...c
321
347
  })
322
348
  )
323
349
  }
324
350
  );
325
- return H(() => {
326
- if (!C)
351
+ return G(() => {
352
+ if (!w)
327
353
  return;
328
354
  function J() {
329
355
  u(!1), n == null || n(!1);
330
356
  }
331
- return C.events.on("click", J), () => {
332
- C.events.off("click", J);
357
+ return w.events.on("click", J), () => {
358
+ w.events.off("click", J);
333
359
  };
334
- }, [C, n]), H(() => {
335
- l && C && C.events.emit("menuopen", { nodeId: w });
336
- }, [C, l, w]), /* @__PURE__ */ y(pr, { id: w, children: [
337
- Bt,
360
+ }, [w, n]), G(() => {
361
+ l && w && w.events.emit("menuopen", { nodeId: T });
362
+ }, [w, l, T]), /* @__PURE__ */ y(br, { id: T, children: [
363
+ Ot,
338
364
  /* @__PURE__ */ o(
339
365
  Ee.Provider,
340
366
  {
341
367
  value: {
342
368
  activeIndex: h,
343
369
  setActiveIndex: m,
344
- getItemProps: B,
370
+ getItemProps: O,
345
371
  setHasFocusInside: b,
346
372
  isOpen: l
347
373
  },
348
- children: /* @__PURE__ */ o(br, { elementsRef: d, labelsRef: v, children: l && /* @__PURE__ */ o(ut, { children: /* @__PURE__ */ o(
374
+ children: /* @__PURE__ */ o(vr, { elementsRef: d, labelsRef: v, children: l && /* @__PURE__ */ o(ut, { children: /* @__PURE__ */ o(
349
375
  mt,
350
376
  {
351
- context: R,
377
+ context: A,
352
378
  modal: !1,
353
379
  initialFocus: 0,
354
380
  returnFocus: !0,
355
381
  children: /* @__PURE__ */ o(
356
382
  "div",
357
383
  {
358
- ref: M.setFloating,
384
+ ref: L.setFloating,
359
385
  className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
360
- style: A,
361
- ...Ce(),
386
+ style: M,
387
+ ...we(),
362
388
  children: t
363
389
  }
364
390
  )
@@ -368,10 +394,10 @@ const Ee = f.createContext({
368
394
  )
369
395
  ] });
370
396
  }
371
- ), Ie = ot((e, t) => /* @__PURE__ */ o(vr, { children: /* @__PURE__ */ o(ft, { ...e, ref: t }) }));
397
+ ), Ie = ot((e, t) => /* @__PURE__ */ o(yr, { children: /* @__PURE__ */ o(ft, { ...e, ref: t }) }));
372
398
  Ie.displayName = "Menu";
373
399
  ft.displayName = "MenuComponent";
374
- const G = f.forwardRef(
400
+ const U = f.forwardRef(
375
401
  ({
376
402
  label: e,
377
403
  disabled: t,
@@ -422,8 +448,8 @@ const G = f.forwardRef(
422
448
  ));
423
449
  }
424
450
  );
425
- G.displayName = "MenuItem";
426
- const Sr = ({ className: e, ...t }) => {
451
+ U.displayName = "MenuItem";
452
+ const _r = ({ className: e, ...t }) => {
427
453
  const r = k(e, "my-1 border-t border-border-medium");
428
454
  return /* @__PURE__ */ o("div", { className: r, ...t });
429
455
  };
@@ -453,7 +479,7 @@ try {
453
479
  });
454
480
  } catch {
455
481
  }
456
- const _r = "av-togglegroup", Rr = "av-togglegroup-item-wrapper", Ar = "av-togglegroup-item";
482
+ const Rr = "av-togglegroup", Ar = "av-togglegroup-item-wrapper", Mr = "av-togglegroup-item";
457
483
  function ze(e, t = []) {
458
484
  let r = [];
459
485
  function a(i, s) {
@@ -461,8 +487,8 @@ function ze(e, t = []) {
461
487
  r = [...r, s];
462
488
  const l = (p) => {
463
489
  var b;
464
- const { scope: h, children: m, ...d } = p, v = ((b = h == null ? void 0 : h[e]) == null ? void 0 : b[g]) || c, T = f.useMemo(() => d, Object.values(d));
465
- return /* @__PURE__ */ o(v.Provider, { value: T, children: m });
490
+ const { scope: h, children: m, ...d } = p, v = ((b = h == null ? void 0 : h[e]) == null ? void 0 : b[g]) || c, C = f.useMemo(() => d, Object.values(d));
491
+ return /* @__PURE__ */ o(v.Provider, { value: C, children: m });
466
492
  };
467
493
  l.displayName = i + "Provider";
468
494
  function u(p, b) {
@@ -484,9 +510,9 @@ function ze(e, t = []) {
484
510
  );
485
511
  };
486
512
  };
487
- return n.scopeName = e, [a, Mr(n, ...t)];
513
+ return n.scopeName = e, [a, zr(n, ...t)];
488
514
  }
489
- function Mr(...e) {
515
+ function zr(...e) {
490
516
  const t = e[0];
491
517
  if (e.length === 1) return t;
492
518
  const r = () => {
@@ -529,7 +555,7 @@ function Se(...e) {
529
555
  return f.useCallback(pt(...e), e);
530
556
  }
531
557
  var ge = f.forwardRef((e, t) => {
532
- const { children: r, ...a } = e, n = f.Children.toArray(r), i = n.find(Lr);
558
+ const { children: r, ...a } = e, n = f.Children.toArray(r), i = n.find(Pr);
533
559
  if (i) {
534
560
  const s = i.props.children, c = n.map((g) => g === i ? f.Children.count(s) > 1 ? f.Children.only(null) : f.isValidElement(s) ? s.props.children : null : g);
535
561
  return /* @__PURE__ */ o(_e, { ...a, ref: t, children: f.isValidElement(s) ? f.cloneElement(s, void 0, c) : null });
@@ -542,7 +568,7 @@ var _e = f.forwardRef((e, t) => {
542
568
  if (f.isValidElement(r)) {
543
569
  const n = Or(r);
544
570
  return f.cloneElement(r, {
545
- ...Pr(a, r.props),
571
+ ...Br(a, r.props),
546
572
  // @ts-ignore
547
573
  ref: t ? pt(t, n) : n
548
574
  });
@@ -550,11 +576,11 @@ var _e = f.forwardRef((e, t) => {
550
576
  return f.Children.count(r) > 1 ? f.Children.only(null) : null;
551
577
  });
552
578
  _e.displayName = "SlotClone";
553
- var zr = ({ children: e }) => /* @__PURE__ */ o(_, { children: e });
554
- function Lr(e) {
555
- return f.isValidElement(e) && e.type === zr;
579
+ var Lr = ({ children: e }) => /* @__PURE__ */ o(R, { children: e });
580
+ function Pr(e) {
581
+ return f.isValidElement(e) && e.type === Lr;
556
582
  }
557
- function Pr(e, t) {
583
+ function Br(e, t) {
558
584
  const r = { ...t };
559
585
  for (const a in t) {
560
586
  const n = e[a], i = t[a];
@@ -569,7 +595,7 @@ function Or(e) {
569
595
  let a = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, n = a && "isReactWarning" in a && a.isReactWarning;
570
596
  return n ? e.ref : (a = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = a && "isReactWarning" in a && a.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
571
597
  }
572
- var Br = [
598
+ var Dr = [
573
599
  "a",
574
600
  "button",
575
601
  "div",
@@ -586,39 +612,39 @@ var Br = [
586
612
  "span",
587
613
  "svg",
588
614
  "ul"
589
- ], ne = Br.reduce((e, t) => {
615
+ ], ne = Dr.reduce((e, t) => {
590
616
  const r = f.forwardRef((a, n) => {
591
617
  const { asChild: i, ...s } = a, c = i ? ge : t;
592
618
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(c, { ...s, ref: n });
593
619
  });
594
620
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
595
621
  }, {});
596
- function K(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
622
+ function W(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
597
623
  return function(a) {
598
624
  if (e == null || e(a), r === !1 || !a.defaultPrevented)
599
625
  return t == null ? void 0 : t(a);
600
626
  };
601
627
  }
602
- function Dr(e) {
628
+ function Vr(e) {
603
629
  const t = e + "CollectionProvider", [r, a] = ze(t), [n, i] = r(
604
630
  t,
605
631
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
606
632
  ), s = (h) => {
607
- const { scope: m, children: d } = h, v = E.useRef(null), T = E.useRef(/* @__PURE__ */ new Map()).current;
608
- return /* @__PURE__ */ o(n, { scope: m, itemMap: T, collectionRef: v, children: d });
633
+ const { scope: m, children: d } = h, v = E.useRef(null), C = E.useRef(/* @__PURE__ */ new Map()).current;
634
+ return /* @__PURE__ */ o(n, { scope: m, itemMap: C, collectionRef: v, children: d });
609
635
  };
610
636
  s.displayName = t;
611
637
  const c = e + "CollectionSlot", g = E.forwardRef(
612
638
  (h, m) => {
613
- const { scope: d, children: v } = h, T = i(c, d), C = Se(m, T.collectionRef);
614
- return /* @__PURE__ */ o(ge, { ref: C, children: v });
639
+ const { scope: d, children: v } = h, C = i(c, d), w = Se(m, C.collectionRef);
640
+ return /* @__PURE__ */ o(ge, { ref: w, children: v });
615
641
  }
616
642
  );
617
643
  g.displayName = c;
618
644
  const l = e + "CollectionItemSlot", u = "data-radix-collection-item", p = E.forwardRef(
619
645
  (h, m) => {
620
- const { scope: d, children: v, ...T } = h, C = E.useRef(null), w = Se(m, C), S = i(l, d);
621
- return E.useEffect(() => (S.itemMap.set(C, { ref: C, ...T }), () => void S.itemMap.delete(C))), /* @__PURE__ */ o(ge, { [u]: "", ref: w, children: v });
646
+ const { scope: d, children: v, ...C } = h, w = E.useRef(null), T = Se(m, w), S = i(l, d);
647
+ return E.useEffect(() => (S.itemMap.set(w, { ref: w, ...C }), () => void S.itemMap.delete(w))), /* @__PURE__ */ o(ge, { [u]: "", ref: T, children: v });
622
648
  }
623
649
  );
624
650
  p.displayName = l;
@@ -629,7 +655,7 @@ function Dr(e) {
629
655
  if (!d) return [];
630
656
  const v = Array.from(d.querySelectorAll(`[${u}]`));
631
657
  return Array.from(m.itemMap.values()).sort(
632
- (T, C) => v.indexOf(T.ref.current) - v.indexOf(C.ref.current)
658
+ (C, w) => v.indexOf(C.ref.current) - v.indexOf(w.ref.current)
633
659
  );
634
660
  }, [m.collectionRef, m.itemMap]);
635
661
  }
@@ -639,13 +665,13 @@ function Dr(e) {
639
665
  a
640
666
  ];
641
667
  }
642
- var Vr = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
643
- }, $r = f.useId || (() => {
644
- }), Fr = 0;
645
- function Hr(e) {
646
- const [t, r] = f.useState($r());
647
- return Vr(() => {
648
- r((a) => a ?? String(Fr++));
668
+ var $r = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
669
+ }, Fr = f.useId || (() => {
670
+ }), Hr = 0;
671
+ function Gr(e) {
672
+ const [t, r] = f.useState(Fr());
673
+ return $r(() => {
674
+ r((a) => a ?? String(Hr++));
649
675
  }, [e]), t ? `radix-${t}` : "";
650
676
  }
651
677
  function Le(e) {
@@ -663,7 +689,7 @@ function pe({
663
689
  onChange: r = () => {
664
690
  }
665
691
  }) {
666
- const [a, n] = Gr({ defaultProp: t, onChange: r }), i = e !== void 0, s = i ? e : a, c = Le(r), g = f.useCallback(
692
+ const [a, n] = Ur({ defaultProp: t, onChange: r }), i = e !== void 0, s = i ? e : a, c = Le(r), g = f.useCallback(
667
693
  (l) => {
668
694
  if (i) {
669
695
  const u = typeof l == "function" ? l(e) : l;
@@ -675,7 +701,7 @@ function pe({
675
701
  );
676
702
  return [s, g];
677
703
  }
678
- function Gr({
704
+ function Ur({
679
705
  defaultProp: e,
680
706
  onChange: t
681
707
  }) {
@@ -684,19 +710,19 @@ function Gr({
684
710
  n.current !== a && (i(a), n.current = a);
685
711
  }, [a, n, i]), r;
686
712
  }
687
- var Ur = f.createContext(void 0);
713
+ var jr = f.createContext(void 0);
688
714
  function bt(e) {
689
- const t = f.useContext(Ur);
715
+ const t = f.useContext(jr);
690
716
  return e || t || "ltr";
691
717
  }
692
- var xe = "rovingFocusGroup.onEntryFocus", jr = { bubbles: !1, cancelable: !0 }, be = "RovingFocusGroup", [Re, vt, Kr] = Dr(be), [Wr, yt] = ze(
718
+ var Ne = "rovingFocusGroup.onEntryFocus", Kr = { bubbles: !1, cancelable: !0 }, be = "RovingFocusGroup", [Re, vt, Wr] = Vr(be), [Yr, yt] = ze(
693
719
  be,
694
- [Kr]
695
- ), [Yr, qr] = Wr(be), kt = f.forwardRef(
696
- (e, t) => /* @__PURE__ */ o(Re.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(Re.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(Zr, { ...e, ref: t }) }) })
720
+ [Wr]
721
+ ), [qr, Zr] = Yr(be), kt = f.forwardRef(
722
+ (e, t) => /* @__PURE__ */ o(Re.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(Re.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(Qr, { ...e, ref: t }) }) })
697
723
  );
698
724
  kt.displayName = be;
699
- var Zr = f.forwardRef((e, t) => {
725
+ var Qr = f.forwardRef((e, t) => {
700
726
  const {
701
727
  __scopeRovingFocusGroup: r,
702
728
  orientation: a,
@@ -712,13 +738,13 @@ var Zr = f.forwardRef((e, t) => {
712
738
  prop: s,
713
739
  defaultProp: c,
714
740
  onChange: g
715
- }), [T, C] = f.useState(!1), w = Le(l), S = vt(r), A = f.useRef(!1), [M, R] = f.useState(0);
741
+ }), [C, w] = f.useState(!1), T = Le(l), S = vt(r), M = f.useRef(!1), [L, A] = f.useState(0);
716
742
  return f.useEffect(() => {
717
- const N = b.current;
718
- if (N)
719
- return N.addEventListener(xe, w), () => N.removeEventListener(xe, w);
720
- }, [w]), /* @__PURE__ */ o(
721
- Yr,
743
+ const x = b.current;
744
+ if (x)
745
+ return x.addEventListener(Ne, T), () => x.removeEventListener(Ne, T);
746
+ }, [T]), /* @__PURE__ */ o(
747
+ qr,
722
748
  {
723
749
  scope: r,
724
750
  orientation: a,
@@ -726,48 +752,48 @@ var Zr = f.forwardRef((e, t) => {
726
752
  loop: n,
727
753
  currentTabStopId: d,
728
754
  onItemFocus: f.useCallback(
729
- (N) => v(N),
755
+ (x) => v(x),
730
756
  [v]
731
757
  ),
732
- onItemShiftTab: f.useCallback(() => C(!0), []),
758
+ onItemShiftTab: f.useCallback(() => w(!0), []),
733
759
  onFocusableItemAdd: f.useCallback(
734
- () => R((N) => N + 1),
760
+ () => A((x) => x + 1),
735
761
  []
736
762
  ),
737
763
  onFocusableItemRemove: f.useCallback(
738
- () => R((N) => N - 1),
764
+ () => A((x) => x - 1),
739
765
  []
740
766
  ),
741
767
  children: /* @__PURE__ */ o(
742
768
  ne.div,
743
769
  {
744
- tabIndex: T || M === 0 ? -1 : 0,
770
+ tabIndex: C || L === 0 ? -1 : 0,
745
771
  "data-orientation": a,
746
772
  ...p,
747
773
  ref: h,
748
774
  style: { outline: "none", ...e.style },
749
- onMouseDown: K(e.onMouseDown, () => {
750
- A.current = !0;
775
+ onMouseDown: W(e.onMouseDown, () => {
776
+ M.current = !0;
751
777
  }),
752
- onFocus: K(e.onFocus, (N) => {
753
- const le = !A.current;
754
- if (N.target === N.currentTarget && le && !T) {
755
- const de = new CustomEvent(xe, jr);
756
- if (N.currentTarget.dispatchEvent(de), !de.defaultPrevented) {
757
- const X = S().filter((B) => B.focusable), ye = X.find((B) => B.active), ke = X.find((B) => B.id === d), Ce = [ye, ke, ...X].filter(
778
+ onFocus: W(e.onFocus, (x) => {
779
+ const le = !M.current;
780
+ if (x.target === x.currentTarget && le && !C) {
781
+ const de = new CustomEvent(Ne, Kr);
782
+ if (x.currentTarget.dispatchEvent(de), !de.defaultPrevented) {
783
+ const X = S().filter((O) => O.focusable), ye = X.find((O) => O.active), ke = X.find((O) => O.id === d), we = [ye, ke, ...X].filter(
758
784
  Boolean
759
- ).map((B) => B.ref.current);
760
- wt(Ce, u);
785
+ ).map((O) => O.ref.current);
786
+ Tt(we, u);
761
787
  }
762
788
  }
763
- A.current = !1;
789
+ M.current = !1;
764
790
  }),
765
- onBlur: K(e.onBlur, () => C(!1))
791
+ onBlur: W(e.onBlur, () => w(!1))
766
792
  }
767
793
  )
768
794
  }
769
795
  );
770
- }), Ct = "RovingFocusGroupItem", Tt = f.forwardRef(
796
+ }), wt = "RovingFocusGroupItem", Ct = f.forwardRef(
771
797
  (e, t) => {
772
798
  const {
773
799
  __scopeRovingFocusGroup: r,
@@ -775,7 +801,7 @@ var Zr = f.forwardRef((e, t) => {
775
801
  active: n = !1,
776
802
  tabStopId: i,
777
803
  ...s
778
- } = e, c = Hr(), g = i || c, l = qr(Ct, r), u = l.currentTabStopId === g, p = vt(r), { onFocusableItemAdd: b, onFocusableItemRemove: h } = l;
804
+ } = e, c = Gr(), g = i || c, l = Zr(wt, r), u = l.currentTabStopId === g, p = vt(r), { onFocusableItemAdd: b, onFocusableItemRemove: h } = l;
779
805
  return f.useEffect(() => {
780
806
  if (a)
781
807
  return b(), () => h();
@@ -793,28 +819,28 @@ var Zr = f.forwardRef((e, t) => {
793
819
  "data-orientation": l.orientation,
794
820
  ...s,
795
821
  ref: t,
796
- onMouseDown: K(e.onMouseDown, (m) => {
822
+ onMouseDown: W(e.onMouseDown, (m) => {
797
823
  a ? l.onItemFocus(g) : m.preventDefault();
798
824
  }),
799
- onFocus: K(e.onFocus, () => l.onItemFocus(g)),
800
- onKeyDown: K(e.onKeyDown, (m) => {
825
+ onFocus: W(e.onFocus, () => l.onItemFocus(g)),
826
+ onKeyDown: W(e.onKeyDown, (m) => {
801
827
  if (m.key === "Tab" && m.shiftKey) {
802
828
  l.onItemShiftTab();
803
829
  return;
804
830
  }
805
831
  if (m.target !== m.currentTarget) return;
806
- const d = Jr(m, l.orientation, l.dir);
832
+ const d = eo(m, l.orientation, l.dir);
807
833
  if (d !== void 0) {
808
834
  if (m.metaKey || m.ctrlKey || m.altKey || m.shiftKey) return;
809
835
  m.preventDefault();
810
- let v = p().filter((T) => T.focusable).map((T) => T.ref.current);
836
+ let v = p().filter((C) => C.focusable).map((C) => C.ref.current);
811
837
  if (d === "last") v.reverse();
812
838
  else if (d === "prev" || d === "next") {
813
839
  d === "prev" && v.reverse();
814
- const T = v.indexOf(m.currentTarget);
815
- v = l.loop ? eo(v, T + 1) : v.slice(T + 1);
840
+ const C = v.indexOf(m.currentTarget);
841
+ v = l.loop ? to(v, C + 1) : v.slice(C + 1);
816
842
  }
817
- setTimeout(() => wt(v));
843
+ setTimeout(() => Tt(v));
818
844
  }
819
845
  })
820
846
  }
@@ -823,8 +849,8 @@ var Zr = f.forwardRef((e, t) => {
823
849
  );
824
850
  }
825
851
  );
826
- Tt.displayName = Ct;
827
- var Qr = {
852
+ Ct.displayName = wt;
853
+ var Xr = {
828
854
  ArrowLeft: "prev",
829
855
  ArrowUp: "prev",
830
856
  ArrowRight: "next",
@@ -834,23 +860,23 @@ var Qr = {
834
860
  PageDown: "last",
835
861
  End: "last"
836
862
  };
837
- function Xr(e, t) {
863
+ function Jr(e, t) {
838
864
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
839
865
  }
840
- function Jr(e, t, r) {
841
- const a = Xr(e.key, r);
866
+ function eo(e, t, r) {
867
+ const a = Jr(e.key, r);
842
868
  if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(a)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(a)))
843
- return Qr[a];
869
+ return Xr[a];
844
870
  }
845
- function wt(e, t = !1) {
871
+ function Tt(e, t = !1) {
846
872
  const r = document.activeElement;
847
873
  for (const a of e)
848
874
  if (a === r || (a.focus({ preventScroll: t }), document.activeElement !== r)) return;
849
875
  }
850
- function eo(e, t) {
876
+ function to(e, t) {
851
877
  return e.map((r, a) => e[(t + a) % e.length]);
852
878
  }
853
- var to = kt, ro = Tt, oo = "Toggle", xt = f.forwardRef((e, t) => {
879
+ var ro = kt, oo = Ct, ao = "Toggle", Nt = f.forwardRef((e, t) => {
854
880
  const { pressed: r, defaultPressed: a = !1, onPressedChange: n, ...i } = e, [s = !1, c] = pe({
855
881
  prop: r,
856
882
  onChange: n,
@@ -865,25 +891,25 @@ var to = kt, ro = Tt, oo = "Toggle", xt = f.forwardRef((e, t) => {
865
891
  "data-disabled": e.disabled ? "" : void 0,
866
892
  ...i,
867
893
  ref: t,
868
- onClick: K(e.onClick, () => {
894
+ onClick: W(e.onClick, () => {
869
895
  e.disabled || c(!s);
870
896
  })
871
897
  }
872
898
  );
873
899
  });
874
- xt.displayName = oo;
875
- var Q = "ToggleGroup", [Nt, ha] = ze(Q, [
900
+ Nt.displayName = ao;
901
+ var Q = "ToggleGroup", [xt, ga] = ze(Q, [
876
902
  yt
877
903
  ]), Et = yt(), Pe = E.forwardRef((e, t) => {
878
904
  const { type: r, ...a } = e;
879
905
  if (r === "single")
880
- return /* @__PURE__ */ o(ao, { ...a, ref: t });
881
- if (r === "multiple")
882
906
  return /* @__PURE__ */ o(no, { ...a, ref: t });
907
+ if (r === "multiple")
908
+ return /* @__PURE__ */ o(so, { ...a, ref: t });
883
909
  throw new Error(`Missing prop \`type\` expected on \`${Q}\``);
884
910
  });
885
911
  Pe.displayName = Q;
886
- var [It, St] = Nt(Q), ao = E.forwardRef((e, t) => {
912
+ var [It, St] = xt(Q), no = E.forwardRef((e, t) => {
887
913
  const {
888
914
  value: r,
889
915
  defaultValue: a,
@@ -906,7 +932,7 @@ var [It, St] = Nt(Q), ao = E.forwardRef((e, t) => {
906
932
  children: /* @__PURE__ */ o(_t, { ...i, ref: t })
907
933
  }
908
934
  );
909
- }), no = E.forwardRef((e, t) => {
935
+ }), so = E.forwardRef((e, t) => {
910
936
  const {
911
937
  value: r,
912
938
  defaultValue: a,
@@ -937,7 +963,7 @@ var [It, St] = Nt(Q), ao = E.forwardRef((e, t) => {
937
963
  );
938
964
  });
939
965
  Pe.displayName = Q;
940
- var [so, io] = Nt(Q), _t = E.forwardRef(
966
+ var [io, co] = xt(Q), _t = E.forwardRef(
941
967
  (e, t) => {
942
968
  const {
943
969
  __scopeToggleGroup: r,
@@ -948,8 +974,8 @@ var [so, io] = Nt(Q), _t = E.forwardRef(
948
974
  loop: c = !0,
949
975
  ...g
950
976
  } = e, l = Et(r), u = bt(s), p = { role: "group", dir: u, ...g };
951
- return /* @__PURE__ */ o(so, { scope: r, rovingFocus: n, disabled: a, children: n ? /* @__PURE__ */ o(
952
- to,
977
+ return /* @__PURE__ */ o(io, { scope: r, rovingFocus: n, disabled: a, children: n ? /* @__PURE__ */ o(
978
+ ro,
953
979
  {
954
980
  asChild: !0,
955
981
  ...l,
@@ -962,9 +988,9 @@ var [so, io] = Nt(Q), _t = E.forwardRef(
962
988
  }
963
989
  ), fe = "ToggleGroupItem", Rt = E.forwardRef(
964
990
  (e, t) => {
965
- const r = St(fe, e.__scopeToggleGroup), a = io(fe, e.__scopeToggleGroup), n = Et(e.__scopeToggleGroup), i = r.value.includes(e.value), s = a.disabled || e.disabled, c = { ...e, pressed: i, disabled: s }, g = E.useRef(null);
991
+ const r = St(fe, e.__scopeToggleGroup), a = co(fe, e.__scopeToggleGroup), n = Et(e.__scopeToggleGroup), i = r.value.includes(e.value), s = a.disabled || e.disabled, c = { ...e, pressed: i, disabled: s }, g = E.useRef(null);
966
992
  return a.rovingFocus ? /* @__PURE__ */ o(
967
- ro,
993
+ oo,
968
994
  {
969
995
  asChild: !0,
970
996
  ...n,
@@ -981,7 +1007,7 @@ var Ke = E.forwardRef(
981
1007
  (e, t) => {
982
1008
  const { __scopeToggleGroup: r, value: a, ...n } = e, i = St(fe, r), s = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, c = i.type === "single" ? s : void 0;
983
1009
  return /* @__PURE__ */ o(
984
- xt,
1010
+ Nt,
985
1011
  {
986
1012
  ...c,
987
1013
  ...n,
@@ -992,27 +1018,27 @@ var Ke = E.forwardRef(
992
1018
  }
993
1019
  );
994
1020
  }
995
- ), co = Pe, lo = Rt;
1021
+ ), lo = Pe, uo = Rt;
996
1022
  const At = E.createContext({
997
1023
  size: "medium",
998
1024
  focusMode: "system",
999
1025
  mode: "system"
1000
- }), uo = ({ focusMode: e }) => k("focus:outline", "focus:outline-2", "focus:outline-offset", {
1026
+ }), mo = ({ focusMode: e }) => k("focus:outline", "focus:outline-2", "focus:outline-offset", {
1001
1027
  "focus:outline-focus-light": e === "light",
1002
1028
  "focus:outline-focus-dark": e === "dark",
1003
1029
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1004
1030
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1005
- }), mo = ({ mode: e }) => k({
1031
+ }), ho = ({ mode: e }) => k({
1006
1032
  "data-[state=on]:bg-surface-medium": e === "dark",
1007
1033
  "data-[state=on]:bg-surface-lightest": e === "light",
1008
1034
  "data-[state=on]:bg-surface-lightest dark:data-[state=on]:bg-surface-medium": e === "system",
1009
1035
  "data-[state=on]:bg-surface-medium dark:data-[state=on]:bg-surface-lightest": e === "alt-system"
1010
- }), ho = ({ size: e }) => k({
1036
+ }), go = ({ size: e }) => k({
1011
1037
  "h-5 px-2": e === "small",
1012
1038
  "h-6 px-3": e === "medium",
1013
1039
  "h-7 px-4": e === "large"
1014
- }), go = ({ mode: e }) => k(
1015
- Rr,
1040
+ }), fo = ({ mode: e }) => k(
1041
+ Ar,
1016
1042
  "px-1",
1017
1043
  "relative",
1018
1044
  "border-r",
@@ -1025,26 +1051,26 @@ const At = E.createContext({
1025
1051
  "border-surface-light dark:border-surface-darker": e === "system",
1026
1052
  "border-surface-darker dark:border-surface-light": e === "alt-system"
1027
1053
  }
1028
- ), fo = ({
1054
+ ), po = ({
1029
1055
  focusMode: e,
1030
1056
  mode: t,
1031
1057
  size: r
1032
1058
  }) => ({
1033
- wrapperClass: go({ mode: t }),
1059
+ wrapperClass: fo({ mode: t }),
1034
1060
  itemClass: k(
1035
- Ar,
1061
+ Mr,
1036
1062
  "flex items-center justify-center bg-transparent",
1037
1063
  "rounded-sm",
1038
1064
  "transition duration-200 ease",
1039
- ho({ size: r }),
1040
- uo({ focusMode: e }),
1041
- mo({ mode: t })
1065
+ go({ size: r }),
1066
+ mo({ focusMode: e }),
1067
+ ho({ mode: t })
1042
1068
  )
1043
- }), po = ({
1069
+ }), bo = ({
1044
1070
  mode: e,
1045
1071
  className: t
1046
1072
  }) => k(
1047
- _r,
1073
+ Rr,
1048
1074
  "inline-flex p-1",
1049
1075
  "rounded-sm",
1050
1076
  {
@@ -1054,7 +1080,7 @@ const At = E.createContext({
1054
1080
  "bg-surface-darker text-copy-lighter dark:bg-surface-light dark:text-copy-dark": e === "alt-system"
1055
1081
  },
1056
1082
  t
1057
- ), bo = ({
1083
+ ), vo = ({
1058
1084
  children: e,
1059
1085
  value: t,
1060
1086
  onValueChange: r,
@@ -1066,9 +1092,9 @@ const At = E.createContext({
1066
1092
  className: g,
1067
1093
  ...l
1068
1094
  }) => {
1069
- const u = po({ mode: n, className: g }), p = { size: s, focusMode: i, mode: n };
1095
+ const u = bo({ mode: n, className: g }), p = { size: s, focusMode: i, mode: n };
1070
1096
  return /* @__PURE__ */ o(At.Provider, { value: p, children: /* @__PURE__ */ o(
1071
- co,
1097
+ lo,
1072
1098
  {
1073
1099
  disabled: a,
1074
1100
  className: u,
@@ -1080,14 +1106,14 @@ const At = E.createContext({
1080
1106
  children: e
1081
1107
  }
1082
1108
  ) });
1083
- }, vo = ({ value: e, disabled: t }) => {
1084
- const { size: r, focusMode: a, mode: n } = P(At), { itemClass: i, wrapperClass: s } = fo({
1109
+ }, yo = ({ value: e, disabled: t }) => {
1110
+ const { size: r, focusMode: a, mode: n } = B(At), { itemClass: i, wrapperClass: s } = po({
1085
1111
  focusMode: a,
1086
1112
  mode: n,
1087
1113
  size: r
1088
1114
  });
1089
1115
  return /* @__PURE__ */ o("div", { className: s, children: /* @__PURE__ */ o(
1090
- lo,
1116
+ uo,
1091
1117
  {
1092
1118
  disabled: t,
1093
1119
  className: i,
@@ -1109,7 +1135,7 @@ try {
1109
1135
  });
1110
1136
  } catch {
1111
1137
  }
1112
- const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Oe = "icon", yo = "button", ko = "link", Co = ({
1138
+ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko = "button", wo = "link", Co = ({
1113
1139
  type: e,
1114
1140
  size: t,
1115
1141
  labelRight: r,
@@ -1118,19 +1144,19 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Oe = "icon", yo =
1118
1144
  }) => {
1119
1145
  const i = "text-sm font-medium max-h-8 py-0 px-2", s = "text-base font-medium max-h-9 py-1 px-3", c = "text-lg font-medium max-h-12 py-2 px-4";
1120
1146
  switch (e) {
1121
- case yo:
1147
+ case ko:
1122
1148
  return k({
1123
1149
  [i]: t === "small",
1124
1150
  [s]: t === "medium",
1125
1151
  [c]: t === "large"
1126
1152
  });
1127
- case ko:
1153
+ case wo:
1128
1154
  return k("text-center", {
1129
1155
  [i]: t === "small",
1130
1156
  [s]: t === "medium",
1131
1157
  [c]: t === "large"
1132
1158
  });
1133
- case Oe:
1159
+ case Be:
1134
1160
  return k("inline-flex items-center", {
1135
1161
  "justify-center": n === "center",
1136
1162
  "justify-start": n === "left",
@@ -1200,7 +1226,7 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Oe = "icon", yo =
1200
1226
  "bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
1201
1227
  "bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
1202
1228
  });
1203
- }, wo = ({
1229
+ }, No = ({
1204
1230
  mode: e,
1205
1231
  disabled: t,
1206
1232
  variant: r
@@ -1270,7 +1296,7 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Oe = "icon", yo =
1270
1296
  "active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
1271
1297
  "active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
1272
1298
  });
1273
- }, No = ({
1299
+ }, Eo = ({
1274
1300
  mode: e,
1275
1301
  noBorder: t,
1276
1302
  variant: r
@@ -1305,7 +1331,7 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Oe = "icon", yo =
1305
1331
  "border-border-selected-dark dark:border-border-selected-medium": e === "system",
1306
1332
  "border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
1307
1333
  });
1308
- }, Eo = ({
1334
+ }, Io = ({
1309
1335
  focusMode: e
1310
1336
  }) => k("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1311
1337
  "focus:outline-focus-dark": e === "dark",
@@ -1345,32 +1371,32 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Oe = "icon", yo =
1345
1371
  labelLeft: u,
1346
1372
  align: m
1347
1373
  }),
1348
- No({ mode: a, variant: b, noBorder: g }),
1349
- Eo({ focusMode: n }),
1350
- wo({ mode: a, variant: b, disabled: i }),
1374
+ Eo({ mode: a, variant: b, noBorder: g }),
1375
+ Io({ focusMode: n }),
1376
+ No({ mode: a, variant: b, disabled: i }),
1351
1377
  xo({ mode: a, variant: b, disabled: i }),
1352
1378
  {
1353
1379
  "w-full": s,
1354
1380
  "disabled:cursor-not-allowed disabled:opacity-50": i
1355
1381
  },
1356
1382
  t
1357
- )), Io = (e, t, r) => {
1383
+ )), So = (e, t, r) => {
1358
1384
  var a;
1359
1385
  !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);
1360
- }, Be = E.forwardRef((e, t) => {
1386
+ }, Oe = E.forwardRef((e, t) => {
1361
1387
  const { onClick: r, noInternalClick: a = !1, ...n } = e;
1362
1388
  return /* @__PURE__ */ o(
1363
1389
  "button",
1364
1390
  {
1365
1391
  ref: t,
1366
1392
  onClick: (i) => {
1367
- Io(i, a, r);
1393
+ So(i, a, r);
1368
1394
  },
1369
1395
  ...n
1370
1396
  }
1371
1397
  );
1372
1398
  });
1373
- Be.displayName = "BaseButton";
1399
+ Oe.displayName = "BaseButton";
1374
1400
  const zt = E.forwardRef(
1375
1401
  ({
1376
1402
  children: e,
@@ -1390,10 +1416,10 @@ const zt = E.forwardRef(
1390
1416
  noBackground: m = !1,
1391
1417
  align: d = "center",
1392
1418
  radius: v = "large",
1393
- ...T
1394
- }, C) => {
1395
- const w = Mt({
1396
- type: Oe,
1419
+ ...C
1420
+ }, w) => {
1421
+ const T = Mt({
1422
+ type: Be,
1397
1423
  mode: r,
1398
1424
  focusMode: a,
1399
1425
  fullWidth: n,
@@ -1414,14 +1440,14 @@ const zt = E.forwardRef(
1414
1440
  "text-copy-light dark:text-copy-accent-dark": r === "system" && !c
1415
1441
  });
1416
1442
  return /* @__PURE__ */ y(
1417
- Be,
1443
+ Oe,
1418
1444
  {
1419
- ref: C,
1420
- className: w,
1445
+ ref: w,
1446
+ className: T,
1421
1447
  disabled: t,
1422
1448
  type: s,
1423
1449
  "aria-label": l || u,
1424
- ...T,
1450
+ ...C,
1425
1451
  children: [
1426
1452
  h && /* @__PURE__ */ o("span", { className: "pr-2", children: h }),
1427
1453
  /* @__PURE__ */ o("div", { className: S, children: e }),
@@ -1445,7 +1471,7 @@ try {
1445
1471
  });
1446
1472
  } catch {
1447
1473
  }
1448
- const So = E.forwardRef(
1474
+ const _o = E.forwardRef(
1449
1475
  ({
1450
1476
  children: e,
1451
1477
  disabled: t = !1,
@@ -1464,11 +1490,11 @@ const So = E.forwardRef(
1464
1490
  noBackground: m = !1,
1465
1491
  align: d = "center",
1466
1492
  active: v = !1,
1467
- radius: T = "large",
1468
- ...C
1469
- }, w) => {
1493
+ radius: C = "large",
1494
+ ...w
1495
+ }, T) => {
1470
1496
  const S = Mt({
1471
- type: Oe,
1497
+ type: Be,
1472
1498
  mode: r,
1473
1499
  focusMode: a,
1474
1500
  fullWidth: n,
@@ -1481,13 +1507,13 @@ const So = E.forwardRef(
1481
1507
  labelLeft: h,
1482
1508
  noBackground: m,
1483
1509
  align: d,
1484
- radius: T
1485
- }), A = k({
1510
+ radius: C
1511
+ }), M = k({
1486
1512
  "text-copy-accent-dark": r === "light" && !c,
1487
1513
  "text-copy-light": r === "dark" && !c,
1488
1514
  "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !c,
1489
1515
  "text-copy-light dark:text-copy-accent-dark": r === "system" && !c
1490
- }), M = v ? k(
1516
+ }), L = v ? k(
1491
1517
  "relative",
1492
1518
  "focus-within:static",
1493
1519
  "focus-within:after:border-transparent",
@@ -1504,26 +1530,26 @@ const So = E.forwardRef(
1504
1530
  "after:border-table-light dark:after:border-table-dark": r === "alt-system"
1505
1531
  }
1506
1532
  ) : "";
1507
- return /* @__PURE__ */ o("div", { className: M, children: /* @__PURE__ */ y(
1508
- Be,
1533
+ return /* @__PURE__ */ o("div", { className: L, children: /* @__PURE__ */ y(
1534
+ Oe,
1509
1535
  {
1510
- ref: w,
1536
+ ref: T,
1511
1537
  className: S,
1512
1538
  disabled: t,
1513
1539
  type: s,
1514
1540
  "aria-label": l || u,
1515
- ...C,
1541
+ ...w,
1516
1542
  children: [
1517
1543
  h && /* @__PURE__ */ o("span", { className: "pr-2", children: h }),
1518
- /* @__PURE__ */ o("div", { className: A, children: e }),
1544
+ /* @__PURE__ */ o("div", { className: M, children: e }),
1519
1545
  b && /* @__PURE__ */ o("span", { className: "pl-2", children: b })
1520
1546
  ]
1521
1547
  }
1522
1548
  ) });
1523
1549
  }
1524
1550
  );
1525
- So.displayName = "ButtonSort";
1526
- const _o = ({
1551
+ _o.displayName = "ButtonSort";
1552
+ const Ro = ({
1527
1553
  children: e,
1528
1554
  fill: t,
1529
1555
  viewBox: r,
@@ -1535,7 +1561,7 @@ const _o = ({
1535
1561
  ...g
1536
1562
  }) => {
1537
1563
  const l = k(i, a);
1538
- return /* @__PURE__ */ y(_, { children: [
1564
+ return /* @__PURE__ */ y(R, { children: [
1539
1565
  /* @__PURE__ */ o(
1540
1566
  "svg",
1541
1567
  {
@@ -1566,14 +1592,14 @@ try {
1566
1592
  });
1567
1593
  } catch {
1568
1594
  }
1569
- const Ro = ({
1595
+ const Ao = ({
1570
1596
  className: e,
1571
1597
  viewBox: t,
1572
1598
  title: r,
1573
1599
  monotone: a,
1574
1600
  ...n
1575
1601
  }) => /* @__PURE__ */ o(
1576
- _o,
1602
+ Ro,
1577
1603
  {
1578
1604
  defaultViewBox: "0 0 384 512",
1579
1605
  size: "size-5",
@@ -1598,7 +1624,7 @@ try {
1598
1624
  } catch {
1599
1625
  }
1600
1626
  const Lt = f.createContext(null);
1601
- function Ao({
1627
+ function Mo({
1602
1628
  initialOpen: e = !1,
1603
1629
  open: t,
1604
1630
  onOpenChange: r
@@ -1632,14 +1658,14 @@ const ve = () => {
1632
1658
  throw new Error("Modal components must be wrapped in <Modal />");
1633
1659
  return e;
1634
1660
  };
1635
- function Mo({
1661
+ function zo({
1636
1662
  children: e,
1637
1663
  ...t
1638
1664
  }) {
1639
- const r = Ao(t);
1665
+ const r = Mo(t);
1640
1666
  return /* @__PURE__ */ o(Lt.Provider, { value: r, children: e });
1641
1667
  }
1642
- const zo = f.forwardRef(function(e, t) {
1668
+ const Lo = f.forwardRef(function(e, t) {
1643
1669
  const { context: r, ...a } = ve(), n = Me([a.refs.setFloating, t]);
1644
1670
  if (!r.open)
1645
1671
  return null;
@@ -1647,7 +1673,7 @@ const zo = f.forwardRef(function(e, t) {
1647
1673
  [`${i}`]: i,
1648
1674
  "bg-black sm:bg-black/[.8]": !i
1649
1675
  });
1650
- return /* @__PURE__ */ o(ut, { children: /* @__PURE__ */ o(yr, { className: c, lockScroll: !0, children: /* @__PURE__ */ o(mt, { context: r, children: /* @__PURE__ */ o(
1676
+ return /* @__PURE__ */ o(ut, { children: /* @__PURE__ */ o(kr, { className: c, lockScroll: !0, children: /* @__PURE__ */ o(mt, { context: r, children: /* @__PURE__ */ o(
1651
1677
  "div",
1652
1678
  {
1653
1679
  ref: n,
@@ -1657,10 +1683,10 @@ const zo = f.forwardRef(function(e, t) {
1657
1683
  children: s.children
1658
1684
  }
1659
1685
  ) }) }) });
1660
- }), Lo = f.forwardRef(function({ children: e, ...t }, r) {
1686
+ }), Po = f.forwardRef(function({ children: e, ...t }, r) {
1661
1687
  const { setLabelId: a } = ve(), n = Ae();
1662
1688
  return f.useLayoutEffect(() => (a(n), () => a(void 0)), [n, a]), /* @__PURE__ */ o("h1", { ...t, ref: r, id: n, children: e });
1663
- }), Po = f.forwardRef(function({ children: e, ...t }, r) {
1689
+ }), Bo = f.forwardRef(function({ children: e, ...t }, r) {
1664
1690
  const { setDescriptionId: a } = ve(), n = Ae();
1665
1691
  return f.useLayoutEffect(() => (a(n), () => a(void 0)), [n, a]), /* @__PURE__ */ o("div", { ...t, ref: r, id: n, children: e });
1666
1692
  }), Oo = f.forwardRef(function(e, t) {
@@ -1684,7 +1710,7 @@ try {
1684
1710
  });
1685
1711
  } catch {
1686
1712
  }
1687
- const ee = "panel", ue = "messagebox", Bo = ({
1713
+ const ee = "panel", ue = "messagebox", Do = ({
1688
1714
  className: e,
1689
1715
  kind: t,
1690
1716
  borderMode: r
@@ -1704,7 +1730,7 @@ const ee = "panel", ue = "messagebox", Bo = ({
1704
1730
  footer: "flex flex-grow flex-col sm:p-4 p-2",
1705
1731
  header: "sm:p-4 mb-0 p-2",
1706
1732
  close: "sm:p-4 p-2"
1707
- }), Y = ({
1733
+ }), q = ({
1708
1734
  open: e,
1709
1735
  onOpenChange: t,
1710
1736
  title: r,
@@ -1714,10 +1740,10 @@ const ee = "panel", ue = "messagebox", Bo = ({
1714
1740
  kind: s = ee,
1715
1741
  className: c
1716
1742
  }) => {
1717
- const g = Z(""), l = Bo({ className: c, kind: s, borderMode: i });
1718
- return H(() => (e && (g.current = document.title, document.title = `${r} | ${g.current}`), () => {
1743
+ const g = Z(""), l = Do({ className: c, kind: s, borderMode: i });
1744
+ return G(() => (e && (g.current = document.title, document.title = `${r} | ${g.current}`), () => {
1719
1745
  e && (document.title = g.current);
1720
- }), [r, e]), /* @__PURE__ */ o(_, { children: e && /* @__PURE__ */ o(Mo, { open: e, onOpenChange: t, children: /* @__PURE__ */ y(zo, { className: l.main, children: [
1746
+ }), [r, e]), /* @__PURE__ */ o(R, { children: e && /* @__PURE__ */ o(zo, { open: e, onOpenChange: t, children: /* @__PURE__ */ y(Lo, { className: l.main, children: [
1721
1747
  /* @__PURE__ */ y("div", { className: "flex flex-row-reverse items-center justify-between", children: [
1722
1748
  /* @__PURE__ */ o(
1723
1749
  Oo,
@@ -1730,50 +1756,50 @@ const ee = "panel", ue = "messagebox", Bo = ({
1730
1756
  focusMode: "light",
1731
1757
  noBorder: !0,
1732
1758
  label: "Close",
1733
- children: /* @__PURE__ */ o(Ro, {})
1759
+ children: /* @__PURE__ */ o(Ao, {})
1734
1760
  }
1735
1761
  )
1736
1762
  }
1737
1763
  ),
1738
- /* @__PURE__ */ o(Lo, { className: l.header, children: r })
1764
+ /* @__PURE__ */ o(Po, { className: l.header, children: r })
1739
1765
  ] }),
1740
- /* @__PURE__ */ o(Po, { className: l.content, children: a }),
1766
+ /* @__PURE__ */ o(Bo, { className: l.content, children: a }),
1741
1767
  n && /* @__PURE__ */ o("div", { className: l.footer, children: n })
1742
1768
  ] }) }) });
1743
- }, Do = ({ stats: e }) => {
1769
+ }, Vo = ({ stats: e }) => {
1744
1770
  const t = (e == null ? void 0 : e.plugins) || [], r = (e == null ? void 0 : e.version) || "", a = (e == null ? void 0 : e.models) || [], n = ae(), i = ae();
1745
- return /* @__PURE__ */ y(_, { children: [
1771
+ return /* @__PURE__ */ y(R, { children: [
1746
1772
  /* @__PURE__ */ o("div", { className: "mb-4", children: /* @__PURE__ */ o(
1747
- L,
1773
+ P,
1748
1774
  {
1749
- header: x.ABOUT.TITLE_CLIENT,
1775
+ header: N.ABOUT.TITLE_CLIENT,
1750
1776
  className: "prose-dark dark:prose-lighter",
1751
1777
  children: oe(n, {
1752
- [x.ABOUT.VERSION]: "5.12.0",
1753
- [x.ABOUT.BUILD_TIMESTAMP]: "12/31/2024 01:38 PM EST"
1778
+ [N.ABOUT.VERSION]: "5.14.0",
1779
+ [N.ABOUT.BUILD_TIMESTAMP]: "12/31/2024 08:31 PM EST"
1754
1780
  })
1755
1781
  }
1756
1782
  ) }),
1757
1783
  /* @__PURE__ */ o(
1758
- L,
1784
+ P,
1759
1785
  {
1760
- header: x.ABOUT.TITLE_SERVER,
1786
+ header: N.ABOUT.TITLE_SERVER,
1761
1787
  className: "prose-dark dark:prose-lighter",
1762
1788
  children: oe(i, {
1763
- [x.ABOUT.VERSION]: r,
1764
- [he(x.ABOUT.ENGINE, a.length)]: /* @__PURE__ */ o(_, { children: a.map((s) => /* @__PURE__ */ o("div", { className: "text-right", children: s }, s)) }),
1765
- [he(x.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ o(_, { children: t.map((s) => /* @__PURE__ */ o("div", { className: "text-right", children: s }, s)) })
1789
+ [N.ABOUT.VERSION]: r,
1790
+ [he(N.ABOUT.ENGINE, a.length)]: /* @__PURE__ */ o(R, { children: a.map((s) => /* @__PURE__ */ o("div", { className: "text-right", children: s }, s)) }),
1791
+ [he(N.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ o(R, { children: t.map((s) => /* @__PURE__ */ o("div", { className: "text-right", children: s }, s)) })
1766
1792
  })
1767
1793
  }
1768
1794
  )
1769
1795
  ] });
1770
- }, Vo = ({
1796
+ }, $o = ({
1771
1797
  open: e,
1772
1798
  onOpenChange: t
1773
1799
  }) => {
1774
- const { serverStats: r } = P(ie);
1775
- return /* @__PURE__ */ o(Y, { open: e, onOpenChange: t, title: Dt, children: /* @__PURE__ */ o(Do, { stats: r }) });
1776
- }, $o = (e) => Qe(e), Fo = (e) => {
1800
+ const { serverStats: r } = B(ie);
1801
+ return /* @__PURE__ */ o(q, { open: e, onOpenChange: t, title: Dt, children: /* @__PURE__ */ o(Vo, { stats: r }) });
1802
+ }, Fo = (e) => Qe(e), Ho = (e) => {
1777
1803
  if (!e || e.length === 0)
1778
1804
  return $t;
1779
1805
  const t = e.filter(
@@ -1784,50 +1810,50 @@ const ee = "panel", ue = "messagebox", Bo = ({
1784
1810
  ).map((r) => r.message.processingTime);
1785
1811
  return Ht({
1786
1812
  data: t,
1787
- formatter: $o
1813
+ formatter: Fo
1788
1814
  });
1789
- }, Ho = ({
1815
+ }, Go = ({
1790
1816
  isAuthenticated: e,
1791
1817
  stats: t
1792
1818
  }) => {
1793
- const { state: r } = P(ie), a = Gt - Number(r == null ? void 0 : r.usage), n = ae(), i = ae();
1794
- return e ? /* @__PURE__ */ y(_, { children: [
1819
+ const { state: r } = B(ie), a = Gt - Number(r == null ? void 0 : r.usage), n = ae(), i = ae();
1820
+ return e ? /* @__PURE__ */ y(R, { children: [
1795
1821
  r && r.messages.length > 0 && /* @__PURE__ */ o("div", { className: "mb-4", children: /* @__PURE__ */ o(
1796
- L,
1822
+ P,
1797
1823
  {
1798
- header: x.CURRENT_STATISTICS.TITLE,
1824
+ header: N.CURRENT_STATISTICS.TITLE,
1799
1825
  className: "prose-dark dark:prose-lighter",
1800
1826
  children: oe(n, {
1801
- [x.CURRENT_STATISTICS.MODEL_NAME]: (r == null ? void 0 : r.model) || te,
1802
- [x.CURRENT_STATISTICS.TOKENS_USED]: r == null ? void 0 : r.usage,
1803
- [x.CURRENT_STATISTICS.REMAINING_TOKENS]: Vt.format(a),
1804
- [x.CURRENT_STATISTICS.PROCESSING_TIME]: Fo(r == null ? void 0 : r.messages)
1827
+ [N.CURRENT_STATISTICS.MODEL_NAME]: (r == null ? void 0 : r.model) || te,
1828
+ [N.CURRENT_STATISTICS.TOKENS_USED]: r == null ? void 0 : r.usage,
1829
+ [N.CURRENT_STATISTICS.REMAINING_TOKENS]: Vt.format(a),
1830
+ [N.CURRENT_STATISTICS.PROCESSING_TIME]: Ho(r == null ? void 0 : r.messages)
1805
1831
  })
1806
1832
  }
1807
1833
  ) }),
1808
1834
  /* @__PURE__ */ o(
1809
- L,
1835
+ P,
1810
1836
  {
1811
- header: x.MAIN_STATISTICS.TITLE,
1837
+ header: N.MAIN_STATISTICS.TITLE,
1812
1838
  className: "prose-dark dark:prose-lighter",
1813
1839
  children: oe(i, {
1814
- [he(x.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
1815
- [x.MAIN_STATISTICS.PROCESSING_TIME]: Qe(
1840
+ [he(N.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
1841
+ [N.MAIN_STATISTICS.PROCESSING_TIME]: Qe(
1816
1842
  t.averageProcessingTimes
1817
1843
  )
1818
1844
  })
1819
1845
  }
1820
1846
  )
1821
1847
  ] }) : null;
1822
- }, Go = ({
1848
+ }, Uo = ({
1823
1849
  open: e,
1824
1850
  onOpenChange: t
1825
1851
  }) => {
1826
1852
  const [r, a] = I({
1827
1853
  averageProcessingTimes: 0,
1828
1854
  totalChats: 0
1829
- }), { isAuthenticated: n, getAccessToken: i, user: s } = W();
1830
- return H(() => {
1855
+ }), { isAuthenticated: n, getAccessToken: i, user: s } = Y();
1856
+ return G(() => {
1831
1857
  !e || !s || (async () => {
1832
1858
  try {
1833
1859
  const c = await D({
@@ -1841,7 +1867,7 @@ const ee = "panel", ue = "messagebox", Bo = ({
1841
1867
  } catch {
1842
1868
  }
1843
1869
  })();
1844
- }, [e, i, s]), /* @__PURE__ */ o(Y, { open: e, onOpenChange: t, title: Xe, children: /* @__PURE__ */ o(Ho, { isAuthenticated: n, stats: r }) });
1870
+ }, [e, i, s]), /* @__PURE__ */ o(q, { open: e, onOpenChange: t, title: Xe, children: /* @__PURE__ */ o(Go, { isAuthenticated: n, stats: r }) });
1845
1871
  }, Pt = ({
1846
1872
  showConfirmation: e,
1847
1873
  setShowConfirmation: t,
@@ -1849,14 +1875,14 @@ const ee = "panel", ue = "messagebox", Bo = ({
1849
1875
  children: a,
1850
1876
  customStrings: n
1851
1877
  }) => /* @__PURE__ */ o(
1852
- Y,
1878
+ q,
1853
1879
  {
1854
1880
  kind: "messagebox",
1855
1881
  open: e,
1856
1882
  onOpenChange: t,
1857
1883
  title: n.title,
1858
- footer: /* @__PURE__ */ y(q, { columnGap: 2, alignHorizontal: "flex-end", children: [
1859
- /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o(
1884
+ footer: /* @__PURE__ */ y(H, { columnGap: 2, alignHorizontal: "flex-end", children: [
1885
+ /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(
1860
1886
  F,
1861
1887
  {
1862
1888
  mode: "dark",
@@ -1868,7 +1894,7 @@ const ee = "panel", ue = "messagebox", Bo = ({
1868
1894
  children: n.cancelAction
1869
1895
  }
1870
1896
  ) }),
1871
- /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o(
1897
+ /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(
1872
1898
  F,
1873
1899
  {
1874
1900
  mode: "dark",
@@ -1883,7 +1909,7 @@ const ee = "panel", ue = "messagebox", Bo = ({
1883
1909
  ] }),
1884
1910
  children: a
1885
1911
  }
1886
- ), Uo = async (e, t, r, a) => {
1912
+ ), jo = async (e, t, r, a) => {
1887
1913
  try {
1888
1914
  const n = await D({
1889
1915
  accessToken: a,
@@ -1905,43 +1931,43 @@ const ee = "panel", ue = "messagebox", Bo = ({
1905
1931
  }), r(!1));
1906
1932
  } catch {
1907
1933
  }
1908
- }, jo = ({
1934
+ }, Ko = ({
1909
1935
  filteredHistory: e,
1910
1936
  setFilteredHistory: t,
1911
1937
  dispatch: r,
1912
1938
  onOpenChange: a
1913
1939
  }) => {
1914
1940
  var m;
1915
- const { user: n, getAccessToken: i } = W(), s = Z({
1941
+ const { user: n, getAccessToken: i } = Y(), s = Z({
1916
1942
  id: 0,
1917
1943
  timestamp: "",
1918
1944
  message: ""
1919
- }), [c, g] = I(!1), { state: l, dispatch: u } = P(rt), [, p] = ce({
1945
+ }), [c, g] = I(!1), { state: l, dispatch: u } = B(rt), [, p] = ce({
1920
1946
  key: se + Ut,
1921
1947
  initialValue: l.sortDirection
1922
1948
  }), b = (d) => {
1923
1949
  switch (l.sortDirection) {
1924
- case U.ASC:
1925
- p(U.DESC), u({
1950
+ case j.ASC:
1951
+ p(j.DESC), u({
1926
1952
  type: Ve,
1927
1953
  payload: {
1928
1954
  sortedCell: d,
1929
- sortDirection: U.DESC
1955
+ sortDirection: j.DESC
1930
1956
  }
1931
1957
  });
1932
1958
  break;
1933
1959
  default:
1934
- p(U.ASC), u({
1960
+ p(j.ASC), u({
1935
1961
  type: Ve,
1936
1962
  payload: {
1937
1963
  sortedCell: d,
1938
- sortDirection: U.ASC
1964
+ sortDirection: j.ASC
1939
1965
  }
1940
1966
  });
1941
1967
  break;
1942
1968
  }
1943
1969
  };
1944
- return /* @__PURE__ */ y(_, { children: [
1970
+ return /* @__PURE__ */ y(R, { children: [
1945
1971
  /* @__PURE__ */ y(
1946
1972
  Pt,
1947
1973
  {
@@ -1996,7 +2022,7 @@ const ee = "panel", ue = "messagebox", Bo = ({
1996
2022
  compact: !0,
1997
2023
  wrapperClassName: "max-h-[60vh] min-h-[60vh]",
1998
2024
  children: [
1999
- /* @__PURE__ */ o(ar, { children: /* @__PURE__ */ y(we, { children: [
2025
+ /* @__PURE__ */ o(ar, { children: /* @__PURE__ */ y(Te, { children: [
2000
2026
  /* @__PURE__ */ o(
2001
2027
  nr,
2002
2028
  {
@@ -2016,8 +2042,8 @@ const ee = "panel", ue = "messagebox", Bo = ({
2016
2042
  /* @__PURE__ */ o($, { className: "text-xs sm:text-sm text-right", children: "Actions" })
2017
2043
  ] }) }),
2018
2044
  /* @__PURE__ */ o(sr, { children: e.data.map((d, v) => {
2019
- var T, C;
2020
- return ((T = d == null ? void 0 : d.messages) == null ? void 0 : T.length) > 0 ? /* @__PURE__ */ y(we, { children: [
2045
+ var C, w;
2046
+ return ((C = d == null ? void 0 : d.messages) == null ? void 0 : C.length) > 0 ? /* @__PURE__ */ y(Te, { children: [
2021
2047
  /* @__PURE__ */ o(
2022
2048
  $,
2023
2049
  {
@@ -2034,53 +2060,53 @@ const ee = "panel", ue = "messagebox", Bo = ({
2034
2060
  style: {
2035
2061
  wordBreak: "break-word"
2036
2062
  },
2037
- children: d.messages.length > 0 ? (C = d.messages[0]) == null ? void 0 : C.content : ""
2063
+ children: d.messages.length > 0 ? (w = d.messages[0]) == null ? void 0 : w.content : ""
2038
2064
  }
2039
2065
  ),
2040
- /* @__PURE__ */ o($, { component: "th", scope: "row", className: "text-gray-400", children: /* @__PURE__ */ y(q, { alignHorizontal: "center", children: [
2066
+ /* @__PURE__ */ o($, { component: "th", scope: "row", className: "text-gray-400", children: /* @__PURE__ */ y(H, { alignHorizontal: "center", children: [
2041
2067
  d.model && d.model.startsWith("claude") && /* @__PURE__ */ o(ht, { size: "size-4 sm:size-5" }),
2042
2068
  d.model && d.model.startsWith("gpt") && /* @__PURE__ */ o(gt, { size: "size-4 sm:size-5" })
2043
2069
  ] }) }),
2044
2070
  /* @__PURE__ */ o($, { className: "px-2", children: /* @__PURE__ */ y("div", { className: "flex justify-end gap-2", children: [
2045
2071
  /* @__PURE__ */ o(
2046
- j,
2072
+ K,
2047
2073
  {
2048
2074
  focusMode: "alt-system",
2049
2075
  noBorder: !0,
2050
2076
  label: "Restore chat",
2051
2077
  onClick: async () => {
2052
- const w = await i();
2053
- Uo(
2078
+ const T = await i();
2079
+ jo(
2054
2080
  d,
2055
2081
  r,
2056
2082
  a,
2057
- w
2083
+ T
2058
2084
  );
2059
2085
  },
2060
- children: /* @__PURE__ */ o(Er, { size: "size-3", monotone: !0 })
2086
+ children: /* @__PURE__ */ o(Ir, { size: "size-3", monotone: !0 })
2061
2087
  }
2062
2088
  ),
2063
2089
  /* @__PURE__ */ o(
2064
- j,
2090
+ K,
2065
2091
  {
2066
2092
  focusMode: "alt-system",
2067
2093
  noBorder: !0,
2068
2094
  label: "Delete chat",
2069
2095
  onClick: () => {
2070
- var w;
2096
+ var T;
2071
2097
  s.current = {
2072
2098
  id: d.id,
2073
2099
  timestamp: d.timestamp,
2074
- message: d.messages.length > 0 ? (w = d.messages[0]) == null ? void 0 : w.content : ""
2100
+ message: d.messages.length > 0 ? (T = d.messages[0]) == null ? void 0 : T.content : ""
2075
2101
  }, g(!c);
2076
2102
  },
2077
2103
  children: /* @__PURE__ */ o("div", { className: "text-red-400", children: /* @__PURE__ */ o(Tr, { size: "size-3", monotone: !0 }) })
2078
2104
  }
2079
2105
  )
2080
2106
  ] }) })
2081
- ] }, `${x.HISTORY.TITLE}-${d.id}-${v}`) : null;
2107
+ ] }, `${N.HISTORY.TITLE}-${d.id}-${v}`) : null;
2082
2108
  }) }),
2083
- /* @__PURE__ */ o(ir, { children: /* @__PURE__ */ o(we, { children: /* @__PURE__ */ o($, { colSpan: 4, children: /* @__PURE__ */ o("div", { children: he(
2109
+ /* @__PURE__ */ o(ir, { children: /* @__PURE__ */ o(Te, { children: /* @__PURE__ */ o($, { colSpan: 4, children: /* @__PURE__ */ o("div", { children: he(
2084
2110
  `${e.data.length} chat`,
2085
2111
  e.data.length
2086
2112
  ) }) }) }) })
@@ -2092,7 +2118,7 @@ const ee = "panel", ue = "messagebox", Bo = ({
2092
2118
  searchString: e,
2093
2119
  username: t,
2094
2120
  accessToken: r,
2095
- direction: a = U.ASC
2121
+ direction: a = j.ASC
2096
2122
  }) => {
2097
2123
  if (!t)
2098
2124
  return [];
@@ -2114,22 +2140,22 @@ const ee = "panel", ue = "messagebox", Bo = ({
2114
2140
  return [];
2115
2141
  }
2116
2142
  return [];
2117
- }, Ko = ({ onOpenChange: e }) => {
2118
- const { isAuthenticated: t, getAccessToken: r, user: a } = W(), n = Z(null), i = Z(!1), { dispatch: s } = P(ie), { state: c, dispatch: g } = P(rt), [, l] = ce({
2143
+ }, Wo = ({ onOpenChange: e }) => {
2144
+ const { isAuthenticated: t, getAccessToken: r, user: a } = Y(), n = Z(null), i = Z(!1), { dispatch: s } = B(ie), { state: c, dispatch: g } = B(rt), [, l] = ce({
2119
2145
  key: se + Kt,
2120
2146
  initialValue: c.searchString
2121
2147
  }), [u, p] = I({
2122
2148
  data: [],
2123
2149
  sortedDirection: c.sortDirection
2124
2150
  }), b = async (d) => {
2125
- const v = await r(), T = await Ze({
2151
+ const v = await r(), C = await Ze({
2126
2152
  searchString: d,
2127
2153
  username: a == null ? void 0 : a.username,
2128
2154
  accessToken: v,
2129
2155
  direction: c.sortDirection
2130
2156
  });
2131
2157
  p({
2132
- data: T,
2158
+ data: C,
2133
2159
  sortedDirection: c.sortDirection
2134
2160
  }), l(d), g({
2135
2161
  type: Wt,
@@ -2140,7 +2166,7 @@ const ee = "panel", ue = "messagebox", Bo = ({
2140
2166
  }, 500), m = async (d) => {
2141
2167
  d.preventDefault();
2142
2168
  };
2143
- return H(() => {
2169
+ return G(() => {
2144
2170
  i.current || (async () => {
2145
2171
  i.current = !0;
2146
2172
  const d = await r(), v = await Ze({
@@ -2154,12 +2180,12 @@ const ee = "panel", ue = "messagebox", Bo = ({
2154
2180
  sortedDirection: c.sortDirection
2155
2181
  });
2156
2182
  })();
2157
- }), H(() => {
2183
+ }), G(() => {
2158
2184
  if (c.sortDirection !== u.sortedDirection) {
2159
- const d = [...u.data].sort((v, T) => {
2185
+ const d = [...u.data].sort((v, C) => {
2160
2186
  if (c.sortedCell === "timestamp") {
2161
- const C = new Date(v[c.sortedCell]).getTime(), w = new Date(T[c.sortedCell]).getTime();
2162
- return c.sortDirection === U.ASC ? C - w : w - C;
2187
+ const w = new Date(v[c.sortedCell]).getTime(), T = new Date(C[c.sortedCell]).getTime();
2188
+ return c.sortDirection === j.ASC ? w - T : T - w;
2163
2189
  }
2164
2190
  return 0;
2165
2191
  });
@@ -2168,9 +2194,9 @@ const ee = "panel", ue = "messagebox", Bo = ({
2168
2194
  sortedDirection: c.sortDirection
2169
2195
  });
2170
2196
  }
2171
- }, [u, c]), t ? u && u.data && /* @__PURE__ */ y(_, { children: [
2197
+ }, [u, c]), t ? u && u.data && /* @__PURE__ */ y(R, { children: [
2172
2198
  /* @__PURE__ */ o("form", { autoComplete: "off", onSubmit: m, children: /* @__PURE__ */ o(
2173
- Ne,
2199
+ xe,
2174
2200
  {
2175
2201
  autoCapitalize: "off",
2176
2202
  autoComplete: "off",
@@ -2204,7 +2230,7 @@ const ee = "panel", ue = "messagebox", Bo = ({
2204
2230
  }
2205
2231
  ) }),
2206
2232
  /* @__PURE__ */ o("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ o(
2207
- jo,
2233
+ Ko,
2208
2234
  {
2209
2235
  filteredHistory: u,
2210
2236
  setFilteredHistory: p,
@@ -2213,10 +2239,10 @@ const ee = "panel", ue = "messagebox", Bo = ({
2213
2239
  }
2214
2240
  ) })
2215
2241
  ] }) : null;
2216
- }, Wo = ({
2242
+ }, Yo = ({
2217
2243
  open: e,
2218
2244
  onOpenChange: t
2219
- }) => /* @__PURE__ */ o(Y, { open: e, onOpenChange: t, title: qt, children: /* @__PURE__ */ o(Ko, { onOpenChange: t }) });
2245
+ }) => /* @__PURE__ */ o(q, { open: e, onOpenChange: t, title: qt, children: /* @__PURE__ */ o(Wo, { onOpenChange: t }) });
2220
2246
  /*!
2221
2247
  @versini/ui-toggle v2.0.5
2222
2248
  © 2024 gizmette.com
@@ -2230,7 +2256,7 @@ try {
2230
2256
  });
2231
2257
  } catch {
2232
2258
  }
2233
- const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo = ({
2259
+ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo = ({
2234
2260
  focusMode: e
2235
2261
  }) => k(
2236
2262
  "peer-focus:outline",
@@ -2242,14 +2268,14 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2242
2268
  "peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
2243
2269
  "peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
2244
2270
  }
2245
- ), Qo = () => k(
2271
+ ), Xo = () => k(
2246
2272
  "peer-checked:after:translate-x-full",
2247
2273
  // background color when checked
2248
2274
  "peer-checked:bg-violet-500",
2249
2275
  // knob circle and border color when checked
2250
2276
  "peer-checked:after:bg-white",
2251
2277
  "peer-checked:after:border-white"
2252
- ), Xo = () => k(
2278
+ ), Jo = () => k(
2253
2279
  "after:left-[2px]",
2254
2280
  "after:top-[2px]",
2255
2281
  "after:border",
@@ -2261,7 +2287,7 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2261
2287
  "after:rounded-full",
2262
2288
  "after:transition-all",
2263
2289
  "after:content-['']"
2264
- ), Jo = ({
2290
+ ), ea = ({
2265
2291
  mode: e,
2266
2292
  noBorder: t
2267
2293
  }) => k({
@@ -2270,7 +2296,7 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2270
2296
  "border-border-light bg-surface-darker": e === "dark",
2271
2297
  "border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
2272
2298
  "border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
2273
- }), ea = ({
2299
+ }), ta = ({
2274
2300
  mode: e,
2275
2301
  labelHidden: t
2276
2302
  }) => t ? "sr-only" : k("ml-2 text-sm", {
@@ -2278,11 +2304,11 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2278
2304
  "text-copy-lighter": e === "dark",
2279
2305
  "text-copy-lighter dark:text-copy-dark": e === "alt-system",
2280
2306
  "text-copy-dark dark:text-copy-lighter": e === "system"
2281
- }), ta = ({ className: e }) => k(
2282
- Yo,
2307
+ }), ra = ({ className: e }) => k(
2308
+ qo,
2283
2309
  "relative flex cursor-pointer items-center",
2284
2310
  e
2285
- ), ra = ({
2311
+ ), oa = ({
2286
2312
  mode: e,
2287
2313
  focusMode: t,
2288
2314
  labelHidden: r,
@@ -2290,15 +2316,15 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2290
2316
  noBorder: n
2291
2317
  }) => ({
2292
2318
  toggle: k(
2293
- qo(),
2294
- Jo({ mode: e, noBorder: n }),
2295
- Zo({ focusMode: t }),
2296
- Xo(),
2297
- Qo()
2319
+ Zo(),
2320
+ ea({ mode: e, noBorder: n }),
2321
+ Qo({ focusMode: t }),
2322
+ Jo(),
2323
+ Xo()
2298
2324
  ),
2299
- label: ea({ mode: e, labelHidden: r }),
2325
+ label: ta({ mode: e, labelHidden: r }),
2300
2326
  input: "peer sr-only",
2301
- wrapper: ta({ className: a })
2327
+ wrapper: ra({ className: a })
2302
2328
  }), re = ({
2303
2329
  checked: e = !1,
2304
2330
  onChange: t,
@@ -2310,7 +2336,7 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2310
2336
  className: c,
2311
2337
  noBorder: g = !1
2312
2338
  }) => {
2313
- const l = ra({
2339
+ const l = oa({
2314
2340
  mode: i,
2315
2341
  focusMode: s,
2316
2342
  labelHidden: a,
@@ -2333,11 +2359,11 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2333
2359
  /* @__PURE__ */ o("div", { className: l.toggle }),
2334
2360
  /* @__PURE__ */ o("span", { className: l.label, children: r })
2335
2361
  ] });
2336
- }, oa = ({
2362
+ }, aa = ({
2337
2363
  open: e,
2338
2364
  onOpenChange: t
2339
2365
  }) => {
2340
- const { dispatch: r } = P(ie), { getAccessToken: a, user: n } = W(), [i, s] = I({
2366
+ const { dispatch: r } = B(ie), { getAccessToken: a, user: n } = Y(), [i, s] = I({
2341
2367
  loaded: !1,
2342
2368
  instructions: "",
2343
2369
  loadingLocation: !1,
@@ -2380,18 +2406,18 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2380
2406
  latitude: m.latitude,
2381
2407
  longitude: m.longitude
2382
2408
  }
2383
- }), T = Date.now() - h;
2384
- if (T < 2e3 && await new Promise((C) => setTimeout(C, 2e3 - T)), d.status === 200) {
2385
- const { city: C, state: w, country: S, displayName: A } = d.data, M = C && w && S ? `${C}, ${w}, ${S}` : A;
2386
- s((R) => ({
2387
- ...R,
2409
+ }), C = Date.now() - h;
2410
+ if (C < 2e3 && await new Promise((w) => setTimeout(w, 2e3 - C)), d.status === 200) {
2411
+ const { city: w, state: T, country: S, displayName: M } = d.data, L = w && T && S ? `${w}, ${T}, ${S}` : M;
2412
+ s((A) => ({
2413
+ ...A,
2388
2414
  loaded: !0,
2389
- location: M,
2415
+ location: L,
2390
2416
  loadingLocation: !1
2391
2417
  }));
2392
2418
  } else
2393
- s((C) => ({
2394
- ...C,
2419
+ s((w) => ({
2420
+ ...w,
2395
2421
  loaded: !0,
2396
2422
  location: "",
2397
2423
  loadingLocation: !1
@@ -2401,15 +2427,15 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2401
2427
  }, p = (h) => {
2402
2428
  s((m) => ({
2403
2429
  ...m,
2404
- engine: h ? Te : me
2430
+ engine: h ? Ce : me
2405
2431
  }));
2406
2432
  }, b = (h) => {
2407
2433
  s((m) => ({
2408
2434
  ...m,
2409
- engine: h ? me : Te
2435
+ engine: h ? me : Ce
2410
2436
  }));
2411
2437
  };
2412
- return H(() => {
2438
+ return G(() => {
2413
2439
  if (!e || !n) {
2414
2440
  s({
2415
2441
  loaded: !1,
@@ -2439,20 +2465,20 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2439
2465
  } catch {
2440
2466
  }
2441
2467
  })();
2442
- }, [n, e]), /* @__PURE__ */ o(_, { children: i.loaded && /* @__PURE__ */ o(
2443
- Y,
2468
+ }, [n, e]), /* @__PURE__ */ o(R, { children: i.loaded && /* @__PURE__ */ o(
2469
+ q,
2444
2470
  {
2445
2471
  open: e,
2446
2472
  onOpenChange: t,
2447
2473
  title: "Engine Fine Tuning",
2448
2474
  footer: /* @__PURE__ */ y(
2449
- q,
2475
+ H,
2450
2476
  {
2451
2477
  columnGap: 2,
2452
2478
  alignHorizontal: "flex-end",
2453
2479
  className: "pb-8 sm:pb-0",
2454
2480
  children: [
2455
- /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o(
2481
+ /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(
2456
2482
  F,
2457
2483
  {
2458
2484
  mode: "dark",
@@ -2464,7 +2490,7 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2464
2490
  children: "Cancel"
2465
2491
  }
2466
2492
  ) }),
2467
- /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o(
2493
+ /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(
2468
2494
  F,
2469
2495
  {
2470
2496
  mode: "dark",
@@ -2479,9 +2505,9 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2479
2505
  ]
2480
2506
  }
2481
2507
  ),
2482
- children: /* @__PURE__ */ y(_, { children: [
2508
+ children: /* @__PURE__ */ y(R, { children: [
2483
2509
  /* @__PURE__ */ y(
2484
- L,
2510
+ P,
2485
2511
  {
2486
2512
  header: "AI Engine",
2487
2513
  className: "prose-dark dark:prose-lighter",
@@ -2494,7 +2520,7 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2494
2520
  label: "OpenAI",
2495
2521
  name: "OpenAI",
2496
2522
  onChange: p,
2497
- checked: i.engine === Te
2523
+ checked: i.engine === Ce
2498
2524
  }
2499
2525
  ),
2500
2526
  /* @__PURE__ */ o(
@@ -2525,7 +2551,7 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2525
2551
  }
2526
2552
  ),
2527
2553
  /* @__PURE__ */ y(
2528
- L,
2554
+ P,
2529
2555
  {
2530
2556
  header: "Custom Instructions",
2531
2557
  className: "prose-dark dark:prose-lighter mt-4",
@@ -2559,7 +2585,7 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2559
2585
  }
2560
2586
  ),
2561
2587
  /* @__PURE__ */ y(
2562
- L,
2588
+ P,
2563
2589
  {
2564
2590
  header: "Location",
2565
2591
  className: "prose-dark dark:prose-lighter mt-4",
@@ -2599,11 +2625,11 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2599
2625
  ] })
2600
2626
  }
2601
2627
  ) });
2602
- }, aa = ({
2628
+ }, na = ({
2603
2629
  open: e,
2604
2630
  onOpenChange: t
2605
2631
  }) => {
2606
- const { state: r, dispatch: a } = P(cr), { getAccessToken: n, user: i } = W(), [s, c] = I({
2632
+ const { state: r, dispatch: a } = B(cr), { getAccessToken: n, user: i } = Y(), [s, c] = I({
2607
2633
  tags: [...r.tags]
2608
2634
  }), g = ({
2609
2635
  slot: u,
@@ -2617,11 +2643,11 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2617
2643
  label: b,
2618
2644
  content: h,
2619
2645
  enabled: p
2620
- }, T = d.findIndex((C) => C.slot === u);
2621
- return T === -1 ? {
2646
+ }, C = d.findIndex((w) => w.slot === u);
2647
+ return C === -1 ? {
2622
2648
  ...m,
2623
2649
  tags: [...d, { ...v, slot: u }]
2624
- } : (d[T] = v, {
2650
+ } : (d[C] = v, {
2625
2651
  ...m,
2626
2652
  tags: [...d]
2627
2653
  });
@@ -2646,19 +2672,19 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2646
2672
  }
2647
2673
  };
2648
2674
  return /* @__PURE__ */ y(
2649
- Y,
2675
+ q,
2650
2676
  {
2651
2677
  open: e,
2652
2678
  onOpenChange: t,
2653
2679
  title: "Tags",
2654
2680
  footer: /* @__PURE__ */ y(
2655
- q,
2681
+ H,
2656
2682
  {
2657
2683
  columnGap: 2,
2658
2684
  alignHorizontal: "flex-end",
2659
2685
  className: "pb-8 sm:pb-0",
2660
2686
  children: [
2661
- /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o(
2687
+ /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(
2662
2688
  F,
2663
2689
  {
2664
2690
  mode: "dark",
@@ -2670,7 +2696,7 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2670
2696
  children: "Cancel"
2671
2697
  }
2672
2698
  ) }),
2673
- /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o(
2699
+ /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(
2674
2700
  F,
2675
2701
  {
2676
2702
  mode: "dark",
@@ -2688,14 +2714,14 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2688
2714
  children: [
2689
2715
  /* @__PURE__ */ o("p", { children: Xt }),
2690
2716
  s.tags && s.tags.map((u) => /* @__PURE__ */ y(
2691
- L,
2717
+ P,
2692
2718
  {
2693
2719
  header: `Tag ${u.slot + 1}`,
2694
2720
  className: "prose-dark dark:prose-lighter mb-2",
2695
2721
  children: [
2696
- /* @__PURE__ */ y(q, { className: "mt-8 mb-6", columnGap: 2, rowGap: 6, children: [
2697
- /* @__PURE__ */ o(z, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
2698
- Ne,
2722
+ /* @__PURE__ */ y(H, { className: "mt-8 mb-6", columnGap: 2, rowGap: 6, children: [
2723
+ /* @__PURE__ */ o(_, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
2724
+ xe,
2699
2725
  {
2700
2726
  label: "Label",
2701
2727
  name: `tag${u.slot}-label`,
@@ -2710,8 +2736,8 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2710
2736
  }
2711
2737
  }
2712
2738
  ) }),
2713
- /* @__PURE__ */ o(z, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
2714
- Ne,
2739
+ /* @__PURE__ */ o(_, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
2740
+ xe,
2715
2741
  {
2716
2742
  label: "Content",
2717
2743
  name: `tag${u.slot}-content`,
@@ -2752,8 +2778,8 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2752
2778
  ]
2753
2779
  }
2754
2780
  );
2755
- }, na = () => {
2756
- const { isAuthenticated: e, user: t, registeringForPasskey: r, authenticationType: a } = W(), [n, i] = ce({
2781
+ }, sa = () => {
2782
+ const { isAuthenticated: e, user: t, registeringForPasskey: r, authenticationType: a } = Y(), [n, i] = ce({
2757
2783
  key: se + er,
2758
2784
  initialValue: !1
2759
2785
  }), [s, c] = I(!1), [g, l] = I(!1), u = ae(), p = (t == null ? void 0 : t.username) || "", b = (d) => {
@@ -2763,38 +2789,38 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2763
2789
  }, m = () => {
2764
2790
  l(!g);
2765
2791
  };
2766
- return e && p ? /* @__PURE__ */ y(_, { children: [
2792
+ return e && p ? /* @__PURE__ */ y(R, { children: [
2767
2793
  s && /* @__PURE__ */ o(
2768
- oa,
2794
+ aa,
2769
2795
  {
2770
2796
  open: s,
2771
2797
  onOpenChange: c
2772
2798
  }
2773
2799
  ),
2774
- g && /* @__PURE__ */ o(aa, { open: g, onOpenChange: l }),
2800
+ g && /* @__PURE__ */ o(na, { open: g, onOpenChange: l }),
2775
2801
  /* @__PURE__ */ y(
2776
- L,
2802
+ P,
2777
2803
  {
2778
- header: x.PREFERENCES.TITLE,
2804
+ header: N.PREFERENCES.TITLE,
2779
2805
  className: "prose-dark dark:prose-lighter",
2780
2806
  children: [
2781
2807
  oe(u, {
2782
- [x.PREFERENCES.NAME]: p,
2783
- [x.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
2784
- [x.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ o(
2808
+ [N.PREFERENCES.NAME]: p,
2809
+ [N.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
2810
+ [N.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ o(
2785
2811
  re,
2786
2812
  {
2787
2813
  noBorder: !0,
2788
2814
  labelHidden: !0,
2789
- label: x.PREFERENCES.ENGINE_DETAILS,
2790
- name: x.PREFERENCES.ENGINE_DETAILS,
2815
+ label: N.PREFERENCES.ENGINE_DETAILS,
2816
+ name: N.PREFERENCES.ENGINE_DETAILS,
2791
2817
  onChange: b,
2792
2818
  checked: n
2793
2819
  }
2794
2820
  )
2795
2821
  }),
2796
2822
  /* @__PURE__ */ o(
2797
- j,
2823
+ K,
2798
2824
  {
2799
2825
  className: "mt-2",
2800
2826
  size: "small",
@@ -2804,7 +2830,7 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2804
2830
  }
2805
2831
  ),
2806
2832
  /* @__PURE__ */ o(
2807
- j,
2833
+ K,
2808
2834
  {
2809
2835
  className: "mt-2 ml-2",
2810
2836
  size: "small",
@@ -2817,22 +2843,22 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2817
2843
  }
2818
2844
  ),
2819
2845
  a !== tr.PASSKEY && /* @__PURE__ */ y(
2820
- L,
2846
+ P,
2821
2847
  {
2822
2848
  className: "prose-dark dark:prose-lighter mt-4",
2823
- header: /* @__PURE__ */ o("h2", { className: "m-0", children: /* @__PURE__ */ y(q, { columnGap: 3, alignVertical: "center", children: [
2824
- /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o($e, { size: "size-8" }) }),
2825
- /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o("div", { children: x.PREFERENCES.PASSKEY_TITLE }) })
2849
+ header: /* @__PURE__ */ o("h2", { className: "m-0", children: /* @__PURE__ */ y(H, { columnGap: 3, alignVertical: "center", children: [
2850
+ /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o($e, { size: "size-8" }) }),
2851
+ /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o("div", { children: N.PREFERENCES.PASSKEY_TITLE }) })
2826
2852
  ] }) }),
2827
2853
  children: [
2828
- /* @__PURE__ */ o("p", { children: x.PREFERENCES.PASSKEY_INSTRUCTIONS }),
2854
+ /* @__PURE__ */ o("p", { children: N.PREFERENCES.PASSKEY_INSTRUCTIONS }),
2829
2855
  /* @__PURE__ */ o(
2830
- j,
2856
+ K,
2831
2857
  {
2832
2858
  size: "small",
2833
2859
  className: "mt-2",
2834
2860
  onClick: r,
2835
- labelLeft: x.PREFERENCES.PASSKEY_BUTTON,
2861
+ labelLeft: N.PREFERENCES.PASSKEY_BUTTON,
2836
2862
  children: /* @__PURE__ */ o($e, { size: "size-5", monotone: !0 })
2837
2863
  }
2838
2864
  )
@@ -2840,27 +2866,27 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2840
2866
  }
2841
2867
  )
2842
2868
  ] }) : null;
2843
- }, sa = ({
2869
+ }, ia = ({
2844
2870
  open: e,
2845
2871
  onOpenChange: t
2846
- }) => /* @__PURE__ */ o(Y, { open: e, onOpenChange: t, title: rr, children: /* @__PURE__ */ o(na, {}) }), ga = () => {
2847
- const { state: e, dispatch: t, serverStats: r } = P(ie), [a, n] = I((e == null ? void 0 : e.engine) || te), [i, s] = I(!1), [c, g] = I(!1), [l, u] = I(!1), [p, b] = I(!1), [h, m] = I(!1), [d] = ce({
2872
+ }) => /* @__PURE__ */ o(q, { open: e, onOpenChange: t, title: rr, children: /* @__PURE__ */ o(sa, {}) }), fa = () => {
2873
+ const { state: e, dispatch: t, serverStats: r } = B(ie), [a, n] = I((e == null ? void 0 : e.engine) || te), [i, s] = I(!1), [c, g] = I(!1), [l, u] = I(!1), [p, b] = I(!1), [h, m] = I(!1), [d] = ce({
2848
2874
  key: se + et,
2849
2875
  initialValue: !1
2850
- }), { logout: v, getAccessToken: T, user: C } = W(), w = () => {
2876
+ }), { logout: v, getAccessToken: C, user: w } = Y(), T = () => {
2851
2877
  s(!i);
2852
2878
  }, S = () => {
2853
2879
  g(!c);
2854
- }, A = () => {
2855
- u(!l);
2856
2880
  }, M = () => {
2881
+ u(!l);
2882
+ }, L = () => {
2857
2883
  b(!p);
2858
- }, R = () => {
2884
+ }, A = () => {
2859
2885
  m(!h);
2860
2886
  };
2861
- return H(() => {
2887
+ return G(() => {
2862
2888
  e && e.engine && e.engine !== a && n(e.engine);
2863
- }, [e, a]), /* @__PURE__ */ y(_, { children: [
2889
+ }, [e, a]), /* @__PURE__ */ y(R, { children: [
2864
2890
  /* @__PURE__ */ o(
2865
2891
  Pt,
2866
2892
  {
@@ -2875,108 +2901,111 @@ const Yo = "av-toggle", qo = () => k("peer", "h-6", "w-11", "rounded-full"), Zo
2875
2901
  children: /* @__PURE__ */ o("p", { children: "Are you sure you want to log out?" })
2876
2902
  }
2877
2903
  ),
2878
- /* @__PURE__ */ o(sa, { open: i, onOpenChange: s }),
2879
- /* @__PURE__ */ o(Go, { open: c, onOpenChange: g }),
2880
- /* @__PURE__ */ o(Wo, { open: l, onOpenChange: u }),
2881
- /* @__PURE__ */ o(Vo, { open: p, onOpenChange: b }),
2882
- /* @__PURE__ */ y("div", { className: "relative", children: [
2883
- d && r && /* @__PURE__ */ o("div", { className: "absolute bottom-[-28px] left-[-7px]", children: /* @__PURE__ */ o(
2884
- Ie,
2885
- {
2886
- mode: "dark",
2887
- focusMode: "light",
2888
- trigger: /* @__PURE__ */ o(j, { children: e && e.engine === me ? /* @__PURE__ */ o(ht, {}) : /* @__PURE__ */ o(gt, {}) }),
2889
- defaultPlacement: "bottom-start",
2890
- children: /* @__PURE__ */ o(G, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ o(
2891
- bo,
2892
- {
2893
- size: "small",
2894
- mode: "dark",
2895
- focusMode: "light",
2896
- value: a,
2897
- onValueChange: async (N) => {
2898
- if (N)
2899
- try {
2900
- await D({
2901
- accessToken: await T(),
2902
- type: V.SET_USER_PREFERENCES,
2903
- params: {
2904
- user: C == null ? void 0 : C.username,
2905
- engine: N
2906
- }
2907
- }), t({
2908
- type: tt,
2909
- payload: {
2910
- engine: N
2911
- }
2912
- }), t({
2913
- type: Je
2914
- });
2915
- } catch {
2916
- }
2917
- },
2918
- children: r && r.engines.map((N) => /* @__PURE__ */ o(vo, { value: N }, N))
2919
- }
2920
- ) })
2921
- }
2922
- ) }),
2923
- /* @__PURE__ */ o("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ y(
2924
- Ie,
2925
- {
2926
- mode: "dark",
2927
- focusMode: "light",
2928
- trigger: /* @__PURE__ */ o(j, { children: /* @__PURE__ */ o(Ir, {}) }),
2929
- defaultPlacement: "bottom-end",
2930
- children: [
2931
- /* @__PURE__ */ o(
2932
- G,
2933
- {
2934
- label: "Profile",
2935
- onClick: w,
2936
- icon: /* @__PURE__ */ o(Nr, {})
2937
- }
2938
- ),
2939
- /* @__PURE__ */ o(
2940
- G,
2941
- {
2942
- label: Xe,
2943
- onClick: S,
2944
- icon: /* @__PURE__ */ o(Cr, {})
2945
- }
2946
- ),
2947
- /* @__PURE__ */ o(
2948
- G,
2949
- {
2950
- label: "History",
2951
- onClick: A,
2952
- icon: /* @__PURE__ */ o(wr, {})
2953
- }
2954
- ),
2955
- /* @__PURE__ */ o(
2956
- G,
2904
+ /* @__PURE__ */ o(ia, { open: i, onOpenChange: s }),
2905
+ /* @__PURE__ */ o(Uo, { open: c, onOpenChange: g }),
2906
+ /* @__PURE__ */ o(Yo, { open: l, onOpenChange: u }),
2907
+ /* @__PURE__ */ o($o, { open: p, onOpenChange: b }),
2908
+ /* @__PURE__ */ o("div", { className: "sticky top-0 bg-slate-900 py-4", children: /* @__PURE__ */ y(H, { alignHorizontal: "space-between", alignVertical: "center", children: [
2909
+ /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(lr, { mode: "dark", radius: "large" }) }),
2910
+ /* @__PURE__ */ o(_, { children: /* @__PURE__ */ y(H, { children: [
2911
+ d && r && /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(
2912
+ Ie,
2913
+ {
2914
+ mode: "dark",
2915
+ focusMode: "light",
2916
+ trigger: /* @__PURE__ */ o(K, { className: "mr-2", children: e && e.engine === me ? /* @__PURE__ */ o(ht, {}) : /* @__PURE__ */ o(gt, {}) }),
2917
+ defaultPlacement: "bottom-start",
2918
+ children: /* @__PURE__ */ o(U, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ o(
2919
+ vo,
2957
2920
  {
2958
- label: "About",
2959
- onClick: M,
2960
- icon: /* @__PURE__ */ o(xr, {})
2921
+ size: "small",
2922
+ mode: "dark",
2923
+ focusMode: "light",
2924
+ value: a,
2925
+ onValueChange: async (x) => {
2926
+ if (x)
2927
+ try {
2928
+ await D({
2929
+ accessToken: await C(),
2930
+ type: V.SET_USER_PREFERENCES,
2931
+ params: {
2932
+ user: w == null ? void 0 : w.username,
2933
+ engine: x
2934
+ }
2935
+ }), t({
2936
+ type: tt,
2937
+ payload: {
2938
+ engine: x
2939
+ }
2940
+ }), t({
2941
+ type: Je
2942
+ });
2943
+ } catch {
2944
+ }
2945
+ },
2946
+ children: r && r.engines.map((x) => /* @__PURE__ */ o(yo, { value: x }, x))
2961
2947
  }
2962
- ),
2963
- e && e.id && !e.isComponent && /* @__PURE__ */ y(_, { children: [
2964
- /* @__PURE__ */ o(Sr, {}),
2948
+ ) })
2949
+ }
2950
+ ) }),
2951
+ /* @__PURE__ */ o(_, { children: /* @__PURE__ */ y(
2952
+ Ie,
2953
+ {
2954
+ mode: "dark",
2955
+ focusMode: "light",
2956
+ trigger: /* @__PURE__ */ o(K, { children: /* @__PURE__ */ o(Sr, {}) }),
2957
+ defaultPlacement: "bottom-end",
2958
+ children: [
2965
2959
  /* @__PURE__ */ o(
2966
- G,
2960
+ U,
2967
2961
  {
2968
- label: "Log out",
2969
- onClick: R,
2970
- icon: /* @__PURE__ */ o("div", { className: "text-red-700", children: /* @__PURE__ */ o(kr, { monotone: !0 }) })
2962
+ label: "Profile",
2963
+ onClick: T,
2964
+ icon: /* @__PURE__ */ o(Er, {})
2971
2965
  }
2972
- )
2973
- ] })
2974
- ]
2975
- }
2976
- ) })
2977
- ] })
2966
+ ),
2967
+ /* @__PURE__ */ o(
2968
+ U,
2969
+ {
2970
+ label: Xe,
2971
+ onClick: S,
2972
+ icon: /* @__PURE__ */ o(Cr, {})
2973
+ }
2974
+ ),
2975
+ /* @__PURE__ */ o(
2976
+ U,
2977
+ {
2978
+ label: "History",
2979
+ onClick: M,
2980
+ icon: /* @__PURE__ */ o(Nr, {})
2981
+ }
2982
+ ),
2983
+ /* @__PURE__ */ o(
2984
+ U,
2985
+ {
2986
+ label: "About",
2987
+ onClick: L,
2988
+ icon: /* @__PURE__ */ o(xr, {})
2989
+ }
2990
+ ),
2991
+ e && e.id && !e.isComponent && /* @__PURE__ */ y(R, { children: [
2992
+ /* @__PURE__ */ o(_r, {}),
2993
+ /* @__PURE__ */ o(
2994
+ U,
2995
+ {
2996
+ label: "Log out",
2997
+ onClick: A,
2998
+ icon: /* @__PURE__ */ o("div", { className: "text-red-700", children: /* @__PURE__ */ o(wr, { monotone: !0 }) })
2999
+ }
3000
+ )
3001
+ ] })
3002
+ ]
3003
+ }
3004
+ ) })
3005
+ ] }) })
3006
+ ] }) })
2978
3007
  ] });
2979
3008
  };
2980
3009
  export {
2981
- ga as default
3010
+ fa as default
2982
3011
  };