@versini/sassysaint 5.4.14 → 5.4.15
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.nhzP-Nbc.js → LazyApp.CmWxSgb_.js} +356 -357
- package/dist/chunks/{LazyHeader.CCjVT4z8.js → LazyHeader.CmyI3orp.js} +29 -29
- package/dist/chunks/{LazyMarkdownWithExtra.aWPJfbF0.js → LazyMarkdownWithExtra.bTU0zWSE.js} +2 -2
- package/dist/chunks/{LazyMessageAssistant.Bpza5zkH.js → LazyMessageAssistant.BkIqe55j.js} +8 -8
- package/dist/chunks/{index.CYifYdxQ.js → index.D8QVMbN9.js} +729 -826
- package/dist/chunks/{index.8mgE_tU8.js → index.Dn9p043U.js} +318 -288
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { g as we, ACTION_RESTORE as Ne, ACTION_MESSAGE as S, ROLE_ASSISTANT as E, ACTION_RESET as ie, ACTION_MODEL as de, ACTION_ENGINE as
|
|
3
|
-
import {
|
|
4
|
-
import C, {
|
|
1
|
+
import { jsx as s, jsxs as v, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { g as we, ACTION_RESTORE as Ne, ACTION_MESSAGE as S, ROLE_ASSISTANT as E, ACTION_RESET as ie, ACTION_MODEL as de, ACTION_ENGINE as se, ACTION_STREAMING as ne, ACTION_SORT as Ie, ACTION_SEARCH as Ee, ACTION_SET_TAGS as le, ACTION_RESET_TAGS as ce, ACTION_TOGGLE_TAG as ge, ROLE_INTERNAL as H, ROLE_USER as G, isLastMessageFromRole as me, un as z, getMessageContaintWrapperClass as Ce, MessagesContainerHeader as Se, ROLE_SYSTEM as Re, ROLE_HIDDEN as Be, DEFAULT_AI_ENGINE as M, STATS_SEPARATOR as Y, CLIPBOARD_TAG as q, TYPE_QUESTION as Ae, C as ue, SEND as Me, ERROR_MESSAGE as Le, L as Oe, j as ze, O as Ue, TOOLBOX as X, _ as Ve, LOCAL_STORAGE_PREFIX as J, LOCAL_STORAGE_SEARCH as De, LOCAL_STORAGE_SORT as $e } from "./index.D8QVMbN9.js";
|
|
3
|
+
import { AppContext as U, TagsContext as j, restCall as Ge, Le as He, serviceCall as he, SERVICE_TYPES as be, h as je, E as Q, HistoryContext as Pe, f as We } from "./index.Dn9p043U.js";
|
|
4
|
+
import C, { useState as A, useEffect as _, lazy as Fe, useContext as R, Suspense as Z, useRef as B, useReducer as D } from "react";
|
|
5
5
|
import d from "clsx";
|
|
6
|
-
const
|
|
6
|
+
const Ke = ({
|
|
7
7
|
className: e,
|
|
8
8
|
viewBox: t,
|
|
9
9
|
title: r,
|
|
10
10
|
monotone: a,
|
|
11
11
|
...o
|
|
12
|
-
}) => /* @__PURE__ */
|
|
12
|
+
}) => /* @__PURE__ */ s(
|
|
13
13
|
we,
|
|
14
14
|
{
|
|
15
15
|
defaultViewBox: "0 0 384 512",
|
|
@@ -18,10 +18,10 @@ const Ye = ({
|
|
|
18
18
|
className: e,
|
|
19
19
|
title: r || "Close",
|
|
20
20
|
...o,
|
|
21
|
-
children: /* @__PURE__ */
|
|
21
|
+
children: /* @__PURE__ */ s("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" })
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
|
-
function
|
|
24
|
+
function Ye(e) {
|
|
25
25
|
const t = e.toLowerCase().split("+").map((i) => i.trim()), r = {
|
|
26
26
|
alt: t.includes("alt"),
|
|
27
27
|
ctrl: t.includes("ctrl"),
|
|
@@ -34,53 +34,53 @@ function qe(e) {
|
|
|
34
34
|
key: o
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
const { alt: r, ctrl: a, meta: o, mod: i, shift: g, key:
|
|
39
|
-
if (r !==
|
|
37
|
+
function qe(e, t) {
|
|
38
|
+
const { alt: r, ctrl: a, meta: o, mod: i, shift: g, key: l } = e, { altKey: m, ctrlKey: u, metaKey: b, shiftKey: h, key: c } = t;
|
|
39
|
+
if (r !== m)
|
|
40
40
|
return !1;
|
|
41
41
|
if (i) {
|
|
42
|
-
if (!
|
|
42
|
+
if (!u && !b)
|
|
43
43
|
return !1;
|
|
44
|
-
} else if (a !==
|
|
44
|
+
} else if (a !== u || o !== b)
|
|
45
45
|
return !1;
|
|
46
|
-
return g !== h ? !1 : !!(
|
|
46
|
+
return g !== h ? !1 : !!(l && (c.toLowerCase() === l.toLowerCase() || t.code.replace("Key", "").toLowerCase() === l.toLowerCase()));
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return (t) =>
|
|
48
|
+
function Xe(e) {
|
|
49
|
+
return (t) => qe(Ye(e), t);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Je(e) {
|
|
52
52
|
return (t) => {
|
|
53
53
|
const r = "nativeEvent" in t ? t.nativeEvent : t;
|
|
54
54
|
e.forEach(([a, o, i = { preventDefault: !0 }]) => {
|
|
55
|
-
|
|
55
|
+
Xe(a)(r) && (i.preventDefault && t.preventDefault(), o(r));
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
const y = [];
|
|
60
60
|
for (let e = 0; e < 256; ++e)
|
|
61
61
|
y.push((e + 256).toString(16).slice(1));
|
|
62
|
-
function
|
|
62
|
+
function Qe(e, t = 0) {
|
|
63
63
|
return (y[e[t + 0]] + y[e[t + 1]] + y[e[t + 2]] + y[e[t + 3]] + "-" + y[e[t + 4]] + y[e[t + 5]] + "-" + y[e[t + 6]] + y[e[t + 7]] + "-" + y[e[t + 8]] + y[e[t + 9]] + "-" + y[e[t + 10]] + y[e[t + 11]] + y[e[t + 12]] + y[e[t + 13]] + y[e[t + 14]] + y[e[t + 15]]).toLowerCase();
|
|
64
64
|
}
|
|
65
65
|
let $;
|
|
66
|
-
const
|
|
67
|
-
function
|
|
66
|
+
const Ze = new Uint8Array(16);
|
|
67
|
+
function et() {
|
|
68
68
|
if (!$) {
|
|
69
69
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
70
70
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
71
71
|
$ = crypto.getRandomValues.bind(crypto);
|
|
72
72
|
}
|
|
73
|
-
return $(
|
|
73
|
+
return $(Ze);
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const tt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ee = { randomUUID: tt };
|
|
76
76
|
function P(e, t, r) {
|
|
77
77
|
if (ee.randomUUID && !t && !e)
|
|
78
78
|
return ee.randomUUID();
|
|
79
79
|
e = e || {};
|
|
80
|
-
const a = e.random || (e.rng ||
|
|
81
|
-
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128,
|
|
80
|
+
const a = e.random || (e.rng || et)();
|
|
81
|
+
return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Qe(a);
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const rt = (e, t) => {
|
|
84
84
|
if ((t == null ? void 0 : t.type) === Ne) {
|
|
85
85
|
const r = t.payload.messages.map((a) => ({
|
|
86
86
|
message: {
|
|
@@ -103,7 +103,7 @@ const at = (e, t) => {
|
|
|
103
103
|
if ((t == null ? void 0 : t.type) === S) {
|
|
104
104
|
const r = t.payload.message.role, a = t.payload.message.content, o = t.payload.message.name, i = t.payload.message.processingTime, g = t.payload.message.messageId;
|
|
105
105
|
if (r !== "") {
|
|
106
|
-
const
|
|
106
|
+
const l = {
|
|
107
107
|
role: r,
|
|
108
108
|
content: a,
|
|
109
109
|
name: o,
|
|
@@ -111,11 +111,11 @@ const at = (e, t) => {
|
|
|
111
111
|
messageId: g
|
|
112
112
|
};
|
|
113
113
|
if (r === E) {
|
|
114
|
-
const
|
|
115
|
-
(
|
|
114
|
+
const m = e.messages.findIndex(
|
|
115
|
+
(u) => u.message.messageId === g
|
|
116
116
|
);
|
|
117
|
-
if (
|
|
118
|
-
const
|
|
117
|
+
if (m !== -1) {
|
|
118
|
+
const u = e.messages.map((b, h) => h === m ? {
|
|
119
119
|
message: {
|
|
120
120
|
...b.message,
|
|
121
121
|
content: `${b.message.content}${a}`,
|
|
@@ -128,7 +128,7 @@ const at = (e, t) => {
|
|
|
128
128
|
model: e.model,
|
|
129
129
|
usage: e.usage,
|
|
130
130
|
isComponent: e.isComponent,
|
|
131
|
-
messages:
|
|
131
|
+
messages: u,
|
|
132
132
|
engine: e.engine,
|
|
133
133
|
tags: e.tags
|
|
134
134
|
};
|
|
@@ -144,7 +144,7 @@ const at = (e, t) => {
|
|
|
144
144
|
messages: [
|
|
145
145
|
...e.messages,
|
|
146
146
|
{
|
|
147
|
-
message:
|
|
147
|
+
message: l
|
|
148
148
|
}
|
|
149
149
|
]
|
|
150
150
|
};
|
|
@@ -166,14 +166,14 @@ const at = (e, t) => {
|
|
|
166
166
|
usage: t.payload.usage,
|
|
167
167
|
messages: e.messages,
|
|
168
168
|
isComponent: e.isComponent
|
|
169
|
-
} : (t == null ? void 0 : t.type) ===
|
|
169
|
+
} : (t == null ? void 0 : t.type) === se ? {
|
|
170
170
|
...e,
|
|
171
171
|
engine: t.payload.engine
|
|
172
|
-
} : (t == null ? void 0 : t.type) ===
|
|
172
|
+
} : (t == null ? void 0 : t.type) === ne ? {
|
|
173
173
|
...e,
|
|
174
174
|
streaming: t.payload.streaming
|
|
175
175
|
} : e;
|
|
176
|
-
},
|
|
176
|
+
}, at = (e, t) => {
|
|
177
177
|
switch (t == null ? void 0 : t.type) {
|
|
178
178
|
case Ee:
|
|
179
179
|
return {
|
|
@@ -190,19 +190,19 @@ const at = (e, t) => {
|
|
|
190
190
|
default:
|
|
191
191
|
return e;
|
|
192
192
|
}
|
|
193
|
-
},
|
|
193
|
+
}, ot = (e, t) => {
|
|
194
194
|
switch (t == null ? void 0 : t.type) {
|
|
195
195
|
case ge:
|
|
196
196
|
return {
|
|
197
197
|
tags: e.tags,
|
|
198
198
|
tag: t.payload.tag
|
|
199
199
|
};
|
|
200
|
-
case
|
|
200
|
+
case ce:
|
|
201
201
|
return {
|
|
202
202
|
tags: e.tags,
|
|
203
203
|
tag: ""
|
|
204
204
|
};
|
|
205
|
-
case
|
|
205
|
+
case le:
|
|
206
206
|
return {
|
|
207
207
|
tags: t.payload.tags,
|
|
208
208
|
tag: ""
|
|
@@ -210,78 +210,6 @@ const at = (e, t) => {
|
|
|
210
210
|
default:
|
|
211
211
|
return e;
|
|
212
212
|
}
|
|
213
|
-
}, dt = () => {
|
|
214
|
-
const { dispatch: e, state: t } = R(z), { dispatch: r, state: a } = R(H), { getAccessToken: o, user: i } = U(), [g, c] = A({
|
|
215
|
-
loaded: !1
|
|
216
|
-
}), u = "mt-2 flex justify-center rounded-md", m = B(null), b = B(!1), h = (s) => {
|
|
217
|
-
s.preventDefault(), e({
|
|
218
|
-
type: ie
|
|
219
|
-
});
|
|
220
|
-
};
|
|
221
|
-
_(() => {
|
|
222
|
-
var s;
|
|
223
|
-
(t == null ? void 0 : t.streaming) === !0 && !b.current && m.current && (b.current = !0, m.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (b.current = !1, (s = m.current) == null || s.blur());
|
|
224
|
-
}, [t]);
|
|
225
|
-
const l = (s, p) => {
|
|
226
|
-
s.preventDefault(), r({
|
|
227
|
-
type: ge,
|
|
228
|
-
payload: {
|
|
229
|
-
tag: p
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
};
|
|
233
|
-
return _(() => {
|
|
234
|
-
if (!i) {
|
|
235
|
-
c({
|
|
236
|
-
loaded: !1
|
|
237
|
-
});
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
g.loaded || (async () => {
|
|
241
|
-
try {
|
|
242
|
-
const s = await he({
|
|
243
|
-
accessToken: await o(),
|
|
244
|
-
type: be.GET_USER_PREFERENCES,
|
|
245
|
-
params: {
|
|
246
|
-
user: i.username
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
s.status === 200 && (r({
|
|
250
|
-
type: ce,
|
|
251
|
-
payload: {
|
|
252
|
-
tags: s.data.tags || []
|
|
253
|
-
}
|
|
254
|
-
}), c({
|
|
255
|
-
loaded: !0
|
|
256
|
-
}));
|
|
257
|
-
} catch {
|
|
258
|
-
}
|
|
259
|
-
})();
|
|
260
|
-
}, [i]), /* @__PURE__ */ v(O, { children: [
|
|
261
|
-
/* @__PURE__ */ n(Ce, { alignHorizontal: "center", columnGap: 2, children: g && g.loaded && a.tags && a.tags.map((s) => s.enabled && s.label && s.content && /* @__PURE__ */ n(Se, { children: /* @__PURE__ */ n("div", { className: u, children: /* @__PURE__ */ n(
|
|
262
|
-
ue,
|
|
263
|
-
{
|
|
264
|
-
noBorder: !0,
|
|
265
|
-
mode: "dark",
|
|
266
|
-
focusMode: "light",
|
|
267
|
-
size: "small",
|
|
268
|
-
onClick: (p) => l(p, s.content),
|
|
269
|
-
children: s.label
|
|
270
|
-
}
|
|
271
|
-
) }) }, `tag-button-${s.slot}`)) }),
|
|
272
|
-
me(E, t) && /* @__PURE__ */ n("div", { className: u, children: /* @__PURE__ */ n(
|
|
273
|
-
Re,
|
|
274
|
-
{
|
|
275
|
-
noBorder: !0,
|
|
276
|
-
mode: "dark",
|
|
277
|
-
focusMode: "light",
|
|
278
|
-
ref: m,
|
|
279
|
-
onClick: h,
|
|
280
|
-
labelRight: t != null && t.streaming ? Y.ACTION_WHILE_STREAMING.content : Y.ACTION_WHILE_NOT_STREAMING.content,
|
|
281
|
-
children: t != null && t.streaming ? /* @__PURE__ */ n(Ye, { size: "size-4" }) : /* @__PURE__ */ n(je, { size: "size-4" })
|
|
282
|
-
}
|
|
283
|
-
) })
|
|
284
|
-
] });
|
|
285
213
|
};
|
|
286
214
|
/*!
|
|
287
215
|
@versini/ui-bubble v2.0.11
|
|
@@ -296,26 +224,26 @@ try {
|
|
|
296
224
|
});
|
|
297
225
|
} catch {
|
|
298
226
|
}
|
|
299
|
-
const
|
|
227
|
+
const it = "av-bubble", te = "av-button", W = "icon", dt = "button", st = "link", nt = ({
|
|
300
228
|
type: e,
|
|
301
229
|
size: t,
|
|
302
230
|
labelRight: r,
|
|
303
231
|
labelLeft: a,
|
|
304
232
|
align: o
|
|
305
233
|
}) => {
|
|
306
|
-
const i = "text-sm font-medium max-h-8 py-0 px-2", g = "text-base font-medium max-h-9 py-1 px-3",
|
|
234
|
+
const i = "text-sm font-medium max-h-8 py-0 px-2", g = "text-base font-medium max-h-9 py-1 px-3", l = "text-lg font-medium max-h-12 py-2 px-4";
|
|
307
235
|
switch (e) {
|
|
308
|
-
case
|
|
236
|
+
case dt:
|
|
309
237
|
return d({
|
|
310
238
|
[i]: t === "small",
|
|
311
239
|
[g]: t === "medium",
|
|
312
|
-
[
|
|
240
|
+
[l]: t === "large"
|
|
313
241
|
});
|
|
314
|
-
case
|
|
242
|
+
case st:
|
|
315
243
|
return d("text-center", {
|
|
316
244
|
[i]: t === "small",
|
|
317
245
|
[g]: t === "medium",
|
|
318
|
-
[
|
|
246
|
+
[l]: t === "large"
|
|
319
247
|
});
|
|
320
248
|
case W:
|
|
321
249
|
return d("inline-flex items-center", {
|
|
@@ -330,7 +258,7 @@ const nt = "av-bubble", te = "av-button", W = "icon", st = "button", ct = "link"
|
|
|
330
258
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
331
259
|
});
|
|
332
260
|
}
|
|
333
|
-
},
|
|
261
|
+
}, lt = ({
|
|
334
262
|
mode: e,
|
|
335
263
|
noBackground: t,
|
|
336
264
|
noTruncate: r,
|
|
@@ -387,7 +315,7 @@ const nt = "av-bubble", te = "av-button", W = "icon", st = "button", ct = "link"
|
|
|
387
315
|
"bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
|
|
388
316
|
"bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
|
|
389
317
|
});
|
|
390
|
-
},
|
|
318
|
+
}, ct = ({
|
|
391
319
|
mode: e,
|
|
392
320
|
disabled: t,
|
|
393
321
|
variant: r
|
|
@@ -422,7 +350,7 @@ const nt = "av-bubble", te = "av-button", W = "icon", st = "button", ct = "link"
|
|
|
422
350
|
"hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
|
|
423
351
|
"hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
|
|
424
352
|
});
|
|
425
|
-
},
|
|
353
|
+
}, gt = ({
|
|
426
354
|
mode: e,
|
|
427
355
|
disabled: t,
|
|
428
356
|
variant: r
|
|
@@ -457,7 +385,7 @@ const nt = "av-bubble", te = "av-button", W = "icon", st = "button", ct = "link"
|
|
|
457
385
|
"active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
|
|
458
386
|
"active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
|
|
459
387
|
});
|
|
460
|
-
},
|
|
388
|
+
}, mt = ({
|
|
461
389
|
mode: e,
|
|
462
390
|
noBorder: t,
|
|
463
391
|
variant: r
|
|
@@ -492,7 +420,7 @@ const nt = "av-bubble", te = "av-button", W = "icon", st = "button", ct = "link"
|
|
|
492
420
|
"border-border-selected-dark dark:border-border-selected-medium": e === "system",
|
|
493
421
|
"border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
|
|
494
422
|
});
|
|
495
|
-
},
|
|
423
|
+
}, ut = ({
|
|
496
424
|
focusMode: e
|
|
497
425
|
}) => d("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
498
426
|
"focus:outline-focus-dark": e === "dark",
|
|
@@ -507,51 +435,51 @@ const nt = "av-bubble", te = "av-button", W = "icon", st = "button", ct = "link"
|
|
|
507
435
|
focusMode: o,
|
|
508
436
|
disabled: i,
|
|
509
437
|
fullWidth: g,
|
|
510
|
-
size:
|
|
511
|
-
noBorder:
|
|
512
|
-
labelRight:
|
|
438
|
+
size: l,
|
|
439
|
+
noBorder: m,
|
|
440
|
+
labelRight: u,
|
|
513
441
|
labelLeft: b,
|
|
514
442
|
noBackground: h,
|
|
515
|
-
variant:
|
|
516
|
-
noTruncate:
|
|
443
|
+
variant: c,
|
|
444
|
+
noTruncate: n,
|
|
517
445
|
align: p,
|
|
518
446
|
radius: f
|
|
519
|
-
}) => (
|
|
447
|
+
}) => (c || (c = "primary"), r ? d(te, t) : d(
|
|
520
448
|
te,
|
|
521
|
-
|
|
449
|
+
lt({
|
|
522
450
|
mode: a,
|
|
523
|
-
variant:
|
|
451
|
+
variant: c,
|
|
524
452
|
noBackground: h,
|
|
525
|
-
noTruncate:
|
|
453
|
+
noTruncate: n,
|
|
526
454
|
radius: f
|
|
527
455
|
}),
|
|
528
|
-
|
|
456
|
+
nt({
|
|
529
457
|
type: e,
|
|
530
|
-
size:
|
|
531
|
-
labelRight:
|
|
458
|
+
size: l,
|
|
459
|
+
labelRight: u,
|
|
532
460
|
labelLeft: b,
|
|
533
461
|
align: p
|
|
534
462
|
}),
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
463
|
+
mt({ mode: a, variant: c, noBorder: m }),
|
|
464
|
+
ut({ focusMode: o }),
|
|
465
|
+
ct({ mode: a, variant: c, disabled: i }),
|
|
466
|
+
gt({ mode: a, variant: c, disabled: i }),
|
|
539
467
|
{
|
|
540
468
|
"w-full": g,
|
|
541
469
|
"disabled:cursor-not-allowed disabled:opacity-50": i
|
|
542
470
|
},
|
|
543
471
|
t
|
|
544
|
-
)),
|
|
472
|
+
)), ht = (e, t, r) => {
|
|
545
473
|
var a;
|
|
546
474
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
547
475
|
}, F = C.forwardRef((e, t) => {
|
|
548
476
|
const { onClick: r, noInternalClick: a = !1, ...o } = e;
|
|
549
|
-
return /* @__PURE__ */
|
|
477
|
+
return /* @__PURE__ */ s(
|
|
550
478
|
"button",
|
|
551
479
|
{
|
|
552
480
|
ref: t,
|
|
553
481
|
onClick: (i) => {
|
|
554
|
-
|
|
482
|
+
ht(i, a, r);
|
|
555
483
|
},
|
|
556
484
|
...o
|
|
557
485
|
}
|
|
@@ -567,13 +495,13 @@ const ye = C.forwardRef(
|
|
|
567
495
|
fullWidth: o = !1,
|
|
568
496
|
className: i,
|
|
569
497
|
type: g = "button",
|
|
570
|
-
raw:
|
|
571
|
-
noBorder:
|
|
572
|
-
"aria-label":
|
|
498
|
+
raw: l = !1,
|
|
499
|
+
noBorder: m = !1,
|
|
500
|
+
"aria-label": u,
|
|
573
501
|
label: b,
|
|
574
502
|
size: h = "medium",
|
|
575
|
-
labelRight:
|
|
576
|
-
labelLeft:
|
|
503
|
+
labelRight: c,
|
|
504
|
+
labelLeft: n,
|
|
577
505
|
noBackground: p = !1,
|
|
578
506
|
align: f = "center",
|
|
579
507
|
radius: w = "large",
|
|
@@ -585,20 +513,20 @@ const ye = C.forwardRef(
|
|
|
585
513
|
focusMode: a,
|
|
586
514
|
fullWidth: o,
|
|
587
515
|
disabled: t,
|
|
588
|
-
raw:
|
|
516
|
+
raw: l,
|
|
589
517
|
className: i,
|
|
590
|
-
noBorder:
|
|
518
|
+
noBorder: m,
|
|
591
519
|
size: h,
|
|
592
|
-
labelRight:
|
|
593
|
-
labelLeft:
|
|
520
|
+
labelRight: c,
|
|
521
|
+
labelLeft: n,
|
|
594
522
|
noBackground: p,
|
|
595
523
|
align: f,
|
|
596
524
|
radius: w
|
|
597
525
|
}), I = d({
|
|
598
|
-
"text-copy-accent-dark": r === "light" && !
|
|
599
|
-
"text-copy-light": r === "dark" && !
|
|
600
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !
|
|
601
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !
|
|
526
|
+
"text-copy-accent-dark": r === "light" && !l,
|
|
527
|
+
"text-copy-light": r === "dark" && !l,
|
|
528
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
|
|
529
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !l
|
|
602
530
|
});
|
|
603
531
|
return /* @__PURE__ */ v(
|
|
604
532
|
F,
|
|
@@ -607,12 +535,12 @@ const ye = C.forwardRef(
|
|
|
607
535
|
className: x,
|
|
608
536
|
disabled: t,
|
|
609
537
|
type: g,
|
|
610
|
-
"aria-label":
|
|
538
|
+
"aria-label": u || b,
|
|
611
539
|
...N,
|
|
612
540
|
children: [
|
|
613
|
-
|
|
614
|
-
/* @__PURE__ */
|
|
615
|
-
|
|
541
|
+
n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
|
|
542
|
+
/* @__PURE__ */ s("div", { className: I, children: e }),
|
|
543
|
+
c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
|
|
616
544
|
]
|
|
617
545
|
}
|
|
618
546
|
);
|
|
@@ -632,7 +560,7 @@ try {
|
|
|
632
560
|
});
|
|
633
561
|
} catch {
|
|
634
562
|
}
|
|
635
|
-
const
|
|
563
|
+
const bt = C.forwardRef(
|
|
636
564
|
({
|
|
637
565
|
children: e,
|
|
638
566
|
disabled: t = !1,
|
|
@@ -641,13 +569,13 @@ const yt = C.forwardRef(
|
|
|
641
569
|
fullWidth: o = !1,
|
|
642
570
|
className: i,
|
|
643
571
|
type: g = "button",
|
|
644
|
-
raw:
|
|
645
|
-
noBorder:
|
|
646
|
-
"aria-label":
|
|
572
|
+
raw: l = !1,
|
|
573
|
+
noBorder: m = !1,
|
|
574
|
+
"aria-label": u,
|
|
647
575
|
label: b,
|
|
648
576
|
size: h = "medium",
|
|
649
|
-
labelRight:
|
|
650
|
-
labelLeft:
|
|
577
|
+
labelRight: c,
|
|
578
|
+
labelLeft: n,
|
|
651
579
|
noBackground: p = !1,
|
|
652
580
|
align: f = "center",
|
|
653
581
|
active: w = !1,
|
|
@@ -660,20 +588,20 @@ const yt = C.forwardRef(
|
|
|
660
588
|
focusMode: a,
|
|
661
589
|
fullWidth: o,
|
|
662
590
|
disabled: t,
|
|
663
|
-
raw:
|
|
591
|
+
raw: l,
|
|
664
592
|
className: i,
|
|
665
|
-
noBorder:
|
|
593
|
+
noBorder: m,
|
|
666
594
|
size: h,
|
|
667
|
-
labelRight:
|
|
668
|
-
labelLeft:
|
|
595
|
+
labelRight: c,
|
|
596
|
+
labelLeft: n,
|
|
669
597
|
noBackground: p,
|
|
670
598
|
align: f,
|
|
671
599
|
radius: N
|
|
672
600
|
}), T = d({
|
|
673
|
-
"text-copy-accent-dark": r === "light" && !
|
|
674
|
-
"text-copy-light": r === "dark" && !
|
|
675
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !
|
|
676
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !
|
|
601
|
+
"text-copy-accent-dark": r === "light" && !l,
|
|
602
|
+
"text-copy-light": r === "dark" && !l,
|
|
603
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
|
|
604
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !l
|
|
677
605
|
}), V = w ? d(
|
|
678
606
|
"relative",
|
|
679
607
|
"focus-within:static",
|
|
@@ -691,25 +619,25 @@ const yt = C.forwardRef(
|
|
|
691
619
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
692
620
|
}
|
|
693
621
|
) : "";
|
|
694
|
-
return /* @__PURE__ */
|
|
622
|
+
return /* @__PURE__ */ s("div", { className: V, children: /* @__PURE__ */ v(
|
|
695
623
|
F,
|
|
696
624
|
{
|
|
697
625
|
ref: x,
|
|
698
626
|
className: I,
|
|
699
627
|
disabled: t,
|
|
700
628
|
type: g,
|
|
701
|
-
"aria-label":
|
|
629
|
+
"aria-label": u || b,
|
|
702
630
|
...k,
|
|
703
631
|
children: [
|
|
704
|
-
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
|
|
632
|
+
n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
|
|
633
|
+
/* @__PURE__ */ s("div", { className: T, children: e }),
|
|
634
|
+
c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
|
|
707
635
|
]
|
|
708
636
|
}
|
|
709
637
|
) });
|
|
710
638
|
}
|
|
711
639
|
);
|
|
712
|
-
|
|
640
|
+
bt.displayName = "ButtonSort";
|
|
713
641
|
const fe = ({
|
|
714
642
|
children: e,
|
|
715
643
|
fill: t,
|
|
@@ -718,26 +646,26 @@ const fe = ({
|
|
|
718
646
|
defaultViewBox: o,
|
|
719
647
|
size: i,
|
|
720
648
|
title: g,
|
|
721
|
-
semantic:
|
|
722
|
-
...
|
|
649
|
+
semantic: l = !1,
|
|
650
|
+
...m
|
|
723
651
|
}) => {
|
|
724
|
-
const
|
|
652
|
+
const u = d(i, a);
|
|
725
653
|
return /* @__PURE__ */ v(O, { children: [
|
|
726
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ s(
|
|
727
655
|
"svg",
|
|
728
656
|
{
|
|
729
657
|
xmlns: "http://www.w3.org/2000/svg",
|
|
730
|
-
className:
|
|
658
|
+
className: u,
|
|
731
659
|
viewBox: r || o,
|
|
732
660
|
fill: t || "currentColor",
|
|
733
661
|
role: "img",
|
|
734
|
-
"aria-hidden": !
|
|
662
|
+
"aria-hidden": !l,
|
|
735
663
|
focusable: !1,
|
|
736
|
-
...
|
|
664
|
+
...m,
|
|
737
665
|
children: e
|
|
738
666
|
}
|
|
739
667
|
),
|
|
740
|
-
g &&
|
|
668
|
+
g && l && /* @__PURE__ */ s("span", { className: "sr-only", children: g })
|
|
741
669
|
] });
|
|
742
670
|
};
|
|
743
671
|
/*!
|
|
@@ -753,7 +681,7 @@ try {
|
|
|
753
681
|
});
|
|
754
682
|
} catch {
|
|
755
683
|
}
|
|
756
|
-
const
|
|
684
|
+
const pt = ({
|
|
757
685
|
className: e,
|
|
758
686
|
viewBox: t,
|
|
759
687
|
title: r,
|
|
@@ -769,23 +697,23 @@ const ft = ({
|
|
|
769
697
|
title: r || "Copied",
|
|
770
698
|
...o,
|
|
771
699
|
children: [
|
|
772
|
-
/* @__PURE__ */
|
|
700
|
+
/* @__PURE__ */ s(
|
|
773
701
|
"path",
|
|
774
702
|
{
|
|
775
703
|
opacity: "0.4",
|
|
776
704
|
d: "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"
|
|
777
705
|
}
|
|
778
706
|
),
|
|
779
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ s("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
|
|
780
708
|
]
|
|
781
709
|
}
|
|
782
|
-
),
|
|
710
|
+
), yt = ({
|
|
783
711
|
className: e,
|
|
784
712
|
viewBox: t,
|
|
785
713
|
title: r,
|
|
786
714
|
monotone: a,
|
|
787
715
|
...o
|
|
788
|
-
}) => /* @__PURE__ */
|
|
716
|
+
}) => /* @__PURE__ */ s(
|
|
789
717
|
fe,
|
|
790
718
|
{
|
|
791
719
|
defaultViewBox: "0 0 512 512",
|
|
@@ -794,7 +722,7 @@ const ft = ({
|
|
|
794
722
|
className: e,
|
|
795
723
|
title: r || "Copy",
|
|
796
724
|
...o,
|
|
797
|
-
children: /* @__PURE__ */
|
|
725
|
+
children: /* @__PURE__ */ s("path", { d: "M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z" })
|
|
798
726
|
}
|
|
799
727
|
);
|
|
800
728
|
/*!
|
|
@@ -810,23 +738,23 @@ try {
|
|
|
810
738
|
});
|
|
811
739
|
} catch {
|
|
812
740
|
}
|
|
813
|
-
const
|
|
741
|
+
const ft = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", vt = ({ kind: e }) => d({
|
|
814
742
|
"bg-surface-lighter dark:bg-surface-dark": e === "left",
|
|
815
743
|
"bg-surface-accent": e === "right"
|
|
816
|
-
}),
|
|
744
|
+
}), kt = ({ kind: e }) => d(
|
|
817
745
|
"prose prose-dark dark:prose-lighter prose-p:my-3 prose-blockquote:my-3 prose-ol:my-3 prose-ul:my-3 prose-ul:prose-li:marker:text-black",
|
|
818
746
|
{
|
|
819
747
|
"text-copy-lighter": e === "right"
|
|
820
748
|
}
|
|
821
|
-
),
|
|
749
|
+
), xt = ({ kind: e }) => d("rounded-b-xl", {
|
|
822
750
|
"rounded-tr-xl": e === "left",
|
|
823
751
|
"rounded-tl-xl": e === "right"
|
|
824
|
-
}),
|
|
752
|
+
}), Tt = ({
|
|
825
753
|
kind: e,
|
|
826
754
|
className: t
|
|
827
755
|
}) => {
|
|
828
756
|
const r = d(
|
|
829
|
-
|
|
757
|
+
it,
|
|
830
758
|
"flex items-start",
|
|
831
759
|
{
|
|
832
760
|
"flex-row-reverse": e === "right"
|
|
@@ -834,10 +762,10 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
834
762
|
t
|
|
835
763
|
), a = d(
|
|
836
764
|
"flex flex-col empty:hidden",
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
765
|
+
ft(),
|
|
766
|
+
kt({ kind: e }),
|
|
767
|
+
vt({ kind: e }),
|
|
768
|
+
xt({ kind: e })
|
|
841
769
|
), o = "pr-2 pt-1 text-end text-xs text-copy-light", i = d("flex flex-col-reverse gap-2 sm:flex-row", {
|
|
842
770
|
"ml-2": e === "left",
|
|
843
771
|
"mr-2": e === "right"
|
|
@@ -848,7 +776,7 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
848
776
|
footer: o,
|
|
849
777
|
copyButton: i
|
|
850
778
|
};
|
|
851
|
-
},
|
|
779
|
+
}, _t = ({
|
|
852
780
|
children: e,
|
|
853
781
|
kind: t = "left",
|
|
854
782
|
className: r,
|
|
@@ -856,63 +784,63 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
856
784
|
rawFooter: o,
|
|
857
785
|
copyToClipboard: i,
|
|
858
786
|
copyToClipboardFocusMode: g = "system",
|
|
859
|
-
copyToClipboardMode:
|
|
787
|
+
copyToClipboardMode: l = "system"
|
|
860
788
|
}) => {
|
|
861
|
-
const [
|
|
862
|
-
|
|
789
|
+
const [m, u] = A(!1), b = Tt({ kind: t, className: r }), h = !!i && (typeof i == "function" || typeof i == "string" || typeof e == "string"), c = () => {
|
|
790
|
+
u(!0), typeof i == "function" ? i(e) : typeof i == "string" ? navigator.clipboard.writeText(i) : typeof e == "string" && navigator.clipboard.writeText(e);
|
|
863
791
|
};
|
|
864
792
|
return _(() => {
|
|
865
|
-
let
|
|
866
|
-
return
|
|
867
|
-
|
|
793
|
+
let n;
|
|
794
|
+
return m && (n = window.setTimeout(() => {
|
|
795
|
+
u(!1);
|
|
868
796
|
}, 3e3)), () => {
|
|
869
|
-
clearTimeout(
|
|
797
|
+
clearTimeout(n);
|
|
870
798
|
};
|
|
871
|
-
}, [
|
|
799
|
+
}, [m]), /* @__PURE__ */ v("div", { className: b.wrapper, children: [
|
|
872
800
|
/* @__PURE__ */ v("div", { children: [
|
|
873
|
-
/* @__PURE__ */
|
|
874
|
-
a && Object.keys(a).map((
|
|
875
|
-
|
|
801
|
+
/* @__PURE__ */ s("div", { className: b.main, children: e }),
|
|
802
|
+
a && Object.keys(a).map((n) => a[n] ? /* @__PURE__ */ s("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: b.footer, children: [
|
|
803
|
+
n,
|
|
876
804
|
": ",
|
|
877
|
-
a[
|
|
878
|
-
] }) }, `-${
|
|
805
|
+
a[n]
|
|
806
|
+
] }) }, `-${n}`) : null),
|
|
879
807
|
o && o
|
|
880
808
|
] }),
|
|
881
|
-
h && /* @__PURE__ */
|
|
809
|
+
h && /* @__PURE__ */ s("div", { className: b.copyButton, children: /* @__PURE__ */ s(
|
|
882
810
|
ye,
|
|
883
811
|
{
|
|
884
812
|
noBorder: !0,
|
|
885
813
|
noBackground: !0,
|
|
886
814
|
size: "small",
|
|
887
|
-
mode:
|
|
815
|
+
mode: l,
|
|
888
816
|
focusMode: g,
|
|
889
|
-
label:
|
|
890
|
-
onClick:
|
|
891
|
-
disabled:
|
|
892
|
-
children:
|
|
817
|
+
label: m ? "Copied to clipboard" : "Copy to clipboard",
|
|
818
|
+
onClick: c,
|
|
819
|
+
disabled: m,
|
|
820
|
+
children: m ? /* @__PURE__ */ s(pt, { size: "size-3" }) : /* @__PURE__ */ s(yt, { size: "size-3" })
|
|
893
821
|
}
|
|
894
822
|
) })
|
|
895
823
|
] });
|
|
896
|
-
}, re = "av-button", ve = "icon", ke = "button",
|
|
824
|
+
}, re = "av-button", ve = "icon", ke = "button", wt = "link", Nt = ({
|
|
897
825
|
type: e,
|
|
898
826
|
size: t,
|
|
899
827
|
labelRight: r,
|
|
900
828
|
labelLeft: a,
|
|
901
829
|
align: o
|
|
902
830
|
}) => {
|
|
903
|
-
const i = "text-sm font-medium max-h-8 py-0 px-2", g = "text-base font-medium max-h-9 py-1 px-3",
|
|
831
|
+
const i = "text-sm font-medium max-h-8 py-0 px-2", g = "text-base font-medium max-h-9 py-1 px-3", l = "text-lg font-medium max-h-12 py-2 px-4";
|
|
904
832
|
switch (e) {
|
|
905
833
|
case ke:
|
|
906
834
|
return d({
|
|
907
835
|
[i]: t === "small",
|
|
908
836
|
[g]: t === "medium",
|
|
909
|
-
[
|
|
837
|
+
[l]: t === "large"
|
|
910
838
|
});
|
|
911
|
-
case
|
|
839
|
+
case wt:
|
|
912
840
|
return d("text-center", {
|
|
913
841
|
[i]: t === "small",
|
|
914
842
|
[g]: t === "medium",
|
|
915
|
-
[
|
|
843
|
+
[l]: t === "large"
|
|
916
844
|
});
|
|
917
845
|
case ve:
|
|
918
846
|
return d("inline-flex items-center", {
|
|
@@ -927,7 +855,7 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
927
855
|
"h-12 px-4 text-lg font-medium": t === "large" && (r || a)
|
|
928
856
|
});
|
|
929
857
|
}
|
|
930
|
-
},
|
|
858
|
+
}, It = ({
|
|
931
859
|
mode: e,
|
|
932
860
|
noBackground: t,
|
|
933
861
|
noTruncate: r,
|
|
@@ -984,7 +912,7 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
984
912
|
"bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
|
|
985
913
|
"bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
|
|
986
914
|
});
|
|
987
|
-
},
|
|
915
|
+
}, Et = ({
|
|
988
916
|
mode: e,
|
|
989
917
|
disabled: t,
|
|
990
918
|
variant: r
|
|
@@ -1019,7 +947,7 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
1019
947
|
"hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
|
|
1020
948
|
"hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
|
|
1021
949
|
});
|
|
1022
|
-
},
|
|
950
|
+
}, Ct = ({
|
|
1023
951
|
mode: e,
|
|
1024
952
|
disabled: t,
|
|
1025
953
|
variant: r
|
|
@@ -1054,7 +982,7 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
1054
982
|
"active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
|
|
1055
983
|
"active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
|
|
1056
984
|
});
|
|
1057
|
-
},
|
|
985
|
+
}, St = ({
|
|
1058
986
|
mode: e,
|
|
1059
987
|
noBorder: t,
|
|
1060
988
|
variant: r
|
|
@@ -1089,7 +1017,7 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
1089
1017
|
"border-border-selected-dark dark:border-border-selected-medium": e === "system",
|
|
1090
1018
|
"border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
|
|
1091
1019
|
});
|
|
1092
|
-
},
|
|
1020
|
+
}, Rt = ({
|
|
1093
1021
|
focusMode: e
|
|
1094
1022
|
}) => d("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
1095
1023
|
"focus:outline-focus-dark": e === "dark",
|
|
@@ -1104,51 +1032,51 @@ const kt = () => "p-4 max-w-xs sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) =>
|
|
|
1104
1032
|
focusMode: o,
|
|
1105
1033
|
disabled: i,
|
|
1106
1034
|
fullWidth: g,
|
|
1107
|
-
size:
|
|
1108
|
-
noBorder:
|
|
1109
|
-
labelRight:
|
|
1035
|
+
size: l,
|
|
1036
|
+
noBorder: m,
|
|
1037
|
+
labelRight: u,
|
|
1110
1038
|
labelLeft: b,
|
|
1111
1039
|
noBackground: h,
|
|
1112
|
-
variant:
|
|
1113
|
-
noTruncate:
|
|
1040
|
+
variant: c,
|
|
1041
|
+
noTruncate: n,
|
|
1114
1042
|
align: p,
|
|
1115
1043
|
radius: f
|
|
1116
|
-
}) => (
|
|
1044
|
+
}) => (c || (c = "primary"), r ? d(re, t) : d(
|
|
1117
1045
|
re,
|
|
1118
|
-
|
|
1046
|
+
It({
|
|
1119
1047
|
mode: a,
|
|
1120
|
-
variant:
|
|
1048
|
+
variant: c,
|
|
1121
1049
|
noBackground: h,
|
|
1122
|
-
noTruncate:
|
|
1050
|
+
noTruncate: n,
|
|
1123
1051
|
radius: f
|
|
1124
1052
|
}),
|
|
1125
|
-
|
|
1053
|
+
Nt({
|
|
1126
1054
|
type: e,
|
|
1127
|
-
size:
|
|
1128
|
-
labelRight:
|
|
1055
|
+
size: l,
|
|
1056
|
+
labelRight: u,
|
|
1129
1057
|
labelLeft: b,
|
|
1130
1058
|
align: p
|
|
1131
1059
|
}),
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1060
|
+
St({ mode: a, variant: c, noBorder: m }),
|
|
1061
|
+
Rt({ focusMode: o }),
|
|
1062
|
+
Et({ mode: a, variant: c, disabled: i }),
|
|
1063
|
+
Ct({ mode: a, variant: c, disabled: i }),
|
|
1136
1064
|
{
|
|
1137
1065
|
"w-full": g,
|
|
1138
1066
|
"disabled:cursor-not-allowed disabled:opacity-50": i
|
|
1139
1067
|
},
|
|
1140
1068
|
t
|
|
1141
|
-
)),
|
|
1069
|
+
)), Bt = (e, t, r) => {
|
|
1142
1070
|
var a;
|
|
1143
1071
|
!t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
|
|
1144
1072
|
}, K = C.forwardRef((e, t) => {
|
|
1145
1073
|
const { onClick: r, noInternalClick: a = !1, ...o } = e;
|
|
1146
|
-
return /* @__PURE__ */
|
|
1074
|
+
return /* @__PURE__ */ s(
|
|
1147
1075
|
"button",
|
|
1148
1076
|
{
|
|
1149
1077
|
ref: t,
|
|
1150
1078
|
onClick: (i) => {
|
|
1151
|
-
|
|
1079
|
+
Bt(i, a, r);
|
|
1152
1080
|
},
|
|
1153
1081
|
...o
|
|
1154
1082
|
}
|
|
@@ -1164,34 +1092,34 @@ const Te = C.forwardRef(
|
|
|
1164
1092
|
fullWidth: o = !1,
|
|
1165
1093
|
className: i,
|
|
1166
1094
|
size: g = "medium",
|
|
1167
|
-
raw:
|
|
1168
|
-
noBorder:
|
|
1169
|
-
variant:
|
|
1095
|
+
raw: l = !1,
|
|
1096
|
+
noBorder: m = !1,
|
|
1097
|
+
variant: u = "primary",
|
|
1170
1098
|
noTruncate: b = !1,
|
|
1171
1099
|
radius: h = "large",
|
|
1172
|
-
...
|
|
1173
|
-
},
|
|
1100
|
+
...c
|
|
1101
|
+
}, n) => {
|
|
1174
1102
|
const p = xe({
|
|
1175
1103
|
type: ke,
|
|
1176
1104
|
mode: r,
|
|
1177
1105
|
focusMode: a,
|
|
1178
1106
|
fullWidth: o,
|
|
1179
1107
|
disabled: t,
|
|
1180
|
-
raw:
|
|
1108
|
+
raw: l,
|
|
1181
1109
|
className: i,
|
|
1182
1110
|
size: g,
|
|
1183
|
-
noBorder:
|
|
1184
|
-
variant:
|
|
1111
|
+
noBorder: m,
|
|
1112
|
+
variant: u,
|
|
1185
1113
|
noTruncate: b,
|
|
1186
1114
|
radius: h
|
|
1187
1115
|
});
|
|
1188
|
-
return /* @__PURE__ */
|
|
1116
|
+
return /* @__PURE__ */ s(
|
|
1189
1117
|
K,
|
|
1190
1118
|
{
|
|
1191
|
-
ref:
|
|
1119
|
+
ref: n,
|
|
1192
1120
|
className: p,
|
|
1193
1121
|
disabled: t,
|
|
1194
|
-
...
|
|
1122
|
+
...c,
|
|
1195
1123
|
children: e
|
|
1196
1124
|
}
|
|
1197
1125
|
);
|
|
@@ -1211,7 +1139,7 @@ try {
|
|
|
1211
1139
|
});
|
|
1212
1140
|
} catch {
|
|
1213
1141
|
}
|
|
1214
|
-
const
|
|
1142
|
+
const At = C.forwardRef(
|
|
1215
1143
|
({
|
|
1216
1144
|
children: e,
|
|
1217
1145
|
disabled: t = !1,
|
|
@@ -1220,13 +1148,13 @@ const Lt = C.forwardRef(
|
|
|
1220
1148
|
fullWidth: o = !1,
|
|
1221
1149
|
className: i,
|
|
1222
1150
|
type: g = "button",
|
|
1223
|
-
raw:
|
|
1224
|
-
noBorder:
|
|
1225
|
-
"aria-label":
|
|
1151
|
+
raw: l = !1,
|
|
1152
|
+
noBorder: m = !1,
|
|
1153
|
+
"aria-label": u,
|
|
1226
1154
|
label: b,
|
|
1227
1155
|
size: h = "medium",
|
|
1228
|
-
labelRight:
|
|
1229
|
-
labelLeft:
|
|
1156
|
+
labelRight: c,
|
|
1157
|
+
labelLeft: n,
|
|
1230
1158
|
noBackground: p = !1,
|
|
1231
1159
|
align: f = "center",
|
|
1232
1160
|
active: w = !1,
|
|
@@ -1239,20 +1167,20 @@ const Lt = C.forwardRef(
|
|
|
1239
1167
|
focusMode: a,
|
|
1240
1168
|
fullWidth: o,
|
|
1241
1169
|
disabled: t,
|
|
1242
|
-
raw:
|
|
1170
|
+
raw: l,
|
|
1243
1171
|
className: i,
|
|
1244
|
-
noBorder:
|
|
1172
|
+
noBorder: m,
|
|
1245
1173
|
size: h,
|
|
1246
|
-
labelRight:
|
|
1247
|
-
labelLeft:
|
|
1174
|
+
labelRight: c,
|
|
1175
|
+
labelLeft: n,
|
|
1248
1176
|
noBackground: p,
|
|
1249
1177
|
align: f,
|
|
1250
1178
|
radius: N
|
|
1251
1179
|
}), T = d({
|
|
1252
|
-
"text-copy-accent-dark": r === "light" && !
|
|
1253
|
-
"text-copy-light": r === "dark" && !
|
|
1254
|
-
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !
|
|
1255
|
-
"text-copy-light dark:text-copy-accent-dark": r === "system" && !
|
|
1180
|
+
"text-copy-accent-dark": r === "light" && !l,
|
|
1181
|
+
"text-copy-light": r === "dark" && !l,
|
|
1182
|
+
"text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
|
|
1183
|
+
"text-copy-light dark:text-copy-accent-dark": r === "system" && !l
|
|
1256
1184
|
}), V = w ? d(
|
|
1257
1185
|
"relative",
|
|
1258
1186
|
"focus-within:static",
|
|
@@ -1270,28 +1198,28 @@ const Lt = C.forwardRef(
|
|
|
1270
1198
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
1271
1199
|
}
|
|
1272
1200
|
) : "";
|
|
1273
|
-
return /* @__PURE__ */
|
|
1201
|
+
return /* @__PURE__ */ s("div", { className: V, children: /* @__PURE__ */ v(
|
|
1274
1202
|
K,
|
|
1275
1203
|
{
|
|
1276
1204
|
ref: x,
|
|
1277
1205
|
className: I,
|
|
1278
1206
|
disabled: t,
|
|
1279
1207
|
type: g,
|
|
1280
|
-
"aria-label":
|
|
1208
|
+
"aria-label": u || b,
|
|
1281
1209
|
...k,
|
|
1282
1210
|
children: [
|
|
1283
|
-
|
|
1284
|
-
/* @__PURE__ */
|
|
1285
|
-
|
|
1211
|
+
n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
|
|
1212
|
+
/* @__PURE__ */ s("div", { className: T, children: e }),
|
|
1213
|
+
c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
|
|
1286
1214
|
]
|
|
1287
1215
|
}
|
|
1288
1216
|
) });
|
|
1289
1217
|
}
|
|
1290
1218
|
);
|
|
1291
|
-
|
|
1292
|
-
const
|
|
1219
|
+
At.displayName = "ButtonSort";
|
|
1220
|
+
const Mt = 200, Lt = ({
|
|
1293
1221
|
string: e,
|
|
1294
|
-
idealLength: t =
|
|
1222
|
+
idealLength: t = Mt
|
|
1295
1223
|
}) => {
|
|
1296
1224
|
if (e.length <= t)
|
|
1297
1225
|
return { string: e, isTruncated: !1 };
|
|
@@ -1302,7 +1230,7 @@ const Ot = 200, zt = ({
|
|
|
1302
1230
|
string: e.slice(0, t + r),
|
|
1303
1231
|
isTruncated: !0
|
|
1304
1232
|
};
|
|
1305
|
-
},
|
|
1233
|
+
}, Ot = ({
|
|
1306
1234
|
children: e,
|
|
1307
1235
|
length: t = 200,
|
|
1308
1236
|
mode: r = "system",
|
|
@@ -1311,21 +1239,21 @@ const Ot = 200, zt = ({
|
|
|
1311
1239
|
const [o, i] = A(!1);
|
|
1312
1240
|
if (typeof e != "string")
|
|
1313
1241
|
return e;
|
|
1314
|
-
const { string: g, isTruncated:
|
|
1242
|
+
const { string: g, isTruncated: l } = Lt({
|
|
1315
1243
|
string: e,
|
|
1316
1244
|
idealLength: t
|
|
1317
1245
|
});
|
|
1318
1246
|
return /* @__PURE__ */ v("span", { style: { wordBreak: "break-word" }, children: [
|
|
1319
1247
|
o ? e : g,
|
|
1320
|
-
|
|
1248
|
+
l && /* @__PURE__ */ s(
|
|
1321
1249
|
Te,
|
|
1322
1250
|
{
|
|
1323
1251
|
mode: r,
|
|
1324
1252
|
focusMode: a,
|
|
1325
1253
|
className: "ml-2",
|
|
1326
1254
|
size: "small",
|
|
1327
|
-
onClick: (
|
|
1328
|
-
|
|
1255
|
+
onClick: (m) => {
|
|
1256
|
+
m.preventDefault(), i(!o);
|
|
1329
1257
|
},
|
|
1330
1258
|
children: o ? "less..." : "more..."
|
|
1331
1259
|
}
|
|
@@ -1345,39 +1273,45 @@ try {
|
|
|
1345
1273
|
});
|
|
1346
1274
|
} catch {
|
|
1347
1275
|
}
|
|
1348
|
-
const ae =
|
|
1276
|
+
const ae = Fe(
|
|
1349
1277
|
() => import(
|
|
1350
1278
|
/* webpackChunkName: "LazyMessageAssistant" */
|
|
1351
|
-
"./LazyMessageAssistant.
|
|
1279
|
+
"./LazyMessageAssistant.BkIqe55j.js"
|
|
1352
1280
|
).then((e) => e.LazyMessageAssistant)
|
|
1353
|
-
),
|
|
1354
|
-
const { state: e } = R(
|
|
1281
|
+
), zt = () => {
|
|
1282
|
+
const { state: e } = R(U);
|
|
1355
1283
|
return /* @__PURE__ */ v(O, { children: [
|
|
1356
1284
|
e && e.messages.length > 0 && e.messages.map((t, r) => {
|
|
1357
1285
|
const { role: a, content: o, name: i, processingTime: g } = t.message;
|
|
1358
|
-
return (a === E || a ===
|
|
1286
|
+
return (a === E || a === H) && o ? /* @__PURE__ */ s(Z, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(
|
|
1359
1287
|
ae,
|
|
1360
1288
|
{
|
|
1361
1289
|
name: i,
|
|
1362
1290
|
processingTime: g,
|
|
1363
1291
|
children: o
|
|
1364
1292
|
}
|
|
1365
|
-
) }, `${r}-${a}`) : a === G && o ? /* @__PURE__ */
|
|
1366
|
-
|
|
1293
|
+
) }, `${r}-${a}`) : a === G && o ? /* @__PURE__ */ s(
|
|
1294
|
+
_t,
|
|
1367
1295
|
{
|
|
1368
1296
|
kind: "right",
|
|
1369
1297
|
copyToClipboard: o,
|
|
1370
1298
|
copyToClipboardFocusMode: "light",
|
|
1371
|
-
children: /* @__PURE__ */
|
|
1299
|
+
children: /* @__PURE__ */ s(Ot, { mode: "light", focusMode: "light", children: o })
|
|
1372
1300
|
},
|
|
1373
1301
|
`${r}-${a}`
|
|
1374
1302
|
) : null;
|
|
1375
1303
|
}),
|
|
1376
|
-
me(G, e) && /* @__PURE__ */
|
|
1304
|
+
me(G, e) && /* @__PURE__ */ s(Z, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(ae, { loading: !0 }) })
|
|
1377
1305
|
] });
|
|
1306
|
+
}, Ut = () => {
|
|
1307
|
+
const { isAuthenticated: e } = z(), t = Ce(e);
|
|
1308
|
+
return /* @__PURE__ */ s(O, { children: /* @__PURE__ */ v("div", { className: t, children: [
|
|
1309
|
+
/* @__PURE__ */ s(Se, {}),
|
|
1310
|
+
/* @__PURE__ */ s(zt, {})
|
|
1311
|
+
] }) });
|
|
1378
1312
|
}, L = (e, t) => {
|
|
1379
1313
|
e({
|
|
1380
|
-
type:
|
|
1314
|
+
type: ne,
|
|
1381
1315
|
payload: {
|
|
1382
1316
|
streaming: t
|
|
1383
1317
|
}
|
|
@@ -1387,51 +1321,51 @@ const ae = Ke(
|
|
|
1387
1321
|
type: S,
|
|
1388
1322
|
payload: {
|
|
1389
1323
|
message: {
|
|
1390
|
-
role:
|
|
1391
|
-
content:
|
|
1324
|
+
role: H,
|
|
1325
|
+
content: Le
|
|
1392
1326
|
}
|
|
1393
1327
|
}
|
|
1394
1328
|
});
|
|
1395
|
-
},
|
|
1396
|
-
const { state: e, dispatch: t } = R(
|
|
1329
|
+
}, Vt = () => {
|
|
1330
|
+
const { state: e, dispatch: t } = R(U), { state: r, dispatch: a } = R(j), [o, i] = A(""), { getAccessToken: g, user: l } = z(), m = B(null), u = B(
|
|
1397
1331
|
null
|
|
1398
1332
|
);
|
|
1399
1333
|
_(() => {
|
|
1400
1334
|
(async () => {
|
|
1401
|
-
var
|
|
1335
|
+
var c;
|
|
1402
1336
|
if (!e || e.messages.length === 0) {
|
|
1403
|
-
(
|
|
1337
|
+
(c = u == null ? void 0 : u.current) == null || c.cancel();
|
|
1404
1338
|
return;
|
|
1405
1339
|
}
|
|
1406
1340
|
const h = e.messages[e.messages.length - 1];
|
|
1407
|
-
if (!(e.messages.length === 0 || h.message.role === E || h.message.role ===
|
|
1341
|
+
if (!(e.messages.length === 0 || h.message.role === E || h.message.role === Re || h.message.role === H || h.message.role === Be))
|
|
1408
1342
|
try {
|
|
1409
|
-
const
|
|
1343
|
+
const n = await Ge({
|
|
1410
1344
|
accessToken: await g(),
|
|
1411
1345
|
name: "generate",
|
|
1412
1346
|
data: {
|
|
1413
1347
|
messages: e.messages,
|
|
1414
1348
|
model: e.engine || M,
|
|
1415
|
-
user: (
|
|
1349
|
+
user: (l == null ? void 0 : l.username) || "",
|
|
1416
1350
|
id: e.id,
|
|
1417
1351
|
usage: e.usage
|
|
1418
1352
|
}
|
|
1419
1353
|
});
|
|
1420
|
-
if (
|
|
1354
|
+
if (n && n.ok) {
|
|
1421
1355
|
const p = P();
|
|
1422
|
-
|
|
1356
|
+
u.current = n.body.getReader();
|
|
1423
1357
|
const f = new TextDecoder();
|
|
1424
1358
|
for (; ; ) {
|
|
1425
1359
|
L(t, !0);
|
|
1426
|
-
const { done: w, value: N } = await
|
|
1360
|
+
const { done: w, value: N } = await u.current.read();
|
|
1427
1361
|
if (w) {
|
|
1428
1362
|
L(t, !1);
|
|
1429
1363
|
break;
|
|
1430
1364
|
}
|
|
1431
|
-
const k = f.decode(N, { stream: !0 }), x = k.indexOf(
|
|
1365
|
+
const k = f.decode(N, { stream: !0 }), x = k.indexOf(Y);
|
|
1432
1366
|
if (x !== -1) {
|
|
1433
1367
|
const I = k.substring(0, x), T = JSON.parse(
|
|
1434
|
-
k.substring(x +
|
|
1368
|
+
k.substring(x + Y.length)
|
|
1435
1369
|
);
|
|
1436
1370
|
t({
|
|
1437
1371
|
type: de,
|
|
@@ -1466,8 +1400,8 @@ const ae = Ke(
|
|
|
1466
1400
|
}
|
|
1467
1401
|
} else
|
|
1468
1402
|
oe(t);
|
|
1469
|
-
} catch (
|
|
1470
|
-
console.error(
|
|
1403
|
+
} catch (n) {
|
|
1404
|
+
console.error(n), oe(t);
|
|
1471
1405
|
}
|
|
1472
1406
|
})();
|
|
1473
1407
|
}, [e == null ? void 0 : e.messages]);
|
|
@@ -1485,29 +1419,29 @@ const ae = Ke(
|
|
|
1485
1419
|
return _(() => {
|
|
1486
1420
|
if (r.tag !== "") {
|
|
1487
1421
|
const h = r.tag.endsWith(":") && !r.tag.endsWith(": ") ? r.tag + " " : r.tag;
|
|
1488
|
-
h.indexOf(
|
|
1489
|
-
i(h.replace(
|
|
1490
|
-
}) : i(h),
|
|
1491
|
-
type:
|
|
1422
|
+
h.indexOf(q) !== -1 ? navigator.clipboard.readText().then((n) => {
|
|
1423
|
+
i(h.replace(q, n));
|
|
1424
|
+
}) : i(h), m.current && m.current.focus(), a({
|
|
1425
|
+
type: ce
|
|
1492
1426
|
});
|
|
1493
1427
|
}
|
|
1494
1428
|
}, [r, a]), _(() => {
|
|
1495
|
-
e && e.usage === 0 && e.messages.length === 0 &&
|
|
1496
|
-
}, [e]), /* @__PURE__ */
|
|
1497
|
-
|
|
1429
|
+
e && e.usage === 0 && e.messages.length === 0 && m.current && m.current.focus();
|
|
1430
|
+
}, [e]), /* @__PURE__ */ s("form", { className: "mt-2", onSubmit: b, children: /* @__PURE__ */ s(
|
|
1431
|
+
He,
|
|
1498
1432
|
{
|
|
1499
1433
|
mode: "dark",
|
|
1500
1434
|
focusMode: "light",
|
|
1501
|
-
ref:
|
|
1435
|
+
ref: m,
|
|
1502
1436
|
name: "chat-input",
|
|
1503
|
-
label:
|
|
1437
|
+
label: Ae,
|
|
1504
1438
|
helperText: "Press ENTER to add a new line",
|
|
1505
1439
|
helperTextOnFocus: !0,
|
|
1506
1440
|
required: !0,
|
|
1507
1441
|
value: o,
|
|
1508
1442
|
onChange: (h) => i(h.target.value),
|
|
1509
|
-
onKeyDown:
|
|
1510
|
-
rightElement: /* @__PURE__ */
|
|
1443
|
+
onKeyDown: Je([["mod+Enter", b]]),
|
|
1444
|
+
rightElement: /* @__PURE__ */ s(
|
|
1511
1445
|
ue,
|
|
1512
1446
|
{
|
|
1513
1447
|
disabled: e == null ? void 0 : e.streaming,
|
|
@@ -1515,30 +1449,92 @@ const ae = Ke(
|
|
|
1515
1449
|
type: "submit",
|
|
1516
1450
|
mode: "light",
|
|
1517
1451
|
focusMode: "light",
|
|
1518
|
-
children:
|
|
1452
|
+
children: Me
|
|
1519
1453
|
}
|
|
1520
1454
|
)
|
|
1521
1455
|
}
|
|
1522
1456
|
) });
|
|
1523
|
-
},
|
|
1524
|
-
const {
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1457
|
+
}, Dt = () => {
|
|
1458
|
+
const { dispatch: e, state: t } = R(U), { dispatch: r, state: a } = R(j), { getAccessToken: o, user: i } = z(), [g, l] = A({
|
|
1459
|
+
loaded: !1
|
|
1460
|
+
}), m = "mt-2 flex justify-center rounded-md", u = B(null), b = B(!1), h = (n) => {
|
|
1461
|
+
n.preventDefault(), e({
|
|
1462
|
+
type: ie
|
|
1463
|
+
});
|
|
1464
|
+
};
|
|
1465
|
+
_(() => {
|
|
1466
|
+
var n;
|
|
1467
|
+
(t == null ? void 0 : t.streaming) === !0 && !b.current && u.current && (b.current = !0, u.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (b.current = !1, (n = u.current) == null || n.blur());
|
|
1468
|
+
}, [t]);
|
|
1469
|
+
const c = (n, p) => {
|
|
1470
|
+
n.preventDefault(), r({
|
|
1471
|
+
type: ge,
|
|
1472
|
+
payload: {
|
|
1473
|
+
tag: p
|
|
1474
|
+
}
|
|
1475
|
+
});
|
|
1476
|
+
};
|
|
1477
|
+
return _(() => {
|
|
1478
|
+
if (!i) {
|
|
1479
|
+
l({
|
|
1480
|
+
loaded: !1
|
|
1481
|
+
});
|
|
1482
|
+
return;
|
|
1483
|
+
}
|
|
1484
|
+
g.loaded || (async () => {
|
|
1485
|
+
try {
|
|
1486
|
+
const n = await he({
|
|
1487
|
+
accessToken: await o(),
|
|
1488
|
+
type: be.GET_USER_PREFERENCES,
|
|
1489
|
+
params: {
|
|
1490
|
+
user: i.username
|
|
1491
|
+
}
|
|
1492
|
+
});
|
|
1493
|
+
n.status === 200 && (r({
|
|
1494
|
+
type: le,
|
|
1495
|
+
payload: {
|
|
1496
|
+
tags: n.data.tags || []
|
|
1497
|
+
}
|
|
1498
|
+
}), l({
|
|
1499
|
+
loaded: !0
|
|
1500
|
+
}));
|
|
1501
|
+
} catch {
|
|
1502
|
+
}
|
|
1503
|
+
})();
|
|
1504
|
+
}, [i]), /* @__PURE__ */ v(O, { children: [
|
|
1505
|
+
/* @__PURE__ */ s(Oe, { alignHorizontal: "center", columnGap: 2, children: g && g.loaded && a.tags && a.tags.map((n) => n.enabled && n.label && n.content && /* @__PURE__ */ s(ze, { children: /* @__PURE__ */ s("div", { className: m, children: /* @__PURE__ */ s(
|
|
1506
|
+
ue,
|
|
1507
|
+
{
|
|
1508
|
+
noBorder: !0,
|
|
1509
|
+
mode: "dark",
|
|
1510
|
+
focusMode: "light",
|
|
1511
|
+
size: "small",
|
|
1512
|
+
onClick: (p) => c(p, n.content),
|
|
1513
|
+
children: n.label
|
|
1514
|
+
}
|
|
1515
|
+
) }) }, `tag-button-${n.slot}`)) }),
|
|
1516
|
+
me(E, t) && /* @__PURE__ */ s("div", { className: m, children: /* @__PURE__ */ s(
|
|
1517
|
+
Ue,
|
|
1518
|
+
{
|
|
1519
|
+
noBorder: !0,
|
|
1520
|
+
mode: "dark",
|
|
1521
|
+
focusMode: "light",
|
|
1522
|
+
ref: u,
|
|
1523
|
+
onClick: h,
|
|
1524
|
+
labelRight: t != null && t.streaming ? X.ACTION_WHILE_STREAMING.content : X.ACTION_WHILE_NOT_STREAMING.content,
|
|
1525
|
+
children: t != null && t.streaming ? /* @__PURE__ */ s(Ke, { size: "size-4" }) : /* @__PURE__ */ s(je, { size: "size-4" })
|
|
1526
|
+
}
|
|
1527
|
+
) })
|
|
1532
1528
|
] });
|
|
1533
1529
|
};
|
|
1534
1530
|
function _e({ isComponent: e = !1 }) {
|
|
1535
|
-
const t = B(!1), { getAccessToken: r, user: a } =
|
|
1536
|
-
key: J +
|
|
1531
|
+
const t = B(!1), { getAccessToken: r, user: a } = z(), [o] = Q({
|
|
1532
|
+
key: J + De,
|
|
1537
1533
|
initialValue: ""
|
|
1538
1534
|
}), [i] = Q({
|
|
1539
|
-
key: J +
|
|
1540
|
-
initialValue:
|
|
1541
|
-
}), [g,
|
|
1535
|
+
key: J + $e,
|
|
1536
|
+
initialValue: We.ASC
|
|
1537
|
+
}), [g, l] = D(rt, {
|
|
1542
1538
|
id: P(),
|
|
1543
1539
|
model: M,
|
|
1544
1540
|
engine: M,
|
|
@@ -1546,14 +1542,14 @@ function _e({ isComponent: e = !1 }) {
|
|
|
1546
1542
|
messages: [],
|
|
1547
1543
|
tags: [],
|
|
1548
1544
|
isComponent: e
|
|
1549
|
-
}), [
|
|
1545
|
+
}), [m, u] = D(at, {
|
|
1550
1546
|
searchString: o,
|
|
1551
1547
|
sortedCell: "timestamp",
|
|
1552
1548
|
sortDirection: i
|
|
1553
|
-
}), [b, h] = D(
|
|
1549
|
+
}), [b, h] = D(ot, {
|
|
1554
1550
|
tag: "",
|
|
1555
1551
|
tags: []
|
|
1556
|
-
}), [
|
|
1552
|
+
}), [c, n] = A({
|
|
1557
1553
|
version: "",
|
|
1558
1554
|
models: [],
|
|
1559
1555
|
plugins: [],
|
|
@@ -1561,7 +1557,7 @@ function _e({ isComponent: e = !1 }) {
|
|
|
1561
1557
|
engines: []
|
|
1562
1558
|
});
|
|
1563
1559
|
return _(() => {
|
|
1564
|
-
|
|
1560
|
+
c.version !== "" || t.current || (async () => {
|
|
1565
1561
|
try {
|
|
1566
1562
|
t.current = !0;
|
|
1567
1563
|
const p = await he({
|
|
@@ -1571,8 +1567,8 @@ function _e({ isComponent: e = !1 }) {
|
|
|
1571
1567
|
user: a == null ? void 0 : a.username
|
|
1572
1568
|
}
|
|
1573
1569
|
});
|
|
1574
|
-
t.current = !1, p.status === 200 && (
|
|
1575
|
-
type:
|
|
1570
|
+
t.current = !1, p.status === 200 && (n(p.data), l({
|
|
1571
|
+
type: se,
|
|
1576
1572
|
payload: {
|
|
1577
1573
|
engine: p.data.engine
|
|
1578
1574
|
}
|
|
@@ -1580,26 +1576,29 @@ function _e({ isComponent: e = !1 }) {
|
|
|
1580
1576
|
} catch {
|
|
1581
1577
|
}
|
|
1582
1578
|
})();
|
|
1583
|
-
}, [
|
|
1579
|
+
}, [c, r, a]), _(() => {
|
|
1584
1580
|
var p;
|
|
1585
1581
|
(p = document.getElementById("logo")) == null || p.classList.add("fadeOut"), setTimeout(() => {
|
|
1586
1582
|
var f;
|
|
1587
1583
|
(f = document.getElementById("root")) == null || f.classList.replace("app-hidden", "fadeIn");
|
|
1588
1584
|
}, 500);
|
|
1589
|
-
}), /* @__PURE__ */
|
|
1590
|
-
|
|
1585
|
+
}), /* @__PURE__ */ s(U.Provider, { value: { state: g, dispatch: l, serverStats: c }, children: /* @__PURE__ */ s(
|
|
1586
|
+
Pe.Provider,
|
|
1591
1587
|
{
|
|
1592
1588
|
value: {
|
|
1593
|
-
state:
|
|
1594
|
-
dispatch:
|
|
1589
|
+
state: m,
|
|
1590
|
+
dispatch: u
|
|
1595
1591
|
},
|
|
1596
1592
|
children: /* @__PURE__ */ v(
|
|
1597
|
-
|
|
1593
|
+
j.Provider,
|
|
1598
1594
|
{
|
|
1599
1595
|
value: { state: b, dispatch: h },
|
|
1600
1596
|
children: [
|
|
1601
|
-
/* @__PURE__ */
|
|
1602
|
-
/* @__PURE__ */
|
|
1597
|
+
/* @__PURE__ */ s(Ve, { className: "max-h-[calc(100svh_-_203px)]", children: /* @__PURE__ */ s(Ut, {}) }),
|
|
1598
|
+
/* @__PURE__ */ v("div", { className: "md:mx-auto md:max-w-4xl w-11/12 fixed bottom-10 left-1/2 transform -translate-x-1/2 z-1000", children: [
|
|
1599
|
+
/* @__PURE__ */ s(Dt, {}),
|
|
1600
|
+
/* @__PURE__ */ s(Vt, {})
|
|
1601
|
+
] })
|
|
1603
1602
|
]
|
|
1604
1603
|
}
|
|
1605
1604
|
)
|
|
@@ -1607,8 +1606,8 @@ function _e({ isComponent: e = !1 }) {
|
|
|
1607
1606
|
) });
|
|
1608
1607
|
}
|
|
1609
1608
|
_e.displayName = "App";
|
|
1610
|
-
const
|
|
1609
|
+
const Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: _e }, Symbol.toStringTag, { value: "Module" }));
|
|
1611
1610
|
export {
|
|
1612
|
-
|
|
1613
|
-
|
|
1611
|
+
Wt as LazyApp,
|
|
1612
|
+
_t as ae
|
|
1614
1613
|
};
|