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