@versini/sassysaint 5.4.1 → 5.4.3

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,26 +1,26 @@
1
- import { jsx as r, jsxs as y, Fragment as A } from "react/jsx-runtime";
2
- import { g as O, E as B, CARDS as N, renderDataAsList as se, pluralize as be, AppContext as ue, ABOUT_TITLE as At, DEFAULT_AI_ENGINE as ne, numberFormatter as Mt, durationFormatter as Xe, NA as Lt, ROLE_ASSISTANT as Pt, extractAverage as $t, GPT4_MAX_TOKENS as Bt, un as X, STATS as Ze, b as ie, j as $, R as G, HistoryContext as Je, LOCAL_STORAGE_PREFIX as me, LOCAL_STORAGE_SORT as zt, O as Y, ACTION_RESET as Qe, ACTION_RESTORE as Ot, truncate as Dt, ACTION_SORT as we, LOCAL_STORAGE_SEARCH as Vt, me as xe, ACTION_SEARCH as Ft, HISTORY_TITLE as Ht, LOCAL_STORAGE_ENGINE_TOGGLE as et, ENGINE_OPENAI as Te, ENGINE_ANTHROPIC as fe, APP_NAME as Gt, ACTION_ENGINE as tt, getCurrentGeoLocation as Ut, TagsContext as jt, TAGS_DESCRIPTION as Kt, ACTION_SET_TAGS as Wt, LOCAL_STORAGE_CHAT_DETAILS as Yt, M as qt, v as Oe, PROFILE_TITLE as Xt, LOG_OUT as De } from "./index.-helPLAD.js";
3
- import { serviceCall as F, SERVICE_TYPES as H, E as he, f as V, ge as Zt, he as Jt, ue as Ne, de as P, pe as Qt, me as eo, be as to, we as Ve, n as Fe } from "./index.DJ18bmQK.js";
4
- import * as f from "react";
5
- import x, { useId as oo, forwardRef as ot, useState as S, useRef as le, useContext as z, useEffect as U, Suspense as ro, lazy as no, useMemo as ao } from "react";
6
- import w from "clsx";
7
- import { useFloatingTree as rt, useFloatingNodeId as so, useListItem as nt, useFloating as io, offset as lo, flip as co, shift as uo, autoUpdate as mo, useClick as ho, useRole as go, useDismiss as po, useListNavigation as fo, useTypeahead as bo, useInteractions as vo, useMergeRefs as at, FloatingNode as yo, FloatingList as ko, FloatingPortal as Co, FloatingFocusManager as wo, FloatingTree as To } from "@floating-ui/react";
1
+ import { jsx as r, jsxs as v, Fragment as A } from "react/jsx-runtime";
2
+ import { g as z, E as $, CARDS as w, renderDataAsList as se, pluralize as be, AppContext as ue, ABOUT_TITLE as At, DEFAULT_AI_ENGINE as ae, numberFormatter as Mt, durationFormatter as Xe, NA as Pt, ROLE_ASSISTANT as Lt, extractAverage as $t, GPT4_MAX_TOKENS as Bt, un as X, STATS as Ze, b as ie, j as L, R as G, HistoryContext as Je, LOCAL_STORAGE_PREFIX as me, LOCAL_STORAGE_SORT as zt, O as W, ACTION_RESET as Qe, ACTION_RESTORE as Ot, truncate as Dt, ACTION_SORT as Te, LOCAL_STORAGE_SEARCH as Vt, me as xe, ACTION_SEARCH as Ft, HISTORY_TITLE as Ht, LOCAL_STORAGE_ENGINE_TOGGLE as et, ENGINE_OPENAI as we, ENGINE_ANTHROPIC as fe, APP_NAME as Gt, ACTION_ENGINE as tt, getCurrentGeoLocation as Ut, TagsContext as jt, TAGS_DESCRIPTION as Kt, ACTION_SET_TAGS as Wt, LOCAL_STORAGE_CHAT_DETAILS as Yt, M as qt, v as Oe, PROFILE_TITLE as Xt, LOG_OUT as De } from "./index.C2RuFHK-.js";
3
+ import { serviceCall as V, SERVICE_TYPES as F, E as he, f as D, ge as Zt, he as Jt, ue as Ne, pe as Qt, de as H, me as eo, be as to, we as Ve, n as Fe } from "./index.CnlfkUg1.js";
4
+ import * as b from "react";
5
+ import x, { useId as oo, forwardRef as ot, useState as S, useRef as le, useContext as B, useEffect as q, Suspense as ro, lazy as ao, useMemo as no } from "react";
6
+ import C from "clsx";
7
+ import { useFloatingTree as rt, useFloatingNodeId as so, useListItem as at, useFloating as io, offset as lo, flip as co, shift as uo, autoUpdate as mo, useClick as ho, useRole as go, useDismiss as po, useListNavigation as fo, useTypeahead as bo, useInteractions as vo, useMergeRefs as nt, FloatingNode as yo, FloatingList as ko, FloatingPortal as Co, FloatingFocusManager as To, FloatingTree as wo } from "@floating-ui/react";
8
8
  const st = ({
9
9
  className: e,
10
10
  viewBox: t,
11
11
  spacing: o,
12
- title: n,
13
- monotone: a,
12
+ title: a,
13
+ monotone: n,
14
14
  ...s
15
15
  }) => /* @__PURE__ */ r(
16
- O,
16
+ z,
17
17
  {
18
18
  defaultViewBox: "0 0 256 176",
19
19
  defaultClassName: "size-5",
20
20
  viewBox: t,
21
21
  className: e,
22
22
  spacing: o,
23
- title: n || "Anthropic",
23
+ title: a || "Anthropic",
24
24
  ...s,
25
25
  children: /* @__PURE__ */ r("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" })
26
26
  }
@@ -28,24 +28,24 @@ const st = ({
28
28
  className: e,
29
29
  viewBox: t,
30
30
  spacing: o,
31
- title: n,
32
- monotone: a,
31
+ title: a,
32
+ monotone: n,
33
33
  ...s
34
- }) => /* @__PURE__ */ y(
35
- O,
34
+ }) => /* @__PURE__ */ v(
35
+ z,
36
36
  {
37
37
  defaultViewBox: "0 0 512 512",
38
38
  defaultClassName: "size-5",
39
39
  viewBox: t,
40
40
  className: e,
41
41
  spacing: o,
42
- title: n || "Back",
42
+ title: a || "Back",
43
43
  ...s,
44
44
  children: [
45
45
  /* @__PURE__ */ r(
46
46
  "path",
47
47
  {
48
- opacity: a ? "1" : "0.4",
48
+ opacity: n ? "1" : "0.4",
49
49
  d: "M288.4 93.4c2.9-17.4 19.4-29.2 36.9-26.3C431.3 84.9 512 177 512 288c0 123.7-100.3 224-224 224C177 512 84.9 431.3 67.1 325.3c-2.9-17.4 8.8-33.9 26.3-36.9s33.9 8.8 36.9 26.3C142.9 390.4 208.8 448 288 448c88.4 0 160-71.6 160-160c0-79.2-57.6-145.1-133.3-157.8c-17.4-2.9-29.2-19.4-26.3-36.9z"
50
50
  }
51
51
  ),
@@ -56,24 +56,24 @@ const st = ({
56
56
  className: e,
57
57
  viewBox: t,
58
58
  spacing: o,
59
- title: n,
60
- monotone: a,
59
+ title: a,
60
+ monotone: n,
61
61
  ...s
62
- }) => /* @__PURE__ */ y(
63
- O,
62
+ }) => /* @__PURE__ */ v(
63
+ z,
64
64
  {
65
65
  defaultViewBox: "0 0 448 512",
66
66
  defaultClassName: "size-5",
67
67
  viewBox: t,
68
68
  className: e,
69
69
  spacing: o,
70
- title: n || "Chart",
70
+ title: a || "Chart",
71
71
  ...s,
72
72
  children: [
73
73
  /* @__PURE__ */ r(
74
74
  "path",
75
75
  {
76
- opacity: a ? "1" : "0.4",
76
+ opacity: n ? "1" : "0.4",
77
77
  d: "M160 80c0-26.5 21.5-48 48-48h32c26.5 0 48 21.5 48 48V432c0 26.5-21.5 48-48 48H208c-26.5 0-48-21.5-48-48V80z"
78
78
  }
79
79
  ),
@@ -84,24 +84,24 @@ const st = ({
84
84
  className: e,
85
85
  viewBox: t,
86
86
  spacing: o,
87
- title: n,
88
- monotone: a,
87
+ title: a,
88
+ monotone: n,
89
89
  ...s
90
- }) => /* @__PURE__ */ y(
91
- O,
90
+ }) => /* @__PURE__ */ v(
91
+ z,
92
92
  {
93
93
  defaultViewBox: "0 0 448 512",
94
94
  defaultClassName: "size-5",
95
95
  viewBox: t,
96
96
  className: e,
97
97
  spacing: o,
98
- title: n || "Delete",
98
+ title: a || "Delete",
99
99
  ...s,
100
100
  children: [
101
101
  /* @__PURE__ */ r(
102
102
  "path",
103
103
  {
104
- opacity: a ? "1" : "0.4",
104
+ opacity: n ? "1" : "0.4",
105
105
  d: "M416 96H32V448c0 35.3 28.7 64 64 64H352c35.3 0 64-28.7 64-64V96zM144 176V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16zm96 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16zm96 0V400c0 8.8-7.2 16-16 16s-16-7.2-16-16V176c0-8.8 7.2-16 16-16s16 7.2 16 16z"
106
106
  }
107
107
  ),
@@ -112,24 +112,24 @@ const st = ({
112
112
  className: e,
113
113
  viewBox: t,
114
114
  spacing: o,
115
- title: n,
116
- monotone: a,
115
+ title: a,
116
+ monotone: n,
117
117
  ...s
118
- }) => /* @__PURE__ */ y(
119
- O,
118
+ }) => /* @__PURE__ */ v(
119
+ z,
120
120
  {
121
121
  defaultViewBox: "0 0 512 512",
122
122
  defaultClassName: "size-5",
123
123
  viewBox: t,
124
124
  className: e,
125
125
  spacing: o,
126
- title: n || "History",
126
+ title: a || "History",
127
127
  ...s,
128
128
  children: [
129
129
  /* @__PURE__ */ r(
130
130
  "path",
131
131
  {
132
- opacity: a ? "1" : "0.4",
132
+ opacity: n ? "1" : "0.4",
133
133
  d: "M120.2 120.2C155 85.5 203 64 256 64c106 0 192 86 192 192s-86 192-192 192c-40.8 0-78.6-12.7-109.7-34.4c-14.5-10.1-34.4-6.6-44.6 7.9s-6.6 34.4 7.9 44.6C151.2 495 201.7 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C185.3 0 121.3 28.7 75 75L41 41C25.9 25.9 0 36.6 0 57.9V168c0 13.3 10.7 24 24 24H134.1c21.4 0 32.1-25.9 17-41l-30.8-30.8z"
134
134
  }
135
135
  ),
@@ -140,18 +140,18 @@ const st = ({
140
140
  className: e,
141
141
  viewBox: t,
142
142
  spacing: o,
143
- title: n,
144
- monotone: a,
143
+ title: a,
144
+ monotone: n,
145
145
  ...s
146
- }) => /* @__PURE__ */ y(
147
- O,
146
+ }) => /* @__PURE__ */ v(
147
+ z,
148
148
  {
149
149
  defaultViewBox: "0 0 512 512",
150
150
  defaultClassName: "size-5",
151
151
  viewBox: t,
152
152
  className: e,
153
153
  spacing: o,
154
- title: n || "Info",
154
+ title: a || "Info",
155
155
  ...s,
156
156
  children: [
157
157
  /* @__PURE__ */ r(
@@ -168,18 +168,18 @@ const st = ({
168
168
  className: e,
169
169
  viewBox: t,
170
170
  spacing: o,
171
- title: n,
172
- monotone: a,
171
+ title: a,
172
+ monotone: n,
173
173
  ...s
174
174
  }) => /* @__PURE__ */ r(
175
- O,
175
+ z,
176
176
  {
177
177
  defaultViewBox: "0 0 24 24",
178
178
  defaultClassName: "size-5",
179
179
  viewBox: t,
180
180
  className: e,
181
181
  spacing: o,
182
- title: n || "OpenAI",
182
+ title: a || "OpenAI",
183
183
  ...s,
184
184
  children: /* @__PURE__ */ r(
185
185
  "path",
@@ -193,18 +193,18 @@ const st = ({
193
193
  className: e,
194
194
  viewBox: t,
195
195
  spacing: o,
196
- title: n,
197
- monotone: a,
196
+ title: a,
197
+ monotone: n,
198
198
  ...s
199
- }) => /* @__PURE__ */ y(
200
- O,
199
+ }) => /* @__PURE__ */ v(
200
+ z,
201
201
  {
202
202
  defaultViewBox: "0 0 576 512",
203
203
  defaultClassName: "size-5",
204
204
  viewBox: t,
205
205
  className: e,
206
206
  spacing: o,
207
- title: n || "Profile",
207
+ title: a || "Profile",
208
208
  ...s,
209
209
  children: [
210
210
  /* @__PURE__ */ r(
@@ -221,24 +221,24 @@ const st = ({
221
221
  className: e,
222
222
  viewBox: t,
223
223
  spacing: o,
224
- title: n,
225
- monotone: a,
224
+ title: a,
225
+ monotone: n,
226
226
  ...s
227
- }) => /* @__PURE__ */ y(
228
- O,
227
+ }) => /* @__PURE__ */ v(
228
+ z,
229
229
  {
230
230
  defaultViewBox: "0 0 512 512",
231
231
  defaultClassName: "size-5",
232
232
  viewBox: t,
233
233
  className: e,
234
234
  spacing: o,
235
- title: n || "Restore",
235
+ title: a || "Restore",
236
236
  ...s,
237
237
  children: [
238
238
  /* @__PURE__ */ r(
239
239
  "path",
240
240
  {
241
- opacity: a ? "1" : "0.4",
241
+ opacity: n ? "1" : "0.4",
242
242
  d: "M208 64H432c8.8 0 16 7.2 16 16V304c0 8.8-7.2 16-16 16H416v64h16c44.2 0 80-35.8 80-80V80c0-44.2-35.8-80-80-80H208c-44.2 0-80 35.8-80 80V96h64V80c0-8.8 7.2-16 16-16z"
243
243
  }
244
244
  ),
@@ -249,18 +249,18 @@ const st = ({
249
249
  className: e,
250
250
  viewBox: t,
251
251
  spacing: o,
252
- title: n,
253
- monotone: a,
252
+ title: a,
253
+ monotone: n,
254
254
  ...s
255
255
  }) => /* @__PURE__ */ r(
256
- O,
256
+ z,
257
257
  {
258
258
  defaultViewBox: "0 0 448 512",
259
259
  defaultClassName: "size-5",
260
260
  viewBox: t,
261
261
  className: e,
262
262
  spacing: o,
263
- title: n || "Settings",
263
+ title: a || "Settings",
264
264
  ...s,
265
265
  children: /* @__PURE__ */ r("path", { d: "M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z" })
266
266
  }
@@ -268,7 +268,7 @@ const st = ({
268
268
  function ce(e) {
269
269
  return oo();
270
270
  }
271
- const Ie = f.createContext({
271
+ const Ie = b.createContext({
272
272
  getItemProps: () => ({}),
273
273
  activeIndex: null,
274
274
  /* v8 ignore next 2 */
@@ -293,20 +293,20 @@ const Ie = f.createContext({
293
293
  trigger: e,
294
294
  children: t,
295
295
  label: o = "Open menu",
296
- defaultPlacement: n = "bottom-start",
297
- onOpenChange: a,
296
+ defaultPlacement: a = "bottom-start",
297
+ onOpenChange: n,
298
298
  spacing: s,
299
299
  mode: i = "system",
300
- focusMode: c = "system",
300
+ focusMode: l = "system",
301
301
  ...h
302
- }, m) => {
303
- const [l, p] = S(!1), [v, d] = S(!1), [u, b] = S(null), C = le([]), g = le([]), k = z(Ie), T = rt(), I = so(), M = nt(), { floatingStyles: _, refs: D, context: E } = io({
302
+ }, d) => {
303
+ const [c, p] = S(!1), [y, u] = S(!1), [m, f] = S(null), g = le([]), k = le([]), T = B(Ie), N = rt(), I = so(), M = at(), { floatingStyles: _, refs: O, context: E } = io({
304
304
  nodeId: I,
305
- open: l,
305
+ open: c,
306
306
  onOpenChange: (oe) => {
307
- p(oe), a == null || a(oe);
307
+ p(oe), n == null || n(oe);
308
308
  },
309
- placement: n,
309
+ placement: a,
310
310
  strategy: "fixed",
311
311
  middleware: [lo({ mainAxis: 10 }), co(), uo()],
312
312
  whileElementsMounted: mo
@@ -314,19 +314,19 @@ const Ie = f.createContext({
314
314
  event: "mousedown",
315
315
  toggle: !0,
316
316
  ignoreMouse: !1
317
- }), J = go(E, { role: "menu" }), j = po(E, { bubbles: !0 }), te = fo(E, {
318
- listRef: C,
319
- activeIndex: u,
317
+ }), J = go(E, { role: "menu" }), U = po(E, { bubbles: !0 }), te = fo(E, {
318
+ listRef: g,
319
+ activeIndex: m,
320
320
  nested: !1,
321
- onNavigate: b,
321
+ onNavigate: f,
322
322
  loop: !0
323
- }), L = bo(E, {
324
- listRef: g,
325
- onMatch: l ? b : void 0,
326
- activeIndex: u
327
- }), { getReferenceProps: K, getFloatingProps: R, getItemProps: St } = vo([ee, J, j, te, L]), ze = He(e) === "Button" || He(e) === "ButtonIcon", _t = ze ? {
323
+ }), P = bo(E, {
324
+ listRef: k,
325
+ onMatch: c ? f : void 0,
326
+ activeIndex: m
327
+ }), { getReferenceProps: j, getFloatingProps: R, getItemProps: St } = vo([ee, J, U, te, P]), ze = He(e) === "Button" || He(e) === "ButtonIcon", _t = ze ? {
328
328
  noInternalClick: ze,
329
- focusMode: c,
329
+ focusMode: l,
330
330
  mode: i,
331
331
  spacing: s
332
332
  } : {}, Rt = x.cloneElement(
@@ -334,41 +334,41 @@ const Ie = f.createContext({
334
334
  {
335
335
  ..._t,
336
336
  "aria-label": o,
337
- "data-open": l ? "" : void 0,
338
- "data-focus-inside": v ? "" : void 0,
339
- ref: at([D.setReference, M.ref, m]),
340
- ...K(
341
- k.getItemProps({
337
+ "data-open": c ? "" : void 0,
338
+ "data-focus-inside": y ? "" : void 0,
339
+ ref: nt([O.setReference, M.ref, d]),
340
+ ...j(
341
+ T.getItemProps({
342
342
  ...h
343
343
  })
344
344
  )
345
345
  }
346
346
  );
347
- return U(() => {
348
- if (!T)
347
+ return q(() => {
348
+ if (!N)
349
349
  return;
350
350
  function oe() {
351
- p(!1), a == null || a(!1);
351
+ p(!1), n == null || n(!1);
352
352
  }
353
- return T.events.on("click", oe), () => {
354
- T.events.off("click", oe);
353
+ return N.events.on("click", oe), () => {
354
+ N.events.off("click", oe);
355
355
  };
356
- }, [T, a]), U(() => {
357
- l && T && T.events.emit("menuopen", { nodeId: I });
358
- }, [T, l, I]), /* @__PURE__ */ y(yo, { id: I, children: [
356
+ }, [N, n]), q(() => {
357
+ c && N && N.events.emit("menuopen", { nodeId: I });
358
+ }, [N, c, I]), /* @__PURE__ */ v(yo, { id: I, children: [
359
359
  Rt,
360
360
  /* @__PURE__ */ r(
361
361
  Ie.Provider,
362
362
  {
363
363
  value: {
364
- activeIndex: u,
365
- setActiveIndex: b,
364
+ activeIndex: m,
365
+ setActiveIndex: f,
366
366
  getItemProps: St,
367
- setHasFocusInside: d,
368
- isOpen: l
367
+ setHasFocusInside: u,
368
+ isOpen: c
369
369
  },
370
- children: /* @__PURE__ */ r(ko, { elementsRef: C, labelsRef: g, children: l && /* @__PURE__ */ r(Co, { children: /* @__PURE__ */ r(
371
- wo,
370
+ children: /* @__PURE__ */ r(ko, { elementsRef: g, labelsRef: k, children: c && /* @__PURE__ */ r(Co, { children: /* @__PURE__ */ r(
371
+ To,
372
372
  {
373
373
  context: E,
374
374
  modal: !1,
@@ -377,7 +377,7 @@ const Ie = f.createContext({
377
377
  children: /* @__PURE__ */ r(
378
378
  "div",
379
379
  {
380
- ref: D.setFloating,
380
+ ref: O.setFloating,
381
381
  className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
382
382
  style: _,
383
383
  ...R(),
@@ -390,33 +390,33 @@ const Ie = f.createContext({
390
390
  )
391
391
  ] });
392
392
  }
393
- ), Se = ot((e, t) => /* @__PURE__ */ r(To, { children: /* @__PURE__ */ r(lt, { ...e, ref: t }) }));
393
+ ), Se = ot((e, t) => /* @__PURE__ */ r(wo, { children: /* @__PURE__ */ r(lt, { ...e, ref: t }) }));
394
394
  Se.displayName = "Menu";
395
395
  lt.displayName = "MenuComponent";
396
- const W = f.forwardRef(
396
+ const K = b.forwardRef(
397
397
  ({
398
398
  label: e,
399
399
  disabled: t,
400
400
  icon: o,
401
- raw: n = !1,
402
- children: a,
401
+ raw: a = !1,
402
+ children: n,
403
403
  ignoreClick: s = !1,
404
404
  ...i
405
- }, c) => {
406
- const h = f.useContext(Ie), m = nt({ label: t ? null : e }), l = rt(), p = at([m.ref, c]);
407
- return n && a ? /* @__PURE__ */ r(
405
+ }, l) => {
406
+ const h = b.useContext(Ie), d = at({ label: t ? null : e }), c = rt(), p = nt([d.ref, l]);
407
+ return a && n ? /* @__PURE__ */ r(
408
408
  "div",
409
409
  {
410
410
  role: "menuitem",
411
411
  ...h.getItemProps({
412
- onClick(v) {
413
- var d;
414
- s || ((d = i.onClick) == null || d.call(i, v), l == null || l.events.emit("click"));
412
+ onClick(y) {
413
+ var u;
414
+ s || ((u = i.onClick) == null || u.call(i, y), c == null || c.events.emit("click"));
415
415
  }
416
416
  }),
417
- children: a
417
+ children: n
418
418
  }
419
- ) : /* @__PURE__ */ y(
419
+ ) : /* @__PURE__ */ v(
420
420
  "button",
421
421
  {
422
422
  ...i,
@@ -426,13 +426,13 @@ const W = f.forwardRef(
426
426
  tabIndex: 0,
427
427
  disabled: t,
428
428
  ...h.getItemProps({
429
- onClick(v) {
430
- var d;
431
- s || ((d = i.onClick) == null || d.call(i, v), l == null || l.events.emit("click"));
429
+ onClick(y) {
430
+ var u;
431
+ s || ((u = i.onClick) == null || u.call(i, y), c == null || c.events.emit("click"));
432
432
  },
433
- onFocus(v) {
434
- var d;
435
- (d = i.onFocus) == null || d.call(i, v), h.setHasFocusInside(!0);
433
+ onFocus(y) {
434
+ var u;
435
+ (u = i.onFocus) == null || u.call(i, y), h.setHasFocusInside(!0);
436
436
  }
437
437
  }),
438
438
  children: [
@@ -443,9 +443,9 @@ const W = f.forwardRef(
443
443
  );
444
444
  }
445
445
  );
446
- W.displayName = "MenuItem";
446
+ K.displayName = "MenuItem";
447
447
  const Mo = ({ className: e, ...t }) => {
448
- const o = w(e, "my-1 border-t border-border-medium");
448
+ const o = C(e, "my-1 border-t border-border-medium");
449
449
  return /* @__PURE__ */ r("div", { className: o, ...t });
450
450
  };
451
451
  /*!
@@ -474,53 +474,53 @@ try {
474
474
  });
475
475
  } catch {
476
476
  }
477
- const Lo = "av-togglegroup", Po = "av-togglegroup-item-wrapper", $o = "av-togglegroup-item";
477
+ const Po = "av-togglegroup", Lo = "av-togglegroup-item-wrapper", $o = "av-togglegroup-item";
478
478
  function Me(e, t = []) {
479
479
  let o = [];
480
- function n(s, i) {
481
- const c = f.createContext(i), h = o.length;
480
+ function a(s, i) {
481
+ const l = b.createContext(i), h = o.length;
482
482
  o = [...o, i];
483
- const m = (p) => {
484
- var v;
485
- const { scope: d, children: u, ...b } = p, C = ((v = d == null ? void 0 : d[e]) == null ? void 0 : v[h]) || c, g = f.useMemo(() => b, Object.values(b));
486
- return /* @__PURE__ */ r(C.Provider, { value: g, children: u });
483
+ const d = (p) => {
484
+ var y;
485
+ const { scope: u, children: m, ...f } = p, g = ((y = u == null ? void 0 : u[e]) == null ? void 0 : y[h]) || l, k = b.useMemo(() => f, Object.values(f));
486
+ return /* @__PURE__ */ r(g.Provider, { value: k, children: m });
487
487
  };
488
- m.displayName = s + "Provider";
489
- function l(p, v) {
490
- var d;
491
- const u = ((d = v == null ? void 0 : v[e]) == null ? void 0 : d[h]) || c, b = f.useContext(u);
492
- if (b) return b;
488
+ d.displayName = s + "Provider";
489
+ function c(p, y) {
490
+ var u;
491
+ const m = ((u = y == null ? void 0 : y[e]) == null ? void 0 : u[h]) || l, f = b.useContext(m);
492
+ if (f) return f;
493
493
  if (i !== void 0) return i;
494
494
  throw new Error(`\`${p}\` must be used within \`${s}\``);
495
495
  }
496
- return [m, l];
496
+ return [d, c];
497
497
  }
498
- const a = () => {
499
- const s = o.map((i) => f.createContext(i));
498
+ const n = () => {
499
+ const s = o.map((i) => b.createContext(i));
500
500
  return function(i) {
501
- const c = (i == null ? void 0 : i[e]) || s;
502
- return f.useMemo(
503
- () => ({ [`__scope${e}`]: { ...i, [e]: c } }),
504
- [i, c]
501
+ const l = (i == null ? void 0 : i[e]) || s;
502
+ return b.useMemo(
503
+ () => ({ [`__scope${e}`]: { ...i, [e]: l } }),
504
+ [i, l]
505
505
  );
506
506
  };
507
507
  };
508
- return a.scopeName = e, [n, Bo(a, ...t)];
508
+ return n.scopeName = e, [a, Bo(n, ...t)];
509
509
  }
510
510
  function Bo(...e) {
511
511
  const t = e[0];
512
512
  if (e.length === 1) return t;
513
513
  const o = () => {
514
- const n = e.map((a) => ({
515
- useScope: a(),
516
- scopeName: a.scopeName
514
+ const a = e.map((n) => ({
515
+ useScope: n(),
516
+ scopeName: n.scopeName
517
517
  }));
518
- return function(a) {
519
- const s = n.reduce((i, { useScope: c, scopeName: h }) => {
520
- const m = c(a)[`__scope${h}`];
521
- return { ...i, ...m };
518
+ return function(n) {
519
+ const s = a.reduce((i, { useScope: l, scopeName: h }) => {
520
+ const d = l(n)[`__scope${h}`];
521
+ return { ...i, ...d };
522
522
  }, {});
523
- return f.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
523
+ return b.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
524
524
  };
525
525
  };
526
526
  return o.scopeName = t.scopeName, o;
@@ -533,62 +533,62 @@ function Ge(e, t) {
533
533
  function ct(...e) {
534
534
  return (t) => {
535
535
  let o = !1;
536
- const n = e.map((a) => {
537
- const s = Ge(a, t);
536
+ const a = e.map((n) => {
537
+ const s = Ge(n, t);
538
538
  return !o && typeof s == "function" && (o = !0), s;
539
539
  });
540
540
  if (o)
541
541
  return () => {
542
- for (let a = 0; a < n.length; a++) {
543
- const s = n[a];
544
- typeof s == "function" ? s() : Ge(e[a], null);
542
+ for (let n = 0; n < a.length; n++) {
543
+ const s = a[n];
544
+ typeof s == "function" ? s() : Ge(e[n], null);
545
545
  }
546
546
  };
547
547
  };
548
548
  }
549
549
  function _e(...e) {
550
- return f.useCallback(ct(...e), e);
550
+ return b.useCallback(ct(...e), e);
551
551
  }
552
- var ve = f.forwardRef((e, t) => {
553
- const { children: o, ...n } = e, a = f.Children.toArray(o), s = a.find(Oo);
552
+ var ve = b.forwardRef((e, t) => {
553
+ const { children: o, ...a } = e, n = b.Children.toArray(o), s = n.find(Oo);
554
554
  if (s) {
555
- const i = s.props.children, c = a.map((h) => h === s ? f.Children.count(i) > 1 ? f.Children.only(null) : f.isValidElement(i) ? i.props.children : null : h);
556
- return /* @__PURE__ */ r(Re, { ...n, ref: t, children: f.isValidElement(i) ? f.cloneElement(i, void 0, c) : null });
555
+ const i = s.props.children, l = n.map((h) => h === s ? b.Children.count(i) > 1 ? b.Children.only(null) : b.isValidElement(i) ? i.props.children : null : h);
556
+ return /* @__PURE__ */ r(Re, { ...a, ref: t, children: b.isValidElement(i) ? b.cloneElement(i, void 0, l) : null });
557
557
  }
558
- return /* @__PURE__ */ r(Re, { ...n, ref: t, children: o });
558
+ return /* @__PURE__ */ r(Re, { ...a, ref: t, children: o });
559
559
  });
560
560
  ve.displayName = "Slot";
561
- var Re = f.forwardRef((e, t) => {
562
- const { children: o, ...n } = e;
563
- if (f.isValidElement(o)) {
564
- const a = Vo(o);
565
- return f.cloneElement(o, {
566
- ...Do(n, o.props),
561
+ var Re = b.forwardRef((e, t) => {
562
+ const { children: o, ...a } = e;
563
+ if (b.isValidElement(o)) {
564
+ const n = Vo(o);
565
+ return b.cloneElement(o, {
566
+ ...Do(a, o.props),
567
567
  // @ts-ignore
568
- ref: t ? ct(t, a) : a
568
+ ref: t ? ct(t, n) : n
569
569
  });
570
570
  }
571
- return f.Children.count(o) > 1 ? f.Children.only(null) : null;
571
+ return b.Children.count(o) > 1 ? b.Children.only(null) : null;
572
572
  });
573
573
  Re.displayName = "SlotClone";
574
574
  var zo = ({ children: e }) => /* @__PURE__ */ r(A, { children: e });
575
575
  function Oo(e) {
576
- return f.isValidElement(e) && e.type === zo;
576
+ return b.isValidElement(e) && e.type === zo;
577
577
  }
578
578
  function Do(e, t) {
579
579
  const o = { ...t };
580
- for (const n in t) {
581
- const a = e[n], s = t[n];
582
- /^on[A-Z]/.test(n) ? a && s ? o[n] = (...i) => {
583
- s(...i), a(...i);
584
- } : a && (o[n] = a) : n === "style" ? o[n] = { ...a, ...s } : n === "className" && (o[n] = [a, s].filter(Boolean).join(" "));
580
+ for (const a in t) {
581
+ const n = e[a], s = t[a];
582
+ /^on[A-Z]/.test(a) ? n && s ? o[a] = (...i) => {
583
+ s(...i), n(...i);
584
+ } : n && (o[a] = n) : a === "style" ? o[a] = { ...n, ...s } : a === "className" && (o[a] = [n, s].filter(Boolean).join(" "));
585
585
  }
586
586
  return { ...e, ...o };
587
587
  }
588
588
  function Vo(e) {
589
589
  var t, o;
590
- let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, a = n && "isReactWarning" in n && n.isReactWarning;
591
- return a ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, a = n && "isReactWarning" in n && n.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
590
+ let a = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, n = a && "isReactWarning" in a && a.isReactWarning;
591
+ return n ? e.ref : (a = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = a && "isReactWarning" in a && a.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
592
592
  }
593
593
  var Fo = [
594
594
  "a",
@@ -608,74 +608,74 @@ var Fo = [
608
608
  "svg",
609
609
  "ul"
610
610
  ], de = Fo.reduce((e, t) => {
611
- const o = f.forwardRef((n, a) => {
612
- const { asChild: s, ...i } = n, c = s ? ve : t;
613
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ r(c, { ...i, ref: a });
611
+ const o = b.forwardRef((a, n) => {
612
+ const { asChild: s, ...i } = a, l = s ? ve : t;
613
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ r(l, { ...i, ref: n });
614
614
  });
615
615
  return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
616
616
  }, {});
617
- function q(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
618
- return function(n) {
619
- if (e == null || e(n), o === !1 || !n.defaultPrevented)
620
- return t == null ? void 0 : t(n);
617
+ function Y(e, t, { checkForDefaultPrevented: o = !0 } = {}) {
618
+ return function(a) {
619
+ if (e == null || e(a), o === !1 || !a.defaultPrevented)
620
+ return t == null ? void 0 : t(a);
621
621
  };
622
622
  }
623
623
  function Ho(e) {
624
- const t = e + "CollectionProvider", [o, n] = Me(t), [a, s] = o(
624
+ const t = e + "CollectionProvider", [o, a] = Me(t), [n, s] = o(
625
625
  t,
626
626
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
627
- ), i = (d) => {
628
- const { scope: u, children: b } = d, C = x.useRef(null), g = x.useRef(/* @__PURE__ */ new Map()).current;
629
- return /* @__PURE__ */ r(a, { scope: u, itemMap: g, collectionRef: C, children: b });
627
+ ), i = (u) => {
628
+ const { scope: m, children: f } = u, g = x.useRef(null), k = x.useRef(/* @__PURE__ */ new Map()).current;
629
+ return /* @__PURE__ */ r(n, { scope: m, itemMap: k, collectionRef: g, children: f });
630
630
  };
631
631
  i.displayName = t;
632
- const c = e + "CollectionSlot", h = x.forwardRef(
633
- (d, u) => {
634
- const { scope: b, children: C } = d, g = s(c, b), k = _e(u, g.collectionRef);
635
- return /* @__PURE__ */ r(ve, { ref: k, children: C });
632
+ const l = e + "CollectionSlot", h = x.forwardRef(
633
+ (u, m) => {
634
+ const { scope: f, children: g } = u, k = s(l, f), T = _e(m, k.collectionRef);
635
+ return /* @__PURE__ */ r(ve, { ref: T, children: g });
636
636
  }
637
637
  );
638
- h.displayName = c;
639
- const m = e + "CollectionItemSlot", l = "data-radix-collection-item", p = x.forwardRef(
640
- (d, u) => {
641
- const { scope: b, children: C, ...g } = d, k = x.useRef(null), T = _e(u, k), I = s(m, b);
642
- return x.useEffect(() => (I.itemMap.set(k, { ref: k, ...g }), () => void I.itemMap.delete(k))), /* @__PURE__ */ r(ve, { [l]: "", ref: T, children: C });
638
+ h.displayName = l;
639
+ const d = e + "CollectionItemSlot", c = "data-radix-collection-item", p = x.forwardRef(
640
+ (u, m) => {
641
+ const { scope: f, children: g, ...k } = u, T = x.useRef(null), N = _e(m, T), I = s(d, f);
642
+ return x.useEffect(() => (I.itemMap.set(T, { ref: T, ...k }), () => void I.itemMap.delete(T))), /* @__PURE__ */ r(ve, { [c]: "", ref: N, children: g });
643
643
  }
644
644
  );
645
- p.displayName = m;
646
- function v(d) {
647
- const u = s(e + "CollectionConsumer", d);
645
+ p.displayName = d;
646
+ function y(u) {
647
+ const m = s(e + "CollectionConsumer", u);
648
648
  return x.useCallback(() => {
649
- const b = u.collectionRef.current;
650
- if (!b) return [];
651
- const C = Array.from(b.querySelectorAll(`[${l}]`));
652
- return Array.from(u.itemMap.values()).sort(
653
- (g, k) => C.indexOf(g.ref.current) - C.indexOf(k.ref.current)
649
+ const f = m.collectionRef.current;
650
+ if (!f) return [];
651
+ const g = Array.from(f.querySelectorAll(`[${c}]`));
652
+ return Array.from(m.itemMap.values()).sort(
653
+ (k, T) => g.indexOf(k.ref.current) - g.indexOf(T.ref.current)
654
654
  );
655
- }, [u.collectionRef, u.itemMap]);
655
+ }, [m.collectionRef, m.itemMap]);
656
656
  }
657
657
  return [
658
658
  { Provider: i, Slot: h, ItemSlot: p },
659
- v,
660
- n
659
+ y,
660
+ a
661
661
  ];
662
662
  }
663
- var Go = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
664
- }, Uo = f.useId || (() => {
663
+ var Go = globalThis != null && globalThis.document ? b.useLayoutEffect : () => {
664
+ }, Uo = b.useId || (() => {
665
665
  }), jo = 0;
666
666
  function Ko(e) {
667
- const [t, o] = f.useState(Uo());
667
+ const [t, o] = b.useState(Uo());
668
668
  return Go(() => {
669
- o((n) => n ?? String(jo++));
669
+ o((a) => a ?? String(jo++));
670
670
  }, [e]), t ? `radix-${t}` : "";
671
671
  }
672
- function Le(e) {
673
- const t = f.useRef(e);
674
- return f.useEffect(() => {
672
+ function Pe(e) {
673
+ const t = b.useRef(e);
674
+ return b.useEffect(() => {
675
675
  t.current = e;
676
- }), f.useMemo(() => (...o) => {
677
- var n;
678
- return (n = t.current) == null ? void 0 : n.call(t, ...o);
676
+ }), b.useMemo(() => (...o) => {
677
+ var a;
678
+ return (a = t.current) == null ? void 0 : a.call(t, ...o);
679
679
  }, []);
680
680
  }
681
681
  function ke({
@@ -684,15 +684,15 @@ function ke({
684
684
  onChange: o = () => {
685
685
  }
686
686
  }) {
687
- const [n, a] = Wo({ defaultProp: t, onChange: o }), s = e !== void 0, i = s ? e : n, c = Le(o), h = f.useCallback(
688
- (m) => {
687
+ const [a, n] = Wo({ defaultProp: t, onChange: o }), s = e !== void 0, i = s ? e : a, l = Pe(o), h = b.useCallback(
688
+ (d) => {
689
689
  if (s) {
690
- const l = typeof m == "function" ? m(e) : m;
691
- l !== e && c(l);
690
+ const c = typeof d == "function" ? d(e) : d;
691
+ c !== e && l(c);
692
692
  } else
693
- a(m);
693
+ n(d);
694
694
  },
695
- [s, e, a, c]
695
+ [s, e, n, l]
696
696
  );
697
697
  return [i, h];
698
698
  }
@@ -700,142 +700,142 @@ function Wo({
700
700
  defaultProp: e,
701
701
  onChange: t
702
702
  }) {
703
- const o = f.useState(e), [n] = o, a = f.useRef(n), s = Le(t);
704
- return f.useEffect(() => {
705
- a.current !== n && (s(n), a.current = n);
706
- }, [n, a, s]), o;
703
+ const o = b.useState(e), [a] = o, n = b.useRef(a), s = Pe(t);
704
+ return b.useEffect(() => {
705
+ n.current !== a && (s(a), n.current = a);
706
+ }, [a, n, s]), o;
707
707
  }
708
- var Yo = f.createContext(void 0);
708
+ var Yo = b.createContext(void 0);
709
709
  function dt(e) {
710
- const t = f.useContext(Yo);
710
+ const t = b.useContext(Yo);
711
711
  return e || t || "ltr";
712
712
  }
713
713
  var Ee = "rovingFocusGroup.onEntryFocus", qo = { bubbles: !1, cancelable: !0 }, Ce = "RovingFocusGroup", [Ae, ut, Xo] = Ho(Ce), [Zo, mt] = Me(
714
714
  Ce,
715
715
  [Xo]
716
- ), [Jo, Qo] = Zo(Ce), ht = f.forwardRef(
716
+ ), [Jo, Qo] = Zo(Ce), ht = b.forwardRef(
717
717
  (e, t) => /* @__PURE__ */ r(Ae.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(Ae.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ r(er, { ...e, ref: t }) }) })
718
718
  );
719
719
  ht.displayName = Ce;
720
- var er = f.forwardRef((e, t) => {
720
+ var er = b.forwardRef((e, t) => {
721
721
  const {
722
722
  __scopeRovingFocusGroup: o,
723
- orientation: n,
724
- loop: a = !1,
723
+ orientation: a,
724
+ loop: n = !1,
725
725
  dir: s,
726
726
  currentTabStopId: i,
727
- defaultCurrentTabStopId: c,
727
+ defaultCurrentTabStopId: l,
728
728
  onCurrentTabStopIdChange: h,
729
- onEntryFocus: m,
730
- preventScrollOnEntryFocus: l = !1,
729
+ onEntryFocus: d,
730
+ preventScrollOnEntryFocus: c = !1,
731
731
  ...p
732
- } = e, v = f.useRef(null), d = _e(t, v), u = dt(s), [b = null, C] = ke({
732
+ } = e, y = b.useRef(null), u = _e(t, y), m = dt(s), [f = null, g] = ke({
733
733
  prop: i,
734
- defaultProp: c,
734
+ defaultProp: l,
735
735
  onChange: h
736
- }), [g, k] = f.useState(!1), T = Le(m), I = ut(o), M = f.useRef(!1), [_, D] = f.useState(0);
737
- return f.useEffect(() => {
738
- const E = v.current;
736
+ }), [k, T] = b.useState(!1), N = Pe(d), I = ut(o), M = b.useRef(!1), [_, O] = b.useState(0);
737
+ return b.useEffect(() => {
738
+ const E = y.current;
739
739
  if (E)
740
- return E.addEventListener(Ee, T), () => E.removeEventListener(Ee, T);
741
- }, [T]), /* @__PURE__ */ r(
740
+ return E.addEventListener(Ee, N), () => E.removeEventListener(Ee, N);
741
+ }, [N]), /* @__PURE__ */ r(
742
742
  Jo,
743
743
  {
744
744
  scope: o,
745
- orientation: n,
746
- dir: u,
747
- loop: a,
748
- currentTabStopId: b,
749
- onItemFocus: f.useCallback(
750
- (E) => C(E),
751
- [C]
745
+ orientation: a,
746
+ dir: m,
747
+ loop: n,
748
+ currentTabStopId: f,
749
+ onItemFocus: b.useCallback(
750
+ (E) => g(E),
751
+ [g]
752
752
  ),
753
- onItemShiftTab: f.useCallback(() => k(!0), []),
754
- onFocusableItemAdd: f.useCallback(
755
- () => D((E) => E + 1),
753
+ onItemShiftTab: b.useCallback(() => T(!0), []),
754
+ onFocusableItemAdd: b.useCallback(
755
+ () => O((E) => E + 1),
756
756
  []
757
757
  ),
758
- onFocusableItemRemove: f.useCallback(
759
- () => D((E) => E - 1),
758
+ onFocusableItemRemove: b.useCallback(
759
+ () => O((E) => E - 1),
760
760
  []
761
761
  ),
762
762
  children: /* @__PURE__ */ r(
763
763
  de.div,
764
764
  {
765
- tabIndex: g || _ === 0 ? -1 : 0,
766
- "data-orientation": n,
765
+ tabIndex: k || _ === 0 ? -1 : 0,
766
+ "data-orientation": a,
767
767
  ...p,
768
- ref: d,
768
+ ref: u,
769
769
  style: { outline: "none", ...e.style },
770
- onMouseDown: q(e.onMouseDown, () => {
770
+ onMouseDown: Y(e.onMouseDown, () => {
771
771
  M.current = !0;
772
772
  }),
773
- onFocus: q(e.onFocus, (E) => {
773
+ onFocus: Y(e.onFocus, (E) => {
774
774
  const ee = !M.current;
775
- if (E.target === E.currentTarget && ee && !g) {
775
+ if (E.target === E.currentTarget && ee && !k) {
776
776
  const J = new CustomEvent(Ee, qo);
777
777
  if (E.currentTarget.dispatchEvent(J), !J.defaultPrevented) {
778
- const j = I().filter((R) => R.focusable), te = j.find((R) => R.active), L = j.find((R) => R.id === b), K = [te, L, ...j].filter(
778
+ const U = I().filter((R) => R.focusable), te = U.find((R) => R.active), P = U.find((R) => R.id === f), j = [te, P, ...U].filter(
779
779
  Boolean
780
780
  ).map((R) => R.ref.current);
781
- ft(K, l);
781
+ ft(j, c);
782
782
  }
783
783
  }
784
784
  M.current = !1;
785
785
  }),
786
- onBlur: q(e.onBlur, () => k(!1))
786
+ onBlur: Y(e.onBlur, () => T(!1))
787
787
  }
788
788
  )
789
789
  }
790
790
  );
791
- }), gt = "RovingFocusGroupItem", pt = f.forwardRef(
791
+ }), gt = "RovingFocusGroupItem", pt = b.forwardRef(
792
792
  (e, t) => {
793
793
  const {
794
794
  __scopeRovingFocusGroup: o,
795
- focusable: n = !0,
796
- active: a = !1,
795
+ focusable: a = !0,
796
+ active: n = !1,
797
797
  tabStopId: s,
798
798
  ...i
799
- } = e, c = Ko(), h = s || c, m = Qo(gt, o), l = m.currentTabStopId === h, p = ut(o), { onFocusableItemAdd: v, onFocusableItemRemove: d } = m;
800
- return f.useEffect(() => {
801
- if (n)
802
- return v(), () => d();
803
- }, [n, v, d]), /* @__PURE__ */ r(
799
+ } = e, l = Ko(), h = s || l, d = Qo(gt, o), c = d.currentTabStopId === h, p = ut(o), { onFocusableItemAdd: y, onFocusableItemRemove: u } = d;
800
+ return b.useEffect(() => {
801
+ if (a)
802
+ return y(), () => u();
803
+ }, [a, y, u]), /* @__PURE__ */ r(
804
804
  Ae.ItemSlot,
805
805
  {
806
806
  scope: o,
807
807
  id: h,
808
- focusable: n,
809
- active: a,
808
+ focusable: a,
809
+ active: n,
810
810
  children: /* @__PURE__ */ r(
811
811
  de.span,
812
812
  {
813
- tabIndex: l ? 0 : -1,
814
- "data-orientation": m.orientation,
813
+ tabIndex: c ? 0 : -1,
814
+ "data-orientation": d.orientation,
815
815
  ...i,
816
816
  ref: t,
817
- onMouseDown: q(e.onMouseDown, (u) => {
818
- n ? m.onItemFocus(h) : u.preventDefault();
817
+ onMouseDown: Y(e.onMouseDown, (m) => {
818
+ a ? d.onItemFocus(h) : m.preventDefault();
819
819
  }),
820
- onFocus: q(e.onFocus, () => m.onItemFocus(h)),
821
- onKeyDown: q(e.onKeyDown, (u) => {
822
- if (u.key === "Tab" && u.shiftKey) {
823
- m.onItemShiftTab();
820
+ onFocus: Y(e.onFocus, () => d.onItemFocus(h)),
821
+ onKeyDown: Y(e.onKeyDown, (m) => {
822
+ if (m.key === "Tab" && m.shiftKey) {
823
+ d.onItemShiftTab();
824
824
  return;
825
825
  }
826
- if (u.target !== u.currentTarget) return;
827
- const b = rr(u, m.orientation, m.dir);
828
- if (b !== void 0) {
829
- if (u.metaKey || u.ctrlKey || u.altKey || u.shiftKey) return;
830
- u.preventDefault();
831
- let C = p().filter((g) => g.focusable).map((g) => g.ref.current);
832
- if (b === "last") C.reverse();
833
- else if (b === "prev" || b === "next") {
834
- b === "prev" && C.reverse();
835
- const g = C.indexOf(u.currentTarget);
836
- C = m.loop ? nr(C, g + 1) : C.slice(g + 1);
826
+ if (m.target !== m.currentTarget) return;
827
+ const f = rr(m, d.orientation, d.dir);
828
+ if (f !== void 0) {
829
+ if (m.metaKey || m.ctrlKey || m.altKey || m.shiftKey) return;
830
+ m.preventDefault();
831
+ let g = p().filter((k) => k.focusable).map((k) => k.ref.current);
832
+ if (f === "last") g.reverse();
833
+ else if (f === "prev" || f === "next") {
834
+ f === "prev" && g.reverse();
835
+ const k = g.indexOf(m.currentTarget);
836
+ g = d.loop ? ar(g, k + 1) : g.slice(k + 1);
837
837
  }
838
- setTimeout(() => ft(C));
838
+ setTimeout(() => ft(g));
839
839
  }
840
840
  })
841
841
  }
@@ -859,23 +859,23 @@ function or(e, t) {
859
859
  return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
860
860
  }
861
861
  function rr(e, t, o) {
862
- const n = or(e.key, o);
863
- if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(n)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(n)))
864
- return tr[n];
862
+ const a = or(e.key, o);
863
+ if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(a)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(a)))
864
+ return tr[a];
865
865
  }
866
866
  function ft(e, t = !1) {
867
867
  const o = document.activeElement;
868
- for (const n of e)
869
- if (n === o || (n.focus({ preventScroll: t }), document.activeElement !== o)) return;
868
+ for (const a of e)
869
+ if (a === o || (a.focus({ preventScroll: t }), document.activeElement !== o)) return;
870
870
  }
871
- function nr(e, t) {
872
- return e.map((o, n) => e[(t + n) % e.length]);
871
+ function ar(e, t) {
872
+ return e.map((o, a) => e[(t + a) % e.length]);
873
873
  }
874
- var ar = ht, sr = pt, ir = "Toggle", bt = f.forwardRef((e, t) => {
875
- const { pressed: o, defaultPressed: n = !1, onPressedChange: a, ...s } = e, [i = !1, c] = ke({
874
+ var nr = ht, sr = pt, ir = "Toggle", bt = b.forwardRef((e, t) => {
875
+ const { pressed: o, defaultPressed: a = !1, onPressedChange: n, ...s } = e, [i = !1, l] = ke({
876
876
  prop: o,
877
- onChange: a,
878
- defaultProp: n
877
+ onChange: n,
878
+ defaultProp: a
879
879
  });
880
880
  return /* @__PURE__ */ r(
881
881
  de.button,
@@ -886,35 +886,35 @@ var ar = ht, sr = pt, ir = "Toggle", bt = f.forwardRef((e, t) => {
886
886
  "data-disabled": e.disabled ? "" : void 0,
887
887
  ...s,
888
888
  ref: t,
889
- onClick: q(e.onClick, () => {
890
- e.disabled || c(!i);
889
+ onClick: Y(e.onClick, () => {
890
+ e.disabled || l(!i);
891
891
  })
892
892
  }
893
893
  );
894
894
  });
895
895
  bt.displayName = ir;
896
- var Q = "ToggleGroup", [vt, Tn] = Me(Q, [
896
+ var Q = "ToggleGroup", [vt, ya] = Me(Q, [
897
897
  mt
898
- ]), yt = mt(), Pe = x.forwardRef((e, t) => {
899
- const { type: o, ...n } = e;
898
+ ]), yt = mt(), Le = x.forwardRef((e, t) => {
899
+ const { type: o, ...a } = e;
900
900
  if (o === "single")
901
- return /* @__PURE__ */ r(lr, { ...n, ref: t });
901
+ return /* @__PURE__ */ r(lr, { ...a, ref: t });
902
902
  if (o === "multiple")
903
- return /* @__PURE__ */ r(cr, { ...n, ref: t });
903
+ return /* @__PURE__ */ r(cr, { ...a, ref: t });
904
904
  throw new Error(`Missing prop \`type\` expected on \`${Q}\``);
905
905
  });
906
- Pe.displayName = Q;
906
+ Le.displayName = Q;
907
907
  var [kt, Ct] = vt(Q), lr = x.forwardRef((e, t) => {
908
908
  const {
909
909
  value: o,
910
- defaultValue: n,
911
- onValueChange: a = () => {
910
+ defaultValue: a,
911
+ onValueChange: n = () => {
912
912
  },
913
913
  ...s
914
- } = e, [i, c] = ke({
914
+ } = e, [i, l] = ke({
915
915
  prop: o,
916
- defaultProp: n,
917
- onChange: a
916
+ defaultProp: a,
917
+ onChange: n
918
918
  });
919
919
  return /* @__PURE__ */ r(
920
920
  kt,
@@ -922,28 +922,28 @@ var [kt, Ct] = vt(Q), lr = x.forwardRef((e, t) => {
922
922
  scope: e.__scopeToggleGroup,
923
923
  type: "single",
924
924
  value: i ? [i] : [],
925
- onItemActivate: c,
926
- onItemDeactivate: x.useCallback(() => c(""), [c]),
927
- children: /* @__PURE__ */ r(wt, { ...s, ref: t })
925
+ onItemActivate: l,
926
+ onItemDeactivate: x.useCallback(() => l(""), [l]),
927
+ children: /* @__PURE__ */ r(Tt, { ...s, ref: t })
928
928
  }
929
929
  );
930
930
  }), cr = x.forwardRef((e, t) => {
931
931
  const {
932
932
  value: o,
933
- defaultValue: n,
934
- onValueChange: a = () => {
933
+ defaultValue: a,
934
+ onValueChange: n = () => {
935
935
  },
936
936
  ...s
937
- } = e, [i = [], c] = ke({
937
+ } = e, [i = [], l] = ke({
938
938
  prop: o,
939
- defaultProp: n,
940
- onChange: a
939
+ defaultProp: a,
940
+ onChange: n
941
941
  }), h = x.useCallback(
942
- (l) => c((p = []) => [...p, l]),
943
- [c]
944
- ), m = x.useCallback(
945
- (l) => c((p = []) => p.filter((v) => v !== l)),
946
- [c]
942
+ (c) => l((p = []) => [...p, c]),
943
+ [l]
944
+ ), d = x.useCallback(
945
+ (c) => l((p = []) => p.filter((y) => y !== c)),
946
+ [l]
947
947
  );
948
948
  return /* @__PURE__ */ r(
949
949
  kt,
@@ -952,68 +952,68 @@ var [kt, Ct] = vt(Q), lr = x.forwardRef((e, t) => {
952
952
  type: "multiple",
953
953
  value: i,
954
954
  onItemActivate: h,
955
- onItemDeactivate: m,
956
- children: /* @__PURE__ */ r(wt, { ...s, ref: t })
955
+ onItemDeactivate: d,
956
+ children: /* @__PURE__ */ r(Tt, { ...s, ref: t })
957
957
  }
958
958
  );
959
959
  });
960
- Pe.displayName = Q;
961
- var [dr, ur] = vt(Q), wt = x.forwardRef(
960
+ Le.displayName = Q;
961
+ var [dr, ur] = vt(Q), Tt = x.forwardRef(
962
962
  (e, t) => {
963
963
  const {
964
964
  __scopeToggleGroup: o,
965
- disabled: n = !1,
966
- rovingFocus: a = !0,
965
+ disabled: a = !1,
966
+ rovingFocus: n = !0,
967
967
  orientation: s,
968
968
  dir: i,
969
- loop: c = !0,
969
+ loop: l = !0,
970
970
  ...h
971
- } = e, m = yt(o), l = dt(i), p = { role: "group", dir: l, ...h };
972
- return /* @__PURE__ */ r(dr, { scope: o, rovingFocus: a, disabled: n, children: a ? /* @__PURE__ */ r(
973
- ar,
971
+ } = e, d = yt(o), c = dt(i), p = { role: "group", dir: c, ...h };
972
+ return /* @__PURE__ */ r(dr, { scope: o, rovingFocus: n, disabled: a, children: n ? /* @__PURE__ */ r(
973
+ nr,
974
974
  {
975
975
  asChild: !0,
976
- ...m,
976
+ ...d,
977
977
  orientation: s,
978
- dir: l,
979
- loop: c,
978
+ dir: c,
979
+ loop: l,
980
980
  children: /* @__PURE__ */ r(de.div, { ...p, ref: t })
981
981
  }
982
982
  ) : /* @__PURE__ */ r(de.div, { ...p, ref: t }) });
983
983
  }
984
- ), ye = "ToggleGroupItem", Tt = x.forwardRef(
984
+ ), ye = "ToggleGroupItem", wt = x.forwardRef(
985
985
  (e, t) => {
986
- const o = Ct(ye, e.__scopeToggleGroup), n = ur(ye, e.__scopeToggleGroup), a = yt(e.__scopeToggleGroup), s = o.value.includes(e.value), i = n.disabled || e.disabled, c = { ...e, pressed: s, disabled: i }, h = x.useRef(null);
987
- return n.rovingFocus ? /* @__PURE__ */ r(
986
+ const o = Ct(ye, e.__scopeToggleGroup), a = ur(ye, e.__scopeToggleGroup), n = yt(e.__scopeToggleGroup), s = o.value.includes(e.value), i = a.disabled || e.disabled, l = { ...e, pressed: s, disabled: i }, h = x.useRef(null);
987
+ return a.rovingFocus ? /* @__PURE__ */ r(
988
988
  sr,
989
989
  {
990
990
  asChild: !0,
991
- ...a,
991
+ ...n,
992
992
  focusable: !i,
993
993
  active: s,
994
994
  ref: h,
995
- children: /* @__PURE__ */ r(Ue, { ...c, ref: t })
995
+ children: /* @__PURE__ */ r(Ue, { ...l, ref: t })
996
996
  }
997
- ) : /* @__PURE__ */ r(Ue, { ...c, ref: t });
997
+ ) : /* @__PURE__ */ r(Ue, { ...l, ref: t });
998
998
  }
999
999
  );
1000
- Tt.displayName = ye;
1000
+ wt.displayName = ye;
1001
1001
  var Ue = x.forwardRef(
1002
1002
  (e, t) => {
1003
- const { __scopeToggleGroup: o, value: n, ...a } = e, s = Ct(ye, o), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, c = s.type === "single" ? i : void 0;
1003
+ const { __scopeToggleGroup: o, value: a, ...n } = e, s = Ct(ye, o), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, l = s.type === "single" ? i : void 0;
1004
1004
  return /* @__PURE__ */ r(
1005
1005
  bt,
1006
1006
  {
1007
- ...c,
1008
- ...a,
1007
+ ...l,
1008
+ ...n,
1009
1009
  ref: t,
1010
1010
  onPressedChange: (h) => {
1011
- h ? s.onItemActivate(n) : s.onItemDeactivate(n);
1011
+ h ? s.onItemActivate(a) : s.onItemDeactivate(a);
1012
1012
  }
1013
1013
  }
1014
1014
  );
1015
1015
  }
1016
- ), mr = Pe, hr = Tt;
1016
+ ), mr = Le, hr = wt;
1017
1017
  const Nt = x.createContext({
1018
1018
  size: "medium",
1019
1019
  focusMode: "system",
@@ -1027,22 +1027,22 @@ const Nt = x.createContext({
1027
1027
  (e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
1028
1028
  }
1029
1029
  return t;
1030
- }, pr = ({ focusMode: e }) => w("focus:outline", "focus:outline-2", "focus:outline-offset", {
1030
+ }, pr = ({ focusMode: e }) => C("focus:outline", "focus:outline-2", "focus:outline-offset", {
1031
1031
  "focus:outline-focus-light": e === "light",
1032
1032
  "focus:outline-focus-dark": e === "dark",
1033
1033
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1034
1034
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1035
- }), fr = ({ mode: e }) => w({
1035
+ }), fr = ({ mode: e }) => C({
1036
1036
  "data-[state=on]:bg-surface-medium": e === "dark",
1037
1037
  "data-[state=on]:bg-surface-lightest": e === "light",
1038
1038
  "data-[state=on]:bg-surface-lightest dark:data-[state=on]:bg-surface-medium": e === "system",
1039
1039
  "data-[state=on]:bg-surface-medium dark:data-[state=on]:bg-surface-lightest": e === "alt-system"
1040
- }), br = ({ size: e }) => w({
1040
+ }), br = ({ size: e }) => C({
1041
1041
  "h-5 px-2": e === "small",
1042
1042
  "h-6 px-3": e === "medium",
1043
1043
  "h-7 px-4": e === "large"
1044
- }), vr = ({ mode: e }) => w(
1045
- Po,
1044
+ }), vr = ({ mode: e }) => C(
1045
+ Lo,
1046
1046
  "px-1",
1047
1047
  "relative",
1048
1048
  "border-r",
@@ -1061,7 +1061,7 @@ const Nt = x.createContext({
1061
1061
  size: o
1062
1062
  }) => ({
1063
1063
  wrapperClass: vr({ mode: t }),
1064
- itemClass: w(
1064
+ itemClass: C(
1065
1065
  $o,
1066
1066
  "flex items-center justify-center bg-transparent",
1067
1067
  "rounded-sm",
@@ -1073,8 +1073,8 @@ const Nt = x.createContext({
1073
1073
  }), kr = ({
1074
1074
  mode: e,
1075
1075
  spacing: t
1076
- }) => w(
1077
- Lo,
1076
+ }) => C(
1077
+ Po,
1078
1078
  gr(t),
1079
1079
  "inline-flex p-1",
1080
1080
  "rounded-sm",
@@ -1088,32 +1088,32 @@ const Nt = x.createContext({
1088
1088
  children: e,
1089
1089
  value: t,
1090
1090
  onValueChange: o,
1091
- disabled: n,
1092
- mode: a = "system",
1091
+ disabled: a,
1092
+ mode: n = "system",
1093
1093
  focusMode: s = "system",
1094
1094
  size: i = "medium",
1095
- defaultValue: c,
1095
+ defaultValue: l,
1096
1096
  spacing: h,
1097
- ...m
1097
+ ...d
1098
1098
  }) => {
1099
- const l = kr({ mode: a, spacing: h }), p = { size: i, focusMode: s, mode: a };
1099
+ const c = kr({ mode: n, spacing: h }), p = { size: i, focusMode: s, mode: n };
1100
1100
  return /* @__PURE__ */ r(Nt.Provider, { value: p, children: /* @__PURE__ */ r(
1101
1101
  mr,
1102
1102
  {
1103
- disabled: n,
1104
- className: l,
1103
+ disabled: a,
1104
+ className: c,
1105
1105
  value: t,
1106
- defaultValue: c,
1106
+ defaultValue: l,
1107
1107
  onValueChange: o,
1108
- ...m,
1108
+ ...d,
1109
1109
  type: "single",
1110
1110
  children: e
1111
1111
  }
1112
1112
  ) });
1113
- }, wr = ({ value: e, disabled: t }) => {
1114
- const { size: o, focusMode: n, mode: a } = z(Nt), { itemClass: s, wrapperClass: i } = yr({
1115
- focusMode: n,
1116
- mode: a,
1113
+ }, Tr = ({ value: e, disabled: t }) => {
1114
+ const { size: o, focusMode: a, mode: n } = B(Nt), { itemClass: s, wrapperClass: i } = yr({
1115
+ focusMode: a,
1116
+ mode: n,
1117
1117
  size: o
1118
1118
  });
1119
1119
  return /* @__PURE__ */ r("div", { className: i, children: /* @__PURE__ */ r(
@@ -1139,7 +1139,7 @@ try {
1139
1139
  });
1140
1140
  } catch {
1141
1141
  }
1142
- const je = "av-messagebox", Ke = "av-panel", We = "av-button", Tr = (e) => {
1142
+ const je = "av-messagebox", Ke = "av-panel", We = "av-button", wr = (e) => {
1143
1143
  let t = "";
1144
1144
  if (typeof e == "number" || typeof e == "string")
1145
1145
  t = "m-" + e;
@@ -1152,62 +1152,62 @@ const je = "av-messagebox", Ke = "av-panel", We = "av-button", Tr = (e) => {
1152
1152
  type: e,
1153
1153
  size: t,
1154
1154
  labelRight: o,
1155
- labelLeft: n,
1156
- align: a
1155
+ labelLeft: a,
1156
+ align: n
1157
1157
  }) => {
1158
- const s = "text-sm font-medium max-h-8 py-0", i = "text-base font-medium max-h-9 py-1", c = "text-lg font-medium max-h-12 py-2";
1158
+ const s = "text-sm font-medium max-h-8 py-0", i = "text-base font-medium max-h-9 py-1", l = "text-lg font-medium max-h-12 py-2";
1159
1159
  switch (e) {
1160
1160
  case Nr:
1161
- return w("px-4", {
1161
+ return C("px-4", {
1162
1162
  [s]: t === "small",
1163
1163
  [i]: t === "medium",
1164
- [c]: t === "large"
1164
+ [l]: t === "large"
1165
1165
  });
1166
1166
  case Er:
1167
- return w("px-4 text-center", {
1167
+ return C("px-4 text-center", {
1168
1168
  [s]: t === "small",
1169
1169
  [i]: t === "medium",
1170
- [c]: t === "large"
1170
+ [l]: t === "large"
1171
1171
  });
1172
1172
  case $e:
1173
- return w("inline-flex items-center", {
1174
- "justify-center": a === "center",
1175
- "justify-start": a === "left",
1176
- "justify-end": a === "right",
1177
- "h-6 w-6 p-0": t === "small" && !(o || n),
1178
- "h-6 px-4 text-sm font-medium": t === "small" && (o || n),
1179
- "h-8 w-8 p-1": t === "medium" && !(o || n),
1180
- "h-8 px-4 text-base font-medium": t === "medium" && (o || n),
1181
- "h-12 w-12 p-2": t === "large" && !(o || n),
1182
- "h-12 px-4 text-lg font-medium": t === "large" && (o || n)
1173
+ return C("inline-flex items-center", {
1174
+ "justify-center": n === "center",
1175
+ "justify-start": n === "left",
1176
+ "justify-end": n === "right",
1177
+ "h-6 w-6 p-0": t === "small" && !(o || a),
1178
+ "h-6 px-4 text-sm font-medium": t === "small" && (o || a),
1179
+ "h-8 w-8 p-1": t === "medium" && !(o || a),
1180
+ "h-8 px-4 text-base font-medium": t === "medium" && (o || a),
1181
+ "h-12 w-12 p-2": t === "large" && !(o || a),
1182
+ "h-12 px-4 text-lg font-medium": t === "large" && (o || a)
1183
1183
  });
1184
1184
  }
1185
1185
  }, Ir = ({
1186
1186
  mode: e,
1187
1187
  noBackground: t,
1188
1188
  noTruncate: o,
1189
- variant: n
1189
+ variant: a
1190
1190
  }) => {
1191
1191
  if (t)
1192
1192
  return "not-prose rounded-full";
1193
- if (n === "primary")
1194
- return w("not-prose rounded-full", {
1193
+ if (a === "primary")
1194
+ return C("not-prose rounded-full", {
1195
1195
  truncate: !o,
1196
1196
  "bg-action-dark text-copy-light": e === "dark",
1197
1197
  "bg-action-light text-copy-lighter": e === "light",
1198
1198
  "bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "system",
1199
1199
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
1200
1200
  });
1201
- if (n === "secondary")
1202
- return w("not-prose rounded-full", {
1201
+ if (a === "secondary")
1202
+ return C("not-prose rounded-full", {
1203
1203
  truncate: !o,
1204
1204
  "bg-action-dark text-copy-light": e === "light",
1205
1205
  "bg-action-light text-copy-lighter": e === "dark",
1206
1206
  "bg-action-dark text-copy-light dark:bg-action-light dark:text-copy-lighter": e === "alt-system",
1207
1207
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
1208
1208
  });
1209
- if (n === "danger")
1210
- return w("not-prose rounded-full", {
1209
+ if (a === "danger")
1210
+ return C("not-prose rounded-full", {
1211
1211
  truncate: !o,
1212
1212
  "bg-action-danger-dark text-copy-light": e === "dark",
1213
1213
  "bg-action-danger-light text-copy-lighter": e === "light",
@@ -1222,21 +1222,21 @@ const je = "av-messagebox", Ke = "av-panel", We = "av-button", Tr = (e) => {
1222
1222
  if (t)
1223
1223
  return "";
1224
1224
  if (o === "primary")
1225
- return w("hover:text-copy-light-hover", {
1225
+ return C("hover:text-copy-light-hover", {
1226
1226
  "hover:bg-action-dark-hover": e === "dark",
1227
1227
  "hover:bg-action-light-hover": e === "light",
1228
1228
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
1229
1229
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
1230
1230
  });
1231
1231
  if (o === "secondary")
1232
- return w("hover:text-copy-light-hover", {
1232
+ return C("hover:text-copy-light-hover", {
1233
1233
  "hover:bg-action-dark-hover": e === "light",
1234
1234
  "hover:bg-action-light-hover": e === "dark",
1235
1235
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
1236
1236
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
1237
1237
  });
1238
1238
  if (o === "danger")
1239
- return w("hover:text-copy-light-hover", {
1239
+ return C("hover:text-copy-light-hover", {
1240
1240
  "hover:bg-action-danger-dark-hover": e === "dark",
1241
1241
  "hover:bg-action-danger-light-hover": e === "light",
1242
1242
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
@@ -1250,21 +1250,21 @@ const je = "av-messagebox", Ke = "av-panel", We = "av-button", Tr = (e) => {
1250
1250
  if (t)
1251
1251
  return "";
1252
1252
  if (o === "primary")
1253
- return w("active:text-copy-light-active", {
1253
+ return C("active:text-copy-light-active", {
1254
1254
  "active:bg-action-dark-active": e === "dark",
1255
1255
  "active:bg-action-light-active": e === "light",
1256
1256
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
1257
1257
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
1258
1258
  });
1259
1259
  if (o === "secondary")
1260
- return w("active:text-copy-light-active", {
1260
+ return C("active:text-copy-light-active", {
1261
1261
  "active:bg-action-dark-active": e === "light",
1262
1262
  "active:bg-action-light-active": e === "dark",
1263
1263
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
1264
1264
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
1265
1265
  });
1266
1266
  if (o === "danger")
1267
- return w("active:text-copy-lighter-active", {
1267
+ return C("active:text-copy-lighter-active", {
1268
1268
  "active:bg-action-danger-dark-active": e === "dark",
1269
1269
  "active:bg-action-danger-light-active": e === "light",
1270
1270
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
@@ -1278,27 +1278,27 @@ const je = "av-messagebox", Ke = "av-panel", We = "av-button", Tr = (e) => {
1278
1278
  if (t)
1279
1279
  return "border border-transparent";
1280
1280
  if (o === "primary")
1281
- return w("border", {
1281
+ return C("border", {
1282
1282
  "border-border-dark": e === "dark",
1283
1283
  "border-border-accent": e === "light",
1284
1284
  "border-border-dark dark:border-border-accent": e === "system",
1285
1285
  "border-border-accent dark:border-border-dark": e === "alt-system"
1286
1286
  });
1287
1287
  if (o === "secondary")
1288
- return w("border", {
1288
+ return C("border", {
1289
1289
  "border-border-dark": e === "light",
1290
1290
  "border-border-accent": e === "dark",
1291
1291
  "border-border-dark dark:border-border-accent": e === "alt-system",
1292
1292
  "border-border-accent dark:border-border-dark": e === "system"
1293
1293
  });
1294
1294
  if (o === "danger")
1295
- return w("border", {
1295
+ return C("border", {
1296
1296
  "border-border-danger-dark": e === "dark",
1297
1297
  "border-border-danger-medium": e === "light",
1298
1298
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
1299
1299
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
1300
1300
  });
1301
- }, Ar = ({ focusMode: e }) => w("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1301
+ }, Ar = ({ focusMode: e }) => C("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1302
1302
  "focus:outline-focus-dark": e === "dark",
1303
1303
  "focus:outline-focus-light": e === "light",
1304
1304
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
@@ -1307,46 +1307,46 @@ const je = "av-messagebox", Ke = "av-panel", We = "av-button", Tr = (e) => {
1307
1307
  type: e,
1308
1308
  className: t,
1309
1309
  raw: o,
1310
- mode: n,
1311
- focusMode: a,
1310
+ mode: a,
1311
+ focusMode: n,
1312
1312
  disabled: s,
1313
1313
  fullWidth: i,
1314
- size: c,
1314
+ size: l,
1315
1315
  noBorder: h,
1316
- labelRight: m,
1317
- labelLeft: l,
1316
+ labelRight: d,
1317
+ labelLeft: c,
1318
1318
  spacing: p,
1319
- noBackground: v,
1320
- variant: d,
1321
- noTruncate: u,
1322
- align: b
1323
- }) => (d || (d = "primary"), o ? w(We, t) : w(
1319
+ noBackground: y,
1320
+ variant: u,
1321
+ noTruncate: m,
1322
+ align: f
1323
+ }) => (u || (u = "primary"), o ? C(We, t) : C(
1324
1324
  We,
1325
1325
  t,
1326
- Tr(p),
1327
- Ir({ mode: n, variant: d, noBackground: v, noTruncate: u }),
1328
- xr({ type: e, size: c, labelRight: m, labelLeft: l, align: b }),
1329
- Rr({ mode: n, variant: d, noBorder: h }),
1330
- Ar({ focusMode: a }),
1331
- Sr({ mode: n, variant: d, disabled: s }),
1332
- _r({ mode: n, variant: d, disabled: s }),
1326
+ wr(p),
1327
+ Ir({ mode: a, variant: u, noBackground: y, noTruncate: m }),
1328
+ xr({ type: e, size: l, labelRight: d, labelLeft: c, align: f }),
1329
+ Rr({ mode: a, variant: u, noBorder: h }),
1330
+ Ar({ focusMode: n }),
1331
+ Sr({ mode: a, variant: u, disabled: s }),
1332
+ _r({ mode: a, variant: u, disabled: s }),
1333
1333
  {
1334
1334
  "w-full": i,
1335
1335
  "disabled:cursor-not-allowed disabled:opacity-50": s
1336
1336
  }
1337
1337
  )), Mr = (e, t, o) => {
1338
- var n;
1339
- !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((n = e == null ? void 0 : e.currentTarget) == null ? void 0 : n.focus) == "function" && e.currentTarget.focus(), typeof o == "function" && o(e);
1338
+ var a;
1339
+ !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 o == "function" && o(e);
1340
1340
  }, Be = x.forwardRef((e, t) => {
1341
- const { onClick: o, noInternalClick: n = !1, ...a } = e;
1341
+ const { onClick: o, noInternalClick: a = !1, ...n } = e;
1342
1342
  return /* @__PURE__ */ r(
1343
1343
  "button",
1344
1344
  {
1345
1345
  ref: t,
1346
1346
  onClick: (s) => {
1347
- Mr(s, n, o);
1347
+ Mr(s, a, o);
1348
1348
  },
1349
- ...a
1349
+ ...n
1350
1350
  }
1351
1351
  );
1352
1352
  });
@@ -1356,56 +1356,56 @@ const xt = x.forwardRef(
1356
1356
  children: e,
1357
1357
  disabled: t = !1,
1358
1358
  mode: o = "system",
1359
- focusMode: n = "system",
1360
- fullWidth: a = !1,
1359
+ focusMode: a = "system",
1360
+ fullWidth: n = !1,
1361
1361
  className: s,
1362
1362
  type: i = "button",
1363
- raw: c = !1,
1363
+ raw: l = !1,
1364
1364
  noBorder: h = !1,
1365
- "aria-label": m,
1366
- label: l,
1365
+ "aria-label": d,
1366
+ label: c,
1367
1367
  size: p = "medium",
1368
- labelRight: v,
1369
- labelLeft: d,
1370
- spacing: u,
1371
- noBackground: b = !1,
1372
- align: C = "center",
1373
- ...g
1374
- }, k) => {
1375
- const T = Et({
1368
+ labelRight: y,
1369
+ labelLeft: u,
1370
+ spacing: m,
1371
+ noBackground: f = !1,
1372
+ align: g = "center",
1373
+ ...k
1374
+ }, T) => {
1375
+ const N = Et({
1376
1376
  type: $e,
1377
1377
  mode: o,
1378
- focusMode: n,
1379
- fullWidth: a,
1378
+ focusMode: a,
1379
+ fullWidth: n,
1380
1380
  disabled: t,
1381
- raw: c,
1381
+ raw: l,
1382
1382
  className: s,
1383
1383
  noBorder: h,
1384
1384
  size: p,
1385
- labelRight: v,
1386
- labelLeft: d,
1387
- spacing: u,
1388
- noBackground: b,
1389
- align: C
1390
- }), I = w({
1391
- "text-copy-accent-dark": o === "light" && !c,
1392
- "text-copy-light": o === "dark" && !c,
1393
- "text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !c,
1394
- "text-copy-light dark:text-copy-accent-dark": o === "system" && !c
1385
+ labelRight: y,
1386
+ labelLeft: u,
1387
+ spacing: m,
1388
+ noBackground: f,
1389
+ align: g
1390
+ }), I = C({
1391
+ "text-copy-accent-dark": o === "light" && !l,
1392
+ "text-copy-light": o === "dark" && !l,
1393
+ "text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !l,
1394
+ "text-copy-light dark:text-copy-accent-dark": o === "system" && !l
1395
1395
  });
1396
- return /* @__PURE__ */ y(
1396
+ return /* @__PURE__ */ v(
1397
1397
  Be,
1398
1398
  {
1399
- ref: k,
1400
- className: T,
1399
+ ref: T,
1400
+ className: N,
1401
1401
  disabled: t,
1402
1402
  type: i,
1403
- "aria-label": m || l,
1404
- ...g,
1403
+ "aria-label": d || c,
1404
+ ...k,
1405
1405
  children: [
1406
- d && /* @__PURE__ */ r("span", { className: "pr-2", children: d }),
1406
+ u && /* @__PURE__ */ r("span", { className: "pr-2", children: u }),
1407
1407
  /* @__PURE__ */ r("div", { className: I, children: e }),
1408
- v && /* @__PURE__ */ r("span", { className: "pl-2", children: v })
1408
+ y && /* @__PURE__ */ r("span", { className: "pl-2", children: y })
1409
1409
  ]
1410
1410
  }
1411
1411
  );
@@ -1425,49 +1425,49 @@ try {
1425
1425
  });
1426
1426
  } catch {
1427
1427
  }
1428
- const Lr = x.forwardRef(
1428
+ const Pr = x.forwardRef(
1429
1429
  ({
1430
1430
  children: e,
1431
1431
  disabled: t = !1,
1432
1432
  mode: o = "system",
1433
- focusMode: n = "system",
1434
- fullWidth: a = !1,
1433
+ focusMode: a = "system",
1434
+ fullWidth: n = !1,
1435
1435
  className: s,
1436
1436
  type: i = "button",
1437
- raw: c = !1,
1437
+ raw: l = !1,
1438
1438
  noBorder: h = !1,
1439
- "aria-label": m,
1440
- label: l,
1439
+ "aria-label": d,
1440
+ label: c,
1441
1441
  size: p = "medium",
1442
- labelRight: v,
1443
- labelLeft: d,
1444
- spacing: u,
1445
- noBackground: b = !1,
1446
- align: C = "center",
1447
- active: g = !1,
1448
- ...k
1449
- }, T) => {
1442
+ labelRight: y,
1443
+ labelLeft: u,
1444
+ spacing: m,
1445
+ noBackground: f = !1,
1446
+ align: g = "center",
1447
+ active: k = !1,
1448
+ ...T
1449
+ }, N) => {
1450
1450
  const I = Et({
1451
1451
  type: $e,
1452
1452
  mode: o,
1453
- focusMode: n,
1454
- fullWidth: a,
1453
+ focusMode: a,
1454
+ fullWidth: n,
1455
1455
  disabled: t,
1456
- raw: c,
1456
+ raw: l,
1457
1457
  className: s,
1458
1458
  noBorder: h,
1459
1459
  size: p,
1460
- labelRight: v,
1461
- labelLeft: d,
1462
- spacing: u,
1463
- noBackground: b,
1464
- align: C
1465
- }), M = w({
1466
- "text-copy-accent-dark": o === "light" && !c,
1467
- "text-copy-light": o === "dark" && !c,
1468
- "text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !c,
1469
- "text-copy-light dark:text-copy-accent-dark": o === "system" && !c
1470
- }), _ = g ? w(
1460
+ labelRight: y,
1461
+ labelLeft: u,
1462
+ spacing: m,
1463
+ noBackground: f,
1464
+ align: g
1465
+ }), M = C({
1466
+ "text-copy-accent-dark": o === "light" && !l,
1467
+ "text-copy-light": o === "dark" && !l,
1468
+ "text-copy-accent-dark dark:text-copy-light": o === "alt-system" && !l,
1469
+ "text-copy-light dark:text-copy-accent-dark": o === "system" && !l
1470
+ }), _ = k ? C(
1471
1471
  "relative",
1472
1472
  "focus-within:static",
1473
1473
  "focus-within:after:border-transparent",
@@ -1484,26 +1484,26 @@ const Lr = x.forwardRef(
1484
1484
  "after:border-table-light dark:after:border-table-dark": o === "alt-system"
1485
1485
  }
1486
1486
  ) : "";
1487
- return /* @__PURE__ */ r("div", { className: _, children: /* @__PURE__ */ y(
1487
+ return /* @__PURE__ */ r("div", { className: _, children: /* @__PURE__ */ v(
1488
1488
  Be,
1489
1489
  {
1490
- ref: T,
1490
+ ref: N,
1491
1491
  className: I,
1492
1492
  disabled: t,
1493
1493
  type: i,
1494
- "aria-label": m || l,
1495
- ...k,
1494
+ "aria-label": d || c,
1495
+ ...T,
1496
1496
  children: [
1497
- d && /* @__PURE__ */ r("span", { className: "pr-2", children: d }),
1497
+ u && /* @__PURE__ */ r("span", { className: "pr-2", children: u }),
1498
1498
  /* @__PURE__ */ r("div", { className: M, children: e }),
1499
- v && /* @__PURE__ */ r("span", { className: "pl-2", children: v })
1499
+ y && /* @__PURE__ */ r("span", { className: "pl-2", children: y })
1500
1500
  ]
1501
1501
  }
1502
1502
  ) });
1503
1503
  }
1504
1504
  );
1505
- Lr.displayName = "ButtonSort";
1506
- const Pr = (e) => {
1505
+ Pr.displayName = "ButtonSort";
1506
+ const Lr = (e) => {
1507
1507
  let t = "";
1508
1508
  if (typeof e == "number" || typeof e == "string")
1509
1509
  t = "m-" + e;
@@ -1516,34 +1516,34 @@ const Pr = (e) => {
1516
1516
  children: e,
1517
1517
  fill: t,
1518
1518
  viewBox: o,
1519
- className: n,
1520
- defaultViewBox: a,
1519
+ className: a,
1520
+ defaultViewBox: n,
1521
1521
  defaultClassName: s,
1522
1522
  spacing: i,
1523
- title: c,
1523
+ title: l,
1524
1524
  semantic: h = !1,
1525
- ...m
1525
+ ...d
1526
1526
  }) => {
1527
- const l = Pr(i), p = w(
1528
- l,
1529
- n || s
1527
+ const c = Lr(i), p = C(
1528
+ c,
1529
+ a || s
1530
1530
  );
1531
- return /* @__PURE__ */ y(A, { children: [
1531
+ return /* @__PURE__ */ v(A, { children: [
1532
1532
  /* @__PURE__ */ r(
1533
1533
  "svg",
1534
1534
  {
1535
1535
  xmlns: "http://www.w3.org/2000/svg",
1536
1536
  className: p,
1537
- viewBox: o || a,
1537
+ viewBox: o || n,
1538
1538
  fill: t || "currentColor",
1539
1539
  role: "img",
1540
1540
  "aria-hidden": !h,
1541
1541
  focusable: !1,
1542
- ...m,
1542
+ ...d,
1543
1543
  children: e
1544
1544
  }
1545
1545
  ),
1546
- c && h && /* @__PURE__ */ r("span", { className: "sr-only", children: c })
1546
+ l && h && /* @__PURE__ */ r("span", { className: "sr-only", children: l })
1547
1547
  ] });
1548
1548
  };
1549
1549
  /*!
@@ -1563,8 +1563,8 @@ const Br = ({
1563
1563
  className: e,
1564
1564
  viewBox: t,
1565
1565
  spacing: o,
1566
- title: n,
1567
- monotone: a,
1566
+ title: a,
1567
+ monotone: n,
1568
1568
  ...s
1569
1569
  }) => /* @__PURE__ */ r(
1570
1570
  $r,
@@ -1574,7 +1574,7 @@ const Br = ({
1574
1574
  viewBox: t,
1575
1575
  className: e,
1576
1576
  spacing: o,
1577
- title: n || "Close",
1577
+ title: a || "Close",
1578
1578
  ...s,
1579
1579
  children: /* @__PURE__ */ r("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
1580
1580
  }
@@ -1597,7 +1597,7 @@ const re = "panel", pe = "messagebox", zr = ({
1597
1597
  kind: t,
1598
1598
  borderMode: o
1599
1599
  }) => ({
1600
- main: w("prose prose-lighter flex flex-col bg-surface-medium", {
1600
+ main: C("prose prose-lighter flex flex-col bg-surface-medium", {
1601
1601
  [`${Ke} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === re,
1602
1602
  [`${Ke} w-full sm:w-[95%] md:max-w-2xl`]: t === re && !e,
1603
1603
  [`${je} rounded-lg border-2`]: t === pe,
@@ -1612,7 +1612,7 @@ const re = "panel", pe = "messagebox", zr = ({
1612
1612
  footer: "flex flex-grow flex-col sm:p-4 p-2",
1613
1613
  header: "sm:p-4 mb-0 p-2",
1614
1614
  close: "sm:p-4 p-2"
1615
- }), ge = (e) => no(
1615
+ }), ge = (e) => ao(
1616
1616
  () => import("./index.MEUopFRx.6qFMhBMt.js").then((t) => ({
1617
1617
  default: t[e]
1618
1618
  }))
@@ -1620,21 +1620,21 @@ const re = "panel", pe = "messagebox", zr = ({
1620
1620
  open: e,
1621
1621
  onOpenChange: t,
1622
1622
  title: o,
1623
- children: n,
1624
- footer: a,
1623
+ children: a,
1624
+ footer: n,
1625
1625
  borderMode: s = "light",
1626
1626
  kind: i = re,
1627
- className: c
1627
+ className: l
1628
1628
  }) => {
1629
- const h = le(""), m = zr({ className: c, kind: i, borderMode: s });
1630
- return U(() => (e && (h.current = document.title, document.title = `${o} | ${h.current}`), () => {
1629
+ const h = le(""), d = zr({ className: l, kind: i, borderMode: s });
1630
+ return q(() => (e && (h.current = document.title, document.title = `${o} | ${h.current}`), () => {
1631
1631
  e && (document.title = h.current);
1632
- }), [o, e]), /* @__PURE__ */ r(ro, { fallback: /* @__PURE__ */ r("div", {}), children: e && /* @__PURE__ */ r(Or, { open: e, onOpenChange: t, children: /* @__PURE__ */ y(Vr, { className: m.main, children: [
1633
- /* @__PURE__ */ y("div", { className: "flex flex-row-reverse items-center justify-between", children: [
1632
+ }), [o, e]), /* @__PURE__ */ r(ro, { fallback: /* @__PURE__ */ r("div", {}), children: e && /* @__PURE__ */ r(Or, { open: e, onOpenChange: t, children: /* @__PURE__ */ v(Vr, { className: d.main, children: [
1633
+ /* @__PURE__ */ v("div", { className: "flex flex-row-reverse items-center justify-between", children: [
1634
1634
  /* @__PURE__ */ r(
1635
1635
  Dr,
1636
1636
  {
1637
- className: m.close,
1637
+ className: d.close,
1638
1638
  trigger: /* @__PURE__ */ r(
1639
1639
  xt,
1640
1640
  {
@@ -1647,34 +1647,34 @@ const re = "panel", pe = "messagebox", zr = ({
1647
1647
  )
1648
1648
  }
1649
1649
  ),
1650
- /* @__PURE__ */ r(Hr, { className: m.header, children: o })
1650
+ /* @__PURE__ */ r(Hr, { className: d.header, children: o })
1651
1651
  ] }),
1652
- /* @__PURE__ */ r(Fr, { className: m.content, children: n }),
1653
- a && /* @__PURE__ */ r("div", { className: m.footer, children: a })
1652
+ /* @__PURE__ */ r(Fr, { className: d.content, children: a }),
1653
+ n && /* @__PURE__ */ r("div", { className: d.footer, children: n })
1654
1654
  ] }) }) });
1655
1655
  }, Gr = ({ stats: e }) => {
1656
- const t = (e == null ? void 0 : e.plugins) || [], o = (e == null ? void 0 : e.version) || "", n = (e == null ? void 0 : e.models) || [], a = ce(), s = ce();
1657
- return /* @__PURE__ */ y(A, { children: [
1656
+ const t = (e == null ? void 0 : e.plugins) || [], o = (e == null ? void 0 : e.version) || "", a = (e == null ? void 0 : e.models) || [], n = ce(), s = ce();
1657
+ return /* @__PURE__ */ v(A, { children: [
1658
1658
  /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
1659
- B,
1659
+ $,
1660
1660
  {
1661
- header: N.ABOUT.TITLE_CLIENT,
1661
+ header: w.ABOUT.TITLE_CLIENT,
1662
1662
  className: "prose-dark dark:prose-lighter",
1663
- children: se(a, {
1664
- [N.ABOUT.VERSION]: "5.7.0",
1665
- [N.ABOUT.BUILD_TIMESTAMP]: "12/18/2024 03:40 PM EST"
1663
+ children: se(n, {
1664
+ [w.ABOUT.VERSION]: "5.8.0",
1665
+ [w.ABOUT.BUILD_TIMESTAMP]: "12/21/2024 06:50 PM EST"
1666
1666
  })
1667
1667
  }
1668
1668
  ) }),
1669
1669
  /* @__PURE__ */ r(
1670
- B,
1670
+ $,
1671
1671
  {
1672
- header: N.ABOUT.TITLE_SERVER,
1672
+ header: w.ABOUT.TITLE_SERVER,
1673
1673
  className: "prose-dark dark:prose-lighter",
1674
1674
  children: se(s, {
1675
- [N.ABOUT.VERSION]: o,
1676
- [be(N.ABOUT.ENGINE, n.length)]: /* @__PURE__ */ r(A, { children: n.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) }),
1677
- [be(N.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ r(A, { children: t.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) })
1675
+ [w.ABOUT.VERSION]: o,
1676
+ [be(w.ABOUT.ENGINE, a.length)]: /* @__PURE__ */ r(A, { children: a.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) }),
1677
+ [be(w.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ r(A, { children: t.map((i) => /* @__PURE__ */ r("div", { className: "text-right", children: i }, i)) })
1678
1678
  })
1679
1679
  }
1680
1680
  )
@@ -1683,15 +1683,15 @@ const re = "panel", pe = "messagebox", zr = ({
1683
1683
  open: e,
1684
1684
  onOpenChange: t
1685
1685
  }) => {
1686
- const { serverStats: o } = z(ue);
1686
+ const { serverStats: o } = B(ue);
1687
1687
  return /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: At, children: /* @__PURE__ */ r(Gr, { stats: o }) });
1688
1688
  }, jr = (e) => Xe(e), Kr = (e) => {
1689
1689
  if (!e || e.length === 0)
1690
- return Lt;
1690
+ return Pt;
1691
1691
  const t = e.filter(
1692
1692
  (o) => {
1693
- var n, a;
1694
- return ((n = o == null ? void 0 : o.message) == null ? void 0 : n.role) === Pt && typeof ((a = o == null ? void 0 : o.message) == null ? void 0 : a.processingTime) == "number";
1693
+ var a, n;
1694
+ return ((a = o == null ? void 0 : o.message) == null ? void 0 : a.role) === Lt && typeof ((n = o == null ? void 0 : o.message) == null ? void 0 : n.processingTime) == "number";
1695
1695
  }
1696
1696
  ).map((o) => o.message.processingTime);
1697
1697
  return $t({
@@ -1702,29 +1702,29 @@ const re = "panel", pe = "messagebox", zr = ({
1702
1702
  isAuthenticated: e,
1703
1703
  stats: t
1704
1704
  }) => {
1705
- const { state: o } = z(ue), n = Bt - Number(o == null ? void 0 : o.usage), a = ce(), s = ce();
1706
- return e ? /* @__PURE__ */ y(A, { children: [
1705
+ const { state: o } = B(ue), a = Bt - Number(o == null ? void 0 : o.usage), n = ce(), s = ce();
1706
+ return e ? /* @__PURE__ */ v(A, { children: [
1707
1707
  o && o.messages.length > 0 && /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
1708
- B,
1708
+ $,
1709
1709
  {
1710
- header: N.CURRENT_STATISTICS.TITLE,
1710
+ header: w.CURRENT_STATISTICS.TITLE,
1711
1711
  className: "prose-dark dark:prose-lighter",
1712
- children: se(a, {
1713
- [N.CURRENT_STATISTICS.MODEL_NAME]: (o == null ? void 0 : o.model) || ne,
1714
- [N.CURRENT_STATISTICS.TOKENS_USED]: o == null ? void 0 : o.usage,
1715
- [N.CURRENT_STATISTICS.REMAINING_TOKENS]: Mt.format(n),
1716
- [N.CURRENT_STATISTICS.PROCESSING_TIME]: Kr(o == null ? void 0 : o.messages)
1712
+ children: se(n, {
1713
+ [w.CURRENT_STATISTICS.MODEL_NAME]: (o == null ? void 0 : o.model) || ae,
1714
+ [w.CURRENT_STATISTICS.TOKENS_USED]: o == null ? void 0 : o.usage,
1715
+ [w.CURRENT_STATISTICS.REMAINING_TOKENS]: Mt.format(a),
1716
+ [w.CURRENT_STATISTICS.PROCESSING_TIME]: Kr(o == null ? void 0 : o.messages)
1717
1717
  })
1718
1718
  }
1719
1719
  ) }),
1720
1720
  /* @__PURE__ */ r(
1721
- B,
1721
+ $,
1722
1722
  {
1723
- header: N.MAIN_STATISTICS.TITLE,
1723
+ header: w.MAIN_STATISTICS.TITLE,
1724
1724
  className: "prose-dark dark:prose-lighter",
1725
1725
  children: se(s, {
1726
- [be(N.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
1727
- [N.MAIN_STATISTICS.PROCESSING_TIME]: Xe(
1726
+ [be(w.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
1727
+ [w.MAIN_STATISTICS.PROCESSING_TIME]: Xe(
1728
1728
  t.averageProcessingTimes
1729
1729
  )
1730
1730
  })
@@ -1735,40 +1735,40 @@ const re = "panel", pe = "messagebox", zr = ({
1735
1735
  open: e,
1736
1736
  onOpenChange: t
1737
1737
  }) => {
1738
- const [o, n] = S({
1738
+ const [o, a] = S({
1739
1739
  averageProcessingTimes: 0,
1740
1740
  totalChats: 0
1741
- }), { isAuthenticated: a, getAccessToken: s, user: i } = X();
1742
- return U(() => {
1741
+ }), { isAuthenticated: n, getAccessToken: s, user: i } = X();
1742
+ return q(() => {
1743
1743
  !e || !i || (async () => {
1744
1744
  try {
1745
- const c = await F({
1745
+ const l = await V({
1746
1746
  accessToken: await s(),
1747
- type: H.GET_CHATS_STATS,
1747
+ type: F.GET_CHATS_STATS,
1748
1748
  params: {
1749
1749
  userId: i.username
1750
1750
  }
1751
1751
  });
1752
- c.status === 200 && n(c.data);
1752
+ l.status === 200 && a(l.data);
1753
1753
  } catch {
1754
1754
  }
1755
1755
  })();
1756
- }, [e, s, i]), /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Ze, children: /* @__PURE__ */ r(Wr, { isAuthenticated: a, stats: o }) });
1756
+ }, [e, s, i]), /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Ze, children: /* @__PURE__ */ r(Wr, { isAuthenticated: n, stats: o }) });
1757
1757
  }, It = ({
1758
1758
  showConfirmation: e,
1759
1759
  setShowConfirmation: t,
1760
1760
  action: o,
1761
- children: n,
1762
- customStrings: a
1761
+ children: a,
1762
+ customStrings: n
1763
1763
  }) => /* @__PURE__ */ r(
1764
1764
  Z,
1765
1765
  {
1766
1766
  kind: "messagebox",
1767
1767
  open: e,
1768
1768
  onOpenChange: t,
1769
- title: a.title,
1770
- footer: /* @__PURE__ */ y(ie, { columnGap: 2, alignHorizontal: "flex-end", children: [
1771
- /* @__PURE__ */ r($, { children: /* @__PURE__ */ r(
1769
+ title: n.title,
1770
+ footer: /* @__PURE__ */ v(ie, { columnGap: 2, alignHorizontal: "flex-end", children: [
1771
+ /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(
1772
1772
  G,
1773
1773
  {
1774
1774
  mode: "dark",
@@ -1777,10 +1777,10 @@ const re = "panel", pe = "messagebox", zr = ({
1777
1777
  onClick: () => {
1778
1778
  t(!1);
1779
1779
  },
1780
- children: a.cancelAction
1780
+ children: n.cancelAction
1781
1781
  }
1782
1782
  ) }),
1783
- /* @__PURE__ */ r($, { children: /* @__PURE__ */ r(
1783
+ /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(
1784
1784
  G,
1785
1785
  {
1786
1786
  mode: "dark",
@@ -1789,44 +1789,30 @@ const re = "panel", pe = "messagebox", zr = ({
1789
1789
  onClick: () => {
1790
1790
  t(!1), o();
1791
1791
  },
1792
- children: a.confirmAction
1792
+ children: n.confirmAction
1793
1793
  }
1794
1794
  ) })
1795
1795
  ] }),
1796
- children: n
1796
+ children: a
1797
1797
  }
1798
- );
1799
- var qr = typeof window < "u", Xr = function(e, t) {
1800
- return qr ? window.matchMedia(e).matches : (process.env.NODE_ENV !== "production" && console.warn("`useMedia` When server side rendering, defaultState should be defined to prevent a hydration mismatches."), !1);
1801
- }, Zr = function(e, t) {
1802
- var o = S(Xr(e)), n = o[0], a = o[1];
1803
- return U(function() {
1804
- var s = !0, i = window.matchMedia(e), c = function() {
1805
- s && a(!!i.matches);
1806
- };
1807
- return i.addEventListener("change", c), a(i.matches), function() {
1808
- s = !1, i.removeEventListener("change", c);
1809
- };
1810
- }, [e]), n;
1811
- };
1812
- const Jr = async (e, t, o, n) => {
1798
+ ), qr = async (e, t, o, a) => {
1813
1799
  try {
1814
- const a = await F({
1815
- accessToken: n,
1816
- type: H.GET_CHAT,
1800
+ const n = await V({
1801
+ accessToken: a,
1802
+ type: F.GET_CHAT,
1817
1803
  params: {
1818
1804
  id: e.id
1819
1805
  }
1820
1806
  });
1821
- a.status === 200 && (t({
1807
+ n.status === 200 && (t({
1822
1808
  type: Qe
1823
1809
  }), t({
1824
1810
  type: Ot,
1825
1811
  payload: {
1826
1812
  id: e.id,
1827
- model: a.data.model,
1828
- usage: a.data.usage,
1829
- messages: a.data.messages
1813
+ model: n.data.model,
1814
+ usage: n.data.usage,
1815
+ messages: n.data.messages
1830
1816
  }
1831
1817
  }), o(!1));
1832
1818
  } catch {
@@ -1834,28 +1820,28 @@ const Jr = async (e, t, o, n) => {
1834
1820
  }, Ye = (e) => {
1835
1821
  const t = e[0];
1836
1822
  return Dt(t == null ? void 0 : t.content, 100);
1837
- }, Qr = ({
1823
+ }, Xr = ({
1838
1824
  filteredHistory: e,
1839
1825
  setFilteredHistory: t,
1840
1826
  dispatch: o,
1841
- onOpenChange: n
1827
+ onOpenChange: a
1842
1828
  }) => {
1843
- var C;
1844
- const { user: a, getAccessToken: s } = X(), i = le({
1829
+ var f;
1830
+ const { user: n, getAccessToken: s } = X(), i = le({
1845
1831
  id: 0,
1846
1832
  timestamp: "",
1847
1833
  message: ""
1848
- }), [c, h] = S(!1), m = Zr("(min-width: 480px)"), { state: l, dispatch: p } = z(Je), [, v] = he({
1834
+ }), [l, h] = S(!1), { state: d, dispatch: c } = B(Je), [, p] = he({
1849
1835
  key: me + zt,
1850
- initialValue: l.sortDirection
1851
- }), d = e.data.sort(
1836
+ initialValue: d.sortDirection
1837
+ }), y = e.data.sort(
1852
1838
  (g, k) => {
1853
- switch (l.sortedCell) {
1839
+ switch (d.sortedCell) {
1854
1840
  case "timestamp":
1855
- if (l.sortDirection === V.ASC)
1856
- return new Date(g[l.sortedCell]).getTime() - new Date(k[l.sortedCell]).getTime();
1857
- if (l.sortDirection === V.DESC)
1858
- return new Date(k[l.sortedCell]).getTime() - new Date(g[l.sortedCell]).getTime();
1841
+ if (d.sortDirection === D.ASC)
1842
+ return new Date(g[d.sortedCell]).getTime() - new Date(k[d.sortedCell]).getTime();
1843
+ if (d.sortDirection === D.DESC)
1844
+ return new Date(k[d.sortedCell]).getTime() - new Date(g[d.sortedCell]).getTime();
1859
1845
  break;
1860
1846
  default:
1861
1847
  return 0;
@@ -1863,50 +1849,50 @@ const Jr = async (e, t, o, n) => {
1863
1849
  return 0;
1864
1850
  }
1865
1851
  ), u = (g) => {
1866
- switch (l.sortDirection) {
1852
+ switch (d.sortDirection) {
1867
1853
  case !1:
1868
- v(V.ASC), p({
1869
- type: we,
1854
+ p(D.ASC), c({
1855
+ type: Te,
1870
1856
  payload: {
1871
1857
  sortedCell: g,
1872
- sortDirection: V.ASC
1858
+ sortDirection: D.ASC
1873
1859
  }
1874
1860
  });
1875
1861
  break;
1876
- case V.ASC:
1877
- v(V.DESC), p({
1878
- type: we,
1862
+ case D.ASC:
1863
+ p(D.DESC), c({
1864
+ type: Te,
1879
1865
  payload: {
1880
1866
  sortedCell: g,
1881
- sortDirection: V.DESC
1867
+ sortDirection: D.DESC
1882
1868
  }
1883
1869
  });
1884
1870
  break;
1885
1871
  default:
1886
- v(V.ASC), p({
1887
- type: we,
1872
+ p(D.ASC), c({
1873
+ type: Te,
1888
1874
  payload: {
1889
1875
  sortedCell: g,
1890
- sortDirection: V.ASC
1876
+ sortDirection: D.ASC
1891
1877
  }
1892
1878
  });
1893
1879
  break;
1894
1880
  }
1895
1881
  };
1896
- return /* @__PURE__ */ y(A, { children: [
1897
- /* @__PURE__ */ y(
1882
+ return /* @__PURE__ */ v(A, { children: [
1883
+ /* @__PURE__ */ v(
1898
1884
  It,
1899
1885
  {
1900
- showConfirmation: c,
1886
+ showConfirmation: l,
1901
1887
  setShowConfirmation: h,
1902
1888
  action: async () => {
1903
1889
  const g = i.current;
1904
1890
  try {
1905
- const k = await F({
1891
+ const k = await V({
1906
1892
  accessToken: await s(),
1907
- type: H.DELETE_CHAT,
1893
+ type: F.DELETE_CHAT,
1908
1894
  params: {
1909
- userId: (a == null ? void 0 : a.username) || "",
1895
+ userId: (n == null ? void 0 : n.username) || "",
1910
1896
  id: g.id
1911
1897
  }
1912
1898
  });
@@ -1921,48 +1907,46 @@ const Jr = async (e, t, o, n) => {
1921
1907
  },
1922
1908
  children: [
1923
1909
  /* @__PURE__ */ r("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
1924
- /* @__PURE__ */ y("ul", { className: "m-0", children: [
1925
- /* @__PURE__ */ y("li", { children: [
1910
+ /* @__PURE__ */ v("ul", { className: "m-0", children: [
1911
+ /* @__PURE__ */ v("li", { children: [
1926
1912
  "Timestamp:",
1927
1913
  " ",
1928
1914
  /* @__PURE__ */ r("span", { className: "text-lg", children: i.current && i.current.timestamp })
1929
1915
  ] }),
1930
- /* @__PURE__ */ y("li", { children: [
1916
+ /* @__PURE__ */ v("li", { children: [
1931
1917
  "First message:",
1932
1918
  " ",
1933
- /* @__PURE__ */ r("span", { className: "text-lg", children: (C = i.current) == null ? void 0 : C.message })
1919
+ /* @__PURE__ */ r("span", { className: "text-lg", children: (f = i.current) == null ? void 0 : f.message })
1934
1920
  ] })
1935
1921
  ] })
1936
1922
  ]
1937
1923
  }
1938
1924
  ),
1939
- /* @__PURE__ */ y(Zt, { stickyHeader: !0, stickyFooter: !0, wrapperClassName: "max-h-[60vh]", children: [
1940
- /* @__PURE__ */ r(Jt, { children: /* @__PURE__ */ y(Ne, { children: [
1941
- m && /* @__PURE__ */ r(P, { className: "sr-only", children: "Row" }),
1925
+ /* @__PURE__ */ v(Zt, { stickyHeader: !0, stickyFooter: !0, wrapperClassName: "max-h-[60vh]", children: [
1926
+ /* @__PURE__ */ r(Jt, { children: /* @__PURE__ */ v(Ne, { children: [
1942
1927
  /* @__PURE__ */ r(
1943
1928
  Qt,
1944
1929
  {
1945
1930
  buttonClassName: "text-xs sm:text-sm",
1946
1931
  cellId: "timestamp",
1947
1932
  align: "left",
1948
- sortDirection: l.sortDirection,
1949
- sortedCell: l.sortedCell,
1933
+ sortDirection: d.sortDirection,
1934
+ sortedCell: d.sortedCell,
1950
1935
  onClick: () => {
1951
1936
  u("timestamp");
1952
1937
  },
1953
1938
  children: "Date"
1954
1939
  }
1955
1940
  ),
1956
- /* @__PURE__ */ r(P, { className: "text-xs sm:text-sm", children: "First message" }),
1957
- /* @__PURE__ */ r(P, { className: "text-xs sm:text-sm", children: "Model" }),
1958
- /* @__PURE__ */ r(P, { className: "text-xs sm:text-sm text-right", children: "Actions" })
1941
+ /* @__PURE__ */ r(H, { className: "text-xs sm:text-sm", children: "First message" }),
1942
+ /* @__PURE__ */ r(H, { className: "text-xs sm:text-sm", children: "Model" }),
1943
+ /* @__PURE__ */ r(H, { className: "text-xs sm:text-sm text-right", children: "Actions" })
1959
1944
  ] }) }),
1960
- /* @__PURE__ */ r(eo, { children: d.map((g, k) => {
1945
+ /* @__PURE__ */ r(eo, { children: y.map((g, k) => {
1961
1946
  var T;
1962
- return ((T = g == null ? void 0 : g.messages) == null ? void 0 : T.length) > 0 ? /* @__PURE__ */ y(Ne, { children: [
1963
- m && /* @__PURE__ */ r(P, { children: k + 1 }),
1947
+ return ((T = g == null ? void 0 : g.messages) == null ? void 0 : T.length) > 0 ? /* @__PURE__ */ v(Ne, { children: [
1964
1948
  /* @__PURE__ */ r(
1965
- P,
1949
+ H,
1966
1950
  {
1967
1951
  component: "th",
1968
1952
  scope: "row",
@@ -1970,32 +1954,41 @@ const Jr = async (e, t, o, n) => {
1970
1954
  children: g.timestamp
1971
1955
  }
1972
1956
  ),
1973
- /* @__PURE__ */ r(P, { className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm", children: Ye(g.messages) }),
1974
- /* @__PURE__ */ y(P, { component: "th", scope: "row", className: "text-gray-400", children: [
1957
+ /* @__PURE__ */ r(
1958
+ H,
1959
+ {
1960
+ className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
1961
+ style: {
1962
+ wordBreak: "break-word"
1963
+ },
1964
+ children: Ye(g.messages)
1965
+ }
1966
+ ),
1967
+ /* @__PURE__ */ v(H, { component: "th", scope: "row", className: "text-gray-400", children: [
1975
1968
  g.model && g.model.startsWith("claude") && /* @__PURE__ */ r(st, { className: "size-4 sm:size-5" }),
1976
1969
  g.model && g.model.startsWith("gpt") && /* @__PURE__ */ r(it, { className: "size-4 sm:size-5" })
1977
1970
  ] }),
1978
- /* @__PURE__ */ r(P, { className: "px-2", children: /* @__PURE__ */ y("div", { className: "flex justify-end gap-2", children: [
1971
+ /* @__PURE__ */ r(H, { className: "px-2", children: /* @__PURE__ */ v("div", { className: "flex justify-end gap-2", children: [
1979
1972
  /* @__PURE__ */ r(
1980
- Y,
1973
+ W,
1981
1974
  {
1982
1975
  focusMode: "alt-system",
1983
1976
  noBorder: !0,
1984
1977
  label: "Restore chat",
1985
1978
  onClick: async () => {
1986
- const I = await s();
1987
- Jr(
1979
+ const N = await s();
1980
+ qr(
1988
1981
  g,
1989
1982
  o,
1990
- n,
1991
- I
1983
+ a,
1984
+ N
1992
1985
  );
1993
1986
  },
1994
1987
  children: /* @__PURE__ */ r(Ro, { className: "h-3 w-3", monotone: !0 })
1995
1988
  }
1996
1989
  ),
1997
1990
  /* @__PURE__ */ r(
1998
- Y,
1991
+ W,
1999
1992
  {
2000
1993
  focusMode: "alt-system",
2001
1994
  noBorder: !0,
@@ -2005,15 +1998,15 @@ const Jr = async (e, t, o, n) => {
2005
1998
  id: g.id,
2006
1999
  timestamp: g.timestamp,
2007
2000
  message: Ye(g.messages)
2008
- }, h(!c);
2001
+ }, h(!l);
2009
2002
  },
2010
2003
  children: /* @__PURE__ */ r("div", { className: "text-red-400", children: /* @__PURE__ */ r(xo, { className: "h-3 w-3", monotone: !0 }) })
2011
2004
  }
2012
2005
  )
2013
2006
  ] }) })
2014
- ] }, `${N.HISTORY.TITLE}-${g.id}-${k}`) : null;
2007
+ ] }, `${w.HISTORY.TITLE}-${g.id}-${k}`) : null;
2015
2008
  }) }),
2016
- /* @__PURE__ */ r(to, { children: /* @__PURE__ */ r(Ne, { children: /* @__PURE__ */ r(P, { colSpan: 5, children: /* @__PURE__ */ r("div", { children: be(
2009
+ /* @__PURE__ */ r(to, { children: /* @__PURE__ */ r(Ne, { children: /* @__PURE__ */ r(H, { colSpan: 4, children: /* @__PURE__ */ r("div", { children: be(
2017
2010
  `${e.data.length} chat`,
2018
2011
  e.data.length
2019
2012
  ) }) }) }) })
@@ -2023,52 +2016,52 @@ const Jr = async (e, t, o, n) => {
2023
2016
  function qe(e, t) {
2024
2017
  return t ? e.filter(
2025
2018
  (o) => o.messages.some(
2026
- (n) => n.content !== null && n.content.toLowerCase().includes(t.toLowerCase())
2019
+ (a) => a.content !== null && a.content.toLowerCase().includes(t.toLowerCase())
2027
2020
  )
2028
2021
  ) : e;
2029
2022
  }
2030
- const en = ({
2023
+ const Zr = ({
2031
2024
  onOpenChange: e,
2032
2025
  historyData: t
2033
2026
  }) => {
2034
- const { isAuthenticated: o } = X(), n = le(null), { dispatch: a } = z(ue), { state: s, dispatch: i } = z(Je), [, c] = he({
2027
+ const { isAuthenticated: o } = X(), a = le(null), { dispatch: n } = B(ue), { state: s, dispatch: i } = B(Je), [, l] = he({
2035
2028
  key: me + Vt,
2036
2029
  initialValue: s.searchString
2037
- }), h = ao(() => t, [t]), [m, l] = S({
2030
+ }), h = no(() => t, [t]), [d, c] = S({
2038
2031
  data: h
2039
- }), p = (u) => {
2040
- const b = qe(h, u);
2041
- l({
2042
- data: b
2043
- }), c(u), i({
2032
+ }), p = (m) => {
2033
+ const f = qe(h, m);
2034
+ c({
2035
+ data: f
2036
+ }), l(m), i({
2044
2037
  type: Ft,
2045
- payload: { searchString: u }
2038
+ payload: { searchString: m }
2046
2039
  });
2047
- }, v = (u) => {
2048
- p(u.target.value);
2049
- }, d = async (u) => {
2050
- u.preventDefault();
2040
+ }, y = (m) => {
2041
+ p(m.target.value);
2042
+ }, u = async (m) => {
2043
+ m.preventDefault();
2051
2044
  };
2052
- return U(() => {
2053
- const u = qe(
2045
+ return q(() => {
2046
+ const m = qe(
2054
2047
  t,
2055
2048
  s.searchString
2056
2049
  );
2057
- l({
2058
- data: u
2050
+ c({
2051
+ data: m
2059
2052
  });
2060
- }, [t, s.searchString]), o ? m && m.data && /* @__PURE__ */ y(A, { children: [
2061
- /* @__PURE__ */ r("form", { autoComplete: "off", onSubmit: d, children: /* @__PURE__ */ r(
2053
+ }, [t, s.searchString]), o ? d && d.data && /* @__PURE__ */ v(A, { children: [
2054
+ /* @__PURE__ */ r("form", { autoComplete: "off", onSubmit: u, children: /* @__PURE__ */ r(
2062
2055
  xe,
2063
2056
  {
2064
2057
  autoComplete: "off",
2065
2058
  autoCorrect: "off",
2066
- ref: n,
2059
+ ref: a,
2067
2060
  defaultValue: s.searchString,
2068
2061
  focusMode: "light",
2069
2062
  name: "Search",
2070
2063
  label: "Search",
2071
- onChange: v,
2064
+ onChange: y,
2072
2065
  spacing: { t: 2, b: 2 },
2073
2066
  ...s.searchString && {
2074
2067
  rightElement: /* @__PURE__ */ r(
@@ -2079,8 +2072,8 @@ const en = ({
2079
2072
  noBorder: !0,
2080
2073
  size: "small",
2081
2074
  onClick: () => {
2082
- var u;
2083
- p(""), (u = n.current) != null && u.value && (n.current.value = "", n.current.focus());
2075
+ var m;
2076
+ p(""), (m = a.current) != null && m.value && (a.current.value = "", a.current.focus());
2084
2077
  },
2085
2078
  children: "Reset"
2086
2079
  }
@@ -2089,20 +2082,20 @@ const en = ({
2089
2082
  }
2090
2083
  ) }),
2091
2084
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ r(
2092
- Qr,
2085
+ Xr,
2093
2086
  {
2094
- filteredHistory: m,
2095
- setFilteredHistory: l,
2096
- dispatch: a,
2087
+ filteredHistory: d,
2088
+ setFilteredHistory: c,
2089
+ dispatch: n,
2097
2090
  onOpenChange: e
2098
2091
  }
2099
2092
  ) })
2100
2093
  ] }) : null;
2101
- }, tn = ({
2094
+ }, Jr = ({
2102
2095
  open: e,
2103
2096
  onOpenChange: t,
2104
2097
  historyData: o
2105
- }) => /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Ht, children: /* @__PURE__ */ r(en, { onOpenChange: t, historyData: o }) });
2098
+ }) => /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Ht, children: /* @__PURE__ */ r(Zr, { onOpenChange: t, historyData: o }) });
2106
2099
  /*!
2107
2100
  @versini/ui-toggle v1.1.1
2108
2101
  © 2024 gizmette.com
@@ -2116,7 +2109,7 @@ try {
2116
2109
  });
2117
2110
  } catch {
2118
2111
  }
2119
- const on = "av-toggle", rn = (e) => {
2112
+ const Qr = "av-toggle", ea = (e) => {
2120
2113
  let t = "";
2121
2114
  if (typeof e == "number" || typeof e == "string")
2122
2115
  t = "m-" + e;
@@ -2125,9 +2118,9 @@ const on = "av-toggle", rn = (e) => {
2125
2118
  (e == null ? void 0 : e.t) !== void 0 && o.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && o.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && o.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && o.push(`ml-${e.l}`), t = o.join(" ");
2126
2119
  }
2127
2120
  return t;
2128
- }, nn = () => w("peer", "h-6", "w-11", "rounded-full"), an = ({
2121
+ }, ta = () => C("peer", "h-6", "w-11", "rounded-full"), oa = ({
2129
2122
  focusMode: e
2130
- }) => w(
2123
+ }) => C(
2131
2124
  "peer-focus:outline",
2132
2125
  "peer-focus:outline-2",
2133
2126
  "peer-focus:outline-offset-2",
@@ -2137,14 +2130,14 @@ const on = "av-toggle", rn = (e) => {
2137
2130
  "peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
2138
2131
  "peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
2139
2132
  }
2140
- ), sn = () => w(
2133
+ ), ra = () => C(
2141
2134
  "peer-checked:after:translate-x-full",
2142
2135
  // background color when checked
2143
2136
  "peer-checked:bg-violet-500",
2144
2137
  // knob circle and border color when checked
2145
2138
  "peer-checked:after:bg-white",
2146
2139
  "peer-checked:after:border-white"
2147
- ), ln = () => w(
2140
+ ), aa = () => C(
2148
2141
  "after:left-[2px]",
2149
2142
  "after:top-[2px]",
2150
2143
  "after:border",
@@ -2156,99 +2149,99 @@ const on = "av-toggle", rn = (e) => {
2156
2149
  "after:rounded-full",
2157
2150
  "after:transition-all",
2158
2151
  "after:content-['']"
2159
- ), cn = ({
2152
+ ), na = ({
2160
2153
  mode: e,
2161
2154
  noBorder: t
2162
- }) => w({
2155
+ }) => C({
2163
2156
  border: !t,
2164
2157
  "border-border-dark bg-surface-medium": e === "light",
2165
2158
  "border-border-light bg-surface-darker": e === "dark",
2166
2159
  "border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
2167
2160
  "border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
2168
- }), dn = ({
2161
+ }), sa = ({
2169
2162
  mode: e,
2170
2163
  labelHidden: t
2171
- }) => t ? "sr-only" : w("ml-2 text-sm", {
2164
+ }) => t ? "sr-only" : C("ml-2 text-sm", {
2172
2165
  "text-copy-dark": e === "light",
2173
2166
  "text-copy-lighter": e === "dark",
2174
2167
  "text-copy-lighter dark:text-copy-dark": e === "alt-system",
2175
2168
  "text-copy-dark dark:text-copy-lighter": e === "system"
2176
- }), un = ({ spacing: e }) => w(
2177
- on,
2169
+ }), ia = ({ spacing: e }) => C(
2170
+ Qr,
2178
2171
  "relative flex cursor-pointer items-center",
2179
- rn(e)
2180
- ), mn = ({
2172
+ ea(e)
2173
+ ), la = ({
2181
2174
  mode: e,
2182
2175
  focusMode: t,
2183
2176
  labelHidden: o,
2184
- spacing: n,
2185
- noBorder: a
2177
+ spacing: a,
2178
+ noBorder: n
2186
2179
  }) => ({
2187
- toggle: w(
2188
- nn(),
2189
- cn({ mode: e, noBorder: a }),
2190
- an({ focusMode: t }),
2191
- ln(),
2192
- sn()
2180
+ toggle: C(
2181
+ ta(),
2182
+ na({ mode: e, noBorder: n }),
2183
+ oa({ focusMode: t }),
2184
+ aa(),
2185
+ ra()
2193
2186
  ),
2194
- label: dn({ mode: e, labelHidden: o }),
2187
+ label: sa({ mode: e, labelHidden: o }),
2195
2188
  input: "peer sr-only",
2196
- wrapper: un({ spacing: n })
2197
- }), ae = ({
2189
+ wrapper: ia({ spacing: a })
2190
+ }), ne = ({
2198
2191
  checked: e = !1,
2199
2192
  onChange: t,
2200
2193
  label: o,
2201
- labelHidden: n = !1,
2202
- name: a,
2194
+ labelHidden: a = !1,
2195
+ name: n,
2203
2196
  mode: s = "system",
2204
2197
  focusMode: i = "system",
2205
- spacing: c,
2198
+ spacing: l,
2206
2199
  noBorder: h = !1
2207
2200
  }) => {
2208
- const m = mn({
2201
+ const d = la({
2209
2202
  mode: s,
2210
2203
  focusMode: i,
2211
- labelHidden: n,
2212
- spacing: c,
2204
+ labelHidden: a,
2205
+ spacing: l,
2213
2206
  noBorder: h
2214
- }), l = (p) => {
2207
+ }), c = (p) => {
2215
2208
  t == null || t(p.target.checked);
2216
2209
  };
2217
- return /* @__PURE__ */ y("label", { className: m.wrapper, children: [
2210
+ return /* @__PURE__ */ v("label", { className: d.wrapper, children: [
2218
2211
  /* @__PURE__ */ r(
2219
2212
  "input",
2220
2213
  {
2221
- name: a,
2214
+ name: n,
2222
2215
  checked: e,
2223
2216
  type: "checkbox",
2224
- className: m.input,
2225
- onChange: l
2217
+ className: d.input,
2218
+ onChange: c
2226
2219
  }
2227
2220
  ),
2228
- /* @__PURE__ */ r("div", { className: m.toggle }),
2229
- /* @__PURE__ */ r("span", { className: m.label, children: o })
2221
+ /* @__PURE__ */ r("div", { className: d.toggle }),
2222
+ /* @__PURE__ */ r("span", { className: d.label, children: o })
2230
2223
  ] });
2231
- }, hn = ({
2224
+ }, ca = ({
2232
2225
  open: e,
2233
2226
  onOpenChange: t
2234
2227
  }) => {
2235
- const { dispatch: o } = z(ue), { getAccessToken: n, user: a } = X(), [s, i] = S({
2228
+ const { dispatch: o } = B(ue), { getAccessToken: a, user: n } = X(), [s, i] = S({
2236
2229
  loaded: !1,
2237
2230
  instructions: "",
2238
2231
  loadingLocation: !1,
2239
2232
  location: "",
2240
- engine: ne
2241
- }), [c, h] = he({
2233
+ engine: ae
2234
+ }), [l, h] = he({
2242
2235
  key: me + et,
2243
2236
  initialValue: !1
2244
- }), m = async (d) => {
2245
- d.preventDefault();
2237
+ }), d = async (u) => {
2238
+ u.preventDefault();
2246
2239
  try {
2247
- await F({
2248
- accessToken: await n(),
2249
- type: H.SET_USER_PREFERENCES,
2240
+ await V({
2241
+ accessToken: await a(),
2242
+ type: F.SET_USER_PREFERENCES,
2250
2243
  params: {
2251
- user: a == null ? void 0 : a.username,
2244
+ user: n == null ? void 0 : n.username,
2252
2245
  instructions: s.instructions,
2253
2246
  location: s.location,
2254
2247
  engine: s.engine
@@ -2261,93 +2254,93 @@ const on = "av-toggle", rn = (e) => {
2261
2254
  });
2262
2255
  } catch {
2263
2256
  }
2264
- }, l = async () => {
2265
- i((d) => ({
2266
- ...d,
2257
+ }, c = async () => {
2258
+ i((u) => ({
2259
+ ...u,
2267
2260
  location: "...",
2268
2261
  loadingLocation: !0
2269
2262
  }));
2270
2263
  try {
2271
- const d = Date.now(), u = await Ut(), b = await F({
2272
- accessToken: await n(),
2273
- type: H.GET_LOCATION,
2264
+ const u = Date.now(), m = await Ut(), f = await V({
2265
+ accessToken: await a(),
2266
+ type: F.GET_LOCATION,
2274
2267
  params: {
2275
- latitude: u.latitude,
2276
- longitude: u.longitude
2268
+ latitude: m.latitude,
2269
+ longitude: m.longitude
2277
2270
  }
2278
- }), g = Date.now() - d;
2279
- if (g < 2e3 && await new Promise((k) => setTimeout(k, 2e3 - g)), b.status === 200) {
2280
- const { city: k, state: T, country: I, displayName: M } = b.data, _ = k && T && I ? `${k}, ${T}, ${I}` : M;
2281
- i((D) => ({
2282
- ...D,
2271
+ }), k = Date.now() - u;
2272
+ if (k < 2e3 && await new Promise((T) => setTimeout(T, 2e3 - k)), f.status === 200) {
2273
+ const { city: T, state: N, country: I, displayName: M } = f.data, _ = T && N && I ? `${T}, ${N}, ${I}` : M;
2274
+ i((O) => ({
2275
+ ...O,
2283
2276
  loaded: !0,
2284
2277
  location: _,
2285
2278
  loadingLocation: !1
2286
2279
  }));
2287
2280
  } else
2288
- i((k) => ({
2289
- ...k,
2281
+ i((T) => ({
2282
+ ...T,
2290
2283
  loaded: !0,
2291
2284
  location: "",
2292
2285
  loadingLocation: !1
2293
2286
  }));
2294
2287
  } catch {
2295
2288
  }
2296
- }, p = (d) => {
2297
- i((u) => ({
2298
- ...u,
2299
- engine: d ? Te : fe
2289
+ }, p = (u) => {
2290
+ i((m) => ({
2291
+ ...m,
2292
+ engine: u ? we : fe
2300
2293
  }));
2301
- }, v = (d) => {
2302
- i((u) => ({
2303
- ...u,
2304
- engine: d ? fe : Te
2294
+ }, y = (u) => {
2295
+ i((m) => ({
2296
+ ...m,
2297
+ engine: u ? fe : we
2305
2298
  }));
2306
2299
  };
2307
- return U(() => {
2308
- if (!e || !a) {
2300
+ return q(() => {
2301
+ if (!e || !n) {
2309
2302
  i({
2310
2303
  loaded: !1,
2311
2304
  loadingLocation: !1,
2312
2305
  instructions: "",
2313
2306
  location: "",
2314
- engine: ne
2307
+ engine: ae
2315
2308
  });
2316
2309
  return;
2317
2310
  }
2318
2311
  (async () => {
2319
2312
  try {
2320
- const d = await F({
2321
- accessToken: await n(),
2322
- type: H.GET_USER_PREFERENCES,
2313
+ const u = await V({
2314
+ accessToken: await a(),
2315
+ type: F.GET_USER_PREFERENCES,
2323
2316
  params: {
2324
- user: a.username
2317
+ user: n.username
2325
2318
  }
2326
2319
  });
2327
- d.status === 200 && i((u) => ({
2328
- ...u,
2320
+ u.status === 200 && i((m) => ({
2321
+ ...m,
2329
2322
  loaded: !0,
2330
- instructions: d.data.instructions || "",
2331
- location: d.data.location || "",
2332
- engine: d.data.engine || ne
2323
+ instructions: u.data.instructions || "",
2324
+ location: u.data.location || "",
2325
+ engine: u.data.engine || ae
2333
2326
  }));
2334
2327
  } catch {
2335
2328
  }
2336
2329
  })();
2337
- }, [a, e]), /* @__PURE__ */ r(A, { children: s.loaded && /* @__PURE__ */ r(
2330
+ }, [n, e]), /* @__PURE__ */ r(A, { children: s.loaded && /* @__PURE__ */ r(
2338
2331
  Z,
2339
2332
  {
2340
2333
  open: e,
2341
2334
  onOpenChange: t,
2342
2335
  title: "Engine Fine Tuning",
2343
- footer: /* @__PURE__ */ y(
2336
+ footer: /* @__PURE__ */ v(
2344
2337
  ie,
2345
2338
  {
2346
2339
  columnGap: 2,
2347
2340
  alignHorizontal: "flex-end",
2348
2341
  className: "pb-8 sm:pb-0",
2349
2342
  children: [
2350
- /* @__PURE__ */ r($, { children: /* @__PURE__ */ r(
2343
+ /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(
2351
2344
  G,
2352
2345
  {
2353
2346
  mode: "dark",
@@ -2359,14 +2352,14 @@ const on = "av-toggle", rn = (e) => {
2359
2352
  children: "Cancel"
2360
2353
  }
2361
2354
  ) }),
2362
- /* @__PURE__ */ r($, { children: /* @__PURE__ */ r(
2355
+ /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(
2363
2356
  G,
2364
2357
  {
2365
2358
  mode: "dark",
2366
2359
  variant: "danger",
2367
2360
  focusMode: "light",
2368
- onClick: async (d) => {
2369
- t(!1), await m(d);
2361
+ onClick: async (u) => {
2362
+ t(!1), await d(u);
2370
2363
  },
2371
2364
  children: "Save"
2372
2365
  }
@@ -2374,59 +2367,59 @@ const on = "av-toggle", rn = (e) => {
2374
2367
  ]
2375
2368
  }
2376
2369
  ),
2377
- children: /* @__PURE__ */ y(A, { children: [
2378
- /* @__PURE__ */ y(
2379
- B,
2370
+ children: /* @__PURE__ */ v(A, { children: [
2371
+ /* @__PURE__ */ v(
2372
+ $,
2380
2373
  {
2381
2374
  header: "AI Engine",
2382
2375
  className: "prose-dark dark:prose-lighter",
2383
2376
  children: [
2384
2377
  /* @__PURE__ */ r("p", { children: "Select the AI engine that will be used to generate responses." }),
2385
2378
  /* @__PURE__ */ r(
2386
- ae,
2379
+ ne,
2387
2380
  {
2388
2381
  noBorder: !0,
2389
2382
  label: "OpenAI",
2390
2383
  name: "OpenAI",
2391
2384
  onChange: p,
2392
- checked: s.engine === Te
2385
+ checked: s.engine === we
2393
2386
  }
2394
2387
  ),
2395
2388
  /* @__PURE__ */ r(
2396
- ae,
2389
+ ne,
2397
2390
  {
2398
2391
  spacing: { t: 2 },
2399
2392
  noBorder: !0,
2400
2393
  label: "Anthropic",
2401
2394
  name: "Anthropic",
2402
- onChange: v,
2395
+ onChange: y,
2403
2396
  checked: s.engine === fe
2404
2397
  }
2405
2398
  ),
2406
2399
  /* @__PURE__ */ r("p", { className: "text-xs", children: "NOTE: Anthropic is currently in beta and may not be as accurate as OpenAI." }),
2407
2400
  /* @__PURE__ */ r(
2408
- ae,
2401
+ ne,
2409
2402
  {
2410
2403
  spacing: { t: 2 },
2411
2404
  noBorder: !0,
2412
2405
  label: "Show Quick Engine Toggle",
2413
2406
  name: "show-toggle-engine-menu",
2414
2407
  onChange: h,
2415
- checked: c
2408
+ checked: l
2416
2409
  }
2417
2410
  ),
2418
2411
  /* @__PURE__ */ r("p", { className: "text-xs", children: "This option introduces a new menu on the left side of the screen, enabling you to quickly switch between engines." })
2419
2412
  ]
2420
2413
  }
2421
2414
  ),
2422
- /* @__PURE__ */ y(
2423
- B,
2415
+ /* @__PURE__ */ v(
2416
+ $,
2424
2417
  {
2425
2418
  spacing: { t: 4 },
2426
2419
  header: "Custom Instructions",
2427
2420
  className: "prose-dark dark:prose-lighter",
2428
2421
  children: [
2429
- /* @__PURE__ */ y("p", { children: [
2422
+ /* @__PURE__ */ v("p", { children: [
2430
2423
  "What would you like ",
2431
2424
  /* @__PURE__ */ r("em", { children: Gt }),
2432
2425
  " to know about you to provide better responses?"
@@ -2441,11 +2434,11 @@ const on = "av-toggle", rn = (e) => {
2441
2434
  name: "customInstructions",
2442
2435
  label: "Custom Instructions",
2443
2436
  value: s.instructions,
2444
- onChange: (d) => {
2445
- i((u) => ({
2446
- ...u,
2437
+ onChange: (u) => {
2438
+ i((m) => ({
2439
+ ...m,
2447
2440
  loaded: !0,
2448
- instructions: d.target.value
2441
+ instructions: u.target.value
2449
2442
  }));
2450
2443
  },
2451
2444
  helperText: "Press ENTER to add a new line."
@@ -2454,8 +2447,8 @@ const on = "av-toggle", rn = (e) => {
2454
2447
  ]
2455
2448
  }
2456
2449
  ),
2457
- /* @__PURE__ */ y(
2458
- B,
2450
+ /* @__PURE__ */ v(
2451
+ $,
2459
2452
  {
2460
2453
  header: "Location",
2461
2454
  className: "prose-dark dark:prose-lighter",
@@ -2469,11 +2462,11 @@ const on = "av-toggle", rn = (e) => {
2469
2462
  name: "location",
2470
2463
  label: "Location",
2471
2464
  value: s.location,
2472
- onChange: (d) => {
2473
- i((u) => ({
2474
- ...u,
2465
+ onChange: (u) => {
2466
+ i((m) => ({
2467
+ ...m,
2475
2468
  loaded: !0,
2476
- location: d.target.value
2469
+ location: u.target.value
2477
2470
  }));
2478
2471
  },
2479
2472
  helperText: "Enter your location or press auto-detect."
@@ -2486,7 +2479,7 @@ const on = "av-toggle", rn = (e) => {
2486
2479
  size: "small",
2487
2480
  noBorder: !0,
2488
2481
  disabled: s.loadingLocation,
2489
- onClick: l,
2482
+ onClick: c,
2490
2483
  children: s.loadingLocation ? "Detecting..." : "Auto-detect"
2491
2484
  }
2492
2485
  )
@@ -2496,44 +2489,44 @@ const on = "av-toggle", rn = (e) => {
2496
2489
  ] })
2497
2490
  }
2498
2491
  ) });
2499
- }, gn = ({
2492
+ }, da = ({
2500
2493
  open: e,
2501
2494
  onOpenChange: t
2502
2495
  }) => {
2503
- const { state: o, dispatch: n } = z(jt), { getAccessToken: a, user: s } = X(), [i, c] = S({
2496
+ const { state: o, dispatch: a } = B(jt), { getAccessToken: n, user: s } = X(), [i, l] = S({
2504
2497
  tags: [...o.tags]
2505
2498
  }), h = ({
2506
- slot: l,
2499
+ slot: c,
2507
2500
  checked: p,
2508
- label: v,
2509
- content: d
2501
+ label: y,
2502
+ content: u
2510
2503
  }) => {
2511
- c((u) => {
2512
- const b = u.tags, C = {
2513
- slot: l,
2514
- label: v,
2515
- content: d,
2504
+ l((m) => {
2505
+ const f = m.tags, g = {
2506
+ slot: c,
2507
+ label: y,
2508
+ content: u,
2516
2509
  enabled: p
2517
- }, g = b.findIndex((k) => k.slot === l);
2518
- return g === -1 ? {
2519
- ...u,
2520
- tags: [...b, { ...C, slot: l }]
2521
- } : (b[g] = C, {
2522
- ...u,
2523
- tags: [...b]
2510
+ }, k = f.findIndex((T) => T.slot === c);
2511
+ return k === -1 ? {
2512
+ ...m,
2513
+ tags: [...f, { ...g, slot: c }]
2514
+ } : (f[k] = g, {
2515
+ ...m,
2516
+ tags: [...f]
2524
2517
  });
2525
2518
  });
2526
- }, m = async (l) => {
2527
- l.preventDefault();
2519
+ }, d = async (c) => {
2520
+ c.preventDefault();
2528
2521
  try {
2529
- await F({
2530
- accessToken: await a(),
2531
- type: H.SET_USER_PREFERENCES,
2522
+ await V({
2523
+ accessToken: await n(),
2524
+ type: F.SET_USER_PREFERENCES,
2532
2525
  params: {
2533
2526
  user: s == null ? void 0 : s.username,
2534
2527
  tags: i.tags
2535
2528
  }
2536
- }), n({
2529
+ }), a({
2537
2530
  type: Wt,
2538
2531
  payload: {
2539
2532
  tags: i.tags
@@ -2542,20 +2535,20 @@ const on = "av-toggle", rn = (e) => {
2542
2535
  } catch {
2543
2536
  }
2544
2537
  };
2545
- return /* @__PURE__ */ y(
2538
+ return /* @__PURE__ */ v(
2546
2539
  Z,
2547
2540
  {
2548
2541
  open: e,
2549
2542
  onOpenChange: t,
2550
2543
  title: "Tags",
2551
- footer: /* @__PURE__ */ y(
2544
+ footer: /* @__PURE__ */ v(
2552
2545
  ie,
2553
2546
  {
2554
2547
  columnGap: 2,
2555
2548
  alignHorizontal: "flex-end",
2556
2549
  className: "pb-8 sm:pb-0",
2557
2550
  children: [
2558
- /* @__PURE__ */ r($, { children: /* @__PURE__ */ r(
2551
+ /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(
2559
2552
  G,
2560
2553
  {
2561
2554
  mode: "dark",
@@ -2567,14 +2560,14 @@ const on = "av-toggle", rn = (e) => {
2567
2560
  children: "Cancel"
2568
2561
  }
2569
2562
  ) }),
2570
- /* @__PURE__ */ r($, { children: /* @__PURE__ */ r(
2563
+ /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(
2571
2564
  G,
2572
2565
  {
2573
2566
  mode: "dark",
2574
2567
  variant: "danger",
2575
2568
  focusMode: "light",
2576
- onClick: async (l) => {
2577
- t(!1), await m(l);
2569
+ onClick: async (c) => {
2570
+ t(!1), await d(c);
2578
2571
  },
2579
2572
  children: "Save"
2580
2573
  }
@@ -2584,41 +2577,41 @@ const on = "av-toggle", rn = (e) => {
2584
2577
  ),
2585
2578
  children: [
2586
2579
  /* @__PURE__ */ r("p", { children: Kt }),
2587
- i.tags && i.tags.map((l) => /* @__PURE__ */ y(
2588
- B,
2580
+ i.tags && i.tags.map((c) => /* @__PURE__ */ v(
2581
+ $,
2589
2582
  {
2590
- header: `Tag ${l.slot + 1}`,
2583
+ header: `Tag ${c.slot + 1}`,
2591
2584
  className: "prose-dark dark:prose-lighter",
2592
2585
  spacing: { b: 2 },
2593
2586
  children: [
2594
- /* @__PURE__ */ y(ie, { spacing: { t: 8, b: 6 }, columnGap: 2, rowGap: 6, children: [
2595
- /* @__PURE__ */ r($, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ r(
2587
+ /* @__PURE__ */ v(ie, { spacing: { t: 8, b: 6 }, columnGap: 2, rowGap: 6, children: [
2588
+ /* @__PURE__ */ r(L, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ r(
2596
2589
  xe,
2597
2590
  {
2598
2591
  label: "Label",
2599
- name: `tag${l.slot}-label`,
2600
- value: l.label,
2592
+ name: `tag${c.slot}-label`,
2593
+ value: c.label,
2601
2594
  onChange: (p) => {
2602
2595
  h({
2603
- slot: l.slot,
2604
- checked: l.enabled,
2596
+ slot: c.slot,
2597
+ checked: c.enabled,
2605
2598
  label: p.target.value,
2606
- content: l.content
2599
+ content: c.content
2607
2600
  });
2608
2601
  }
2609
2602
  }
2610
2603
  ) }),
2611
- /* @__PURE__ */ r($, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ r(
2604
+ /* @__PURE__ */ r(L, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ r(
2612
2605
  xe,
2613
2606
  {
2614
2607
  label: "Content",
2615
- name: `tag${l.slot}-content`,
2616
- value: l.content,
2608
+ name: `tag${c.slot}-content`,
2609
+ value: c.content,
2617
2610
  onChange: (p) => {
2618
2611
  h({
2619
- slot: l.slot,
2620
- checked: l.enabled,
2621
- label: l.label,
2612
+ slot: c.slot,
2613
+ checked: c.enabled,
2614
+ label: c.label,
2622
2615
  content: p.target.value
2623
2616
  });
2624
2617
  }
@@ -2626,87 +2619,87 @@ const on = "av-toggle", rn = (e) => {
2626
2619
  ) })
2627
2620
  ] }),
2628
2621
  /* @__PURE__ */ r(
2629
- ae,
2622
+ ne,
2630
2623
  {
2631
2624
  spacing: { t: 2 },
2632
2625
  noBorder: !0,
2633
2626
  label: "Enabled",
2634
- name: l.slot.toString(),
2627
+ name: c.slot.toString(),
2635
2628
  onChange: (p) => {
2636
2629
  h({
2637
- slot: l.slot,
2630
+ slot: c.slot,
2638
2631
  checked: p,
2639
- label: l.label,
2640
- content: l.content
2632
+ label: c.label,
2633
+ content: c.content
2641
2634
  });
2642
2635
  },
2643
- checked: l.enabled
2636
+ checked: c.enabled
2644
2637
  }
2645
2638
  )
2646
2639
  ]
2647
2640
  },
2648
- `tag-slot-${l.slot}`
2641
+ `tag-slot-${c.slot}`
2649
2642
  ))
2650
2643
  ]
2651
2644
  }
2652
2645
  );
2653
- }, pn = () => {
2654
- const { isAuthenticated: e, user: t, registeringForPasskey: o, authenticationType: n } = X(), [a, s] = he({
2646
+ }, ua = () => {
2647
+ const { isAuthenticated: e, user: t, registeringForPasskey: o, authenticationType: a } = X(), [n, s] = he({
2655
2648
  key: me + Yt,
2656
2649
  initialValue: !1
2657
- }), [i, c] = S(!1), [h, m] = S(!1), l = ce(), p = (t == null ? void 0 : t.username) || "", v = (b) => {
2658
- s(b);
2659
- }, d = () => {
2660
- c(!i);
2650
+ }), [i, l] = S(!1), [h, d] = S(!1), c = ce(), p = (t == null ? void 0 : t.username) || "", y = (f) => {
2651
+ s(f);
2661
2652
  }, u = () => {
2662
- m(!h);
2653
+ l(!i);
2654
+ }, m = () => {
2655
+ d(!h);
2663
2656
  };
2664
- return e && p ? /* @__PURE__ */ y(A, { children: [
2657
+ return e && p ? /* @__PURE__ */ v(A, { children: [
2665
2658
  i && /* @__PURE__ */ r(
2666
- hn,
2659
+ ca,
2667
2660
  {
2668
2661
  open: i,
2669
- onOpenChange: c
2662
+ onOpenChange: l
2670
2663
  }
2671
2664
  ),
2672
- h && /* @__PURE__ */ r(gn, { open: h, onOpenChange: m }),
2673
- /* @__PURE__ */ y(
2674
- B,
2665
+ h && /* @__PURE__ */ r(da, { open: h, onOpenChange: d }),
2666
+ /* @__PURE__ */ v(
2667
+ $,
2675
2668
  {
2676
- header: N.PREFERENCES.TITLE,
2669
+ header: w.PREFERENCES.TITLE,
2677
2670
  className: "prose-dark dark:prose-lighter",
2678
2671
  children: [
2679
- se(l, {
2680
- [N.PREFERENCES.NAME]: p,
2681
- [N.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
2682
- [N.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ r(
2683
- ae,
2672
+ se(c, {
2673
+ [w.PREFERENCES.NAME]: p,
2674
+ [w.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
2675
+ [w.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ r(
2676
+ ne,
2684
2677
  {
2685
2678
  noBorder: !0,
2686
2679
  labelHidden: !0,
2687
- label: N.PREFERENCES.ENGINE_DETAILS,
2688
- name: N.PREFERENCES.ENGINE_DETAILS,
2689
- onChange: v,
2690
- checked: a
2680
+ label: w.PREFERENCES.ENGINE_DETAILS,
2681
+ name: w.PREFERENCES.ENGINE_DETAILS,
2682
+ onChange: y,
2683
+ checked: n
2691
2684
  }
2692
2685
  )
2693
2686
  }),
2694
2687
  /* @__PURE__ */ r(
2695
- Y,
2688
+ W,
2696
2689
  {
2697
2690
  spacing: { t: 2 },
2698
2691
  size: "small",
2699
- onClick: d,
2692
+ onClick: u,
2700
2693
  labelLeft: "Engine Fine Tuning",
2701
2694
  children: /* @__PURE__ */ r(Fe, { className: "size-3", monotone: !0 })
2702
2695
  }
2703
2696
  ),
2704
2697
  /* @__PURE__ */ r(
2705
- Y,
2698
+ W,
2706
2699
  {
2707
2700
  spacing: { t: 2, l: 2 },
2708
2701
  size: "small",
2709
- onClick: u,
2702
+ onClick: m,
2710
2703
  labelLeft: "Tags",
2711
2704
  children: /* @__PURE__ */ r(Fe, { className: "size-3", monotone: !0 })
2712
2705
  }
@@ -2714,24 +2707,24 @@ const on = "av-toggle", rn = (e) => {
2714
2707
  ]
2715
2708
  }
2716
2709
  ),
2717
- n !== qt.PASSKEY && /* @__PURE__ */ y(
2718
- B,
2710
+ a !== qt.PASSKEY && /* @__PURE__ */ v(
2711
+ $,
2719
2712
  {
2720
2713
  spacing: { t: 4 },
2721
2714
  className: "prose-dark dark:prose-lighter",
2722
- header: /* @__PURE__ */ r("h2", { className: "m-0", children: /* @__PURE__ */ y(ie, { columnGap: 3, alignVertical: "center", children: [
2723
- /* @__PURE__ */ r($, { children: /* @__PURE__ */ r(Oe, { className: "size-8" }) }),
2724
- /* @__PURE__ */ r($, { children: /* @__PURE__ */ r("div", { children: N.PREFERENCES.PASSKEY_TITLE }) })
2715
+ header: /* @__PURE__ */ r("h2", { className: "m-0", children: /* @__PURE__ */ v(ie, { columnGap: 3, alignVertical: "center", children: [
2716
+ /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r(Oe, { className: "size-8" }) }),
2717
+ /* @__PURE__ */ r(L, { children: /* @__PURE__ */ r("div", { children: w.PREFERENCES.PASSKEY_TITLE }) })
2725
2718
  ] }) }),
2726
2719
  children: [
2727
- /* @__PURE__ */ r("p", { children: N.PREFERENCES.PASSKEY_INSTRUCTIONS }),
2720
+ /* @__PURE__ */ r("p", { children: w.PREFERENCES.PASSKEY_INSTRUCTIONS }),
2728
2721
  /* @__PURE__ */ r(
2729
- Y,
2722
+ W,
2730
2723
  {
2731
2724
  size: "small",
2732
2725
  spacing: { t: 2 },
2733
2726
  onClick: o,
2734
- labelLeft: N.PREFERENCES.PASSKEY_BUTTON,
2727
+ labelLeft: w.PREFERENCES.PASSKEY_BUTTON,
2735
2728
  children: /* @__PURE__ */ r(Oe, { className: "size-5", monotone: !0 })
2736
2729
  }
2737
2730
  )
@@ -2739,48 +2732,48 @@ const on = "av-toggle", rn = (e) => {
2739
2732
  }
2740
2733
  )
2741
2734
  ] }) : null;
2742
- }, fn = ({
2735
+ }, ma = ({
2743
2736
  open: e,
2744
2737
  onOpenChange: t
2745
- }) => /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Xt, children: /* @__PURE__ */ r(pn, {}) }), Nn = () => {
2746
- const { state: e, dispatch: t, serverStats: o } = z(ue), [n, a] = S((e == null ? void 0 : e.engine) || ne), [s, i] = S(!1), [c, h] = S(!1), [m, l] = S(!1), [p, v] = S(!1), [d, u] = S([]), [b, C] = S(!1), [g, k] = S({
2738
+ }) => /* @__PURE__ */ r(Z, { open: e, onOpenChange: t, title: Xt, children: /* @__PURE__ */ r(ua, {}) }), ka = () => {
2739
+ const { state: e, dispatch: t, serverStats: o } = B(ue), [a, n] = S((e == null ? void 0 : e.engine) || ae), [s, i] = S(!1), [l, h] = S(!1), [d, c] = S(!1), [p, y] = S(!1), [u, m] = S([]), [f, g] = S(!1), [k, T] = S({
2747
2740
  done: !1,
2748
2741
  progress: !1,
2749
2742
  timestamp: Date.now()
2750
- }), [T] = he({
2743
+ }), [N] = he({
2751
2744
  key: me + et,
2752
2745
  initialValue: !1
2753
- }), { logout: I, getAccessToken: M, user: _ } = X(), D = () => {
2746
+ }), { logout: I, getAccessToken: M, user: _ } = X(), O = () => {
2754
2747
  i(!s);
2755
2748
  }, E = () => {
2756
- h(!c);
2749
+ h(!l);
2757
2750
  }, ee = () => {
2758
- l(!m);
2751
+ c(!d);
2759
2752
  }, J = () => {
2760
- v(!p);
2761
- }, j = async (L) => {
2762
- const K = Date.now();
2763
- if (L && !(!_ || !e || g.progress || g.done === !0 && K - g.timestamp < 5e3)) {
2764
- k({
2753
+ y(!p);
2754
+ }, U = async (P) => {
2755
+ const j = Date.now();
2756
+ if (P && !(!_ || !e || k.progress || k.done === !0 && j - k.timestamp < 5e3)) {
2757
+ T({
2765
2758
  done: !0,
2766
2759
  progress: !0,
2767
- timestamp: K
2760
+ timestamp: j
2768
2761
  });
2769
2762
  try {
2770
- const R = await F({
2763
+ const R = await V({
2771
2764
  accessToken: await M(),
2772
- type: H.GET_CHATS,
2765
+ type: F.GET_CHATS,
2773
2766
  params: {
2774
2767
  userId: _.username
2775
2768
  }
2776
2769
  });
2777
- R.status === 200 && (u(R.data), k({
2770
+ R.status === 200 && (m(R.data), T({
2778
2771
  done: !0,
2779
2772
  progress: !1,
2780
2773
  timestamp: Date.now()
2781
2774
  }));
2782
2775
  } catch {
2783
- k({
2776
+ T({
2784
2777
  done: !0,
2785
2778
  progress: !1,
2786
2779
  timestamp: Date.now()
@@ -2788,16 +2781,16 @@ const on = "av-toggle", rn = (e) => {
2788
2781
  }
2789
2782
  }
2790
2783
  }, te = () => {
2791
- C(!b);
2784
+ g(!f);
2792
2785
  };
2793
- return U(() => {
2794
- e && e.engine && e.engine !== n && a(e.engine);
2795
- }, [e, n]), /* @__PURE__ */ y(A, { children: [
2786
+ return q(() => {
2787
+ e && e.engine && e.engine !== a && n(e.engine);
2788
+ }, [e, a]), /* @__PURE__ */ v(A, { children: [
2796
2789
  /* @__PURE__ */ r(
2797
2790
  It,
2798
2791
  {
2799
- showConfirmation: b,
2800
- setShowConfirmation: C,
2792
+ showConfirmation: f,
2793
+ setShowConfirmation: g,
2801
2794
  action: I,
2802
2795
  customStrings: {
2803
2796
  confirmAction: De,
@@ -2807,46 +2800,46 @@ const on = "av-toggle", rn = (e) => {
2807
2800
  children: /* @__PURE__ */ r("p", { children: "Are you sure you want to log out?" })
2808
2801
  }
2809
2802
  ),
2810
- /* @__PURE__ */ r(fn, { open: s, onOpenChange: i }),
2811
- /* @__PURE__ */ r(Yr, { open: c, onOpenChange: h }),
2803
+ /* @__PURE__ */ r(ma, { open: s, onOpenChange: i }),
2804
+ /* @__PURE__ */ r(Yr, { open: l, onOpenChange: h }),
2812
2805
  /* @__PURE__ */ r(
2813
- tn,
2806
+ Jr,
2814
2807
  {
2815
- open: m,
2816
- onOpenChange: l,
2817
- historyData: d
2808
+ open: d,
2809
+ onOpenChange: c,
2810
+ historyData: u
2818
2811
  }
2819
2812
  ),
2820
- /* @__PURE__ */ r(Ur, { open: p, onOpenChange: v }),
2821
- /* @__PURE__ */ y("div", { className: "relative", children: [
2822
- T && o && /* @__PURE__ */ r("div", { className: "absolute bottom-[-28px] left-[-7px]", children: /* @__PURE__ */ r(
2813
+ /* @__PURE__ */ r(Ur, { open: p, onOpenChange: y }),
2814
+ /* @__PURE__ */ v("div", { className: "relative", children: [
2815
+ N && o && /* @__PURE__ */ r("div", { className: "absolute bottom-[-28px] left-[-7px]", children: /* @__PURE__ */ r(
2823
2816
  Se,
2824
2817
  {
2825
2818
  mode: "dark",
2826
2819
  focusMode: "light",
2827
- trigger: /* @__PURE__ */ r(Y, { children: e && e.engine === fe ? /* @__PURE__ */ r(st, {}) : /* @__PURE__ */ r(it, {}) }),
2820
+ trigger: /* @__PURE__ */ r(W, { children: e && e.engine === fe ? /* @__PURE__ */ r(st, {}) : /* @__PURE__ */ r(it, {}) }),
2828
2821
  defaultPlacement: "bottom-start",
2829
- children: /* @__PURE__ */ r(W, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ r(
2822
+ children: /* @__PURE__ */ r(K, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ r(
2830
2823
  Cr,
2831
2824
  {
2832
2825
  size: "small",
2833
2826
  mode: "dark",
2834
2827
  focusMode: "light",
2835
- value: n,
2836
- onValueChange: async (L) => {
2837
- if (L)
2828
+ value: a,
2829
+ onValueChange: async (P) => {
2830
+ if (P)
2838
2831
  try {
2839
- await F({
2832
+ await V({
2840
2833
  accessToken: await M(),
2841
- type: H.SET_USER_PREFERENCES,
2834
+ type: F.SET_USER_PREFERENCES,
2842
2835
  params: {
2843
2836
  user: _ == null ? void 0 : _.username,
2844
- engine: L
2837
+ engine: P
2845
2838
  }
2846
2839
  }), t({
2847
2840
  type: tt,
2848
2841
  payload: {
2849
- engine: L
2842
+ engine: P
2850
2843
  }
2851
2844
  }), t({
2852
2845
  type: Qe
@@ -2854,30 +2847,30 @@ const on = "av-toggle", rn = (e) => {
2854
2847
  } catch {
2855
2848
  }
2856
2849
  },
2857
- children: o && o.engines.map((L) => /* @__PURE__ */ r(wr, { value: L }, L))
2850
+ children: o && o.engines.map((P) => /* @__PURE__ */ r(Tr, { value: P }, P))
2858
2851
  }
2859
2852
  ) })
2860
2853
  }
2861
2854
  ) }),
2862
- /* @__PURE__ */ r("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ y(
2855
+ /* @__PURE__ */ r("div", { className: "absolute bottom-[-28px] right-[-7px]", children: /* @__PURE__ */ v(
2863
2856
  Se,
2864
2857
  {
2865
2858
  mode: "dark",
2866
2859
  focusMode: "light",
2867
- trigger: /* @__PURE__ */ r(Y, { children: /* @__PURE__ */ r(Ao, {}) }),
2860
+ trigger: /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(Ao, {}) }),
2868
2861
  defaultPlacement: "bottom-end",
2869
- onOpenChange: j,
2862
+ onOpenChange: U,
2870
2863
  children: [
2871
2864
  /* @__PURE__ */ r(
2872
- W,
2865
+ K,
2873
2866
  {
2874
2867
  label: "Profile",
2875
- onClick: D,
2868
+ onClick: O,
2876
2869
  icon: /* @__PURE__ */ r(_o, {})
2877
2870
  }
2878
2871
  ),
2879
2872
  /* @__PURE__ */ r(
2880
- W,
2873
+ K,
2881
2874
  {
2882
2875
  label: Ze,
2883
2876
  onClick: E,
@@ -2885,7 +2878,7 @@ const on = "av-toggle", rn = (e) => {
2885
2878
  }
2886
2879
  ),
2887
2880
  /* @__PURE__ */ r(
2888
- W,
2881
+ K,
2889
2882
  {
2890
2883
  label: "History",
2891
2884
  onClick: ee,
@@ -2893,17 +2886,17 @@ const on = "av-toggle", rn = (e) => {
2893
2886
  }
2894
2887
  ),
2895
2888
  /* @__PURE__ */ r(
2896
- W,
2889
+ K,
2897
2890
  {
2898
2891
  label: "About",
2899
2892
  onClick: J,
2900
2893
  icon: /* @__PURE__ */ r(So, {})
2901
2894
  }
2902
2895
  ),
2903
- e && e.id && !e.isComponent && /* @__PURE__ */ y(A, { children: [
2896
+ e && e.id && !e.isComponent && /* @__PURE__ */ v(A, { children: [
2904
2897
  /* @__PURE__ */ r(Mo, {}),
2905
2898
  /* @__PURE__ */ r(
2906
- W,
2899
+ K,
2907
2900
  {
2908
2901
  label: "Log out",
2909
2902
  onClick: te,
@@ -2918,5 +2911,5 @@ const on = "av-toggle", rn = (e) => {
2918
2911
  ] });
2919
2912
  };
2920
2913
  export {
2921
- Nn as default
2914
+ ka as default
2922
2915
  };