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