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