@versini/sassysaint 5.5.8 → 5.5.10
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.
- package/dist/chunks/App.niFY4VeQ.js +3438 -0
- package/dist/chunks/{LazyHeader.B5IF4pQz.js → HeaderToolbar.C1WmgiON.js} +1328 -1325
- package/dist/chunks/{LazyMarkdownWithExtra.B2nAtq4p.js → MarkdownWithExtra.Cw9h4M2_.js} +10 -10
- package/dist/chunks/{LazyMessageAssistant.DCB_SFcK.js → MessageAssistant.BhHWTODt.js} +13 -14
- package/dist/chunks/{index.CKvmD6Gi.js → index.ooLgUBkm.js} +699 -650
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +4 -4
- package/dist/chunks/LazyApp.DeVrt9BH.js +0 -1680
- package/dist/chunks/index.DMnfO73f.js +0 -1623
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { g as z, R as
|
|
3
|
-
import { AppContext as
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useFloatingTree as
|
|
8
|
-
const
|
|
1
|
+
import { jsx as o, jsxs as k, Fragment as M } from "react/jsx-runtime";
|
|
2
|
+
import { g as z, R as L, CARDS as E, renderDataAsList as ce, pluralize as pe, ABOUT_TITLE as $t, L as H, j as A, C as F, un as X, LOCAL_STORAGE_PREFIX as ue, LOCAL_STORAGE_SORT as Dt, P as Q, ACTION_RESET as Ze, ACTION_RESTORE as Vt, ACTION_SORT as Ve, LOCAL_STORAGE_SEARCH as Ft, ye as Ee, ACTION_SEARCH as Ht, debounce as Gt, HISTORY_TITLE as Ut, M as jt, z as Fe, DEFAULT_AI_ENGINE as le, numberFormatter as Kt, durationFormatter as Qe, NA as Wt, ROLE_ASSISTANT as Yt, extractAverage as qt, GPT4_MAX_TOKENS as Xt, PROFILE_TITLE as Zt, TAGS_DESCRIPTION as Qt, ACTION_SET_TAGS as Jt, LOCAL_STORAGE_ENGINE_TOGGLE as Je, LOCAL_STORAGE_CHAT_DETAILS as er, SETTINGS_TITLE as tr, ENGINE_OPENAI as ne, ENGINE_ANTHROPIC as Z, APP_NAME as rr, ACTION_ENGINE as et, getCurrentGeoLocation as or, LOG_OUT as He } from "./index.ooLgUBkm.js";
|
|
3
|
+
import { AppContext as ge, HistoryContext as tt, E as me, ge as ar, he as nr, ue as Ce, ke as sr, de as V, me as ir, be as cr, serviceCall as $, SERVICE_TYPES as D, _ as Y, TagsContext as lr, Fe as Ge, NewChatButton as dr } from "./App.niFY4VeQ.js";
|
|
4
|
+
import * as g from "react";
|
|
5
|
+
import I, { useId as ze, forwardRef as rt, useState as S, useRef as J, useContext as P, useEffect as G } from "react";
|
|
6
|
+
import w from "clsx";
|
|
7
|
+
import { useFloatingTree as ot, useFloatingNodeId as ur, useListItem as at, useFloating as nt, offset as mr, flip as hr, shift as gr, autoUpdate as fr, useClick as st, useRole as it, useDismiss as ct, useListNavigation as pr, useTypeahead as br, useInteractions as lt, useMergeRefs as Le, FloatingNode as vr, FloatingList as yr, FloatingPortal as dt, FloatingFocusManager as ut, FloatingTree as kr, FloatingOverlay as wr } from "@floating-ui/react";
|
|
8
|
+
const mt = ({
|
|
9
9
|
className: e,
|
|
10
10
|
viewBox: t,
|
|
11
11
|
title: r,
|
|
@@ -22,13 +22,13 @@ const ht = ({
|
|
|
22
22
|
...n,
|
|
23
23
|
children: /* @__PURE__ */ o("path", { d: "m147.487 0l70.081 175.78H256L185.919 0zM66.183 106.221l23.98-61.774l23.98 61.774zM70.07 0L0 175.78h39.18l14.33-36.914h73.308l14.328 36.914h39.179L110.255 0z" })
|
|
24
24
|
}
|
|
25
|
-
),
|
|
25
|
+
), Tr = ({
|
|
26
26
|
className: e,
|
|
27
27
|
viewBox: t,
|
|
28
28
|
title: r,
|
|
29
29
|
monotone: a,
|
|
30
30
|
...n
|
|
31
|
-
}) => /* @__PURE__ */
|
|
31
|
+
}) => /* @__PURE__ */ k(
|
|
32
32
|
z,
|
|
33
33
|
{
|
|
34
34
|
defaultViewBox: "0 0 512 512",
|
|
@@ -48,39 +48,13 @@ const ht = ({
|
|
|
48
48
|
/* @__PURE__ */ o("path", { d: "M32 0H192c17.7 0 32 14.3 32 32s-14.3 32-32 32H109.3L342.6 297.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L64 109.3V192c0 17.7-14.3 32-32 32s-32-14.3-32-32V32C0 14.3 14.3 0 32 0z" })
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
|
-
),
|
|
52
|
-
className: e,
|
|
53
|
-
viewBox: t,
|
|
54
|
-
title: r,
|
|
55
|
-
monotone: a,
|
|
56
|
-
...n
|
|
57
|
-
}) => /* @__PURE__ */ y(
|
|
58
|
-
z,
|
|
59
|
-
{
|
|
60
|
-
defaultViewBox: "0 0 448 512",
|
|
61
|
-
size: "size-5",
|
|
62
|
-
viewBox: t,
|
|
63
|
-
className: e,
|
|
64
|
-
title: r || "Chart",
|
|
65
|
-
...n,
|
|
66
|
-
children: [
|
|
67
|
-
/* @__PURE__ */ o(
|
|
68
|
-
"path",
|
|
69
|
-
{
|
|
70
|
-
opacity: a ? "1" : "0.4",
|
|
71
|
-
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"
|
|
72
|
-
}
|
|
73
|
-
),
|
|
74
|
-
/* @__PURE__ */ o("path", { d: "M368 96c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48h32c26.5 0 48-21.5 48-48V144c0-26.5-21.5-48-48-48H368zM48 224c-26.5 0-48 21.5-48 48V432c0 26.5 21.5 48 48 48H80c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48H48z" })
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
), Tr = ({
|
|
51
|
+
), Nr = ({
|
|
78
52
|
className: e,
|
|
79
53
|
viewBox: t,
|
|
80
54
|
title: r,
|
|
81
55
|
monotone: a,
|
|
82
56
|
...n
|
|
83
|
-
}) => /* @__PURE__ */
|
|
57
|
+
}) => /* @__PURE__ */ k(
|
|
84
58
|
z,
|
|
85
59
|
{
|
|
86
60
|
defaultViewBox: "0 0 448 512",
|
|
@@ -100,13 +74,13 @@ const ht = ({
|
|
|
100
74
|
/* @__PURE__ */ o("path", { d: "M163.8 0c-12.1 0-23.2 6.8-28.6 17.7L128 32H32C14.3 32 0 46.3 0 64S14.3 96 32 96H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H320l-7.2-14.3C307.4 6.8 296.3 0 284.2 0H163.8z" })
|
|
101
75
|
]
|
|
102
76
|
}
|
|
103
|
-
),
|
|
77
|
+
), Cr = ({
|
|
104
78
|
className: e,
|
|
105
79
|
viewBox: t,
|
|
106
80
|
title: r,
|
|
107
81
|
monotone: a,
|
|
108
82
|
...n
|
|
109
|
-
}) => /* @__PURE__ */
|
|
83
|
+
}) => /* @__PURE__ */ k(
|
|
110
84
|
z,
|
|
111
85
|
{
|
|
112
86
|
defaultViewBox: "0 0 512 512",
|
|
@@ -126,13 +100,13 @@ const ht = ({
|
|
|
126
100
|
/* @__PURE__ */ o("path", { d: "M392.4 21.7L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0zM339.7 74.3L172.4 241.7c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3z" })
|
|
127
101
|
]
|
|
128
102
|
}
|
|
129
|
-
),
|
|
103
|
+
), xr = ({
|
|
130
104
|
className: e,
|
|
131
105
|
viewBox: t,
|
|
132
106
|
title: r,
|
|
133
107
|
monotone: a,
|
|
134
108
|
...n
|
|
135
|
-
}) => /* @__PURE__ */
|
|
109
|
+
}) => /* @__PURE__ */ k(
|
|
136
110
|
z,
|
|
137
111
|
{
|
|
138
112
|
defaultViewBox: "0 0 512 512",
|
|
@@ -152,13 +126,13 @@ const ht = ({
|
|
|
152
126
|
/* @__PURE__ */ o("path", { d: "M256 128c13.3 0 24 10.7 24 24v94.1l65 65c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-72-72c-4.5-4.5-7-10.6-7-17V152c0-13.3 10.7-24 24-24z" })
|
|
153
127
|
]
|
|
154
128
|
}
|
|
155
|
-
),
|
|
129
|
+
), Er = ({
|
|
156
130
|
className: e,
|
|
157
131
|
viewBox: t,
|
|
158
132
|
title: r,
|
|
159
133
|
monotone: a,
|
|
160
134
|
...n
|
|
161
|
-
}) => /* @__PURE__ */
|
|
135
|
+
}) => /* @__PURE__ */ k(
|
|
162
136
|
z,
|
|
163
137
|
{
|
|
164
138
|
defaultViewBox: "0 0 512 512",
|
|
@@ -178,7 +152,7 @@ const ht = ({
|
|
|
178
152
|
/* @__PURE__ */ o("path", { d: "M256 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM192 248c0-13.3 10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h24V272H216c-13.3 0-24-10.7-24-24z" })
|
|
179
153
|
]
|
|
180
154
|
}
|
|
181
|
-
),
|
|
155
|
+
), ht = ({
|
|
182
156
|
className: e,
|
|
183
157
|
viewBox: t,
|
|
184
158
|
title: r,
|
|
@@ -201,13 +175,13 @@ const ht = ({
|
|
|
201
175
|
}
|
|
202
176
|
)
|
|
203
177
|
}
|
|
204
|
-
),
|
|
178
|
+
), Ir = ({
|
|
205
179
|
className: e,
|
|
206
180
|
viewBox: t,
|
|
207
181
|
title: r,
|
|
208
182
|
monotone: a,
|
|
209
183
|
...n
|
|
210
|
-
}) => /* @__PURE__ */
|
|
184
|
+
}) => /* @__PURE__ */ k(
|
|
211
185
|
z,
|
|
212
186
|
{
|
|
213
187
|
defaultViewBox: "0 0 576 512",
|
|
@@ -227,13 +201,13 @@ const ht = ({
|
|
|
227
201
|
/* @__PURE__ */ o("path", { d: "M176 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16H272c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80H144z" })
|
|
228
202
|
]
|
|
229
203
|
}
|
|
230
|
-
),
|
|
204
|
+
), Sr = ({
|
|
231
205
|
className: e,
|
|
232
206
|
viewBox: t,
|
|
233
207
|
title: r,
|
|
234
208
|
monotone: a,
|
|
235
209
|
...n
|
|
236
|
-
}) => /* @__PURE__ */
|
|
210
|
+
}) => /* @__PURE__ */ k(
|
|
237
211
|
z,
|
|
238
212
|
{
|
|
239
213
|
defaultViewBox: "0 0 512 512",
|
|
@@ -253,7 +227,7 @@ const ht = ({
|
|
|
253
227
|
/* @__PURE__ */ o("path", { d: "M64 128c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V192c0-35.3-28.7-64-64-64H64zm32 64H288c17.7 0 32 14.3 32 32s-14.3 32-32 32H96c-17.7 0-32-14.3-32-32s14.3-32 32-32z" })
|
|
254
228
|
]
|
|
255
229
|
}
|
|
256
|
-
),
|
|
230
|
+
), _r = ({
|
|
257
231
|
className: e,
|
|
258
232
|
viewBox: t,
|
|
259
233
|
title: r,
|
|
@@ -270,11 +244,44 @@ const ht = ({
|
|
|
270
244
|
...n,
|
|
271
245
|
children: /* @__PURE__ */ o("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" })
|
|
272
246
|
}
|
|
247
|
+
), Rr = ({
|
|
248
|
+
className: e,
|
|
249
|
+
viewBox: t,
|
|
250
|
+
title: r,
|
|
251
|
+
monotone: a,
|
|
252
|
+
...n
|
|
253
|
+
}) => /* @__PURE__ */ k(
|
|
254
|
+
z,
|
|
255
|
+
{
|
|
256
|
+
defaultViewBox: "0 0 512 512",
|
|
257
|
+
size: "size-5",
|
|
258
|
+
viewBox: t,
|
|
259
|
+
className: e,
|
|
260
|
+
title: r || "Sliders",
|
|
261
|
+
...n,
|
|
262
|
+
children: [
|
|
263
|
+
/* @__PURE__ */ o(
|
|
264
|
+
"path",
|
|
265
|
+
{
|
|
266
|
+
className: "fa-secondary",
|
|
267
|
+
opacity: a ? "1" : "0.4",
|
|
268
|
+
d: "M128 416a32 32 0 1 0 64 0 32 32 0 1 0 -64 0zM160 96a32 32 0 1 0 64 0 32 32 0 1 0 -64 0zM320 256a32 32 0 1 0 64 0 32 32 0 1 0 -64 0z"
|
|
269
|
+
}
|
|
270
|
+
),
|
|
271
|
+
/* @__PURE__ */ o(
|
|
272
|
+
"path",
|
|
273
|
+
{
|
|
274
|
+
className: "fa-primary",
|
|
275
|
+
d: "M0 416c0 13.3 10.7 24 24 24l59.7 0c10.2 32.5 40.5 56 76.3 56s66.1-23.5 76.3-56L488 440c13.3 0 24-10.7 24-24s-10.7-24-24-24l-251.7 0c-10.2-32.5-40.5-56-76.3-56s-66.1 23.5-76.3 56L24 392c-13.3 0-24 10.7-24 24zm128 0a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zM320 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm32-80c-35.8 0-66.1 23.5-76.3 56L24 232c-13.3 0-24 10.7-24 24s10.7 24 24 24l251.7 0c10.2 32.5 40.5 56 76.3 56s66.1-23.5 76.3-56l59.7 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-59.7 0c-10.2-32.5-40.5-56-76.3-56zM192 128a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm76.3-56C258.1 39.5 227.8 16 192 16s-66.1 23.5-76.3 56L24 72C10.7 72 0 82.7 0 96s10.7 24 24 24l91.7 0c10.2 32.5 40.5 56 76.3 56s66.1-23.5 76.3-56L488 120c13.3 0 24-10.7 24-24s-10.7-24-24-24L268.3 72z"
|
|
276
|
+
}
|
|
277
|
+
)
|
|
278
|
+
]
|
|
279
|
+
}
|
|
273
280
|
);
|
|
274
|
-
function
|
|
275
|
-
return
|
|
281
|
+
function de(e) {
|
|
282
|
+
return ze();
|
|
276
283
|
}
|
|
277
|
-
const
|
|
284
|
+
const Ie = g.createContext({
|
|
278
285
|
getItemProps: () => ({}),
|
|
279
286
|
activeIndex: null,
|
|
280
287
|
/* v8 ignore next 2 */
|
|
@@ -294,97 +301,97 @@ const Ee = f.createContext({
|
|
|
294
301
|
return t.displayName || t.name || "Component";
|
|
295
302
|
}
|
|
296
303
|
return "Element";
|
|
297
|
-
},
|
|
304
|
+
}, gt = rt(
|
|
298
305
|
({
|
|
299
306
|
trigger: e,
|
|
300
307
|
children: t,
|
|
301
308
|
label: r = "Open menu",
|
|
302
309
|
defaultPlacement: a = "bottom-start",
|
|
303
310
|
onOpenChange: n,
|
|
304
|
-
mode:
|
|
305
|
-
focusMode:
|
|
311
|
+
mode: s = "system",
|
|
312
|
+
focusMode: i = "system",
|
|
306
313
|
...c
|
|
307
|
-
},
|
|
308
|
-
const [l,
|
|
309
|
-
nodeId:
|
|
314
|
+
}, m) => {
|
|
315
|
+
const [l, d] = S(!1), [f, p] = S(!1), [b, h] = S(null), u = J([]), v = J([]), T = P(Ie), N = ot(), y = ur(), x = at(), { floatingStyles: _, refs: B, context: R } = nt({
|
|
316
|
+
nodeId: y,
|
|
310
317
|
open: l,
|
|
311
|
-
onOpenChange: (
|
|
312
|
-
|
|
318
|
+
onOpenChange: (ae) => {
|
|
319
|
+
d(ae), n == null || n(ae);
|
|
313
320
|
},
|
|
314
321
|
placement: a,
|
|
315
322
|
strategy: "fixed",
|
|
316
|
-
middleware: [
|
|
317
|
-
whileElementsMounted:
|
|
318
|
-
}),
|
|
323
|
+
middleware: [mr({ mainAxis: 10 }), hr(), gr()],
|
|
324
|
+
whileElementsMounted: fr
|
|
325
|
+
}), C = st(R, {
|
|
319
326
|
event: "mousedown",
|
|
320
327
|
toggle: !0,
|
|
321
328
|
ignoreMouse: !1
|
|
322
|
-
}),
|
|
323
|
-
listRef:
|
|
324
|
-
activeIndex:
|
|
329
|
+
}), U = it(R, { role: "menu" }), j = ct(R, { bubbles: !0 }), K = pr(R, {
|
|
330
|
+
listRef: u,
|
|
331
|
+
activeIndex: b,
|
|
325
332
|
nested: !1,
|
|
326
|
-
onNavigate:
|
|
333
|
+
onNavigate: h,
|
|
327
334
|
loop: !0
|
|
328
|
-
}),
|
|
335
|
+
}), re = br(R, {
|
|
329
336
|
listRef: v,
|
|
330
|
-
onMatch: l ?
|
|
331
|
-
activeIndex:
|
|
332
|
-
}), { getReferenceProps:
|
|
337
|
+
onMatch: l ? h : void 0,
|
|
338
|
+
activeIndex: b
|
|
339
|
+
}), { getReferenceProps: oe, getFloatingProps: Ne, getItemProps: O } = lt([C, U, j, K, re]), De = Ue(e) === "Button" || Ue(e) === "ButtonIcon", Bt = De ? {
|
|
333
340
|
noInternalClick: De,
|
|
334
|
-
focusMode:
|
|
335
|
-
mode:
|
|
336
|
-
} : {}, Ot =
|
|
341
|
+
focusMode: i,
|
|
342
|
+
mode: s
|
|
343
|
+
} : {}, Ot = I.cloneElement(
|
|
337
344
|
e,
|
|
338
345
|
{
|
|
339
346
|
...Bt,
|
|
340
347
|
"aria-label": r,
|
|
341
348
|
"data-open": l ? "" : void 0,
|
|
342
|
-
"data-focus-inside":
|
|
343
|
-
ref:
|
|
344
|
-
...
|
|
345
|
-
|
|
349
|
+
"data-focus-inside": f ? "" : void 0,
|
|
350
|
+
ref: Le([B.setReference, x.ref, m]),
|
|
351
|
+
...oe(
|
|
352
|
+
T.getItemProps({
|
|
346
353
|
...c
|
|
347
354
|
})
|
|
348
355
|
)
|
|
349
356
|
}
|
|
350
357
|
);
|
|
351
358
|
return G(() => {
|
|
352
|
-
if (!
|
|
359
|
+
if (!N)
|
|
353
360
|
return;
|
|
354
|
-
function
|
|
355
|
-
|
|
361
|
+
function ae() {
|
|
362
|
+
d(!1), n == null || n(!1);
|
|
356
363
|
}
|
|
357
|
-
return
|
|
358
|
-
|
|
364
|
+
return N.events.on("click", ae), () => {
|
|
365
|
+
N.events.off("click", ae);
|
|
359
366
|
};
|
|
360
|
-
}, [
|
|
361
|
-
l &&
|
|
362
|
-
}, [
|
|
367
|
+
}, [N, n]), G(() => {
|
|
368
|
+
l && N && N.events.emit("menuopen", { nodeId: y });
|
|
369
|
+
}, [N, l, y]), /* @__PURE__ */ k(vr, { id: y, children: [
|
|
363
370
|
Ot,
|
|
364
371
|
/* @__PURE__ */ o(
|
|
365
|
-
|
|
372
|
+
Ie.Provider,
|
|
366
373
|
{
|
|
367
374
|
value: {
|
|
368
|
-
activeIndex:
|
|
369
|
-
setActiveIndex:
|
|
375
|
+
activeIndex: b,
|
|
376
|
+
setActiveIndex: h,
|
|
370
377
|
getItemProps: O,
|
|
371
|
-
setHasFocusInside:
|
|
378
|
+
setHasFocusInside: p,
|
|
372
379
|
isOpen: l
|
|
373
380
|
},
|
|
374
|
-
children: /* @__PURE__ */ o(
|
|
375
|
-
|
|
381
|
+
children: /* @__PURE__ */ o(yr, { elementsRef: u, labelsRef: v, children: l && /* @__PURE__ */ o(dt, { children: /* @__PURE__ */ o(
|
|
382
|
+
ut,
|
|
376
383
|
{
|
|
377
|
-
context:
|
|
384
|
+
context: R,
|
|
378
385
|
modal: !1,
|
|
379
386
|
initialFocus: 0,
|
|
380
387
|
returnFocus: !0,
|
|
381
388
|
children: /* @__PURE__ */ o(
|
|
382
389
|
"div",
|
|
383
390
|
{
|
|
384
|
-
ref:
|
|
391
|
+
ref: B.setFloating,
|
|
385
392
|
className: "rounded-md bg-surface-light p-4 shadow-sm shadow-border-dark outline-none sm:p-2",
|
|
386
|
-
style:
|
|
387
|
-
...
|
|
393
|
+
style: _,
|
|
394
|
+
...Ne(),
|
|
388
395
|
children: t
|
|
389
396
|
}
|
|
390
397
|
)
|
|
@@ -394,125 +401,125 @@ const Ee = f.createContext({
|
|
|
394
401
|
)
|
|
395
402
|
] });
|
|
396
403
|
}
|
|
397
|
-
),
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
const
|
|
404
|
+
), Se = rt((e, t) => /* @__PURE__ */ o(kr, { children: /* @__PURE__ */ o(gt, { ...e, ref: t }) }));
|
|
405
|
+
Se.displayName = "Menu";
|
|
406
|
+
gt.displayName = "MenuComponent";
|
|
407
|
+
const W = g.forwardRef(
|
|
401
408
|
({
|
|
402
409
|
label: e,
|
|
403
410
|
disabled: t,
|
|
404
411
|
icon: r,
|
|
405
412
|
raw: a = !1,
|
|
406
413
|
children: n,
|
|
407
|
-
ignoreClick:
|
|
408
|
-
...
|
|
414
|
+
ignoreClick: s = !1,
|
|
415
|
+
...i
|
|
409
416
|
}, c) => {
|
|
410
|
-
let
|
|
411
|
-
const l =
|
|
417
|
+
let m = "";
|
|
418
|
+
const l = g.useContext(Ie), d = at({ label: t ? null : e }), f = ot(), p = Le([d.ref, c]);
|
|
412
419
|
return a && n ? /* @__PURE__ */ o(
|
|
413
420
|
"div",
|
|
414
421
|
{
|
|
415
422
|
role: "menuitem",
|
|
416
423
|
...l.getItemProps({
|
|
417
|
-
onClick(
|
|
418
|
-
var
|
|
419
|
-
|
|
424
|
+
onClick(b) {
|
|
425
|
+
var h;
|
|
426
|
+
s || ((h = i.onClick) == null || h.call(i, b), f == null || f.events.emit("click"));
|
|
420
427
|
}
|
|
421
428
|
}),
|
|
422
429
|
children: n
|
|
423
430
|
}
|
|
424
|
-
) : (r && (
|
|
431
|
+
) : (r && (m = "pl-2"), /* @__PURE__ */ k(
|
|
425
432
|
"button",
|
|
426
433
|
{
|
|
427
|
-
...
|
|
428
|
-
ref:
|
|
434
|
+
...i,
|
|
435
|
+
ref: p,
|
|
429
436
|
role: "menuitem",
|
|
430
437
|
className: "m-0 flex w-full rounded-md border border-transparent bg-none px-2 py-2 text-left text-base outline-none focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline disabled:cursor-not-allowed disabled:text-copy-medium sm:py-1",
|
|
431
438
|
tabIndex: 0,
|
|
432
439
|
disabled: t,
|
|
433
440
|
...l.getItemProps({
|
|
434
|
-
onClick(
|
|
435
|
-
var
|
|
436
|
-
|
|
441
|
+
onClick(b) {
|
|
442
|
+
var h;
|
|
443
|
+
s || ((h = i.onClick) == null || h.call(i, b), f == null || f.events.emit("click"));
|
|
437
444
|
},
|
|
438
|
-
onFocus(
|
|
439
|
-
var
|
|
440
|
-
(
|
|
445
|
+
onFocus(b) {
|
|
446
|
+
var h;
|
|
447
|
+
(h = i.onFocus) == null || h.call(i, b), l.setHasFocusInside(!0);
|
|
441
448
|
}
|
|
442
449
|
}),
|
|
443
450
|
children: [
|
|
444
451
|
r,
|
|
445
|
-
e && /* @__PURE__ */ o("span", { className:
|
|
452
|
+
e && /* @__PURE__ */ o("span", { className: m, children: e })
|
|
446
453
|
]
|
|
447
454
|
}
|
|
448
455
|
));
|
|
449
456
|
}
|
|
450
457
|
);
|
|
451
|
-
|
|
452
|
-
const
|
|
453
|
-
const r =
|
|
458
|
+
W.displayName = "MenuItem";
|
|
459
|
+
const Ar = ({ className: e, ...t }) => {
|
|
460
|
+
const r = w(e, "my-1 border-t border-border-medium");
|
|
454
461
|
return /* @__PURE__ */ o("div", { className: r, ...t });
|
|
455
462
|
};
|
|
456
463
|
/*!
|
|
457
|
-
@versini/ui-menu v2.0.
|
|
458
|
-
©
|
|
464
|
+
@versini/ui-menu v2.0.8
|
|
465
|
+
© 2025 gizmette.com
|
|
459
466
|
*/
|
|
460
467
|
try {
|
|
461
468
|
window.__VERSINI_UI_MENU__ || (window.__VERSINI_UI_MENU__ = {
|
|
462
|
-
version: "2.0.
|
|
463
|
-
buildTime: "
|
|
469
|
+
version: "2.0.8",
|
|
470
|
+
buildTime: "01/02/2025 05:13 PM EST",
|
|
464
471
|
homepage: "https://github.com/aversini/ui-components",
|
|
465
472
|
license: "MIT"
|
|
466
473
|
});
|
|
467
474
|
} catch {
|
|
468
475
|
}
|
|
469
476
|
/*!
|
|
470
|
-
@versini/ui-togglegroup v2.0.
|
|
471
|
-
©
|
|
477
|
+
@versini/ui-togglegroup v2.0.6
|
|
478
|
+
© 2025 gizmette.com
|
|
472
479
|
*/
|
|
473
480
|
try {
|
|
474
481
|
window.__VERSINI_UI_TOGGLEGROUP__ || (window.__VERSINI_UI_TOGGLEGROUP__ = {
|
|
475
|
-
version: "2.0.
|
|
476
|
-
buildTime: "
|
|
482
|
+
version: "2.0.6",
|
|
483
|
+
buildTime: "01/02/2025 05:13 PM EST",
|
|
477
484
|
homepage: "https://github.com/aversini/ui-components",
|
|
478
485
|
license: "MIT"
|
|
479
486
|
});
|
|
480
487
|
} catch {
|
|
481
488
|
}
|
|
482
|
-
const
|
|
483
|
-
function
|
|
489
|
+
const Mr = "av-togglegroup", zr = "av-togglegroup-item-wrapper", Lr = "av-togglegroup-item";
|
|
490
|
+
function Pe(e, t = []) {
|
|
484
491
|
let r = [];
|
|
485
|
-
function a(
|
|
486
|
-
const c =
|
|
487
|
-
r = [...r,
|
|
488
|
-
const l = (
|
|
489
|
-
var
|
|
490
|
-
const { scope:
|
|
491
|
-
return /* @__PURE__ */ o(v.Provider, { value:
|
|
492
|
+
function a(s, i) {
|
|
493
|
+
const c = g.createContext(i), m = r.length;
|
|
494
|
+
r = [...r, i];
|
|
495
|
+
const l = (f) => {
|
|
496
|
+
var p;
|
|
497
|
+
const { scope: b, children: h, ...u } = f, v = ((p = b == null ? void 0 : b[e]) == null ? void 0 : p[m]) || c, T = g.useMemo(() => u, Object.values(u));
|
|
498
|
+
return /* @__PURE__ */ o(v.Provider, { value: T, children: h });
|
|
492
499
|
};
|
|
493
|
-
l.displayName =
|
|
494
|
-
function
|
|
495
|
-
var
|
|
496
|
-
const
|
|
497
|
-
if (
|
|
498
|
-
if (
|
|
499
|
-
throw new Error(`\`${
|
|
500
|
+
l.displayName = s + "Provider";
|
|
501
|
+
function d(f, p) {
|
|
502
|
+
var b;
|
|
503
|
+
const h = ((b = p == null ? void 0 : p[e]) == null ? void 0 : b[m]) || c, u = g.useContext(h);
|
|
504
|
+
if (u) return u;
|
|
505
|
+
if (i !== void 0) return i;
|
|
506
|
+
throw new Error(`\`${f}\` must be used within \`${s}\``);
|
|
500
507
|
}
|
|
501
|
-
return [l,
|
|
508
|
+
return [l, d];
|
|
502
509
|
}
|
|
503
510
|
const n = () => {
|
|
504
|
-
const
|
|
505
|
-
return function(
|
|
506
|
-
const c = (
|
|
507
|
-
return
|
|
508
|
-
() => ({ [`__scope${e}`]: { ...
|
|
509
|
-
[
|
|
511
|
+
const s = r.map((i) => g.createContext(i));
|
|
512
|
+
return function(i) {
|
|
513
|
+
const c = (i == null ? void 0 : i[e]) || s;
|
|
514
|
+
return g.useMemo(
|
|
515
|
+
() => ({ [`__scope${e}`]: { ...i, [e]: c } }),
|
|
516
|
+
[i, c]
|
|
510
517
|
);
|
|
511
518
|
};
|
|
512
519
|
};
|
|
513
|
-
return n.scopeName = e, [a,
|
|
520
|
+
return n.scopeName = e, [a, Pr(n, ...t)];
|
|
514
521
|
}
|
|
515
|
-
function
|
|
522
|
+
function Pr(...e) {
|
|
516
523
|
const t = e[0];
|
|
517
524
|
if (e.length === 1) return t;
|
|
518
525
|
const r = () => {
|
|
@@ -521,11 +528,11 @@ function zr(...e) {
|
|
|
521
528
|
scopeName: n.scopeName
|
|
522
529
|
}));
|
|
523
530
|
return function(n) {
|
|
524
|
-
const
|
|
525
|
-
const l = c(n)[`__scope${
|
|
526
|
-
return { ...
|
|
531
|
+
const s = a.reduce((i, { useScope: c, scopeName: m }) => {
|
|
532
|
+
const l = c(n)[`__scope${m}`];
|
|
533
|
+
return { ...i, ...l };
|
|
527
534
|
}, {});
|
|
528
|
-
return
|
|
535
|
+
return g.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
529
536
|
};
|
|
530
537
|
};
|
|
531
538
|
return r.scopeName = t.scopeName, r;
|
|
@@ -535,67 +542,67 @@ function je(e, t) {
|
|
|
535
542
|
return e(t);
|
|
536
543
|
e != null && (e.current = t);
|
|
537
544
|
}
|
|
538
|
-
function
|
|
545
|
+
function ft(...e) {
|
|
539
546
|
return (t) => {
|
|
540
547
|
let r = !1;
|
|
541
548
|
const a = e.map((n) => {
|
|
542
|
-
const
|
|
543
|
-
return !r && typeof
|
|
549
|
+
const s = je(n, t);
|
|
550
|
+
return !r && typeof s == "function" && (r = !0), s;
|
|
544
551
|
});
|
|
545
552
|
if (r)
|
|
546
553
|
return () => {
|
|
547
554
|
for (let n = 0; n < a.length; n++) {
|
|
548
|
-
const
|
|
549
|
-
typeof
|
|
555
|
+
const s = a[n];
|
|
556
|
+
typeof s == "function" ? s() : je(e[n], null);
|
|
550
557
|
}
|
|
551
558
|
};
|
|
552
559
|
};
|
|
553
560
|
}
|
|
554
|
-
function
|
|
555
|
-
return
|
|
561
|
+
function _e(...e) {
|
|
562
|
+
return g.useCallback(ft(...e), e);
|
|
556
563
|
}
|
|
557
|
-
var
|
|
558
|
-
const { children: r, ...a } = e, n =
|
|
559
|
-
if (
|
|
560
|
-
const
|
|
561
|
-
return /* @__PURE__ */ o(
|
|
564
|
+
var be = g.forwardRef((e, t) => {
|
|
565
|
+
const { children: r, ...a } = e, n = g.Children.toArray(r), s = n.find(Or);
|
|
566
|
+
if (s) {
|
|
567
|
+
const i = s.props.children, c = n.map((m) => m === s ? g.Children.count(i) > 1 ? g.Children.only(null) : g.isValidElement(i) ? i.props.children : null : m);
|
|
568
|
+
return /* @__PURE__ */ o(Re, { ...a, ref: t, children: g.isValidElement(i) ? g.cloneElement(i, void 0, c) : null });
|
|
562
569
|
}
|
|
563
|
-
return /* @__PURE__ */ o(
|
|
570
|
+
return /* @__PURE__ */ o(Re, { ...a, ref: t, children: r });
|
|
564
571
|
});
|
|
565
|
-
|
|
566
|
-
var
|
|
572
|
+
be.displayName = "Slot";
|
|
573
|
+
var Re = g.forwardRef((e, t) => {
|
|
567
574
|
const { children: r, ...a } = e;
|
|
568
|
-
if (
|
|
569
|
-
const n =
|
|
570
|
-
return
|
|
571
|
-
|
|
575
|
+
if (g.isValidElement(r)) {
|
|
576
|
+
const n = Dr(r);
|
|
577
|
+
return g.cloneElement(r, {
|
|
578
|
+
...$r(a, r.props),
|
|
572
579
|
// @ts-ignore
|
|
573
|
-
ref: t ?
|
|
580
|
+
ref: t ? ft(t, n) : n
|
|
574
581
|
});
|
|
575
582
|
}
|
|
576
|
-
return
|
|
583
|
+
return g.Children.count(r) > 1 ? g.Children.only(null) : null;
|
|
577
584
|
});
|
|
578
|
-
|
|
579
|
-
var
|
|
580
|
-
function
|
|
581
|
-
return
|
|
585
|
+
Re.displayName = "SlotClone";
|
|
586
|
+
var Br = ({ children: e }) => /* @__PURE__ */ o(M, { children: e });
|
|
587
|
+
function Or(e) {
|
|
588
|
+
return g.isValidElement(e) && e.type === Br;
|
|
582
589
|
}
|
|
583
|
-
function
|
|
590
|
+
function $r(e, t) {
|
|
584
591
|
const r = { ...t };
|
|
585
592
|
for (const a in t) {
|
|
586
|
-
const n = e[a],
|
|
587
|
-
/^on[A-Z]/.test(a) ? n &&
|
|
588
|
-
|
|
589
|
-
} : n && (r[a] = n) : a === "style" ? r[a] = { ...n, ...
|
|
593
|
+
const n = e[a], s = t[a];
|
|
594
|
+
/^on[A-Z]/.test(a) ? n && s ? r[a] = (...i) => {
|
|
595
|
+
s(...i), n(...i);
|
|
596
|
+
} : n && (r[a] = n) : a === "style" ? r[a] = { ...n, ...s } : a === "className" && (r[a] = [n, s].filter(Boolean).join(" "));
|
|
590
597
|
}
|
|
591
598
|
return { ...e, ...r };
|
|
592
599
|
}
|
|
593
|
-
function
|
|
600
|
+
function Dr(e) {
|
|
594
601
|
var t, r;
|
|
595
602
|
let a = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, n = a && "isReactWarning" in a && a.isReactWarning;
|
|
596
603
|
return n ? e.ref : (a = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = a && "isReactWarning" in a && a.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
597
604
|
}
|
|
598
|
-
var
|
|
605
|
+
var Vr = [
|
|
599
606
|
"a",
|
|
600
607
|
"button",
|
|
601
608
|
"div",
|
|
@@ -612,233 +619,233 @@ var Dr = [
|
|
|
612
619
|
"span",
|
|
613
620
|
"svg",
|
|
614
621
|
"ul"
|
|
615
|
-
],
|
|
616
|
-
const r =
|
|
617
|
-
const { asChild:
|
|
618
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(c, { ...
|
|
622
|
+
], he = Vr.reduce((e, t) => {
|
|
623
|
+
const r = g.forwardRef((a, n) => {
|
|
624
|
+
const { asChild: s, ...i } = a, c = s ? be : t;
|
|
625
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ o(c, { ...i, ref: n });
|
|
619
626
|
});
|
|
620
627
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
621
628
|
}, {});
|
|
622
|
-
function
|
|
629
|
+
function q(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
|
|
623
630
|
return function(a) {
|
|
624
631
|
if (e == null || e(a), r === !1 || !a.defaultPrevented)
|
|
625
632
|
return t == null ? void 0 : t(a);
|
|
626
633
|
};
|
|
627
634
|
}
|
|
628
|
-
function
|
|
629
|
-
const t = e + "CollectionProvider", [r, a] =
|
|
635
|
+
function Fr(e) {
|
|
636
|
+
const t = e + "CollectionProvider", [r, a] = Pe(t), [n, s] = r(
|
|
630
637
|
t,
|
|
631
638
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
632
|
-
),
|
|
633
|
-
const { scope:
|
|
634
|
-
return /* @__PURE__ */ o(n, { scope:
|
|
639
|
+
), i = (b) => {
|
|
640
|
+
const { scope: h, children: u } = b, v = I.useRef(null), T = I.useRef(/* @__PURE__ */ new Map()).current;
|
|
641
|
+
return /* @__PURE__ */ o(n, { scope: h, itemMap: T, collectionRef: v, children: u });
|
|
635
642
|
};
|
|
636
|
-
|
|
637
|
-
const c = e + "CollectionSlot",
|
|
638
|
-
(
|
|
639
|
-
const { scope:
|
|
640
|
-
return /* @__PURE__ */ o(
|
|
643
|
+
i.displayName = t;
|
|
644
|
+
const c = e + "CollectionSlot", m = I.forwardRef(
|
|
645
|
+
(b, h) => {
|
|
646
|
+
const { scope: u, children: v } = b, T = s(c, u), N = _e(h, T.collectionRef);
|
|
647
|
+
return /* @__PURE__ */ o(be, { ref: N, children: v });
|
|
641
648
|
}
|
|
642
649
|
);
|
|
643
|
-
|
|
644
|
-
const l = e + "CollectionItemSlot",
|
|
645
|
-
(
|
|
646
|
-
const { scope:
|
|
647
|
-
return
|
|
650
|
+
m.displayName = c;
|
|
651
|
+
const l = e + "CollectionItemSlot", d = "data-radix-collection-item", f = I.forwardRef(
|
|
652
|
+
(b, h) => {
|
|
653
|
+
const { scope: u, children: v, ...T } = b, N = I.useRef(null), y = _e(h, N), x = s(l, u);
|
|
654
|
+
return I.useEffect(() => (x.itemMap.set(N, { ref: N, ...T }), () => void x.itemMap.delete(N))), /* @__PURE__ */ o(be, { [d]: "", ref: y, children: v });
|
|
648
655
|
}
|
|
649
656
|
);
|
|
650
|
-
|
|
651
|
-
function b
|
|
652
|
-
const
|
|
653
|
-
return
|
|
654
|
-
const
|
|
655
|
-
if (!
|
|
656
|
-
const v = Array.from(
|
|
657
|
-
return Array.from(
|
|
658
|
-
(
|
|
657
|
+
f.displayName = l;
|
|
658
|
+
function p(b) {
|
|
659
|
+
const h = s(e + "CollectionConsumer", b);
|
|
660
|
+
return I.useCallback(() => {
|
|
661
|
+
const u = h.collectionRef.current;
|
|
662
|
+
if (!u) return [];
|
|
663
|
+
const v = Array.from(u.querySelectorAll(`[${d}]`));
|
|
664
|
+
return Array.from(h.itemMap.values()).sort(
|
|
665
|
+
(T, N) => v.indexOf(T.ref.current) - v.indexOf(N.ref.current)
|
|
659
666
|
);
|
|
660
|
-
}, [
|
|
667
|
+
}, [h.collectionRef, h.itemMap]);
|
|
661
668
|
}
|
|
662
669
|
return [
|
|
663
|
-
{ Provider:
|
|
664
|
-
|
|
670
|
+
{ Provider: i, Slot: m, ItemSlot: f },
|
|
671
|
+
p,
|
|
665
672
|
a
|
|
666
673
|
];
|
|
667
674
|
}
|
|
668
|
-
var
|
|
669
|
-
},
|
|
670
|
-
}),
|
|
671
|
-
function
|
|
672
|
-
const [t, r] =
|
|
673
|
-
return
|
|
674
|
-
r((a) => a ?? String(
|
|
675
|
+
var Hr = globalThis != null && globalThis.document ? g.useLayoutEffect : () => {
|
|
676
|
+
}, Gr = g.useId || (() => {
|
|
677
|
+
}), Ur = 0;
|
|
678
|
+
function jr(e) {
|
|
679
|
+
const [t, r] = g.useState(Gr());
|
|
680
|
+
return Hr(() => {
|
|
681
|
+
r((a) => a ?? String(Ur++));
|
|
675
682
|
}, [e]), t ? `radix-${t}` : "";
|
|
676
683
|
}
|
|
677
|
-
function
|
|
678
|
-
const t =
|
|
679
|
-
return
|
|
684
|
+
function Be(e) {
|
|
685
|
+
const t = g.useRef(e);
|
|
686
|
+
return g.useEffect(() => {
|
|
680
687
|
t.current = e;
|
|
681
|
-
}),
|
|
688
|
+
}), g.useMemo(() => (...r) => {
|
|
682
689
|
var a;
|
|
683
690
|
return (a = t.current) == null ? void 0 : a.call(t, ...r);
|
|
684
691
|
}, []);
|
|
685
692
|
}
|
|
686
|
-
function
|
|
693
|
+
function ye({
|
|
687
694
|
prop: e,
|
|
688
695
|
defaultProp: t,
|
|
689
696
|
onChange: r = () => {
|
|
690
697
|
}
|
|
691
698
|
}) {
|
|
692
|
-
const [a, n] =
|
|
699
|
+
const [a, n] = Kr({ defaultProp: t, onChange: r }), s = e !== void 0, i = s ? e : a, c = Be(r), m = g.useCallback(
|
|
693
700
|
(l) => {
|
|
694
|
-
if (
|
|
695
|
-
const
|
|
696
|
-
|
|
701
|
+
if (s) {
|
|
702
|
+
const d = typeof l == "function" ? l(e) : l;
|
|
703
|
+
d !== e && c(d);
|
|
697
704
|
} else
|
|
698
705
|
n(l);
|
|
699
706
|
},
|
|
700
|
-
[
|
|
707
|
+
[s, e, n, c]
|
|
701
708
|
);
|
|
702
|
-
return [
|
|
709
|
+
return [i, m];
|
|
703
710
|
}
|
|
704
|
-
function
|
|
711
|
+
function Kr({
|
|
705
712
|
defaultProp: e,
|
|
706
713
|
onChange: t
|
|
707
714
|
}) {
|
|
708
|
-
const r =
|
|
709
|
-
return
|
|
710
|
-
n.current !== a && (
|
|
711
|
-
}, [a, n,
|
|
715
|
+
const r = g.useState(e), [a] = r, n = g.useRef(a), s = Be(t);
|
|
716
|
+
return g.useEffect(() => {
|
|
717
|
+
n.current !== a && (s(a), n.current = a);
|
|
718
|
+
}, [a, n, s]), r;
|
|
712
719
|
}
|
|
713
|
-
var
|
|
714
|
-
function
|
|
715
|
-
const t =
|
|
720
|
+
var Wr = g.createContext(void 0);
|
|
721
|
+
function pt(e) {
|
|
722
|
+
const t = g.useContext(Wr);
|
|
716
723
|
return e || t || "ltr";
|
|
717
724
|
}
|
|
718
|
-
var
|
|
719
|
-
|
|
720
|
-
[
|
|
721
|
-
), [
|
|
722
|
-
(e, t) => /* @__PURE__ */ o(
|
|
725
|
+
var xe = "rovingFocusGroup.onEntryFocus", Yr = { bubbles: !1, cancelable: !0 }, ke = "RovingFocusGroup", [Ae, bt, qr] = Fr(ke), [Xr, vt] = Pe(
|
|
726
|
+
ke,
|
|
727
|
+
[qr]
|
|
728
|
+
), [Zr, Qr] = Xr(ke), yt = g.forwardRef(
|
|
729
|
+
(e, t) => /* @__PURE__ */ o(Ae.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(Ae.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ o(Jr, { ...e, ref: t }) }) })
|
|
723
730
|
);
|
|
724
|
-
|
|
725
|
-
var
|
|
731
|
+
yt.displayName = ke;
|
|
732
|
+
var Jr = g.forwardRef((e, t) => {
|
|
726
733
|
const {
|
|
727
734
|
__scopeRovingFocusGroup: r,
|
|
728
735
|
orientation: a,
|
|
729
736
|
loop: n = !1,
|
|
730
|
-
dir:
|
|
731
|
-
currentTabStopId:
|
|
737
|
+
dir: s,
|
|
738
|
+
currentTabStopId: i,
|
|
732
739
|
defaultCurrentTabStopId: c,
|
|
733
|
-
onCurrentTabStopIdChange:
|
|
740
|
+
onCurrentTabStopIdChange: m,
|
|
734
741
|
onEntryFocus: l,
|
|
735
|
-
preventScrollOnEntryFocus:
|
|
736
|
-
...
|
|
737
|
-
} = e,
|
|
738
|
-
prop:
|
|
742
|
+
preventScrollOnEntryFocus: d = !1,
|
|
743
|
+
...f
|
|
744
|
+
} = e, p = g.useRef(null), b = _e(t, p), h = pt(s), [u = null, v] = ye({
|
|
745
|
+
prop: i,
|
|
739
746
|
defaultProp: c,
|
|
740
|
-
onChange:
|
|
741
|
-
}), [
|
|
742
|
-
return
|
|
743
|
-
const
|
|
744
|
-
if (
|
|
745
|
-
return
|
|
746
|
-
}, [
|
|
747
|
-
|
|
747
|
+
onChange: m
|
|
748
|
+
}), [T, N] = g.useState(!1), y = Be(l), x = bt(r), _ = g.useRef(!1), [B, R] = g.useState(0);
|
|
749
|
+
return g.useEffect(() => {
|
|
750
|
+
const C = p.current;
|
|
751
|
+
if (C)
|
|
752
|
+
return C.addEventListener(xe, y), () => C.removeEventListener(xe, y);
|
|
753
|
+
}, [y]), /* @__PURE__ */ o(
|
|
754
|
+
Zr,
|
|
748
755
|
{
|
|
749
756
|
scope: r,
|
|
750
757
|
orientation: a,
|
|
751
|
-
dir:
|
|
758
|
+
dir: h,
|
|
752
759
|
loop: n,
|
|
753
|
-
currentTabStopId:
|
|
754
|
-
onItemFocus:
|
|
755
|
-
(
|
|
760
|
+
currentTabStopId: u,
|
|
761
|
+
onItemFocus: g.useCallback(
|
|
762
|
+
(C) => v(C),
|
|
756
763
|
[v]
|
|
757
764
|
),
|
|
758
|
-
onItemShiftTab:
|
|
759
|
-
onFocusableItemAdd:
|
|
760
|
-
() =>
|
|
765
|
+
onItemShiftTab: g.useCallback(() => N(!0), []),
|
|
766
|
+
onFocusableItemAdd: g.useCallback(
|
|
767
|
+
() => R((C) => C + 1),
|
|
761
768
|
[]
|
|
762
769
|
),
|
|
763
|
-
onFocusableItemRemove:
|
|
764
|
-
() =>
|
|
770
|
+
onFocusableItemRemove: g.useCallback(
|
|
771
|
+
() => R((C) => C - 1),
|
|
765
772
|
[]
|
|
766
773
|
),
|
|
767
774
|
children: /* @__PURE__ */ o(
|
|
768
|
-
|
|
775
|
+
he.div,
|
|
769
776
|
{
|
|
770
|
-
tabIndex:
|
|
777
|
+
tabIndex: T || B === 0 ? -1 : 0,
|
|
771
778
|
"data-orientation": a,
|
|
772
|
-
...
|
|
773
|
-
ref:
|
|
779
|
+
...f,
|
|
780
|
+
ref: b,
|
|
774
781
|
style: { outline: "none", ...e.style },
|
|
775
|
-
onMouseDown:
|
|
776
|
-
|
|
782
|
+
onMouseDown: q(e.onMouseDown, () => {
|
|
783
|
+
_.current = !0;
|
|
777
784
|
}),
|
|
778
|
-
onFocus:
|
|
779
|
-
const
|
|
780
|
-
if (
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
783
|
-
const
|
|
785
|
+
onFocus: q(e.onFocus, (C) => {
|
|
786
|
+
const U = !_.current;
|
|
787
|
+
if (C.target === C.currentTarget && U && !T) {
|
|
788
|
+
const j = new CustomEvent(xe, Yr);
|
|
789
|
+
if (C.currentTarget.dispatchEvent(j), !j.defaultPrevented) {
|
|
790
|
+
const K = x().filter((O) => O.focusable), re = K.find((O) => O.active), oe = K.find((O) => O.id === u), Ne = [re, oe, ...K].filter(
|
|
784
791
|
Boolean
|
|
785
792
|
).map((O) => O.ref.current);
|
|
786
|
-
Tt(
|
|
793
|
+
Tt(Ne, d);
|
|
787
794
|
}
|
|
788
795
|
}
|
|
789
|
-
|
|
796
|
+
_.current = !1;
|
|
790
797
|
}),
|
|
791
|
-
onBlur:
|
|
798
|
+
onBlur: q(e.onBlur, () => N(!1))
|
|
792
799
|
}
|
|
793
800
|
)
|
|
794
801
|
}
|
|
795
802
|
);
|
|
796
|
-
}),
|
|
803
|
+
}), kt = "RovingFocusGroupItem", wt = g.forwardRef(
|
|
797
804
|
(e, t) => {
|
|
798
805
|
const {
|
|
799
806
|
__scopeRovingFocusGroup: r,
|
|
800
807
|
focusable: a = !0,
|
|
801
808
|
active: n = !1,
|
|
802
|
-
tabStopId:
|
|
803
|
-
...
|
|
804
|
-
} = e, c =
|
|
805
|
-
return
|
|
809
|
+
tabStopId: s,
|
|
810
|
+
...i
|
|
811
|
+
} = e, c = jr(), m = s || c, l = Qr(kt, r), d = l.currentTabStopId === m, f = bt(r), { onFocusableItemAdd: p, onFocusableItemRemove: b } = l;
|
|
812
|
+
return g.useEffect(() => {
|
|
806
813
|
if (a)
|
|
807
|
-
return
|
|
808
|
-
}, [a,
|
|
809
|
-
|
|
814
|
+
return p(), () => b();
|
|
815
|
+
}, [a, p, b]), /* @__PURE__ */ o(
|
|
816
|
+
Ae.ItemSlot,
|
|
810
817
|
{
|
|
811
818
|
scope: r,
|
|
812
|
-
id:
|
|
819
|
+
id: m,
|
|
813
820
|
focusable: a,
|
|
814
821
|
active: n,
|
|
815
822
|
children: /* @__PURE__ */ o(
|
|
816
|
-
|
|
823
|
+
he.span,
|
|
817
824
|
{
|
|
818
|
-
tabIndex:
|
|
825
|
+
tabIndex: d ? 0 : -1,
|
|
819
826
|
"data-orientation": l.orientation,
|
|
820
|
-
...
|
|
827
|
+
...i,
|
|
821
828
|
ref: t,
|
|
822
|
-
onMouseDown:
|
|
823
|
-
a ? l.onItemFocus(
|
|
829
|
+
onMouseDown: q(e.onMouseDown, (h) => {
|
|
830
|
+
a ? l.onItemFocus(m) : h.preventDefault();
|
|
824
831
|
}),
|
|
825
|
-
onFocus:
|
|
826
|
-
onKeyDown:
|
|
827
|
-
if (
|
|
832
|
+
onFocus: q(e.onFocus, () => l.onItemFocus(m)),
|
|
833
|
+
onKeyDown: q(e.onKeyDown, (h) => {
|
|
834
|
+
if (h.key === "Tab" && h.shiftKey) {
|
|
828
835
|
l.onItemShiftTab();
|
|
829
836
|
return;
|
|
830
837
|
}
|
|
831
|
-
if (
|
|
832
|
-
const
|
|
833
|
-
if (
|
|
834
|
-
if (
|
|
835
|
-
|
|
836
|
-
let v =
|
|
837
|
-
if (
|
|
838
|
-
else if (
|
|
839
|
-
|
|
840
|
-
const
|
|
841
|
-
v = l.loop ?
|
|
838
|
+
if (h.target !== h.currentTarget) return;
|
|
839
|
+
const u = ro(h, l.orientation, l.dir);
|
|
840
|
+
if (u !== void 0) {
|
|
841
|
+
if (h.metaKey || h.ctrlKey || h.altKey || h.shiftKey) return;
|
|
842
|
+
h.preventDefault();
|
|
843
|
+
let v = f().filter((T) => T.focusable).map((T) => T.ref.current);
|
|
844
|
+
if (u === "last") v.reverse();
|
|
845
|
+
else if (u === "prev" || u === "next") {
|
|
846
|
+
u === "prev" && v.reverse();
|
|
847
|
+
const T = v.indexOf(h.currentTarget);
|
|
848
|
+
v = l.loop ? oo(v, T + 1) : v.slice(T + 1);
|
|
842
849
|
}
|
|
843
850
|
setTimeout(() => Tt(v));
|
|
844
851
|
}
|
|
@@ -849,8 +856,8 @@ var Qr = f.forwardRef((e, t) => {
|
|
|
849
856
|
);
|
|
850
857
|
}
|
|
851
858
|
);
|
|
852
|
-
|
|
853
|
-
var
|
|
859
|
+
wt.displayName = kt;
|
|
860
|
+
var eo = {
|
|
854
861
|
ArrowLeft: "prev",
|
|
855
862
|
ArrowUp: "prev",
|
|
856
863
|
ArrowRight: "next",
|
|
@@ -860,185 +867,185 @@ var Xr = {
|
|
|
860
867
|
PageDown: "last",
|
|
861
868
|
End: "last"
|
|
862
869
|
};
|
|
863
|
-
function
|
|
870
|
+
function to(e, t) {
|
|
864
871
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
865
872
|
}
|
|
866
|
-
function
|
|
867
|
-
const a =
|
|
873
|
+
function ro(e, t, r) {
|
|
874
|
+
const a = to(e.key, r);
|
|
868
875
|
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(a)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(a)))
|
|
869
|
-
return
|
|
876
|
+
return eo[a];
|
|
870
877
|
}
|
|
871
878
|
function Tt(e, t = !1) {
|
|
872
879
|
const r = document.activeElement;
|
|
873
880
|
for (const a of e)
|
|
874
881
|
if (a === r || (a.focus({ preventScroll: t }), document.activeElement !== r)) return;
|
|
875
882
|
}
|
|
876
|
-
function
|
|
883
|
+
function oo(e, t) {
|
|
877
884
|
return e.map((r, a) => e[(t + a) % e.length]);
|
|
878
885
|
}
|
|
879
|
-
var
|
|
880
|
-
const { pressed: r, defaultPressed: a = !1, onPressedChange: n, ...
|
|
886
|
+
var ao = yt, no = wt, so = "Toggle", Nt = g.forwardRef((e, t) => {
|
|
887
|
+
const { pressed: r, defaultPressed: a = !1, onPressedChange: n, ...s } = e, [i = !1, c] = ye({
|
|
881
888
|
prop: r,
|
|
882
889
|
onChange: n,
|
|
883
890
|
defaultProp: a
|
|
884
891
|
});
|
|
885
892
|
return /* @__PURE__ */ o(
|
|
886
|
-
|
|
893
|
+
he.button,
|
|
887
894
|
{
|
|
888
895
|
type: "button",
|
|
889
|
-
"aria-pressed":
|
|
890
|
-
"data-state":
|
|
896
|
+
"aria-pressed": i,
|
|
897
|
+
"data-state": i ? "on" : "off",
|
|
891
898
|
"data-disabled": e.disabled ? "" : void 0,
|
|
892
|
-
...
|
|
899
|
+
...s,
|
|
893
900
|
ref: t,
|
|
894
|
-
onClick:
|
|
895
|
-
e.disabled || c(!
|
|
901
|
+
onClick: q(e.onClick, () => {
|
|
902
|
+
e.disabled || c(!i);
|
|
896
903
|
})
|
|
897
904
|
}
|
|
898
905
|
);
|
|
899
906
|
});
|
|
900
|
-
Nt.displayName =
|
|
901
|
-
var
|
|
902
|
-
|
|
903
|
-
]),
|
|
907
|
+
Nt.displayName = so;
|
|
908
|
+
var ee = "ToggleGroup", [Ct, fa] = Pe(ee, [
|
|
909
|
+
vt
|
|
910
|
+
]), xt = vt(), Oe = I.forwardRef((e, t) => {
|
|
904
911
|
const { type: r, ...a } = e;
|
|
905
912
|
if (r === "single")
|
|
906
|
-
return /* @__PURE__ */ o(
|
|
913
|
+
return /* @__PURE__ */ o(io, { ...a, ref: t });
|
|
907
914
|
if (r === "multiple")
|
|
908
|
-
return /* @__PURE__ */ o(
|
|
909
|
-
throw new Error(`Missing prop \`type\` expected on \`${
|
|
915
|
+
return /* @__PURE__ */ o(co, { ...a, ref: t });
|
|
916
|
+
throw new Error(`Missing prop \`type\` expected on \`${ee}\``);
|
|
910
917
|
});
|
|
911
|
-
|
|
912
|
-
var [
|
|
918
|
+
Oe.displayName = ee;
|
|
919
|
+
var [Et, It] = Ct(ee), io = I.forwardRef((e, t) => {
|
|
913
920
|
const {
|
|
914
921
|
value: r,
|
|
915
922
|
defaultValue: a,
|
|
916
923
|
onValueChange: n = () => {
|
|
917
924
|
},
|
|
918
|
-
...
|
|
919
|
-
} = e, [
|
|
925
|
+
...s
|
|
926
|
+
} = e, [i, c] = ye({
|
|
920
927
|
prop: r,
|
|
921
928
|
defaultProp: a,
|
|
922
929
|
onChange: n
|
|
923
930
|
});
|
|
924
931
|
return /* @__PURE__ */ o(
|
|
925
|
-
|
|
932
|
+
Et,
|
|
926
933
|
{
|
|
927
934
|
scope: e.__scopeToggleGroup,
|
|
928
935
|
type: "single",
|
|
929
|
-
value:
|
|
936
|
+
value: i ? [i] : [],
|
|
930
937
|
onItemActivate: c,
|
|
931
|
-
onItemDeactivate:
|
|
932
|
-
children: /* @__PURE__ */ o(
|
|
938
|
+
onItemDeactivate: I.useCallback(() => c(""), [c]),
|
|
939
|
+
children: /* @__PURE__ */ o(St, { ...s, ref: t })
|
|
933
940
|
}
|
|
934
941
|
);
|
|
935
|
-
}),
|
|
942
|
+
}), co = I.forwardRef((e, t) => {
|
|
936
943
|
const {
|
|
937
944
|
value: r,
|
|
938
945
|
defaultValue: a,
|
|
939
946
|
onValueChange: n = () => {
|
|
940
947
|
},
|
|
941
|
-
...
|
|
942
|
-
} = e, [
|
|
948
|
+
...s
|
|
949
|
+
} = e, [i = [], c] = ye({
|
|
943
950
|
prop: r,
|
|
944
951
|
defaultProp: a,
|
|
945
952
|
onChange: n
|
|
946
|
-
}),
|
|
947
|
-
(
|
|
953
|
+
}), m = I.useCallback(
|
|
954
|
+
(d) => c((f = []) => [...f, d]),
|
|
948
955
|
[c]
|
|
949
|
-
), l =
|
|
950
|
-
(
|
|
956
|
+
), l = I.useCallback(
|
|
957
|
+
(d) => c((f = []) => f.filter((p) => p !== d)),
|
|
951
958
|
[c]
|
|
952
959
|
);
|
|
953
960
|
return /* @__PURE__ */ o(
|
|
954
|
-
|
|
961
|
+
Et,
|
|
955
962
|
{
|
|
956
963
|
scope: e.__scopeToggleGroup,
|
|
957
964
|
type: "multiple",
|
|
958
|
-
value:
|
|
959
|
-
onItemActivate:
|
|
965
|
+
value: i,
|
|
966
|
+
onItemActivate: m,
|
|
960
967
|
onItemDeactivate: l,
|
|
961
|
-
children: /* @__PURE__ */ o(
|
|
968
|
+
children: /* @__PURE__ */ o(St, { ...s, ref: t })
|
|
962
969
|
}
|
|
963
970
|
);
|
|
964
971
|
});
|
|
965
|
-
|
|
966
|
-
var [
|
|
972
|
+
Oe.displayName = ee;
|
|
973
|
+
var [lo, uo] = Ct(ee), St = I.forwardRef(
|
|
967
974
|
(e, t) => {
|
|
968
975
|
const {
|
|
969
976
|
__scopeToggleGroup: r,
|
|
970
977
|
disabled: a = !1,
|
|
971
978
|
rovingFocus: n = !0,
|
|
972
|
-
orientation:
|
|
973
|
-
dir:
|
|
979
|
+
orientation: s,
|
|
980
|
+
dir: i,
|
|
974
981
|
loop: c = !0,
|
|
975
|
-
...
|
|
976
|
-
} = e, l =
|
|
977
|
-
return /* @__PURE__ */ o(
|
|
978
|
-
|
|
982
|
+
...m
|
|
983
|
+
} = e, l = xt(r), d = pt(i), f = { role: "group", dir: d, ...m };
|
|
984
|
+
return /* @__PURE__ */ o(lo, { scope: r, rovingFocus: n, disabled: a, children: n ? /* @__PURE__ */ o(
|
|
985
|
+
ao,
|
|
979
986
|
{
|
|
980
987
|
asChild: !0,
|
|
981
988
|
...l,
|
|
982
|
-
orientation:
|
|
983
|
-
dir:
|
|
989
|
+
orientation: s,
|
|
990
|
+
dir: d,
|
|
984
991
|
loop: c,
|
|
985
|
-
children: /* @__PURE__ */ o(
|
|
992
|
+
children: /* @__PURE__ */ o(he.div, { ...f, ref: t })
|
|
986
993
|
}
|
|
987
|
-
) : /* @__PURE__ */ o(
|
|
994
|
+
) : /* @__PURE__ */ o(he.div, { ...f, ref: t }) });
|
|
988
995
|
}
|
|
989
|
-
),
|
|
996
|
+
), ve = "ToggleGroupItem", _t = I.forwardRef(
|
|
990
997
|
(e, t) => {
|
|
991
|
-
const r =
|
|
998
|
+
const r = It(ve, e.__scopeToggleGroup), a = uo(ve, e.__scopeToggleGroup), n = xt(e.__scopeToggleGroup), s = r.value.includes(e.value), i = a.disabled || e.disabled, c = { ...e, pressed: s, disabled: i }, m = I.useRef(null);
|
|
992
999
|
return a.rovingFocus ? /* @__PURE__ */ o(
|
|
993
|
-
|
|
1000
|
+
no,
|
|
994
1001
|
{
|
|
995
1002
|
asChild: !0,
|
|
996
1003
|
...n,
|
|
997
|
-
focusable: !
|
|
998
|
-
active:
|
|
999
|
-
ref:
|
|
1004
|
+
focusable: !i,
|
|
1005
|
+
active: s,
|
|
1006
|
+
ref: m,
|
|
1000
1007
|
children: /* @__PURE__ */ o(Ke, { ...c, ref: t })
|
|
1001
1008
|
}
|
|
1002
1009
|
) : /* @__PURE__ */ o(Ke, { ...c, ref: t });
|
|
1003
1010
|
}
|
|
1004
1011
|
);
|
|
1005
|
-
|
|
1006
|
-
var Ke =
|
|
1012
|
+
_t.displayName = ve;
|
|
1013
|
+
var Ke = I.forwardRef(
|
|
1007
1014
|
(e, t) => {
|
|
1008
|
-
const { __scopeToggleGroup: r, value: a, ...n } = e,
|
|
1015
|
+
const { __scopeToggleGroup: r, value: a, ...n } = e, s = It(ve, r), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, c = s.type === "single" ? i : void 0;
|
|
1009
1016
|
return /* @__PURE__ */ o(
|
|
1010
1017
|
Nt,
|
|
1011
1018
|
{
|
|
1012
1019
|
...c,
|
|
1013
1020
|
...n,
|
|
1014
1021
|
ref: t,
|
|
1015
|
-
onPressedChange: (
|
|
1016
|
-
|
|
1022
|
+
onPressedChange: (m) => {
|
|
1023
|
+
m ? s.onItemActivate(a) : s.onItemDeactivate(a);
|
|
1017
1024
|
}
|
|
1018
1025
|
}
|
|
1019
1026
|
);
|
|
1020
1027
|
}
|
|
1021
|
-
),
|
|
1022
|
-
const
|
|
1028
|
+
), mo = Oe, ho = _t;
|
|
1029
|
+
const Rt = I.createContext({
|
|
1023
1030
|
size: "medium",
|
|
1024
1031
|
focusMode: "system",
|
|
1025
1032
|
mode: "system"
|
|
1026
|
-
}),
|
|
1033
|
+
}), go = ({ focusMode: e }) => w("focus:outline", "focus:outline-2", "focus:outline-offset", {
|
|
1027
1034
|
"focus:outline-focus-light": e === "light",
|
|
1028
1035
|
"focus:outline-focus-dark": e === "dark",
|
|
1029
1036
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
1030
1037
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
1031
|
-
}),
|
|
1038
|
+
}), fo = ({ mode: e }) => w({
|
|
1032
1039
|
"data-[state=on]:bg-surface-medium": e === "dark",
|
|
1033
1040
|
"data-[state=on]:bg-surface-lightest": e === "light",
|
|
1034
1041
|
"data-[state=on]:bg-surface-lightest dark:data-[state=on]:bg-surface-medium": e === "system",
|
|
1035
1042
|
"data-[state=on]:bg-surface-medium dark:data-[state=on]:bg-surface-lightest": e === "alt-system"
|
|
1036
|
-
}),
|
|
1043
|
+
}), po = ({ size: e }) => w({
|
|
1037
1044
|
"h-5 px-2": e === "small",
|
|
1038
1045
|
"h-6 px-3": e === "medium",
|
|
1039
1046
|
"h-7 px-4": e === "large"
|
|
1040
|
-
}),
|
|
1041
|
-
|
|
1047
|
+
}), bo = ({ mode: e }) => w(
|
|
1048
|
+
zr,
|
|
1042
1049
|
"px-1",
|
|
1043
1050
|
"relative",
|
|
1044
1051
|
"border-r",
|
|
@@ -1051,26 +1058,26 @@ const At = E.createContext({
|
|
|
1051
1058
|
"border-surface-light dark:border-surface-darker": e === "system",
|
|
1052
1059
|
"border-surface-darker dark:border-surface-light": e === "alt-system"
|
|
1053
1060
|
}
|
|
1054
|
-
),
|
|
1061
|
+
), vo = ({
|
|
1055
1062
|
focusMode: e,
|
|
1056
1063
|
mode: t,
|
|
1057
1064
|
size: r
|
|
1058
1065
|
}) => ({
|
|
1059
|
-
wrapperClass:
|
|
1060
|
-
itemClass:
|
|
1061
|
-
|
|
1066
|
+
wrapperClass: bo({ mode: t }),
|
|
1067
|
+
itemClass: w(
|
|
1068
|
+
Lr,
|
|
1062
1069
|
"flex items-center justify-center bg-transparent",
|
|
1063
1070
|
"rounded-sm",
|
|
1064
1071
|
"transition duration-200 ease",
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1072
|
+
po({ size: r }),
|
|
1073
|
+
go({ focusMode: e }),
|
|
1074
|
+
fo({ mode: t })
|
|
1068
1075
|
)
|
|
1069
|
-
}),
|
|
1076
|
+
}), yo = ({
|
|
1070
1077
|
mode: e,
|
|
1071
1078
|
className: t
|
|
1072
|
-
}) =>
|
|
1073
|
-
|
|
1079
|
+
}) => w(
|
|
1080
|
+
Mr,
|
|
1074
1081
|
"inline-flex p-1",
|
|
1075
1082
|
"rounded-sm",
|
|
1076
1083
|
{
|
|
@@ -1080,24 +1087,24 @@ const At = E.createContext({
|
|
|
1080
1087
|
"bg-surface-darker text-copy-lighter dark:bg-surface-light dark:text-copy-dark": e === "alt-system"
|
|
1081
1088
|
},
|
|
1082
1089
|
t
|
|
1083
|
-
),
|
|
1090
|
+
), ko = ({
|
|
1084
1091
|
children: e,
|
|
1085
1092
|
value: t,
|
|
1086
1093
|
onValueChange: r,
|
|
1087
1094
|
disabled: a,
|
|
1088
1095
|
mode: n = "system",
|
|
1089
|
-
focusMode:
|
|
1090
|
-
size:
|
|
1096
|
+
focusMode: s = "system",
|
|
1097
|
+
size: i = "medium",
|
|
1091
1098
|
defaultValue: c,
|
|
1092
|
-
className:
|
|
1099
|
+
className: m,
|
|
1093
1100
|
...l
|
|
1094
1101
|
}) => {
|
|
1095
|
-
const
|
|
1096
|
-
return /* @__PURE__ */ o(
|
|
1097
|
-
|
|
1102
|
+
const d = yo({ mode: n, className: m }), f = { size: i, focusMode: s, mode: n };
|
|
1103
|
+
return /* @__PURE__ */ o(Rt.Provider, { value: f, children: /* @__PURE__ */ o(
|
|
1104
|
+
mo,
|
|
1098
1105
|
{
|
|
1099
1106
|
disabled: a,
|
|
1100
|
-
className:
|
|
1107
|
+
className: d,
|
|
1101
1108
|
value: t,
|
|
1102
1109
|
defaultValue: c,
|
|
1103
1110
|
onValueChange: r,
|
|
@@ -1106,127 +1113,164 @@ const At = E.createContext({
|
|
|
1106
1113
|
children: e
|
|
1107
1114
|
}
|
|
1108
1115
|
) });
|
|
1109
|
-
},
|
|
1110
|
-
const { size: r, focusMode: a, mode: n } =
|
|
1116
|
+
}, wo = ({ value: e, disabled: t }) => {
|
|
1117
|
+
const { size: r, focusMode: a, mode: n } = P(Rt), { itemClass: s, wrapperClass: i } = vo({
|
|
1111
1118
|
focusMode: a,
|
|
1112
1119
|
mode: n,
|
|
1113
1120
|
size: r
|
|
1114
1121
|
});
|
|
1115
|
-
return /* @__PURE__ */ o("div", { className:
|
|
1116
|
-
|
|
1122
|
+
return /* @__PURE__ */ o("div", { className: i, children: /* @__PURE__ */ o(
|
|
1123
|
+
ho,
|
|
1117
1124
|
{
|
|
1118
1125
|
disabled: t,
|
|
1119
|
-
className:
|
|
1126
|
+
className: s,
|
|
1120
1127
|
value: e,
|
|
1121
1128
|
children: e
|
|
1122
1129
|
}
|
|
1123
1130
|
) });
|
|
1124
1131
|
};
|
|
1125
1132
|
/*!
|
|
1126
|
-
@versini/ui-panel v1.2.
|
|
1127
|
-
©
|
|
1133
|
+
@versini/ui-panel v1.2.15
|
|
1134
|
+
© 2025 gizmette.com
|
|
1128
1135
|
*/
|
|
1129
1136
|
try {
|
|
1130
1137
|
window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
|
|
1131
|
-
version: "1.2.
|
|
1132
|
-
buildTime: "
|
|
1138
|
+
version: "1.2.15",
|
|
1139
|
+
buildTime: "01/02/2025 05:13 PM EST",
|
|
1133
1140
|
homepage: "https://github.com/aversini/ui-components",
|
|
1134
1141
|
license: "MIT"
|
|
1135
1142
|
});
|
|
1136
1143
|
} catch {
|
|
1137
1144
|
}
|
|
1138
|
-
const We = "av-messagebox", Ye = "av-panel", qe = "av-button",
|
|
1145
|
+
const We = "av-messagebox", Ye = "av-panel", qe = "av-button", we = "icon", At = "button", Me = "link", To = ({
|
|
1139
1146
|
type: e,
|
|
1140
1147
|
size: t,
|
|
1141
1148
|
labelRight: r,
|
|
1142
1149
|
labelLeft: a,
|
|
1143
1150
|
align: n
|
|
1144
1151
|
}) => {
|
|
1145
|
-
const
|
|
1152
|
+
const s = "max-h-8 py-0 px-2", i = "max-h-9 py-1 px-3", c = "max-h-12 py-2 px-4";
|
|
1146
1153
|
switch (e) {
|
|
1147
|
-
case
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
[s]: t === "
|
|
1151
|
-
[
|
|
1152
|
-
});
|
|
1153
|
-
case wo:
|
|
1154
|
-
return k("text-center", {
|
|
1155
|
-
[i]: t === "small",
|
|
1156
|
-
[s]: t === "medium",
|
|
1154
|
+
case At:
|
|
1155
|
+
case Me:
|
|
1156
|
+
return w({
|
|
1157
|
+
[s]: t === "small",
|
|
1158
|
+
[i]: t === "medium",
|
|
1157
1159
|
[c]: t === "large"
|
|
1158
1160
|
});
|
|
1159
|
-
case
|
|
1160
|
-
return
|
|
1161
|
+
case we:
|
|
1162
|
+
return w("inline-flex items-center", {
|
|
1161
1163
|
"justify-center": n === "center",
|
|
1162
1164
|
"justify-start": n === "left",
|
|
1163
1165
|
"justify-end": n === "right",
|
|
1164
1166
|
"h-6 w-6 p-0": t === "small" && !(r || a),
|
|
1165
|
-
"h-6 px-2
|
|
1167
|
+
"h-6 px-2": t === "small" && (r || a),
|
|
1166
1168
|
"h-8 w-8 p-1": t === "medium" && !(r || a),
|
|
1167
|
-
"h-8 px-3
|
|
1169
|
+
"h-8 px-3": t === "medium" && (r || a),
|
|
1168
1170
|
"h-12 w-12 p-2": t === "large" && !(r || a),
|
|
1169
|
-
"h-12 px-4
|
|
1171
|
+
"h-12 px-4": t === "large" && (r || a)
|
|
1170
1172
|
});
|
|
1171
1173
|
}
|
|
1172
|
-
},
|
|
1174
|
+
}, No = ({
|
|
1175
|
+
type: e,
|
|
1176
|
+
size: t,
|
|
1177
|
+
labelRight: r,
|
|
1178
|
+
labelLeft: a
|
|
1179
|
+
}) => {
|
|
1180
|
+
const n = "text-sm font-medium", s = "text-base font-medium", i = "text-lg font-medium";
|
|
1181
|
+
switch (e) {
|
|
1182
|
+
case At:
|
|
1183
|
+
case Me:
|
|
1184
|
+
return w({
|
|
1185
|
+
"text-center": e === Me,
|
|
1186
|
+
[n]: t === "small",
|
|
1187
|
+
[s]: t === "medium",
|
|
1188
|
+
[i]: t === "large"
|
|
1189
|
+
});
|
|
1190
|
+
case we:
|
|
1191
|
+
return w({
|
|
1192
|
+
[n]: t === "small" && (r || a),
|
|
1193
|
+
[s]: t === "medium" && (r || a),
|
|
1194
|
+
[i]: t === "large" && (r || a)
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
}, Co = ({
|
|
1173
1198
|
mode: e,
|
|
1174
1199
|
noBackground: t,
|
|
1175
1200
|
noTruncate: r,
|
|
1176
|
-
variant: a
|
|
1177
|
-
radius: n
|
|
1201
|
+
variant: a
|
|
1178
1202
|
}) => {
|
|
1179
1203
|
if (t)
|
|
1180
|
-
return
|
|
1181
|
-
"rounded-full": n === "large",
|
|
1182
|
-
"rounded-md": n === "medium",
|
|
1183
|
-
"rounded-sm": n === "small"
|
|
1184
|
-
});
|
|
1204
|
+
return "not-prose";
|
|
1185
1205
|
if (a === "primary")
|
|
1186
|
-
return
|
|
1187
|
-
"rounded-full": n === "large",
|
|
1188
|
-
"rounded-md": n === "medium",
|
|
1189
|
-
"rounded-sm": n === "small",
|
|
1206
|
+
return w("not-prose", {
|
|
1190
1207
|
truncate: !r,
|
|
1191
|
-
"
|
|
1192
|
-
"
|
|
1193
|
-
"
|
|
1194
|
-
"
|
|
1208
|
+
"text-copy-light": e === "dark",
|
|
1209
|
+
"text-copy-lighter": e === "light",
|
|
1210
|
+
"text-copy-light dark:text-copy-lighter": e === "system",
|
|
1211
|
+
"text-copy-lighter dark:text-copy-light": e === "alt-system"
|
|
1195
1212
|
});
|
|
1196
1213
|
if (a === "secondary")
|
|
1197
|
-
return
|
|
1198
|
-
"rounded-full": n === "large",
|
|
1199
|
-
"rounded-md": n === "medium",
|
|
1200
|
-
"rounded-sm": n === "small",
|
|
1214
|
+
return w("not-prose", {
|
|
1201
1215
|
truncate: !r,
|
|
1202
|
-
"
|
|
1203
|
-
"
|
|
1204
|
-
"
|
|
1205
|
-
"
|
|
1216
|
+
"text-copy-light": e === "light",
|
|
1217
|
+
"text-copy-lighter": e === "dark",
|
|
1218
|
+
"text-copy-light dark:text-copy-lighter": e === "alt-system",
|
|
1219
|
+
"text-copy-lighter dark:text-copy-light": e === "system"
|
|
1206
1220
|
});
|
|
1207
1221
|
if (a === "danger")
|
|
1208
|
-
return
|
|
1209
|
-
"rounded-full": n === "large",
|
|
1210
|
-
"rounded-md": n === "medium",
|
|
1211
|
-
"rounded-sm": n === "small",
|
|
1222
|
+
return w("not-prose", {
|
|
1212
1223
|
truncate: !r,
|
|
1213
|
-
"
|
|
1214
|
-
"
|
|
1215
|
-
"
|
|
1216
|
-
"
|
|
1224
|
+
"text-copy-light": e === "dark",
|
|
1225
|
+
"text-copy-lighter": e === "light",
|
|
1226
|
+
"text-copy-light dark:text-copy-lighter": e === "system",
|
|
1227
|
+
"text-copy-lighter dark:text-copy-light": e === "alt-system"
|
|
1217
1228
|
});
|
|
1218
1229
|
if (a === "selected")
|
|
1219
|
-
return
|
|
1220
|
-
"rounded-full": n === "large",
|
|
1221
|
-
"rounded-md": n === "medium",
|
|
1222
|
-
"rounded-sm": n === "small",
|
|
1230
|
+
return w("not-prose", {
|
|
1223
1231
|
truncate: !r,
|
|
1224
|
-
"
|
|
1225
|
-
"
|
|
1226
|
-
"
|
|
1227
|
-
"
|
|
1232
|
+
"text-copy-light": e === "dark",
|
|
1233
|
+
"text-copy-lighter": e === "light",
|
|
1234
|
+
"text-copy-light dark:text-copy-lighter": e === "system",
|
|
1235
|
+
"text-copy-lighter dark:text-copy-light": e === "alt-system"
|
|
1228
1236
|
});
|
|
1229
|
-
},
|
|
1237
|
+
}, xo = ({
|
|
1238
|
+
mode: e,
|
|
1239
|
+
noBackground: t,
|
|
1240
|
+
variant: r
|
|
1241
|
+
}) => {
|
|
1242
|
+
if (!t) {
|
|
1243
|
+
if (r === "primary")
|
|
1244
|
+
return w({
|
|
1245
|
+
"bg-action-dark": e === "dark",
|
|
1246
|
+
"bg-action-light": e === "light",
|
|
1247
|
+
"bg-action-dark dark:bg-action-light": e === "system",
|
|
1248
|
+
"bg-action-light dark:bg-action-dark": e === "alt-system"
|
|
1249
|
+
});
|
|
1250
|
+
if (r === "secondary")
|
|
1251
|
+
return w({
|
|
1252
|
+
"bg-action-dark": e === "light",
|
|
1253
|
+
"bg-action-light": e === "dark",
|
|
1254
|
+
"bg-action-dark dark:bg-action-light": e === "alt-system",
|
|
1255
|
+
"bg-action-light dark:bg-action-dark": e === "system"
|
|
1256
|
+
});
|
|
1257
|
+
if (r === "danger")
|
|
1258
|
+
return w({
|
|
1259
|
+
"bg-action-danger-dark": e === "dark",
|
|
1260
|
+
"bg-action-danger-light": e === "light",
|
|
1261
|
+
"bg-action-danger-dark dark:bg-action-danger-light": e === "system",
|
|
1262
|
+
"bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
|
|
1263
|
+
});
|
|
1264
|
+
if (r === "selected")
|
|
1265
|
+
return "bg-action-selected-dark";
|
|
1266
|
+
}
|
|
1267
|
+
}, Eo = ({
|
|
1268
|
+
radius: e
|
|
1269
|
+
}) => w({
|
|
1270
|
+
"rounded-full": e === "large",
|
|
1271
|
+
"rounded-md": e === "medium",
|
|
1272
|
+
"rounded-sm": e === "small"
|
|
1273
|
+
}), Io = ({
|
|
1230
1274
|
mode: e,
|
|
1231
1275
|
disabled: t,
|
|
1232
1276
|
variant: r
|
|
@@ -1234,34 +1278,29 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko =
|
|
|
1234
1278
|
if (t)
|
|
1235
1279
|
return "";
|
|
1236
1280
|
if (r === "primary")
|
|
1237
|
-
return
|
|
1281
|
+
return w("hover:text-copy-light-hover", {
|
|
1238
1282
|
"hover:bg-action-dark-hover": e === "dark",
|
|
1239
1283
|
"hover:bg-action-light-hover": e === "light",
|
|
1240
1284
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
|
|
1241
1285
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
|
|
1242
1286
|
});
|
|
1243
1287
|
if (r === "secondary")
|
|
1244
|
-
return
|
|
1288
|
+
return w("hover:text-copy-light-hover", {
|
|
1245
1289
|
"hover:bg-action-dark-hover": e === "light",
|
|
1246
1290
|
"hover:bg-action-light-hover": e === "dark",
|
|
1247
1291
|
"hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
|
|
1248
1292
|
"hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
|
|
1249
1293
|
});
|
|
1250
1294
|
if (r === "danger")
|
|
1251
|
-
return
|
|
1295
|
+
return w("hover:text-copy-light-hover", {
|
|
1252
1296
|
"hover:bg-action-danger-dark-hover": e === "dark",
|
|
1253
1297
|
"hover:bg-action-danger-light-hover": e === "light",
|
|
1254
1298
|
"hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
|
|
1255
1299
|
"hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
|
|
1256
1300
|
});
|
|
1257
1301
|
if (r === "selected")
|
|
1258
|
-
return
|
|
1259
|
-
|
|
1260
|
-
"hover:bg-action-selected-light-hover": e === "light",
|
|
1261
|
-
"hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
|
|
1262
|
-
"hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
|
|
1263
|
-
});
|
|
1264
|
-
}, xo = ({
|
|
1302
|
+
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
1303
|
+
}, So = ({
|
|
1265
1304
|
mode: e,
|
|
1266
1305
|
disabled: t,
|
|
1267
1306
|
variant: r
|
|
@@ -1269,34 +1308,29 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko =
|
|
|
1269
1308
|
if (t)
|
|
1270
1309
|
return "";
|
|
1271
1310
|
if (r === "primary")
|
|
1272
|
-
return
|
|
1311
|
+
return w("active:text-copy-light-active", {
|
|
1273
1312
|
"active:bg-action-dark-active": e === "dark",
|
|
1274
1313
|
"active:bg-action-light-active": e === "light",
|
|
1275
1314
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
|
|
1276
1315
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
|
|
1277
1316
|
});
|
|
1278
1317
|
if (r === "secondary")
|
|
1279
|
-
return
|
|
1318
|
+
return w("active:text-copy-light-active", {
|
|
1280
1319
|
"active:bg-action-dark-active": e === "light",
|
|
1281
1320
|
"active:bg-action-light-active": e === "dark",
|
|
1282
1321
|
"active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
|
|
1283
1322
|
"active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
|
|
1284
1323
|
});
|
|
1285
1324
|
if (r === "danger")
|
|
1286
|
-
return
|
|
1325
|
+
return w("active:text-copy-lighter-active", {
|
|
1287
1326
|
"active:bg-action-danger-dark-active": e === "dark",
|
|
1288
1327
|
"active:bg-action-danger-light-active": e === "light",
|
|
1289
1328
|
"active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
|
|
1290
1329
|
"active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
|
|
1291
1330
|
});
|
|
1292
1331
|
if (r === "selected")
|
|
1293
|
-
return
|
|
1294
|
-
|
|
1295
|
-
"active:bg-action-selected-light-active": e === "light",
|
|
1296
|
-
"active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
|
|
1297
|
-
"active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
|
|
1298
|
-
});
|
|
1299
|
-
}, Eo = ({
|
|
1332
|
+
return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
|
|
1333
|
+
}, _o = ({
|
|
1300
1334
|
mode: e,
|
|
1301
1335
|
noBorder: t,
|
|
1302
1336
|
variant: r
|
|
@@ -1304,36 +1338,31 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko =
|
|
|
1304
1338
|
if (t)
|
|
1305
1339
|
return "border border-transparent";
|
|
1306
1340
|
if (r === "primary")
|
|
1307
|
-
return
|
|
1341
|
+
return w("border", {
|
|
1308
1342
|
"border-border-dark": e === "dark",
|
|
1309
1343
|
"border-border-accent": e === "light",
|
|
1310
1344
|
"border-border-dark dark:border-border-accent": e === "system",
|
|
1311
1345
|
"border-border-accent dark:border-border-dark": e === "alt-system"
|
|
1312
1346
|
});
|
|
1313
1347
|
if (r === "secondary")
|
|
1314
|
-
return
|
|
1348
|
+
return w("border", {
|
|
1315
1349
|
"border-border-dark": e === "light",
|
|
1316
1350
|
"border-border-accent": e === "dark",
|
|
1317
1351
|
"border-border-dark dark:border-border-accent": e === "alt-system",
|
|
1318
1352
|
"border-border-accent dark:border-border-dark": e === "system"
|
|
1319
1353
|
});
|
|
1320
1354
|
if (r === "danger")
|
|
1321
|
-
return
|
|
1355
|
+
return w("border", {
|
|
1322
1356
|
"border-border-danger-dark": e === "dark",
|
|
1323
1357
|
"border-border-danger-medium": e === "light",
|
|
1324
1358
|
"border-border-danger-dark dark:border-border-danger-medium": e === "system",
|
|
1325
1359
|
"border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
|
|
1326
1360
|
});
|
|
1327
1361
|
if (r === "selected")
|
|
1328
|
-
return
|
|
1329
|
-
|
|
1330
|
-
"border-border-selected-medium": e === "light",
|
|
1331
|
-
"border-border-selected-dark dark:border-border-selected-medium": e === "system",
|
|
1332
|
-
"border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
|
|
1333
|
-
});
|
|
1334
|
-
}, Io = ({
|
|
1362
|
+
return "border border-border-selected-dark";
|
|
1363
|
+
}, Ro = ({
|
|
1335
1364
|
focusMode: e
|
|
1336
|
-
}) =>
|
|
1365
|
+
}) => w("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
1337
1366
|
"focus:outline-focus-dark": e === "dark",
|
|
1338
1367
|
"focus:outline-focus-light": e === "light",
|
|
1339
1368
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
@@ -1344,114 +1373,118 @@ const We = "av-messagebox", Ye = "av-panel", qe = "av-button", Be = "icon", ko =
|
|
|
1344
1373
|
raw: r,
|
|
1345
1374
|
mode: a,
|
|
1346
1375
|
focusMode: n,
|
|
1347
|
-
disabled:
|
|
1348
|
-
fullWidth:
|
|
1376
|
+
disabled: s,
|
|
1377
|
+
fullWidth: i,
|
|
1349
1378
|
size: c,
|
|
1350
|
-
noBorder:
|
|
1379
|
+
noBorder: m,
|
|
1351
1380
|
labelRight: l,
|
|
1352
|
-
labelLeft:
|
|
1353
|
-
noBackground:
|
|
1354
|
-
variant:
|
|
1355
|
-
noTruncate:
|
|
1356
|
-
align:
|
|
1357
|
-
radius:
|
|
1358
|
-
}) => (
|
|
1381
|
+
labelLeft: d,
|
|
1382
|
+
noBackground: f,
|
|
1383
|
+
variant: p,
|
|
1384
|
+
noTruncate: b,
|
|
1385
|
+
align: h,
|
|
1386
|
+
radius: u
|
|
1387
|
+
}) => (p || (p = "primary"), r ? w(qe, t) : w(
|
|
1359
1388
|
qe,
|
|
1360
|
-
|
|
1389
|
+
Co({
|
|
1361
1390
|
mode: a,
|
|
1362
|
-
variant:
|
|
1363
|
-
noBackground:
|
|
1364
|
-
noTruncate:
|
|
1365
|
-
radius: d
|
|
1391
|
+
variant: p,
|
|
1392
|
+
noBackground: f,
|
|
1393
|
+
noTruncate: b
|
|
1366
1394
|
}),
|
|
1367
|
-
|
|
1395
|
+
xo({ mode: a, noBackground: f, variant: p }),
|
|
1396
|
+
Eo({ radius: u }),
|
|
1397
|
+
To({
|
|
1368
1398
|
type: e,
|
|
1369
1399
|
size: c,
|
|
1370
1400
|
labelRight: l,
|
|
1371
|
-
labelLeft:
|
|
1372
|
-
align:
|
|
1401
|
+
labelLeft: d,
|
|
1402
|
+
align: h
|
|
1373
1403
|
}),
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1404
|
+
No({ type: e, size: c, labelRight: l, labelLeft: d }),
|
|
1405
|
+
_o({ mode: a, variant: p, noBorder: m }),
|
|
1406
|
+
Ro({ focusMode: n }),
|
|
1407
|
+
Io({ mode: a, variant: p, disabled: s }),
|
|
1408
|
+
So({ mode: a, variant: p, disabled: s }),
|
|
1378
1409
|
{
|
|
1379
|
-
"w-full":
|
|
1380
|
-
"disabled:cursor-not-allowed disabled:opacity-50":
|
|
1410
|
+
"w-full": i,
|
|
1411
|
+
"disabled:cursor-not-allowed disabled:opacity-50": s
|
|
1381
1412
|
},
|
|
1382
1413
|
t
|
|
1383
|
-
)),
|
|
1414
|
+
)), Ao = (e, t, r) => {
|
|
1384
1415
|
var a;
|
|
1385
1416
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
1386
|
-
},
|
|
1417
|
+
}, $e = I.forwardRef((e, t) => {
|
|
1387
1418
|
const { onClick: r, noInternalClick: a = !1, ...n } = e;
|
|
1388
1419
|
return /* @__PURE__ */ o(
|
|
1389
1420
|
"button",
|
|
1390
1421
|
{
|
|
1391
1422
|
ref: t,
|
|
1392
|
-
onClick: (
|
|
1393
|
-
|
|
1423
|
+
onClick: (s) => {
|
|
1424
|
+
Ao(s, a, r);
|
|
1394
1425
|
},
|
|
1395
1426
|
...n
|
|
1396
1427
|
}
|
|
1397
1428
|
);
|
|
1398
1429
|
});
|
|
1399
|
-
|
|
1400
|
-
const zt =
|
|
1430
|
+
$e.displayName = "BaseButton";
|
|
1431
|
+
const zt = I.forwardRef(
|
|
1401
1432
|
({
|
|
1402
1433
|
children: e,
|
|
1403
1434
|
disabled: t = !1,
|
|
1404
1435
|
mode: r = "system",
|
|
1405
1436
|
focusMode: a = "system",
|
|
1406
1437
|
fullWidth: n = !1,
|
|
1407
|
-
className:
|
|
1408
|
-
type:
|
|
1438
|
+
className: s,
|
|
1439
|
+
type: i = "button",
|
|
1409
1440
|
raw: c = !1,
|
|
1410
|
-
noBorder:
|
|
1441
|
+
noBorder: m = !1,
|
|
1411
1442
|
"aria-label": l,
|
|
1412
|
-
label:
|
|
1413
|
-
size:
|
|
1414
|
-
labelRight:
|
|
1415
|
-
labelLeft:
|
|
1416
|
-
noBackground:
|
|
1417
|
-
align:
|
|
1443
|
+
label: d,
|
|
1444
|
+
size: f = "medium",
|
|
1445
|
+
labelRight: p,
|
|
1446
|
+
labelLeft: b,
|
|
1447
|
+
noBackground: h = !1,
|
|
1448
|
+
align: u = "center",
|
|
1418
1449
|
radius: v = "large",
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1450
|
+
variant: T = "primary",
|
|
1451
|
+
...N
|
|
1452
|
+
}, y) => {
|
|
1453
|
+
const x = Mt({
|
|
1454
|
+
type: we,
|
|
1423
1455
|
mode: r,
|
|
1424
1456
|
focusMode: a,
|
|
1425
1457
|
fullWidth: n,
|
|
1426
1458
|
disabled: t,
|
|
1427
1459
|
raw: c,
|
|
1428
|
-
className:
|
|
1429
|
-
noBorder:
|
|
1430
|
-
size:
|
|
1431
|
-
labelRight:
|
|
1432
|
-
labelLeft:
|
|
1433
|
-
noBackground:
|
|
1434
|
-
align:
|
|
1435
|
-
radius: v
|
|
1436
|
-
|
|
1460
|
+
className: s,
|
|
1461
|
+
noBorder: m,
|
|
1462
|
+
size: f,
|
|
1463
|
+
labelRight: p,
|
|
1464
|
+
labelLeft: b,
|
|
1465
|
+
noBackground: h,
|
|
1466
|
+
align: u,
|
|
1467
|
+
radius: v,
|
|
1468
|
+
variant: T
|
|
1469
|
+
}), _ = w({
|
|
1437
1470
|
"text-copy-accent-dark": r === "light" && !c,
|
|
1438
1471
|
"text-copy-light": r === "dark" && !c,
|
|
1439
1472
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !c,
|
|
1440
1473
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !c
|
|
1441
1474
|
});
|
|
1442
|
-
return /* @__PURE__ */
|
|
1443
|
-
|
|
1475
|
+
return /* @__PURE__ */ k(
|
|
1476
|
+
$e,
|
|
1444
1477
|
{
|
|
1445
|
-
ref:
|
|
1446
|
-
className:
|
|
1478
|
+
ref: y,
|
|
1479
|
+
className: x,
|
|
1447
1480
|
disabled: t,
|
|
1448
|
-
type:
|
|
1449
|
-
"aria-label": l ||
|
|
1450
|
-
...
|
|
1481
|
+
type: i,
|
|
1482
|
+
"aria-label": l || d,
|
|
1483
|
+
...N,
|
|
1451
1484
|
children: [
|
|
1452
|
-
|
|
1453
|
-
/* @__PURE__ */ o("div", { className:
|
|
1454
|
-
|
|
1485
|
+
b && /* @__PURE__ */ o("span", { className: "pr-2", children: b }),
|
|
1486
|
+
/* @__PURE__ */ o("div", { className: _, children: e }),
|
|
1487
|
+
p && /* @__PURE__ */ o("span", { className: "pl-2", children: p })
|
|
1455
1488
|
]
|
|
1456
1489
|
}
|
|
1457
1490
|
);
|
|
@@ -1459,61 +1492,61 @@ const zt = E.forwardRef(
|
|
|
1459
1492
|
);
|
|
1460
1493
|
zt.displayName = "ButtonIcon";
|
|
1461
1494
|
/*!
|
|
1462
|
-
@versini/ui-button v3.2.
|
|
1463
|
-
©
|
|
1495
|
+
@versini/ui-button v3.2.2
|
|
1496
|
+
© 2025 gizmette.com
|
|
1464
1497
|
*/
|
|
1465
1498
|
try {
|
|
1466
1499
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
1467
|
-
version: "3.2.
|
|
1468
|
-
buildTime: "
|
|
1500
|
+
version: "3.2.2",
|
|
1501
|
+
buildTime: "01/02/2025 05:13 PM EST",
|
|
1469
1502
|
homepage: "https://github.com/aversini/ui-components",
|
|
1470
1503
|
license: "MIT"
|
|
1471
1504
|
});
|
|
1472
1505
|
} catch {
|
|
1473
1506
|
}
|
|
1474
|
-
const
|
|
1507
|
+
const Mo = I.forwardRef(
|
|
1475
1508
|
({
|
|
1476
1509
|
children: e,
|
|
1477
1510
|
disabled: t = !1,
|
|
1478
1511
|
mode: r = "system",
|
|
1479
1512
|
focusMode: a = "system",
|
|
1480
1513
|
fullWidth: n = !1,
|
|
1481
|
-
className:
|
|
1482
|
-
type:
|
|
1514
|
+
className: s,
|
|
1515
|
+
type: i = "button",
|
|
1483
1516
|
raw: c = !1,
|
|
1484
|
-
noBorder:
|
|
1517
|
+
noBorder: m = !1,
|
|
1485
1518
|
"aria-label": l,
|
|
1486
|
-
label:
|
|
1487
|
-
size:
|
|
1488
|
-
labelRight:
|
|
1489
|
-
labelLeft:
|
|
1490
|
-
noBackground:
|
|
1491
|
-
align:
|
|
1519
|
+
label: d,
|
|
1520
|
+
size: f = "medium",
|
|
1521
|
+
labelRight: p,
|
|
1522
|
+
labelLeft: b,
|
|
1523
|
+
noBackground: h = !1,
|
|
1524
|
+
align: u = "center",
|
|
1492
1525
|
active: v = !1,
|
|
1493
|
-
radius:
|
|
1494
|
-
...
|
|
1495
|
-
},
|
|
1496
|
-
const
|
|
1497
|
-
type:
|
|
1526
|
+
radius: T = "large",
|
|
1527
|
+
...N
|
|
1528
|
+
}, y) => {
|
|
1529
|
+
const x = Mt({
|
|
1530
|
+
type: we,
|
|
1498
1531
|
mode: r,
|
|
1499
1532
|
focusMode: a,
|
|
1500
1533
|
fullWidth: n,
|
|
1501
1534
|
disabled: t,
|
|
1502
1535
|
raw: c,
|
|
1503
|
-
className:
|
|
1504
|
-
noBorder:
|
|
1505
|
-
size:
|
|
1506
|
-
labelRight:
|
|
1507
|
-
labelLeft:
|
|
1508
|
-
noBackground:
|
|
1509
|
-
align:
|
|
1510
|
-
radius:
|
|
1511
|
-
}),
|
|
1536
|
+
className: s,
|
|
1537
|
+
noBorder: m,
|
|
1538
|
+
size: f,
|
|
1539
|
+
labelRight: p,
|
|
1540
|
+
labelLeft: b,
|
|
1541
|
+
noBackground: h,
|
|
1542
|
+
align: u,
|
|
1543
|
+
radius: T
|
|
1544
|
+
}), _ = w({
|
|
1512
1545
|
"text-copy-accent-dark": r === "light" && !c,
|
|
1513
1546
|
"text-copy-light": r === "dark" && !c,
|
|
1514
1547
|
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !c,
|
|
1515
1548
|
"text-copy-light dark:text-copy-accent-dark": r === "system" && !c
|
|
1516
|
-
}),
|
|
1549
|
+
}), B = v ? w(
|
|
1517
1550
|
"relative",
|
|
1518
1551
|
"focus-within:static",
|
|
1519
1552
|
"focus-within:after:border-transparent",
|
|
@@ -1530,38 +1563,38 @@ const _o = E.forwardRef(
|
|
|
1530
1563
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
1531
1564
|
}
|
|
1532
1565
|
) : "";
|
|
1533
|
-
return /* @__PURE__ */ o("div", { className:
|
|
1534
|
-
|
|
1566
|
+
return /* @__PURE__ */ o("div", { className: B, children: /* @__PURE__ */ k(
|
|
1567
|
+
$e,
|
|
1535
1568
|
{
|
|
1536
|
-
ref:
|
|
1537
|
-
className:
|
|
1569
|
+
ref: y,
|
|
1570
|
+
className: x,
|
|
1538
1571
|
disabled: t,
|
|
1539
|
-
type:
|
|
1540
|
-
"aria-label": l ||
|
|
1541
|
-
...
|
|
1572
|
+
type: i,
|
|
1573
|
+
"aria-label": l || d,
|
|
1574
|
+
...N,
|
|
1542
1575
|
children: [
|
|
1543
|
-
|
|
1544
|
-
/* @__PURE__ */ o("div", { className:
|
|
1545
|
-
|
|
1576
|
+
b && /* @__PURE__ */ o("span", { className: "pr-2", children: b }),
|
|
1577
|
+
/* @__PURE__ */ o("div", { className: _, children: e }),
|
|
1578
|
+
p && /* @__PURE__ */ o("span", { className: "pl-2", children: p })
|
|
1546
1579
|
]
|
|
1547
1580
|
}
|
|
1548
1581
|
) });
|
|
1549
1582
|
}
|
|
1550
1583
|
);
|
|
1551
|
-
|
|
1552
|
-
const
|
|
1584
|
+
Mo.displayName = "ButtonSort";
|
|
1585
|
+
const zo = ({
|
|
1553
1586
|
children: e,
|
|
1554
1587
|
fill: t,
|
|
1555
1588
|
viewBox: r,
|
|
1556
1589
|
className: a,
|
|
1557
1590
|
defaultViewBox: n,
|
|
1558
|
-
size:
|
|
1559
|
-
title:
|
|
1591
|
+
size: s,
|
|
1592
|
+
title: i,
|
|
1560
1593
|
semantic: c = !1,
|
|
1561
|
-
...
|
|
1594
|
+
...m
|
|
1562
1595
|
}) => {
|
|
1563
|
-
const l =
|
|
1564
|
-
return /* @__PURE__ */
|
|
1596
|
+
const l = w(s, a);
|
|
1597
|
+
return /* @__PURE__ */ k(M, { children: [
|
|
1565
1598
|
/* @__PURE__ */ o(
|
|
1566
1599
|
"svg",
|
|
1567
1600
|
{
|
|
@@ -1572,34 +1605,34 @@ const Ro = ({
|
|
|
1572
1605
|
role: "img",
|
|
1573
1606
|
"aria-hidden": !c,
|
|
1574
1607
|
focusable: !1,
|
|
1575
|
-
...
|
|
1608
|
+
...m,
|
|
1576
1609
|
children: e
|
|
1577
1610
|
}
|
|
1578
1611
|
),
|
|
1579
|
-
|
|
1612
|
+
i && c && /* @__PURE__ */ o("span", { className: "sr-only", children: i })
|
|
1580
1613
|
] });
|
|
1581
1614
|
};
|
|
1582
1615
|
/*!
|
|
1583
|
-
@versini/ui-svgicon v3.0.
|
|
1584
|
-
©
|
|
1616
|
+
@versini/ui-svgicon v3.0.3
|
|
1617
|
+
© 2025 gizmette.com
|
|
1585
1618
|
*/
|
|
1586
1619
|
try {
|
|
1587
1620
|
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
1588
|
-
version: "3.0.
|
|
1589
|
-
buildTime: "
|
|
1621
|
+
version: "3.0.3",
|
|
1622
|
+
buildTime: "01/02/2025 05:13 PM EST",
|
|
1590
1623
|
homepage: "https://github.com/aversini/ui-components",
|
|
1591
1624
|
license: "MIT"
|
|
1592
1625
|
});
|
|
1593
1626
|
} catch {
|
|
1594
1627
|
}
|
|
1595
|
-
const
|
|
1628
|
+
const Lo = ({
|
|
1596
1629
|
className: e,
|
|
1597
1630
|
viewBox: t,
|
|
1598
1631
|
title: r,
|
|
1599
1632
|
monotone: a,
|
|
1600
1633
|
...n
|
|
1601
1634
|
}) => /* @__PURE__ */ o(
|
|
1602
|
-
|
|
1635
|
+
zo,
|
|
1603
1636
|
{
|
|
1604
1637
|
defaultViewBox: "0 0 384 512",
|
|
1605
1638
|
size: "size-5",
|
|
@@ -1611,142 +1644,142 @@ const Ao = ({
|
|
|
1611
1644
|
}
|
|
1612
1645
|
);
|
|
1613
1646
|
/*!
|
|
1614
|
-
@versini/ui-icons v3.
|
|
1615
|
-
©
|
|
1647
|
+
@versini/ui-icons v3.1.1
|
|
1648
|
+
© 2025 gizmette.com
|
|
1616
1649
|
*/
|
|
1617
1650
|
try {
|
|
1618
1651
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
1619
|
-
version: "3.
|
|
1620
|
-
buildTime: "
|
|
1652
|
+
version: "3.1.1",
|
|
1653
|
+
buildTime: "01/02/2025 05:13 PM EST",
|
|
1621
1654
|
homepage: "https://github.com/aversini/ui-components",
|
|
1622
1655
|
license: "MIT"
|
|
1623
1656
|
});
|
|
1624
1657
|
} catch {
|
|
1625
1658
|
}
|
|
1626
|
-
const Lt =
|
|
1627
|
-
function
|
|
1659
|
+
const Lt = g.createContext(null);
|
|
1660
|
+
function Po({
|
|
1628
1661
|
initialOpen: e = !1,
|
|
1629
1662
|
open: t,
|
|
1630
1663
|
onOpenChange: r
|
|
1631
1664
|
} = {}) {
|
|
1632
|
-
const [a, n] =
|
|
1665
|
+
const [a, n] = g.useState(e), [s, i] = g.useState(), [c, m] = g.useState(), l = t ?? a, d = r ?? n, f = nt({
|
|
1633
1666
|
open: l,
|
|
1634
|
-
onOpenChange:
|
|
1635
|
-
}),
|
|
1667
|
+
onOpenChange: d
|
|
1668
|
+
}), p = f.context, b = st(p, {
|
|
1636
1669
|
enabled: t == null
|
|
1637
|
-
}),
|
|
1670
|
+
}), h = ct(p, {
|
|
1638
1671
|
outsidePress: !1,
|
|
1639
1672
|
outsidePressEvent: "mousedown"
|
|
1640
|
-
}),
|
|
1641
|
-
return
|
|
1673
|
+
}), u = it(p), v = lt([b, h, u]);
|
|
1674
|
+
return g.useMemo(
|
|
1642
1675
|
() => ({
|
|
1643
1676
|
open: l,
|
|
1644
|
-
setOpen:
|
|
1677
|
+
setOpen: d,
|
|
1645
1678
|
...v,
|
|
1646
|
-
...
|
|
1647
|
-
labelId:
|
|
1679
|
+
...f,
|
|
1680
|
+
labelId: s,
|
|
1648
1681
|
descriptionId: c,
|
|
1649
|
-
setLabelId:
|
|
1650
|
-
setDescriptionId:
|
|
1682
|
+
setLabelId: i,
|
|
1683
|
+
setDescriptionId: m
|
|
1651
1684
|
}),
|
|
1652
|
-
[l,
|
|
1685
|
+
[l, d, v, f, s, c]
|
|
1653
1686
|
);
|
|
1654
1687
|
}
|
|
1655
|
-
const
|
|
1656
|
-
const e =
|
|
1688
|
+
const Te = () => {
|
|
1689
|
+
const e = g.useContext(Lt);
|
|
1657
1690
|
if (e == null)
|
|
1658
1691
|
throw new Error("Modal components must be wrapped in <Modal />");
|
|
1659
1692
|
return e;
|
|
1660
1693
|
};
|
|
1661
|
-
function
|
|
1694
|
+
function Bo({
|
|
1662
1695
|
children: e,
|
|
1663
1696
|
...t
|
|
1664
1697
|
}) {
|
|
1665
|
-
const r =
|
|
1698
|
+
const r = Po(t);
|
|
1666
1699
|
return /* @__PURE__ */ o(Lt.Provider, { value: r, children: e });
|
|
1667
1700
|
}
|
|
1668
|
-
const
|
|
1669
|
-
const { context: r, ...a } =
|
|
1701
|
+
const Oo = g.forwardRef(function(e, t) {
|
|
1702
|
+
const { context: r, ...a } = Te(), n = Le([a.refs.setFloating, t]);
|
|
1670
1703
|
if (!r.open)
|
|
1671
1704
|
return null;
|
|
1672
|
-
const { overlayBackground:
|
|
1673
|
-
[`${
|
|
1674
|
-
"bg-black sm:bg-black/[.8]": !
|
|
1705
|
+
const { overlayBackground: s, ...i } = e, c = w("grid place-items-center", {
|
|
1706
|
+
[`${s}`]: s,
|
|
1707
|
+
"bg-black sm:bg-black/[.8]": !s
|
|
1675
1708
|
});
|
|
1676
|
-
return /* @__PURE__ */ o(
|
|
1709
|
+
return /* @__PURE__ */ o(dt, { children: /* @__PURE__ */ o(wr, { className: c, lockScroll: !0, children: /* @__PURE__ */ o(ut, { context: r, children: /* @__PURE__ */ o(
|
|
1677
1710
|
"div",
|
|
1678
1711
|
{
|
|
1679
1712
|
ref: n,
|
|
1680
1713
|
"aria-labelledby": a.labelId,
|
|
1681
1714
|
"aria-describedby": a.descriptionId,
|
|
1682
|
-
...a.getFloatingProps(
|
|
1683
|
-
children:
|
|
1715
|
+
...a.getFloatingProps(i),
|
|
1716
|
+
children: i.children
|
|
1684
1717
|
}
|
|
1685
1718
|
) }) }) });
|
|
1686
|
-
}),
|
|
1687
|
-
const { setLabelId: a } =
|
|
1688
|
-
return
|
|
1689
|
-
}),
|
|
1690
|
-
const { setDescriptionId: a } =
|
|
1691
|
-
return
|
|
1692
|
-
}),
|
|
1693
|
-
const { setOpen: r } =
|
|
1694
|
-
return /* @__PURE__ */ o("div", { className: n, children:
|
|
1719
|
+
}), $o = g.forwardRef(function({ children: e, ...t }, r) {
|
|
1720
|
+
const { setLabelId: a } = Te(), n = ze();
|
|
1721
|
+
return g.useLayoutEffect(() => (a(n), () => a(void 0)), [n, a]), /* @__PURE__ */ o("h1", { ...t, ref: r, id: n, children: e });
|
|
1722
|
+
}), Do = g.forwardRef(function({ children: e, ...t }, r) {
|
|
1723
|
+
const { setDescriptionId: a } = Te(), n = ze();
|
|
1724
|
+
return g.useLayoutEffect(() => (a(n), () => a(void 0)), [n, a]), /* @__PURE__ */ o("div", { ...t, ref: r, id: n, children: e });
|
|
1725
|
+
}), Vo = g.forwardRef(function(e, t) {
|
|
1726
|
+
const { setOpen: r } = Te(), { trigger: a, className: n, ...s } = e, i = g.useCallback(() => r(!1), [r]);
|
|
1727
|
+
return /* @__PURE__ */ o("div", { className: n, children: g.cloneElement(a, {
|
|
1695
1728
|
ref: t,
|
|
1696
|
-
onClick:
|
|
1697
|
-
...
|
|
1729
|
+
onClick: i,
|
|
1730
|
+
...s
|
|
1698
1731
|
}) });
|
|
1699
1732
|
});
|
|
1700
1733
|
/*!
|
|
1701
|
-
@versini/ui-modal v1.1.
|
|
1702
|
-
©
|
|
1734
|
+
@versini/ui-modal v1.1.8
|
|
1735
|
+
© 2025 gizmette.com
|
|
1703
1736
|
*/
|
|
1704
1737
|
try {
|
|
1705
1738
|
window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
|
|
1706
|
-
version: "1.1.
|
|
1707
|
-
buildTime: "
|
|
1739
|
+
version: "1.1.8",
|
|
1740
|
+
buildTime: "01/02/2025 05:13 PM EST",
|
|
1708
1741
|
homepage: "https://github.com/aversini/ui-components",
|
|
1709
1742
|
license: "MIT"
|
|
1710
1743
|
});
|
|
1711
1744
|
} catch {
|
|
1712
1745
|
}
|
|
1713
|
-
const
|
|
1746
|
+
const se = "panel", fe = "messagebox", Fo = ({
|
|
1714
1747
|
className: e,
|
|
1715
1748
|
kind: t,
|
|
1716
1749
|
borderMode: r
|
|
1717
1750
|
}) => ({
|
|
1718
|
-
main:
|
|
1719
|
-
[`${Ye} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t ===
|
|
1720
|
-
[`${Ye} w-full sm:w-[95%] md:max-w-2xl`]: t ===
|
|
1721
|
-
[`${We} rounded-lg border-2`]: t ===
|
|
1722
|
-
[`${We} w-[95%] sm:w-[50%] md:max-w-2xl`]: t ===
|
|
1751
|
+
main: w("prose prose-lighter flex flex-col bg-surface-medium", {
|
|
1752
|
+
[`${Ye} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: t === se,
|
|
1753
|
+
[`${Ye} w-full sm:w-[95%] md:max-w-2xl`]: t === se && !e,
|
|
1754
|
+
[`${We} rounded-lg border-2`]: t === fe,
|
|
1755
|
+
[`${We} w-[95%] sm:w-[50%] md:max-w-2xl`]: t === fe && !e,
|
|
1723
1756
|
[`${e}`]: !!e,
|
|
1724
|
-
"sm:border-border-dark": r === "dark" && t ===
|
|
1725
|
-
"sm:border-border-accent": r === "light" && t ===
|
|
1726
|
-
"border-border-dark": r === "dark" && t ===
|
|
1727
|
-
"border-border-accent": r === "light" && t ===
|
|
1757
|
+
"sm:border-border-dark": r === "dark" && t === se,
|
|
1758
|
+
"sm:border-border-accent": r === "light" && t === se,
|
|
1759
|
+
"border-border-dark": r === "dark" && t === fe,
|
|
1760
|
+
"border-border-accent": r === "light" && t === fe
|
|
1728
1761
|
}),
|
|
1729
1762
|
content: "flex flex-col py-2 sm:py-4 sm:px-4 px-2 overflow-y-auto",
|
|
1730
1763
|
footer: "flex flex-grow flex-col sm:p-4 p-2",
|
|
1731
1764
|
header: "sm:p-4 mb-0 p-2",
|
|
1732
1765
|
close: "sm:p-4 p-2"
|
|
1733
|
-
}),
|
|
1766
|
+
}), te = ({
|
|
1734
1767
|
open: e,
|
|
1735
1768
|
onOpenChange: t,
|
|
1736
1769
|
title: r,
|
|
1737
1770
|
children: a,
|
|
1738
1771
|
footer: n,
|
|
1739
|
-
borderMode:
|
|
1740
|
-
kind:
|
|
1772
|
+
borderMode: s = "light",
|
|
1773
|
+
kind: i = se,
|
|
1741
1774
|
className: c
|
|
1742
1775
|
}) => {
|
|
1743
|
-
const
|
|
1744
|
-
return G(() => (e && (
|
|
1745
|
-
e && (document.title =
|
|
1746
|
-
}), [r, e]), /* @__PURE__ */ o(
|
|
1747
|
-
/* @__PURE__ */
|
|
1776
|
+
const m = J(""), l = Fo({ className: c, kind: i, borderMode: s });
|
|
1777
|
+
return G(() => (e && (m.current = document.title, document.title = `${r} | ${m.current}`), () => {
|
|
1778
|
+
e && (document.title = m.current);
|
|
1779
|
+
}), [r, e]), /* @__PURE__ */ o(M, { children: e && /* @__PURE__ */ o(Bo, { open: e, onOpenChange: t, children: /* @__PURE__ */ k(Oo, { className: l.main, children: [
|
|
1780
|
+
/* @__PURE__ */ k("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
1748
1781
|
/* @__PURE__ */ o(
|
|
1749
|
-
|
|
1782
|
+
Vo,
|
|
1750
1783
|
{
|
|
1751
1784
|
className: l.close,
|
|
1752
1785
|
trigger: /* @__PURE__ */ o(
|
|
@@ -1756,118 +1789,49 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
1756
1789
|
focusMode: "light",
|
|
1757
1790
|
noBorder: !0,
|
|
1758
1791
|
label: "Close",
|
|
1759
|
-
children: /* @__PURE__ */ o(
|
|
1792
|
+
children: /* @__PURE__ */ o(Lo, {})
|
|
1760
1793
|
}
|
|
1761
1794
|
)
|
|
1762
1795
|
}
|
|
1763
1796
|
),
|
|
1764
|
-
/* @__PURE__ */ o(
|
|
1797
|
+
/* @__PURE__ */ o($o, { className: l.header, children: r })
|
|
1765
1798
|
] }),
|
|
1766
|
-
/* @__PURE__ */ o(
|
|
1799
|
+
/* @__PURE__ */ o(Do, { className: l.content, children: a }),
|
|
1767
1800
|
n && /* @__PURE__ */ o("div", { className: l.footer, children: n })
|
|
1768
1801
|
] }) }) });
|
|
1769
|
-
},
|
|
1770
|
-
const t = (e == null ? void 0 : e.plugins) || [], r = (e == null ? void 0 : e.version) || "", a = (e == null ? void 0 : e.models) || [], n =
|
|
1771
|
-
return /* @__PURE__ */
|
|
1802
|
+
}, Ho = ({ stats: e }) => {
|
|
1803
|
+
const t = (e == null ? void 0 : e.plugins) || [], r = (e == null ? void 0 : e.version) || "", a = (e == null ? void 0 : e.models) || [], n = de(), s = de();
|
|
1804
|
+
return /* @__PURE__ */ k(M, { children: [
|
|
1772
1805
|
/* @__PURE__ */ o("div", { className: "mb-4", children: /* @__PURE__ */ o(
|
|
1773
|
-
|
|
1806
|
+
L,
|
|
1774
1807
|
{
|
|
1775
|
-
header:
|
|
1808
|
+
header: E.ABOUT.TITLE_CLIENT,
|
|
1776
1809
|
className: "prose-dark dark:prose-lighter",
|
|
1777
|
-
children:
|
|
1778
|
-
[
|
|
1779
|
-
[
|
|
1810
|
+
children: ce(n, {
|
|
1811
|
+
[E.ABOUT.VERSION]: "5.18.1",
|
|
1812
|
+
[E.ABOUT.BUILD_TIMESTAMP]: "01/02/2025 06:07 PM EST"
|
|
1780
1813
|
})
|
|
1781
1814
|
}
|
|
1782
1815
|
) }),
|
|
1783
1816
|
/* @__PURE__ */ o(
|
|
1784
|
-
|
|
1817
|
+
L,
|
|
1785
1818
|
{
|
|
1786
|
-
header:
|
|
1819
|
+
header: E.ABOUT.TITLE_SERVER,
|
|
1787
1820
|
className: "prose-dark dark:prose-lighter",
|
|
1788
|
-
children:
|
|
1789
|
-
[
|
|
1790
|
-
[
|
|
1791
|
-
[
|
|
1821
|
+
children: ce(s, {
|
|
1822
|
+
[E.ABOUT.VERSION]: r,
|
|
1823
|
+
[pe(E.ABOUT.ENGINE, a.length)]: /* @__PURE__ */ o(M, { children: a.map((i) => /* @__PURE__ */ o("div", { className: "text-right", children: i }, i)) }),
|
|
1824
|
+
[pe(E.ABOUT.PLUGIN, t.length)]: /* @__PURE__ */ o(M, { children: t.map((i) => /* @__PURE__ */ o("div", { className: "text-right", children: i }, i)) })
|
|
1792
1825
|
})
|
|
1793
1826
|
}
|
|
1794
1827
|
)
|
|
1795
1828
|
] });
|
|
1796
|
-
}, $o = ({
|
|
1797
|
-
open: e,
|
|
1798
|
-
onOpenChange: t
|
|
1799
|
-
}) => {
|
|
1800
|
-
const { serverStats: r } = B(ie);
|
|
1801
|
-
return /* @__PURE__ */ o(q, { open: e, onOpenChange: t, title: Dt, children: /* @__PURE__ */ o(Vo, { stats: r }) });
|
|
1802
|
-
}, Fo = (e) => Qe(e), Ho = (e) => {
|
|
1803
|
-
if (!e || e.length === 0)
|
|
1804
|
-
return $t;
|
|
1805
|
-
const t = e.filter(
|
|
1806
|
-
(r) => {
|
|
1807
|
-
var a, n;
|
|
1808
|
-
return ((a = r == null ? void 0 : r.message) == null ? void 0 : a.role) === Ft && typeof ((n = r == null ? void 0 : r.message) == null ? void 0 : n.processingTime) == "number";
|
|
1809
|
-
}
|
|
1810
|
-
).map((r) => r.message.processingTime);
|
|
1811
|
-
return Ht({
|
|
1812
|
-
data: t,
|
|
1813
|
-
formatter: Fo
|
|
1814
|
-
});
|
|
1815
1829
|
}, Go = ({
|
|
1816
|
-
isAuthenticated: e,
|
|
1817
|
-
stats: t
|
|
1818
|
-
}) => {
|
|
1819
|
-
const { state: r } = B(ie), a = Gt - Number(r == null ? void 0 : r.usage), n = ae(), i = ae();
|
|
1820
|
-
return e ? /* @__PURE__ */ y(R, { children: [
|
|
1821
|
-
r && r.messages.length > 0 && /* @__PURE__ */ o("div", { className: "mb-4", children: /* @__PURE__ */ o(
|
|
1822
|
-
P,
|
|
1823
|
-
{
|
|
1824
|
-
header: N.CURRENT_STATISTICS.TITLE,
|
|
1825
|
-
className: "prose-dark dark:prose-lighter",
|
|
1826
|
-
children: oe(n, {
|
|
1827
|
-
[N.CURRENT_STATISTICS.MODEL_NAME]: (r == null ? void 0 : r.model) || te,
|
|
1828
|
-
[N.CURRENT_STATISTICS.TOKENS_USED]: r == null ? void 0 : r.usage,
|
|
1829
|
-
[N.CURRENT_STATISTICS.REMAINING_TOKENS]: Vt.format(a),
|
|
1830
|
-
[N.CURRENT_STATISTICS.PROCESSING_TIME]: Ho(r == null ? void 0 : r.messages)
|
|
1831
|
-
})
|
|
1832
|
-
}
|
|
1833
|
-
) }),
|
|
1834
|
-
/* @__PURE__ */ o(
|
|
1835
|
-
P,
|
|
1836
|
-
{
|
|
1837
|
-
header: N.MAIN_STATISTICS.TITLE,
|
|
1838
|
-
className: "prose-dark dark:prose-lighter",
|
|
1839
|
-
children: oe(i, {
|
|
1840
|
-
[he(N.MAIN_STATISTICS.TOTAL, t.totalChats)]: t.totalChats,
|
|
1841
|
-
[N.MAIN_STATISTICS.PROCESSING_TIME]: Qe(
|
|
1842
|
-
t.averageProcessingTimes
|
|
1843
|
-
)
|
|
1844
|
-
})
|
|
1845
|
-
}
|
|
1846
|
-
)
|
|
1847
|
-
] }) : null;
|
|
1848
|
-
}, Uo = ({
|
|
1849
1830
|
open: e,
|
|
1850
1831
|
onOpenChange: t
|
|
1851
1832
|
}) => {
|
|
1852
|
-
const
|
|
1853
|
-
|
|
1854
|
-
totalChats: 0
|
|
1855
|
-
}), { isAuthenticated: n, getAccessToken: i, user: s } = Y();
|
|
1856
|
-
return G(() => {
|
|
1857
|
-
!e || !s || (async () => {
|
|
1858
|
-
try {
|
|
1859
|
-
const c = await D({
|
|
1860
|
-
accessToken: await i(),
|
|
1861
|
-
type: V.GET_CHATS_STATS,
|
|
1862
|
-
params: {
|
|
1863
|
-
userId: s.username
|
|
1864
|
-
}
|
|
1865
|
-
});
|
|
1866
|
-
c.status === 200 && a(c.data);
|
|
1867
|
-
} catch {
|
|
1868
|
-
}
|
|
1869
|
-
})();
|
|
1870
|
-
}, [e, i, s]), /* @__PURE__ */ o(q, { open: e, onOpenChange: t, title: Xe, children: /* @__PURE__ */ o(Go, { isAuthenticated: n, stats: r }) });
|
|
1833
|
+
const { serverStats: r } = P(ge);
|
|
1834
|
+
return /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title: $t, children: /* @__PURE__ */ o(Ho, { stats: r }) });
|
|
1871
1835
|
}, Pt = ({
|
|
1872
1836
|
showConfirmation: e,
|
|
1873
1837
|
setShowConfirmation: t,
|
|
@@ -1875,14 +1839,14 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
1875
1839
|
children: a,
|
|
1876
1840
|
customStrings: n
|
|
1877
1841
|
}) => /* @__PURE__ */ o(
|
|
1878
|
-
|
|
1842
|
+
te,
|
|
1879
1843
|
{
|
|
1880
1844
|
kind: "messagebox",
|
|
1881
1845
|
open: e,
|
|
1882
1846
|
onOpenChange: t,
|
|
1883
1847
|
title: n.title,
|
|
1884
|
-
footer: /* @__PURE__ */
|
|
1885
|
-
/* @__PURE__ */ o(
|
|
1848
|
+
footer: /* @__PURE__ */ k(H, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
1849
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
1886
1850
|
F,
|
|
1887
1851
|
{
|
|
1888
1852
|
mode: "dark",
|
|
@@ -1894,7 +1858,7 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
1894
1858
|
children: n.cancelAction
|
|
1895
1859
|
}
|
|
1896
1860
|
) }),
|
|
1897
|
-
/* @__PURE__ */ o(
|
|
1861
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
1898
1862
|
F,
|
|
1899
1863
|
{
|
|
1900
1864
|
mode: "dark",
|
|
@@ -1909,19 +1873,19 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
1909
1873
|
] }),
|
|
1910
1874
|
children: a
|
|
1911
1875
|
}
|
|
1912
|
-
),
|
|
1876
|
+
), Uo = async (e, t, r, a) => {
|
|
1913
1877
|
try {
|
|
1914
|
-
const n = await
|
|
1878
|
+
const n = await $({
|
|
1915
1879
|
accessToken: a,
|
|
1916
|
-
type:
|
|
1880
|
+
type: D.GET_CHAT,
|
|
1917
1881
|
params: {
|
|
1918
1882
|
id: e.id
|
|
1919
1883
|
}
|
|
1920
1884
|
});
|
|
1921
1885
|
n.status === 200 && (t({
|
|
1922
|
-
type:
|
|
1886
|
+
type: Ze
|
|
1923
1887
|
}), t({
|
|
1924
|
-
type:
|
|
1888
|
+
type: Vt,
|
|
1925
1889
|
payload: {
|
|
1926
1890
|
id: e.id,
|
|
1927
1891
|
model: n.data.model,
|
|
@@ -1931,57 +1895,57 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
1931
1895
|
}), r(!1));
|
|
1932
1896
|
} catch {
|
|
1933
1897
|
}
|
|
1934
|
-
},
|
|
1898
|
+
}, jo = ({
|
|
1935
1899
|
filteredHistory: e,
|
|
1936
1900
|
setFilteredHistory: t,
|
|
1937
1901
|
dispatch: r,
|
|
1938
1902
|
onOpenChange: a
|
|
1939
1903
|
}) => {
|
|
1940
|
-
var
|
|
1941
|
-
const { user: n, getAccessToken:
|
|
1904
|
+
var h;
|
|
1905
|
+
const { user: n, getAccessToken: s } = X(), i = J({
|
|
1942
1906
|
id: 0,
|
|
1943
1907
|
timestamp: "",
|
|
1944
1908
|
message: ""
|
|
1945
|
-
}), [c,
|
|
1946
|
-
key:
|
|
1909
|
+
}), [c, m] = S(!1), { state: l, dispatch: d } = P(tt), [, f] = me({
|
|
1910
|
+
key: ue + Dt,
|
|
1947
1911
|
initialValue: l.sortDirection
|
|
1948
|
-
}),
|
|
1912
|
+
}), p = (u) => {
|
|
1949
1913
|
switch (l.sortDirection) {
|
|
1950
|
-
case
|
|
1951
|
-
|
|
1914
|
+
case Y.ASC:
|
|
1915
|
+
f(Y.DESC), d({
|
|
1952
1916
|
type: Ve,
|
|
1953
1917
|
payload: {
|
|
1954
|
-
sortedCell:
|
|
1955
|
-
sortDirection:
|
|
1918
|
+
sortedCell: u,
|
|
1919
|
+
sortDirection: Y.DESC
|
|
1956
1920
|
}
|
|
1957
1921
|
});
|
|
1958
1922
|
break;
|
|
1959
1923
|
default:
|
|
1960
|
-
|
|
1924
|
+
f(Y.ASC), d({
|
|
1961
1925
|
type: Ve,
|
|
1962
1926
|
payload: {
|
|
1963
|
-
sortedCell:
|
|
1964
|
-
sortDirection:
|
|
1927
|
+
sortedCell: u,
|
|
1928
|
+
sortDirection: Y.ASC
|
|
1965
1929
|
}
|
|
1966
1930
|
});
|
|
1967
1931
|
break;
|
|
1968
1932
|
}
|
|
1969
1933
|
};
|
|
1970
|
-
return /* @__PURE__ */
|
|
1971
|
-
/* @__PURE__ */
|
|
1934
|
+
return /* @__PURE__ */ k(M, { children: [
|
|
1935
|
+
/* @__PURE__ */ k(
|
|
1972
1936
|
Pt,
|
|
1973
1937
|
{
|
|
1974
1938
|
showConfirmation: c,
|
|
1975
|
-
setShowConfirmation:
|
|
1939
|
+
setShowConfirmation: m,
|
|
1976
1940
|
action: async () => {
|
|
1977
|
-
const
|
|
1941
|
+
const u = i.current;
|
|
1978
1942
|
try {
|
|
1979
|
-
const v = await
|
|
1980
|
-
accessToken: await
|
|
1981
|
-
type:
|
|
1943
|
+
const v = await $({
|
|
1944
|
+
accessToken: await s(),
|
|
1945
|
+
type: D.DELETE_CHAT,
|
|
1982
1946
|
params: {
|
|
1983
1947
|
userId: (n == null ? void 0 : n.username) || "",
|
|
1984
|
-
id:
|
|
1948
|
+
id: u.id,
|
|
1985
1949
|
limit: 1,
|
|
1986
1950
|
searchString: l.searchString,
|
|
1987
1951
|
direction: l.sortDirection,
|
|
@@ -1999,32 +1963,32 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
1999
1963
|
},
|
|
2000
1964
|
children: [
|
|
2001
1965
|
/* @__PURE__ */ o("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
|
|
2002
|
-
/* @__PURE__ */
|
|
2003
|
-
/* @__PURE__ */
|
|
1966
|
+
/* @__PURE__ */ k("ul", { className: "m-0", children: [
|
|
1967
|
+
/* @__PURE__ */ k("li", { children: [
|
|
2004
1968
|
"Timestamp:",
|
|
2005
1969
|
" ",
|
|
2006
|
-
/* @__PURE__ */ o("span", { className: "text-lg", children:
|
|
1970
|
+
/* @__PURE__ */ o("span", { className: "text-lg", children: i.current && i.current.timestamp })
|
|
2007
1971
|
] }),
|
|
2008
|
-
/* @__PURE__ */
|
|
1972
|
+
/* @__PURE__ */ k("li", { children: [
|
|
2009
1973
|
"First message:",
|
|
2010
1974
|
" ",
|
|
2011
|
-
/* @__PURE__ */ o("span", { className: "text-lg", children: (
|
|
1975
|
+
/* @__PURE__ */ o("span", { className: "text-lg", children: (h = i.current) == null ? void 0 : h.message })
|
|
2012
1976
|
] })
|
|
2013
1977
|
] })
|
|
2014
1978
|
]
|
|
2015
1979
|
}
|
|
2016
1980
|
),
|
|
2017
|
-
/* @__PURE__ */
|
|
2018
|
-
|
|
1981
|
+
/* @__PURE__ */ k(
|
|
1982
|
+
ar,
|
|
2019
1983
|
{
|
|
2020
1984
|
stickyHeader: !0,
|
|
2021
1985
|
stickyFooter: !0,
|
|
2022
1986
|
compact: !0,
|
|
2023
1987
|
wrapperClassName: "max-h-[60vh] min-h-[60vh]",
|
|
2024
1988
|
children: [
|
|
2025
|
-
/* @__PURE__ */ o(
|
|
1989
|
+
/* @__PURE__ */ o(nr, { children: /* @__PURE__ */ k(Ce, { children: [
|
|
2026
1990
|
/* @__PURE__ */ o(
|
|
2027
|
-
|
|
1991
|
+
sr,
|
|
2028
1992
|
{
|
|
2029
1993
|
buttonClassName: "text-xs sm:text-sm",
|
|
2030
1994
|
cellId: "timestamp",
|
|
@@ -2032,81 +1996,81 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
2032
1996
|
sortDirection: l.sortDirection,
|
|
2033
1997
|
sortedCell: l.sortedCell,
|
|
2034
1998
|
onClick: () => {
|
|
2035
|
-
|
|
1999
|
+
p("timestamp");
|
|
2036
2000
|
},
|
|
2037
2001
|
children: "Date"
|
|
2038
2002
|
}
|
|
2039
2003
|
),
|
|
2040
|
-
/* @__PURE__ */ o(
|
|
2041
|
-
/* @__PURE__ */ o(
|
|
2042
|
-
/* @__PURE__ */ o(
|
|
2004
|
+
/* @__PURE__ */ o(V, { className: "text-xs sm:text-sm", children: "First message" }),
|
|
2005
|
+
/* @__PURE__ */ o(V, { className: "text-xs sm:text-sm", children: "Model" }),
|
|
2006
|
+
/* @__PURE__ */ o(V, { className: "text-xs sm:text-sm text-right", children: "Actions" })
|
|
2043
2007
|
] }) }),
|
|
2044
|
-
/* @__PURE__ */ o(
|
|
2045
|
-
var
|
|
2046
|
-
return ((
|
|
2008
|
+
/* @__PURE__ */ o(ir, { children: e.data.map((u, v) => {
|
|
2009
|
+
var T, N;
|
|
2010
|
+
return ((T = u == null ? void 0 : u.messages) == null ? void 0 : T.length) > 0 ? /* @__PURE__ */ k(Ce, { children: [
|
|
2047
2011
|
/* @__PURE__ */ o(
|
|
2048
|
-
|
|
2012
|
+
V,
|
|
2049
2013
|
{
|
|
2050
2014
|
component: "th",
|
|
2051
2015
|
scope: "row",
|
|
2052
2016
|
className: "text-gray-400 sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
|
|
2053
|
-
children:
|
|
2017
|
+
children: u.timestamp
|
|
2054
2018
|
}
|
|
2055
2019
|
),
|
|
2056
2020
|
/* @__PURE__ */ o(
|
|
2057
|
-
|
|
2021
|
+
V,
|
|
2058
2022
|
{
|
|
2059
2023
|
className: "max-w-[100px] text-white sm:max-w-full text-xs sm:text-sm",
|
|
2060
2024
|
style: {
|
|
2061
2025
|
wordBreak: "break-word"
|
|
2062
2026
|
},
|
|
2063
|
-
children:
|
|
2027
|
+
children: u.messages.length > 0 ? (N = u.messages[0]) == null ? void 0 : N.content : ""
|
|
2064
2028
|
}
|
|
2065
2029
|
),
|
|
2066
|
-
/* @__PURE__ */ o(
|
|
2067
|
-
|
|
2068
|
-
|
|
2030
|
+
/* @__PURE__ */ o(V, { component: "th", scope: "row", className: "text-gray-400", children: /* @__PURE__ */ k(H, { alignHorizontal: "center", children: [
|
|
2031
|
+
u.model && u.model.startsWith("claude") && /* @__PURE__ */ o(mt, { size: "size-4 sm:size-5" }),
|
|
2032
|
+
u.model && u.model.startsWith("gpt") && /* @__PURE__ */ o(ht, { size: "size-4 sm:size-5" })
|
|
2069
2033
|
] }) }),
|
|
2070
|
-
/* @__PURE__ */ o(
|
|
2034
|
+
/* @__PURE__ */ o(V, { className: "px-2", children: /* @__PURE__ */ k("div", { className: "flex justify-end gap-2", children: [
|
|
2071
2035
|
/* @__PURE__ */ o(
|
|
2072
|
-
|
|
2036
|
+
Q,
|
|
2073
2037
|
{
|
|
2074
2038
|
focusMode: "alt-system",
|
|
2075
2039
|
noBorder: !0,
|
|
2076
2040
|
label: "Restore chat",
|
|
2077
2041
|
onClick: async () => {
|
|
2078
|
-
const
|
|
2079
|
-
|
|
2080
|
-
|
|
2042
|
+
const y = await s();
|
|
2043
|
+
Uo(
|
|
2044
|
+
u,
|
|
2081
2045
|
r,
|
|
2082
2046
|
a,
|
|
2083
|
-
|
|
2047
|
+
y
|
|
2084
2048
|
);
|
|
2085
2049
|
},
|
|
2086
|
-
children: /* @__PURE__ */ o(
|
|
2050
|
+
children: /* @__PURE__ */ o(Sr, { size: "size-3", monotone: !0 })
|
|
2087
2051
|
}
|
|
2088
2052
|
),
|
|
2089
2053
|
/* @__PURE__ */ o(
|
|
2090
|
-
|
|
2054
|
+
Q,
|
|
2091
2055
|
{
|
|
2092
2056
|
focusMode: "alt-system",
|
|
2093
2057
|
noBorder: !0,
|
|
2094
2058
|
label: "Delete chat",
|
|
2095
2059
|
onClick: () => {
|
|
2096
|
-
var
|
|
2097
|
-
|
|
2098
|
-
id:
|
|
2099
|
-
timestamp:
|
|
2100
|
-
message:
|
|
2101
|
-
},
|
|
2060
|
+
var y;
|
|
2061
|
+
i.current = {
|
|
2062
|
+
id: u.id,
|
|
2063
|
+
timestamp: u.timestamp,
|
|
2064
|
+
message: u.messages.length > 0 ? (y = u.messages[0]) == null ? void 0 : y.content : ""
|
|
2065
|
+
}, m(!c);
|
|
2102
2066
|
},
|
|
2103
|
-
children: /* @__PURE__ */ o("div", { className: "text-red-400", children: /* @__PURE__ */ o(
|
|
2067
|
+
children: /* @__PURE__ */ o("div", { className: "text-red-400", children: /* @__PURE__ */ o(Nr, { size: "size-3", monotone: !0 }) })
|
|
2104
2068
|
}
|
|
2105
2069
|
)
|
|
2106
2070
|
] }) })
|
|
2107
|
-
] }, `${
|
|
2071
|
+
] }, `${E.HISTORY.TITLE}-${u.id}-${v}`) : null;
|
|
2108
2072
|
}) }),
|
|
2109
|
-
/* @__PURE__ */ o(
|
|
2073
|
+
/* @__PURE__ */ o(cr, { children: /* @__PURE__ */ o(Ce, { children: /* @__PURE__ */ o(V, { colSpan: 4, children: /* @__PURE__ */ o("div", { children: pe(
|
|
2110
2074
|
`${e.data.length} chat`,
|
|
2111
2075
|
e.data.length
|
|
2112
2076
|
) }) }) }) })
|
|
@@ -2114,18 +2078,18 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
2114
2078
|
}
|
|
2115
2079
|
)
|
|
2116
2080
|
] });
|
|
2117
|
-
},
|
|
2081
|
+
}, Xe = async ({
|
|
2118
2082
|
searchString: e,
|
|
2119
2083
|
username: t,
|
|
2120
2084
|
accessToken: r,
|
|
2121
|
-
direction: a =
|
|
2085
|
+
direction: a = Y.ASC
|
|
2122
2086
|
}) => {
|
|
2123
2087
|
if (!t)
|
|
2124
2088
|
return [];
|
|
2125
2089
|
try {
|
|
2126
|
-
const n = await
|
|
2090
|
+
const n = await $({
|
|
2127
2091
|
accessToken: r,
|
|
2128
|
-
type:
|
|
2092
|
+
type: D.GET_CHATS,
|
|
2129
2093
|
params: {
|
|
2130
2094
|
userId: t,
|
|
2131
2095
|
searchString: e,
|
|
@@ -2140,63 +2104,63 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
2140
2104
|
return [];
|
|
2141
2105
|
}
|
|
2142
2106
|
return [];
|
|
2143
|
-
},
|
|
2144
|
-
const { isAuthenticated: t, getAccessToken: r, user: a } =
|
|
2145
|
-
key:
|
|
2107
|
+
}, Ko = ({ onOpenChange: e }) => {
|
|
2108
|
+
const { isAuthenticated: t, getAccessToken: r, user: a } = X(), n = J(null), s = J(!1), { dispatch: i } = P(ge), { state: c, dispatch: m } = P(tt), [, l] = me({
|
|
2109
|
+
key: ue + Ft,
|
|
2146
2110
|
initialValue: c.searchString
|
|
2147
|
-
}), [
|
|
2111
|
+
}), [d, f] = S({
|
|
2148
2112
|
data: [],
|
|
2149
2113
|
sortedDirection: c.sortDirection
|
|
2150
|
-
}),
|
|
2151
|
-
const v = await r(),
|
|
2152
|
-
searchString:
|
|
2114
|
+
}), p = async (u) => {
|
|
2115
|
+
const v = await r(), T = await Xe({
|
|
2116
|
+
searchString: u,
|
|
2153
2117
|
username: a == null ? void 0 : a.username,
|
|
2154
2118
|
accessToken: v,
|
|
2155
2119
|
direction: c.sortDirection
|
|
2156
2120
|
});
|
|
2157
|
-
|
|
2158
|
-
data:
|
|
2121
|
+
f({
|
|
2122
|
+
data: T,
|
|
2159
2123
|
sortedDirection: c.sortDirection
|
|
2160
|
-
}), l(
|
|
2161
|
-
type:
|
|
2162
|
-
payload: { searchString:
|
|
2124
|
+
}), l(u), m({
|
|
2125
|
+
type: Ht,
|
|
2126
|
+
payload: { searchString: u }
|
|
2163
2127
|
});
|
|
2164
|
-
},
|
|
2165
|
-
|
|
2166
|
-
}, 500),
|
|
2167
|
-
|
|
2128
|
+
}, b = Gt((u) => {
|
|
2129
|
+
p(u.target.value);
|
|
2130
|
+
}, 500), h = async (u) => {
|
|
2131
|
+
u.preventDefault();
|
|
2168
2132
|
};
|
|
2169
2133
|
return G(() => {
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
const
|
|
2134
|
+
s.current || (async () => {
|
|
2135
|
+
s.current = !0;
|
|
2136
|
+
const u = await r(), v = await Xe({
|
|
2173
2137
|
searchString: c.searchString,
|
|
2174
2138
|
username: a == null ? void 0 : a.username,
|
|
2175
|
-
accessToken:
|
|
2139
|
+
accessToken: u,
|
|
2176
2140
|
direction: c.sortDirection
|
|
2177
2141
|
});
|
|
2178
|
-
|
|
2142
|
+
f({
|
|
2179
2143
|
data: v,
|
|
2180
2144
|
sortedDirection: c.sortDirection
|
|
2181
2145
|
});
|
|
2182
2146
|
})();
|
|
2183
2147
|
}), G(() => {
|
|
2184
|
-
if (c.sortDirection !==
|
|
2185
|
-
const
|
|
2148
|
+
if (c.sortDirection !== d.sortedDirection) {
|
|
2149
|
+
const u = [...d.data].sort((v, T) => {
|
|
2186
2150
|
if (c.sortedCell === "timestamp") {
|
|
2187
|
-
const
|
|
2188
|
-
return c.sortDirection ===
|
|
2151
|
+
const N = new Date(v[c.sortedCell]).getTime(), y = new Date(T[c.sortedCell]).getTime();
|
|
2152
|
+
return c.sortDirection === Y.ASC ? N - y : y - N;
|
|
2189
2153
|
}
|
|
2190
2154
|
return 0;
|
|
2191
2155
|
});
|
|
2192
|
-
|
|
2193
|
-
data:
|
|
2156
|
+
f({
|
|
2157
|
+
data: u,
|
|
2194
2158
|
sortedDirection: c.sortDirection
|
|
2195
2159
|
});
|
|
2196
2160
|
}
|
|
2197
|
-
}, [
|
|
2198
|
-
/* @__PURE__ */ o("form", { autoComplete: "off", onSubmit:
|
|
2199
|
-
|
|
2161
|
+
}, [d, c]), t ? d && d.data && /* @__PURE__ */ k(M, { children: [
|
|
2162
|
+
/* @__PURE__ */ o("form", { autoComplete: "off", onSubmit: h, children: /* @__PURE__ */ o(
|
|
2163
|
+
Ee,
|
|
2200
2164
|
{
|
|
2201
2165
|
autoCapitalize: "off",
|
|
2202
2166
|
autoComplete: "off",
|
|
@@ -2207,7 +2171,7 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
2207
2171
|
mode: "dark",
|
|
2208
2172
|
name: "Search",
|
|
2209
2173
|
label: "Search",
|
|
2210
|
-
onChange:
|
|
2174
|
+
onChange: b,
|
|
2211
2175
|
className: "mt-2 mb-2",
|
|
2212
2176
|
...c.searchString && {
|
|
2213
2177
|
rightElement: /* @__PURE__ */ o(
|
|
@@ -2220,8 +2184,8 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
2220
2184
|
noBorder: !0,
|
|
2221
2185
|
size: "small",
|
|
2222
2186
|
onClick: () => {
|
|
2223
|
-
var
|
|
2224
|
-
|
|
2187
|
+
var u;
|
|
2188
|
+
p(""), (u = n.current) != null && u.value && (n.current.value = "", n.current.focus());
|
|
2225
2189
|
},
|
|
2226
2190
|
children: "Reset"
|
|
2227
2191
|
}
|
|
@@ -2230,35 +2194,135 @@ const ee = "panel", ue = "messagebox", Do = ({
|
|
|
2230
2194
|
}
|
|
2231
2195
|
) }),
|
|
2232
2196
|
/* @__PURE__ */ o("div", { className: "flex flex-col gap-2 sm:flex-row", children: /* @__PURE__ */ o(
|
|
2233
|
-
|
|
2197
|
+
jo,
|
|
2234
2198
|
{
|
|
2235
|
-
filteredHistory:
|
|
2236
|
-
setFilteredHistory:
|
|
2237
|
-
dispatch:
|
|
2199
|
+
filteredHistory: d,
|
|
2200
|
+
setFilteredHistory: f,
|
|
2201
|
+
dispatch: i,
|
|
2238
2202
|
onOpenChange: e
|
|
2239
2203
|
}
|
|
2240
2204
|
) })
|
|
2241
2205
|
] }) : null;
|
|
2242
|
-
},
|
|
2206
|
+
}, Wo = ({
|
|
2243
2207
|
open: e,
|
|
2244
2208
|
onOpenChange: t
|
|
2245
|
-
}) => /* @__PURE__ */ o(
|
|
2209
|
+
}) => /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title: Ut, children: /* @__PURE__ */ o(Ko, { onOpenChange: t }) }), Yo = (e) => Qe(e), qo = (e) => {
|
|
2210
|
+
if (!e || e.length === 0)
|
|
2211
|
+
return Wt;
|
|
2212
|
+
const t = e.filter(
|
|
2213
|
+
(r) => {
|
|
2214
|
+
var a, n;
|
|
2215
|
+
return ((a = r == null ? void 0 : r.message) == null ? void 0 : a.role) === Yt && typeof ((n = r == null ? void 0 : r.message) == null ? void 0 : n.processingTime) == "number";
|
|
2216
|
+
}
|
|
2217
|
+
).map((r) => r.message.processingTime);
|
|
2218
|
+
return qt({
|
|
2219
|
+
data: t,
|
|
2220
|
+
formatter: Yo
|
|
2221
|
+
});
|
|
2222
|
+
}, Xo = ({ stats: e }) => {
|
|
2223
|
+
const { isAuthenticated: t, user: r, registeringForPasskey: a, authenticationType: n } = X(), { state: s } = P(ge), i = Xt - Number(s == null ? void 0 : s.usage), c = de(), m = de(), l = de(), d = (r == null ? void 0 : r.username) || "";
|
|
2224
|
+
return t && d ? /* @__PURE__ */ k(M, { children: [
|
|
2225
|
+
/* @__PURE__ */ o(
|
|
2226
|
+
L,
|
|
2227
|
+
{
|
|
2228
|
+
header: E.PREFERENCES.TITLE,
|
|
2229
|
+
className: "prose-dark dark:prose-lighter",
|
|
2230
|
+
children: ce(c, {
|
|
2231
|
+
[E.PREFERENCES.NAME]: d,
|
|
2232
|
+
[E.PREFERENCES.EMAIL]: (r == null ? void 0 : r.email) || ""
|
|
2233
|
+
})
|
|
2234
|
+
}
|
|
2235
|
+
),
|
|
2236
|
+
n !== jt.PASSKEY && /* @__PURE__ */ k(
|
|
2237
|
+
L,
|
|
2238
|
+
{
|
|
2239
|
+
className: "prose-dark dark:prose-lighter mt-4",
|
|
2240
|
+
header: /* @__PURE__ */ o("h2", { className: "m-0", children: /* @__PURE__ */ k(H, { columnGap: 3, alignVertical: "center", children: [
|
|
2241
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(Fe, { size: "size-8" }) }),
|
|
2242
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o("div", { children: E.PREFERENCES.PASSKEY_TITLE }) })
|
|
2243
|
+
] }) }),
|
|
2244
|
+
children: [
|
|
2245
|
+
/* @__PURE__ */ o("p", { children: E.PREFERENCES.PASSKEY_INSTRUCTIONS }),
|
|
2246
|
+
/* @__PURE__ */ o(
|
|
2247
|
+
Q,
|
|
2248
|
+
{
|
|
2249
|
+
size: "small",
|
|
2250
|
+
className: "mt-2",
|
|
2251
|
+
onClick: a,
|
|
2252
|
+
labelLeft: E.PREFERENCES.PASSKEY_BUTTON,
|
|
2253
|
+
children: /* @__PURE__ */ o(Fe, { size: "size-5", monotone: !0 })
|
|
2254
|
+
}
|
|
2255
|
+
)
|
|
2256
|
+
]
|
|
2257
|
+
}
|
|
2258
|
+
),
|
|
2259
|
+
/* @__PURE__ */ o(
|
|
2260
|
+
L,
|
|
2261
|
+
{
|
|
2262
|
+
header: E.CURRENT_STATISTICS.TITLE,
|
|
2263
|
+
className: "prose-dark dark:prose-lighter mt-4",
|
|
2264
|
+
children: ce(m, {
|
|
2265
|
+
[E.CURRENT_STATISTICS.MODEL_NAME]: (s == null ? void 0 : s.model) || le,
|
|
2266
|
+
[E.CURRENT_STATISTICS.TOKENS_USED]: s == null ? void 0 : s.usage,
|
|
2267
|
+
[E.CURRENT_STATISTICS.REMAINING_TOKENS]: Kt.format(i),
|
|
2268
|
+
[E.CURRENT_STATISTICS.PROCESSING_TIME]: qo(s == null ? void 0 : s.messages)
|
|
2269
|
+
})
|
|
2270
|
+
}
|
|
2271
|
+
),
|
|
2272
|
+
/* @__PURE__ */ o(
|
|
2273
|
+
L,
|
|
2274
|
+
{
|
|
2275
|
+
header: E.MAIN_STATISTICS.TITLE,
|
|
2276
|
+
className: "prose-dark dark:prose-lighter mt-4",
|
|
2277
|
+
children: ce(l, {
|
|
2278
|
+
[pe(E.MAIN_STATISTICS.TOTAL, e.totalChats)]: e.totalChats,
|
|
2279
|
+
[E.MAIN_STATISTICS.PROCESSING_TIME]: Qe(
|
|
2280
|
+
e.averageProcessingTimes
|
|
2281
|
+
)
|
|
2282
|
+
})
|
|
2283
|
+
}
|
|
2284
|
+
)
|
|
2285
|
+
] }) : null;
|
|
2286
|
+
}, Zo = ({
|
|
2287
|
+
open: e,
|
|
2288
|
+
onOpenChange: t
|
|
2289
|
+
}) => {
|
|
2290
|
+
const [r, a] = S({
|
|
2291
|
+
averageProcessingTimes: 0,
|
|
2292
|
+
totalChats: 0
|
|
2293
|
+
}), { getAccessToken: n, user: s } = X();
|
|
2294
|
+
return G(() => {
|
|
2295
|
+
!e || !s || (async () => {
|
|
2296
|
+
try {
|
|
2297
|
+
const i = await $({
|
|
2298
|
+
accessToken: await n(),
|
|
2299
|
+
type: D.GET_CHATS_STATS,
|
|
2300
|
+
params: {
|
|
2301
|
+
userId: s.username
|
|
2302
|
+
}
|
|
2303
|
+
});
|
|
2304
|
+
i.status === 200 && a(i.data);
|
|
2305
|
+
} catch {
|
|
2306
|
+
}
|
|
2307
|
+
})();
|
|
2308
|
+
}, [e, n, s]), /* @__PURE__ */ o(te, { open: e, onOpenChange: t, title: Zt, children: /* @__PURE__ */ o(Xo, { stats: r }) });
|
|
2309
|
+
};
|
|
2246
2310
|
/*!
|
|
2247
|
-
@versini/ui-toggle v2.0.
|
|
2248
|
-
©
|
|
2311
|
+
@versini/ui-toggle v2.0.6
|
|
2312
|
+
© 2025 gizmette.com
|
|
2249
2313
|
*/
|
|
2250
2314
|
try {
|
|
2251
2315
|
window.__VERSINI_UI_TOGGLE__ || (window.__VERSINI_UI_TOGGLE__ = {
|
|
2252
|
-
version: "2.0.
|
|
2253
|
-
buildTime: "
|
|
2316
|
+
version: "2.0.6",
|
|
2317
|
+
buildTime: "01/02/2025 05:13 PM EST",
|
|
2254
2318
|
homepage: "https://github.com/aversini/ui-components",
|
|
2255
2319
|
license: "MIT"
|
|
2256
2320
|
});
|
|
2257
2321
|
} catch {
|
|
2258
2322
|
}
|
|
2259
|
-
const
|
|
2323
|
+
const Qo = "av-toggle", Jo = () => w("peer", "h-6", "w-11", "rounded-full"), ea = ({
|
|
2260
2324
|
focusMode: e
|
|
2261
|
-
}) =>
|
|
2325
|
+
}) => w(
|
|
2262
2326
|
"peer-focus:outline",
|
|
2263
2327
|
"peer-focus:outline-2",
|
|
2264
2328
|
"peer-focus:outline-offset-2",
|
|
@@ -2268,14 +2332,14 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2268
2332
|
"peer-focus:outline-focus-light dark:peer-focus:outline-focus-dark": e === "alt-system",
|
|
2269
2333
|
"peer-focus:outline-focus-dark dark:peer-focus:outline-focus-light": e === "system"
|
|
2270
2334
|
}
|
|
2271
|
-
),
|
|
2335
|
+
), ta = () => w(
|
|
2272
2336
|
"peer-checked:after:translate-x-full",
|
|
2273
2337
|
// background color when checked
|
|
2274
2338
|
"peer-checked:bg-violet-500",
|
|
2275
2339
|
// knob circle and border color when checked
|
|
2276
2340
|
"peer-checked:after:bg-white",
|
|
2277
2341
|
"peer-checked:after:border-white"
|
|
2278
|
-
),
|
|
2342
|
+
), ra = () => w(
|
|
2279
2343
|
"after:left-[2px]",
|
|
2280
2344
|
"after:top-[2px]",
|
|
2281
2345
|
"after:border",
|
|
@@ -2287,65 +2351,65 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2287
2351
|
"after:rounded-full",
|
|
2288
2352
|
"after:transition-all",
|
|
2289
2353
|
"after:content-['']"
|
|
2290
|
-
),
|
|
2354
|
+
), oa = ({
|
|
2291
2355
|
mode: e,
|
|
2292
2356
|
noBorder: t
|
|
2293
|
-
}) =>
|
|
2357
|
+
}) => w({
|
|
2294
2358
|
border: !t,
|
|
2295
2359
|
"border-border-dark bg-surface-medium": e === "light",
|
|
2296
2360
|
"border-border-light bg-surface-darker": e === "dark",
|
|
2297
2361
|
"border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
|
|
2298
2362
|
"border-border-dark bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
|
|
2299
|
-
}),
|
|
2363
|
+
}), aa = ({
|
|
2300
2364
|
mode: e,
|
|
2301
2365
|
labelHidden: t
|
|
2302
|
-
}) => t ? "sr-only" :
|
|
2366
|
+
}) => t ? "sr-only" : w("ml-2 text-sm", {
|
|
2303
2367
|
"text-copy-dark": e === "light",
|
|
2304
2368
|
"text-copy-lighter": e === "dark",
|
|
2305
2369
|
"text-copy-lighter dark:text-copy-dark": e === "alt-system",
|
|
2306
2370
|
"text-copy-dark dark:text-copy-lighter": e === "system"
|
|
2307
|
-
}),
|
|
2308
|
-
|
|
2371
|
+
}), na = ({ className: e }) => w(
|
|
2372
|
+
Qo,
|
|
2309
2373
|
"relative flex cursor-pointer items-center",
|
|
2310
2374
|
e
|
|
2311
|
-
),
|
|
2375
|
+
), sa = ({
|
|
2312
2376
|
mode: e,
|
|
2313
2377
|
focusMode: t,
|
|
2314
2378
|
labelHidden: r,
|
|
2315
2379
|
className: a,
|
|
2316
2380
|
noBorder: n
|
|
2317
2381
|
}) => ({
|
|
2318
|
-
toggle:
|
|
2319
|
-
Zo(),
|
|
2320
|
-
ea({ mode: e, noBorder: n }),
|
|
2321
|
-
Qo({ focusMode: t }),
|
|
2382
|
+
toggle: w(
|
|
2322
2383
|
Jo(),
|
|
2323
|
-
|
|
2384
|
+
oa({ mode: e, noBorder: n }),
|
|
2385
|
+
ea({ focusMode: t }),
|
|
2386
|
+
ra(),
|
|
2387
|
+
ta()
|
|
2324
2388
|
),
|
|
2325
|
-
label:
|
|
2389
|
+
label: aa({ mode: e, labelHidden: r }),
|
|
2326
2390
|
input: "peer sr-only",
|
|
2327
|
-
wrapper:
|
|
2328
|
-
}),
|
|
2391
|
+
wrapper: na({ className: a })
|
|
2392
|
+
}), ie = ({
|
|
2329
2393
|
checked: e = !1,
|
|
2330
2394
|
onChange: t,
|
|
2331
2395
|
label: r,
|
|
2332
2396
|
labelHidden: a = !1,
|
|
2333
2397
|
name: n,
|
|
2334
|
-
mode:
|
|
2335
|
-
focusMode:
|
|
2398
|
+
mode: s = "system",
|
|
2399
|
+
focusMode: i = "system",
|
|
2336
2400
|
className: c,
|
|
2337
|
-
noBorder:
|
|
2401
|
+
noBorder: m = !1
|
|
2338
2402
|
}) => {
|
|
2339
|
-
const l =
|
|
2340
|
-
mode:
|
|
2341
|
-
focusMode:
|
|
2403
|
+
const l = sa({
|
|
2404
|
+
mode: s,
|
|
2405
|
+
focusMode: i,
|
|
2342
2406
|
labelHidden: a,
|
|
2343
2407
|
className: c,
|
|
2344
|
-
noBorder:
|
|
2345
|
-
}),
|
|
2346
|
-
t == null || t(
|
|
2408
|
+
noBorder: m
|
|
2409
|
+
}), d = (f) => {
|
|
2410
|
+
t == null || t(f.target.checked);
|
|
2347
2411
|
};
|
|
2348
|
-
return /* @__PURE__ */
|
|
2412
|
+
return /* @__PURE__ */ k("label", { className: l.wrapper, children: [
|
|
2349
2413
|
/* @__PURE__ */ o(
|
|
2350
2414
|
"input",
|
|
2351
2415
|
{
|
|
@@ -2353,132 +2417,292 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2353
2417
|
checked: e,
|
|
2354
2418
|
type: "checkbox",
|
|
2355
2419
|
className: l.input,
|
|
2356
|
-
onChange:
|
|
2420
|
+
onChange: d
|
|
2357
2421
|
}
|
|
2358
2422
|
),
|
|
2359
2423
|
/* @__PURE__ */ o("div", { className: l.toggle }),
|
|
2360
2424
|
/* @__PURE__ */ o("span", { className: l.label, children: r })
|
|
2361
2425
|
] });
|
|
2362
|
-
},
|
|
2426
|
+
}, ia = ({
|
|
2363
2427
|
open: e,
|
|
2364
2428
|
onOpenChange: t
|
|
2365
2429
|
}) => {
|
|
2366
|
-
const {
|
|
2430
|
+
const { state: r, dispatch: a } = P(lr), { getAccessToken: n, user: s } = X(), [i, c] = S({
|
|
2431
|
+
tags: [...r.tags]
|
|
2432
|
+
}), m = ({
|
|
2433
|
+
slot: d,
|
|
2434
|
+
checked: f,
|
|
2435
|
+
label: p,
|
|
2436
|
+
content: b
|
|
2437
|
+
}) => {
|
|
2438
|
+
c((h) => {
|
|
2439
|
+
const u = h.tags, v = {
|
|
2440
|
+
slot: d,
|
|
2441
|
+
label: p,
|
|
2442
|
+
content: b,
|
|
2443
|
+
enabled: f
|
|
2444
|
+
}, T = u.findIndex((N) => N.slot === d);
|
|
2445
|
+
return T === -1 ? {
|
|
2446
|
+
...h,
|
|
2447
|
+
tags: [...u, { ...v, slot: d }]
|
|
2448
|
+
} : (u[T] = v, {
|
|
2449
|
+
...h,
|
|
2450
|
+
tags: [...u]
|
|
2451
|
+
});
|
|
2452
|
+
});
|
|
2453
|
+
}, l = async (d) => {
|
|
2454
|
+
d.preventDefault();
|
|
2455
|
+
try {
|
|
2456
|
+
await $({
|
|
2457
|
+
accessToken: await n(),
|
|
2458
|
+
type: D.SET_USER_PREFERENCES,
|
|
2459
|
+
params: {
|
|
2460
|
+
user: s == null ? void 0 : s.username,
|
|
2461
|
+
tags: i.tags
|
|
2462
|
+
}
|
|
2463
|
+
}), a({
|
|
2464
|
+
type: Jt,
|
|
2465
|
+
payload: {
|
|
2466
|
+
tags: i.tags
|
|
2467
|
+
}
|
|
2468
|
+
});
|
|
2469
|
+
} catch {
|
|
2470
|
+
}
|
|
2471
|
+
};
|
|
2472
|
+
return /* @__PURE__ */ k(
|
|
2473
|
+
te,
|
|
2474
|
+
{
|
|
2475
|
+
open: e,
|
|
2476
|
+
onOpenChange: t,
|
|
2477
|
+
title: "Tags",
|
|
2478
|
+
footer: /* @__PURE__ */ k(
|
|
2479
|
+
H,
|
|
2480
|
+
{
|
|
2481
|
+
columnGap: 2,
|
|
2482
|
+
alignHorizontal: "flex-end",
|
|
2483
|
+
className: "pb-8 sm:pb-0",
|
|
2484
|
+
children: [
|
|
2485
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
2486
|
+
F,
|
|
2487
|
+
{
|
|
2488
|
+
mode: "dark",
|
|
2489
|
+
variant: "secondary",
|
|
2490
|
+
focusMode: "light",
|
|
2491
|
+
onClick: () => {
|
|
2492
|
+
t(!1);
|
|
2493
|
+
},
|
|
2494
|
+
children: "Cancel"
|
|
2495
|
+
}
|
|
2496
|
+
) }),
|
|
2497
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
2498
|
+
F,
|
|
2499
|
+
{
|
|
2500
|
+
mode: "dark",
|
|
2501
|
+
variant: "danger",
|
|
2502
|
+
focusMode: "light",
|
|
2503
|
+
onClick: async (d) => {
|
|
2504
|
+
t(!1), await l(d);
|
|
2505
|
+
},
|
|
2506
|
+
children: "Save"
|
|
2507
|
+
}
|
|
2508
|
+
) })
|
|
2509
|
+
]
|
|
2510
|
+
}
|
|
2511
|
+
),
|
|
2512
|
+
children: [
|
|
2513
|
+
/* @__PURE__ */ o("p", { children: Qt }),
|
|
2514
|
+
i.tags && i.tags.map((d) => /* @__PURE__ */ k(
|
|
2515
|
+
L,
|
|
2516
|
+
{
|
|
2517
|
+
header: `Tag ${d.slot + 1}`,
|
|
2518
|
+
className: "prose-dark dark:prose-lighter mb-2",
|
|
2519
|
+
children: [
|
|
2520
|
+
/* @__PURE__ */ k(H, { className: "mt-8 mb-6", columnGap: 2, rowGap: 6, children: [
|
|
2521
|
+
/* @__PURE__ */ o(A, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
|
|
2522
|
+
Ee,
|
|
2523
|
+
{
|
|
2524
|
+
label: "Label",
|
|
2525
|
+
name: `tag${d.slot}-label`,
|
|
2526
|
+
value: d.label,
|
|
2527
|
+
onChange: (f) => {
|
|
2528
|
+
m({
|
|
2529
|
+
slot: d.slot,
|
|
2530
|
+
checked: d.enabled,
|
|
2531
|
+
label: f.target.value,
|
|
2532
|
+
content: d.content
|
|
2533
|
+
});
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2536
|
+
) }),
|
|
2537
|
+
/* @__PURE__ */ o(A, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
|
|
2538
|
+
Ee,
|
|
2539
|
+
{
|
|
2540
|
+
label: "Content",
|
|
2541
|
+
name: `tag${d.slot}-content`,
|
|
2542
|
+
value: d.content,
|
|
2543
|
+
onChange: (f) => {
|
|
2544
|
+
m({
|
|
2545
|
+
slot: d.slot,
|
|
2546
|
+
checked: d.enabled,
|
|
2547
|
+
label: d.label,
|
|
2548
|
+
content: f.target.value
|
|
2549
|
+
});
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
) })
|
|
2553
|
+
] }),
|
|
2554
|
+
/* @__PURE__ */ o(
|
|
2555
|
+
ie,
|
|
2556
|
+
{
|
|
2557
|
+
className: "mt-2",
|
|
2558
|
+
noBorder: !0,
|
|
2559
|
+
label: "Enabled",
|
|
2560
|
+
name: d.slot.toString(),
|
|
2561
|
+
onChange: (f) => {
|
|
2562
|
+
m({
|
|
2563
|
+
slot: d.slot,
|
|
2564
|
+
checked: f,
|
|
2565
|
+
label: d.label,
|
|
2566
|
+
content: d.content
|
|
2567
|
+
});
|
|
2568
|
+
},
|
|
2569
|
+
checked: d.enabled
|
|
2570
|
+
}
|
|
2571
|
+
)
|
|
2572
|
+
]
|
|
2573
|
+
},
|
|
2574
|
+
`tag-slot-${d.slot}`
|
|
2575
|
+
))
|
|
2576
|
+
]
|
|
2577
|
+
}
|
|
2578
|
+
);
|
|
2579
|
+
}, ca = ({
|
|
2580
|
+
open: e,
|
|
2581
|
+
onOpenChange: t
|
|
2582
|
+
}) => {
|
|
2583
|
+
const { dispatch: r } = P(ge), { getAccessToken: a, user: n } = X(), [s, i] = S(!1), [c, m] = S({
|
|
2367
2584
|
loaded: !1,
|
|
2368
2585
|
instructions: "",
|
|
2369
2586
|
loadingLocation: !1,
|
|
2370
2587
|
location: "",
|
|
2371
|
-
engine:
|
|
2372
|
-
}), [
|
|
2373
|
-
key:
|
|
2588
|
+
engine: le
|
|
2589
|
+
}), [l, d] = me({
|
|
2590
|
+
key: ue + Je,
|
|
2374
2591
|
initialValue: !1
|
|
2375
|
-
}),
|
|
2376
|
-
|
|
2592
|
+
}), [f, p] = me({
|
|
2593
|
+
key: ue + er,
|
|
2594
|
+
initialValue: !1
|
|
2595
|
+
}), b = (y) => {
|
|
2596
|
+
p(y);
|
|
2597
|
+
}, h = async (y) => {
|
|
2598
|
+
y.preventDefault();
|
|
2377
2599
|
try {
|
|
2378
|
-
await
|
|
2600
|
+
await $({
|
|
2379
2601
|
accessToken: await a(),
|
|
2380
|
-
type:
|
|
2602
|
+
type: D.SET_USER_PREFERENCES,
|
|
2381
2603
|
params: {
|
|
2382
2604
|
user: n == null ? void 0 : n.username,
|
|
2383
|
-
instructions:
|
|
2384
|
-
location:
|
|
2385
|
-
engine:
|
|
2605
|
+
instructions: c.instructions,
|
|
2606
|
+
location: c.location,
|
|
2607
|
+
engine: c.engine
|
|
2386
2608
|
}
|
|
2387
2609
|
}), r({
|
|
2388
|
-
type:
|
|
2610
|
+
type: et,
|
|
2389
2611
|
payload: {
|
|
2390
|
-
engine:
|
|
2612
|
+
engine: c.engine
|
|
2391
2613
|
}
|
|
2392
2614
|
});
|
|
2393
2615
|
} catch {
|
|
2394
2616
|
}
|
|
2395
2617
|
}, u = async () => {
|
|
2396
|
-
|
|
2397
|
-
...
|
|
2618
|
+
m((y) => ({
|
|
2619
|
+
...y,
|
|
2398
2620
|
location: "...",
|
|
2399
2621
|
loadingLocation: !0
|
|
2400
2622
|
}));
|
|
2401
2623
|
try {
|
|
2402
|
-
const
|
|
2624
|
+
const y = Date.now(), x = await or(), _ = await $({
|
|
2403
2625
|
accessToken: await a(),
|
|
2404
|
-
type:
|
|
2626
|
+
type: D.GET_LOCATION,
|
|
2405
2627
|
params: {
|
|
2406
|
-
latitude:
|
|
2407
|
-
longitude:
|
|
2628
|
+
latitude: x.latitude,
|
|
2629
|
+
longitude: x.longitude
|
|
2408
2630
|
}
|
|
2409
|
-
}),
|
|
2410
|
-
if (
|
|
2411
|
-
const { city:
|
|
2412
|
-
|
|
2413
|
-
...
|
|
2631
|
+
}), R = Date.now() - y;
|
|
2632
|
+
if (R < 2e3 && await new Promise((C) => setTimeout(C, 2e3 - R)), _.status === 200) {
|
|
2633
|
+
const { city: C, state: U, country: j, displayName: K } = _.data, re = C && U && j ? `${C}, ${U}, ${j}` : K;
|
|
2634
|
+
m((oe) => ({
|
|
2635
|
+
...oe,
|
|
2414
2636
|
loaded: !0,
|
|
2415
|
-
location:
|
|
2637
|
+
location: re,
|
|
2416
2638
|
loadingLocation: !1
|
|
2417
2639
|
}));
|
|
2418
2640
|
} else
|
|
2419
|
-
|
|
2420
|
-
...
|
|
2641
|
+
m((C) => ({
|
|
2642
|
+
...C,
|
|
2421
2643
|
loaded: !0,
|
|
2422
2644
|
location: "",
|
|
2423
2645
|
loadingLocation: !1
|
|
2424
2646
|
}));
|
|
2425
2647
|
} catch {
|
|
2426
2648
|
}
|
|
2427
|
-
},
|
|
2428
|
-
|
|
2429
|
-
...
|
|
2430
|
-
engine:
|
|
2649
|
+
}, v = (y) => {
|
|
2650
|
+
m((x) => ({
|
|
2651
|
+
...x,
|
|
2652
|
+
engine: y ? ne : Z
|
|
2431
2653
|
}));
|
|
2432
|
-
},
|
|
2433
|
-
|
|
2434
|
-
...
|
|
2435
|
-
engine:
|
|
2654
|
+
}, T = (y) => {
|
|
2655
|
+
m((x) => ({
|
|
2656
|
+
...x,
|
|
2657
|
+
engine: y ? Z : ne
|
|
2436
2658
|
}));
|
|
2659
|
+
}, N = () => {
|
|
2660
|
+
i(!s);
|
|
2437
2661
|
};
|
|
2438
2662
|
return G(() => {
|
|
2439
2663
|
if (!e || !n) {
|
|
2440
|
-
|
|
2664
|
+
m({
|
|
2441
2665
|
loaded: !1,
|
|
2442
2666
|
loadingLocation: !1,
|
|
2443
2667
|
instructions: "",
|
|
2444
2668
|
location: "",
|
|
2445
|
-
engine:
|
|
2669
|
+
engine: le
|
|
2446
2670
|
});
|
|
2447
2671
|
return;
|
|
2448
2672
|
}
|
|
2449
2673
|
(async () => {
|
|
2450
2674
|
try {
|
|
2451
|
-
const
|
|
2675
|
+
const y = await $({
|
|
2452
2676
|
accessToken: await a(),
|
|
2453
|
-
type:
|
|
2677
|
+
type: D.GET_USER_PREFERENCES,
|
|
2454
2678
|
params: {
|
|
2455
2679
|
user: n.username
|
|
2456
2680
|
}
|
|
2457
2681
|
});
|
|
2458
|
-
|
|
2459
|
-
...
|
|
2682
|
+
y.status === 200 && m((x) => ({
|
|
2683
|
+
...x,
|
|
2460
2684
|
loaded: !0,
|
|
2461
|
-
instructions:
|
|
2462
|
-
location:
|
|
2463
|
-
engine:
|
|
2685
|
+
instructions: y.data.instructions || "",
|
|
2686
|
+
location: y.data.location || "",
|
|
2687
|
+
engine: y.data.engine || le
|
|
2464
2688
|
}));
|
|
2465
2689
|
} catch {
|
|
2466
2690
|
}
|
|
2467
2691
|
})();
|
|
2468
|
-
}, [n, e]), /* @__PURE__ */ o(
|
|
2469
|
-
|
|
2692
|
+
}, [n, e]), /* @__PURE__ */ o(
|
|
2693
|
+
te,
|
|
2470
2694
|
{
|
|
2471
2695
|
open: e,
|
|
2472
2696
|
onOpenChange: t,
|
|
2473
|
-
title:
|
|
2474
|
-
footer: /* @__PURE__ */
|
|
2697
|
+
title: tr,
|
|
2698
|
+
footer: /* @__PURE__ */ k(
|
|
2475
2699
|
H,
|
|
2476
2700
|
{
|
|
2477
2701
|
columnGap: 2,
|
|
2478
2702
|
alignHorizontal: "flex-end",
|
|
2479
2703
|
className: "pb-8 sm:pb-0",
|
|
2480
2704
|
children: [
|
|
2481
|
-
/* @__PURE__ */ o(
|
|
2705
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
2482
2706
|
F,
|
|
2483
2707
|
{
|
|
2484
2708
|
mode: "dark",
|
|
@@ -2490,14 +2714,14 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2490
2714
|
children: "Cancel"
|
|
2491
2715
|
}
|
|
2492
2716
|
) }),
|
|
2493
|
-
/* @__PURE__ */ o(
|
|
2717
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
2494
2718
|
F,
|
|
2495
2719
|
{
|
|
2496
2720
|
mode: "dark",
|
|
2497
2721
|
variant: "danger",
|
|
2498
2722
|
focusMode: "light",
|
|
2499
|
-
onClick: async (
|
|
2500
|
-
t(!1), await
|
|
2723
|
+
onClick: async (y) => {
|
|
2724
|
+
t(!1), await h(y);
|
|
2501
2725
|
},
|
|
2502
2726
|
children: "Save"
|
|
2503
2727
|
}
|
|
@@ -2505,64 +2729,87 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2505
2729
|
]
|
|
2506
2730
|
}
|
|
2507
2731
|
),
|
|
2508
|
-
children: /* @__PURE__ */
|
|
2509
|
-
/* @__PURE__ */
|
|
2510
|
-
|
|
2732
|
+
children: /* @__PURE__ */ k(M, { children: [
|
|
2733
|
+
s && /* @__PURE__ */ o(ia, { open: s, onOpenChange: i }),
|
|
2734
|
+
/* @__PURE__ */ k(
|
|
2735
|
+
L,
|
|
2511
2736
|
{
|
|
2512
|
-
header:
|
|
2737
|
+
header: E.SETTINGS_ENGINE.TITLE,
|
|
2513
2738
|
className: "prose-dark dark:prose-lighter",
|
|
2514
2739
|
children: [
|
|
2515
|
-
/* @__PURE__ */ o("p", { children: "Select the AI engine that will be used to generate responses." }),
|
|
2740
|
+
/* @__PURE__ */ o("p", { className: "text-xs", children: "Select the AI engine that will be used to generate responses." }),
|
|
2516
2741
|
/* @__PURE__ */ o(
|
|
2517
|
-
|
|
2742
|
+
ie,
|
|
2518
2743
|
{
|
|
2519
2744
|
noBorder: !0,
|
|
2520
|
-
label:
|
|
2521
|
-
name:
|
|
2522
|
-
onChange:
|
|
2523
|
-
checked:
|
|
2745
|
+
label: ne,
|
|
2746
|
+
name: ne,
|
|
2747
|
+
onChange: v,
|
|
2748
|
+
checked: c.engine === ne
|
|
2524
2749
|
}
|
|
2525
2750
|
),
|
|
2526
2751
|
/* @__PURE__ */ o(
|
|
2527
|
-
|
|
2752
|
+
ie,
|
|
2528
2753
|
{
|
|
2529
2754
|
className: "mt-2",
|
|
2530
2755
|
noBorder: !0,
|
|
2531
|
-
label:
|
|
2532
|
-
name:
|
|
2533
|
-
onChange:
|
|
2534
|
-
checked:
|
|
2756
|
+
label: Z,
|
|
2757
|
+
name: Z,
|
|
2758
|
+
onChange: T,
|
|
2759
|
+
checked: c.engine === Z
|
|
2535
2760
|
}
|
|
2536
2761
|
),
|
|
2537
|
-
/* @__PURE__ */ o("p", { className: "text-xs", children: "
|
|
2762
|
+
/* @__PURE__ */ o("p", { className: "text-xs", children: "This option introduces a new menu at the top of the screen, enabling you to quickly switch between engines." }),
|
|
2538
2763
|
/* @__PURE__ */ o(
|
|
2539
|
-
|
|
2764
|
+
ie,
|
|
2540
2765
|
{
|
|
2541
2766
|
className: "mt-2",
|
|
2542
2767
|
noBorder: !0,
|
|
2543
|
-
label: "Show Quick Engine Toggle",
|
|
2768
|
+
label: "Show Quick Engine Toggle Menu",
|
|
2544
2769
|
name: "show-toggle-engine-menu",
|
|
2545
|
-
onChange:
|
|
2546
|
-
checked:
|
|
2770
|
+
onChange: d,
|
|
2771
|
+
checked: l
|
|
2772
|
+
}
|
|
2773
|
+
),
|
|
2774
|
+
/* @__PURE__ */ o("p", { className: "text-xs", children: "This option adds individual statistics for each messages under their respective bubbles, such as processing time, model name, and more." }),
|
|
2775
|
+
/* @__PURE__ */ o(
|
|
2776
|
+
ie,
|
|
2777
|
+
{
|
|
2778
|
+
className: "mt-2",
|
|
2779
|
+
noBorder: !0,
|
|
2780
|
+
label: "Show Message Statistics",
|
|
2781
|
+
name: "show-message-statistics",
|
|
2782
|
+
onChange: b,
|
|
2783
|
+
checked: f
|
|
2547
2784
|
}
|
|
2548
2785
|
),
|
|
2549
|
-
/* @__PURE__ */ o("
|
|
2786
|
+
/* @__PURE__ */ o("h3", { className: "border-b-2 border-slate-400", children: "Tags" }),
|
|
2787
|
+
/* @__PURE__ */ o(
|
|
2788
|
+
Q,
|
|
2789
|
+
{
|
|
2790
|
+
className: "mt-2",
|
|
2791
|
+
size: "small",
|
|
2792
|
+
onClick: N,
|
|
2793
|
+
labelLeft: "Edit Custom Tags",
|
|
2794
|
+
children: /* @__PURE__ */ o(Cr, { size: "size-3", monotone: !0 })
|
|
2795
|
+
}
|
|
2796
|
+
)
|
|
2550
2797
|
]
|
|
2551
2798
|
}
|
|
2552
2799
|
),
|
|
2553
|
-
/* @__PURE__ */
|
|
2554
|
-
|
|
2800
|
+
/* @__PURE__ */ k(
|
|
2801
|
+
L,
|
|
2555
2802
|
{
|
|
2556
2803
|
header: "Custom Instructions",
|
|
2557
2804
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
2558
2805
|
children: [
|
|
2559
|
-
/* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ k("p", { children: [
|
|
2560
2807
|
"What would you like ",
|
|
2561
|
-
/* @__PURE__ */ o("em", { children:
|
|
2808
|
+
/* @__PURE__ */ o("em", { children: rr }),
|
|
2562
2809
|
" to know about you to provide better responses?"
|
|
2563
2810
|
] }),
|
|
2564
2811
|
/* @__PURE__ */ o(
|
|
2565
|
-
|
|
2812
|
+
Ge,
|
|
2566
2813
|
{
|
|
2567
2814
|
mode: "alt-system",
|
|
2568
2815
|
autoCapitalize: "off",
|
|
@@ -2570,12 +2817,12 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2570
2817
|
autoCorrect: "off",
|
|
2571
2818
|
name: "customInstructions",
|
|
2572
2819
|
label: "Custom Instructions",
|
|
2573
|
-
value:
|
|
2574
|
-
onChange: (
|
|
2575
|
-
|
|
2576
|
-
...
|
|
2820
|
+
value: c.instructions,
|
|
2821
|
+
onChange: (y) => {
|
|
2822
|
+
m((x) => ({
|
|
2823
|
+
...x,
|
|
2577
2824
|
loaded: !0,
|
|
2578
|
-
instructions:
|
|
2825
|
+
instructions: y.target.value
|
|
2579
2826
|
}));
|
|
2580
2827
|
},
|
|
2581
2828
|
helperText: "Press ENTER to add a new line."
|
|
@@ -2584,25 +2831,25 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2584
2831
|
]
|
|
2585
2832
|
}
|
|
2586
2833
|
),
|
|
2587
|
-
/* @__PURE__ */
|
|
2588
|
-
|
|
2834
|
+
/* @__PURE__ */ k(
|
|
2835
|
+
L,
|
|
2589
2836
|
{
|
|
2590
2837
|
header: "Location",
|
|
2591
2838
|
className: "prose-dark dark:prose-lighter mt-4",
|
|
2592
2839
|
children: [
|
|
2593
2840
|
/* @__PURE__ */ o("p", { children: "You can share your location to receive customized responses based on your area." }),
|
|
2594
2841
|
/* @__PURE__ */ o(
|
|
2595
|
-
|
|
2842
|
+
Ge,
|
|
2596
2843
|
{
|
|
2597
2844
|
mode: "alt-system",
|
|
2598
2845
|
name: "location",
|
|
2599
2846
|
label: "Location",
|
|
2600
|
-
value:
|
|
2601
|
-
onChange: (
|
|
2602
|
-
|
|
2603
|
-
...
|
|
2847
|
+
value: c.location,
|
|
2848
|
+
onChange: (y) => {
|
|
2849
|
+
m((x) => ({
|
|
2850
|
+
...x,
|
|
2604
2851
|
loaded: !0,
|
|
2605
|
-
location:
|
|
2852
|
+
location: y.target.value
|
|
2606
2853
|
}));
|
|
2607
2854
|
},
|
|
2608
2855
|
helperText: "Enter your location or press auto-detect."
|
|
@@ -2614,9 +2861,9 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2614
2861
|
className: "mt-2",
|
|
2615
2862
|
size: "small",
|
|
2616
2863
|
noBorder: !0,
|
|
2617
|
-
disabled:
|
|
2864
|
+
disabled: c.loadingLocation,
|
|
2618
2865
|
onClick: u,
|
|
2619
|
-
children:
|
|
2866
|
+
children: c.loadingLocation ? "Detecting..." : "Auto-detect"
|
|
2620
2867
|
}
|
|
2621
2868
|
)
|
|
2622
2869
|
]
|
|
@@ -2624,378 +2871,134 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
2624
2871
|
)
|
|
2625
2872
|
] })
|
|
2626
2873
|
}
|
|
2627
|
-
) });
|
|
2628
|
-
}, na = ({
|
|
2629
|
-
open: e,
|
|
2630
|
-
onOpenChange: t
|
|
2631
|
-
}) => {
|
|
2632
|
-
const { state: r, dispatch: a } = B(cr), { getAccessToken: n, user: i } = Y(), [s, c] = I({
|
|
2633
|
-
tags: [...r.tags]
|
|
2634
|
-
}), g = ({
|
|
2635
|
-
slot: u,
|
|
2636
|
-
checked: p,
|
|
2637
|
-
label: b,
|
|
2638
|
-
content: h
|
|
2639
|
-
}) => {
|
|
2640
|
-
c((m) => {
|
|
2641
|
-
const d = m.tags, v = {
|
|
2642
|
-
slot: u,
|
|
2643
|
-
label: b,
|
|
2644
|
-
content: h,
|
|
2645
|
-
enabled: p
|
|
2646
|
-
}, C = d.findIndex((w) => w.slot === u);
|
|
2647
|
-
return C === -1 ? {
|
|
2648
|
-
...m,
|
|
2649
|
-
tags: [...d, { ...v, slot: u }]
|
|
2650
|
-
} : (d[C] = v, {
|
|
2651
|
-
...m,
|
|
2652
|
-
tags: [...d]
|
|
2653
|
-
});
|
|
2654
|
-
});
|
|
2655
|
-
}, l = async (u) => {
|
|
2656
|
-
u.preventDefault();
|
|
2657
|
-
try {
|
|
2658
|
-
await D({
|
|
2659
|
-
accessToken: await n(),
|
|
2660
|
-
type: V.SET_USER_PREFERENCES,
|
|
2661
|
-
params: {
|
|
2662
|
-
user: i == null ? void 0 : i.username,
|
|
2663
|
-
tags: s.tags
|
|
2664
|
-
}
|
|
2665
|
-
}), a({
|
|
2666
|
-
type: Jt,
|
|
2667
|
-
payload: {
|
|
2668
|
-
tags: s.tags
|
|
2669
|
-
}
|
|
2670
|
-
});
|
|
2671
|
-
} catch {
|
|
2672
|
-
}
|
|
2673
|
-
};
|
|
2674
|
-
return /* @__PURE__ */ y(
|
|
2675
|
-
q,
|
|
2676
|
-
{
|
|
2677
|
-
open: e,
|
|
2678
|
-
onOpenChange: t,
|
|
2679
|
-
title: "Tags",
|
|
2680
|
-
footer: /* @__PURE__ */ y(
|
|
2681
|
-
H,
|
|
2682
|
-
{
|
|
2683
|
-
columnGap: 2,
|
|
2684
|
-
alignHorizontal: "flex-end",
|
|
2685
|
-
className: "pb-8 sm:pb-0",
|
|
2686
|
-
children: [
|
|
2687
|
-
/* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(
|
|
2688
|
-
F,
|
|
2689
|
-
{
|
|
2690
|
-
mode: "dark",
|
|
2691
|
-
variant: "secondary",
|
|
2692
|
-
focusMode: "light",
|
|
2693
|
-
onClick: () => {
|
|
2694
|
-
t(!1);
|
|
2695
|
-
},
|
|
2696
|
-
children: "Cancel"
|
|
2697
|
-
}
|
|
2698
|
-
) }),
|
|
2699
|
-
/* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(
|
|
2700
|
-
F,
|
|
2701
|
-
{
|
|
2702
|
-
mode: "dark",
|
|
2703
|
-
variant: "danger",
|
|
2704
|
-
focusMode: "light",
|
|
2705
|
-
onClick: async (u) => {
|
|
2706
|
-
t(!1), await l(u);
|
|
2707
|
-
},
|
|
2708
|
-
children: "Save"
|
|
2709
|
-
}
|
|
2710
|
-
) })
|
|
2711
|
-
]
|
|
2712
|
-
}
|
|
2713
|
-
),
|
|
2714
|
-
children: [
|
|
2715
|
-
/* @__PURE__ */ o("p", { children: Xt }),
|
|
2716
|
-
s.tags && s.tags.map((u) => /* @__PURE__ */ y(
|
|
2717
|
-
P,
|
|
2718
|
-
{
|
|
2719
|
-
header: `Tag ${u.slot + 1}`,
|
|
2720
|
-
className: "prose-dark dark:prose-lighter mb-2",
|
|
2721
|
-
children: [
|
|
2722
|
-
/* @__PURE__ */ y(H, { className: "mt-8 mb-6", columnGap: 2, rowGap: 6, children: [
|
|
2723
|
-
/* @__PURE__ */ o(_, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
|
|
2724
|
-
xe,
|
|
2725
|
-
{
|
|
2726
|
-
label: "Label",
|
|
2727
|
-
name: `tag${u.slot}-label`,
|
|
2728
|
-
value: u.label,
|
|
2729
|
-
onChange: (p) => {
|
|
2730
|
-
g({
|
|
2731
|
-
slot: u.slot,
|
|
2732
|
-
checked: u.enabled,
|
|
2733
|
-
label: p.target.value,
|
|
2734
|
-
content: u.content
|
|
2735
|
-
});
|
|
2736
|
-
}
|
|
2737
|
-
}
|
|
2738
|
-
) }),
|
|
2739
|
-
/* @__PURE__ */ o(_, { span: { fallback: 12, sm: 6 }, children: /* @__PURE__ */ o(
|
|
2740
|
-
xe,
|
|
2741
|
-
{
|
|
2742
|
-
label: "Content",
|
|
2743
|
-
name: `tag${u.slot}-content`,
|
|
2744
|
-
value: u.content,
|
|
2745
|
-
onChange: (p) => {
|
|
2746
|
-
g({
|
|
2747
|
-
slot: u.slot,
|
|
2748
|
-
checked: u.enabled,
|
|
2749
|
-
label: u.label,
|
|
2750
|
-
content: p.target.value
|
|
2751
|
-
});
|
|
2752
|
-
}
|
|
2753
|
-
}
|
|
2754
|
-
) })
|
|
2755
|
-
] }),
|
|
2756
|
-
/* @__PURE__ */ o(
|
|
2757
|
-
re,
|
|
2758
|
-
{
|
|
2759
|
-
className: "mt-2",
|
|
2760
|
-
noBorder: !0,
|
|
2761
|
-
label: "Enabled",
|
|
2762
|
-
name: u.slot.toString(),
|
|
2763
|
-
onChange: (p) => {
|
|
2764
|
-
g({
|
|
2765
|
-
slot: u.slot,
|
|
2766
|
-
checked: p,
|
|
2767
|
-
label: u.label,
|
|
2768
|
-
content: u.content
|
|
2769
|
-
});
|
|
2770
|
-
},
|
|
2771
|
-
checked: u.enabled
|
|
2772
|
-
}
|
|
2773
|
-
)
|
|
2774
|
-
]
|
|
2775
|
-
},
|
|
2776
|
-
`tag-slot-${u.slot}`
|
|
2777
|
-
))
|
|
2778
|
-
]
|
|
2779
|
-
}
|
|
2780
2874
|
);
|
|
2781
|
-
},
|
|
2782
|
-
const {
|
|
2783
|
-
key:
|
|
2784
|
-
initialValue: !1
|
|
2785
|
-
}), [s, c] = I(!1), [g, l] = I(!1), u = ae(), p = (t == null ? void 0 : t.username) || "", b = (d) => {
|
|
2786
|
-
i(d);
|
|
2787
|
-
}, h = () => {
|
|
2788
|
-
c(!s);
|
|
2789
|
-
}, m = () => {
|
|
2790
|
-
l(!g);
|
|
2791
|
-
};
|
|
2792
|
-
return e && p ? /* @__PURE__ */ y(R, { children: [
|
|
2793
|
-
s && /* @__PURE__ */ o(
|
|
2794
|
-
aa,
|
|
2795
|
-
{
|
|
2796
|
-
open: s,
|
|
2797
|
-
onOpenChange: c
|
|
2798
|
-
}
|
|
2799
|
-
),
|
|
2800
|
-
g && /* @__PURE__ */ o(na, { open: g, onOpenChange: l }),
|
|
2801
|
-
/* @__PURE__ */ y(
|
|
2802
|
-
P,
|
|
2803
|
-
{
|
|
2804
|
-
header: N.PREFERENCES.TITLE,
|
|
2805
|
-
className: "prose-dark dark:prose-lighter",
|
|
2806
|
-
children: [
|
|
2807
|
-
oe(u, {
|
|
2808
|
-
[N.PREFERENCES.NAME]: p,
|
|
2809
|
-
[N.PREFERENCES.EMAIL]: (t == null ? void 0 : t.email) || "",
|
|
2810
|
-
[N.PREFERENCES.ENGINE_DETAILS]: /* @__PURE__ */ o(
|
|
2811
|
-
re,
|
|
2812
|
-
{
|
|
2813
|
-
noBorder: !0,
|
|
2814
|
-
labelHidden: !0,
|
|
2815
|
-
label: N.PREFERENCES.ENGINE_DETAILS,
|
|
2816
|
-
name: N.PREFERENCES.ENGINE_DETAILS,
|
|
2817
|
-
onChange: b,
|
|
2818
|
-
checked: n
|
|
2819
|
-
}
|
|
2820
|
-
)
|
|
2821
|
-
}),
|
|
2822
|
-
/* @__PURE__ */ o(
|
|
2823
|
-
K,
|
|
2824
|
-
{
|
|
2825
|
-
className: "mt-2",
|
|
2826
|
-
size: "small",
|
|
2827
|
-
onClick: h,
|
|
2828
|
-
labelLeft: "Engine Fine Tuning",
|
|
2829
|
-
children: /* @__PURE__ */ o(Ge, { size: "size-3", monotone: !0 })
|
|
2830
|
-
}
|
|
2831
|
-
),
|
|
2832
|
-
/* @__PURE__ */ o(
|
|
2833
|
-
K,
|
|
2834
|
-
{
|
|
2835
|
-
className: "mt-2 ml-2",
|
|
2836
|
-
size: "small",
|
|
2837
|
-
onClick: m,
|
|
2838
|
-
labelLeft: "Tags",
|
|
2839
|
-
children: /* @__PURE__ */ o(Ge, { size: "size-3", monotone: !0 })
|
|
2840
|
-
}
|
|
2841
|
-
)
|
|
2842
|
-
]
|
|
2843
|
-
}
|
|
2844
|
-
),
|
|
2845
|
-
a !== tr.PASSKEY && /* @__PURE__ */ y(
|
|
2846
|
-
P,
|
|
2847
|
-
{
|
|
2848
|
-
className: "prose-dark dark:prose-lighter mt-4",
|
|
2849
|
-
header: /* @__PURE__ */ o("h2", { className: "m-0", children: /* @__PURE__ */ y(H, { columnGap: 3, alignVertical: "center", children: [
|
|
2850
|
-
/* @__PURE__ */ o(_, { children: /* @__PURE__ */ o($e, { size: "size-8" }) }),
|
|
2851
|
-
/* @__PURE__ */ o(_, { children: /* @__PURE__ */ o("div", { children: N.PREFERENCES.PASSKEY_TITLE }) })
|
|
2852
|
-
] }) }),
|
|
2853
|
-
children: [
|
|
2854
|
-
/* @__PURE__ */ o("p", { children: N.PREFERENCES.PASSKEY_INSTRUCTIONS }),
|
|
2855
|
-
/* @__PURE__ */ o(
|
|
2856
|
-
K,
|
|
2857
|
-
{
|
|
2858
|
-
size: "small",
|
|
2859
|
-
className: "mt-2",
|
|
2860
|
-
onClick: r,
|
|
2861
|
-
labelLeft: N.PREFERENCES.PASSKEY_BUTTON,
|
|
2862
|
-
children: /* @__PURE__ */ o($e, { size: "size-5", monotone: !0 })
|
|
2863
|
-
}
|
|
2864
|
-
)
|
|
2865
|
-
]
|
|
2866
|
-
}
|
|
2867
|
-
)
|
|
2868
|
-
] }) : null;
|
|
2869
|
-
}, ia = ({
|
|
2870
|
-
open: e,
|
|
2871
|
-
onOpenChange: t
|
|
2872
|
-
}) => /* @__PURE__ */ o(q, { open: e, onOpenChange: t, title: rr, children: /* @__PURE__ */ o(sa, {}) }), fa = () => {
|
|
2873
|
-
const { state: e, dispatch: t, serverStats: r } = B(ie), [a, n] = I((e == null ? void 0 : e.engine) || te), [i, s] = I(!1), [c, g] = I(!1), [l, u] = I(!1), [p, b] = I(!1), [h, m] = I(!1), [d] = ce({
|
|
2874
|
-
key: se + et,
|
|
2875
|
+
}, pa = () => {
|
|
2876
|
+
const { state: e, dispatch: t, serverStats: r } = P(ge), [a, n] = S((e == null ? void 0 : e.engine) || le), [s, i] = S(!1), [c, m] = S(!1), [l, d] = S(!1), [f, p] = S(!1), [b, h] = S(!1), [u] = me({
|
|
2877
|
+
key: ue + Je,
|
|
2875
2878
|
initialValue: !1
|
|
2876
|
-
}), { logout: v, getAccessToken:
|
|
2877
|
-
|
|
2878
|
-
},
|
|
2879
|
-
|
|
2880
|
-
},
|
|
2881
|
-
|
|
2882
|
-
},
|
|
2883
|
-
|
|
2884
|
-
},
|
|
2885
|
-
|
|
2879
|
+
}), { logout: v, getAccessToken: T, user: N } = X(), y = () => {
|
|
2880
|
+
i(!s);
|
|
2881
|
+
}, x = () => {
|
|
2882
|
+
m(!c);
|
|
2883
|
+
}, _ = () => {
|
|
2884
|
+
d(!l);
|
|
2885
|
+
}, B = () => {
|
|
2886
|
+
p(!f);
|
|
2887
|
+
}, R = () => {
|
|
2888
|
+
h(!b);
|
|
2886
2889
|
};
|
|
2887
2890
|
return G(() => {
|
|
2888
2891
|
e && e.engine && e.engine !== a && n(e.engine);
|
|
2889
|
-
}, [e, a]), /* @__PURE__ */
|
|
2892
|
+
}, [e, a]), /* @__PURE__ */ k(M, { children: [
|
|
2890
2893
|
/* @__PURE__ */ o(
|
|
2891
2894
|
Pt,
|
|
2892
2895
|
{
|
|
2893
|
-
showConfirmation:
|
|
2894
|
-
setShowConfirmation:
|
|
2896
|
+
showConfirmation: b,
|
|
2897
|
+
setShowConfirmation: h,
|
|
2895
2898
|
action: v,
|
|
2896
2899
|
customStrings: {
|
|
2897
|
-
confirmAction:
|
|
2900
|
+
confirmAction: He,
|
|
2898
2901
|
cancelAction: "Cancel",
|
|
2899
|
-
title:
|
|
2902
|
+
title: He
|
|
2900
2903
|
},
|
|
2901
2904
|
children: /* @__PURE__ */ o("p", { children: "Are you sure you want to log out?" })
|
|
2902
2905
|
}
|
|
2903
2906
|
),
|
|
2904
|
-
/* @__PURE__ */ o(
|
|
2905
|
-
/* @__PURE__ */ o(
|
|
2906
|
-
/* @__PURE__ */ o(
|
|
2907
|
-
/* @__PURE__ */ o(
|
|
2908
|
-
/* @__PURE__ */ o("div", { className: "
|
|
2909
|
-
/* @__PURE__ */ o(
|
|
2910
|
-
/* @__PURE__ */ o(
|
|
2911
|
-
|
|
2912
|
-
|
|
2907
|
+
/* @__PURE__ */ o(Zo, { open: s, onOpenChange: i }),
|
|
2908
|
+
/* @__PURE__ */ o(ca, { open: c, onOpenChange: m }),
|
|
2909
|
+
/* @__PURE__ */ o(Wo, { open: l, onOpenChange: d }),
|
|
2910
|
+
/* @__PURE__ */ o(Go, { open: f, onOpenChange: p }),
|
|
2911
|
+
/* @__PURE__ */ o("div", { className: "bg-slate-900 py-4 px-4 rounded-t-md", children: /* @__PURE__ */ k(H, { alignHorizontal: "space-between", alignVertical: "center", children: [
|
|
2912
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(dr, { mode: "dark", radius: "large" }) }),
|
|
2913
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ k(H, { children: [
|
|
2914
|
+
u && r && /* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
2915
|
+
Se,
|
|
2913
2916
|
{
|
|
2914
2917
|
mode: "dark",
|
|
2915
2918
|
focusMode: "light",
|
|
2916
|
-
trigger: /* @__PURE__ */ o(
|
|
2919
|
+
trigger: /* @__PURE__ */ o(Q, { className: "mr-2", children: e && e.engine === Z ? /* @__PURE__ */ o(mt, {}) : /* @__PURE__ */ o(ht, {}) }),
|
|
2917
2920
|
defaultPlacement: "bottom-start",
|
|
2918
|
-
children: /* @__PURE__ */ o(
|
|
2919
|
-
|
|
2921
|
+
children: /* @__PURE__ */ o(W, { raw: !0, ignoreClick: !0, children: /* @__PURE__ */ o(
|
|
2922
|
+
ko,
|
|
2920
2923
|
{
|
|
2921
2924
|
size: "small",
|
|
2922
2925
|
mode: "dark",
|
|
2923
2926
|
focusMode: "light",
|
|
2924
2927
|
value: a,
|
|
2925
|
-
onValueChange: async (
|
|
2926
|
-
if (
|
|
2928
|
+
onValueChange: async (C) => {
|
|
2929
|
+
if (C)
|
|
2927
2930
|
try {
|
|
2928
|
-
await
|
|
2929
|
-
accessToken: await
|
|
2930
|
-
type:
|
|
2931
|
+
await $({
|
|
2932
|
+
accessToken: await T(),
|
|
2933
|
+
type: D.SET_USER_PREFERENCES,
|
|
2931
2934
|
params: {
|
|
2932
|
-
user:
|
|
2933
|
-
engine:
|
|
2935
|
+
user: N == null ? void 0 : N.username,
|
|
2936
|
+
engine: C
|
|
2934
2937
|
}
|
|
2935
2938
|
}), t({
|
|
2936
|
-
type:
|
|
2939
|
+
type: et,
|
|
2937
2940
|
payload: {
|
|
2938
|
-
engine:
|
|
2941
|
+
engine: C
|
|
2939
2942
|
}
|
|
2940
2943
|
}), t({
|
|
2941
|
-
type:
|
|
2944
|
+
type: Ze
|
|
2942
2945
|
});
|
|
2943
2946
|
} catch {
|
|
2944
2947
|
}
|
|
2945
2948
|
},
|
|
2946
|
-
children: r && r.engines.map((
|
|
2949
|
+
children: r && r.engines.map((C) => /* @__PURE__ */ o(wo, { value: C }, C))
|
|
2947
2950
|
}
|
|
2948
2951
|
) })
|
|
2949
2952
|
}
|
|
2950
2953
|
) }),
|
|
2951
|
-
/* @__PURE__ */ o(
|
|
2952
|
-
|
|
2954
|
+
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ k(
|
|
2955
|
+
Se,
|
|
2953
2956
|
{
|
|
2954
2957
|
mode: "dark",
|
|
2955
2958
|
focusMode: "light",
|
|
2956
|
-
trigger: /* @__PURE__ */ o(
|
|
2959
|
+
trigger: /* @__PURE__ */ o(Q, { children: /* @__PURE__ */ o(_r, {}) }),
|
|
2957
2960
|
defaultPlacement: "bottom-end",
|
|
2958
2961
|
children: [
|
|
2959
2962
|
/* @__PURE__ */ o(
|
|
2960
|
-
|
|
2963
|
+
W,
|
|
2961
2964
|
{
|
|
2962
2965
|
label: "Profile",
|
|
2963
|
-
onClick:
|
|
2964
|
-
icon: /* @__PURE__ */ o(
|
|
2966
|
+
onClick: y,
|
|
2967
|
+
icon: /* @__PURE__ */ o(Ir, {})
|
|
2965
2968
|
}
|
|
2966
2969
|
),
|
|
2967
2970
|
/* @__PURE__ */ o(
|
|
2968
|
-
|
|
2971
|
+
W,
|
|
2969
2972
|
{
|
|
2970
|
-
label:
|
|
2971
|
-
onClick:
|
|
2972
|
-
icon: /* @__PURE__ */ o(
|
|
2973
|
+
label: "Settings",
|
|
2974
|
+
onClick: x,
|
|
2975
|
+
icon: /* @__PURE__ */ o(Rr, {})
|
|
2973
2976
|
}
|
|
2974
2977
|
),
|
|
2975
2978
|
/* @__PURE__ */ o(
|
|
2976
|
-
|
|
2979
|
+
W,
|
|
2977
2980
|
{
|
|
2978
2981
|
label: "History",
|
|
2979
|
-
onClick:
|
|
2980
|
-
icon: /* @__PURE__ */ o(
|
|
2982
|
+
onClick: _,
|
|
2983
|
+
icon: /* @__PURE__ */ o(xr, {})
|
|
2981
2984
|
}
|
|
2982
2985
|
),
|
|
2983
2986
|
/* @__PURE__ */ o(
|
|
2984
|
-
|
|
2987
|
+
W,
|
|
2985
2988
|
{
|
|
2986
2989
|
label: "About",
|
|
2987
|
-
onClick:
|
|
2988
|
-
icon: /* @__PURE__ */ o(
|
|
2990
|
+
onClick: B,
|
|
2991
|
+
icon: /* @__PURE__ */ o(Er, {})
|
|
2989
2992
|
}
|
|
2990
2993
|
),
|
|
2991
|
-
e && e.id && !e.isComponent && /* @__PURE__ */
|
|
2992
|
-
/* @__PURE__ */ o(
|
|
2994
|
+
e && e.id && !e.isComponent && /* @__PURE__ */ k(M, { children: [
|
|
2995
|
+
/* @__PURE__ */ o(Ar, {}),
|
|
2993
2996
|
/* @__PURE__ */ o(
|
|
2994
|
-
|
|
2997
|
+
W,
|
|
2995
2998
|
{
|
|
2996
2999
|
label: "Log out",
|
|
2997
|
-
onClick:
|
|
2998
|
-
icon: /* @__PURE__ */ o("div", { className: "text-red-700", children: /* @__PURE__ */ o(
|
|
3000
|
+
onClick: R,
|
|
3001
|
+
icon: /* @__PURE__ */ o("div", { className: "text-red-700", children: /* @__PURE__ */ o(Tr, { monotone: !0 }) })
|
|
2999
3002
|
}
|
|
3000
3003
|
)
|
|
3001
3004
|
] })
|
|
@@ -3007,5 +3010,5 @@ const qo = "av-toggle", Zo = () => k("peer", "h-6", "w-11", "rounded-full"), Qo
|
|
|
3007
3010
|
] });
|
|
3008
3011
|
};
|
|
3009
3012
|
export {
|
|
3010
|
-
|
|
3013
|
+
pa as default
|
|
3011
3014
|
};
|